summaryrefslogtreecommitdiffstats
path: root/adventure/extern.h
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1998-08-24 22:26:23 +0000
committerhubertf <hubertf@NetBSD.org>1998-08-24 22:26:23 +0000
commitbef8f7c3aec4ed6171f8556971ab2db22014529f (patch)
treea463dabca1d8adf1dd19bdf4e1b36cc897c5b59e /adventure/extern.h
parentc250b38eecd6008a0ff88680314da5f4c40d456c (diff)
downloadbsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.tar.gz
bsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.tar.zst
bsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.zip
Replace some homegrown string-functions with standard-<string.h>-macros.
Reported by Joseph Myers <jsm28@cam.ac.uk> in PR 6028.
Diffstat (limited to 'adventure/extern.h')
-rw-r--r--adventure/extern.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/adventure/extern.h b/adventure/extern.h
index 17372fc0..86964579 100644
--- a/adventure/extern.h
+++ b/adventure/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.4 1998/08/24 22:07:37 hubertf Exp $ */
+/* $NetBSD: extern.h,v 1.5 1998/08/24 22:26:23 hubertf Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -29,6 +29,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <string.h>
+
/* crc.c */
void crc_start __P((void));
unsigned long crc __P((char *, int));
@@ -116,9 +118,12 @@ int put __P((int, int, int));
void carry __P((int, int));
void drop __P((int, int));
int vocab __P((char *, int, int));
-void copystr __P((char *, char *));
-int weq __P((char *, char *));
-int length __P((char *));
+
+/* These three used to be functions in vocab.c */
+#define copystr(src, dest) strcpy((dest), (src))
+#define weq(str1, str2) (!strncmp((str1), (str2), 5))
+#define length(str) (strlen((str)) + 1)
+
void prht __P((void));
/* wizard.c */