Displaying 3 results from an estimated 3 matches for "re_pcr".
Did you mean:
re_pcre
2015 Nov 28
0
[patch] Use JIT for PCRE pattern matching
...f PCRE_STUDY_JIT_COMPILE
+# define PCRE_STUDY_JIT_COMPILE 0
+#endif
/* interval at which to check interrupts */
#define NINTERRUPT 1000000
@@ -405,7 +409,7 @@
errorptr, split+erroffset);
error(_("invalid split pattern '%s'"), split);
}
- re_pe = pcre_study(re_pcre, 0, &errorptr);
+ re_pe = pcre_study(re_pcre, PCRE_STUDY_JIT_COMPILE, &errorptr);
if (errorptr)
warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
@@ -482,7 +486,11 @@
}
vmaxset(vmax2);
}
+#ifdef PCRE_CONFIG_JIT
+ pcre_free_study(re...
2011 Sep 29
3
grep and PCRE fun
...)
+++ 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, strlen(s), 0, 0, &ov, 0) >= 0)
+ if (pcre_exec(re_pcre, re_pe, s, strlen(s), 0, 0, ov, 3) &...
2007 Sep 07
1
"bug" and patch: quadratic running time for strsplit(..., fixed=TRUE) (PR#9902)
...j, len, tlen, ntok, slen;
int extended_opt, cflags, fixed_opt, perl_opt;
char *pt = NULL;
- const char *buf, *split = "", *bufp, *laststart;
+ const char *buf, *split = "", *bufp, *laststart, *ebuf = NULL;
regex_t reg;
regmatch_t regmatch[1];
pcre *re_pcre = NULL;
@@ -419,7 +419,8 @@
if(fixed_opt) {
/* This is UTF-8 safe since it compares whole strings */
laststart = buf;
- for(bufp = buf; bufp - buf < strlen(buf); bufp++) {
+ ebuf = buf + strlen(buf);
+ for(bufp = buf; bufp < ebuf; bufp++) {
if((slen == 1 && *buf...