160786Sps/*
260786Sps * Definitions etc. for regexp(3) routines.
360786Sps *
460786Sps * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
560786Sps * not the System V one.
660786Sps */
760786Sps
860786Sps#ifndef _REGEXP
960786Sps#define _REGEXP 1
1060786Sps
1160786Sps#define NSUBEXP  10
1260786Spstypedef struct regexp {
1360786Sps	char *startp[NSUBEXP];
1460786Sps	char *endp[NSUBEXP];
1560786Sps	char regstart;		/* Internal use only. */
1660786Sps	char reganch;		/* Internal use only. */
1760786Sps	char *regmust;		/* Internal use only. */
1860786Sps	int regmlen;		/* Internal use only. */
1960786Sps	char program[1];	/* Unwarranted chumminess with compiler. */
2060786Sps} regexp;
2160786Sps
2260786Sps#if defined(__STDC__) || defined(__cplusplus)
2360786Sps#   define _ANSI_ARGS_(x)       x
2460786Sps#else
2560786Sps#   define _ANSI_ARGS_(x)       ()
2660786Sps#endif
2760786Sps
2860786Spsextern regexp *regcomp _ANSI_ARGS_((char *exp));
2960786Spsextern int regexec _ANSI_ARGS_((regexp *prog, char *string));
3060786Spsextern int regexec2 _ANSI_ARGS_((regexp *prog, char *string, int notbol));
3160786Spsextern void regsub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
3260786Spsextern void regerror _ANSI_ARGS_((char *msg));
3360786Sps
3460786Sps#endif /* REGEXP */
35