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

Contents of /code/trunk/pcre.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 39 - (hide annotations) (download)
Sat Feb 24 21:39:13 2007 UTC (6 years, 2 months ago) by nigel
File MIME type: text/plain
File size: 2518 byte(s)
Load pcre-2.08 into code/trunk.

1 nigel 3 /*************************************************
2     * Perl-Compatible Regular Expressions *
3     *************************************************/
4    
5 nigel 27 /* Copyright (c) 1997-1999 University of Cambridge */
6 nigel 3
7     #ifndef _PCRE_H
8     #define _PCRE_H
9    
10 nigel 39 #define PCRE_MAJOR 2
11     #define PCRE_MINOR 08
12     #define PCRE_DATE 31-Aug-1999
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 nigel 3 /* Have to include stdlib.h in order to ensure that size_t is defined;
27     it is needed here for malloc. */
28    
29 nigel 9 #include <sys/types.h>
30 nigel 3 #include <stdlib.h>
31    
32 nigel 15 /* Allow for C++ users */
33    
34     #ifdef __cplusplus
35     extern "C" {
36     #endif
37    
38 nigel 3 /* Options */
39    
40     #define PCRE_CASELESS 0x0001
41 nigel 23 #define PCRE_MULTILINE 0x0002
42     #define PCRE_DOTALL 0x0004
43     #define PCRE_EXTENDED 0x0008
44     #define PCRE_ANCHORED 0x0010
45 nigel 3 #define PCRE_DOLLAR_ENDONLY 0x0020
46     #define PCRE_EXTRA 0x0040
47     #define PCRE_NOTBOL 0x0080
48     #define PCRE_NOTEOL 0x0100
49 nigel 19 #define PCRE_UNGREEDY 0x0200
50 nigel 37 #define PCRE_NOTEMPTY 0x0400
51 nigel 3
52 nigel 29 /* Exec-time and get-time error codes */
53 nigel 3
54     #define PCRE_ERROR_NOMATCH (-1)
55 nigel 23 #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 nigel 29 #define PCRE_ERROR_NOSUBSTRING (-7)
61 nigel 3
62     /* Types */
63    
64     typedef void pcre;
65     typedef void pcre_extra;
66    
67     /* Store get and free functions. These can be set to alternative malloc/free
68 nigel 39 functions if required. Some magic is required for Win32 DLL; it is null on
69     other OS. */
70 nigel 3
71 nigel 39 PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
72     PCRE_DL_IMPORT extern void (*pcre_free)(void *);
73 nigel 3
74 nigel 39 #undef PCRE_DL_IMPORT
75    
76 nigel 3 /* Functions */
77    
78 nigel 25 extern pcre *pcre_compile(const char *, int, const char **, int *,
79     const unsigned char *);
80 nigel 29 extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
81 nigel 3 extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
82 nigel 35 int, int, int, int *, int);
83 nigel 29 extern int pcre_get_substring(const char *, int *, int, int, const char **);
84     extern int pcre_get_substring_list(const char *, int *, int, const char ***);
85     extern int pcre_info(const pcre *, int *, int *);
86 nigel 25 extern unsigned const char *pcre_maketables(void);
87 nigel 7 extern pcre_extra *pcre_study(const pcre *, int, const char **);
88     extern const char *pcre_version(void);
89 nigel 3
90 nigel 15 #ifdef __cplusplus
91     } /* extern "C" */
92     #endif
93    
94 nigel 3 #endif /* End of pcre.h */

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12