diff options
author | dholland <dholland@NetBSD.org> | 2012-06-19 05:46:08 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2012-06-19 05:46:08 +0000 |
commit | 59a1b2e1425834dcc8f7d2b99c931f3c6f6bc28c (patch) | |
tree | 629475be65e4569ada852759c1510dc0ea17512f /number | |
parent | 4cb1100e13371f1523900523aba506ae1c62e44c (diff) | |
download | bsdgames-darwin-59a1b2e1425834dcc8f7d2b99c931f3c6f6bc28c.tar.gz bsdgames-darwin-59a1b2e1425834dcc8f7d2b99c931f3c6f6bc28c.tar.zst bsdgames-darwin-59a1b2e1425834dcc8f7d2b99c931f3c6f6bc28c.zip |
WARNS=5, and make WARNS=5 the default for src/games.
Diffstat (limited to 'number')
-rw-r--r-- | number/number.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/number/number.c b/number/number.c index 3d28455c..5cf41705 100644 --- a/number/number.c +++ b/number/number.c @@ -1,4 +1,4 @@ -/* $NetBSD: number.c,v 1.14 2010/05/13 17:52:11 tnozaki Exp $ */ +/* $NetBSD: number.c,v 1.15 2012/06/19 05:46:09 dholland Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\ #if 0 static char sccsid[] = "@(#)number.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: number.c,v 1.14 2010/05/13 17:52:11 tnozaki Exp $"); +__RCSID("$NetBSD: number.c,v 1.15 2012/06/19 05:46:09 dholland Exp $"); #endif #endif /* not lint */ @@ -86,9 +86,7 @@ static void usage(void) __dead; static int lflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, first; char line[256]; @@ -125,8 +123,7 @@ main(argc, argv) } void -convert(line) - char *line; +convert(char *line) { int flen, len, rval; char *p, *fraction; @@ -194,9 +191,7 @@ badnum: errx(1, "illegal number: %s", line); } int -unit(len, p) - int len; - const char *p; +unit(int len, const char *p) { int off, rval; @@ -230,9 +225,7 @@ unit(len, p) } int -number(p, len) - const char *p; - int len; +number(const char *p, int len) { int val, rval; @@ -270,8 +263,7 @@ number(p, len) } void -pfract(len) - int len; +pfract(int len) { static const char *const pref[] = { "", "ten-", "hundred-" }; @@ -289,7 +281,7 @@ pfract(len) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: number [# ...]\n"); exit(1); |