From 8c6d96aa31fb3a48545138b622addbca00df2b52 Mon Sep 17 00:00:00 2001 From: "N. Brouard" Date: Fri, 12 Feb 2021 11:34:20 +0000 Subject: [PATCH] * imach.c (Module): The use of a Windows BOM (huge) file is now an error --- src/imach.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/imach.c b/src/imach.c index fd029ce..295d8d7 100644 --- a/src/imach.c +++ b/src/imach.c @@ -1,6 +1,9 @@ /* $Id$ $State$ $Log$ + 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 * (Module): imach.c Update mle=-3 (for computing Life expectancy and life table from the data without any state) @@ -9252,16 +9255,16 @@ int readdata(char datafile[], int firstobs, int lastobs, int *imax) else if( line[0] == (char)0xFF && line[1] == (char)0xFE) { 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); - 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); + 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,"# 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; } else if( line[0] == 0 && line[1] == 0) { if( line[2] == (char)0xFE && line[3] == (char)0xFF){ 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); - 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); + 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,"# 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; } } else{ -- 2.43.0