summaryrefslogtreecommitdiffstats
path: root/monop/getinp.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-10-12 17:45:06 +0000
committerchristos <christos@NetBSD.org>1997-10-12 17:45:06 +0000
commita77b3f8edc13dc6efdbcf80e336689cfa1de08ab (patch)
treedfe6f38b6473068455b85cd2410d8394e1239336 /monop/getinp.c
parent5526682d8116582745b79bee12e5007abfddcd86 (diff)
downloadbsdgames-darwin-a77b3f8edc13dc6efdbcf80e336689cfa1de08ab.tar.gz
bsdgames-darwin-a77b3f8edc13dc6efdbcf80e336689cfa1de08ab.tar.zst
bsdgames-darwin-a77b3f8edc13dc6efdbcf80e336689cfa1de08ab.zip
WARNSify
Diffstat (limited to 'monop/getinp.c')
-rw-r--r--monop/getinp.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/monop/getinp.c b/monop/getinp.c
index 5de77f8d..cbb8dc42 100644
--- a/monop/getinp.c
+++ b/monop/getinp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getinp.c,v 1.5 1997/03/29 20:42:22 thorpej Exp $ */
+/* $NetBSD: getinp.c,v 1.6 1997/10/12 17:45:10 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,32 +33,34 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: getinp.c,v 1.5 1997/03/29 20:42:22 thorpej Exp $";
+__RCSID("$NetBSD: getinp.c,v 1.6 1997/10/12 17:45:10 christos Exp $");
#endif
#endif /* not lint */
-# include <stdio.h>
-# include <string.h>
-# include <ctype.h>
-
-# define reg register
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include "monop.ext"
# define LINE 70
static char buf[257];
+static int comp __P((char *));
+
+int
getinp(prompt, list)
-char *prompt, *list[]; {
+char *prompt, *list[];
+{
- reg int i, n_match, match;
+ int i, n_match, match = 0;
char *sp;
int c;
- int plen;
- static int comp();
for (;;) {
inter:
@@ -108,11 +110,12 @@ inter:
}
}
-static
+static int
comp(s1)
-char *s1; {
+char *s1;
+{
- reg char *sp, *tsp, c;
+ char *sp, *tsp, c;
if (buf[0] != '\0')
for (sp = buf, tsp = s1; *sp; ) {