xref: /csrg-svn/games/quiz/quiz.h (revision 51610)
1*51610Sbostic /*-
2*51610Sbostic  * Copyright (c) 1991 The Regents of the University of California.
3*51610Sbostic  * All rights reserved.
4*51610Sbostic  *
5*51610Sbostic  * This code is derived from software contributed to Berkeley by
6*51610Sbostic  * Jim R. Oldroyd at The Instruction Set.
7*51610Sbostic  *
8*51610Sbostic  * %sccs.include.redist.c%
9*51610Sbostic  *
10*51610Sbostic  *	@(#)quiz.h	5.1 (Berkeley) 11/10/91
11*51610Sbostic  */
12*51610Sbostic 
13*51610Sbostic #define	TRUE		1
14*51610Sbostic #define	FALSE		0
15*51610Sbostic 
16*51610Sbostic /* Length of compiled regexp machine; increase if not big enough. */
17*51610Sbostic #define	RXP_LINE_SZ	8192
18*51610Sbostic 
19*51610Sbostic /* Maximum line length for data files. */
20*51610Sbostic #define	LINE_SZ		1024
21*51610Sbostic 
22*51610Sbostic /* Linked list for holding index and data file information. */
23*51610Sbostic typedef struct qentry {
24*51610Sbostic 	struct qentry *q_next;		/* next one */
25*51610Sbostic 	char	*q_text;		/* category text string from file */
26*51610Sbostic 	int	 q_asked;		/* TRUE if question's been asked */
27*51610Sbostic 	int	 q_answered;		/* TRUE if question's been answered */
28*51610Sbostic } QE;
29*51610Sbostic 
30*51610Sbostic extern char rxperr[];
31*51610Sbostic 
32*51610Sbostic int	 rxp_compile __P((char *));
33*51610Sbostic char	*rxp_expand __P((void));
34*51610Sbostic int	 rxp_match __P((char *));
35