--- imach/src/imach.c 2014/06/20 17:32:08 1.154 +++ imach/src/imach.c 2014/08/25 20:10:10 1.156 @@ -1,6 +1,13 @@ -/* $Id: imach.c,v 1.154 2014/06/20 17:32:08 brouard Exp $ +/* $Id: imach.c,v 1.156 2014/08/25 20:10:10 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.156 2014/08/25 20:10:10 brouard + *** empty log message *** + + Revision 1.155 2014/08/25 18:32:34 brouard + Summary: New compile, minor changes + Author: Brouard + Revision 1.154 2014/06/20 17:32:08 brouard Summary: Outputs now all graphs of convergence to period prevalence @@ -513,11 +520,11 @@ extern int errno; #define ODIRSEPARATOR '/' #endif -/* $Id: imach.c,v 1.154 2014/06/20 17:32:08 brouard Exp $ */ +/* $Id: imach.c,v 1.156 2014/08/25 20:10:10 brouard Exp $ */ /* $State: Exp $ */ -char version[]="Imach version 0.98nU, January 2014,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121)"; -char fullversion[]="$Revision: 1.154 $ $Date: 2014/06/20 17:32:08 $"; +char version[]="Imach version 0.98nV, August 2014,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121)"; +char fullversion[]="$Revision: 1.156 $ $Date: 2014/08/25 20:10:10 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -5175,7 +5182,7 @@ calandcheckages(int imx, int maxwav, dou } else if(agev[m][i] >*agemax){ *agemax=agev[m][i]; - printf(" Max anint[%d][%d]=%.0f annais[%d]=%.0f, agemax=%.2f\n",m,i,anint[m][i], i,annais[i], *agemax); + /* printf(" Max anint[%d][%d]=%.0f annais[%d]=%.0f, agemax=%.2f\n",m,i,anint[m][i], i,annais[i], *agemax);*/ } /*agev[m][i]=anint[m][i]-annais[i];*/ /* agev[m][i] = age[i]+2*m;*/ @@ -5337,6 +5344,9 @@ int main(int argc, char *argv[]) i=strlen(pathr); if(pathr[i-1]=='\n') pathr[i-1]='\0'; + i=strlen(pathr); + if(pathr[i-1]==' ') /* This may happen when dragging on oS/X! */ + pathr[i-1]='\0'; for (tok = pathr; tok != NULL; ){ printf("Pathr |%s|\n",pathr); while ((val = strsep(&tok, "\"" )) != NULL && *val == '\0'); @@ -5392,7 +5402,7 @@ int main(int argc, char *argv[]) path=%s \n\ optionfile=%s\n\ optionfilext=%s\n\ - optionfilefiname=%s\n",pathimach,pathtot,path,optionfile,optionfilext,optionfilefiname); + optionfilefiname='%s'\n",pathimach,pathtot,path,optionfile,optionfilext,optionfilefiname); printf("Local time (at start):%s",strstart); fprintf(ficlog,"Local time (at start): %s",strstart); @@ -5408,8 +5418,8 @@ int main(int argc, char *argv[]) /*---------arguments file --------*/ if((ficpar=fopen(optionfile,"r"))==NULL) { - printf("Problem with optionfile %s with errno=%s\n",optionfile,strerror(errno)); - fprintf(ficlog,"Problem with optionfile %s with errno=%s\n",optionfile,strerror(errno)); + printf("Problem with optionfile '%s' with errno='%s'\n",optionfile,strerror(errno)); + fprintf(ficlog,"Problem with optionfile '%s' with errno='%s'\n",optionfile,strerror(errno)); fflush(ficlog); /* goto end; */ exit(70); @@ -6663,9 +6673,9 @@ Interval (in months) between two waves: sprintf(plotcmd,"\"%sgnuplot.exe\"",pathimach); #endif if(!stat(plotcmd,&info)){ - printf("Error gnuplot program not found: %s\n",plotcmd);fflush(stdout); + printf("Error or gnuplot program not found: %s\n",plotcmd);fflush(stdout); if(!stat(getenv("GNUPLOTBIN"),&info)){ - printf("Error gnuplot program not found: %s Environment GNUPLOTBIN not set.\n",plotcmd);fflush(stdout); + printf("Error or gnuplot program not found: %s Environment GNUPLOTBIN not set.\n",plotcmd);fflush(stdout); }else strcpy(pplotcmd,plotcmd); #ifdef UNIX