From 8d645e1c0229b5944be96bb7c2638e54bd6c8e41 Mon Sep 17 00:00:00 2001 From: Peter Valchev Date: Thu, 18 Jul 2002 10:10:57 +0000 Subject: ansify, pull some prototypes --- usr.sbin/amd/mk-amd-map/mk-amd-map.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c index 55ffbaa7d4f..edd9d521955 100644 --- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c +++ b/usr.sbin/amd/mk-amd-map/mk-amd-map.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93 - * $Id: mk-amd-map.c,v 1.4 2002/06/11 05:29:55 itojun Exp $ + * $Id: mk-amd-map.c,v 1.5 2002/07/18 10:10:56 pvalchev Exp $ */ /* @@ -52,7 +52,7 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: mk-amd-map.c,v 1.4 2002/06/11 05:29:55 itojun Exp $"; +static char rcsid[] = "$Id: mk-amd-map.c,v 1.5 2002/07/18 10:10:56 pvalchev Exp $"; static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93"; #endif /* not lint */ @@ -61,6 +61,7 @@ static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93"; #ifndef SIGINT #include #endif +#include #ifdef OS_HAS_NDBM #define HAS_DATABASE @@ -72,9 +73,8 @@ static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93"; #define create_database(name) dbm_open(name, O_RDWR|O_CREAT, 0644) -static int store_data(db, k, v) -voidp db; -char *k, *v; +static int +store_data(voidp db, char *k, char *v) { datum key, val; @@ -90,10 +90,8 @@ char *k, *v; #include #include -static int read_line(buf, size, fp) -char *buf; -int size; -FILE *fp; +static int +read_line(char *buf, int size, FILE *fp) { int done = 0; @@ -126,10 +124,8 @@ FILE *fp; /* * Read through a map */ -static int read_file(fp, map, db) -FILE *fp; -char *map; -voidp db; +static int +read_file(FILE *fp, char *map, voidp db) { char key_val[2048]; int chuck = 0; @@ -218,17 +214,16 @@ again: return errs; } -static int remove_file(f) -char *f; +static int +remove_file(char *f) { if (unlink(f) < 0 && errno != ENOENT) return -1; return 0; } -main(argc, argv) -int argc; -char *argv[]; +int +main(int argc, char *argv[]) { FILE *mapf; char *map; -- cgit v1.2.3