5043 |
with errorptr and erroroffset set |
with errorptr and erroroffset set |
5044 |
*/ |
*/ |
5045 |
|
|
5046 |
PCRE_DATA_SCOPE pcre * |
PCRE_EXP_DEFN pcre * |
5047 |
pcre_compile(const char *pattern, int options, const char **errorptr, |
pcre_compile(const char *pattern, int options, const char **errorptr, |
5048 |
int *erroroffset, const unsigned char *tables) |
int *erroroffset, const unsigned char *tables) |
5049 |
{ |
{ |
5051 |
} |
} |
5052 |
|
|
5053 |
|
|
5054 |
PCRE_DATA_SCOPE pcre * |
PCRE_EXP_DEFN pcre * |
5055 |
pcre_compile2(const char *pattern, int options, int *errorcodeptr, |
pcre_compile2(const char *pattern, int options, int *errorcodeptr, |
5056 |
const char **errorptr, int *erroroffset, const unsigned char *tables) |
const char **errorptr, int *erroroffset, const unsigned char *tables) |
5057 |
{ |
{ |
5100 |
if (erroroffset == NULL) |
if (erroroffset == NULL) |
5101 |
{ |
{ |
5102 |
errorcode = ERR16; |
errorcode = ERR16; |
5103 |
goto PCRE_EARLY_ERROR_RETURN; |
goto PCRE_EARLY_ERROR_RETURN2; |
5104 |
} |
} |
5105 |
|
|
5106 |
*erroroffset = 0; |
*erroroffset = 0; |
5113 |
(*erroroffset = _pcre_valid_utf8((uschar *)pattern, -1)) >= 0) |
(*erroroffset = _pcre_valid_utf8((uschar *)pattern, -1)) >= 0) |
5114 |
{ |
{ |
5115 |
errorcode = ERR44; |
errorcode = ERR44; |
5116 |
goto PCRE_UTF8_ERROR_RETURN; |
goto PCRE_EARLY_ERROR_RETURN2; |
5117 |
} |
} |
5118 |
#else |
#else |
5119 |
if ((options & PCRE_UTF8) != 0) |
if ((options & PCRE_UTF8) != 0) |
5325 |
(pcre_free)(re); |
(pcre_free)(re); |
5326 |
PCRE_EARLY_ERROR_RETURN: |
PCRE_EARLY_ERROR_RETURN: |
5327 |
*erroroffset = ptr - (const uschar *)pattern; |
*erroroffset = ptr - (const uschar *)pattern; |
5328 |
#ifdef SUPPORT_UTF8 |
PCRE_EARLY_ERROR_RETURN2: |
|
PCRE_UTF8_ERROR_RETURN: |
|
|
#endif |
|
5329 |
*errorptr = error_texts[errorcode]; |
*errorptr = error_texts[errorcode]; |
5330 |
if (errorcodeptr != NULL) *errorcodeptr = errorcode; |
if (errorcodeptr != NULL) *errorcodeptr = errorcode; |
5331 |
return NULL; |
return NULL; |