Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/boggle/boggle fix nested extern
details: https://anonhg.NetBSD.org/src/rev/b2be23586c14
branches: trunk
changeset: 503354:b2be23586c14
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 05 00:27:35 2001 +0000
description:
fix nested extern
diffstat:
games/boggle/boggle/help.c | 6 +++---
games/boggle/boggle/mach.c | 15 ++++++---------
games/boggle/boggle/timer.c | 11 ++++++-----
games/boggle/boggle/word.c | 9 +++++----
4 files changed, 20 insertions(+), 21 deletions(-)
diffs (177 lines):
diff -r 9e5495fc6efb -r b2be23586c14 games/boggle/boggle/help.c
--- a/games/boggle/boggle/help.c Mon Feb 05 00:23:59 2001 +0000
+++ b/games/boggle/boggle/help.c Mon Feb 05 00:27:35 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: help.c,v 1.3 1997/10/10 12:04:26 lukem Exp $ */
+/* $NetBSD: help.c,v 1.4 2001/02/05 00:27:35 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)help.c 8.1 (Berkeley) 6/11/93";
#else
-__RCSID("$NetBSD: help.c,v 1.3 1997/10/10 12:04:26 lukem Exp $");
+__RCSID("$NetBSD: help.c,v 1.4 2001/02/05 00:27:35 christos Exp $");
#endif
#endif /* not lint */
@@ -51,10 +51,10 @@
#include "bog.h"
#include "extern.h"
+extern int nlines;
int
help()
{
- extern int nlines;
int eof, i;
FILE *fp;
WINDOW *win;
diff -r 9e5495fc6efb -r b2be23586c14 games/boggle/boggle/mach.c
--- a/games/boggle/boggle/mach.c Mon Feb 05 00:23:59 2001 +0000
+++ b/games/boggle/boggle/mach.c Mon Feb 05 00:27:35 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mach.c,v 1.10 1999/09/08 21:45:26 jsm Exp $ */
+/* $NetBSD: mach.c,v 1.11 2001/02/05 00:27:35 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
-__RCSID("$NetBSD: mach.c,v 1.10 1999/09/08 21:45:26 jsm Exp $");
+__RCSID("$NetBSD: mach.c,v 1.11 2001/02/05 00:27:35 christos Exp $");
#endif
#endif /* not lint */
@@ -72,6 +72,10 @@
extern const char *pword[], *mword[];
extern int ngames, nmwords, npwords, tnmwords, tnpwords;
+extern char board[];
+extern int usedbits, wordpath[];
+extern time_t start_t;
+extern int debug;
static void cont_catcher __P((int));
static int prwidth __P((const char *const [], int));
@@ -91,8 +95,6 @@
int sflag;
time_t seed;
{
- extern int debug;
-
if (tty_setup() < 0)
return(-1);
@@ -293,7 +295,6 @@
void
stoptime()
{
- extern time_t start_t;
time_t t;
(void)time(&t);
@@ -306,7 +307,6 @@
void
starttime()
{
- extern time_t start_t;
time_t t;
(void)time(&t);
@@ -408,9 +408,6 @@
{
int c, col, found, i, r, row;
char buf[MAXWORDLEN + 1];
- extern char board[];
- extern int usedbits, wordpath[];
- extern int nmwords, npwords;
getyx(stdscr, r, c);
getword(buf);
diff -r 9e5495fc6efb -r b2be23586c14 games/boggle/boggle/timer.c
--- a/games/boggle/boggle/timer.c Mon Feb 05 00:23:59 2001 +0000
+++ b/games/boggle/boggle/timer.c Mon Feb 05 00:27:35 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.4 1997/10/10 12:04:36 lukem Exp $ */
+/* $NetBSD: timer.c,v 1.5 2001/02/05 00:27:35 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)timer.c 8.2 (Berkeley) 2/22/94";
#else
-__RCSID("$NetBSD: timer.c,v 1.4 1997/10/10 12:04:36 lukem Exp $");
+__RCSID("$NetBSD: timer.c,v 1.5 2001/02/05 00:27:35 christos Exp $");
#endif
#endif /* not lint */
@@ -59,6 +59,10 @@
static int waitch __P((long));
+extern int tlimit;
+extern time_t start_t;
+extern jmp_buf env;
+
/*
* Update the display of the remaining time while waiting for a character
* If time runs out do a longjmp() to the game controlling routine, returning
@@ -68,9 +72,6 @@
int
timerch()
{
- extern int tlimit;
- extern time_t start_t;
- extern jmp_buf env;
time_t prevt, t;
int col, remaining, row;
diff -r 9e5495fc6efb -r b2be23586c14 games/boggle/boggle/word.c
--- a/games/boggle/boggle/word.c Mon Feb 05 00:23:59 2001 +0000
+++ b/games/boggle/boggle/word.c Mon Feb 05 00:27:35 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: word.c,v 1.5 1999/09/08 21:17:45 jsm Exp $ */
+/* $NetBSD: word.c,v 1.6 2001/02/05 00:27:35 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)word.c 8.1 (Berkeley) 6/11/93";
#else
-__RCSID("$NetBSD: word.c,v 1.5 1999/09/08 21:17:45 jsm Exp $");
+__RCSID("$NetBSD: word.c,v 1.6 2001/02/05 00:27:35 christos Exp $");
#endif
#endif /* not lint */
@@ -61,6 +61,9 @@
static int first = 1, lastch = 0;
+extern struct dictindex dictindex[];
+extern int wordlen;
+
/*
* Return the next word in the compressed dictionary in 'buffer' or
* NULL on end-of-file
@@ -69,7 +72,6 @@
nextword(fp)
FILE *fp;
{
- extern int wordlen;
int ch, pcount;
char *p;
static char buf[MAXWORDLEN + 1];
@@ -193,7 +195,6 @@
int i, j;
char buf[BUFSIZ];
FILE *fp;
- extern struct dictindex dictindex[];
if ((fp = fopen(indexfile, "r")) == NULL) {
warn("Can't open '%s'", indexfile);
Home |
Main Index |
Thread Index |
Old Index