X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regexp.h;h=018312ec243e3f4e77e0ec29416756760390a69b;hb=94d58c47cfbe97ca0a689bcd5b7f9132f7918fee;hp=286b0e128b40b27ed22dca5696ee03bd1cdeb2a8;hpb=378cc40b38293ffc7298c6a7ed3cd740ad79be52;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regexp.h b/regexp.h index 286b0e1..018312e 100644 --- a/regexp.h +++ b/regexp.h @@ -1,3 +1,6 @@ +/* regexp.h + */ + /* * Definitions etc. for regexp(3) routines. * @@ -5,35 +8,28 @@ * not the System V one. */ -/* $Header: regexp.h,v 2.0 88/06/05 00:10:53 root Exp $ - * - * $Log: regexp.h,v $ - * Revision 2.0 88/06/05 00:10:53 root - * Baseline version 2.0. - * - */ - -#define ALIGN - -#define NSUBEXP 10 typedef struct regexp { - char *startp[NSUBEXP]; - char *endp[NSUBEXP]; - STR *regstart; /* Internal use only. */ + char **startp; + char **endp; + SV *regstart; /* Internal use only. */ char *regstclass; - STR *regmust; /* Internal use only. */ - int regback; /* Can regmust locate first try? */ + SV *regmust; /* Internal use only. */ + I32 regback; /* Can regmust locate first try? */ + I32 minlen; /* mininum possible length of $& */ + I32 prelen; /* length of precomp */ + U32 nparens; /* number of parentheses */ + U32 lastparen; /* last paren matched */ char *precomp; /* pre-compilation regular expression */ char *subbase; /* saved string so \digit works forever */ + char *subbeg; /* same, but not responsible for allocation */ + char *subend; /* end of subbase */ + U16 naughty; /* how exponential is this pattern? */ char reganch; /* Internal use only. */ char do_folding; /* do case-insensitive match? */ - char lastparen; /* last paren matched */ - char nparens; /* number of parentheses */ char program[1]; /* Unwarranted chumminess with compiler. */ } regexp; -extern regexp *regcomp(); -extern int regexec(); -extern void regsub(); -extern void regerror(); +#define ROPT_ANCH 1 +#define ROPT_SKIP 2 +#define ROPT_IMPLICIT 4