version 1.3, 1997/01/12 23:43:06 |
version 1.4, 2000/06/23 17:04:46 |
|
|
* 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; |
|
|
} |
} |
if (ferror(fp)) { |
if (ferror(fp)) { |
ierr(); |
ierr(); |
return; |
return(1); |
} |
} |
|
|
if (rflag) { |
if (rflag) { |
|
|
if ((len = p - sp)) |
if ((len = p - sp)) |
WR(sp, len); |
WR(sp, len); |
} |
} |
|
return(0); |
} |
} |
|
|
/* |
/* |
|
|
* 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; |
|
|
} |
} |
if (ferror(fp)) { |
if (ferror(fp)) { |
ierr(); |
ierr(); |
return; |
return(1); |
} |
} |
if (cnt) { |
if (cnt) { |
lines[recno].l = sp; |
lines[recno].l = sp; |
|
|
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); |
} |
} |