diff options
author | dholland <dholland@NetBSD.org> | 2009-07-04 01:58:57 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-07-04 01:58:57 +0000 |
commit | 6f8367e238e03f94d7cad37b751809e6c86c5fd0 (patch) | |
tree | 274353fee90bb01e76107c50c61d0b53f30db2c1 /hunt/hunt | |
parent | 76f63b88b5274fe80f728b7af04e5bb6df552882 (diff) | |
download | bsdgames-darwin-6f8367e238e03f94d7cad37b751809e6c86c5fd0.tar.gz bsdgames-darwin-6f8367e238e03f94d7cad37b751809e6c86c5fd0.tar.zst bsdgames-darwin-6f8367e238e03f94d7cad37b751809e6c86c5fd0.zip |
ANSIfy function declarations.
Diffstat (limited to 'hunt/hunt')
-rw-r--r-- | hunt/hunt/connect.c | 9 | ||||
-rw-r--r-- | hunt/hunt/hunt.c | 55 | ||||
-rw-r--r-- | hunt/hunt/otto.c | 38 | ||||
-rw-r--r-- | hunt/hunt/playit.c | 27 |
4 files changed, 48 insertions, 81 deletions
diff --git a/hunt/hunt/connect.c b/hunt/hunt/connect.c index faead11b..b922f18d 100644 --- a/hunt/hunt/connect.c +++ b/hunt/hunt/connect.c @@ -1,4 +1,4 @@ -/* $NetBSD: connect.c,v 1.6 2009/07/04 01:23:55 dholland Exp $ */ +/* $NetBSD: connect.c,v 1.7 2009/07/04 01:58:57 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: connect.c,v 1.6 2009/07/04 01:23:55 dholland Exp $"); +__RCSID("$NetBSD: connect.c,v 1.7 2009/07/04 01:58:57 dholland Exp $"); #endif /* not lint */ # include "hunt.h" @@ -40,10 +40,7 @@ __RCSID("$NetBSD: connect.c,v 1.6 2009/07/04 01:23:55 dholland Exp $"); # include <unistd.h> void -do_connect(name, team, enter_status) - char *name; - char team; - long enter_status; +do_connect(char *name, char team, long enter_status) { static int32_t uid; static int32_t mode; diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 4a887795..d343c5ab 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.30 2009/07/04 01:44:28 dholland Exp $ */ +/* $NetBSD: hunt.c,v 1.31 2009/07/04 01:58:57 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.30 2009/07/04 01:44:28 dholland Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.31 2009/07/04 01:58:57 dholland Exp $"); #endif /* not lint */ # include <sys/param.h> @@ -125,9 +125,7 @@ extern int Otto_mode; * Main program for local process */ int -main(ac, av) - int ac; - char **av; +main(int ac, char **av) { char *term; int c; @@ -373,9 +371,7 @@ main(ac, av) # ifdef INTERNET # ifdef BROADCAST int -broadcast_vec(s, vector) - int s; /* socket */ - struct sockaddr **vector; +broadcast_vec(int s /*socket*/, struct sockaddr **vector) { int vec_cnt; struct ifaddrs *ifp, *ip; @@ -406,7 +402,7 @@ broadcast_vec(s, vector) # endif SOCKET * -list_drivers() +list_drivers(void) { int option; u_short msg; @@ -572,8 +568,7 @@ test_one_host: } void -find_driver(do_startup) - FLAG do_startup; +find_driver(FLAG do_startup) { SOCKET *hosts; @@ -641,8 +636,7 @@ find_driver(do_startup) } void -dump_scores(host) - SOCKET host; +dump_scores(SOCKET host) { struct hostent *hp; int s; @@ -667,7 +661,7 @@ dump_scores(host) # endif void -start_driver() +start_driver(void) { int procid; @@ -731,7 +725,7 @@ start_driver() * means the game is full. */ void -bad_con() +bad_con(void) { leavex(1, "The game is full. Sorry."); /* NOTREACHED */ @@ -742,7 +736,7 @@ bad_con() * version number mismatch. */ void -bad_ver() +bad_ver(void) { leavex(1, "Version number mismatch. No go."); /* NOTREACHED */ @@ -753,8 +747,7 @@ bad_ver() * Handle a terminate signal */ SIGNAL_TYPE -sigterm(dummy) - int dummy __unused; +sigterm(int dummy __unused) { leavex(0, NULL); /* NOTREACHED */ @@ -766,8 +759,7 @@ sigterm(dummy) * Handle a usr1 signal */ SIGNAL_TYPE -sigusr1(dummy) - int dummy __unused; +sigusr1(int dummy __unused) { leavex(1, "Unable to start driver. Try again."); /* NOTREACHED */ @@ -779,8 +771,7 @@ sigusr1(dummy) * Handle an alarm signal */ SIGNAL_TYPE -sigalrm(dummy) - int dummy __unused; +sigalrm(int dummy __unused) { return; } @@ -791,8 +782,7 @@ sigalrm(dummy) * Remove a '\n' at the end of a string if there is one */ void -rmnl(s) - char *s; +rmnl(char *s) { char *cp; @@ -806,8 +796,7 @@ rmnl(s) * Handle a interrupt signal */ SIGNAL_TYPE -intr(dummy) - int dummy __unused; +intr(int dummy __unused) { int ch; int explained; @@ -861,7 +850,8 @@ intr(dummy) } } -void fincurs() +void +fincurs(void) { if (in_visual) { # ifdef USE_CURSES @@ -914,8 +904,7 @@ leavex(int eval, const char *mesg) * Handle stop and start signals */ SIGNAL_TYPE -tstp(dummy) - int dummy; +tstp(int dummy __unused) { # if BSD_RELEASE < 44 static struct sgttyb tty; @@ -958,8 +947,7 @@ tstp(dummy) # if defined(BSD_RELEASE) && BSD_RELEASE < 43 char * -strpbrk(s, brk) - char *s, *brk; +strpbrk(char *s, char *brk) { char *p; c; @@ -975,8 +963,7 @@ strpbrk(s, brk) # endif long -env_init(enter_status) - long enter_status; +env_init(long enter_status) { int i; char *envp, *envname, *s; @@ -1085,7 +1072,7 @@ env_init(enter_status) } void -fill_in_blanks() +fill_in_blanks(void) { int i; char *cp; diff --git a/hunt/hunt/otto.c b/hunt/hunt/otto.c index e83d7c86..7eb9d49b 100644 --- a/hunt/hunt/otto.c +++ b/hunt/hunt/otto.c @@ -1,4 +1,4 @@ -/* $NetBSD: otto.c,v 1.11 2007/12/15 19:44:41 perry Exp $ */ +/* $NetBSD: otto.c,v 1.12 2009/07/04 01:58:57 dholland Exp $ */ # ifdef OTTO /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -45,7 +45,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: otto.c,v 1.11 2007/12/15 19:44:41 perry Exp $"); +__RCSID("$NetBSD: otto.c,v 1.12 2009/07/04 01:58:57 dholland Exp $"); #endif /* not lint */ # include <sys/time.h> @@ -155,15 +155,12 @@ STATIC void wander(void); extern int Otto_count; STATIC SIGNAL_TYPE -nothing(dummy) - int dummy __unused; +nothing(int dummy __unused) { } void -otto(y, x, face) - int y, x; - char face; +otto(int y, int x, char face) { int i; int old_mask; @@ -232,11 +229,7 @@ done: # define direction(abs,rel) (((abs) + (rel)) % NUMDIRECTIONS) STATIC int -stop_look(itemp, c, dist, side) - struct item *itemp; - char c; - int dist; - int side; +stop_look(struct item *itemp, char c, int dist, int side) { switch (c) { @@ -307,9 +300,7 @@ stop_look(itemp, c, dist, side) } STATIC void -ottolook(rel_dir, itemp) - int rel_dir; - struct item *itemp; +ottolook(int rel_dir, struct item *itemp) { int r, c; char ch; @@ -409,7 +400,7 @@ ottolook(rel_dir, itemp) } STATIC void -look_around() +look_around(void) { int i; @@ -427,8 +418,7 @@ look_around() */ STATIC void -face_and_move_direction(rel_dir, distance) - int rel_dir, distance; +face_and_move_direction(int rel_dir, int distance) { int old_facing; char cmd; @@ -464,9 +454,7 @@ face_and_move_direction(rel_dir, distance) } STATIC void -attack(rel_dir, itemp) - int rel_dir; - struct item *itemp; +attack(int rel_dir, struct item *itemp) { if (!(itemp->flags & ON_SIDE)) { face_and_move_direction(rel_dir, 0); @@ -492,8 +480,7 @@ attack(rel_dir, itemp) } STATIC void -duck(rel_dir) - int rel_dir; +duck(int rel_dir) { int dir; @@ -542,8 +529,7 @@ duck(rel_dir) */ STATIC int -go_for_ammo(mine) - char mine; +go_for_ammo(char mine) { int i, rel_dir, dist; @@ -569,7 +555,7 @@ go_for_ammo(mine) } STATIC void -wander() +wander(void) { int i, j, rel_dir, dir_mask, dir_count; diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c index 7583e334..6ab174a2 100644 --- a/hunt/hunt/playit.c +++ b/hunt/hunt/playit.c @@ -1,4 +1,4 @@ -/* $NetBSD: playit.c,v 1.10 2009/07/04 01:23:55 dholland Exp $ */ +/* $NetBSD: playit.c,v 1.11 2009/07/04 01:58:57 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: playit.c,v 1.10 2009/07/04 01:23:55 dholland Exp $"); +__RCSID("$NetBSD: playit.c,v 1.11 2009/07/04 01:58:57 dholland Exp $"); #endif /* not lint */ # include <sys/file.h> @@ -103,7 +103,7 @@ static void send_stuff(void); * the driver. */ void -playit() +playit(void) { int ch; int y, x; @@ -241,7 +241,7 @@ out: * no characters in the input buffer. */ static unsigned char -getchr() +getchr(void) { struct pollfd set[2]; int nfds; @@ -278,7 +278,7 @@ one_more_time: * Send standard input characters to the driver */ static void -send_stuff() +send_stuff(void) { int count; char *sp, *nsp; @@ -321,8 +321,7 @@ send_stuff() * Handle the end of the game when the player dies */ int -quit(old_status) - int old_status; +quit(int old_status) { int explain, ch; @@ -499,8 +498,7 @@ get_message: # ifndef USE_CURSES void -put_ch(ch) - char ch; +put_ch(char ch) { if (!isprint(ch)) { fprintf(stderr, "r,c,ch: %d,%d,%d", cur_row, cur_col, ch); @@ -518,8 +516,7 @@ put_ch(ch) } void -put_str(s) - char *s; +put_str(char *s) { while (*s) put_ch(*s++); @@ -527,7 +524,7 @@ put_str(s) # endif void -clear_the_screen() +clear_the_screen(void) { # ifdef USE_CURSES clear(); @@ -563,7 +560,7 @@ clear_the_screen() #ifndef USE_CURSES void -clear_eol() +clear_eol(void) { if (CE != NULL) #if !defined(BSD_RELEASE) || BSD_RELEASE < 44 @@ -585,7 +582,7 @@ clear_eol() # endif void -redraw_screen() +redraw_screen(void) { # ifdef USE_CURSES clearok(stdscr, TRUE); @@ -640,7 +637,7 @@ redraw_screen() * Send a message to the driver and return */ void -do_message() +do_message(void) { u_int32_t version; |