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
1 changed files with 7 additions and 1 deletions

8
cat.c
View File

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