Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 31 lines (26 sloc) 1.123 kb
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
1 /* regexp.h */
2
3 #define NSUBEXP 10 /* max # of subexpressions, plus 1 for whole expr */
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
4
5 typedef struct regexp {
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
6 long startp[NSUBEXP];/* start of text matching a subexpr */
7 long endp[NSUBEXP]; /* end of a text matching a subexpr */
8 long leavep; /* offset of text matching \= */
9 long nextlinep; /* offset of start of following line */
10 BUFFER buffer; /* buffer that the above offsets refer to */
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
11 int minlen; /* length of shortest possible match */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
12 CHAR first; /* first character, if known; else \0 */
13 BOOLEAN bol; /* must start at beginning of line? */
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
14 BOOLEAN literal; /* contains no metacharacters? */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
15 CHAR program[1]; /* Unwarranted chumminess with compiler. */
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
16 } regexp;
17
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
18 BEGIN_EXTERNC
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
19 extern CHAR *regbuild P_((_CHAR_ delim, CHAR **refp));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
20 extern regexp *regcomp P_((CHAR *retext, MARK cursor));
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
21 extern regexp *regdup P_((regexp *re));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
22 extern int regexec P_((regexp *re, MARK from, BOOLEAN bol));
23 extern CHAR *regtilde P_((CHAR *newp));
24 extern CHAR *regsub P_((regexp *re, CHAR *newp, BOOLEAN doit));
25 extern void regerror P_((char *errmsg));
26 END_EXTERNC
27
28 #ifndef REG
29 # define REG /* as nothing */
30 #endif
Something went wrong with that request. Please try again.