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

Diff for /src/usr.bin/mg/file.c between version 1.7 and 1.8

version 1.7, 2001/05/23 22:20:35 version 1.8, 2001/05/23 22:36:14
Line 22 
Line 22 
         s = eread("Insert file: ", fname, NFILEN, EFNEW | EFCR | EFFILE);          s = eread("Insert file: ", fname, NFILEN, EFNEW | EFCR | EFFILE);
         if (s != TRUE)          if (s != TRUE)
                 return (s);                  return (s);
         return insertfile(adjustname(fname), (char *)NULL, FALSE);          return insertfile(adjustname(fname), NULL, FALSE);
         /* don't set buffer name */          /* don't set buffer name */
 }  }
   
Line 181 
Line 181 
   
         /* cheap */          /* cheap */
         bp = curbp;          bp = curbp;
         if (newname != (char *)NULL)          if (newname != NULL)
                 (void)strcpy(bp->b_fname, newname);                  (void)strcpy(bp->b_fname, newname);
   
         /* hard file open */          /* hard file open */
         if ((s = ffropen(fname, needinfo ? bp : (BUFFER *) NULL)) == FIOERR)          if ((s = ffropen(fname, needinfo ? bp : NULL)) == FIOERR)
                 goto out;                  goto out;
         if (s == FIOFNF) {          if (s == FIOFNF) {
                 /* file not found */                  /* file not found */
Line 262 
Line 262 
         }          }
 endoffile:  endoffile:
         /* ignore errors */          /* ignore errors */
         (void)ffclose((BUFFER *)NULL);          ffclose(NULL);
         /* don't zap an error */          /* don't zap an error */
         if (s == FIOEOF) {          if (s == FIOEOF) {
                 if (nline == 1)                  if (nline == 1)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8