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 #ifndef __REGEXP_H 8 #define __REGEXP_H 9 10 #define NSUBEXP 10 11 12 typedef struct regexp { 13 char *startp[NSUBEXP]; 14 char *endp[NSUBEXP]; 15 char regstart; /* Internal use only. */ 16 char reganch; /* Internal use only. */ 17 char *regmust; /* Internal use only. */ 18 int regmlen; /* Internal use only. */ 19 char program[1]; /* Unwarranted chumminess with compiler. */ 20 } regexp; 21 22 extern regexp __LIB__ __SAVEFRAME__ *regcomp(char *); 23 extern int __LIB__ __SAVEFRAME__ regexec(regexp *__prog, char *__string) __smallc; 24 extern void __LIB__ __SAVEFRAME__ regsub(regexp *__prog, char *__source, char *__dest) __smallc; 25 extern void __LIB__ __SAVEFRAME__ regerror(const char *); 26 27 #endif 28