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/huntd | |
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/huntd')
-rw-r--r-- | hunt/huntd/answer.c | 21 | ||||
-rw-r--r-- | hunt/huntd/ctl.c | 6 | ||||
-rw-r--r-- | hunt/huntd/ctl_transact.c | 10 | ||||
-rw-r--r-- | hunt/huntd/draw.c | 39 | ||||
-rw-r--r-- | hunt/huntd/driver.c | 38 | ||||
-rw-r--r-- | hunt/huntd/execute.c | 60 | ||||
-rw-r--r-- | hunt/huntd/expl.c | 15 | ||||
-rw-r--r-- | hunt/huntd/faketalk.c | 14 | ||||
-rw-r--r-- | hunt/huntd/get_names.c | 10 | ||||
-rw-r--r-- | hunt/huntd/makemaze.c | 17 | ||||
-rw-r--r-- | hunt/huntd/shots.c | 64 | ||||
-rw-r--r-- | hunt/huntd/terminal.c | 26 |
12 files changed, 104 insertions, 216 deletions
diff --git a/hunt/huntd/answer.c b/hunt/huntd/answer.c index c7c45767..df355151 100644 --- a/hunt/huntd/answer.c +++ b/hunt/huntd/answer.c @@ -1,4 +1,4 @@ -/* $NetBSD: answer.c,v 1.12 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: answer.c,v 1.13 2009/07/04 02:37:20 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: answer.c,v 1.12 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: answer.c,v 1.13 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include <ctype.h> @@ -47,7 +47,7 @@ __RCSID("$NetBSD: answer.c,v 1.12 2009/07/04 01:01:18 dholland Exp $"); static char Ttyname[NAMELEN]; int -answer() +answer(void) { PLAYER *pp; int newsock; @@ -204,8 +204,7 @@ answer() # ifdef MONITOR void -stmonitor(pp) - PLAYER *pp; +stmonitor(PLAYER *pp) { int line; PLAYER *npp; @@ -234,9 +233,7 @@ stmonitor(pp) # endif void -stplayer(newpp, enter_status) - PLAYER *newpp; - int enter_status; +stplayer(PLAYER *newpp, int enter_status) { int x, y; PLAYER *pp; @@ -363,7 +360,7 @@ stplayer(newpp, enter_status) * Return a random direction */ int -rand_dir() +rand_dir(void) { switch (rand_num(4)) { case 0: @@ -384,11 +381,7 @@ rand_dir() * Get the score structure of a player */ IDENT * -get_ident(machine, uid, name, team) - uint32_t machine; - uint32_t uid; - char *name; - char team; +get_ident(uint32_t machine, uint32_t uid, char *name, char team) { IDENT *ip; static IDENT punt; diff --git a/hunt/huntd/ctl.c b/hunt/huntd/ctl.c index 74fa1bc3..9e44eda3 100644 --- a/hunt/huntd/ctl.c +++ b/hunt/huntd/ctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: ctl.c,v 1.3 2003/06/11 12:00:22 wiz Exp $ */ +/* $NetBSD: ctl.c,v 1.4 2009/07/04 02:37:20 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)ctl.c 5.2 (Berkeley) 3/13/86"; #else -__RCSID("$NetBSD: ctl.c,v 1.3 2003/06/11 12:00:22 wiz Exp $"); +__RCSID("$NetBSD: ctl.c,v 1.4 2009/07/04 02:37:20 dholland Exp $"); #endif #endif /* not lint */ @@ -67,7 +67,7 @@ CTL_MSG msg; /* open the ctl socket */ void -open_ctl() +open_ctl(void) { int length; diff --git a/hunt/huntd/ctl_transact.c b/hunt/huntd/ctl_transact.c index 3e905923..9c3c1954 100644 --- a/hunt/huntd/ctl_transact.c +++ b/hunt/huntd/ctl_transact.c @@ -1,4 +1,4 @@ -/* $NetBSD: ctl_transact.c,v 1.7 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: ctl_transact.c,v 1.8 2009/07/04 02:37:20 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)ctl_transact.c 5.2 (Berkeley) 3/13/86"; #else -__RCSID("$NetBSD: ctl_transact.c,v 1.7 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: ctl_transact.c,v 1.8 2009/07/04 02:37:20 dholland Exp $"); #endif #endif /* not lint */ @@ -57,11 +57,7 @@ __RCSID("$NetBSD: ctl_transact.c,v 1.7 2009/07/04 01:01:18 dholland Exp $"); * of time */ void -ctl_transact(target, msg, type, rp) - struct in_addr target; - CTL_MSG msg; - int type; - CTL_RESPONSE *rp; +ctl_transact(struct in_addr target, CTL_MSG msg, int type, CTL_RESPONSE *rp) { struct pollfd set[1]; int nready, cc, retries; diff --git a/hunt/huntd/draw.c b/hunt/huntd/draw.c index 3c2405e0..2d63274d 100644 --- a/hunt/huntd/draw.c +++ b/hunt/huntd/draw.c @@ -1,4 +1,4 @@ -/* $NetBSD: draw.c,v 1.5 2009/06/28 21:12:35 dholland Exp $ */ +/* $NetBSD: draw.c,v 1.6 2009/07/04 02:37:20 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,14 +32,13 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: draw.c,v 1.5 2009/06/28 21:12:35 dholland Exp $"); +__RCSID("$NetBSD: draw.c,v 1.6 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include "hunt.h" void -drawmaze(pp) - PLAYER *pp; +drawmaze(PLAYER *pp) { int x; char *sp; @@ -71,8 +70,7 @@ drawmaze(pp) * size is 80x24 with the maze being 64x24) */ void -drawstatus(pp) - PLAYER *pp; +drawstatus(PLAYER *pp) { int i; PLAYER *np; @@ -125,8 +123,7 @@ drawstatus(pp) } void -look(pp) - PLAYER *pp; +look(PLAYER *pp) { int x, y; @@ -173,9 +170,7 @@ look(pp) } void -see(pp, face) - PLAYER *pp; - int face; +see(PLAYER *pp, int face) { char *sp; int y, x, i, cnt; @@ -260,9 +255,7 @@ see(pp, face) } void -check(pp, y, x) - PLAYER *pp; - int y, x; +check(PLAYER *pp, int y, int x) { int indx; int ch; @@ -288,8 +281,7 @@ check(pp, y, x) * Update the status of players */ void -showstat(pp) - PLAYER *pp; +showstat(PLAYER *pp) { PLAYER *np; int y; @@ -315,9 +307,7 @@ showstat(pp) * unless he is cloaked. */ void -drawplayer(pp, draw) - PLAYER *pp; - FLAG draw; +drawplayer(PLAYER *pp, FLAG draw) { PLAYER *newp; int x, y; @@ -353,9 +343,7 @@ drawplayer(pp, draw) } void -message(pp, s) - PLAYER *pp; - const char *s; +message(PLAYER *pp, const char *s) { cgoto(pp, HEIGHT, 0); outstr(pp, s, strlen(s)); @@ -368,8 +356,7 @@ message(pp, s) * looking at the current player. */ char -translate(ch) - char ch; +translate(char ch) { switch (ch) { case LEFTS: @@ -389,9 +376,7 @@ translate(ch) * Return the player symbol */ int -player_sym(pp, y, x) - PLAYER *pp; - int y, x; +player_sym(PLAYER *pp, int y, int x) { PLAYER *npp; diff --git a/hunt/huntd/driver.c b/hunt/huntd/driver.c index 5fcc9b20..d06c22dc 100644 --- a/hunt/huntd/driver.c +++ b/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: driver.c,v 1.15 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: driver.c,v 1.16 2009/07/04 02:37:20 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: driver.c,v 1.15 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: driver.c,v 1.16 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include <sys/ioctl.h> @@ -82,9 +82,7 @@ static void zap(PLAYER *, FLAG, int); * The main program. */ int -main(ac, av, ep) - int ac; - char **av, **ep; +main(int ac, char **av, char **ep) { PLAYER *pp; # ifdef INTERNET @@ -255,7 +253,7 @@ again: * Initialize the global parameters. */ static void -init() +init(void) { int i; # ifdef INTERNET @@ -443,7 +441,7 @@ init() * Put the boots in the maze */ static void -makeboots() +makeboots(void) { int x, y; PLAYER *pp; @@ -464,11 +462,8 @@ makeboots() * Check the damage to the given player, and see if s/he is killed */ void -checkdam(ouch, gotcha, credit, amt, this_shot_type) - PLAYER *ouch, *gotcha; - IDENT *credit; - int amt; - char this_shot_type; +checkdam(PLAYER *ouch, PLAYER *gotcha, IDENT *credit, int amt, + char this_shot_type) { const char *cp; @@ -602,10 +597,7 @@ checkdam(ouch, gotcha, credit, amt, this_shot_type) * Kill off a player and take him out of the game. */ static void -zap(pp, was_player, i) - PLAYER *pp; - FLAG was_player; - int i; +zap(PLAYER *pp, FLAG was_player, int i) { int n, len; BULLET *bp; @@ -824,8 +816,7 @@ zap(pp, was_player, i) * Return a random number in a given range. */ int -rand_num(range) - int range; +rand_num(int range) { return (range == 0 ? 0 : RN % range); } @@ -837,9 +828,7 @@ rand_num(range) * FALSE. */ static int -havechar(pp, i) - PLAYER *pp; - int i; +havechar(PLAYER *pp, int i) { if (pp->p_ncount < pp->p_nchar) @@ -863,8 +852,7 @@ check_again: * Exit with the given value, cleaning up any droppings lying around */ SIGNAL_TYPE -cleanup(eval) - int eval; +cleanup(int eval) { PLAYER *pp; @@ -895,7 +883,7 @@ cleanup(eval) * Print stats to requestor */ static void -send_stats() +send_stats(void) { IDENT *ip; FILE *fp; @@ -971,7 +959,7 @@ send_stats() * Clear out the scores so the next session start clean */ static void -clear_scores() +clear_scores(void) { IDENT *ip, *nextip; diff --git a/hunt/huntd/execute.c b/hunt/huntd/execute.c index dd887670..2e524e5c 100644 --- a/hunt/huntd/execute.c +++ b/hunt/huntd/execute.c @@ -1,4 +1,4 @@ -/* $NetBSD: execute.c,v 1.7 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: execute.c,v 1.8 2009/07/04 02:37:20 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: execute.c,v 1.7 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: execute.c,v 1.8 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include <stdlib.h> @@ -53,8 +53,7 @@ static void scan(PLAYER *); * Execute a single monitor command */ void -mon_execute(pp) - PLAYER *pp; +mon_execute(PLAYER *pp) { char ch; @@ -75,8 +74,7 @@ mon_execute(pp) * Execute a single command */ void -execute(pp) - PLAYER *pp; +execute(PLAYER *pp) { char ch; @@ -192,9 +190,7 @@ execute(pp) * Execute a move in the given direction */ static void -move_player(pp, dir) - PLAYER *pp; - int dir; +move_player(PLAYER *pp, int dir) { PLAYER *newp; int x, y; @@ -328,9 +324,7 @@ move_player(pp, dir) * Change the direction the player is facing */ static void -turn_player(pp, dir) - PLAYER *pp; - int dir; +turn_player(PLAYER *pp, int dir) { if (pp->p_face != dir) { pp->p_face = dir; @@ -343,9 +337,7 @@ turn_player(pp, dir) * Fire a shot of the given type in the given direction */ static void -fire(pp, req_index) - PLAYER *pp; - int req_index; +fire(PLAYER *pp, int req_index) { if (pp == NULL) return; @@ -392,9 +384,7 @@ fire(pp, req_index) * Fire a slime shot in the given direction */ static void -fire_slime(pp, req_index) - PLAYER *pp; - int req_index; +fire_slime(PLAYER *pp, int req_index) { if (pp == NULL) return; @@ -441,14 +431,8 @@ fire_slime(pp, req_index) * Create a shot with the given properties */ void -add_shot(type, y, x, face, charge, owner, expl, over) -int type; -int y, x; -char face; -int charge; -PLAYER *owner; -int expl; -char over; +add_shot(int type, int y, int x, char face, int charge, + PLAYER *owner, int expl, char over) { BULLET *bp; int size; @@ -483,16 +467,8 @@ char over; } BULLET * -create_shot(type, y, x, face, charge, size, owner, score, expl, over) - int type; - int y, x; - char face; - int charge; - int size; - PLAYER *owner; - IDENT *score; - int expl; - char over; +create_shot(int type, int y, int x, char face, int charge, + int size, PLAYER *owner, IDENT *score, int expl, char over) { BULLET *bp; @@ -523,8 +499,7 @@ create_shot(type, y, x, face, charge, size, owner, score, expl, over) * Turn on or increase length of a cloak */ static void -cloak(pp) - PLAYER *pp; +cloak(PLAYER *pp) { if (pp->p_ammo <= 0) { message(pp, "No more charges"); @@ -553,8 +528,7 @@ cloak(pp) * Turn on or increase length of a scan */ static void -scan(pp) - PLAYER *pp; +scan(PLAYER *pp) { if (pp->p_ammo <= 0) { message(pp, "No more charges"); @@ -577,11 +551,7 @@ scan(pp) * check whether the object blew up or whether he picked it up */ void -pickup(pp, y, x, prob, obj) - PLAYER *pp; - int y, x; - int prob; - int obj; +pickup(PLAYER *pp, int y, int x, int prob, int obj) { int req; diff --git a/hunt/huntd/expl.c b/hunt/huntd/expl.c index ff2c7463..659d3507 100644 --- a/hunt/huntd/expl.c +++ b/hunt/huntd/expl.c @@ -1,4 +1,4 @@ -/* $NetBSD: expl.c,v 1.5 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: expl.c,v 1.6 2009/07/04 02:37:20 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: expl.c,v 1.5 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: expl.c,v 1.6 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include <stdlib.h> @@ -46,9 +46,7 @@ static void remove_wall(int, int); * Show the explosions as they currently are */ void -showexpl(y, x, type) - int y, x; - char type; +showexpl(int y, int x, char type) { PLAYER *pp; EXPL *ep; @@ -106,7 +104,7 @@ showexpl(y, x, type) * top */ void -rollexpl() +rollexpl(void) { EXPL *ep; PLAYER *pp; @@ -152,8 +150,7 @@ static REGEN *rem_index = removed; * the location currently pointed at. */ static void -remove_wall(y, x) - int y, x; +remove_wall(int y, int x) { REGEN *r; # if defined(MONITOR) || defined(FLY) @@ -240,7 +237,7 @@ found: * Clear out the walls array */ void -clearwalls() +clearwalls(void) { REGEN *rp; diff --git a/hunt/huntd/faketalk.c b/hunt/huntd/faketalk.c index 54e125bb..72ed4dcd 100644 --- a/hunt/huntd/faketalk.c +++ b/hunt/huntd/faketalk.c @@ -1,4 +1,4 @@ -/* $NetBSD: faketalk.c,v 1.13 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: faketalk.c,v 1.14 2009/07/04 02:37:20 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: faketalk.c,v 1.13 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: faketalk.c,v 1.14 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ #include "bsd.h" @@ -73,8 +73,7 @@ SIGNAL_TYPE exorcise(int); */ SIGNAL_TYPE -exorcise(dummy) - int dummy __unused; +exorcise(int dummy __unused) { (void) wait(0); } @@ -85,7 +84,7 @@ exorcise(dummy) */ void -faketalk() +faketalk(void) { struct servent *sp; char buf[BUFSIZ]; @@ -207,8 +206,7 @@ faketalk() */ static void -do_announce(s) - char *s; +do_announce(char *s) { CTL_RESPONSE response; @@ -246,7 +244,7 @@ do_announce(s) } #else void -faketalk() +faketalk(void) { return; } diff --git a/hunt/huntd/get_names.c b/hunt/huntd/get_names.c index 7acda59e..9c6c7ecf 100644 --- a/hunt/huntd/get_names.c +++ b/hunt/huntd/get_names.c @@ -1,4 +1,4 @@ -/* $NetBSD: get_names.c,v 1.8 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: get_names.c,v 1.9 2009/07/04 02:37:20 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: get_names.c,v 1.8 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: get_names.c,v 1.9 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ #include "bsd.h" @@ -55,8 +55,7 @@ char *my_machine_name; * Determine the local user and machine */ void -get_local_name(my_name) - char *my_name; +get_local_name(char *my_name) { struct hostent *hp; struct servent *sp; @@ -112,8 +111,7 @@ get_local_name(my_name) * Determine the remote user and machine */ int -get_remote_name(his_address) - char *his_address; +get_remote_name(char *his_address) { char *his_name; char *his_machine_name; diff --git a/hunt/huntd/makemaze.c b/hunt/huntd/makemaze.c index 4b58f92f..8beee4ff 100644 --- a/hunt/huntd/makemaze.c +++ b/hunt/huntd/makemaze.c @@ -1,4 +1,4 @@ -/* $NetBSD: makemaze.c,v 1.4 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: makemaze.c,v 1.5 2009/07/04 02:37:20 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: makemaze.c,v 1.4 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: makemaze.c,v 1.5 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include "hunt.h" @@ -46,7 +46,7 @@ static void dig_maze(int, int); static void remap(void); void -makemaze() +makemaze(void) { char *sp; int y, x; @@ -81,8 +81,7 @@ int incr[NDIR][2] = { }; static void -dig(y, x) - int y, x; +dig(int y, int x) { int *dp; int *ip; @@ -106,8 +105,7 @@ dig(y, x) * Is it legal to clear this spot? */ static int -candig(y, x) - int y, x; +candig(int y, int x) { int i; @@ -137,8 +135,7 @@ candig(y, x) } void -dig_maze(x, y) - int x, y; +dig_maze(int x, int y) { int tx, ty; int i, j; @@ -185,7 +182,7 @@ dig_maze(x, y) } void -remap() +remap(void) { int y, x; char *sp; diff --git a/hunt/huntd/shots.c b/hunt/huntd/shots.c index ecc08a48..4c524d3d 100644 --- a/hunt/huntd/shots.c +++ b/hunt/huntd/shots.c @@ -1,4 +1,4 @@ -/* $NetBSD: shots.c,v 1.8 2009/07/04 01:01:18 dholland Exp $ */ +/* $NetBSD: shots.c,v 1.9 2009/07/04 02:37:20 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: shots.c,v 1.8 2009/07/04 01:01:18 dholland Exp $"); +__RCSID("$NetBSD: shots.c,v 1.9 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ # include <err.h> @@ -64,7 +64,7 @@ static void zapshot(BULLET *, BULLET *); * Move the shots already in the air, taking explosions into account */ void -moveshots() +moveshots(void) { BULLET *bp, *next; PLAYER *pp; @@ -183,8 +183,7 @@ ret: * Move a normal shot along its trajectory */ static int -move_normal_shot(bp) - BULLET *bp; +move_normal_shot(BULLET *bp) { int i, x, y; PLAYER *pp; @@ -371,8 +370,7 @@ move_normal_shot(bp) * Move the drone to the next square */ static void -move_drone(bp) - BULLET *bp; +move_drone(BULLET *bp) { int mask, count; int n, dir; @@ -515,8 +513,7 @@ drone_move: * Put this bullet back onto the bullet list */ static void -save_bullet(bp) - BULLET *bp; +save_bullet(BULLET *bp) { bp->b_over = Maze[bp->b_y][bp->b_x]; switch (bp->b_over) { @@ -567,8 +564,7 @@ save_bullet(bp) * Update the position of a player in flight */ static void -move_flyer(pp) - PLAYER *pp; +move_flyer(PLAYER *pp) { int x, y; @@ -658,9 +654,7 @@ again: * Handle explosions */ static void -chkshot(bp, next) - BULLET *bp; - BULLET *next; +chkshot(BULLET *bp, BULLET *next) { int y, x; int dy, dx, absdy; @@ -752,9 +746,7 @@ chkshot(bp, next) * handle slime shot exploding */ static void -chkslime(bp, next) - BULLET *bp; - BULLET *next; +chkslime(BULLET *bp, BULLET *next) { BULLET *nbp; @@ -800,10 +792,7 @@ chkslime(bp, next) * it hasn't fizzled yet */ void -move_slime(bp, speed, next) - BULLET *bp; - int speed; - BULLET *next; +move_slime(BULLET *bp, int speed, BULLET *next) { int i, j, dirmask, count; PLAYER *pp; @@ -960,8 +949,7 @@ move_slime(bp, speed, next) * returns whether the given location is a wall */ static int -iswall(y, x) - int y, x; +iswall(int y, int x) { if (y < 0 || x < 0 || y >= HEIGHT || x >= WIDTH) return TRUE; @@ -993,8 +981,7 @@ iswall(y, x) * Take a shot out of the air. */ static void -zapshot(blist, obp) - BULLET *blist, *obp; +zapshot(BULLET *blist, BULLET *obp) { BULLET *bp; FLAG explode; @@ -1018,9 +1005,7 @@ zapshot(blist, obp) * Make all shots at this location blow up */ void -explshot(blist, y, x) - BULLET *blist; - int y, x; +explshot(BULLET *blist, int y, int x) { BULLET *bp; @@ -1037,8 +1022,7 @@ explshot(blist, y, x) * Return a pointer to the player at the given location */ PLAYER * -play_at(y, x) - int y, x; +play_at(int y, int x) { PLAYER *pp; @@ -1055,9 +1039,7 @@ play_at(y, x) * of the player in the maze */ int -opposite(face, dir) - int face; - char dir; +opposite(int face, char dir) { switch (face) { case LEFTS: @@ -1079,8 +1061,7 @@ opposite(face, dir) * a pointer to the bullet, otherwise return NULL */ BULLET * -is_bullet(y, x) - int y, x; +is_bullet(int y, int x) { BULLET *bp; @@ -1096,9 +1077,7 @@ is_bullet(y, x) * to the given character. */ void -fixshots(y, x, over) - int y, x; - char over; +fixshots(int y, int x, char over) { BULLET *bp; @@ -1113,8 +1092,7 @@ fixshots(y, x, over) * on another bullet. */ static void -find_under(blist, bp) - BULLET *blist, *bp; +find_under(BULLET *blist, BULLET *bp) { BULLET *nbp; @@ -1130,8 +1108,7 @@ find_under(blist, bp) * mark a player as under a shot */ static void -mark_player(bp) - BULLET *bp; +mark_player(BULLET *bp) { PLAYER *pp; @@ -1148,8 +1125,7 @@ mark_player(bp) * mark a boot as under a shot */ static void -mark_boot(bp) - BULLET *bp; +mark_boot(BULLET *bp) { PLAYER *pp; diff --git a/hunt/huntd/terminal.c b/hunt/huntd/terminal.c index a54d61b1..a3e0c7d5 100644 --- a/hunt/huntd/terminal.c +++ b/hunt/huntd/terminal.c @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.5 2008/01/28 03:23:29 dholland Exp $ */ +/* $NetBSD: terminal.c,v 1.6 2009/07/04 02:37:20 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: terminal.c,v 1.5 2008/01/28 03:23:29 dholland Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.6 2009/07/04 02:37:20 dholland Exp $"); #endif /* not lint */ #include <stdarg.h> @@ -45,9 +45,7 @@ __RCSID("$NetBSD: terminal.c,v 1.5 2008/01/28 03:23:29 dholland Exp $"); * terminal. */ void -cgoto(pp, y, x) - PLAYER *pp; - int y, x; +cgoto(PLAYER *pp, int y, int x) { if (x == pp->p_curx && y == pp->p_cury) return; @@ -61,9 +59,7 @@ cgoto(pp, y, x) * Put out a single character. */ void -outch(pp, ch) - PLAYER *pp; - char ch; +outch(PLAYER *pp, int ch) { if (++pp->p_curx >= TERM_WIDTH) { pp->p_curx = 0; @@ -77,10 +73,7 @@ outch(pp, ch) * Put out a string of the given length. */ void -outstr(pp, str, len) - PLAYER *pp; - const char *str; - int len; +outstr(PLAYER *pp, const char *str, int len) { pp->p_curx += len; pp->p_cury += (pp->p_curx / TERM_WIDTH); @@ -94,8 +87,7 @@ outstr(pp, str, len) * Clear the screen, and reset the current position on the screen. */ void -clrscr(pp) - PLAYER *pp; +clrscr(PLAYER *pp) { sendcom(pp, CLEAR); pp->p_cury = 0; @@ -107,8 +99,7 @@ clrscr(pp) * Clear to the end of the line */ void -ce(pp) - PLAYER *pp; +ce(PLAYER *pp) { sendcom(pp, CLRTOEOL); } @@ -119,8 +110,7 @@ ce(pp) * Refresh the screen */ void -ref(pp) - PLAYER *pp; +ref(PLAYER *pp) { sendcom(pp, REFRESH); } |