Diff for /imach/src/imach.c between versions 1.303 and 1.304

version 1.303, 2021/02/11 19:50:15 version 1.304, 2021/02/12 11:34:20
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     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    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.    *  (Module): imach.c Someone entered 'results:' instead of 'result:'. Now it is an error which is printed.
   
Line 9255  int readdata(char datafile[], int firsto Line 9258  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{

Removed from v.1.303  
changed lines
  Added in v.1.304


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>