From: N. Brouard Date: Sat, 3 May 2003 01:18:24 +0000 (+0000) Subject: Some cleaning X-Git-Tag: imach-099s7~639 X-Git-Url: https://henry.ined.fr/git/?a=commitdiff_plain;h=d35ef9a8daa55d16ade464641d28c0e224ef4ea8;p=.git Some cleaning --- diff --git a/src/imach.c b/src/imach.c index e0f121e..244d5f4 100644 --- a/src/imach.c +++ b/src/imach.c @@ -119,7 +119,7 @@ #define ODIRSEPARATOR '\\' #endif -char version[80]="Imach version 0.95, February 2003, INED-EUROREVES "; +char version[80]="Imach version 0.95, May 2003, INED-EUROREVES "; int erreur; /* Error number */ int nvar; int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov; @@ -3138,6 +3138,7 @@ prevforecast(char fileres[], double anproj1, double mproj1, double jproj1, doubl fprintf(ficresf,"#****** Routine prevforecast **\n"); +/* if (h==(int)(YEARM*yearp)){ */ for(cptcov=1, k=0;cptcov<=i1;cptcov++){ for(cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){ k=k+1; @@ -3164,7 +3165,7 @@ prevforecast(char fileres[], double anproj1, double mproj1, double jproj1, doubl hpxij(p3mat,nhstepm,agec,hstepm,p,nlstate,stepm,oldm,savm, k); for (h=0; h<=nhstepm; h++){ - if (h==(int) (YEARM*yearp)) { + if (h*hstepm/YEARM*stepm ==yearp) { fprintf(ficresf,"\n"); for(j=1;j<=cptcoveff;j++) fprintf(ficresf,"%d %d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]); @@ -3178,19 +3179,20 @@ prevforecast(char fileres[], double anproj1, double mproj1, double jproj1, doubl else { ppij=ppij+p3mat[i][j][h]*probs[(int)(agec)][i][cptcod]; } - if (h==(int)(YEARM*yearp)) + if (h*hstepm/YEARM*stepm== yearp) { fprintf(ficresf," %.3f", p3mat[i][j][h]); - } - if (h==(int)(YEARM*yearp)){ + } + } /* end i */ + if (h*hstepm/YEARM*stepm==yearp) { fprintf(ficresf," %.3f", ppij); } - } - } + }/* end j */ + } /* end h */ free_ma3x(p3mat,1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm); - } - } - } - } + } /* end agec */ + } /* end yearp */ + } /* end cptcod */ + } /* end cptcov */ if (mobilav!=0) free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX); @@ -4468,8 +4470,9 @@ ageminpar, agemax, s[lastpass][imx], agev[lastpass][imx], nlstate, imx, mint[las strcpy(plotcmd,GNUPLOTPROGRAM); strcat(plotcmd," "); strcat(plotcmd,optionfilegnuplot); - printf("Starting: %s\n",plotcmd);fflush(stdout); + printf("Starting graphs with: %s",plotcmd);fflush(stdout); system(plotcmd); + printf(" Wait..."); /*#ifdef windows*/ while (z[0] != 'q') {