search for: igcase_opt

Displaying 2 results from an estimated 2 matches for "igcase_opt".

2011 Sep 29
3
grep and PCRE fun
...p.c =================================================================== --- main/grep.c (revision 57110) +++ main/grep.c (working copy) @@ -723,7 +723,7 @@ { SEXP pat, text, ind, ans; regex_t reg; - int i, j, n, nmatches = 0, ov, rc; + int i, j, n, nmatches = 0, ov[3], rc; int igcase_opt, value_opt, perl_opt, fixed_opt, useBytes, invert; const char *spat = NULL; pcre *re_pcre = NULL /* -Wall */; @@ -882,7 +882,7 @@ if (fixed_opt) LOGICAL(ind)[i] = fgrep_one(spat, s, useBytes, use_UTF8, NULL) >= 0; else if (perl_opt) { - if (pcre_exec(re_pcre, re_pe, s,...
2015 Nov 28
0
[patch] Use JIT for PCRE pattern matching
...%s'\n"), errorptr); - } } + if (n > 10) { + re_pe = pcre_study(re_pcre, PCRE_STUDY_JIT_COMPILE, &errorptr); + if (errorptr) + warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr); + } } else { int cflags = REG_NOSUB | REG_EXTENDED; if (igcase_opt) cflags |= REG_ICASE; @@ -929,7 +937,11 @@ if (fixed_opt); else if (perl_opt) { +#ifdef PCRE_CONFIG_JIT + if (re_pe) pcre_free_study(re_pe); +#else if (re_pe) pcre_free(re_pe); +#endif pcre_free(re_pcre); pcre_free((void *)tables); } else @@ -1623,7 +1635,7 @@ error(_(&...