]> git.pld-linux.org Git - packages/tf.git/blob - pcre.patch
- fix build with pcre 8.30
[packages/tf.git] / pcre.patch
1 --- tf-50b8/src/pattern.h.wiget 2012-03-28 14:25:55.720865901 +0200
2 +++ tf-50b8/src/pattern.h       2012-03-28 14:26:14.157532261 +0200
3 @@ -10,7 +10,7 @@
4  #ifndef PATTERN_H
5  #define PATTERN_H
6  
7 -#include "pcre-2.08/pcre.h"
8 +#include <pcre.h>
9  
10  typedef struct RegInfo {
11      pcre *re;
12 --- tf-50b8/src/pattern.c.wiget 2012-03-28 15:55:13.910312594 +0200
13 +++ tf-50b8/src/pattern.c       2012-03-28 15:56:16.456978228 +0200
14 @@ -151,7 +151,7 @@ static RegInfo *tf_reg_compile_fl(const
15             emsg ? emsg : "unknown error");
16         goto tf_reg_compile_error;
17      }
18 -    n = pcre_info(ri->re, NULL, NULL);
19 +    pcre_fullinfo(ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
20      if (n < 0) goto tf_reg_compile_error;
21      ri->ovecsize = 3 * (n + 1);
22      ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line);
23 --- tf-50b8/src/macro.c.wiget   2012-03-28 13:44:42.280320322 +0200
24 +++ tf-50b8/src/macro.c 2012-03-28 15:56:32.813644628 +0200
25 @@ -893,7 +893,8 @@ static int complete_macro(Macro *spec, u
26      }
27      spec->attr &= ~F_NONE;
28      if (spec->nsubattr) {
29 -       int n = pcre_info(spec->trig.ri->re, NULL, NULL);
30 +       int n;
31 +       pcre_fullinfo(spec->trig.ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
32         for (i = 0; i < spec->nsubattr; i++) {
33             spec->subattr[i].attr &= ~F_NONE;
34             if (spec->subattr[i].subexp > n) {
This page took 0.026193 seconds and 3 git commands to generate.