Handle EOF when skipping lines.
This commit is contained in:
parent
3118fac370
commit
a373cd6a6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218410
@ -126,14 +126,17 @@ getfile(void)
|
||||
char *p;
|
||||
char *endp;
|
||||
char **ep;
|
||||
int c;
|
||||
int multisep = (flags & ONEISEPONLY ? 0 : 1);
|
||||
int nullpad = flags & NULLPAD;
|
||||
char **padto;
|
||||
|
||||
while (skip--) {
|
||||
getline();
|
||||
c = getline();
|
||||
if (flags & SKIPPRINT)
|
||||
puts(curline);
|
||||
if (c == EOF)
|
||||
return;
|
||||
}
|
||||
getline();
|
||||
if (flags & NOARGS && curlen < owidth)
|
||||
|
Loading…
Reference in New Issue
Block a user