/[pcre]/code/trunk/pcre.in
ViewVC logotype

Contents of /code/trunk/pcre.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43 - (show annotations) (download)
Sat Feb 24 21:39:21 2007 UTC (7 years, 5 months ago) by nigel
File size: 2906 byte(s)
Load pcre-3.0 into code/trunk.

1 /*************************************************
2 * Perl-Compatible Regular Expressions *
3 *************************************************/
4
5 /* Copyright (c) 1997-2000 University of Cambridge */
6
7 #ifndef _PCRE_H
8 #define _PCRE_H
9
10 #define PCRE_MAJOR @PCRE_MAJOR@
11 #define PCRE_MINOR @PCRE_MINOR@
12 #define PCRE_DATE @PCRE_DATE@
13
14 /* Win32 uses DLL by default */
15
16 #ifdef _WIN32
17 # ifdef STATIC
18 # define PCRE_DL_IMPORT
19 # else
20 # define PCRE_DL_IMPORT __declspec(dllimport)
21 # endif
22 #else
23 # define PCRE_DL_IMPORT
24 #endif
25
26 /* Have to include stdlib.h in order to ensure that size_t is defined;
27 it is needed here for malloc. */
28
29 #include <sys/types.h>
30 #include <stdlib.h>
31
32 /* Allow for C++ users */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Options */
39
40 #define PCRE_CASELESS 0x0001
41 #define PCRE_MULTILINE 0x0002
42 #define PCRE_DOTALL 0x0004
43 #define PCRE_EXTENDED 0x0008
44 #define PCRE_ANCHORED 0x0010
45 #define PCRE_DOLLAR_ENDONLY 0x0020
46 #define PCRE_EXTRA 0x0040
47 #define PCRE_NOTBOL 0x0080
48 #define PCRE_NOTEOL 0x0100
49 #define PCRE_UNGREEDY 0x0200
50 #define PCRE_NOTEMPTY 0x0400
51
52 /* Exec-time and get-time error codes */
53
54 #define PCRE_ERROR_NOMATCH (-1)
55 #define PCRE_ERROR_NULL (-2)
56 #define PCRE_ERROR_BADOPTION (-3)
57 #define PCRE_ERROR_BADMAGIC (-4)
58 #define PCRE_ERROR_UNKNOWN_NODE (-5)
59 #define PCRE_ERROR_NOMEMORY (-6)
60 #define PCRE_ERROR_NOSUBSTRING (-7)
61
62 /* Request types for pcre_fullinfo() */
63
64 #define PCRE_INFO_OPTIONS 0
65 #define PCRE_INFO_SIZE 1
66 #define PCRE_INFO_CAPTURECOUNT 2
67 #define PCRE_INFO_BACKREFMAX 3
68 #define PCRE_INFO_FIRSTCHAR 4
69 #define PCRE_INFO_FIRSTTABLE 5
70 #define PCRE_INFO_LASTLITERAL 6
71
72 /* Types */
73
74 typedef void pcre;
75 typedef void pcre_extra;
76
77 /* Store get and free functions. These can be set to alternative malloc/free
78 functions if required. Some magic is required for Win32 DLL; it is null on
79 other OS. */
80
81 PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
82 PCRE_DL_IMPORT extern void (*pcre_free)(void *);
83
84 #undef PCRE_DL_IMPORT
85
86 /* Functions */
87
88 extern pcre *pcre_compile(const char *, int, const char **, int *,
89 const unsigned char *);
90 extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
91 extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
92 int, int, int, int *, int);
93 extern int pcre_get_substring(const char *, int *, int, int, const char **);
94 extern int pcre_get_substring_list(const char *, int *, int, const char ***);
95 extern int pcre_info(const pcre *, int *, int *);
96 extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
97 extern unsigned const char *pcre_maketables(void);
98 extern pcre_extra *pcre_study(const pcre *, int, const char **);
99 extern const char *pcre_version(void);
100
101 #ifdef __cplusplus
102 } /* extern "C" */
103 #endif
104
105 #endif /* End of pcre.h */

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12