46 #define PCRE_PRERELEASE
47 #define PCRE_DATE 2008-09-05
65 #if defined(_WIN32) && !defined(PCRE_STATIC)
66 # ifndef PCRE_EXP_DECL
67 # define PCRE_EXP_DECL extern __declspec(dllimport)
70 # ifndef PCRECPP_EXP_DECL
71 # define PCRECPP_EXP_DECL extern __declspec(dllimport)
73 # ifndef PCRECPP_EXP_DEFN
74 # define PCRECPP_EXP_DEFN __declspec(dllimport)
83 # define PCRE_EXP_DECL extern "C"
85 # define PCRE_EXP_DECL extern
90 # ifndef PCRECPP_EXP_DECL
91 # define PCRECPP_EXP_DECL extern
93 # ifndef PCRECPP_EXP_DEFN
94 # define PCRECPP_EXP_DEFN
111 #ifndef PCRE_CALL_CONVENTION
113 # define PCRE_CALL_CONVENTION __cdecl
115 # define PCRE_CALL_CONVENTION
118 # define PCRE_CALL_CONVENTION
134 #define PCRE_CASELESS 0x00000001
135 #define PCRE_MULTILINE 0x00000002
136 #define PCRE_DOTALL 0x00000004
137 #define PCRE_EXTENDED 0x00000008
138 #define PCRE_ANCHORED 0x00000010
139 #define PCRE_DOLLAR_ENDONLY 0x00000020
140 #define PCRE_EXTRA 0x00000040
141 #define PCRE_NOTBOL 0x00000080
142 #define PCRE_NOTEOL 0x00000100
143 #define PCRE_UNGREEDY 0x00000200
144 #define PCRE_NOTEMPTY 0x00000400
145 #define PCRE_UTF8 0x00000800
146 #define PCRE_NO_AUTO_CAPTURE 0x00001000
147 #define PCRE_NO_UTF8_CHECK 0x00002000
148 #define PCRE_AUTO_CALLOUT 0x00004000
149 #define PCRE_PARTIAL 0x00008000
150 #define PCRE_DFA_SHORTEST 0x00010000
151 #define PCRE_DFA_RESTART 0x00020000
152 #define PCRE_FIRSTLINE 0x00040000
153 #define PCRE_DUPNAMES 0x00080000
154 #define PCRE_NEWLINE_CR 0x00100000
155 #define PCRE_NEWLINE_LF 0x00200000
156 #define PCRE_NEWLINE_CRLF 0x00300000
157 #define PCRE_NEWLINE_ANY 0x00400000
158 #define PCRE_NEWLINE_ANYCRLF 0x00500000
159 #define PCRE_BSR_ANYCRLF 0x00800000
160 #define PCRE_BSR_UNICODE 0x01000000
161 #define PCRE_JAVASCRIPT_COMPAT 0x02000000
165 #define PCRE_ERROR_NOMATCH (-1)
166 #define PCRE_ERROR_NULL (-2)
167 #define PCRE_ERROR_BADOPTION (-3)
168 #define PCRE_ERROR_BADMAGIC (-4)
169 #define PCRE_ERROR_UNKNOWN_OPCODE (-5)
170 #define PCRE_ERROR_UNKNOWN_NODE (-5)
171 #define PCRE_ERROR_NOMEMORY (-6)
172 #define PCRE_ERROR_NOSUBSTRING (-7)
173 #define PCRE_ERROR_MATCHLIMIT (-8)
174 #define PCRE_ERROR_CALLOUT (-9)
175 #define PCRE_ERROR_BADUTF8 (-10)
176 #define PCRE_ERROR_BADUTF8_OFFSET (-11)
177 #define PCRE_ERROR_PARTIAL (-12)
178 #define PCRE_ERROR_BADPARTIAL (-13)
179 #define PCRE_ERROR_INTERNAL (-14)
180 #define PCRE_ERROR_BADCOUNT (-15)
181 #define PCRE_ERROR_DFA_UITEM (-16)
182 #define PCRE_ERROR_DFA_UCOND (-17)
183 #define PCRE_ERROR_DFA_UMLIMIT (-18)
184 #define PCRE_ERROR_DFA_WSSIZE (-19)
185 #define PCRE_ERROR_DFA_RECURSE (-20)
186 #define PCRE_ERROR_RECURSIONLIMIT (-21)
187 #define PCRE_ERROR_NULLWSLIMIT (-22)
188 #define PCRE_ERROR_BADNEWLINE (-23)
192 #define PCRE_INFO_OPTIONS 0
193 #define PCRE_INFO_SIZE 1
194 #define PCRE_INFO_CAPTURECOUNT 2
195 #define PCRE_INFO_BACKREFMAX 3
196 #define PCRE_INFO_FIRSTBYTE 4
197 #define PCRE_INFO_FIRSTCHAR 4
198 #define PCRE_INFO_FIRSTTABLE 5
199 #define PCRE_INFO_LASTLITERAL 6
200 #define PCRE_INFO_NAMEENTRYSIZE 7
201 #define PCRE_INFO_NAMECOUNT 8
202 #define PCRE_INFO_NAMETABLE 9
203 #define PCRE_INFO_STUDYSIZE 10
204 #define PCRE_INFO_DEFAULT_TABLES 11
205 #define PCRE_INFO_OKPARTIAL 12
206 #define PCRE_INFO_JCHANGED 13
207 #define PCRE_INFO_HASCRORLF 14
212 #define PCRE_CONFIG_UTF8 0
213 #define PCRE_CONFIG_NEWLINE 1
214 #define PCRE_CONFIG_LINK_SIZE 2
215 #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
216 #define PCRE_CONFIG_MATCH_LIMIT 4
217 #define PCRE_CONFIG_STACKRECURSE 5
218 #define PCRE_CONFIG_UNICODE_PROPERTIES 6
219 #define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
220 #define PCRE_CONFIG_BSR 8
225 #define PCRE_EXTRA_STUDY_DATA 0x0001
226 #define PCRE_EXTRA_MATCH_LIMIT 0x0002
227 #define PCRE_EXTRA_CALLOUT_DATA 0x0004
228 #define PCRE_EXTRA_TABLES 0x0008
229 #define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
234 typedef struct real_pcre pcre;
241 #define PCRE_SPTR const char *
249 unsigned long int flags;
251 unsigned long int match_limit;
253 const unsigned char *tables;
254 unsigned long int match_limit_recursion;
270 int current_position;
275 int pattern_position;
276 int next_item_length;
287 PCRE_EXP_DECL
void* (PCRE_CALL_CONVENTION *pcre_malloc)(
size_t);
288 PCRE_EXP_DECL void (PCRE_CALL_CONVENTION *pcre_free)(
void *);
289 PCRE_EXP_DECL
void* (PCRE_CALL_CONVENTION *pcre_stack_malloc)(
size_t);
290 PCRE_EXP_DECL void (PCRE_CALL_CONVENTION *pcre_stack_free)(
void *);
293 PCRE_EXP_DECL
void* PCRE_CALL_CONVENTION pcre_malloc(
size_t);
294 PCRE_EXP_DECL
void PCRE_CALL_CONVENTION pcre_free(
void *);
295 PCRE_EXP_DECL
void* PCRE_CALL_CONVENTION pcre_stack_malloc(
size_t);
296 PCRE_EXP_DECL
void PCRE_CALL_CONVENTION pcre_stack_free(
void *);
302 PCRE_EXP_DECL pcre* PCRE_CALL_CONVENTION pcre_compile(
const char *,
int,
const char **,
int *,
303 const unsigned char *);
304 PCRE_EXP_DECL pcre* PCRE_CALL_CONVENTION pcre_compile2(
const char *,
int,
int *,
const char **,
305 int *,
const unsigned char *);
306 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_config(
int,
void *);
307 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_copy_named_substring(
const pcre *,
const char *,
308 int *,
int,
const char *,
char *,
int);
309 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_copy_substring(
const char *,
int *,
int,
int,
char *,
311 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_dfa_exec(
const pcre *,
const pcre_extra *,
312 const char *,
int,
int,
int,
int *,
int ,
int *,
int);
313 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_exec(
const pcre *,
const pcre_extra *, PCRE_SPTR,
314 int,
int,
int,
int *,
int);
315 PCRE_EXP_DECL
void PCRE_CALL_CONVENTION pcre_free_substring(
const char *);
316 PCRE_EXP_DECL
void PCRE_CALL_CONVENTION pcre_free_substring_list(
const char **);
317 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_fullinfo(
const pcre *,
const pcre_extra *,
int,
319 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_get_named_substring(
const pcre *,
const char *,
320 int *,
int,
const char *,
const char **);
321 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_get_stringnumber(
const pcre *,
const char *);
322 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_get_stringtable_entries(
const pcre *,
const char *,
324 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_get_substring(
const char *,
int *,
int,
int,
326 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_get_substring_list(
const char *,
int *,
int,
328 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_info(
const pcre *,
int *,
int *);
329 PCRE_EXP_DECL
const unsigned char* PCRE_CALL_CONVENTION pcre_maketables(
void);
330 PCRE_EXP_DECL
int PCRE_CALL_CONVENTION pcre_refcount(pcre *,
int);
331 PCRE_EXP_DECL
pcre_extra* PCRE_CALL_CONVENTION pcre_study(
const pcre *,
int,
const char **);
332 PCRE_EXP_DECL
const char* PCRE_CALL_CONVENTION pcre_version(
void);