| 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 | |
| 8 | /* $RCSfile: regexp.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:51:18 $ |
| 9 | * |
| 10 | * $Log: regexp.h,v $ |
| 11 | * Revision 4.0.1.1 91/06/07 11:51:18 lwall |
| 12 | * patch4: new copyright notice |
| 13 | * patch4: // wouldn't use previous pattern if it started with a null character |
| 14 | * patch4: $` was busted inside s/// |
| 15 | * |
| 16 | * Revision 4.0 91/03/20 01:39:23 lwall |
| 17 | * 4.0 baseline. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | typedef struct regexp { |
| 22 | char **startp; |
| 23 | char **endp; |
| 24 | STR *regstart; /* Internal use only. */ |
| 25 | char *regstclass; |
| 26 | STR *regmust; /* Internal use only. */ |
| 27 | int regback; /* Can regmust locate first try? */ |
| 28 | int prelen; /* length of precomp */ |
| 29 | char *precomp; /* pre-compilation regular expression */ |
| 30 | char *subbase; /* saved string so \digit works forever */ |
| 31 | char *subbeg; /* same, but not responsible for allocation */ |
| 32 | char *subend; /* end of subbase */ |
| 33 | char reganch; /* Internal use only. */ |
| 34 | char do_folding; /* do case-insensitive match? */ |
| 35 | char lastparen; /* last paren matched */ |
| 36 | char nparens; /* number of parentheses */ |
| 37 | char program[1]; /* Unwarranted chumminess with compiler. */ |
| 38 | } regexp; |
| 39 | |
| 40 | #define ROPT_ANCH 1 |
| 41 | #define ROPT_SKIP 2 |
| 42 | |
| 43 | regexp *regcomp(); |
| 44 | int regexec(); |