Increment morefiles, balance braces. This should really be using getopt(3).

This commit is contained in:
Juli Mallett 2002-06-27 21:11:19 +00:00
parent f63eec78e4
commit 21e21aad32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98934

View File

@ -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;