00001
00002
00003
00004
00005
00006
00007 #ifndef _PCRE_H
00008 #define _PCRE_H
00009
00010
00011
00012
00013 #define PCRE_MAJOR 3
00014 #define PCRE_MINOR 9
00015 #define PCRE_DATE 02-Jan-2002
00016
00017
00018
00019 #ifdef _WIN32
00020 # ifdef STATIC
00021 # define PCRE_DL_IMPORT
00022 # else
00023 # define PCRE_DL_IMPORT __declspec(dllimport)
00024 # endif
00025 #else
00026 # define PCRE_DL_IMPORT
00027 #endif
00028
00029
00030
00031
00032 #include <stdlib.h>
00033
00034
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041
00042 #define PCRE_CASELESS 0x0001
00043 #define PCRE_MULTILINE 0x0002
00044 #define PCRE_DOTALL 0x0004
00045 #define PCRE_EXTENDED 0x0008
00046 #define PCRE_ANCHORED 0x0010
00047 #define PCRE_DOLLAR_ENDONLY 0x0020
00048 #define PCRE_EXTRA 0x0040
00049 #define PCRE_NOTBOL 0x0080
00050 #define PCRE_NOTEOL 0x0100
00051 #define PCRE_UNGREEDY 0x0200
00052 #define PCRE_NOTEMPTY 0x0400
00053 #define PCRE_UTF8 0x0800
00054
00055
00056
00057 #define PCRE_ERROR_NOMATCH (-1)
00058 #define PCRE_ERROR_NULL (-2)
00059 #define PCRE_ERROR_BADOPTION (-3)
00060 #define PCRE_ERROR_BADMAGIC (-4)
00061 #define PCRE_ERROR_UNKNOWN_NODE (-5)
00062 #define PCRE_ERROR_NOMEMORY (-6)
00063 #define PCRE_ERROR_NOSUBSTRING (-7)
00064
00065
00066
00067 #define PCRE_INFO_OPTIONS 0
00068 #define PCRE_INFO_SIZE 1
00069 #define PCRE_INFO_CAPTURECOUNT 2
00070 #define PCRE_INFO_BACKREFMAX 3
00071 #define PCRE_INFO_FIRSTCHAR 4
00072 #define PCRE_INFO_FIRSTTABLE 5
00073 #define PCRE_INFO_LASTLITERAL 6
00074
00075
00076
00077 struct real_pcre;
00078 struct real_pcre_extra;
00079
00080 typedef struct real_pcre pcre;
00081 typedef struct real_pcre_extra pcre_extra;
00082
00083
00084
00085
00086
00087 PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
00088 PCRE_DL_IMPORT extern void (*pcre_free)(void *);
00089
00090 #undef PCRE_DL_IMPORT
00091
00092
00093
00094 extern pcre *pcre_compile(const char *, int, const char **, int *,
00095 const unsigned char *);
00096 extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
00097 extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
00098 int, int, int, int *, int);
00099 extern void pcre_free_substring(const char *);
00100 extern void pcre_free_substring_list(const char **);
00101 extern int pcre_get_substring(const char *, int *, int, int, const char **);
00102 extern int pcre_get_substring_list(const char *, int *, int, const char ***);
00103 extern int pcre_info(const pcre *, int *, int *);
00104 extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
00105 extern const unsigned char *pcre_maketables(void);
00106 extern pcre_extra *pcre_study(const pcre *, int, const char **);
00107 extern const char *pcre_version(void);
00108
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112
00113 #endif