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

Diff for /src/usr.bin/tail/read.c between version 1.3 and 1.4

version 1.3, 1997/01/12 23:43:06 version 1.4, 2000/06/23 17:04:46
Line 66 
Line 66 
  * routine has the usual nastiness of trying to find the newlines.  Otherwise,   * routine has the usual nastiness of trying to find the newlines.  Otherwise,
  * it is displayed from the character closest to the beginning of the input to   * it is displayed from the character closest to the beginning of the input to
  * the end.   * the end.
    *
    * A non-zero return means an (non-fatal) error occured.
    *
  */   */
 void  int
 bytes(fp, off)  bytes(fp, off)
         register FILE *fp;          register FILE *fp;
         off_t off;          off_t off;
Line 89 
Line 92 
         }          }
         if (ferror(fp)) {          if (ferror(fp)) {
                 ierr();                  ierr();
                 return;                  return(1);
         }          }
   
         if (rflag) {          if (rflag) {
Line 122 
Line 125 
                 if ((len = p - sp))                  if ((len = p - sp))
                         WR(sp, len);                          WR(sp, len);
         }          }
           return(0);
 }  }
   
 /*  /*
Line 133 
Line 137 
  * routine has the usual nastiness of trying to find the newlines.  Otherwise,   * routine has the usual nastiness of trying to find the newlines.  Otherwise,
  * it is displayed from the line closest to the beginning of the input to   * it is displayed from the line closest to the beginning of the input to
  * the end.   * the end.
    *
    * A non-zero return means an (non-fatal) error occured.
    *
  */   */
 void  int
 lines(fp, off)  lines(fp, off)
         register FILE *fp;          register FILE *fp;
         off_t off;          off_t off;
Line 179 
Line 186 
         }          }
         if (ferror(fp)) {          if (ferror(fp)) {
                 ierr();                  ierr();
                 return;                  return(1);
         }          }
         if (cnt) {          if (cnt) {
                 lines[recno].l = sp;                  lines[recno].l = sp;
Line 203 
Line 210 
                 for (cnt = 0; cnt < recno; ++cnt)                  for (cnt = 0; cnt < recno; ++cnt)
                         WR(lines[cnt].l, lines[cnt].len);                          WR(lines[cnt].l, lines[cnt].len);
         }          }
           return(0);
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4