mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
Add usage().
This commit is contained in:
parent
f57cdd0f01
commit
110ab594ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58626
@ -54,6 +54,7 @@ static int sflag;
|
||||
static int found;
|
||||
|
||||
void search __P((void));
|
||||
static void usage __P((void));
|
||||
|
||||
/*
|
||||
* what
|
||||
@ -71,9 +72,7 @@ main(argc, argv)
|
||||
sflag = 1;
|
||||
break;
|
||||
default:
|
||||
(void)fprintf(stderr,
|
||||
"usage: what [-s] file ...\n");
|
||||
exit(1);
|
||||
usage();
|
||||
}
|
||||
argv += optind;
|
||||
|
||||
@ -90,6 +89,13 @@ main(argc, argv)
|
||||
exit(!found);
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
(void)fprintf(stderr, "usage: what [-s] file ...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
search()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user