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

View File

@@ -5,7 +5,7 @@
#include <string.h>
#include "util.h"
#define USAGE() usage("name [suffix]")
static void usage(void);
int
main(int argc, char *argv[])
@@ -15,11 +15,11 @@ main(int argc, char *argv[])
ARGBEGIN {
default:
USAGE();
usage();
} ARGEND;
if(argc < 1)
USAGE();
usage();
s = basename(argv[0]);
if(argc == 2 && argv[1]) {
@@ -31,3 +31,9 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
void
usage(void)
{
eprintf("usage: %s name [suffix]\n", argv0);
}