summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2004-11-29 08:52:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2004-11-29 08:52:30 +0000
commit9f35ef98a75e416220366f7f6ac0f8864d6239fb (patch)
treea3cc1c29744d5270e4662e30a4a7b7d0158c77ed
parent0e91e5b94fb68ab00eed960bad30f73eba33c15b (diff)
ansi. ok deraadt@
-rw-r--r--games/atc/graphics.c47
-rw-r--r--games/atc/input.c83
-rw-r--r--games/atc/list.c14
-rw-r--r--games/atc/log.c18
-rw-r--r--games/atc/main.c18
-rw-r--r--games/atc/update.c30
-rw-r--r--games/fish/fish.c54
-rw-r--r--games/grdc/grdc.c11
-rw-r--r--games/hangman/endgame.c6
-rw-r--r--games/hangman/getguess.c8
-rw-r--r--games/hangman/getword.c6
-rw-r--r--games/hangman/main.c11
-rw-r--r--games/hangman/playgame.c6
-rw-r--r--games/hangman/prdata.c6
-rw-r--r--games/hangman/prman.c6
-rw-r--r--games/hangman/prword.c6
-rw-r--r--games/hangman/setup.c6
-rw-r--r--games/robots/init_field.c6
-rw-r--r--games/robots/main.c15
-rw-r--r--games/robots/make_level.c6
-rw-r--r--games/robots/move.c18
-rw-r--r--games/robots/move_robs.c12
-rw-r--r--games/robots/play_level.c6
-rw-r--r--games/robots/query.c7
-rw-r--r--games/robots/rnd_pos.c9
-rw-r--r--games/robots/score.c15
-rw-r--r--games/worm/worm.c14
-rw-r--r--games/worms/worms.c13
28 files changed, 182 insertions, 275 deletions
diff --git a/games/atc/graphics.c b/games/atc/graphics.c
index 20139adf806..9d6efb66e1d 100644
--- a/games/atc/graphics.c
+++ b/games/atc/graphics.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: graphics.c,v 1.6 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: graphics.c,v 1.7 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: graphics.c,v 1.3 1995/03/21 15:04:04 cgd Exp $ */
/*-
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: graphics.c,v 1.6 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: graphics.c,v 1.7 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -64,7 +64,7 @@ static char rcsid[] = "$OpenBSD: graphics.c,v 1.6 2003/06/03 03:01:38 millert Ex
WINDOW *radar, *cleanradar, *credit, *input, *planes;
int
-getAChar()
+getAChar(void)
{
int c;
#ifdef BSD
@@ -79,7 +79,7 @@ getAChar()
}
void
-erase_all()
+erase_all(void)
{
PLANE *pp;
@@ -94,7 +94,7 @@ erase_all()
}
void
-draw_all()
+draw_all(void)
{
PLANE *pp;
@@ -114,8 +114,7 @@ draw_all()
}
void
-setup_screen(scp)
- const C_SCREEN *scp;
+setup_screen(const C_SCREEN *scp)
{
static char buffer[BUFSIZ];
int i, j;
@@ -223,10 +222,7 @@ setup_screen(scp)
}
void
-draw_line(w, x, y, lx, ly, s)
- WINDOW *w;
- int x, y, lx, ly;
- const char *s;
+draw_line(WINDOW *w, int x, int y, int lx, int ly, const char *s)
{
int dx, dy;
@@ -243,8 +239,7 @@ draw_line(w, x, y, lx, ly, s)
}
void
-ioclrtoeol(pos)
- int pos;
+ioclrtoeol(int pos)
{
wmove(input, 0, pos);
wclrtoeol(input);
@@ -253,8 +248,7 @@ ioclrtoeol(pos)
}
void
-iomove(pos)
- int pos;
+iomove(int pos)
{
wmove(input, 0, pos);
wrefresh(input);
@@ -262,9 +256,7 @@ iomove(pos)
}
void
-ioaddstr(pos, str)
- int pos;
- const char *str;
+ioaddstr(int pos, const char *str)
{
wmove(input, 0, pos);
waddstr(input, str);
@@ -273,7 +265,7 @@ ioaddstr(pos, str)
}
void
-ioclrtobot()
+ioclrtobot(void)
{
wclrtobot(input);
wrefresh(input);
@@ -281,9 +273,7 @@ ioclrtobot()
}
void
-ioerror(pos, len, str)
- int pos, len;
- const char *str;
+ioerror(int pos, int len, const char *str)
{
int i;
@@ -297,8 +287,7 @@ ioerror(pos, len, str)
}
void
-quit(dummy)
- int dummy;
+quit(int dummy)
{
int c, y, x;
#ifdef BSD
@@ -338,7 +327,7 @@ quit(dummy)
}
void
-planewin()
+planewin(void)
{
PLANE *pp;
int warning = 0;
@@ -381,9 +370,7 @@ planewin()
}
void
-loser(p, s)
- const PLANE *p;
- const char *s;
+loser(const PLANE *p, const char *s)
{
int c;
#ifdef BSD
@@ -419,7 +406,7 @@ loser(p, s)
}
void
-redraw()
+redraw(void)
{
clear();
refresh();
@@ -438,7 +425,7 @@ redraw()
}
void
-done_screen()
+done_screen(void)
{
clear();
refresh();
diff --git a/games/atc/input.c b/games/atc/input.c
index b38929dca5f..b4a57e2219d 100644
--- a/games/atc/input.c
+++ b/games/atc/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.9 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: input.c,v 1.10 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: input.c,v 1.4 1995/04/27 21:22:24 mycroft Exp $ */
/*-
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: input.c,v 1.9 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: input.c,v 1.10 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -173,7 +173,7 @@ int tval;
int dest_type, dest_no, dir;
int
-pop()
+pop(void)
{
if (level == 0)
return (-1);
@@ -188,7 +188,7 @@ pop()
}
void
-rezero()
+rezero(void)
{
iomove(0);
@@ -201,8 +201,7 @@ rezero()
}
void
-push(ruleno, ch)
- int ruleno, ch;
+push(int ruleno, int ch)
{
int newstate, newpos;
@@ -224,7 +223,7 @@ push(ruleno, ch)
}
int
-getcommand()
+getcommand(void)
{
int c, i, done;
const char *s, *(*func)(char);
@@ -283,7 +282,7 @@ getcommand()
}
void
-noise()
+noise(void)
{
if (makenoise)
putchar('\07');
@@ -291,7 +290,7 @@ noise()
}
int
-gettoken()
+gettoken(void)
{
while ((tval = getAChar()) == REDRAWTOKEN)
{
@@ -307,8 +306,7 @@ gettoken()
}
const char *
-setplane(c)
- char c;
+setplane(char c)
{
PLANE *pp;
@@ -321,8 +319,7 @@ setplane(c)
}
const char *
-turn(c)
- char c;
+turn(char c)
{
if (p.altitude == 0)
return ("Planes at airports may not change direction");
@@ -330,8 +327,7 @@ turn(c)
}
const char *
-circle(c)
- char c;
+circle(char c)
{
if (p.altitude == 0)
return ("Planes cannot circle on the ground");
@@ -340,8 +336,7 @@ circle(c)
}
const char *
-left(c)
- char c;
+left(char c)
{
dir = D_LEFT;
p.new_dir = p.dir - 1;
@@ -351,8 +346,7 @@ left(c)
}
const char *
-right(c)
- char c;
+right(char c)
{
dir = D_RIGHT;
p.new_dir = p.dir + 1;
@@ -362,8 +356,7 @@ right(c)
}
const char *
-Left(c)
- char c;
+Left(char c)
{
p.new_dir = p.dir - 2;
if (p.new_dir < 0)
@@ -372,8 +365,7 @@ Left(c)
}
const char *
-Right(c)
- char c;
+Right(char c)
{
p.new_dir = p.dir + 2;
if (p.new_dir >= MAXDIR)
@@ -382,8 +374,7 @@ Right(c)
}
const char *
-delayb(c)
- char c;
+delayb(char c)
{
int xdiff, ydiff;
@@ -432,48 +423,42 @@ delayb(c)
}
const char *
-beacon(c)
- char c;
+beacon(char c)
{
dest_type = T_BEACON;
return (NULL);
}
const char *
-ex_it(c)
- char c;
+ex_it(char c)
{
dest_type = T_EXIT;
return (NULL);
}
const char *
-airport(c)
- char c;
+airport(char c)
{
dest_type = T_AIRPORT;
return (NULL);
}
const char *
-climb(c)
- char c;
+climb(char c)
{
dir = D_UP;
return (NULL);
}
const char *
-descend(c)
- char c;
+descend(char c)
{
dir = D_DOWN;
return (NULL);
}
const char *
-setalt(c)
- char c;
+setalt(char c)
{
if ((p.altitude == c - '0') && (p.new_altitude == p.altitude))
return ("Already at that altitude");
@@ -482,8 +467,7 @@ setalt(c)
}
const char *
-setrelalt(c)
- char c;
+setrelalt(char c)
{
if (c == 0)
return ("altitude not changed");
@@ -507,8 +491,7 @@ setrelalt(c)
}
const char *
-benum(c)
- char c;
+benum(char c)
{
dest_no = c -= '0';
@@ -539,16 +522,14 @@ benum(c)
}
const char *
-to_dir(c)
- char c;
+to_dir(char c)
{
p.new_dir = dir_no(c);
return (NULL);
}
const char *
-rel_dir(c)
- char c;
+rel_dir(char c)
{
int angle;
@@ -572,8 +553,7 @@ rel_dir(c)
}
const char *
-mark(c)
- char c;
+mark(char c)
{
if (p.altitude == 0)
return ("Cannot mark planes on the ground");
@@ -584,8 +564,7 @@ mark(c)
}
const char *
-unmark(c)
- char c;
+unmark(char c)
{
if (p.altitude == 0)
return ("Cannot unmark planes on the ground");
@@ -596,8 +575,7 @@ unmark(c)
}
const char *
-ignore(c)
- char c;
+ignore(char c)
{
if (p.altitude == 0)
return ("Cannot ignore planes on the ground");
@@ -608,8 +586,7 @@ ignore(c)
}
int
-dir_no(ch)
- char ch;
+dir_no(char ch)
{
int dir;
diff --git a/games/atc/list.c b/games/atc/list.c
index a18e8f6daca..c51c69a8a7c 100644
--- a/games/atc/list.c
+++ b/games/atc/list.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: list.c,v 1.5 2003/11/08 19:17:27 jmc Exp $ */
+/* $OpenBSD: list.c,v 1.6 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: list.c,v 1.3 1995/03/21 15:04:18 cgd Exp $ */
/*-
@@ -46,14 +46,14 @@
#if 0
static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: list.c,v 1.5 2003/11/08 19:17:27 jmc Exp $";
+static char rcsid[] = "$OpenBSD: list.c,v 1.6 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
#include "include.h"
PLANE *
-newplane()
+newplane(void)
{
PLANE *p;
@@ -63,9 +63,7 @@ newplane()
}
void
-append(l, p)
- LIST *l;
- PLANE *p;
+append(LIST *l, PLANE *p)
{
PLANE *q = NULL, *r = NULL;
@@ -102,9 +100,7 @@ append(l, p)
}
void
-delete(l, p)
- LIST *l;
- PLANE *p;
+delete(LIST *l, PLANE *p)
{
if (l->head == NULL)
loser(p, "deleted a non-existent plane! Get help!");
diff --git a/games/atc/log.c b/games/atc/log.c
index f9143519635..a91543179e5 100644
--- a/games/atc/log.c
+++ b/games/atc/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.14 2003/09/26 15:52:16 deraadt Exp $ */
+/* $OpenBSD: log.c,v 1.15 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: log.c,v 1.3 1995/03/21 15:04:21 cgd Exp $ */
/*-
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: log.c,v 1.14 2003/09/26 15:52:16 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: log.c,v 1.15 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -56,8 +56,7 @@ static char rcsid[] = "$OpenBSD: log.c,v 1.14 2003/09/26 15:52:16 deraadt Exp $"
static FILE *score_fp;
int
-compar(va, vb)
- const void *va, *vb;
+compar(const void *va, const void *vb)
{
const SCORE *a, *b;
@@ -80,8 +79,7 @@ compar(va, vb)
#define SEC(t) ((t) % SECAMIN)
const char *
-timestr(t)
- int t;
+timestr(int t)
{
static char s[80];
@@ -101,7 +99,7 @@ timestr(t)
}
int
-open_score_file()
+open_score_file(void)
{
mode_t old_mode;
int score_fd;
@@ -126,8 +124,7 @@ open_score_file()
}
int
-log_score(list_em)
- int list_em;
+log_score(int list_em)
{
int i, num_scores = 0, good, changed = 0, found = 0;
struct passwd *pw;
@@ -263,8 +260,7 @@ log_score(list_em)
}
void
-log_score_quit(dummy)
- int dummy;
+log_score_quit(int dummy)
{
(void)log_score(0);
exit(0);
diff --git a/games/atc/main.c b/games/atc/main.c
index 857ec2edc17..172417f47f8 100644
--- a/games/atc/main.c
+++ b/games/atc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.11 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: main.c,v 1.12 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: main.c,v 1.4 1995/04/27 21:22:25 mycroft Exp $ */
/*-
@@ -52,7 +52,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.11 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.12 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -60,9 +60,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.11 2003/06/03 03:01:38 millert Exp $
#include "pathnames.h"
int
-main(ac, av)
- int ac;
- char *av[];
+main(int ac, char *av[])
{
int f_usage = 0, f_list = 0, f_showscore = 0;
int f_printpath = 0;
@@ -230,8 +228,7 @@ main(ac, av)
}
int
-read_file(s)
- const char *s;
+read_file(const char *s)
{
extern FILE *yyin;
int retval;
@@ -252,7 +249,7 @@ read_file(s)
}
const char *
-default_game()
+default_game(void)
{
FILE *fp;
static char file[256];
@@ -281,8 +278,7 @@ default_game()
}
const char *
-okay_game(s)
- const char *s;
+okay_game(const char *s)
{
FILE *fp;
static char file[256];
@@ -321,7 +317,7 @@ okay_game(s)
}
int
-list_games()
+list_games(void)
{
FILE *fp;
char line[256], games[256];
diff --git a/games/atc/update.c b/games/atc/update.c
index 30eb20f2d10..ad1e4472704 100644
--- a/games/atc/update.c
+++ b/games/atc/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.8 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: update.c,v 1.9 2004/11/29 08:52:28 jsg Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -45,15 +45,14 @@
#if 0
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: update.c,v 1.8 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: update.c,v 1.9 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
#include "include.h"
void
-update(dummy)
- int dummy;
+update(int dummy)
{
int i, dir_diff, unclean;
PLANE *pp, *p1, *p2;
@@ -219,8 +218,7 @@ update(dummy)
}
const char *
-command(pp)
- PLANE *pp;
+command(PLANE *pp)
{
static char buf[50], *bp, *comm_start;
@@ -254,8 +252,7 @@ command(pp)
}
char
-name(p)
- const PLANE *p;
+name(const PLANE *p)
{
if (p->plane_type == 0)
return ('A' + p->plane_no);
@@ -264,8 +261,7 @@ name(p)
}
int
-number(l)
- char l;
+number(char l)
{
if (l < 'a' && l > 'z' && l < 'A' && l > 'Z')
return (-1);
@@ -276,7 +272,7 @@ number(l)
}
int
-next_plane()
+next_plane(void)
{
static int last_plane = -1;
PLANE *pp;
@@ -305,7 +301,7 @@ next_plane()
}
int
-addplane()
+addplane(void)
{
PLANE p, *pp, *p1;
int i, num_starts, close, rnd, rnd2, pnum;
@@ -376,8 +372,7 @@ addplane()
}
PLANE *
-findplane(n)
- int n;
+findplane(int n)
{
PLANE *pp;
@@ -391,9 +386,7 @@ findplane(n)
}
int
-too_close(p1, p2, dist)
- const PLANE *p1, *p2;
- int dist;
+too_close(const PLANE *p1, const PLANE *p2, int dist)
{
if (ABS(p1->altitude - p2->altitude) <= dist &&
ABS(p1->xpos - p2->xpos) <= dist && ABS(p1->ypos - p2->ypos) <= dist)
@@ -403,8 +396,7 @@ too_close(p1, p2, dist)
}
int
-dir_deg(d)
- int d;
+dir_deg(int d)
{
switch (d) {
case 0: return (0);
diff --git a/games/fish/fish.c b/games/fish/fish.c
index 1a407f6427c..16dd7d25584 100644
--- a/games/fish/fish.c
+++ b/games/fish/fish.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fish.c,v 1.13 2003/06/03 03:01:39 millert Exp $ */
+/* $OpenBSD: fish.c,v 1.14 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: fish.c,v 1.13 2003/06/03 03:01:39 millert Exp $";
+static char rcsid[] = "$OpenBSD: fish.c,v 1.14 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -97,9 +97,7 @@ void usage(void);
int usermove(void);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
int ch, move;
@@ -149,7 +147,7 @@ istart: for (;;) {
}
int
-usermove()
+usermove(void)
{
int n;
const char *const *p;
@@ -204,7 +202,7 @@ usermove()
}
int
-compmove()
+compmove(void)
{
static int lmove;
@@ -222,7 +220,7 @@ compmove()
}
int
-promove()
+promove(void)
{
int i, max;
@@ -261,9 +259,7 @@ promove()
}
int
-drawcard(player, hand)
- int player;
- int *hand;
+drawcard(int player, int *hand)
{
int card;
@@ -282,9 +278,7 @@ drawcard(player, hand)
}
int
-gofish(askedfor, player, hand)
- int askedfor, player;
- int *hand;
+gofish(int askedfor, int player, int *hand)
{
printplayer(OTHER(player));
(void)printf("say \"GO FISH!\"\n");
@@ -299,9 +293,7 @@ gofish(askedfor, player, hand)
}
void
-goodmove(player, move, hand, opphand)
- int player, move;
- int *hand, *opphand;
+goodmove(int player, int move, int *hand, int *opphand)
{
printplayer(OTHER(player));
(void)printf("have %d %s%s.\n",
@@ -323,9 +315,7 @@ goodmove(player, move, hand, opphand)
}
void
-chkwinner(player, hand)
- int player;
- const int *hand;
+chkwinner(int player, const int *hand)
{
int cb, i, ub;
@@ -353,8 +343,7 @@ chkwinner(player, hand)
}
void
-printplayer(player)
- int player;
+printplayer(int player)
{
switch (player) {
case COMPUTER:
@@ -367,8 +356,7 @@ printplayer(player)
}
void
-printhand(hand)
- const int *hand;
+printhand(const int *hand)
{
int book, i, j;
@@ -388,8 +376,7 @@ printhand(hand)
}
int
-countcards(hand)
- const int *hand;
+countcards(const int *hand)
{
int i, count;
@@ -399,8 +386,7 @@ countcards(hand)
}
int
-countbooks(hand)
- const int *hand;
+countbooks(const int *hand)
{
int i, count;
@@ -416,7 +402,7 @@ countbooks(hand)
}
void
-init()
+init(void)
{
int i, j, temp;
@@ -438,15 +424,13 @@ init()
}
int
-nrandom(n)
- int n;
+nrandom(int n)
{
return((int)random() % n);
}
int
-getans(prompt)
- const char *prompt;
+getans(const char *prompt)
{
char buf[20];
@@ -473,7 +457,7 @@ getans(prompt)
}
void
-instructions()
+instructions(void)
{
const char *pager;
pid_t pid;
@@ -515,7 +499,7 @@ instructions()
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: fish [-p]\n");
exit(1);
diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c
index 33974fb4754..8cf7f825e24 100644
--- a/games/grdc/grdc.c
+++ b/games/grdc/grdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grdc.c,v 1.12 2002/07/26 20:32:38 pjanzen Exp $ */
+/* $OpenBSD: grdc.c,v 1.13 2004/11/29 08:52:28 jsg Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
@@ -45,16 +45,13 @@ void movto(int, int);
void usage(void);
void
-sighndl(signo)
- int signo;
+sighndl(int signo)
{
sigtermed=signo;
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
long t, a;
int i, j, s, k;
@@ -238,7 +235,7 @@ movto(int line, int col)
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: grdc [-s] [number_of_seconds]\n");
exit(1);
diff --git a/games/hangman/endgame.c b/games/hangman/endgame.c
index e029456dd39..3fdf768a621 100644
--- a/games/hangman/endgame.c
+++ b/games/hangman/endgame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: endgame.c,v 1.4 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: endgame.c,v 1.5 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: endgame.c,v 1.3 1995/03/23 08:32:40 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)endgame.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: endgame.c,v 1.4 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: endgame.c,v 1.5 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: endgame.c,v 1.4 2003/06/03 03:01:40 millert Exp
* Do what's necessary at the end of the game
*/
void
-endgame()
+endgame(void)
{
char ch;
diff --git a/games/hangman/getguess.c b/games/hangman/getguess.c
index ed4a28170a9..047a8e2b264 100644
--- a/games/hangman/getguess.c
+++ b/games/hangman/getguess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getguess.c,v 1.5 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: getguess.c,v 1.6 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: getguess.c,v 1.5 1995/03/23 08:32:43 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getguess.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getguess.c,v 1.5 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: getguess.c,v 1.6 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: getguess.c,v 1.5 2003/06/03 03:01:40 millert Ex
* Get another guess
*/
void
-getguess()
+getguess(void)
{
int i;
int ch;
@@ -92,7 +92,7 @@ getguess()
* Read a character from the input
*/
int
-readch()
+readch(void)
{
int cnt;
char ch;
diff --git a/games/hangman/getword.c b/games/hangman/getword.c
index 98b5eea37a4..2b6f42eb40e 100644
--- a/games/hangman/getword.c
+++ b/games/hangman/getword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getword.c,v 1.4 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: getword.c,v 1.5 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: getword.c,v 1.4 1995/03/23 08:32:45 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getword.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getword.c,v 1.4 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: getword.c,v 1.5 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -47,7 +47,7 @@ static char rcsid[] = "$OpenBSD: getword.c,v 1.4 2003/06/03 03:01:40 millert Exp
* Get a valid word out of the dictionary file
*/
void
-getword()
+getword(void)
{
FILE *inf;
char *wp, *gp;
diff --git a/games/hangman/main.c b/games/hangman/main.c
index 7bdfb1e8efa..0370a8bbafd 100644
--- a/games/hangman/main.c
+++ b/games/hangman/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.8 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: main.c,v 1.9 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.8 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.9 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -50,9 +50,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.8 2003/06/03 03:01:40 millert Exp $"
* This game written by Ken Arnold.
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch;
@@ -89,8 +87,7 @@ main(argc, argv)
* Die properly.
*/
void
-die(dummy)
- int dummy;
+die(int dummy)
{
mvcur(0, COLS - 1, LINES - 1, 0);
endwin();
diff --git a/games/hangman/playgame.c b/games/hangman/playgame.c
index 12c633b5f6c..40892543fee 100644
--- a/games/hangman/playgame.c
+++ b/games/hangman/playgame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: playgame.c,v 1.5 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: playgame.c,v 1.6 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: playgame.c,v 1.3 1995/03/23 08:32:53 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)playgame.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: playgame.c,v 1.5 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: playgame.c,v 1.6 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: playgame.c,v 1.5 2003/06/03 03:01:40 millert Ex
* play a game
*/
void
-playgame()
+playgame(void)
{
bool *bp;
diff --git a/games/hangman/prdata.c b/games/hangman/prdata.c
index c92e4c666eb..541dc5a34e8 100644
--- a/games/hangman/prdata.c
+++ b/games/hangman/prdata.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prdata.c,v 1.4 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: prdata.c,v 1.5 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: prdata.c,v 1.3 1995/03/23 08:32:54 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)prdata.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: prdata.c,v 1.4 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: prdata.c,v 1.5 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: prdata.c,v 1.4 2003/06/03 03:01:40 millert Exp
* Print out the current guesses
*/
void
-prdata()
+prdata(void)
{
bool *bp;
diff --git a/games/hangman/prman.c b/games/hangman/prman.c
index 6c6d55a64cc..bf24b2db2eb 100644
--- a/games/hangman/prman.c
+++ b/games/hangman/prman.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prman.c,v 1.4 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: prman.c,v 1.5 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: prman.c,v 1.3 1995/03/23 08:32:56 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)prman.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: prman.c,v 1.4 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: prman.c,v 1.5 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: prman.c,v 1.4 2003/06/03 03:01:40 millert Exp $
* of incorrect guesses.
*/
void
-prman()
+prman(void)
{
int i;
diff --git a/games/hangman/prword.c b/games/hangman/prword.c
index ba3c1f73121..3872522b136 100644
--- a/games/hangman/prword.c
+++ b/games/hangman/prword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prword.c,v 1.3 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: prword.c,v 1.4 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: prword.c,v 1.3 1995/03/23 08:32:58 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)prword.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: prword.c,v 1.3 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: prword.c,v 1.4 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: prword.c,v 1.3 2003/06/03 03:01:40 millert Exp
* Print out the current state of the word
*/
void
-prword()
+prword(void)
{
move(KNOWNY, KNOWNX + sizeof "Word: ");
addstr(Known);
diff --git a/games/hangman/setup.c b/games/hangman/setup.c
index 6848143427e..f31919d0800 100644
--- a/games/hangman/setup.c
+++ b/games/hangman/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.7 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: setup.c,v 1.8 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: setup.c,v 1.3 1995/03/23 08:32:59 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: setup.c,v 1.7 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: setup.c,v 1.8 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: setup.c,v 1.7 2003/06/03 03:01:40 millert Exp $
* Set up the strings on the screen.
*/
void
-setup()
+setup(void)
{
const char *const *sp;
static struct stat sbuf;
diff --git a/games/robots/init_field.c b/games/robots/init_field.c
index 92f1bf9db51..cd6890285ec 100644
--- a/games/robots/init_field.c
+++ b/games/robots/init_field.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_field.c,v 1.5 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: init_field.c,v 1.6 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: init_field.c,v 1.3 1995/04/22 10:08:52 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)init_field.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: init_field.c,v 1.5 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: init_field.c,v 1.6 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: init_field.c,v 1.5 2003/06/03 03:01:40 millert
* and initialize all the global variables.
*/
void
-init_field()
+init_field(void)
{
int i;
static bool first = TRUE;
diff --git a/games/robots/main.c b/games/robots/main.c
index 3bcdb9c3a87..c21a624983a 100644
--- a/games/robots/main.c
+++ b/games/robots/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.13 2003/06/03 03:01:40 millert Exp $ */
+/* $OpenBSD: main.c,v 1.14 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: main.c,v 1.5 1995/04/22 10:08:54 cgd Exp $ */
/*
@@ -40,23 +40,21 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.13 2003/06/03 03:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.14 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
#include "robots.h"
void
-usage()
+usage(void)
{
fprintf(stderr, "usage: robots [-sjtar] [scorefile]\n");
exit(1);
}
int
-main(ac, av)
- int ac;
- char **av;
+main(int ac, char *av[])
{
bool show_only;
extern char *Scorefile;
@@ -172,8 +170,7 @@ main(ac, av)
* Leave the program elegantly.
*/
void
-quit(dummy)
- int dummy;
+quit(int dummy)
{
endwin();
exit(0);
@@ -184,7 +181,7 @@ quit(dummy)
* See if another game is desired
*/
bool
-another()
+another(void)
{
int y;
diff --git a/games/robots/make_level.c b/games/robots/make_level.c
index 3c53e0ffb1d..12f2e4aa86c 100644
--- a/games/robots/make_level.c
+++ b/games/robots/make_level.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: make_level.c,v 1.5 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: make_level.c,v 1.6 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: make_level.c,v 1.3 1995/04/22 10:08:56 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)make_level.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: make_level.c,v 1.5 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: make_level.c,v 1.6 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: make_level.c,v 1.5 2003/06/03 03:01:41 millert
* Make the current level
*/
void
-make_level()
+make_level(void)
{
int i;
COORD *cp;
diff --git a/games/robots/move.c b/games/robots/move.c
index 0f25413c99a..73f7f6312d0 100644
--- a/games/robots/move.c
+++ b/games/robots/move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move.c,v 1.7 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: move.c,v 1.8 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: move.c,v 1.4 1995/04/22 10:08:58 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: move.c,v 1.7 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: move.c,v 1.8 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -47,7 +47,7 @@ static char rcsid[] = "$OpenBSD: move.c,v 1.7 2003/06/03 03:01:41 millert Exp $"
* Get and execute a move from the player
*/
void
-get_move()
+get_move(void)
{
int c;
int retval;
@@ -230,7 +230,7 @@ ret:
* being eaten?
*/
bool
-must_telep()
+must_telep(void)
{
int x, y;
static COORD newpos;
@@ -262,8 +262,7 @@ must_telep()
* Execute a move
*/
bool
-do_move(dy, dx)
- int dy, dx;
+do_move(int dy, int dx)
{
static COORD newpos;
@@ -298,8 +297,7 @@ do_move(dy, dx)
* Player would get eaten at this place
*/
bool
-eaten(pos)
- COORD *pos;
+eaten(COORD *pos)
{
int x, y;
@@ -321,7 +319,7 @@ eaten(pos)
* Reset the count variables
*/
void
-reset_count()
+reset_count(void)
{
Count = 0;
Running = FALSE;
@@ -334,7 +332,7 @@ reset_count()
* See if we are jumping, i.e., we should not refresh.
*/
bool
-jumping()
+jumping(void)
{
return (Jump && (Count || Running || Waiting));
}
diff --git a/games/robots/move_robs.c b/games/robots/move_robs.c
index 380b0fc5d7a..2c5a9ea5403 100644
--- a/games/robots/move_robs.c
+++ b/games/robots/move_robs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move_robs.c,v 1.6 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: move_robs.c,v 1.7 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: move_robs.c,v 1.3 1995/04/22 10:08:59 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)move_robs.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: move_robs.c,v 1.6 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: move_robs.c,v 1.7 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: move_robs.c,v 1.6 2003/06/03 03:01:41 millert E
* Move the robots around
*/
void
-move_robots()
+move_robots(void)
{
COORD *rp;
@@ -117,8 +117,7 @@ move_robots()
* Add a score to the overall point total
*/
void
-add_score(add)
- int add;
+add_score(int add)
{
Score += add;
move(Y_SCORE, X_SCORE);
@@ -130,8 +129,7 @@ add_score(add)
* Return the sign of the number
*/
int
-sign(n)
- int n;
+sign(int n)
{
if (n < 0)
return -1;
diff --git a/games/robots/play_level.c b/games/robots/play_level.c
index dbf3a88669a..f50eaef6f9c 100644
--- a/games/robots/play_level.c
+++ b/games/robots/play_level.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: play_level.c,v 1.7 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: play_level.c,v 1.8 2004/11/29 08:52:28 jsg Exp $ */
/* $NetBSD: play_level.c,v 1.3 1995/04/22 10:09:03 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)play_level.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: play_level.c,v 1.7 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: play_level.c,v 1.8 2004/11/29 08:52:28 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: play_level.c,v 1.7 2003/06/03 03:01:41 millert
* Let the player play the current level
*/
void
-play_level()
+play_level(void)
{
COORD *cp;
diff --git a/games/robots/query.c b/games/robots/query.c
index af509a2d1e0..498a8b7f5fb 100644
--- a/games/robots/query.c
+++ b/games/robots/query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: query.c,v 1.4 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: query.c,v 1.5 2004/11/29 08:52:29 jsg Exp $ */
/* $NetBSD: query.c,v 1.3 1995/04/22 10:09:05 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)query.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: query.c,v 1.4 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: query.c,v 1.5 2004/11/29 08:52:29 jsg Exp $";
#endif
#endif /* not lint */
@@ -45,8 +45,7 @@ static char rcsid[] = "$OpenBSD: query.c,v 1.4 2003/06/03 03:01:41 millert Exp $
* Ask a question and get a yes or no answer. Default is "no".
*/
int
-query(prompt)
- char *prompt;
+query(char *prompt)
{
int c, retval;
int y, x;
diff --git a/games/robots/rnd_pos.c b/games/robots/rnd_pos.c
index e98f4510d82..734abd6c19a 100644
--- a/games/robots/rnd_pos.c
+++ b/games/robots/rnd_pos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd_pos.c,v 1.3 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: rnd_pos.c,v 1.4 2004/11/29 08:52:29 jsg Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,7 +33,7 @@
#if 0
static char sccsid[] = "@(#)rnd_pos.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: rnd_pos.c,v 1.3 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: rnd_pos.c,v 1.4 2004/11/29 08:52:29 jsg Exp $";
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: rnd_pos.c,v 1.3 2003/06/03 03:01:41 millert Exp
* Pick a random, unoccupied position
*/
COORD *
-rnd_pos()
+rnd_pos(void)
{
static COORD pos;
static int call = 0;
@@ -61,8 +61,7 @@ rnd_pos()
}
int
-rnd(range)
- int range;
+rnd(int range)
{
return (int)random() % range;
}
diff --git a/games/robots/score.c b/games/robots/score.c
index f5edc656a1f..2e0ada5d168 100644
--- a/games/robots/score.c
+++ b/games/robots/score.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: score.c,v 1.8 2003/06/03 03:01:41 millert Exp $ */
+/* $OpenBSD: score.c,v 1.9 2004/11/29 08:52:29 jsg Exp $ */
/* $NetBSD: score.c,v 1.3 1995/04/22 10:09:12 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: score.c,v 1.8 2003/06/03 03:01:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: score.c,v 1.9 2004/11/29 08:52:29 jsg Exp $";
#endif
#endif /* not lint */
@@ -57,8 +57,7 @@ static SCORE Top[MAXSCORES];
* top list.
*/
void
-score(score_wfd)
- int score_wfd;
+score(int score_wfd)
{
int inf = score_wfd;
SCORE *scp;
@@ -137,8 +136,7 @@ score(score_wfd)
}
void
-set_name(scp)
- SCORE *scp;
+set_name(SCORE *scp)
{
PASSWD *pp;
@@ -152,8 +150,7 @@ set_name(scp)
* Compare two scores.
*/
int
-cmp_sc(s1, s2)
- const void *s1, *s2;
+cmp_sc(const void *s1, const void *s2)
{
return ((SCORE *)s2)->s_score - ((SCORE *)s1)->s_score;
}
@@ -163,7 +160,7 @@ cmp_sc(s1, s2)
* Show the score list for the '-s' option.
*/
void
-show_score()
+show_score(void)
{
SCORE *scp;
int inf;
diff --git a/games/worm/worm.c b/games/worm/worm.c
index acb965ba4ce..6353e3e0eb1 100644
--- a/games/worm/worm.c
+++ b/games/worm/worm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worm.c,v 1.21 2003/06/03 03:01:42 millert Exp $ */
+/* $OpenBSD: worm.c,v 1.22 2004/11/29 08:52:29 jsg Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: worm.c,v 1.21 2003/06/03 03:01:42 millert Exp $";
+static char rcsid[] = "$OpenBSD: worm.c,v 1.22 2004/11/29 08:52:29 jsg Exp $";
#endif
#endif /* not lint */
@@ -178,7 +178,7 @@ main(int argc, char **argv)
}
void
-life()
+life(void)
{
struct body *bp, *np;
int i,j = 1;
@@ -242,7 +242,7 @@ newpos(struct body *bp)
}
void
-prize()
+prize(void)
{
int value;
@@ -333,7 +333,7 @@ process(int ch)
}
struct body *
-newlink()
+newlink(void)
{
struct body *tmp;
@@ -345,7 +345,7 @@ newlink()
}
void
-crash()
+crash(void)
{
sleep(2);
clear();
@@ -362,7 +362,7 @@ suspend(int dummy)
}
void
-setup()
+setup(void)
{
clear();
refresh();
diff --git a/games/worms/worms.c b/games/worms/worms.c
index b8b51dd6f92..4448f2cdde1 100644
--- a/games/worms/worms.c
+++ b/games/worms/worms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worms.c,v 1.16 2004/01/08 20:38:29 millert Exp $ */
+/* $OpenBSD: worms.c,v 1.17 2004/11/29 08:52:29 jsg Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: worms.c,v 1.16 2004/01/08 20:38:29 millert Exp $";
+static char rcsid[] = "$OpenBSD: worms.c,v 1.17 2004/11/29 08:52:29 jsg Exp $";
#endif
#endif /* not lint */
@@ -183,9 +183,7 @@ void nomem(void);
void onsig(int);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int x, y, h, n;
struct worm *w;
@@ -341,14 +339,13 @@ main(argc, argv)
}
void
-onsig(signo)
- int signo;
+onsig(int signo)
{
sig_caught = 1;
}
void
-nomem()
+nomem(void)
{
errx(1, "not enough memory.");
}