Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 42 lines (36 sloc) 1.514 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
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
5 /* DAG - hack to diff this from system regexp which this is incompatible with */
6 #define regexp regexp_elvis
7 #define regbuild regbuild_elvis
8 #define regcomp regcomp_elvis
9 #define regdup regdup_elvis
10 #define regexec regexec_elvis
11 #define regtilde regtilde_elvis
12 #define regsub regsub_elvis
13 #define regerror regerror_elvis
14
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
15 typedef struct regexp {
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
16 long startp[NSUBEXP];/* start of text matching a subexpr */
17 long endp[NSUBEXP]; /* end of a text matching a subexpr */
18 long leavep; /* offset of text matching \= */
19 long nextlinep; /* offset of start of following line */
20 BUFFER buffer; /* buffer that the above offsets refer to */
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
21 int minlen; /* length of shortest possible match */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
22 CHAR first; /* first character, if known; else \0 */
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
23 ELVBOOL bol; /* must start at beginning of line? */
24 ELVBOOL literal; /* contains no metacharacters? */
25 ELVBOOL upper; /* contains some uppercase letters? */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
26 CHAR program[1]; /* Unwarranted chumminess with compiler. */
6335386 @mbert Import Elvis 1.8 (written by Steve Kirkendall)
authored
27 } regexp;
28
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
29 BEGIN_EXTERNC
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
30 extern CHAR *regbuild P_((_CHAR_ delim, CHAR **refp, ELVBOOL reg));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
31 extern regexp *regcomp P_((CHAR *retext, MARK cursor));
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
32 extern regexp *regdup P_((regexp *re));
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
33 extern int regexec P_((regexp *re, MARK from, ELVBOOL bol));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
34 extern CHAR *regtilde P_((CHAR *newp));
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
35 extern CHAR *regsub P_((regexp *re, CHAR *newp, ELVBOOL doit));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
36 extern void regerror P_((char *errmsg));
37 END_EXTERNC
38
39 #ifndef REG
40 # define REG /* as nothing */
41 #endif
Something went wrong with that request. Please try again.