Module Name: src Committed By: dholland Date: Sat Jul 4 02:37:20 UTC 2009
Modified Files: src/games/hunt/huntd: answer.c ctl.c ctl_transact.c draw.c driver.c execute.c expl.c faketalk.c get_names.c makemaze.c shots.c terminal.c Log Message: ANSIfy function declarations. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/games/hunt/huntd/answer.c cvs rdiff -u -r1.3 -r1.4 src/games/hunt/huntd/ctl.c cvs rdiff -u -r1.7 -r1.8 src/games/hunt/huntd/ctl_transact.c \ src/games/hunt/huntd/execute.c cvs rdiff -u -r1.5 -r1.6 src/games/hunt/huntd/draw.c \ src/games/hunt/huntd/expl.c src/games/hunt/huntd/terminal.c cvs rdiff -u -r1.15 -r1.16 src/games/hunt/huntd/driver.c cvs rdiff -u -r1.13 -r1.14 src/games/hunt/huntd/faketalk.c cvs rdiff -u -r1.8 -r1.9 src/games/hunt/huntd/get_names.c \ src/games/hunt/huntd/shots.c cvs rdiff -u -r1.4 -r1.5 src/games/hunt/huntd/makemaze.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/games/hunt/huntd/answer.c diff -u src/games/hunt/huntd/answer.c:1.12 src/games/hunt/huntd/answer.c:1.13 --- src/games/hunt/huntd/answer.c:1.12 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/answer.c Sat Jul 4 02:37:20 2009 @@ -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 @@ static char Ttyname[NAMELEN]; int -answer() +answer(void) { PLAYER *pp; int newsock; @@ -204,8 +204,7 @@ # ifdef MONITOR void -stmonitor(pp) - PLAYER *pp; +stmonitor(PLAYER *pp) { int line; PLAYER *npp; @@ -234,9 +233,7 @@ # 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 @@ * Return a random direction */ int -rand_dir() +rand_dir(void) { switch (rand_num(4)) { case 0: @@ -384,11 +381,7 @@ * 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; Index: src/games/hunt/huntd/ctl.c diff -u src/games/hunt/huntd/ctl.c:1.3 src/games/hunt/huntd/ctl.c:1.4 --- src/games/hunt/huntd/ctl.c:1.3 Wed Jun 11 12:00:22 2003 +++ src/games/hunt/huntd/ctl.c Sat Jul 4 02:37:20 2009 @@ -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 @@ /* open the ctl socket */ void -open_ctl() +open_ctl(void) { int length; Index: src/games/hunt/huntd/ctl_transact.c diff -u src/games/hunt/huntd/ctl_transact.c:1.7 src/games/hunt/huntd/ctl_transact.c:1.8 --- src/games/hunt/huntd/ctl_transact.c:1.7 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/ctl_transact.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * 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; Index: src/games/hunt/huntd/execute.c diff -u src/games/hunt/huntd/execute.c:1.7 src/games/hunt/huntd/execute.c:1.8 --- src/games/hunt/huntd/execute.c:1.7 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/execute.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * Execute a single monitor command */ void -mon_execute(pp) - PLAYER *pp; +mon_execute(PLAYER *pp) { char ch; @@ -75,8 +74,7 @@ * Execute a single command */ void -execute(pp) - PLAYER *pp; +execute(PLAYER *pp) { char ch; @@ -192,9 +190,7 @@ * 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 @@ * 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 @@ * 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 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 @@ * 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 @@ } 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 @@ * 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 @@ * 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 @@ * 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; Index: src/games/hunt/huntd/draw.c diff -u src/games/hunt/huntd/draw.c:1.5 src/games/hunt/huntd/draw.c:1.6 --- src/games/hunt/huntd/draw.c:1.5 Sun Jun 28 21:12:35 2009 +++ src/games/hunt/huntd/draw.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * size is 80x24 with the maze being 64x24) */ void -drawstatus(pp) - PLAYER *pp; +drawstatus(PLAYER *pp) { int i; PLAYER *np; @@ -125,8 +123,7 @@ } void -look(pp) - PLAYER *pp; +look(PLAYER *pp) { int x, y; @@ -173,9 +170,7 @@ } void -see(pp, face) - PLAYER *pp; - int face; +see(PLAYER *pp, int face) { char *sp; int y, x, i, cnt; @@ -260,9 +255,7 @@ } 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 @@ * Update the status of players */ void -showstat(pp) - PLAYER *pp; +showstat(PLAYER *pp) { PLAYER *np; int y; @@ -315,9 +307,7 @@ * 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 @@ } 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 @@ * looking at the current player. */ char -translate(ch) - char ch; +translate(char ch) { switch (ch) { case LEFTS: @@ -389,9 +376,7 @@ * 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; Index: src/games/hunt/huntd/expl.c diff -u src/games/hunt/huntd/expl.c:1.5 src/games/hunt/huntd/expl.c:1.6 --- src/games/hunt/huntd/expl.c:1.5 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/expl.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * 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 @@ * top */ void -rollexpl() +rollexpl(void) { EXPL *ep; PLAYER *pp; @@ -152,8 +150,7 @@ * 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 @@ * Clear out the walls array */ void -clearwalls() +clearwalls(void) { REGEN *rp; Index: src/games/hunt/huntd/terminal.c diff -u src/games/hunt/huntd/terminal.c:1.5 src/games/hunt/huntd/terminal.c:1.6 --- src/games/hunt/huntd/terminal.c:1.5 Mon Jan 28 03:23:29 2008 +++ src/games/hunt/huntd/terminal.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * Clear to the end of the line */ void -ce(pp) - PLAYER *pp; +ce(PLAYER *pp) { sendcom(pp, CLRTOEOL); } @@ -119,8 +110,7 @@ * Refresh the screen */ void -ref(pp) - PLAYER *pp; +ref(PLAYER *pp) { sendcom(pp, REFRESH); } Index: src/games/hunt/huntd/driver.c diff -u src/games/hunt/huntd/driver.c:1.15 src/games/hunt/huntd/driver.c:1.16 --- src/games/hunt/huntd/driver.c:1.15 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/driver.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * 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 @@ * Initialize the global parameters. */ static void -init() +init(void) { int i; # ifdef INTERNET @@ -443,7 +441,7 @@ * Put the boots in the maze */ static void -makeboots() +makeboots(void) { int x, y; PLAYER *pp; @@ -464,11 +462,8 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * Print stats to requestor */ static void -send_stats() +send_stats(void) { IDENT *ip; FILE *fp; @@ -971,7 +959,7 @@ * Clear out the scores so the next session start clean */ static void -clear_scores() +clear_scores(void) { IDENT *ip, *nextip; Index: src/games/hunt/huntd/faketalk.c diff -u src/games/hunt/huntd/faketalk.c:1.13 src/games/hunt/huntd/faketalk.c:1.14 --- src/games/hunt/huntd/faketalk.c:1.13 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/faketalk.c Sat Jul 4 02:37:20 2009 @@ -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(dummy) - int dummy __unused; +exorcise(int dummy __unused) { (void) wait(0); } @@ -85,7 +84,7 @@ */ void -faketalk() +faketalk(void) { struct servent *sp; char buf[BUFSIZ]; @@ -207,8 +206,7 @@ */ static void -do_announce(s) - char *s; +do_announce(char *s) { CTL_RESPONSE response; @@ -246,7 +244,7 @@ } #else void -faketalk() +faketalk(void) { return; } Index: src/games/hunt/huntd/get_names.c diff -u src/games/hunt/huntd/get_names.c:1.8 src/games/hunt/huntd/get_names.c:1.9 --- src/games/hunt/huntd/get_names.c:1.8 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/get_names.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * 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 @@ * 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; Index: src/games/hunt/huntd/shots.c diff -u src/games/hunt/huntd/shots.c:1.8 src/games/hunt/huntd/shots.c:1.9 --- src/games/hunt/huntd/shots.c:1.8 Sat Jul 4 01:01:18 2009 +++ src/games/hunt/huntd/shots.c Sat Jul 4 02:37:20 2009 @@ -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 @@ * Move the shots already in the air, taking explosions into account */ void -moveshots() +moveshots(void) { BULLET *bp, *next; PLAYER *pp; @@ -183,8 +183,7 @@ * 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 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 @@ * 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 @@ * 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 @@ * 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 @@ * handle slime shot exploding */ static void -chkslime(bp, next) - BULLET *bp; - BULLET *next; +chkslime(BULLET *bp, BULLET *next) { BULLET *nbp; @@ -800,10 +792,7 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * on another bullet. */ static void -find_under(blist, bp) - BULLET *blist, *bp; +find_under(BULLET *blist, BULLET *bp) { BULLET *nbp; @@ -1130,8 +1108,7 @@ * 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 a boot as under a shot */ static void -mark_boot(bp) - BULLET *bp; +mark_boot(BULLET *bp) { PLAYER *pp; Index: src/games/hunt/huntd/makemaze.c diff -u src/games/hunt/huntd/makemaze.c:1.4 src/games/hunt/huntd/makemaze.c:1.5 --- src/games/hunt/huntd/makemaze.c:1.4 Tue Jan 27 20:30:29 2004 +++ src/games/hunt/huntd/makemaze.c Sat Jul 4 02:37:20 2009 @@ -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 remap(void); void -makemaze() +makemaze(void) { char *sp; int y, x; @@ -81,8 +81,7 @@ }; static void -dig(y, x) - int y, x; +dig(int y, int x) { int *dp; int *ip; @@ -106,8 +105,7 @@ * 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 @@ } void -dig_maze(x, y) - int x, y; +dig_maze(int x, int y) { int tx, ty; int i, j; @@ -185,7 +182,7 @@ } void -remap() +remap(void) { int y, x; char *sp;