1 /*
2  * Definitions etc. for regexp(3) routines.
3  *
4  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
5  * not the System V one.
6  */
7 #define NSUBEXP  10
8 typedef struct regexp {
9 	const char *startp[NSUBEXP];
10 	const char *endp[NSUBEXP];
11 	char regstart;		/* Internal use only. */
12 	char reganch;		/* Internal use only. */
13 	char *regmust;		/* Internal use only. */
14 	int regmlen;		/* Internal use only. */
15 	char program[1];	/* Unwarranted chumminess with compiler. */
16 } regexp;
17 
18 #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
19 #define REGEXP_ARGS(plist)	plist
20 #else
21 #define REGEXP_ARGS(plist)	()
22 #define const
23 #endif
24 
25 extern regexp	*regcomp REGEXP_ARGS((const char *expr_));
26 extern int	regexec REGEXP_ARGS((regexp *prog_, const char *string_));
27 extern void	regsub REGEXP_ARGS((regexp *prog_, const char *source_,
28 				    char *dest_));
29 extern void	regerror REGEXP_ARGS((const char *msg_));
30 
31 #undef REGEXP_ARGS
32