[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.78 and 1.79

version 1.78, 2023/03/30 19:00:02 version 1.79, 2023/03/30 22:56:47
Line 649 
Line 649 
 {  {
         int      s = TRUE, line;          int      s = TRUE, line;
         int      nbytes = 0;          int      nbytes = 0;
         char     excbuf[BUFSIZE], fncpy[NFILEN];          char     excbuf[BUFSIZE];
   
         /* keep a note of fname in case of errors in loaded file. */  
         (void)strlcpy(fncpy, fname, sizeof(fncpy));  
         line = 0;          line = 0;
         while ((s = ffgetline(ffp, excbuf, sizeof(excbuf) - 1, &nbytes))          while ((s = ffgetline(ffp, excbuf, sizeof(excbuf) - 1, &nbytes))
             == FIOSUC) {              == FIOSUC) {
Line 661 
Line 659 
                 if (excline(excbuf, nbytes, line) != TRUE) {                  if (excline(excbuf, nbytes, line) != TRUE) {
                         s = FIOERR;                          s = FIOERR;
                         dobeep();                          dobeep();
                         ewprintf("Error loading file %s at line %d", fncpy, line);                          ewprintf("Error loading file %s at line %d", fname, line);
                         break;                          break;
                 }                  }
         }          }

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79