Return to fsplit.c CVS log | Up to [local] / src / usr.bin / fsplit |
version 1.9, 2002/02/16 21:27:46 | version 1.10, 2002/02/25 00:04:09 | ||
---|---|---|---|
|
|
||
int | int | ||
getline() | getline() | ||
{ | { | ||
int c; | |||
char *ptr; | char *ptr; | ||
for (ptr = buf; ptr < &buf[BSZ];) { | for (ptr = buf; ptr < &buf[BSZ];) { | ||
*ptr = getc(ifp); | c = getc(ifp); | ||
*ptr = c; | |||
if (feof(ifp)) | if (feof(ifp)) | ||
return (-1); | return (-1); | ||
if (*ptr++ == '\n') { | if (*ptr++ == '\n') { |