Commit | Line | Data |
378cc40b |
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 | |
9ef589d8 |
8 | /* $RCSfile: regexp.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:51:18 $ |
378cc40b |
9 | * |
10 | * $Log: regexp.h,v $ |
9ef589d8 |
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 | * |
fe14fcc3 |
16 | * Revision 4.0 91/03/20 01:39:23 lwall |
17 | * 4.0 baseline. |
378cc40b |
18 | * |
19 | */ |
20 | |
378cc40b |
21 | typedef struct regexp { |
fe14fcc3 |
22 | char **startp; |
23 | char **endp; |
378cc40b |
24 | STR *regstart; /* Internal use only. */ |
25 | char *regstclass; |
26 | STR *regmust; /* Internal use only. */ |
27 | int regback; /* Can regmust locate first try? */ |
9ef589d8 |
28 | int prelen; /* length of precomp */ |
378cc40b |
29 | char *precomp; /* pre-compilation regular expression */ |
30 | char *subbase; /* saved string so \digit works forever */ |
9ef589d8 |
31 | char *subbeg; /* same, but not responsible for allocation */ |
00bf170e |
32 | char *subend; /* end of subbase */ |
378cc40b |
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 | |
9ef589d8 |
40 | #define ROPT_ANCH 1 |
41 | #define ROPT_SKIP 2 |
42 | |
a687059c |
43 | regexp *regcomp(); |
44 | int regexec(); |