PageRenderTime 50ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/harbour/src/3rd/pcre/pcre.h

#
C Header | 503 lines | 345 code | 59 blank | 99 comment | 1 complexity | 70bc7ce2d8901b8e33a90357cb2e10c4 MD5 | raw file
Possible License(s): AGPL-1.0, BSD-3-Clause, CC-BY-SA-3.0, LGPL-3.0, GPL-2.0, LGPL-2.0, LGPL-2.1
  1. /*************************************************
  2. * Perl-Compatible Regular Expressions *
  3. *************************************************/
  4. /* This is the public header file for the PCRE library, to be #included by
  5. applications that call the PCRE functions.
  6. Copyright (c) 1997-2012 University of Cambridge
  7. -----------------------------------------------------------------------------
  8. Redistribution and use in source and binary forms, with or without
  9. modification, are permitted provided that the following conditions are met:
  10. * Redistributions of source code must retain the above copyright notice,
  11. this list of conditions and the following disclaimer.
  12. * Redistributions in binary form must reproduce the above copyright
  13. notice, this list of conditions and the following disclaimer in the
  14. documentation and/or other materials provided with the distribution.
  15. * Neither the name of the University of Cambridge nor the names of its
  16. contributors may be used to endorse or promote products derived from
  17. this software without specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  22. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  23. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  24. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  26. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  28. POSSIBILITY OF SUCH DAMAGE.
  29. -----------------------------------------------------------------------------
  30. */
  31. #ifndef _PCRE_H
  32. #define _PCRE_H
  33. /* The current PCRE version information. */
  34. #define PCRE_MAJOR 8
  35. #define PCRE_MINOR 30
  36. #define PCRE_PRERELEASE
  37. #define PCRE_DATE 2012-02-04
  38. /* When an application links to a PCRE DLL in Windows, the symbols that are
  39. imported have to be identified as such. When building PCRE, the appropriate
  40. export setting is defined in pcre_internal.h, which includes this file. So we
  41. don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
  42. #if defined(_WIN32) && !defined(PCRE_STATIC)
  43. # ifndef PCRE_EXP_DECL
  44. # define PCRE_EXP_DECL extern __declspec(dllimport)
  45. # endif
  46. # ifdef __cplusplus
  47. # ifndef PCRECPP_EXP_DECL
  48. # define PCRECPP_EXP_DECL extern __declspec(dllimport)
  49. # endif
  50. # ifndef PCRECPP_EXP_DEFN
  51. # define PCRECPP_EXP_DEFN __declspec(dllimport)
  52. # endif
  53. # endif
  54. #endif
  55. /* By default, we use the standard "extern" declarations. */
  56. #ifndef PCRE_EXP_DECL
  57. # ifdef __cplusplus
  58. # define PCRE_EXP_DECL extern "C"
  59. # else
  60. # define PCRE_EXP_DECL extern
  61. # endif
  62. #endif
  63. #ifdef __cplusplus
  64. # ifndef PCRECPP_EXP_DECL
  65. # define PCRECPP_EXP_DECL extern
  66. # endif
  67. # ifndef PCRECPP_EXP_DEFN
  68. # define PCRECPP_EXP_DEFN
  69. # endif
  70. #endif
  71. /* Have to include stdlib.h in order to ensure that size_t is defined;
  72. it is needed here for malloc. */
  73. #include <stdlib.h>
  74. /* Allow for C++ users */
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78. /* Options. Some are compile-time only, some are run-time only, and some are
  79. both, so we keep them all distinct. However, almost all the bits in the options
  80. word are now used. In the long run, we may have to re-use some of the
  81. compile-time only bits for runtime options, or vice versa. In the comments
  82. below, "compile", "exec", and "DFA exec" mean that the option is permitted to
  83. be set for those functions; "used in" means that an option may be set only for
  84. compile, but is subsequently referenced in exec and/or DFA exec. Any of the
  85. compile-time options may be inspected during studying (and therefore JIT
  86. compiling). */
  87. #define PCRE_CASELESS 0x00000001 /* Compile */
  88. #define PCRE_MULTILINE 0x00000002 /* Compile */
  89. #define PCRE_DOTALL 0x00000004 /* Compile */
  90. #define PCRE_EXTENDED 0x00000008 /* Compile */
  91. #define PCRE_ANCHORED 0x00000010 /* Compile, exec, DFA exec */
  92. #define PCRE_DOLLAR_ENDONLY 0x00000020 /* Compile, used in exec, DFA exec */
  93. #define PCRE_EXTRA 0x00000040 /* Compile */
  94. #define PCRE_NOTBOL 0x00000080 /* Exec, DFA exec */
  95. #define PCRE_NOTEOL 0x00000100 /* Exec, DFA exec */
  96. #define PCRE_UNGREEDY 0x00000200 /* Compile */
  97. #define PCRE_NOTEMPTY 0x00000400 /* Exec, DFA exec */
  98. /* The next two are also used in exec and DFA exec */
  99. #define PCRE_UTF8 0x00000800 /* Compile (same as PCRE_UTF16) */
  100. #define PCRE_UTF16 0x00000800 /* Compile (same as PCRE_UTF8) */
  101. #define PCRE_NO_AUTO_CAPTURE 0x00001000 /* Compile */
  102. /* The next two are also used in exec and DFA exec */
  103. #define PCRE_NO_UTF8_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF16_CHECK) */
  104. #define PCRE_NO_UTF16_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF8_CHECK) */
  105. #define PCRE_AUTO_CALLOUT 0x00004000 /* Compile */
  106. #define PCRE_PARTIAL_SOFT 0x00008000 /* Exec, DFA exec */
  107. #define PCRE_PARTIAL 0x00008000 /* Backwards compatible synonym */
  108. #define PCRE_DFA_SHORTEST 0x00010000 /* DFA exec */
  109. #define PCRE_DFA_RESTART 0x00020000 /* DFA exec */
  110. #define PCRE_FIRSTLINE 0x00040000 /* Compile, used in exec, DFA exec */
  111. #define PCRE_DUPNAMES 0x00080000 /* Compile */
  112. #define PCRE_NEWLINE_CR 0x00100000 /* Compile, exec, DFA exec */
  113. #define PCRE_NEWLINE_LF 0x00200000 /* Compile, exec, DFA exec */
  114. #define PCRE_NEWLINE_CRLF 0x00300000 /* Compile, exec, DFA exec */
  115. #define PCRE_NEWLINE_ANY 0x00400000 /* Compile, exec, DFA exec */
  116. #define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Compile, exec, DFA exec */
  117. #define PCRE_BSR_ANYCRLF 0x00800000 /* Compile, exec, DFA exec */
  118. #define PCRE_BSR_UNICODE 0x01000000 /* Compile, exec, DFA exec */
  119. #define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Compile, used in exec */
  120. #define PCRE_NO_START_OPTIMIZE 0x04000000 /* Compile, exec, DFA exec */
  121. #define PCRE_NO_START_OPTIMISE 0x04000000 /* Synonym */
  122. #define PCRE_PARTIAL_HARD 0x08000000 /* Exec, DFA exec */
  123. #define PCRE_NOTEMPTY_ATSTART 0x10000000 /* Exec, DFA exec */
  124. #define PCRE_UCP 0x20000000 /* Compile, used in exec, DFA exec */
  125. /* Exec-time and get/set-time error codes */
  126. #define PCRE_ERROR_NOMATCH (-1)
  127. #define PCRE_ERROR_NULL (-2)
  128. #define PCRE_ERROR_BADOPTION (-3)
  129. #define PCRE_ERROR_BADMAGIC (-4)
  130. #define PCRE_ERROR_UNKNOWN_OPCODE (-5)
  131. #define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
  132. #define PCRE_ERROR_NOMEMORY (-6)
  133. #define PCRE_ERROR_NOSUBSTRING (-7)
  134. #define PCRE_ERROR_MATCHLIMIT (-8)
  135. #define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
  136. #define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16 */
  137. #define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16 */
  138. #define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
  139. #define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
  140. #define PCRE_ERROR_PARTIAL (-12)
  141. #define PCRE_ERROR_BADPARTIAL (-13)
  142. #define PCRE_ERROR_INTERNAL (-14)
  143. #define PCRE_ERROR_BADCOUNT (-15)
  144. #define PCRE_ERROR_DFA_UITEM (-16)
  145. #define PCRE_ERROR_DFA_UCOND (-17)
  146. #define PCRE_ERROR_DFA_UMLIMIT (-18)
  147. #define PCRE_ERROR_DFA_WSSIZE (-19)
  148. #define PCRE_ERROR_DFA_RECURSE (-20)
  149. #define PCRE_ERROR_RECURSIONLIMIT (-21)
  150. #define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
  151. #define PCRE_ERROR_BADNEWLINE (-23)
  152. #define PCRE_ERROR_BADOFFSET (-24)
  153. #define PCRE_ERROR_SHORTUTF8 (-25)
  154. #define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */
  155. #define PCRE_ERROR_RECURSELOOP (-26)
  156. #define PCRE_ERROR_JIT_STACKLIMIT (-27)
  157. #define PCRE_ERROR_BADMODE (-28)
  158. #define PCRE_ERROR_BADENDIANNESS (-29)
  159. /* Specific error codes for UTF-8 validity checks */
  160. #define PCRE_UTF8_ERR0 0
  161. #define PCRE_UTF8_ERR1 1
  162. #define PCRE_UTF8_ERR2 2
  163. #define PCRE_UTF8_ERR3 3
  164. #define PCRE_UTF8_ERR4 4
  165. #define PCRE_UTF8_ERR5 5
  166. #define PCRE_UTF8_ERR6 6
  167. #define PCRE_UTF8_ERR7 7
  168. #define PCRE_UTF8_ERR8 8
  169. #define PCRE_UTF8_ERR9 9
  170. #define PCRE_UTF8_ERR10 10
  171. #define PCRE_UTF8_ERR11 11
  172. #define PCRE_UTF8_ERR12 12
  173. #define PCRE_UTF8_ERR13 13
  174. #define PCRE_UTF8_ERR14 14
  175. #define PCRE_UTF8_ERR15 15
  176. #define PCRE_UTF8_ERR16 16
  177. #define PCRE_UTF8_ERR17 17
  178. #define PCRE_UTF8_ERR18 18
  179. #define PCRE_UTF8_ERR19 19
  180. #define PCRE_UTF8_ERR20 20
  181. #define PCRE_UTF8_ERR21 21
  182. /* Specific error codes for UTF-16 validity checks */
  183. #define PCRE_UTF16_ERR0 0
  184. #define PCRE_UTF16_ERR1 1
  185. #define PCRE_UTF16_ERR2 2
  186. #define PCRE_UTF16_ERR3 3
  187. #define PCRE_UTF16_ERR4 4
  188. /* Request types for pcre_fullinfo() */
  189. #define PCRE_INFO_OPTIONS 0
  190. #define PCRE_INFO_SIZE 1
  191. #define PCRE_INFO_CAPTURECOUNT 2
  192. #define PCRE_INFO_BACKREFMAX 3
  193. #define PCRE_INFO_FIRSTBYTE 4
  194. #define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
  195. #define PCRE_INFO_FIRSTTABLE 5
  196. #define PCRE_INFO_LASTLITERAL 6
  197. #define PCRE_INFO_NAMEENTRYSIZE 7
  198. #define PCRE_INFO_NAMECOUNT 8
  199. #define PCRE_INFO_NAMETABLE 9
  200. #define PCRE_INFO_STUDYSIZE 10
  201. #define PCRE_INFO_DEFAULT_TABLES 11
  202. #define PCRE_INFO_OKPARTIAL 12
  203. #define PCRE_INFO_JCHANGED 13
  204. #define PCRE_INFO_HASCRORLF 14
  205. #define PCRE_INFO_MINLENGTH 15
  206. #define PCRE_INFO_JIT 16
  207. #define PCRE_INFO_JITSIZE 17
  208. /* Request types for pcre_config(). Do not re-arrange, in order to remain
  209. compatible. */
  210. #define PCRE_CONFIG_UTF8 0
  211. #define PCRE_CONFIG_NEWLINE 1
  212. #define PCRE_CONFIG_LINK_SIZE 2
  213. #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
  214. #define PCRE_CONFIG_MATCH_LIMIT 4
  215. #define PCRE_CONFIG_STACKRECURSE 5
  216. #define PCRE_CONFIG_UNICODE_PROPERTIES 6
  217. #define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
  218. #define PCRE_CONFIG_BSR 8
  219. #define PCRE_CONFIG_JIT 9
  220. #define PCRE_CONFIG_UTF16 10
  221. #define PCRE_CONFIG_JITTARGET 11
  222. /* Request types for pcre_study(). Do not re-arrange, in order to remain
  223. compatible. */
  224. #define PCRE_STUDY_JIT_COMPILE 0x0001
  225. /* Bit flags for the pcre[16]_extra structure. Do not re-arrange or redefine
  226. these bits, just add new ones on the end, in order to remain compatible. */
  227. #define PCRE_EXTRA_STUDY_DATA 0x0001
  228. #define PCRE_EXTRA_MATCH_LIMIT 0x0002
  229. #define PCRE_EXTRA_CALLOUT_DATA 0x0004
  230. #define PCRE_EXTRA_TABLES 0x0008
  231. #define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
  232. #define PCRE_EXTRA_MARK 0x0020
  233. #define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
  234. /* Types */
  235. struct real_pcre; /* declaration; the definition is private */
  236. typedef struct real_pcre pcre;
  237. struct real_pcre16; /* declaration; the definition is private */
  238. typedef struct real_pcre16 pcre16;
  239. struct real_pcre_jit_stack; /* declaration; the definition is private */
  240. typedef struct real_pcre_jit_stack pcre_jit_stack;
  241. struct real_pcre16_jit_stack; /* declaration; the definition is private */
  242. typedef struct real_pcre16_jit_stack pcre16_jit_stack;
  243. /* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
  244. a 16 bit wide signed data type. Otherwise it can be a dummy data type since
  245. pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
  246. #ifndef PCRE_UCHAR16
  247. #define PCRE_UCHAR16 unsigned short
  248. #endif
  249. #ifndef PCRE_SPTR16
  250. #define PCRE_SPTR16 const PCRE_UCHAR16 *
  251. #endif
  252. /* When PCRE is compiled as a C++ library, the subject pointer type can be
  253. replaced with a custom type. For conventional use, the public interface is a
  254. const char *. */
  255. #ifndef PCRE_SPTR
  256. #define PCRE_SPTR const char *
  257. #endif
  258. /* The structure for passing additional data to pcre_exec(). This is defined in
  259. such as way as to be extensible. Always add new fields at the end, in order to
  260. remain compatible. */
  261. typedef struct pcre_extra {
  262. unsigned long int flags; /* Bits for which fields are set */
  263. void *study_data; /* Opaque data from pcre_study() */
  264. unsigned long int match_limit; /* Maximum number of calls to match() */
  265. void *callout_data; /* Data passed back in callouts */
  266. const unsigned char *tables; /* Pointer to character tables */
  267. unsigned long int match_limit_recursion; /* Max recursive calls to match() */
  268. unsigned char **mark; /* For passing back a mark pointer */
  269. void *executable_jit; /* Contains a pointer to a compiled jit code */
  270. } pcre_extra;
  271. /* Same structure as above, but with 16 bit char pointers. */
  272. typedef struct pcre16_extra {
  273. unsigned long int flags; /* Bits for which fields are set */
  274. void *study_data; /* Opaque data from pcre_study() */
  275. unsigned long int match_limit; /* Maximum number of calls to match() */
  276. void *callout_data; /* Data passed back in callouts */
  277. const unsigned char *tables; /* Pointer to character tables */
  278. unsigned long int match_limit_recursion; /* Max recursive calls to match() */
  279. PCRE_UCHAR16 **mark; /* For passing back a mark pointer */
  280. void *executable_jit; /* Contains a pointer to a compiled jit code */
  281. } pcre16_extra;
  282. /* The structure for passing out data via the pcre_callout_function. We use a
  283. structure so that new fields can be added on the end in future versions,
  284. without changing the API of the function, thereby allowing old clients to work
  285. without modification. */
  286. typedef struct pcre_callout_block {
  287. int version; /* Identifies version of block */
  288. /* ------------------------ Version 0 ------------------------------- */
  289. int callout_number; /* Number compiled into pattern */
  290. int *offset_vector; /* The offset vector */
  291. PCRE_SPTR subject; /* The subject being matched */
  292. int subject_length; /* The length of the subject */
  293. int start_match; /* Offset to start of this match attempt */
  294. int current_position; /* Where we currently are in the subject */
  295. int capture_top; /* Max current capture */
  296. int capture_last; /* Most recently closed capture */
  297. void *callout_data; /* Data passed in with the call */
  298. /* ------------------- Added for Version 1 -------------------------- */
  299. int pattern_position; /* Offset to next item in the pattern */
  300. int next_item_length; /* Length of next item in the pattern */
  301. /* ------------------- Added for Version 2 -------------------------- */
  302. const unsigned char *mark; /* Pointer to current mark or NULL */
  303. /* ------------------------------------------------------------------ */
  304. } pcre_callout_block;
  305. /* Same structure as above, but with 16 bit char pointers. */
  306. typedef struct pcre16_callout_block {
  307. int version; /* Identifies version of block */
  308. /* ------------------------ Version 0 ------------------------------- */
  309. int callout_number; /* Number compiled into pattern */
  310. int *offset_vector; /* The offset vector */
  311. PCRE_SPTR16 subject; /* The subject being matched */
  312. int subject_length; /* The length of the subject */
  313. int start_match; /* Offset to start of this match attempt */
  314. int current_position; /* Where we currently are in the subject */
  315. int capture_top; /* Max current capture */
  316. int capture_last; /* Most recently closed capture */
  317. void *callout_data; /* Data passed in with the call */
  318. /* ------------------- Added for Version 1 -------------------------- */
  319. int pattern_position; /* Offset to next item in the pattern */
  320. int next_item_length; /* Length of next item in the pattern */
  321. /* ------------------- Added for Version 2 -------------------------- */
  322. const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */
  323. /* ------------------------------------------------------------------ */
  324. } pcre16_callout_block;
  325. /* Indirection for store get and free functions. These can be set to
  326. alternative malloc/free functions if required. Special ones are used in the
  327. non-recursive case for "frames". There is also an optional callout function
  328. that is triggered by the (?) regex item. For Virtual Pascal, these definitions
  329. have to take another form. */
  330. #ifndef VPCOMPAT
  331. PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
  332. PCRE_EXP_DECL void (*pcre_free)(void *);
  333. PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
  334. PCRE_EXP_DECL void (*pcre_stack_free)(void *);
  335. PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
  336. PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
  337. PCRE_EXP_DECL void (*pcre16_free)(void *);
  338. PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
  339. PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
  340. PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
  341. #else /* VPCOMPAT */
  342. PCRE_EXP_DECL void *pcre_malloc(size_t);
  343. PCRE_EXP_DECL void pcre_free(void *);
  344. PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
  345. PCRE_EXP_DECL void pcre_stack_free(void *);
  346. PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
  347. PCRE_EXP_DECL void *pcre16_malloc(size_t);
  348. PCRE_EXP_DECL void pcre16_free(void *);
  349. PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
  350. PCRE_EXP_DECL void pcre16_stack_free(void *);
  351. PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
  352. #endif /* VPCOMPAT */
  353. /* User defined callback which provides a stack just before the match starts. */
  354. typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
  355. typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
  356. /* Exported PCRE functions */
  357. PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
  358. const unsigned char *);
  359. PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
  360. const unsigned char *);
  361. PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
  362. int *, const unsigned char *);
  363. PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
  364. int *, const unsigned char *);
  365. PCRE_EXP_DECL int pcre_config(int, void *);
  366. PCRE_EXP_DECL int pcre16_config(int, void *);
  367. PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
  368. int *, int, const char *, char *, int);
  369. PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
  370. int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
  371. PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
  372. char *, int);
  373. PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
  374. PCRE_UCHAR16 *, int);
  375. PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
  376. const char *, int, int, int, int *, int , int *, int);
  377. PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
  378. PCRE_SPTR16, int, int, int, int *, int , int *, int);
  379. PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
  380. int, int, int, int *, int);
  381. PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
  382. PCRE_SPTR16, int, int, int, int *, int);
  383. PCRE_EXP_DECL void pcre_free_substring(const char *);
  384. PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
  385. PCRE_EXP_DECL void pcre_free_substring_list(const char **);
  386. PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
  387. PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
  388. void *);
  389. PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
  390. void *);
  391. PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
  392. int *, int, const char *, const char **);
  393. PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
  394. int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
  395. PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
  396. PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
  397. PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
  398. char **, char **);
  399. PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
  400. PCRE_UCHAR16 **, PCRE_UCHAR16 **);
  401. PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
  402. const char **);
  403. PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
  404. PCRE_SPTR16 *);
  405. PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
  406. const char ***);
  407. PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
  408. PCRE_SPTR16 **);
  409. PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
  410. PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
  411. PCRE_EXP_DECL int pcre_refcount(pcre *, int);
  412. PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
  413. PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
  414. PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
  415. PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
  416. PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
  417. PCRE_EXP_DECL const char *pcre_version(void);
  418. PCRE_EXP_DECL const char *pcre16_version(void);
  419. /* Utility functions for byte order swaps. */
  420. PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
  421. const unsigned char *);
  422. PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
  423. const unsigned char *);
  424. PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
  425. PCRE_SPTR16, int, int *, int);
  426. /* JIT compiler related functions. */
  427. PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
  428. PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
  429. PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
  430. PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
  431. PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
  432. pcre_jit_callback, void *);
  433. PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
  434. pcre16_jit_callback, void *);
  435. #ifdef __cplusplus
  436. } /* extern "C" */
  437. #endif
  438. #endif /* End of pcre.h */