Commit b9830bfa authored by Tollef Fog Heen's avatar Tollef Fog Heen

Use PCRE_NOTEMPTY rather than NOTEMPTY_ATSTART, it suffices for us

parent 31567772
...@@ -144,7 +144,7 @@ VRT_regsub(const struct sess *sp, int all, const char *str, void *re, ...@@ -144,7 +144,7 @@ VRT_regsub(const struct sess *sp, int all, const char *str, void *re,
if (!all) if (!all)
break; break;
memset(&ovector, 0, sizeof(ovector)); memset(&ovector, 0, sizeof(ovector));
options |= VRE_NOTEMPTY_ATSTART; options |= VRE_NOTEMPTY;
i = VRE_exec(t, str, len, 0, options, ovector, 30, i = VRE_exec(t, str, len, 0, options, ovector, 30,
&params->vre_limits); &params->vre_limits);
if (i < VRE_ERROR_NOMATCH ) { if (i < VRE_ERROR_NOMATCH ) {
......
...@@ -49,7 +49,7 @@ typedef struct vre vre_t; ...@@ -49,7 +49,7 @@ typedef struct vre vre_t;
/* And those to PCRE options */ /* And those to PCRE options */
extern const unsigned VRE_CASELESS; extern const unsigned VRE_CASELESS;
extern const unsigned VRE_NOTEMPTY_ATSTART; extern const unsigned VRE_NOTEMPTY;
vre_t *VRE_compile(const char *, int, const char **, int *); vre_t *VRE_compile(const char *, int, const char **, int *);
int VRE_exec(const vre_t *code, const char *subject, int length, int VRE_exec(const vre_t *code, const char *subject, int length,
......
...@@ -45,12 +45,7 @@ struct vre { ...@@ -45,12 +45,7 @@ struct vre {
* here. * here.
*/ */
const unsigned VRE_CASELESS = PCRE_CASELESS; const unsigned VRE_CASELESS = PCRE_CASELESS;
const unsigned VRE_NOTEMPTY_ATSTART = const unsigned VRE_NOTEMPTY = PCRE_NOTEMPTY;
#ifdef PCRE_NOTEMPTY_ATSTART
PCRE_NOTEMPTY_ATSTART;
#else
0;
#endif
vre_t * vre_t *
VRE_compile(const char *pattern, int options, VRE_compile(const char *pattern, int options,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment