1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #include <X11/Intrinsic.h>
28
29 #ifndef NEDIT_REGULAREXP_H_INCLUDED
30 #define NEDIT_REGULAREXP_H_INCLUDED
31
32
33
34 #define NSUBEXP 50
35
36
37
38
39 typedef struct regexp {
40 char *startp [
NSUBEXP];
41 char *endp [
NSUBEXP];
42 char *extentpBW;
43
44
45 char *extentpFW;
46
47
48 int top_branch;
49
50 char match_start;
51 char anchor;
52 char program [
1];
53 } regexp;
54
55
56
57 typedef enum {
58 REDFLT_STANDARD =
0,
59 REDFLT_CASE_INSENSITIVE =
1
60
61 }
RE_DEFAULT_FLAG;
62
63
64
65 regexp * CompileRE (
66 const char *exp,
67 char **errorText,
68 int defaultFlags);
69
70
71
72 int ExecRE (
73 regexp *prog,
74 const char *string,
75 const char *end,
76
77 int reverse,
78 char prev_char,
79
80 char succ_char,
81
82 const char *delimiters,
83 const char *look_behind_to,
84
85 const char *match_till);
86
87
88
89
90 Boolean SubstituteRE(
const regexp* prog,
const char* source,
char* dest,
91 int max);
92
93
94
95
96
97 void SetREDefaultWordDelimiters (
98 char *delimiters);
99
100 #endif
101