xref: /csrg-svn/games/quiz/quiz.h (revision 60836)
151610Sbostic /*-
2*60836Sbostic  * Copyright (c) 1991, 1993
3*60836Sbostic  *	The Regents of the University of California.  All rights reserved.
451610Sbostic  *
551610Sbostic  * This code is derived from software contributed to Berkeley by
652145Sbostic  * Jim R. Oldroyd at The Instruction Set and Keith Gabryelski at
752145Sbostic  * Commodore Business Machines.
851610Sbostic  *
951610Sbostic  * %sccs.include.redist.c%
1051610Sbostic  *
11*60836Sbostic  *	@(#)quiz.h	8.1 (Berkeley) 05/31/93
1251610Sbostic  */
1351610Sbostic 
1451610Sbostic #define	TRUE		1
1551610Sbostic #define	FALSE		0
1651610Sbostic 
1751610Sbostic /* Length of compiled regexp machine; increase if not big enough. */
1851610Sbostic #define	RXP_LINE_SZ	8192
1951610Sbostic 
2051610Sbostic /* Maximum line length for data files. */
2151610Sbostic #define	LINE_SZ		1024
2251610Sbostic 
2351610Sbostic /* Linked list for holding index and data file information. */
2451610Sbostic typedef struct qentry {
2551610Sbostic 	struct qentry *q_next;		/* next one */
2651610Sbostic 	char	*q_text;		/* category text string from file */
2751610Sbostic 	int	 q_asked;		/* TRUE if question's been asked */
2851610Sbostic 	int	 q_answered;		/* TRUE if question's been answered */
2951610Sbostic } QE;
3051610Sbostic 
3151610Sbostic extern char rxperr[];
3251610Sbostic 
3351610Sbostic int	 rxp_compile __P((char *));
3451610Sbostic char	*rxp_expand __P((void));
3551610Sbostic int	 rxp_match __P((char *));
36