diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-01 20:15:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-01 20:15:44 +0000 |
commit | 39710478da43d9c9f4a55e5ddc548dd990d62583 (patch) | |
tree | f6db98033c6e4c9fd3d9f2db7630c5a6cd79a5ea | |
parent | f6885ed3c12dad4946f9600b5fc3e248938c9949 (diff) |
some KNF, and missing param on warnx(); jason@ackley.net
-rw-r--r-- | usr.sbin/catman/catman.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/usr.sbin/catman/catman.c b/usr.sbin/catman/catman.c index 365861616a8..b638da22c2b 100644 --- a/usr.sbin/catman/catman.c +++ b/usr.sbin/catman/catman.c @@ -1,3 +1,4 @@ +/* $OpenBSD: catman.c,v 1.5 2002/06/01 20:15:43 deraadt Exp $ */ /* * Copyright (c) 1993 Winning Strategies, Inc. * All rights reserved. @@ -29,7 +30,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: catman.c,v 1.4 2002/05/29 09:47:20 deraadt Exp $"; +static char rcsid[] = "$Id: catman.c,v 1.5 2002/06/01 20:15:43 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -64,9 +65,7 @@ void makewhatis(const char *); void dosystem(const char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int c; @@ -118,9 +117,7 @@ main(argc, argv) void -catman(path, section) - const char *path; - char *section; +catman(const char *path, char *section) { char mandir[PATH_MAX]; char catdir[PATH_MAX]; @@ -232,8 +229,7 @@ catman(path, section) } void -makewhatis(path) - const char *path; +makewhatis(const char *path) { char sysbuf[1024]; @@ -245,8 +241,7 @@ makewhatis(path) } void -dosystem(cmd) - const char *cmd; +dosystem(const char *cmd) { int status; @@ -260,14 +255,16 @@ dosystem(cmd) if (WIFSTOPPED(status)) errx(1, "child was stopped. aborting"); if (f_ignerr == 0) - errx(1,"*** Exited %d"); - warnx("*** Exited %d (continuing)"); + errx(1,"*** Exited %d", status); + warnx("*** Exited %d (continuing)", status); } void usage() { + extern char *__progname; + (void)fprintf(stderr, - "usage: catman [-knpsw] [-M manpath] [sections]\n"); + "usage: %s [-knpsw] [-M manpath] [sections]\n", __progname); exit(1); } |