| 86 |
/* When compiling a DLL for Windows, the exported symbols have to be declared |
/* When compiling a DLL for Windows, the exported symbols have to be declared |
| 87 |
using some MS magic. I found some useful information on this web page: |
using some MS magic. I found some useful information on this web page: |
| 88 |
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the |
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the |
| 89 |
information there, using __declspec(dllesport) without "extern" we have a |
information there, using __declspec(dllexport) without "extern" we have a |
| 90 |
definition; with "extern" we have a declaration. The settings here override the |
definition; with "extern" we have a declaration. The settings here override the |
| 91 |
setting in pcre.h (which is included below); it defines only PCRE_EXP_DECL, |
setting in pcre.h (which is included below); it defines only PCRE_EXP_DECL, |
| 92 |
which is all that is needed for applications, which import the symbols. We use: |
which is all that is needed for applications (they just import the symbols). We |
| 93 |
|
use: |
| 94 |
|
|
| 95 |
PCRE_EXP_DECL for declarations |
PCRE_EXP_DECL for declarations |
| 96 |
PCRE_EXP_DEFN for definitions of exported functions |
PCRE_EXP_DEFN for definitions of exported functions |
| 103 |
|
|
| 104 |
The reason for wrapping this in #ifndef PCRE_EXP_DECL is so that pcretest, |
The reason for wrapping this in #ifndef PCRE_EXP_DECL is so that pcretest, |
| 105 |
which is an application, but needs to import this file in order to "peek" at |
which is an application, but needs to import this file in order to "peek" at |
| 106 |
internals, can #include pcre.h first, can get an application's-eye view. |
internals, can #include pcre.h first to get an application's-eye view. |
| 107 |
|
|
| 108 |
In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon, |
In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon, |
| 109 |
special-purpose environments) might want to stick other stuff in front of |
special-purpose environments) might want to stick other stuff in front of |
| 855 |
ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, |
ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, |
| 856 |
ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, |
ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, |
| 857 |
ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, |
ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, |
| 858 |
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57 }; |
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58 }; |
| 859 |
|
|
| 860 |
/* The real format of the start of the pcre block; the index of names and the |
/* The real format of the start of the pcre block; the index of names and the |
| 861 |
code vector run on as long as necessary after the end. We store an explicit |
code vector run on as long as necessary after the end. We store an explicit |
| 949 |
int saved_max; /* Number of saved offsets */ |
int saved_max; /* Number of saved offsets */ |
| 950 |
} recursion_info; |
} recursion_info; |
| 951 |
|
|
|
/* When compiling in a mode that doesn't use recursive calls to match(), |
|
|
a structure is used to remember local variables on the heap. It is defined in |
|
|
pcre_exec.c, close to the match() function, so that it is easy to keep it in |
|
|
step with any changes of local variable. However, the pointer to the current |
|
|
frame must be saved in some "static" place over a longjmp(). We declare the |
|
|
structure here so that we can put a pointer in the match_data structure. NOTE: |
|
|
This isn't used for a "normal" compilation of pcre. */ |
|
|
|
|
|
struct heapframe; |
|
|
|
|
| 952 |
/* Structure for building a chain of data for holding the values of the subject |
/* Structure for building a chain of data for holding the values of the subject |
| 953 |
pointer at the start of each subpattern, so as to detect when an empty string |
pointer at the start of each subpattern, so as to detect when an empty string |
| 954 |
has been matched by a subpattern - to break infinite loops. */ |
has been matched by a subpattern - to break infinite loops. */ |
| 994 |
int eptrn; /* Next free eptrblock */ |
int eptrn; /* Next free eptrblock */ |
| 995 |
recursion_info *recursive; /* Linked list of recursion data */ |
recursion_info *recursive; /* Linked list of recursion data */ |
| 996 |
void *callout_data; /* To pass back to callouts */ |
void *callout_data; /* To pass back to callouts */ |
|
struct heapframe *thisframe; /* Used only when compiling for no recursion */ |
|
| 997 |
} match_data; |
} match_data; |
| 998 |
|
|
| 999 |
/* A similar structure is used for the same purpose by the DFA matching |
/* A similar structure is used for the same purpose by the DFA matching |
| 1079 |
one of the exported public functions. They have to be "external" in the C |
one of the exported public functions. They have to be "external" in the C |
| 1080 |
sense, but are not part of the PCRE public API. */ |
sense, but are not part of the PCRE public API. */ |
| 1081 |
|
|
| 1082 |
extern BOOL _pcre_is_newline(const uschar *, int, const uschar *, |
extern BOOL _pcre_is_newline(const uschar *, int, const uschar *, |
| 1083 |
int *, BOOL); |
int *, BOOL); |
| 1084 |
extern int _pcre_ord2utf8(int, uschar *); |
extern int _pcre_ord2utf8(int, uschar *); |
| 1085 |
extern real_pcre *_pcre_try_flipped(const real_pcre *, real_pcre *, |
extern real_pcre *_pcre_try_flipped(const real_pcre *, real_pcre *, |
| 1087 |
extern int _pcre_ucp_findprop(const unsigned int, int *, int *); |
extern int _pcre_ucp_findprop(const unsigned int, int *, int *); |
| 1088 |
extern unsigned int _pcre_ucp_othercase(const unsigned int); |
extern unsigned int _pcre_ucp_othercase(const unsigned int); |
| 1089 |
extern int _pcre_valid_utf8(const uschar *, int); |
extern int _pcre_valid_utf8(const uschar *, int); |
| 1090 |
extern BOOL _pcre_was_newline(const uschar *, int, const uschar *, |
extern BOOL _pcre_was_newline(const uschar *, int, const uschar *, |
| 1091 |
int *, BOOL); |
int *, BOOL); |
| 1092 |
extern BOOL _pcre_xclass(int, const uschar *); |
extern BOOL _pcre_xclass(int, const uschar *); |
| 1093 |
|
|