Increment morefiles, balance braces. This should really be using getopt(3).
This commit is contained in:
parent
3e36f9e3d9
commit
fd8dc1333d
@ -114,9 +114,10 @@ getargs(char *av[])
|
||||
P = S = F = T = 0; /* capitalized options */
|
||||
while ((p = *++av) != NULL) {
|
||||
if (*p != '-' || !p[1]) {
|
||||
if (*p == '-')
|
||||
morefiles++;
|
||||
if (*p == '-') {
|
||||
ip->fp = stdin;
|
||||
else if ((ip->fp = fopen(p, "r")) == NULL) {
|
||||
} else if ((ip->fp = fopen(p, "r")) == NULL) {
|
||||
err(1, "%s", p);
|
||||
}
|
||||
ip->pad = P;
|
||||
|
Loading…
x
Reference in New Issue
Block a user