[BACK]Return to apprentice.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / file

Diff for /src/usr.bin/file/Attic/apprentice.c between version 1.19 and 1.20

version 1.19, 2004/05/19 02:32:35 version 1.20, 2004/09/25 09:19:35
Line 285 
Line 285 
         private const char hdr[] =          private const char hdr[] =
                 "cont\toffset\ttype\topcode\tmask\tvalue\tdesc";                  "cont\toffset\ttype\topcode\tmask\tvalue\tdesc";
         FILE *f;          FILE *f;
         char line[BUFSIZ+1];          char line[BUFSIZ];
         int lineno;          int lineno;
         int errs = 0;          int errs = 0;
   
Line 310 
Line 310 
                 (void)fprintf(stderr, "%s\n", hdr);                  (void)fprintf(stderr, "%s\n", hdr);
   
         /* parse it */          /* parse it */
         for (lineno = 1; fgets(line, BUFSIZ, f) != NULL; lineno++) {          for (lineno = 1; fgets(line, sizeof(line), f) != NULL; lineno++) {
                 if (line[0]=='#')       /* comment, do not parse */                  if (line[0]=='#')       /* comment, do not parse */
                         continue;                          continue;
                 if (strlen(line) <= (unsigned)1) /* null line, garbage, etc */                  if (strlen(line) <= (unsigned)1) /* null line, garbage, etc */

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20