Add a usage() function like everywhere else

This commit is contained in:
sin 2013-10-07 16:07:19 +01:00
parent f54c7b4cac
commit 7182076473

8
cat.c
View File

@ -6,6 +6,12 @@
#include "text.h" #include "text.h"
#include "util.h" #include "util.h"
static void
usage(void)
{
eprintf("usage: %s [file...]\n", argv0);
}
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@ -14,7 +20,7 @@ main(int argc, char *argv[])
ARGBEGIN { ARGBEGIN {
default: default:
eprintf("usage: %s [files...]\n", argv0); usage();
} ARGEND; } ARGEND;
if(argc == 0) { if(argc == 0) {