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 {
13369759Sgit2svn        char *startp[NSUBEXP];
14369759Sgit2svn        char *endp[NSUBEXP];
15369759Sgit2svn        char regstart;          /* Internal use only. */
16369759Sgit2svn        char reganch;           /* Internal use only. */
17369759Sgit2svn        char *regmust;          /* Internal use only. */
18369759Sgit2svn        int regmlen;            /* Internal use only. */
19369759Sgit2svn        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