--- imach/src/imach.c 2021/03/08 18:11:32 1.307 +++ imach/src/imach.c 2021/03/31 13:11:57 1.308 @@ -1,6 +1,12 @@ -/* $Id: imach.c,v 1.307 2021/03/08 18:11:32 brouard Exp $ +/* $Id: imach.c,v 1.308 2021/03/31 13:11:57 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.308 2021/03/31 13:11:57 brouard + Summary: Version 0.99r23 + + + * imach.c (Module): Still bugs in the result loop. Thank to Holly Benett + Revision 1.307 2021/03/08 18:11:32 brouard Summary: 0.99r22 fixed bug on result: @@ -1144,12 +1150,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.307 2021/03/08 18:11:32 brouard Exp $ */ +/* $Id: imach.c,v 1.308 2021/03/31 13:11:57 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; -char copyright[]="Feb 2021,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020, INED 2000-2021"; -char fullversion[]="$Revision: 1.307 $ $Date: 2021/03/08 18:11:32 $"; +char copyright[]="March 2021,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020, Nihon University 2021, INED 2000-2021"; +char fullversion[]="$Revision: 1.308 $ $Date: 2021/03/31 13:11:57 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -12420,9 +12426,11 @@ Please run with mle=-1 to get a correct /* Results */ endishere=0; nresult=0; + parameterline=0; do{ if(!fgets(line, MAXLINE, ficpar)){ endishere=1; + parameterline=15; }else if (line[0] == '#') { /* If line starts with a # it is a comment */ numlinepar++; @@ -12441,7 +12449,7 @@ Please run with mle=-1 to get a correct else{ parameterline=14; } - switch (parameterline){ + switch (parameterline){ /* =0 only if only comments */ case 11: if((num_filled=sscanf(line,"prevforecast=%d starting-proj-date=%lf/%lf/%lf final-proj-date=%lf/%lf/%lf mobil_average=%d\n",&prevfcast,&jproj1,&mproj1,&anproj1,&jproj2,&mproj2,&anproj2,&mobilavproj)) !=EOF && (num_filled == 8)){ fprintf(ficparo,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobil_average=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj); @@ -12511,11 +12519,14 @@ Please run with mle=-1 to get a correct } /* goto end; */ break; - default: + case 15: + printf("End of resultlines.\n"); + fprintf(ficlog,"End of resultlines.\n"); + break; + default: /* parameterline =0 */ nresult=1; decoderesult(".",nresult ); /* No covariate */ } /* End switch parameterline */ - parameterline=0; }while(endishere==0); /* End do */ /* freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint); */