|
|
| version 1.302, 2020/02/22 21:00:05 | version 1.306, 2021/02/20 15:44:02 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ | /* $Id$ |
| $State$ | $State$ |
| $Log$ | $Log$ |
| Revision 1.306 2021/02/20 15:44:02 brouard | |
| Summary: Version 0.99r21 | |
| * imach.c (Module): Fix bug on quitting after result lines! | |
| (Module): Version 0.99r21 | |
| Revision 1.305 2021/02/20 15:28:30 brouard | |
| * imach.c (Module): Fix bug on quitting after result lines! | |
| Revision 1.304 2021/02/12 11:34:20 brouard | |
| * imach.c (Module): The use of a Windows BOM (huge) file is now an error | |
| Revision 1.303 2021/02/11 19:50:15 brouard | |
| * (Module): imach.c Someone entered 'results:' instead of 'result:'. Now it is an error which is printed. | |
| Revision 1.302 2020/02/22 21:00:05 brouard | Revision 1.302 2020/02/22 21:00:05 brouard |
| * (Module): imach.c Update mle=-3 (for computing Life expectancy | * (Module): imach.c Update mle=-3 (for computing Life expectancy |
| and life table from the data without any state) | and life table from the data without any state) |
| Line 1130 typedef struct { | Line 1145 typedef struct { |
| /* $State$ */ | /* $State$ */ |
| #include "version.h" | #include "version.h" |
| char version[]=__IMACH_VERSION__; | char version[]=__IMACH_VERSION__; |
| char copyright[]="May 2019,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020"; | 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$ $Date$"; | char fullversion[]="$Revision$ $Date$"; |
| char strstart[80]; | char strstart[80]; |
| char optionfilext[10], optionfilefiname[FILENAMELENGTH]; | char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
| Line 9252 int readdata(char datafile[], int firsto | Line 9267 int readdata(char datafile[], int firsto |
| else if( line[0] == (char)0xFF && line[1] == (char)0xFE) | else if( line[0] == (char)0xFF && line[1] == (char)0xFE) |
| { | { |
| noffset=noffset+2; | noffset=noffset+2; |
| printf("# Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile);fflush(stdout); | printf("# Error Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile);fflush(stdout); |
| fprintf(ficlog,"# Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile); | fprintf(ficlog,"# Error Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile); |
| fflush(ficlog); return 1; | fflush(ficlog); return 1; |
| } | } |
| else if( line[0] == 0 && line[1] == 0) | else if( line[0] == 0 && line[1] == 0) |
| { | { |
| if( line[2] == (char)0xFE && line[3] == (char)0xFF){ | if( line[2] == (char)0xFE && line[3] == (char)0xFF){ |
| noffset=noffset+4; | noffset=noffset+4; |
| printf("# Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile);fflush(stdout); | printf("# Error Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile);fflush(stdout); |
| fprintf(ficlog,"# Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile); | fprintf(ficlog,"# Error Data file '%s' is a huge UTF16BE BOM file, please convert to UTF8 or ascii file (for example with dos2unix) and rerun.\n",datafile); |
| fflush(ficlog); return 1; | fflush(ficlog); return 1; |
| } | } |
| } else{ | } else{ |
| Line 12494 Please run with mle=-1 to get a correct | Line 12509 Please run with mle=-1 to get a correct |
| fprintf(ficres,"result: %s\n",resultline); | fprintf(ficres,"result: %s\n",resultline); |
| fprintf(ficlog,"result: %s\n",resultline); | fprintf(ficlog,"result: %s\n",resultline); |
| break; | break; |
| case 14: | case 14: |
| if(ncovmodel >2 && nresult==0 ){ | printf("Error: Unknown command '%s'\n",line); |
| fprintf(ficlog,"Error: Unknown command '%s'\n",line); | |
| if(ncovmodel >=2 && nresult==0 ){ | |
| printf("ERROR: no result lines! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",line); | printf("ERROR: no result lines! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",line); |
| goto end; | fprintf(ficlog,"ERROR: no result lines! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",line); |
| } | } |
| /* goto end; */ | |
| break; | break; |
| default: | default: |
| nresult=1; | nresult=1; |