From fd8dc1333d32e1394441ee818cba3e0f8e23b052 Mon Sep 17 00:00:00 2001 From: jmallett Date: Thu, 27 Jun 2002 21:11:19 +0000 Subject: Increment morefiles, balance braces. This should really be using getopt(3). --- usr.bin/lam/lam.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/lam') diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c index 8a65a8d..e01fc9d 100644 --- a/usr.bin/lam/lam.c +++ b/usr.bin/lam/lam.c @@ -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; -- cgit v1.1