summaryrefslogtreecommitdiffstats
path: root/quiz/rxp.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-09-20 14:28:16 +0000
committerlukem <lukem@NetBSD.org>1997-09-20 14:28:16 +0000
commit7284e71c584d91c40ff4b6e19cd75aef8aae7010 (patch)
tree3eb5fd1560b00635386814d8f5bfa5048fd73e6a /quiz/rxp.c
parentdd3111969330fee8b8de8f3602e5658c3fd0e2db (diff)
downloadbsdgames-darwin-7284e71c584d91c40ff4b6e19cd75aef8aae7010.tar.gz
bsdgames-darwin-7284e71c584d91c40ff4b6e19cd75aef8aae7010.tar.zst
bsdgames-darwin-7284e71c584d91c40ff4b6e19cd75aef8aae7010.zip
- WARNSify
- deprecate register - getopts returns -1 not EOF - last character returned by fgetln() isn't always \n - cleanup .Nm use
Diffstat (limited to 'quiz/rxp.c')
-rw-r--r--quiz/rxp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/quiz/rxp.c b/quiz/rxp.c
index f835913e..19a31bf6 100644
--- a/quiz/rxp.c
+++ b/quiz/rxp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rxp.c,v 1.5 1995/04/22 10:17:00 cgd Exp $ */
+/* $NetBSD: rxp.c,v 1.6 1997/09/20 14:28:19 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,11 +37,12 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)rxp.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: rxp.c,v 1.5 1995/04/22 10:17:00 cgd Exp $";
+__RCSID("$NetBSD: rxp.c,v 1.6 1997/09/20 14:28:19 lukem Exp $");
#endif
#endif /* not lint */
@@ -90,14 +91,14 @@ static int rxp__match __P((char *, int, Rxp_t *, Rxp_t *, char *));
int
rxp_compile(s)
- register char * s;
+ char * s;
{
return (rxp__compile(s, TRUE));
}
static int
rxp__compile(s, first)
- register char *s;
+ char *s;
int first;
{
static Rxp_t *rp;
@@ -195,7 +196,7 @@ rxp__compile(s, first)
*/
int
rxp_match(s)
- register char * s;
+ char * s;
{
return (rxp__match(s, TRUE, NULL, NULL, NULL));
}
@@ -210,8 +211,8 @@ rxp__match(s, first, j_succ, j_fail, sp_fail)
{
static Rxp_t *rp;
static char *sp;
- register int ch;
- Rxp_t *grp_end;
+ int ch;
+ Rxp_t *grp_end = NULL;
int err;
if (first) {