/* * Definitions etc. for regexp(3) routines. * * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], * not the System V one. */ #define NSUBEXP 10 typedef struct regexp { const char *startp[NSUBEXP]; const char *endp[NSUBEXP]; char regstart; /* Internal use only. */ char reganch; /* Internal use only. */ int regmust; /* Internal use only. */ int regmlen; /* Internal use only. */ char program[1]; /* Unwarranted chumminess with compiler. */ } regexp; extern regexp *regcomp(const char *re); extern int regexec(regexp *rp, const char *s); extern void regsub(const regexp *rp, const char *src, char *dst); extern void regnsub(const regexp *rp, const char *src, char *dst, size_t len); extern size_t regsublen(const regexp *rp, const char *src); extern void regerror(char *message); extern size_t regcomp_len(const char *exp); extern regexp *regcomp_comp(const char *exp, struct regexp *r, size_t len);