revert to per-cmd usage()
This commit is contained in:
11
cksum.c
11
cksum.c
@@ -5,9 +5,8 @@
|
||||
#include <unistd.h>
|
||||
#include "util.h"
|
||||
|
||||
#define USAGE() usage("[files...]")
|
||||
|
||||
static void cksum(int, const char *);
|
||||
static void usage(void);
|
||||
|
||||
static const unsigned long crctab[] = { 0x00000000,
|
||||
0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
|
||||
@@ -70,7 +69,7 @@ main(int argc, char *argv[])
|
||||
|
||||
ARGBEGIN {
|
||||
default:
|
||||
USAGE();
|
||||
usage();
|
||||
} ARGEND;
|
||||
|
||||
if(argc == 0)
|
||||
@@ -106,3 +105,9 @@ cksum(int fd, const char *s)
|
||||
printf(" %s", s);
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [files...]\n", argv0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user