summaryrefslogtreecommitdiff
path: root/usr.bin/what
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
commitf4ac32def255b5968bdd8150057b9c0d14595689 (patch)
treefb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/what
parentd946bf789255a84ecbbbdfd07bffb48da063204f (diff)
downloadsrc-test2-f4ac32def255b5968bdd8150057b9c0d14595689.tar.gz
src-test2-f4ac32def255b5968bdd8150057b9c0d14595689.zip
ANSIify function definitions.
Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
Notes
Notes: svn path=/head/; revision=102944
Diffstat (limited to 'usr.bin/what')
-rw-r--r--usr.bin/what/what.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/what/what.c b/usr.bin/what/what.c
index 65bdb13e1b58..c22671564110 100644
--- a/usr.bin/what/what.c
+++ b/usr.bin/what/what.c
@@ -60,9 +60,7 @@ static void usage(void);
* what
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int c;
@@ -90,16 +88,16 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: what [-s] [file ...]\n");
exit(1);
}
void
-search()
+search(void)
{
- register int c;
+ int c;
while ((c = getchar()) != EOF) {
loop: if (c != '@')