1213365Smarcel/* 2214006Smarcel * Definitions etc. for regexp(3) routines. 3213365Smarcel * 4213365Smarcel * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], 5213365Smarcel * not the System V one. 6213365Smarcel */ 7213365Smarcel 8213365Smarcel#ifndef _REGEXP 9213365Smarcel#define _REGEXP 1 10213365Smarcel 11213365Smarcel#define NSUBEXP 10 12213365Smarceltypedef struct regexp { 13213365Smarcel char *startp[NSUBEXP]; 14213365Smarcel char *endp[NSUBEXP]; 15213365Smarcel char regstart; /* Internal use only. */ 16213365Smarcel char reganch; /* Internal use only. */ 17213365Smarcel char *regmust; /* Internal use only. */ 18213365Smarcel int regmlen; /* Internal use only. */ 19213365Smarcel char program[1]; /* Unwarranted chumminess with compiler. */ 20213365Smarcel} regexp; 21213365Smarcel 22213365Smarcel#if defined(__STDC__) || defined(__cplusplus) 23213365Smarcel# define _ANSI_ARGS_(x) x 24213365Smarcel#else 25213365Smarcel# define _ANSI_ARGS_(x) () 26213365Smarcel#endif 27213365Smarcel 28213365Smarcelextern regexp *regcomp _ANSI_ARGS_((char *exp)); 29213365Smarcelextern int regexec _ANSI_ARGS_((regexp *prog, char *string)); 30213365Smarcelextern int regexec2 _ANSI_ARGS_((regexp *prog, char *string, int notbol)); 31213365Smarcelextern void regsub _ANSI_ARGS_((regexp *prog, char *source, char *dest)); 32213365Smarcelextern void regerror _ANSI_ARGS_((char *msg)); 33213365Smarcel 34213365Smarcel#endif /* REGEXP */ 35213365Smarcel