Subject: bin/5867: [PATCH] Miscellaneous cleanup of games
To: None <gnats-bugs@gnats.netbsd.org>
From: Joseph Myers <jsm@octomino.demon.co.uk>
List: netbsd-bugs
Date: 07/28/1998 10:12:31
>Number: 5867
>Category: bin
>Synopsis: [PATCH] Miscellaneous cleanup of games
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 28 10:20:01 1998
>Last-Modified:
>Originator: Joseph Samuel Myers
>Organization:
Trinity College, University of Cambridge, UK
>Release: NetBSD-current of 1998-07-27
>Environment:
[
System: Linux octomino 2.0.35 #1 Tue Jul 14 19:09:50 UTC 1998 i586 unknown
Architecture: i586
]
>Description:
The appended patch contains various minor cleanups of the NetBSD games
(from the Linux port) that didn't seem to merit dividing into many
tiny patches.
Summary of changes:
* Use symbolic names for signal numbers and open(2) modes.
* Include some extra headers that should have been included: <time.h>
for time_t and time(2), <netinet/in.h> for htonl and friends, and
some others where appropriate.
* Declare some implicit int parameters.
* Make main() take no arguments where it doesn't use them.
* Conditionalise definitions of PI, and use higher precision values
(note that the previous value in atc/def.h was missing a digit).
* Some other minor self-explanatory changes.
* A few trivial bug and typo fixes.
Note: I am aware that the change to mille/mille.h is dubious, but
prototypes using non-promoted types seem to be the convention
elsewhere in the games, although they are a GCC extension.
Please apply whatever parts are deemed appropriate for NetBSD, and let
me know what parts are deemed inappropriate.
>How-To-Repeat:
>Fix:
diff -ruN netbsd-games/adventure/extern.h netbsd-games+cleanup/adventure/extern.h
--- netbsd-games/adventure/extern.h Sat Oct 11 11:49:19 1997
+++ netbsd-games+cleanup/adventure/extern.h Tue Jul 28 09:16:31 1998
@@ -74,9 +74,6 @@
int save __P((char *));
int restore __P((char *));
-/* setup.c */
-int main __P((int, char *[]));
-
/* subr.c */
int toting __P((int));
int here __P((int));
diff -ruN netbsd-games/adventure/setup.c netbsd-games+cleanup/adventure/setup.c
--- netbsd-games/adventure/setup.c Sat Oct 11 11:49:25 1997
+++ netbsd-games+cleanup/adventure/setup.c Tue Jul 28 09:20:13 1998
@@ -64,6 +64,8 @@
#define SIG2 " * Sterday, 6 Thrimidge S.R. 1993, 15:24"
#include <stdio.h>
+#include <stdlib.h>
+#include <err.h>
#include "hdr.h" /* SEED lives in there; keep them coordinated. */
#define USAGE "Usage: setup file > data.c (file is typically glorkz)\n"
@@ -73,6 +75,8 @@
#define LINE 10 /* How many values do we get on a line? */
+int main __P((int, char *[]));
+
int
main(argc, argv)
int argc;
@@ -97,7 +101,8 @@
while ((c = getc(infile)) != EOF) {
if (linestart && c == ' ') { /* Convert first spaces to tab */
- printf("0x%02x,", ('\t' ^ random()) & 0xFF);
+ printf("0x%02x,",
+ (unsigned int)(('\t' ^ random()) & 0xFF));
while ((c = getc(infile)) == ' ' && c != EOF);
/* Drop the non-whitespace character through */
linestart = NO;
@@ -113,7 +118,7 @@
}
if (count++ % LINE == 0) /* Finished a line? */
printf("\n\t");
- printf("0x%02x,", (c ^ random()) & 0xFF);
+ printf("0x%02x,", (unsigned int)((c ^ random()) & 0xFF));
}
puts("\n\t0\n};");
fclose(infile);
diff -ruN netbsd-games/adventure/subr.c netbsd-games+cleanup/adventure/subr.c
--- netbsd-games/adventure/subr.c Sat Oct 11 11:49:26 1997
+++ netbsd-games+cleanup/adventure/subr.c Tue Jul 28 09:21:17 1998
@@ -93,6 +93,7 @@
int
liq(foo)
+ int foo;
{
int i;
i = prop[bottle];
@@ -134,6 +135,7 @@
int
dark(foo)
+ int foo;
{
if ((cond[loc] % 2) == 0 && (prop[lamp] == 0 || !here(lamp)))
return (TRUE);
diff -ruN netbsd-games/adventure/wizard.c netbsd-games+cleanup/adventure/wizard.c
--- netbsd-games/adventure/wizard.c Sat Jul 25 11:06:19 1998
+++ netbsd-games+cleanup/adventure/wizard.c Tue Jul 28 09:21:43 1998
@@ -87,6 +87,7 @@
int
Start(n)
+ int n;
{
int d, t, delay;
diff -ruN netbsd-games/atc/def.h netbsd-games+cleanup/atc/def.h
--- netbsd-games/atc/def.h Fri Oct 13 23:55:33 1995
+++ netbsd-games+cleanup/atc/def.h Tue Jul 28 09:22:39 1998
@@ -49,7 +49,9 @@
#define AUTHOR_STR "ATC - by Ed James"
-#define PI 3.14159654
+#ifndef PI
+#define PI 3.14159265358979323846
+#endif
#define LOWFUEL 15
diff -ruN netbsd-games/atc/update.c netbsd-games+cleanup/atc/update.c
--- netbsd-games/atc/update.c Fri Oct 10 11:21:48 1997
+++ netbsd-games+cleanup/atc/update.c Tue Jul 28 09:23:04 1998
@@ -377,6 +377,7 @@
PLANE *
findplane(n)
+ int n;
{
PLANE *pp;
diff -ruN netbsd-games/backgammon/backgammon/main.c netbsd-games+cleanup/backgammon/backgammon/main.c
--- netbsd-games/backgammon/backgammon/main.c Sun Mar 29 12:13:44 1998
+++ netbsd-games+cleanup/backgammon/backgammon/main.c Tue Jul 28 09:24:29 1998
@@ -50,6 +50,8 @@
#include "back.h"
#include "backlocal.h"
+#include <time.h>
+
#define MVPAUSE 5 /* time to sleep when stuck */
#define MAXUSERS 35 /* maximum number of users */
@@ -112,7 +114,7 @@
/* initialization */
bflag = 2; /* default no board */
- signal(2, getout); /* trap interrupts */
+ signal(SIGINT, getout); /* trap interrupts */
if (tcgetattr(0, &old) == -1) /* get old tty mode */
errexit("backgammon(gtty)");
noech = old;
@@ -212,7 +214,7 @@
else
writec('\n');
writel("Password:");
- signal(14, getout);
+ signal(SIGALRM, getout);
cflag = 1;
alarm(10);
for (i = 0; i < 10; i++) {
diff -ruN netbsd-games/backgammon/common_source/back.h netbsd-games+cleanup/backgammon/common_source/back.h
--- netbsd-games/backgammon/common_source/back.h Tue Oct 14 11:09:11 1997
+++ netbsd-games+cleanup/backgammon/common_source/back.h Tue Jul 28 09:25:38 1998
@@ -47,6 +47,10 @@
#include <termcap.h>
#include <unistd.h>
+#ifndef OXTABS
+#define OXTABS XTABS
+#endif
+
#define rnum(r) (random()%r)
#define D0 dice[0]
#define D1 dice[1]
diff -ruN netbsd-games/backgammon/common_source/subs.c netbsd-games+cleanup/backgammon/common_source/subs.c
--- netbsd-games/backgammon/common_source/subs.c Fri Oct 10 11:22:13 1997
+++ netbsd-games+cleanup/backgammon/common_source/subs.c Tue Jul 28 09:25:50 1998
@@ -342,7 +342,7 @@
args[acnt++] = 'n';
break;
- /* player is both read and white */
+ /* player is both red and white */
case 'b':
if (rflag)
break;
diff -ruN netbsd-games/battlestar/battlestar.c netbsd-games+cleanup/battlestar/battlestar.c
--- netbsd-games/battlestar/battlestar.c Sat Oct 11 11:50:04 1997
+++ netbsd-games+cleanup/battlestar/battlestar.c Tue Jul 28 09:27:26 1998
@@ -95,6 +95,6 @@
case 0:
goto start;
default:
- exit(0);
+ exit(1); /* Shouldn't happen */
}
}
diff -ruN netbsd-games/bcd/bcd.6 netbsd-games+cleanup/bcd/bcd.6
--- netbsd-games/bcd/bcd.6 Fri Oct 10 11:22:45 1997
+++ netbsd-games+cleanup/bcd/bcd.6 Tue Jul 28 09:27:57 1998
@@ -54,7 +54,7 @@
.Nm ppt
and
.Nm morse
-commands read the given input and reformats it in the form of
+commands read the given input and reformat it in the form of
punched cards, paper tape or morse code respectively.
Acceptable input are command line arguments or the standard input.
.Pp
diff -ruN netbsd-games/boggle/boggle/extern.h netbsd-games+cleanup/boggle/boggle/extern.h
--- netbsd-games/boggle/boggle/extern.h Fri Oct 13 23:57:28 1995
+++ netbsd-games+cleanup/boggle/boggle/extern.h Tue Jul 28 09:28:12 1998
@@ -35,6 +35,8 @@
* @(#)extern.h 8.1 (Berkeley) 6/11/93
*/
+#include <time.h>
+
void addword __P((char *));
void badword __P((void));
char *batchword __P((FILE *));
diff -ruN netbsd-games/boggle/mkdict/mkdict.c netbsd-games+cleanup/boggle/mkdict/mkdict.c
--- netbsd-games/boggle/mkdict/mkdict.c Sat Oct 11 11:50:46 1997
+++ netbsd-games+cleanup/boggle/mkdict/mkdict.c Tue Jul 28 09:29:11 1998
@@ -59,11 +59,14 @@
*/
#include <ctype.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bog.h"
+
+int main __P((int, char *[]));
int
main(argc, argv)
diff -ruN netbsd-games/boggle/mkindex/mkindex.c netbsd-games+cleanup/boggle/mkindex/mkindex.c
--- netbsd-games/boggle/mkindex/mkindex.c Sat Oct 11 11:50:49 1997
+++ netbsd-games+cleanup/boggle/mkindex/mkindex.c Tue Jul 28 09:29:59 1998
@@ -51,15 +51,15 @@
#endif /* not lint */
#include <stdio.h>
+#include <stdlib.h>
#include "bog.h"
+int main __P((void));
char *nextword __P((FILE *, char *, int *, int *));
int
-main(argc, argv)
- int argc;
- char *argv[];
+main()
{
int clen, rlen, prev;
long off, start;
diff -ruN netbsd-games/canfield/canfield/canfield.c netbsd-games+cleanup/canfield/canfield/canfield.c
--- netbsd-games/canfield/canfield/canfield.c Sat Oct 11 11:51:03 1997
+++ netbsd-games+cleanup/canfield/canfield/canfield.c Tue Jul 28 09:31:47 1998
@@ -67,7 +67,7 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
-#include <termios.h>
+#include <time.h>
#include <unistd.h>
#include "pathnames.h"
@@ -219,7 +219,7 @@
void initdeck __P((struct cardtype *[]));
void initgame __P((void));
void instruct __P((void));
-int main __P((int, char *[]));
+int main __P((void));
void makeboard __P((void));
void movebox __P((void));
void movecard __P((void));
@@ -1682,7 +1682,7 @@
uid = getuid();
if (uid < 0)
uid = 0;
- dbfd = open(_PATH_SCORE, 2);
+ dbfd = open(_PATH_SCORE, O_RDWR);
if (dbfd < 0)
return;
i = lseek(dbfd, uid * sizeof(struct betinfo), 0);
@@ -1783,9 +1783,7 @@
* Can you tell that this used to be a Pascal program?
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main()
{
#ifdef MAXLOAD
double vec[3];
diff -ruN netbsd-games/canfield/cfscores/cfscores.c netbsd-games+cleanup/canfield/cfscores/cfscores.c
--- netbsd-games/canfield/cfscores/cfscores.c Sat Oct 11 11:51:07 1997
+++ netbsd-games+cleanup/canfield/cfscores/cfscores.c Tue Jul 28 09:33:48 1998
@@ -83,7 +83,7 @@
printf("Usage: cfscores [user]\n");
exit(1);
}
- dbfd = open(_PATH_SCORE, 0);
+ dbfd = open(_PATH_SCORE, O_RDONLY);
if (dbfd < 0)
err(2, "open %s", _PATH_SCORE);
setpwent();
diff -ruN netbsd-games/fortune/fortune/fortune.c netbsd-games+cleanup/fortune/fortune/fortune.c
--- netbsd-games/fortune/fortune/fortune.c Wed Feb 4 12:18:23 1998
+++ netbsd-games+cleanup/fortune/fortune/fortune.c Tue Jul 28 09:35:26 1998
@@ -62,6 +62,8 @@
# include <stdlib.h>
# include <string.h>
# include <err.h>
+# include <time.h>
+# include <netinet/in.h>
# include "strfile.h"
# include "pathnames.h"
diff -ruN netbsd-games/fortune/strfile/strfile.c netbsd-games+cleanup/fortune/strfile/strfile.c
--- netbsd-games/fortune/strfile/strfile.c Sat Oct 11 11:52:00 1997
+++ netbsd-games+cleanup/fortune/strfile/strfile.c Tue Jul 28 09:36:21 1998
@@ -58,6 +58,8 @@
# include <stdlib.h>
# include <string.h>
# include <unistd.h>
+# include <netinet/in.h>
+# include <time.h>
# include "strfile.h"
# ifndef MAXPATHLEN
diff -ruN netbsd-games/fortune/unstr/unstr.c netbsd-games+cleanup/fortune/unstr/unstr.c
--- netbsd-games/fortune/unstr/unstr.c Sat Oct 11 11:52:08 1997
+++ netbsd-games+cleanup/fortune/unstr/unstr.c Tue Jul 28 09:37:08 1998
@@ -70,6 +70,7 @@
# include <err.h>
# include <stdio.h>
# include <string.h>
+# include <netinet/in.h>
# include "strfile.h"
# ifndef MAXPATHLEN
diff -ruN netbsd-games/hangman/hangman.h netbsd-games+cleanup/hangman/hangman.h
--- netbsd-games/hangman/hangman.h Sat Oct 11 11:52:34 1997
+++ netbsd-games+cleanup/hangman/hangman.h Tue Jul 28 09:37:23 1998
@@ -83,7 +83,7 @@
void die __P((int));
void endgame __P((void));
-int main __P((int, char **));
+int main __P((void));
void getguess __P((void));
void getword __P((void));
void playgame __P((void));
diff -ruN netbsd-games/hangman/main.c netbsd-games+cleanup/hangman/main.c
--- netbsd-games/hangman/main.c Sat Oct 11 11:52:36 1997
+++ netbsd-games+cleanup/hangman/main.c Tue Jul 28 09:37:48 1998
@@ -53,9 +53,7 @@
* This game written by Ken Arnold.
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main()
{
initscr();
signal(SIGINT, die);
diff -ruN netbsd-games/hangman/setup.c netbsd-games+cleanup/hangman/setup.c
--- netbsd-games/hangman/setup.c Sat Oct 11 11:52:41 1997
+++ netbsd-games+cleanup/hangman/setup.c Tue Jul 28 09:38:27 1998
@@ -43,6 +43,7 @@
#endif /* not lint */
#include <err.h>
+#include <time.h>
#include "hangman.h"
/*
diff -ruN netbsd-games/hunt/huntd/hunt.h netbsd-games+cleanup/hunt/huntd/hunt.h
--- netbsd-games/hunt/huntd/hunt.h Tue Jan 13 12:23:07 1998
+++ netbsd-games+cleanup/hunt/huntd/hunt.h Tue Jul 28 09:39:08 1998
@@ -260,7 +260,6 @@
# else
typedef struct sockaddr_un SOCKET;
# endif
-typedef struct sgttyb TTYB;
struct ident_def {
char i_name[NAMELEN];
diff -ruN netbsd-games/mille/mille.h netbsd-games+cleanup/mille/mille.h
--- netbsd-games/mille/mille.h Mon Jul 27 11:06:00 1998
+++ netbsd-games+cleanup/mille/mille.h Tue Jul 28 09:39:22 1998
@@ -249,7 +249,7 @@
int playcard __P((PLAY *));
void prboard __P((void));
void prompt __P((int));
-void prscore __P((int));
+void prscore __P((bool));
int readch __P((void));
bool rest_f __P((char *));
int roll __P((int, int));
diff -ruN netbsd-games/mille/save.c netbsd-games+cleanup/mille/save.c
--- netbsd-games/mille/save.c Sun Oct 12 11:25:54 1997
+++ netbsd-games+cleanup/mille/save.c Tue Jul 28 09:40:15 1998
@@ -52,6 +52,8 @@
# include <term.h>
# endif attron
+#include <time.h>
+
/*
* @(#)save.c 1.2 (Berkeley) 3/28/83
*/
diff -ruN netbsd-games/monop/execute.c netbsd-games+cleanup/monop/execute.c
--- netbsd-games/monop/execute.c Mon Oct 13 11:25:39 1997
+++ netbsd-games+cleanup/monop/execute.c Tue Jul 28 09:40:35 1998
@@ -249,7 +249,7 @@
char *start, *end;
STAT sbuf;
- if ((inf=open(file, 0)) < 0) {
+ if ((inf=open(file, O_RDONLY)) < 0) {
perror(file);
return FALSE;
}
diff -ruN netbsd-games/monop/monop.c netbsd-games+cleanup/monop/monop.c
--- netbsd-games/monop/monop.c Mon Oct 13 11:25:43 1997
+++ netbsd-games+cleanup/monop/monop.c Tue Jul 28 09:41:08 1998
@@ -80,7 +80,7 @@
}
num_luck = sizeof lucky_mes / sizeof (char *);
init_decks();
- signal(2, do_quit);
+ signal(SIGINT, do_quit);
for (;;) {
printf("\n%s (%d) (cash $%d) on %s\n", cur_p->name, player + 1,
cur_p->money, board[cur_p->loc].name);
diff -ruN netbsd-games/phantasia/setup.c netbsd-games+cleanup/phantasia/setup.c
--- netbsd-games/phantasia/setup.c Tue Jan 13 12:23:13 1998
+++ netbsd-games+cleanup/phantasia/setup.c Tue Jul 28 09:43:05 1998
@@ -5,7 +5,13 @@
*/
#include <sys/param.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include "include.h"
+
+int main __P((int, char *[]));
+void Error __P((char *, char *));
+double drandom __P((void));
+
/**/
/************************************************************************
/
@@ -234,6 +240,7 @@
/
/************************************************************************/
+void
Error(str, file)
char *str, *file;
{
diff -ruN netbsd-games/pom/pom.c netbsd-games+cleanup/pom/pom.c
--- netbsd-games/pom/pom.c Sat Jul 25 11:06:29 1998
+++ netbsd-games+cleanup/pom/pom.c Tue Jul 28 09:43:42 1998
@@ -68,7 +68,9 @@
#include <stdlib.h>
#include <tzfile.h>
-#define PI 3.141592654
+#ifndef PI
+#define PI 3.14159265358979323846
+#endif
#define EPOCH 85 /* really 1985 */
#define EPSILONg 279.611371 /* solar ecliptic long at EPOCH */
#define RHOg 282.680403 /* solar ecliptic long of perigee at EPOCH */
diff -ruN netbsd-games/rogue/monster.c netbsd-games+cleanup/rogue/monster.c
--- netbsd-games/rogue/monster.c Tue Jul 21 11:05:10 1998
+++ netbsd-games+cleanup/rogue/monster.c Tue Jul 28 09:45:49 1998
@@ -868,6 +868,7 @@
boolean
mon_sees(monster, row, col)
object *monster;
+ int row, col;
{
short rn, rdif, cdif, retval;
diff -ruN netbsd-games/rogue/object.c netbsd-games+cleanup/rogue/object.c
--- netbsd-games/rogue/object.c Wed Oct 15 14:58:42 1997
+++ netbsd-games+cleanup/rogue/object.c Tue Jul 28 09:46:14 1998
@@ -239,6 +239,7 @@
void
place_at(obj, row, col)
object *obj;
+ int row, col;
{
obj->row = row;
obj->col = col;
@@ -268,6 +269,7 @@
object *
get_letter_object(ch)
+ int ch;
{
object *obj;
diff -ruN netbsd-games/rogue/pack.c netbsd-games+cleanup/rogue/pack.c
--- netbsd-games/rogue/pack.c Mon Oct 13 11:27:08 1997
+++ netbsd-games+cleanup/rogue/pack.c Tue Jul 28 09:46:44 1998
@@ -64,6 +64,7 @@
object *
add_to_pack(obj, pack, condense)
object *obj, *pack;
+ int condense;
{
object *op;
@@ -105,6 +106,7 @@
object *
pick_up(row, col, status)
+ int row, col;
short *status;
{
object *obj;
diff -ruN netbsd-games/rogue/room.c netbsd-games+cleanup/rogue/room.c
--- netbsd-games/rogue/room.c Mon Oct 13 11:27:15 1997
+++ netbsd-games+cleanup/rogue/room.c Tue Jul 28 09:47:34 1998
@@ -131,6 +131,7 @@
void
light_passage(row, col)
+ int row, col;
{
short i, j, i_end, j_end;
diff -ruN netbsd-games/sail/dr_2.c netbsd-games+cleanup/sail/dr_2.c
--- netbsd-games/sail/dr_2.c Sat Jul 25 11:06:33 1998
+++ netbsd-games+cleanup/sail/dr_2.c Tue Jul 28 09:48:20 1998
@@ -237,7 +237,7 @@
void
try(command, temp, ma, ta, af, vma, dir, f, t, high, rakeme)
struct ship *f, *t;
-int ma, ta, af, *high, rakeme;
+int ma, ta, af, vma, dir, *high, rakeme;
char command[], temp[];
{
int new, n;
diff -ruN netbsd-games/sail/sync.c netbsd-games+cleanup/sail/sync.c
--- netbsd-games/sail/sync.c Sun Mar 29 12:14:02 1998
+++ netbsd-games+cleanup/sail/sync.c Tue Jul 28 09:48:57 1998
@@ -53,6 +53,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <time.h>
#include "extern.h"
#define BUFSIZE 4096
@@ -150,6 +151,7 @@
}
int
sync_exists(game)
+ int game;
{
char buf[sizeof sync_file];
struct stat s;
diff -ruN netbsd-games/snake/snake/move.c netbsd-games+cleanup/snake/snake/move.c
--- netbsd-games/snake/snake/move.c Tue Oct 14 11:09:49 1997
+++ netbsd-games+cleanup/snake/snake/move.c Tue Jul 28 09:52:29 1998
@@ -102,7 +102,14 @@
#else
#include <varargs.h>
#endif
+#include <unistd.h> /* For _POSIX_VDISABLE */
#include "snake.h"
+#ifndef CTRL
+#define CTRL(X) ((X) & 037)
+#endif
+#ifndef OXTABS
+#define OXTABS XTABS
+#endif
int CMlength;
int NDlength;
@@ -701,7 +708,9 @@
signal(SIGINT, stop);
ospeed = cfgetospeed(&orig);
new.c_cc[VSUSP] = _POSIX_VDISABLE;
+#ifdef VDSUSP
new.c_cc[VDSUSP] = _POSIX_VDISABLE;
+#endif
raw();
if (orig.c_oflag & OXTABS)
diff -ruN netbsd-games/snake/snake/snake.c netbsd-games+cleanup/snake/snake/snake.c
--- netbsd-games/snake/snake/snake.c Sun Oct 12 11:26:28 1997
+++ netbsd-games+cleanup/snake/snake/snake.c Tue Jul 28 09:54:05 1998
@@ -70,6 +70,10 @@
#include "snake.h"
#include "pathnames.h"
+#ifndef CTRL
+#define CTRL(X) ((X) & 037)
+#endif
+
#define PENALTY 10 /* % penalty for invoking spacewarp */
#define EOT '\004'
@@ -83,6 +87,9 @@
#define GOAL '#'
#define BSIZE 80
+
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
struct point you;
struct point money;
diff -ruN netbsd-games/snake/snscore/snscore.c netbsd-games+cleanup/snake/snscore/snscore.c
--- netbsd-games/snake/snscore/snscore.c Mon Jul 27 11:06:04 1998
+++ netbsd-games+cleanup/snake/snscore/snscore.c Tue Jul 28 09:54:35 1998
@@ -64,12 +64,10 @@
char *name;
} players[MAXPLAYERS], temp;
-int main __P((int, char **));
+int main __P((void));
int
-main(argc, argv)
- int argc;
- char *argv[];
+main()
{
short uid, score;
FILE *fd;
diff -ruN netbsd-games/tetris/screen.c netbsd-games+cleanup/tetris/screen.c
--- netbsd-games/tetris/screen.c Tue Oct 14 11:09:51 1997
+++ netbsd-games+cleanup/tetris/screen.c Tue Jul 28 09:55:19 1998
@@ -60,6 +60,10 @@
#include "screen.h"
#include "tetris.h"
+#ifndef OXTABS
+#define OXTABS XTABS
+#endif
+
static cell curscreen[B_SIZE]; /* 1 => standout (or otherwise marked) */
static int curscore;
static int isset; /* true => terminal is in game mode */
diff -ruN netbsd-games/trek/dumpgame.c netbsd-games+cleanup/trek/dumpgame.c
--- netbsd-games/trek/dumpgame.c Mon Oct 13 11:27:38 1997
+++ netbsd-games+cleanup/trek/dumpgame.c Tue Jul 28 09:55:51 1998
@@ -130,7 +130,7 @@
int fd;
int version;
- if ((fd = open("trek.dump", 0)) < 0 ||
+ if ((fd = open("trek.dump", O_RDONLY)) < 0 ||
read(fd, &version, sizeof version) != sizeof version ||
version != VERSION ||
readdump(fd))
diff -ruN netbsd-games/trek/warp.c netbsd-games+cleanup/trek/warp.c
--- netbsd-games/trek/warp.c Tue Oct 14 11:09:57 1997
+++ netbsd-games+cleanup/trek/warp.c Tue Jul 28 09:56:18 1998
@@ -67,6 +67,7 @@
void
dowarp(fl)
+ int fl;
{
int c;
double d;
diff -ruN netbsd-games/wump/wump.c netbsd-games+cleanup/wump/wump.c
--- netbsd-games/wump/wump.c Sun Oct 12 11:26:47 1997
+++ netbsd-games+cleanup/wump/wump.c Tue Jul 28 09:56:56 1998
@@ -62,6 +62,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include "pathnames.h"
>Audit-Trail:
>Unformatted: