summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjanzen <pjanzen@openbsd.org>2001-02-04 06:07:20 +0000
committerpjanzen <pjanzen@openbsd.org>2001-02-04 06:07:20 +0000
commitdffd38b53037a89f7a3c8221c01935491cf6d203 (patch)
tree73d29fa875a973817cd32324f1b3ad1519fa96ed
parentPut KNF in the NAME field so apropos/man -k will find it. (diff)
downloadwireguard-openbsd-dffd38b53037a89f7a3c8221c01935491cf6d203.tar.xz
wireguard-openbsd-dffd38b53037a89f7a3c8221c01935491cf6d203.zip
Remove -traditional-cpp and do some -Wall cleanups; from Chris K. Young
<cky@pobox.com> in PR 1652.
-rw-r--r--games/adventure/Makefile3
-rw-r--r--games/adventure/extern.h4
-rw-r--r--games/adventure/hdr.h6
-rw-r--r--games/adventure/main.c5
-rw-r--r--games/adventure/vocab.c6
5 files changed, 14 insertions, 10 deletions
diff --git a/games/adventure/Makefile b/games/adventure/Makefile
index bea33c846a8..06a19846751 100644
--- a/games/adventure/Makefile
+++ b/games/adventure/Makefile
@@ -1,9 +1,8 @@
-# $OpenBSD: Makefile,v 1.3 1997/09/21 11:35:13 deraadt Exp $
+# $OpenBSD: Makefile,v 1.4 2001/02/04 06:07:20 pjanzen Exp $
PROG= adventure
SRCS= main.c init.c done.c save.c subr.c vocab.c wizard.c io.c data.c crc.c
MAN= adventure.6
-CFLAGS+=-traditional-cpp
HIDEGAME=hidegame
CLEANFILES+=setup data.c
diff --git a/games/adventure/extern.h b/games/adventure/extern.h
index df6e82873a5..4dc071a4e2b 100644
--- a/games/adventure/extern.h
+++ b/games/adventure/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.2 1998/09/02 06:36:07 pjanzen Exp $ */
+/* $OpenBSD: extern.h,v 1.3 2001/02/04 06:07:20 pjanzen Exp $ */
/* $NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $ */
/*
@@ -88,7 +88,7 @@ int liq __P((void));
int liqloc __P((int));
int bitset __P((int, int));
int forced __P((int));
-int dark __P((int));
+int dark __P((void));
int pct __P((int));
int fdwarf __P((void));
int march __P((void));
diff --git a/games/adventure/hdr.h b/games/adventure/hdr.h
index 638d3ce28dc..a0aa83bace2 100644
--- a/games/adventure/hdr.h
+++ b/games/adventure/hdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdr.h,v 1.6 1998/08/31 02:29:38 pjanzen Exp $ */
+/* $OpenBSD: hdr.h,v 1.7 2001/02/04 06:07:20 pjanzen Exp $ */
/* $NetBSD: hdr.h,v 1.2 1995/03/21 12:05:02 cgd Exp $ */
/*-
@@ -163,4 +163,8 @@ int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */
int demo, newloc, limit;
/* We need to get a little tricky to avoid strings */
+#ifdef __STDC__
+#define DECR(a,b,c,d,e) decr(*#a+'+',*#b+'-',*#c+'#',*#d+'&',*#e+'%')
+#else
#define DECR(a,b,c,d,e) decr('a'+'+','b'+'-','c'+'#','d'+'&','e'+'%')
+#endif
diff --git a/games/adventure/main.c b/games/adventure/main.c
index f761ef3d63c..73304326ba6 100644
--- a/games/adventure/main.c
+++ b/games/adventure/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.10 1998/11/29 19:45:10 pjanzen Exp $ */
+/* $OpenBSD: main.c,v 1.11 2001/02/04 06:07:20 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.5 1996/05/21 21:53:09 mrg Exp $ */
/*-
@@ -49,13 +49,14 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.10 1998/11/29 19:45:10 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.11 2001/02/04 06:07:20 pjanzen Exp $";
#endif
#endif /* not lint */
/* Re-coding of advent in C: main program */
#include <sys/file.h>
+#include <err.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/games/adventure/vocab.c b/games/adventure/vocab.c
index e936f484698..bc9a16d8e74 100644
--- a/games/adventure/vocab.c
+++ b/games/adventure/vocab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vocab.c,v 1.7 1998/11/29 19:45:10 pjanzen Exp $ */
+/* $OpenBSD: vocab.c,v 1.8 2001/02/04 06:07:20 pjanzen Exp $ */
/* $NetBSD: vocab.c,v 1.2 1995/03/21 12:05:13 cgd Exp $ */
/*-
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: vocab.c,v 1.7 1998/11/29 19:45:10 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: vocab.c,v 1.8 2001/02/04 06:07:20 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -142,7 +142,7 @@ drop(object, where)
int
vocab(word, type, value) /* look up or store a word */
- char *word;
+ const char *word;
int type; /* -2 for store, -1 for user word, >=0 for canned lookup*/
int value; /* used for storing only */
{