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

Diff for /src/usr.bin/mg/extend.c between version 1.52 and 1.53

version 1.52, 2012/04/12 04:47:59 version 1.53, 2012/05/25 04:56:58
Line 652 
Line 652 
         int      s = TRUE, line;          int      s = TRUE, line;
         int      nbytes = 0;          int      nbytes = 0;
         char     excbuf[128];          char     excbuf[128];
           FILE    *ffp;
   
         if ((fname = adjustname(fname, TRUE)) == NULL)          if ((fname = adjustname(fname, TRUE)) == NULL)
                 /* just to be careful */                  /* just to be careful */
                 return (FALSE);                  return (FALSE);
   
         if (ffropen(fname, NULL) != FIOSUC)          if (ffropen(&ffp, fname, NULL) != FIOSUC)
                 return (FALSE);                  return (FALSE);
   
         line = 0;          line = 0;
         while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) {          while ((s = ffgetline(ffp, excbuf, sizeof(excbuf) - 1, &nbytes))
               == FIOSUC) {
                 line++;                  line++;
                 excbuf[nbytes] = '\0';                  excbuf[nbytes] = '\0';
                 if (excline(excbuf) != TRUE) {                  if (excline(excbuf) != TRUE) {
Line 670 
Line 672 
                         break;                          break;
                 }                  }
         }          }
         (void)ffclose(NULL);          (void)ffclose(ffp, NULL);
         excbuf[nbytes] = '\0';          excbuf[nbytes] = '\0';
         if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))          if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))
                 return (FALSE);                  return (FALSE);

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53