revert to per-cmd usage()

This commit is contained in:
Connor Lane Smith
2012-05-15 13:32:56 +01:00
parent f3188246d8
commit fcb8821246
7 changed files with 38 additions and 33 deletions

12
yes.c
View File

@@ -3,7 +3,7 @@
#include <stdlib.h>
#include "util.h"
#define USAGE() usage("[string]")
static void usage(void);
int
main(int argc, char *argv[])
@@ -12,7 +12,7 @@ main(int argc, char *argv[])
ARGBEGIN {
default:
USAGE();
usage();
} ARGEND;
switch(argc) {
@@ -24,7 +24,13 @@ main(int argc, char *argv[])
puts(s);
break;
default:
USAGE();
usage();
}
return EXIT_FAILURE; /* should not reach */
}
void
usage(void)
{
eprintf("usage: %s [string]\n", argv0);
}