Add usage().

This commit is contained in:
charnier 2000-03-26 15:04:35 +00:00
parent 4928e25e18
commit a6390ef211

View File

@ -54,6 +54,7 @@ static int sflag;
static int found; static int found;
void search __P((void)); void search __P((void));
static void usage __P((void));
/* /*
* what * what
@ -71,9 +72,7 @@ main(argc, argv)
sflag = 1; sflag = 1;
break; break;
default: default:
(void)fprintf(stderr, usage();
"usage: what [-s] file ...\n");
exit(1);
} }
argv += optind; argv += optind;
@ -90,6 +89,13 @@ main(argc, argv)
exit(!found); exit(!found);
} }
static void
usage()
{
(void)fprintf(stderr, "usage: what [-s] file ...\n");
exit(1);
}
void void
search() search()
{ {