jpayne@69
|
1 /*************************************************
|
jpayne@69
|
2 * Perl-Compatible Regular Expressions *
|
jpayne@69
|
3 *************************************************/
|
jpayne@69
|
4
|
jpayne@69
|
5 /* This is the public header file for the PCRE library, to be #included by
|
jpayne@69
|
6 applications that call the PCRE functions.
|
jpayne@69
|
7
|
jpayne@69
|
8 Copyright (c) 1997-2014 University of Cambridge
|
jpayne@69
|
9
|
jpayne@69
|
10 -----------------------------------------------------------------------------
|
jpayne@69
|
11 Redistribution and use in source and binary forms, with or without
|
jpayne@69
|
12 modification, are permitted provided that the following conditions are met:
|
jpayne@69
|
13
|
jpayne@69
|
14 * Redistributions of source code must retain the above copyright notice,
|
jpayne@69
|
15 this list of conditions and the following disclaimer.
|
jpayne@69
|
16
|
jpayne@69
|
17 * Redistributions in binary form must reproduce the above copyright
|
jpayne@69
|
18 notice, this list of conditions and the following disclaimer in the
|
jpayne@69
|
19 documentation and/or other materials provided with the distribution.
|
jpayne@69
|
20
|
jpayne@69
|
21 * Neither the name of the University of Cambridge nor the names of its
|
jpayne@69
|
22 contributors may be used to endorse or promote products derived from
|
jpayne@69
|
23 this software without specific prior written permission.
|
jpayne@69
|
24
|
jpayne@69
|
25 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
jpayne@69
|
26 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
jpayne@69
|
27 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
jpayne@69
|
28 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
jpayne@69
|
29 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
jpayne@69
|
30 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
jpayne@69
|
31 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
jpayne@69
|
32 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
jpayne@69
|
33 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
jpayne@69
|
34 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
jpayne@69
|
35 POSSIBILITY OF SUCH DAMAGE.
|
jpayne@69
|
36 -----------------------------------------------------------------------------
|
jpayne@69
|
37 */
|
jpayne@69
|
38
|
jpayne@69
|
39 #ifndef _PCRE_H
|
jpayne@69
|
40 #define _PCRE_H
|
jpayne@69
|
41
|
jpayne@69
|
42 /* The current PCRE version information. */
|
jpayne@69
|
43
|
jpayne@69
|
44 #define PCRE_MAJOR 8
|
jpayne@69
|
45 #define PCRE_MINOR 45
|
jpayne@69
|
46 #define PCRE_PRERELEASE
|
jpayne@69
|
47 #define PCRE_DATE 2021-06-15
|
jpayne@69
|
48
|
jpayne@69
|
49 /* When an application links to a PCRE DLL in Windows, the symbols that are
|
jpayne@69
|
50 imported have to be identified as such. When building PCRE, the appropriate
|
jpayne@69
|
51 export setting is defined in pcre_internal.h, which includes this file. So we
|
jpayne@69
|
52 don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
|
jpayne@69
|
53
|
jpayne@69
|
54 #if defined(_WIN32) && !defined(PCRE_STATIC)
|
jpayne@69
|
55 # ifndef PCRE_EXP_DECL
|
jpayne@69
|
56 # define PCRE_EXP_DECL extern __declspec(dllimport)
|
jpayne@69
|
57 # endif
|
jpayne@69
|
58 # ifdef __cplusplus
|
jpayne@69
|
59 # ifndef PCRECPP_EXP_DECL
|
jpayne@69
|
60 # define PCRECPP_EXP_DECL extern __declspec(dllimport)
|
jpayne@69
|
61 # endif
|
jpayne@69
|
62 # ifndef PCRECPP_EXP_DEFN
|
jpayne@69
|
63 # define PCRECPP_EXP_DEFN __declspec(dllimport)
|
jpayne@69
|
64 # endif
|
jpayne@69
|
65 # endif
|
jpayne@69
|
66 #endif
|
jpayne@69
|
67
|
jpayne@69
|
68 /* By default, we use the standard "extern" declarations. */
|
jpayne@69
|
69
|
jpayne@69
|
70 #ifndef PCRE_EXP_DECL
|
jpayne@69
|
71 # ifdef __cplusplus
|
jpayne@69
|
72 # define PCRE_EXP_DECL extern "C"
|
jpayne@69
|
73 # else
|
jpayne@69
|
74 # define PCRE_EXP_DECL extern
|
jpayne@69
|
75 # endif
|
jpayne@69
|
76 #endif
|
jpayne@69
|
77
|
jpayne@69
|
78 #ifdef __cplusplus
|
jpayne@69
|
79 # ifndef PCRECPP_EXP_DECL
|
jpayne@69
|
80 # define PCRECPP_EXP_DECL extern
|
jpayne@69
|
81 # endif
|
jpayne@69
|
82 # ifndef PCRECPP_EXP_DEFN
|
jpayne@69
|
83 # define PCRECPP_EXP_DEFN
|
jpayne@69
|
84 # endif
|
jpayne@69
|
85 #endif
|
jpayne@69
|
86
|
jpayne@69
|
87 /* Have to include stdlib.h in order to ensure that size_t is defined;
|
jpayne@69
|
88 it is needed here for malloc. */
|
jpayne@69
|
89
|
jpayne@69
|
90 #include <stdlib.h>
|
jpayne@69
|
91
|
jpayne@69
|
92 /* Allow for C++ users */
|
jpayne@69
|
93
|
jpayne@69
|
94 #ifdef __cplusplus
|
jpayne@69
|
95 extern "C" {
|
jpayne@69
|
96 #endif
|
jpayne@69
|
97
|
jpayne@69
|
98 /* Public options. Some are compile-time only, some are run-time only, and some
|
jpayne@69
|
99 are both. Most of the compile-time options are saved with the compiled regex so
|
jpayne@69
|
100 that they can be inspected during studying (and therefore JIT compiling). Note
|
jpayne@69
|
101 that pcre_study() has its own set of options. Originally, all the options
|
jpayne@69
|
102 defined here used distinct bits. However, almost all the bits in a 32-bit word
|
jpayne@69
|
103 are now used, so in order to conserve them, option bits that were previously
|
jpayne@69
|
104 only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may
|
jpayne@69
|
105 also be used for compile-time options that affect only compiling and are not
|
jpayne@69
|
106 relevant for studying or JIT compiling.
|
jpayne@69
|
107
|
jpayne@69
|
108 Some options for pcre_compile() change its behaviour but do not affect the
|
jpayne@69
|
109 behaviour of the execution functions. Other options are passed through to the
|
jpayne@69
|
110 execution functions and affect their behaviour, with or without affecting the
|
jpayne@69
|
111 behaviour of pcre_compile().
|
jpayne@69
|
112
|
jpayne@69
|
113 Options that can be passed to pcre_compile() are tagged Cx below, with these
|
jpayne@69
|
114 variants:
|
jpayne@69
|
115
|
jpayne@69
|
116 C1 Affects compile only
|
jpayne@69
|
117 C2 Does not affect compile; affects exec, dfa_exec
|
jpayne@69
|
118 C3 Affects compile, exec, dfa_exec
|
jpayne@69
|
119 C4 Affects compile, exec, dfa_exec, study
|
jpayne@69
|
120 C5 Affects compile, exec, study
|
jpayne@69
|
121
|
jpayne@69
|
122 Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
|
jpayne@69
|
123 E and D, respectively. They take precedence over C3, C4, and C5 settings passed
|
jpayne@69
|
124 from pcre_compile(). Those that are compatible with JIT execution are flagged
|
jpayne@69
|
125 with J. */
|
jpayne@69
|
126
|
jpayne@69
|
127 #define PCRE_CASELESS 0x00000001 /* C1 */
|
jpayne@69
|
128 #define PCRE_MULTILINE 0x00000002 /* C1 */
|
jpayne@69
|
129 #define PCRE_DOTALL 0x00000004 /* C1 */
|
jpayne@69
|
130 #define PCRE_EXTENDED 0x00000008 /* C1 */
|
jpayne@69
|
131 #define PCRE_ANCHORED 0x00000010 /* C4 E D */
|
jpayne@69
|
132 #define PCRE_DOLLAR_ENDONLY 0x00000020 /* C2 */
|
jpayne@69
|
133 #define PCRE_EXTRA 0x00000040 /* C1 */
|
jpayne@69
|
134 #define PCRE_NOTBOL 0x00000080 /* E D J */
|
jpayne@69
|
135 #define PCRE_NOTEOL 0x00000100 /* E D J */
|
jpayne@69
|
136 #define PCRE_UNGREEDY 0x00000200 /* C1 */
|
jpayne@69
|
137 #define PCRE_NOTEMPTY 0x00000400 /* E D J */
|
jpayne@69
|
138 #define PCRE_UTF8 0x00000800 /* C4 ) */
|
jpayne@69
|
139 #define PCRE_UTF16 0x00000800 /* C4 ) Synonyms */
|
jpayne@69
|
140 #define PCRE_UTF32 0x00000800 /* C4 ) */
|
jpayne@69
|
141 #define PCRE_NO_AUTO_CAPTURE 0x00001000 /* C1 */
|
jpayne@69
|
142 #define PCRE_NO_UTF8_CHECK 0x00002000 /* C1 E D J ) */
|
jpayne@69
|
143 #define PCRE_NO_UTF16_CHECK 0x00002000 /* C1 E D J ) Synonyms */
|
jpayne@69
|
144 #define PCRE_NO_UTF32_CHECK 0x00002000 /* C1 E D J ) */
|
jpayne@69
|
145 #define PCRE_AUTO_CALLOUT 0x00004000 /* C1 */
|
jpayne@69
|
146 #define PCRE_PARTIAL_SOFT 0x00008000 /* E D J ) Synonyms */
|
jpayne@69
|
147 #define PCRE_PARTIAL 0x00008000 /* E D J ) */
|
jpayne@69
|
148
|
jpayne@69
|
149 /* This pair use the same bit. */
|
jpayne@69
|
150 #define PCRE_NEVER_UTF 0x00010000 /* C1 ) Overlaid */
|
jpayne@69
|
151 #define PCRE_DFA_SHORTEST 0x00010000 /* D ) Overlaid */
|
jpayne@69
|
152
|
jpayne@69
|
153 /* This pair use the same bit. */
|
jpayne@69
|
154 #define PCRE_NO_AUTO_POSSESS 0x00020000 /* C1 ) Overlaid */
|
jpayne@69
|
155 #define PCRE_DFA_RESTART 0x00020000 /* D ) Overlaid */
|
jpayne@69
|
156
|
jpayne@69
|
157 #define PCRE_FIRSTLINE 0x00040000 /* C3 */
|
jpayne@69
|
158 #define PCRE_DUPNAMES 0x00080000 /* C1 */
|
jpayne@69
|
159 #define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */
|
jpayne@69
|
160 #define PCRE_NEWLINE_LF 0x00200000 /* C3 E D */
|
jpayne@69
|
161 #define PCRE_NEWLINE_CRLF 0x00300000 /* C3 E D */
|
jpayne@69
|
162 #define PCRE_NEWLINE_ANY 0x00400000 /* C3 E D */
|
jpayne@69
|
163 #define PCRE_NEWLINE_ANYCRLF 0x00500000 /* C3 E D */
|
jpayne@69
|
164 #define PCRE_BSR_ANYCRLF 0x00800000 /* C3 E D */
|
jpayne@69
|
165 #define PCRE_BSR_UNICODE 0x01000000 /* C3 E D */
|
jpayne@69
|
166 #define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* C5 */
|
jpayne@69
|
167 #define PCRE_NO_START_OPTIMIZE 0x04000000 /* C2 E D ) Synonyms */
|
jpayne@69
|
168 #define PCRE_NO_START_OPTIMISE 0x04000000 /* C2 E D ) */
|
jpayne@69
|
169 #define PCRE_PARTIAL_HARD 0x08000000 /* E D J */
|
jpayne@69
|
170 #define PCRE_NOTEMPTY_ATSTART 0x10000000 /* E D J */
|
jpayne@69
|
171 #define PCRE_UCP 0x20000000 /* C3 */
|
jpayne@69
|
172
|
jpayne@69
|
173 /* Exec-time and get/set-time error codes */
|
jpayne@69
|
174
|
jpayne@69
|
175 #define PCRE_ERROR_NOMATCH (-1)
|
jpayne@69
|
176 #define PCRE_ERROR_NULL (-2)
|
jpayne@69
|
177 #define PCRE_ERROR_BADOPTION (-3)
|
jpayne@69
|
178 #define PCRE_ERROR_BADMAGIC (-4)
|
jpayne@69
|
179 #define PCRE_ERROR_UNKNOWN_OPCODE (-5)
|
jpayne@69
|
180 #define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
|
jpayne@69
|
181 #define PCRE_ERROR_NOMEMORY (-6)
|
jpayne@69
|
182 #define PCRE_ERROR_NOSUBSTRING (-7)
|
jpayne@69
|
183 #define PCRE_ERROR_MATCHLIMIT (-8)
|
jpayne@69
|
184 #define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
|
jpayne@69
|
185 #define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16/32 */
|
jpayne@69
|
186 #define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16/32 */
|
jpayne@69
|
187 #define PCRE_ERROR_BADUTF32 (-10) /* Same for 8/16/32 */
|
jpayne@69
|
188 #define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
|
jpayne@69
|
189 #define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
|
jpayne@69
|
190 #define PCRE_ERROR_PARTIAL (-12)
|
jpayne@69
|
191 #define PCRE_ERROR_BADPARTIAL (-13)
|
jpayne@69
|
192 #define PCRE_ERROR_INTERNAL (-14)
|
jpayne@69
|
193 #define PCRE_ERROR_BADCOUNT (-15)
|
jpayne@69
|
194 #define PCRE_ERROR_DFA_UITEM (-16)
|
jpayne@69
|
195 #define PCRE_ERROR_DFA_UCOND (-17)
|
jpayne@69
|
196 #define PCRE_ERROR_DFA_UMLIMIT (-18)
|
jpayne@69
|
197 #define PCRE_ERROR_DFA_WSSIZE (-19)
|
jpayne@69
|
198 #define PCRE_ERROR_DFA_RECURSE (-20)
|
jpayne@69
|
199 #define PCRE_ERROR_RECURSIONLIMIT (-21)
|
jpayne@69
|
200 #define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
|
jpayne@69
|
201 #define PCRE_ERROR_BADNEWLINE (-23)
|
jpayne@69
|
202 #define PCRE_ERROR_BADOFFSET (-24)
|
jpayne@69
|
203 #define PCRE_ERROR_SHORTUTF8 (-25)
|
jpayne@69
|
204 #define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */
|
jpayne@69
|
205 #define PCRE_ERROR_RECURSELOOP (-26)
|
jpayne@69
|
206 #define PCRE_ERROR_JIT_STACKLIMIT (-27)
|
jpayne@69
|
207 #define PCRE_ERROR_BADMODE (-28)
|
jpayne@69
|
208 #define PCRE_ERROR_BADENDIANNESS (-29)
|
jpayne@69
|
209 #define PCRE_ERROR_DFA_BADRESTART (-30)
|
jpayne@69
|
210 #define PCRE_ERROR_JIT_BADOPTION (-31)
|
jpayne@69
|
211 #define PCRE_ERROR_BADLENGTH (-32)
|
jpayne@69
|
212 #define PCRE_ERROR_UNSET (-33)
|
jpayne@69
|
213
|
jpayne@69
|
214 /* Specific error codes for UTF-8 validity checks */
|
jpayne@69
|
215
|
jpayne@69
|
216 #define PCRE_UTF8_ERR0 0
|
jpayne@69
|
217 #define PCRE_UTF8_ERR1 1
|
jpayne@69
|
218 #define PCRE_UTF8_ERR2 2
|
jpayne@69
|
219 #define PCRE_UTF8_ERR3 3
|
jpayne@69
|
220 #define PCRE_UTF8_ERR4 4
|
jpayne@69
|
221 #define PCRE_UTF8_ERR5 5
|
jpayne@69
|
222 #define PCRE_UTF8_ERR6 6
|
jpayne@69
|
223 #define PCRE_UTF8_ERR7 7
|
jpayne@69
|
224 #define PCRE_UTF8_ERR8 8
|
jpayne@69
|
225 #define PCRE_UTF8_ERR9 9
|
jpayne@69
|
226 #define PCRE_UTF8_ERR10 10
|
jpayne@69
|
227 #define PCRE_UTF8_ERR11 11
|
jpayne@69
|
228 #define PCRE_UTF8_ERR12 12
|
jpayne@69
|
229 #define PCRE_UTF8_ERR13 13
|
jpayne@69
|
230 #define PCRE_UTF8_ERR14 14
|
jpayne@69
|
231 #define PCRE_UTF8_ERR15 15
|
jpayne@69
|
232 #define PCRE_UTF8_ERR16 16
|
jpayne@69
|
233 #define PCRE_UTF8_ERR17 17
|
jpayne@69
|
234 #define PCRE_UTF8_ERR18 18
|
jpayne@69
|
235 #define PCRE_UTF8_ERR19 19
|
jpayne@69
|
236 #define PCRE_UTF8_ERR20 20
|
jpayne@69
|
237 #define PCRE_UTF8_ERR21 21
|
jpayne@69
|
238 #define PCRE_UTF8_ERR22 22 /* Unused (was non-character) */
|
jpayne@69
|
239
|
jpayne@69
|
240 /* Specific error codes for UTF-16 validity checks */
|
jpayne@69
|
241
|
jpayne@69
|
242 #define PCRE_UTF16_ERR0 0
|
jpayne@69
|
243 #define PCRE_UTF16_ERR1 1
|
jpayne@69
|
244 #define PCRE_UTF16_ERR2 2
|
jpayne@69
|
245 #define PCRE_UTF16_ERR3 3
|
jpayne@69
|
246 #define PCRE_UTF16_ERR4 4 /* Unused (was non-character) */
|
jpayne@69
|
247
|
jpayne@69
|
248 /* Specific error codes for UTF-32 validity checks */
|
jpayne@69
|
249
|
jpayne@69
|
250 #define PCRE_UTF32_ERR0 0
|
jpayne@69
|
251 #define PCRE_UTF32_ERR1 1
|
jpayne@69
|
252 #define PCRE_UTF32_ERR2 2 /* Unused (was non-character) */
|
jpayne@69
|
253 #define PCRE_UTF32_ERR3 3
|
jpayne@69
|
254
|
jpayne@69
|
255 /* Request types for pcre_fullinfo() */
|
jpayne@69
|
256
|
jpayne@69
|
257 #define PCRE_INFO_OPTIONS 0
|
jpayne@69
|
258 #define PCRE_INFO_SIZE 1
|
jpayne@69
|
259 #define PCRE_INFO_CAPTURECOUNT 2
|
jpayne@69
|
260 #define PCRE_INFO_BACKREFMAX 3
|
jpayne@69
|
261 #define PCRE_INFO_FIRSTBYTE 4
|
jpayne@69
|
262 #define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
|
jpayne@69
|
263 #define PCRE_INFO_FIRSTTABLE 5
|
jpayne@69
|
264 #define PCRE_INFO_LASTLITERAL 6
|
jpayne@69
|
265 #define PCRE_INFO_NAMEENTRYSIZE 7
|
jpayne@69
|
266 #define PCRE_INFO_NAMECOUNT 8
|
jpayne@69
|
267 #define PCRE_INFO_NAMETABLE 9
|
jpayne@69
|
268 #define PCRE_INFO_STUDYSIZE 10
|
jpayne@69
|
269 #define PCRE_INFO_DEFAULT_TABLES 11
|
jpayne@69
|
270 #define PCRE_INFO_OKPARTIAL 12
|
jpayne@69
|
271 #define PCRE_INFO_JCHANGED 13
|
jpayne@69
|
272 #define PCRE_INFO_HASCRORLF 14
|
jpayne@69
|
273 #define PCRE_INFO_MINLENGTH 15
|
jpayne@69
|
274 #define PCRE_INFO_JIT 16
|
jpayne@69
|
275 #define PCRE_INFO_JITSIZE 17
|
jpayne@69
|
276 #define PCRE_INFO_MAXLOOKBEHIND 18
|
jpayne@69
|
277 #define PCRE_INFO_FIRSTCHARACTER 19
|
jpayne@69
|
278 #define PCRE_INFO_FIRSTCHARACTERFLAGS 20
|
jpayne@69
|
279 #define PCRE_INFO_REQUIREDCHAR 21
|
jpayne@69
|
280 #define PCRE_INFO_REQUIREDCHARFLAGS 22
|
jpayne@69
|
281 #define PCRE_INFO_MATCHLIMIT 23
|
jpayne@69
|
282 #define PCRE_INFO_RECURSIONLIMIT 24
|
jpayne@69
|
283 #define PCRE_INFO_MATCH_EMPTY 25
|
jpayne@69
|
284
|
jpayne@69
|
285 /* Request types for pcre_config(). Do not re-arrange, in order to remain
|
jpayne@69
|
286 compatible. */
|
jpayne@69
|
287
|
jpayne@69
|
288 #define PCRE_CONFIG_UTF8 0
|
jpayne@69
|
289 #define PCRE_CONFIG_NEWLINE 1
|
jpayne@69
|
290 #define PCRE_CONFIG_LINK_SIZE 2
|
jpayne@69
|
291 #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
|
jpayne@69
|
292 #define PCRE_CONFIG_MATCH_LIMIT 4
|
jpayne@69
|
293 #define PCRE_CONFIG_STACKRECURSE 5
|
jpayne@69
|
294 #define PCRE_CONFIG_UNICODE_PROPERTIES 6
|
jpayne@69
|
295 #define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
|
jpayne@69
|
296 #define PCRE_CONFIG_BSR 8
|
jpayne@69
|
297 #define PCRE_CONFIG_JIT 9
|
jpayne@69
|
298 #define PCRE_CONFIG_UTF16 10
|
jpayne@69
|
299 #define PCRE_CONFIG_JITTARGET 11
|
jpayne@69
|
300 #define PCRE_CONFIG_UTF32 12
|
jpayne@69
|
301 #define PCRE_CONFIG_PARENS_LIMIT 13
|
jpayne@69
|
302
|
jpayne@69
|
303 /* Request types for pcre_study(). Do not re-arrange, in order to remain
|
jpayne@69
|
304 compatible. */
|
jpayne@69
|
305
|
jpayne@69
|
306 #define PCRE_STUDY_JIT_COMPILE 0x0001
|
jpayne@69
|
307 #define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002
|
jpayne@69
|
308 #define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004
|
jpayne@69
|
309 #define PCRE_STUDY_EXTRA_NEEDED 0x0008
|
jpayne@69
|
310
|
jpayne@69
|
311 /* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
|
jpayne@69
|
312 these bits, just add new ones on the end, in order to remain compatible. */
|
jpayne@69
|
313
|
jpayne@69
|
314 #define PCRE_EXTRA_STUDY_DATA 0x0001
|
jpayne@69
|
315 #define PCRE_EXTRA_MATCH_LIMIT 0x0002
|
jpayne@69
|
316 #define PCRE_EXTRA_CALLOUT_DATA 0x0004
|
jpayne@69
|
317 #define PCRE_EXTRA_TABLES 0x0008
|
jpayne@69
|
318 #define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
|
jpayne@69
|
319 #define PCRE_EXTRA_MARK 0x0020
|
jpayne@69
|
320 #define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
|
jpayne@69
|
321
|
jpayne@69
|
322 /* Types */
|
jpayne@69
|
323
|
jpayne@69
|
324 struct real_pcre8_or_16; /* declaration; the definition is private */
|
jpayne@69
|
325 typedef struct real_pcre8_or_16 pcre;
|
jpayne@69
|
326
|
jpayne@69
|
327 struct real_pcre8_or_16; /* declaration; the definition is private */
|
jpayne@69
|
328 typedef struct real_pcre8_or_16 pcre16;
|
jpayne@69
|
329
|
jpayne@69
|
330 struct real_pcre32; /* declaration; the definition is private */
|
jpayne@69
|
331 typedef struct real_pcre32 pcre32;
|
jpayne@69
|
332
|
jpayne@69
|
333 struct real_pcre_jit_stack; /* declaration; the definition is private */
|
jpayne@69
|
334 typedef struct real_pcre_jit_stack pcre_jit_stack;
|
jpayne@69
|
335
|
jpayne@69
|
336 struct real_pcre16_jit_stack; /* declaration; the definition is private */
|
jpayne@69
|
337 typedef struct real_pcre16_jit_stack pcre16_jit_stack;
|
jpayne@69
|
338
|
jpayne@69
|
339 struct real_pcre32_jit_stack; /* declaration; the definition is private */
|
jpayne@69
|
340 typedef struct real_pcre32_jit_stack pcre32_jit_stack;
|
jpayne@69
|
341
|
jpayne@69
|
342 /* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
|
jpayne@69
|
343 a 16 bit wide signed data type. Otherwise it can be a dummy data type since
|
jpayne@69
|
344 pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
|
jpayne@69
|
345 #ifndef PCRE_UCHAR16
|
jpayne@69
|
346 #define PCRE_UCHAR16 unsigned short
|
jpayne@69
|
347 #endif
|
jpayne@69
|
348
|
jpayne@69
|
349 #ifndef PCRE_SPTR16
|
jpayne@69
|
350 #define PCRE_SPTR16 const PCRE_UCHAR16 *
|
jpayne@69
|
351 #endif
|
jpayne@69
|
352
|
jpayne@69
|
353 /* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain
|
jpayne@69
|
354 a 32 bit wide signed data type. Otherwise it can be a dummy data type since
|
jpayne@69
|
355 pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */
|
jpayne@69
|
356 #ifndef PCRE_UCHAR32
|
jpayne@69
|
357 #define PCRE_UCHAR32 unsigned int
|
jpayne@69
|
358 #endif
|
jpayne@69
|
359
|
jpayne@69
|
360 #ifndef PCRE_SPTR32
|
jpayne@69
|
361 #define PCRE_SPTR32 const PCRE_UCHAR32 *
|
jpayne@69
|
362 #endif
|
jpayne@69
|
363
|
jpayne@69
|
364 /* When PCRE is compiled as a C++ library, the subject pointer type can be
|
jpayne@69
|
365 replaced with a custom type. For conventional use, the public interface is a
|
jpayne@69
|
366 const char *. */
|
jpayne@69
|
367
|
jpayne@69
|
368 #ifndef PCRE_SPTR
|
jpayne@69
|
369 #define PCRE_SPTR const char *
|
jpayne@69
|
370 #endif
|
jpayne@69
|
371
|
jpayne@69
|
372 /* The structure for passing additional data to pcre_exec(). This is defined in
|
jpayne@69
|
373 such as way as to be extensible. Always add new fields at the end, in order to
|
jpayne@69
|
374 remain compatible. */
|
jpayne@69
|
375
|
jpayne@69
|
376 typedef struct pcre_extra {
|
jpayne@69
|
377 unsigned long int flags; /* Bits for which fields are set */
|
jpayne@69
|
378 void *study_data; /* Opaque data from pcre_study() */
|
jpayne@69
|
379 unsigned long int match_limit; /* Maximum number of calls to match() */
|
jpayne@69
|
380 void *callout_data; /* Data passed back in callouts */
|
jpayne@69
|
381 const unsigned char *tables; /* Pointer to character tables */
|
jpayne@69
|
382 unsigned long int match_limit_recursion; /* Max recursive calls to match() */
|
jpayne@69
|
383 unsigned char **mark; /* For passing back a mark pointer */
|
jpayne@69
|
384 void *executable_jit; /* Contains a pointer to a compiled jit code */
|
jpayne@69
|
385 } pcre_extra;
|
jpayne@69
|
386
|
jpayne@69
|
387 /* Same structure as above, but with 16 bit char pointers. */
|
jpayne@69
|
388
|
jpayne@69
|
389 typedef struct pcre16_extra {
|
jpayne@69
|
390 unsigned long int flags; /* Bits for which fields are set */
|
jpayne@69
|
391 void *study_data; /* Opaque data from pcre_study() */
|
jpayne@69
|
392 unsigned long int match_limit; /* Maximum number of calls to match() */
|
jpayne@69
|
393 void *callout_data; /* Data passed back in callouts */
|
jpayne@69
|
394 const unsigned char *tables; /* Pointer to character tables */
|
jpayne@69
|
395 unsigned long int match_limit_recursion; /* Max recursive calls to match() */
|
jpayne@69
|
396 PCRE_UCHAR16 **mark; /* For passing back a mark pointer */
|
jpayne@69
|
397 void *executable_jit; /* Contains a pointer to a compiled jit code */
|
jpayne@69
|
398 } pcre16_extra;
|
jpayne@69
|
399
|
jpayne@69
|
400 /* Same structure as above, but with 32 bit char pointers. */
|
jpayne@69
|
401
|
jpayne@69
|
402 typedef struct pcre32_extra {
|
jpayne@69
|
403 unsigned long int flags; /* Bits for which fields are set */
|
jpayne@69
|
404 void *study_data; /* Opaque data from pcre_study() */
|
jpayne@69
|
405 unsigned long int match_limit; /* Maximum number of calls to match() */
|
jpayne@69
|
406 void *callout_data; /* Data passed back in callouts */
|
jpayne@69
|
407 const unsigned char *tables; /* Pointer to character tables */
|
jpayne@69
|
408 unsigned long int match_limit_recursion; /* Max recursive calls to match() */
|
jpayne@69
|
409 PCRE_UCHAR32 **mark; /* For passing back a mark pointer */
|
jpayne@69
|
410 void *executable_jit; /* Contains a pointer to a compiled jit code */
|
jpayne@69
|
411 } pcre32_extra;
|
jpayne@69
|
412
|
jpayne@69
|
413 /* The structure for passing out data via the pcre_callout_function. We use a
|
jpayne@69
|
414 structure so that new fields can be added on the end in future versions,
|
jpayne@69
|
415 without changing the API of the function, thereby allowing old clients to work
|
jpayne@69
|
416 without modification. */
|
jpayne@69
|
417
|
jpayne@69
|
418 typedef struct pcre_callout_block {
|
jpayne@69
|
419 int version; /* Identifies version of block */
|
jpayne@69
|
420 /* ------------------------ Version 0 ------------------------------- */
|
jpayne@69
|
421 int callout_number; /* Number compiled into pattern */
|
jpayne@69
|
422 int *offset_vector; /* The offset vector */
|
jpayne@69
|
423 PCRE_SPTR subject; /* The subject being matched */
|
jpayne@69
|
424 int subject_length; /* The length of the subject */
|
jpayne@69
|
425 int start_match; /* Offset to start of this match attempt */
|
jpayne@69
|
426 int current_position; /* Where we currently are in the subject */
|
jpayne@69
|
427 int capture_top; /* Max current capture */
|
jpayne@69
|
428 int capture_last; /* Most recently closed capture */
|
jpayne@69
|
429 void *callout_data; /* Data passed in with the call */
|
jpayne@69
|
430 /* ------------------- Added for Version 1 -------------------------- */
|
jpayne@69
|
431 int pattern_position; /* Offset to next item in the pattern */
|
jpayne@69
|
432 int next_item_length; /* Length of next item in the pattern */
|
jpayne@69
|
433 /* ------------------- Added for Version 2 -------------------------- */
|
jpayne@69
|
434 const unsigned char *mark; /* Pointer to current mark or NULL */
|
jpayne@69
|
435 /* ------------------------------------------------------------------ */
|
jpayne@69
|
436 } pcre_callout_block;
|
jpayne@69
|
437
|
jpayne@69
|
438 /* Same structure as above, but with 16 bit char pointers. */
|
jpayne@69
|
439
|
jpayne@69
|
440 typedef struct pcre16_callout_block {
|
jpayne@69
|
441 int version; /* Identifies version of block */
|
jpayne@69
|
442 /* ------------------------ Version 0 ------------------------------- */
|
jpayne@69
|
443 int callout_number; /* Number compiled into pattern */
|
jpayne@69
|
444 int *offset_vector; /* The offset vector */
|
jpayne@69
|
445 PCRE_SPTR16 subject; /* The subject being matched */
|
jpayne@69
|
446 int subject_length; /* The length of the subject */
|
jpayne@69
|
447 int start_match; /* Offset to start of this match attempt */
|
jpayne@69
|
448 int current_position; /* Where we currently are in the subject */
|
jpayne@69
|
449 int capture_top; /* Max current capture */
|
jpayne@69
|
450 int capture_last; /* Most recently closed capture */
|
jpayne@69
|
451 void *callout_data; /* Data passed in with the call */
|
jpayne@69
|
452 /* ------------------- Added for Version 1 -------------------------- */
|
jpayne@69
|
453 int pattern_position; /* Offset to next item in the pattern */
|
jpayne@69
|
454 int next_item_length; /* Length of next item in the pattern */
|
jpayne@69
|
455 /* ------------------- Added for Version 2 -------------------------- */
|
jpayne@69
|
456 const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */
|
jpayne@69
|
457 /* ------------------------------------------------------------------ */
|
jpayne@69
|
458 } pcre16_callout_block;
|
jpayne@69
|
459
|
jpayne@69
|
460 /* Same structure as above, but with 32 bit char pointers. */
|
jpayne@69
|
461
|
jpayne@69
|
462 typedef struct pcre32_callout_block {
|
jpayne@69
|
463 int version; /* Identifies version of block */
|
jpayne@69
|
464 /* ------------------------ Version 0 ------------------------------- */
|
jpayne@69
|
465 int callout_number; /* Number compiled into pattern */
|
jpayne@69
|
466 int *offset_vector; /* The offset vector */
|
jpayne@69
|
467 PCRE_SPTR32 subject; /* The subject being matched */
|
jpayne@69
|
468 int subject_length; /* The length of the subject */
|
jpayne@69
|
469 int start_match; /* Offset to start of this match attempt */
|
jpayne@69
|
470 int current_position; /* Where we currently are in the subject */
|
jpayne@69
|
471 int capture_top; /* Max current capture */
|
jpayne@69
|
472 int capture_last; /* Most recently closed capture */
|
jpayne@69
|
473 void *callout_data; /* Data passed in with the call */
|
jpayne@69
|
474 /* ------------------- Added for Version 1 -------------------------- */
|
jpayne@69
|
475 int pattern_position; /* Offset to next item in the pattern */
|
jpayne@69
|
476 int next_item_length; /* Length of next item in the pattern */
|
jpayne@69
|
477 /* ------------------- Added for Version 2 -------------------------- */
|
jpayne@69
|
478 const PCRE_UCHAR32 *mark; /* Pointer to current mark or NULL */
|
jpayne@69
|
479 /* ------------------------------------------------------------------ */
|
jpayne@69
|
480 } pcre32_callout_block;
|
jpayne@69
|
481
|
jpayne@69
|
482 /* Indirection for store get and free functions. These can be set to
|
jpayne@69
|
483 alternative malloc/free functions if required. Special ones are used in the
|
jpayne@69
|
484 non-recursive case for "frames". There is also an optional callout function
|
jpayne@69
|
485 that is triggered by the (?) regex item. For Virtual Pascal, these definitions
|
jpayne@69
|
486 have to take another form. */
|
jpayne@69
|
487
|
jpayne@69
|
488 #ifndef VPCOMPAT
|
jpayne@69
|
489 PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
|
jpayne@69
|
490 PCRE_EXP_DECL void (*pcre_free)(void *);
|
jpayne@69
|
491 PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
|
jpayne@69
|
492 PCRE_EXP_DECL void (*pcre_stack_free)(void *);
|
jpayne@69
|
493 PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
|
jpayne@69
|
494 PCRE_EXP_DECL int (*pcre_stack_guard)(void);
|
jpayne@69
|
495
|
jpayne@69
|
496 PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
|
jpayne@69
|
497 PCRE_EXP_DECL void (*pcre16_free)(void *);
|
jpayne@69
|
498 PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
|
jpayne@69
|
499 PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
|
jpayne@69
|
500 PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
|
jpayne@69
|
501 PCRE_EXP_DECL int (*pcre16_stack_guard)(void);
|
jpayne@69
|
502
|
jpayne@69
|
503 PCRE_EXP_DECL void *(*pcre32_malloc)(size_t);
|
jpayne@69
|
504 PCRE_EXP_DECL void (*pcre32_free)(void *);
|
jpayne@69
|
505 PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t);
|
jpayne@69
|
506 PCRE_EXP_DECL void (*pcre32_stack_free)(void *);
|
jpayne@69
|
507 PCRE_EXP_DECL int (*pcre32_callout)(pcre32_callout_block *);
|
jpayne@69
|
508 PCRE_EXP_DECL int (*pcre32_stack_guard)(void);
|
jpayne@69
|
509 #else /* VPCOMPAT */
|
jpayne@69
|
510 PCRE_EXP_DECL void *pcre_malloc(size_t);
|
jpayne@69
|
511 PCRE_EXP_DECL void pcre_free(void *);
|
jpayne@69
|
512 PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
|
jpayne@69
|
513 PCRE_EXP_DECL void pcre_stack_free(void *);
|
jpayne@69
|
514 PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
|
jpayne@69
|
515 PCRE_EXP_DECL int pcre_stack_guard(void);
|
jpayne@69
|
516
|
jpayne@69
|
517 PCRE_EXP_DECL void *pcre16_malloc(size_t);
|
jpayne@69
|
518 PCRE_EXP_DECL void pcre16_free(void *);
|
jpayne@69
|
519 PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
|
jpayne@69
|
520 PCRE_EXP_DECL void pcre16_stack_free(void *);
|
jpayne@69
|
521 PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
|
jpayne@69
|
522 PCRE_EXP_DECL int pcre16_stack_guard(void);
|
jpayne@69
|
523
|
jpayne@69
|
524 PCRE_EXP_DECL void *pcre32_malloc(size_t);
|
jpayne@69
|
525 PCRE_EXP_DECL void pcre32_free(void *);
|
jpayne@69
|
526 PCRE_EXP_DECL void *pcre32_stack_malloc(size_t);
|
jpayne@69
|
527 PCRE_EXP_DECL void pcre32_stack_free(void *);
|
jpayne@69
|
528 PCRE_EXP_DECL int pcre32_callout(pcre32_callout_block *);
|
jpayne@69
|
529 PCRE_EXP_DECL int pcre32_stack_guard(void);
|
jpayne@69
|
530 #endif /* VPCOMPAT */
|
jpayne@69
|
531
|
jpayne@69
|
532 /* User defined callback which provides a stack just before the match starts. */
|
jpayne@69
|
533
|
jpayne@69
|
534 typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
|
jpayne@69
|
535 typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
|
jpayne@69
|
536 typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *);
|
jpayne@69
|
537
|
jpayne@69
|
538 /* Exported PCRE functions */
|
jpayne@69
|
539
|
jpayne@69
|
540 PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
|
jpayne@69
|
541 const unsigned char *);
|
jpayne@69
|
542 PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
|
jpayne@69
|
543 const unsigned char *);
|
jpayne@69
|
544 PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *,
|
jpayne@69
|
545 const unsigned char *);
|
jpayne@69
|
546 PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
|
jpayne@69
|
547 int *, const unsigned char *);
|
jpayne@69
|
548 PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
|
jpayne@69
|
549 int *, const unsigned char *);
|
jpayne@69
|
550 PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **,
|
jpayne@69
|
551 int *, const unsigned char *);
|
jpayne@69
|
552 PCRE_EXP_DECL int pcre_config(int, void *);
|
jpayne@69
|
553 PCRE_EXP_DECL int pcre16_config(int, void *);
|
jpayne@69
|
554 PCRE_EXP_DECL int pcre32_config(int, void *);
|
jpayne@69
|
555 PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
|
jpayne@69
|
556 int *, int, const char *, char *, int);
|
jpayne@69
|
557 PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
|
jpayne@69
|
558 int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
|
jpayne@69
|
559 PCRE_EXP_DECL int pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32,
|
jpayne@69
|
560 int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int);
|
jpayne@69
|
561 PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
|
jpayne@69
|
562 char *, int);
|
jpayne@69
|
563 PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
|
jpayne@69
|
564 PCRE_UCHAR16 *, int);
|
jpayne@69
|
565 PCRE_EXP_DECL int pcre32_copy_substring(PCRE_SPTR32, int *, int, int,
|
jpayne@69
|
566 PCRE_UCHAR32 *, int);
|
jpayne@69
|
567 PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
|
jpayne@69
|
568 const char *, int, int, int, int *, int , int *, int);
|
jpayne@69
|
569 PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
|
jpayne@69
|
570 PCRE_SPTR16, int, int, int, int *, int , int *, int);
|
jpayne@69
|
571 PCRE_EXP_DECL int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *,
|
jpayne@69
|
572 PCRE_SPTR32, int, int, int, int *, int , int *, int);
|
jpayne@69
|
573 PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
|
jpayne@69
|
574 int, int, int, int *, int);
|
jpayne@69
|
575 PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
|
jpayne@69
|
576 PCRE_SPTR16, int, int, int, int *, int);
|
jpayne@69
|
577 PCRE_EXP_DECL int pcre32_exec(const pcre32 *, const pcre32_extra *,
|
jpayne@69
|
578 PCRE_SPTR32, int, int, int, int *, int);
|
jpayne@69
|
579 PCRE_EXP_DECL int pcre_jit_exec(const pcre *, const pcre_extra *,
|
jpayne@69
|
580 PCRE_SPTR, int, int, int, int *, int,
|
jpayne@69
|
581 pcre_jit_stack *);
|
jpayne@69
|
582 PCRE_EXP_DECL int pcre16_jit_exec(const pcre16 *, const pcre16_extra *,
|
jpayne@69
|
583 PCRE_SPTR16, int, int, int, int *, int,
|
jpayne@69
|
584 pcre16_jit_stack *);
|
jpayne@69
|
585 PCRE_EXP_DECL int pcre32_jit_exec(const pcre32 *, const pcre32_extra *,
|
jpayne@69
|
586 PCRE_SPTR32, int, int, int, int *, int,
|
jpayne@69
|
587 pcre32_jit_stack *);
|
jpayne@69
|
588 PCRE_EXP_DECL void pcre_free_substring(const char *);
|
jpayne@69
|
589 PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
|
jpayne@69
|
590 PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32);
|
jpayne@69
|
591 PCRE_EXP_DECL void pcre_free_substring_list(const char **);
|
jpayne@69
|
592 PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
|
jpayne@69
|
593 PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *);
|
jpayne@69
|
594 PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
|
jpayne@69
|
595 void *);
|
jpayne@69
|
596 PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
|
jpayne@69
|
597 void *);
|
jpayne@69
|
598 PCRE_EXP_DECL int pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int,
|
jpayne@69
|
599 void *);
|
jpayne@69
|
600 PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
|
jpayne@69
|
601 int *, int, const char *, const char **);
|
jpayne@69
|
602 PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
|
jpayne@69
|
603 int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
|
jpayne@69
|
604 PCRE_EXP_DECL int pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32,
|
jpayne@69
|
605 int *, int, PCRE_SPTR32, PCRE_SPTR32 *);
|
jpayne@69
|
606 PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
|
jpayne@69
|
607 PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
|
jpayne@69
|
608 PCRE_EXP_DECL int pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32);
|
jpayne@69
|
609 PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
|
jpayne@69
|
610 char **, char **);
|
jpayne@69
|
611 PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
|
jpayne@69
|
612 PCRE_UCHAR16 **, PCRE_UCHAR16 **);
|
jpayne@69
|
613 PCRE_EXP_DECL int pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32,
|
jpayne@69
|
614 PCRE_UCHAR32 **, PCRE_UCHAR32 **);
|
jpayne@69
|
615 PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
|
jpayne@69
|
616 const char **);
|
jpayne@69
|
617 PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
|
jpayne@69
|
618 PCRE_SPTR16 *);
|
jpayne@69
|
619 PCRE_EXP_DECL int pcre32_get_substring(PCRE_SPTR32, int *, int, int,
|
jpayne@69
|
620 PCRE_SPTR32 *);
|
jpayne@69
|
621 PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
|
jpayne@69
|
622 const char ***);
|
jpayne@69
|
623 PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
|
jpayne@69
|
624 PCRE_SPTR16 **);
|
jpayne@69
|
625 PCRE_EXP_DECL int pcre32_get_substring_list(PCRE_SPTR32, int *, int,
|
jpayne@69
|
626 PCRE_SPTR32 **);
|
jpayne@69
|
627 PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
|
jpayne@69
|
628 PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
|
jpayne@69
|
629 PCRE_EXP_DECL const unsigned char *pcre32_maketables(void);
|
jpayne@69
|
630 PCRE_EXP_DECL int pcre_refcount(pcre *, int);
|
jpayne@69
|
631 PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
|
jpayne@69
|
632 PCRE_EXP_DECL int pcre32_refcount(pcre32 *, int);
|
jpayne@69
|
633 PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
|
jpayne@69
|
634 PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
|
jpayne@69
|
635 PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **);
|
jpayne@69
|
636 PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
|
jpayne@69
|
637 PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
|
jpayne@69
|
638 PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *);
|
jpayne@69
|
639 PCRE_EXP_DECL const char *pcre_version(void);
|
jpayne@69
|
640 PCRE_EXP_DECL const char *pcre16_version(void);
|
jpayne@69
|
641 PCRE_EXP_DECL const char *pcre32_version(void);
|
jpayne@69
|
642
|
jpayne@69
|
643 /* Utility functions for byte order swaps. */
|
jpayne@69
|
644 PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
|
jpayne@69
|
645 const unsigned char *);
|
jpayne@69
|
646 PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
|
jpayne@69
|
647 const unsigned char *);
|
jpayne@69
|
648 PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *,
|
jpayne@69
|
649 const unsigned char *);
|
jpayne@69
|
650 PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
|
jpayne@69
|
651 PCRE_SPTR16, int, int *, int);
|
jpayne@69
|
652 PCRE_EXP_DECL int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *,
|
jpayne@69
|
653 PCRE_SPTR32, int, int *, int);
|
jpayne@69
|
654
|
jpayne@69
|
655 /* JIT compiler related functions. */
|
jpayne@69
|
656
|
jpayne@69
|
657 PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
|
jpayne@69
|
658 PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
|
jpayne@69
|
659 PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int);
|
jpayne@69
|
660 PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
|
jpayne@69
|
661 PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
|
jpayne@69
|
662 PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *);
|
jpayne@69
|
663 PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
|
jpayne@69
|
664 pcre_jit_callback, void *);
|
jpayne@69
|
665 PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
|
jpayne@69
|
666 pcre16_jit_callback, void *);
|
jpayne@69
|
667 PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *,
|
jpayne@69
|
668 pcre32_jit_callback, void *);
|
jpayne@69
|
669 PCRE_EXP_DECL void pcre_jit_free_unused_memory(void);
|
jpayne@69
|
670 PCRE_EXP_DECL void pcre16_jit_free_unused_memory(void);
|
jpayne@69
|
671 PCRE_EXP_DECL void pcre32_jit_free_unused_memory(void);
|
jpayne@69
|
672
|
jpayne@69
|
673 #ifdef __cplusplus
|
jpayne@69
|
674 } /* extern "C" */
|
jpayne@69
|
675 #endif
|
jpayne@69
|
676
|
jpayne@69
|
677 #endif /* End of pcre.h */
|