/*************************************
*                                    *
*    外枠システム  zero.c            *
*  （変数ゼロクリア）                *
*                                    *
*************************************/

#include <stdio.h>
#include <stdlib.h>
#include "set.h"
#include "cntl.h"
#include "kyos.h"

void zero(void) {

int  zkubun ; 
int  pkubun ; 
int  ykubun ; 
int  kubun  ;

    for (nendo=STARTY; nendo<=ENDY; nendo++){

        tankor_cho_c[nendo-STARTY] = 0.0 ;
        tankor_cho_m[nendo-STARTY] = 0.0 ;
        for (zkubun=0; zkubun<=9; zkubun++ ) {
            tankor_all_c[zkubun][nendo-STARTY] = 0.0 ;
            tankor_all_m[zkubun][nendo-STARTY] = 0.0 ;
            heikinh_c[zkubun][nendo-STARTY] = 0.0 ;
            heikinh_m[zkubun][nendo-STARTY] = 0.0 ;
            kounenteki_c[zkubun][nendo-STARTY] = 0.0 ;
            kounenteki_m[zkubun][nendo-STARTY] = 0.0 ;
            if ( zkubun <= 7 ) {
              tyouken[zkubun][nendo-STARTY] = 0.0 ;
              syouken[zkubun][nendo-STARTY] = 0.0 ;
              tjwari[zkubun] = 0.0 ;
              tiwari[zkubun] = 0.0 ;
            }
        }

        for(sei=0; sei<=4; sei++){

            TEMP[nendo-STARTY][sei][nenrei]=0.0 ;

            sojinko_c[nendo-STARTY][sei]=0.0 ;
            sojinko_m[nendo-STARTY][sei]=0.0 ;
            seisanj_c[nendo-STARTY][sei]=0.0 ;
            seisanj_m[nendo-STARTY][sei]=0.0 ;
            seisanj_j_c[nendo-STARTY][sei]=0.0 ;
            seisanj_j_m[nendo-STARTY][sei]=0.0 ;
            sojinko_j_c[nendo-STARTY][sei]=0.0 ;
            sojinko_j_m[nendo-STARTY][sei]=0.0 ;
            stk_seisanj_c[nendo-STARTY][sei]=0.0 ;
            stk_seisanj_m[nendo-STARTY][sei]=0.0 ;
            stk_sojinko_c[nendo-STARTY][sei]=0.0 ;
            stk_sojinko_m[nendo-STARTY][sei]=0.0 ;
            sts_seisanj_c[nendo-STARTY][sei]=0.0 ;
            sts_seisanj_m[nendo-STARTY][sei]=0.0 ;
            sts_sojinko_c[nendo-STARTY][sei]=0.0 ;
            sts_sojinko_m[nendo-STARTY][sei]=0.0 ;

            for(nenrei=0; nenrei<=110; nenrei++){

                jinko_c[nendo-STARTY][sei][nenrei]=0.0     ; 
                jinko_m[nendo-STARTY][sei][nenrei]=0.0     ; 
                jinko_wari[sei][nenrei]=0.0                ;
                jinko_syus[nenrei]=0.0                     ;
                yuhaigr_c[nendo-STARTY][nenrei] = 0.0      ;
                yuhaigr_m[nendo-STARTY][nenrei] = 0.0      ;
                stk_jinko_c[nendo-STARTY][sei][nenrei]=0.0  ; 
                stk_jinko_m[nendo-STARTY][sei][nenrei]=0.0  ; 
                sts_jinko_c[nendo-STARTY][sei][nenrei]=0.0  ; 
                sts_jinko_m[nendo-STARTY][sei][nenrei]=0.0  ; 

                roudr_c[nendo-STARTY][sei][nenrei]=0.0     ; 
                roudr_m[nendo-STARTY][sei][nenrei]=0.0     ; 
                roudr_a_c[nendo-STARTY][sei][nenrei]=0.0   ; 
                roudr_a_m[nendo-STARTY][sei][nenrei]=0.0   ; 
                roudj_c[nendo-STARTY][sei][nenrei]=0.0     ; 
                roudj_m[nendo-STARTY][sei][nenrei]=0.0     ; 

                syuwari_c[nendo-STARTY][sei][nenrei]=0.0    ;
                syuwari_m[nendo-STARTY][sei][nenrei]=0.0    ;
                syuwari_a_c[nendo-STARTY][sei][nenrei]=0.0  ;
                syuwari_a_m[nendo-STARTY][sei][nenrei]=0.0  ;
                syugyor_c[nendo-STARTY][sei][nenrei]=0.0    ;
                syugyor_a_c[nendo-STARTY][sei][nenrei]=0.0  ;
                syugyor_m[nendo-STARTY][sei][nenrei]=0.0    ;
                syugyor_a_m[nendo-STARTY][sei][nenrei]=0.0  ;
                syugyoj_c[nendo-STARTY][sei][nenrei]=0.0    ;
                syugyoj_m[nendo-STARTY][sei][nenrei]=0.0    ;

                koyour_c[nendo-STARTY][sei][nenrei]=0.0     ;
                koyour_m[nendo-STARTY][sei][nenrei]=0.0     ;
                koyour_a_c[nendo-STARTY][sei][nenrei]=0.0   ;
                koyour_a_m[nendo-STARTY][sei][nenrei]=0.0   ;
                koyour_cho_c[nendo-STARTY][sei][nenrei]=0.0 ;
                koyour_cho_m[nendo-STARTY][sei][nenrei]=0.0 ;
                jieigyoj_c[nendo-STARTY][sei][nenrei]=0.0   ;
                jieigyoj_m[nendo-STARTY][sei][nenrei]=0.0   ;

                for ( zkubun=0; zkubun<=9; zkubun++ ) {
                    koyouj_c[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                    koyouj_m[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                    tankor_c[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                    tankor_m[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                    soroudh_c[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                    soroudh_m[zkubun][nendo-STARTY][sei][nenrei] = 0.0 ;
                }

                TEMP[nendo-STARTY][sei][nenrei]=0.0        ;

                nigou[nendo-STARTY][sei][nenrei]=0.0          ; 
                kounen[nendo-STARTY][sei][nenrei]=0.0         ; 
                qkounen[nendo-STARTY][sei][nenrei]=0.0        ; 
                qkou12syu[nendo-STARTY][sei][nenrei]=0.0      ; 
                kou12syu[nendo-STARTY][sei][nenrei]=0.0       ; 
                kou3syu[nendo-STARTY][sei][nenrei]=0.0        ; 
                sangou[nendo-STARTY][sei][nenrei]=0.0         ; 
                kounen3[nendo-STARTY][sei][nenrei]=0.0        ; 
                qkounen3[nendo-STARTY][sei][nenrei]=0.0       ; 
                kou12syu3[nendo-STARTY][sei][nenrei]=0.0      ;
                qkou12syu3[nendo-STARTY][sei][nenrei]=0.0     ;
                kou3syu3[nendo-STARTY][sei][nenrei]=0.0       ; 
                ichigou[nendo-STARTY][sei][nenrei]=0.0        ; 
                ichigouip[nendo-STARTY][sei][nenrei]=0.0      ; 
                ichigouni[nendo-STARTY][sei][nenrei]=0.0      ; 
                mika_soto1[nendo-STARTY][sei][nenrei]=0.0     ; 
                mika_soto2[nendo-STARTY][sei][nenrei]=0.0     ; 
                kikin[nendo-STARTY][sei][nenrei]=0.0          ; 
                r_mika_soto[nendo-STARTY][sei][nenrei]=0.0    ; 
                r_ichigouni[nendo-STARTY][sei][nenrei]=0.0    ;

                rk_sen[nendo-STARTY][sei][nenrei]=0.0         ;
                rk_kikin[nendo-STARTY][sei][nenrei]=0.0       ;

                kounen_cho[nendo-STARTY][sei][nenrei]=0.0 ;

                ichiyuhaigr[nenrei]=0.0     ;
                kouyuhaigr_c[nendo-STARTY][nenrei]=0.0  ;
                kouyuhaigr_m[nendo-STARTY][nenrei]=0.0  ;


                for (seido=0; seido<=7; seido++) {
                    kyosai[seido][nendo-STARTY][sei][nenrei]=0.0     ; 
                    kyosai3[seido][nendo-STARTY][sei][nenrei]=0.0   ; 
                }

                for (zkubun=0; zkubun<=65; zkubun++) {
                    tmae[zkubun][nendo-STARTY][sei][nenrei]=0.0    ;
                    tato[zkubun][nendo-STARTY][sei][nenrei]=0.0    ;
                }

            }


            for ( nenrei=0; nenrei<=110; nenrei++ ) {
                for ( pkubun=1; pkubun<=9; pkubun++ ) {
                    for ( ykubun=0; ykubun<=2; ykubun++ ) { 
                        partnin[nendo-STARTY][sei][nenrei][pkubun][ykubun]=0.0 ;
                        partnin[nendo-STARTY][sei][nenrei][pkubun+10][ykubun]=0.0 ;
                        partnin[nendo-STARTY][sei][nenrei][pkubun+13][ykubun]=0.0 ;
                        partgenwari[nendo-STARTY][sei][nenrei][pkubun][ykubun]=0.0 ;
                    }
                }
            }
            for ( kubun=0; kubun<=16; kubun++ ) {
                for ( pkubun=1; pkubun<=4; pkubun++ ) {
                    for ( ykubun=0; ykubun<=2; ykubun++ ) { 
                        kbetu_partnin[nendo-STARTY][sei][kubun][pkubun][ykubun]=0.0 ;
                        kbetu_tankoj[nendo-STARTY][sei][kubun]=0.0 ;
                        kbetu_partkiso[sei][kubun][pkubun][ykubun]=0.0 ;
                        kbetu_partgen[nendo-STARTY][sei][kubun][pkubun]=0.0;
                    }
                }
            }
            

        }
    }


    for (nendo=STARTY; nendo<=ENDY; nendo++){

      xend[8][nendo-STARTY]=0 ;
      xend[9][nendo-STARTY]=0 ;

      for (seido=0; seido<=7; seido++){ 

        xend[seido][nendo-STARTY]=0 ;

        for(sei=0; sei<=4; sei++){

            akyos[seido][nendo-STARTY][sei]=0.0 ;
            st_akyos[seido][nendo-STARTY][sei]=0.0 ;
            sinki[seido][nendo-STARTY][sei]=0.0 ;

            for(nenrei=0; nenrei<=110; nenrei++){

                    bup[seido][nendo-STARTY][sei][nenrei]=0.0 ;
                    zanzon[seido][nendo-STARTY][sei][nenrei]=0.0  ;
                    dattai[seido][nendo-STARTY][sei][nenrei]=0.0  ;

            }

        }
      }
    }


}

