diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-07-18 10:10:57 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-07-18 10:10:57 +0000 |
commit | 8d645e1c0229b5944be96bb7c2638e54bd6c8e41 (patch) | |
tree | 5b4a0cf58e840ed308b6549d2edc2313ec8cc22f /usr.sbin | |
parent | 76d3ef913f01cd468785588e5ba87f6dfad8f0ea (diff) |
ansify, pull some prototypes
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/amd/mk-amd-map/mk-amd-map.c | 31 |
1 files changed, 13 insertions, 18 deletions
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 <signal.h> #endif +#include <unistd.h> #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 <fcntl.h> #include <ctype.h> -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; |