Use arg.h as much as possible and add usage() where missing

Rename eusage() to usage() as well.
This commit is contained in:
sin
2013-10-07 17:13:01 +01:00
parent 5b5f062184
commit f349dd5987
4 changed files with 29 additions and 11 deletions

8
wc.c
View File

@@ -14,6 +14,12 @@ static bool wflag = false;
static char cmode = 0;
static long tc = 0, tl = 0, tw = 0;
static void
usage(void)
{
eprintf("usage: %s [-clmw] [files...]\n", argv0);
}
int
main(int argc, char *argv[])
{
@@ -34,7 +40,7 @@ main(int argc, char *argv[])
wflag = true;
break;
default:
eprintf("usage: %s [-clmw] [files...]\n", argv0);
usage();
} ARGEND;
if (argc == 0) {