File tree Expand file tree Collapse file tree 4 files changed +10
-16
lines changed Expand file tree Collapse file tree 4 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ them both to 0; an emulation function will be used. */
52
52
#define HAVE_DLFCN_H 1
53
53
54
54
/* Define to 1 if you have the <inttypes.h> header file. */
55
- #define HAVE_INTTYPES_H 1
55
+ #define HAVE_INTTYPES_H 0
56
56
57
57
/* Define to 1 if you have the <limits.h> header file. */
58
58
#define HAVE_LIMITS_H 1
Original file line number Diff line number Diff line change 1
1
PCRE built as follows:
2
2
3
- 1. Download: http://sourceforge.net/projects/pcre/files/pcre/8.01 /pcre-8.01.tar.bz2 /download
3
+ 1. Download: http://sourceforge.net/projects/pcre/files/pcre/8.10 /pcre-8.10.zip /download
4
4
5
- 2. Unzip and untar the file (eg.):
6
-
7
- tar xjf pcre-8.01.tar.bz2
5
+ 2. Unzip the file pcre-8.10.zip
8
6
9
7
10
8
3. Copy the following files to the mushclient source "pcre" directory:
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ pcre_extra * extra;
29
29
extra = pcre_study (program, 0 , &error);
30
30
31
31
if (error)
32
+ {
33
+ pcre_free (program);
32
34
ThrowErrorException (" Regexp study failed: %s" , error);
35
+ }
33
36
34
37
// we need to allocate memory for the substring offsets
35
38
re = new t_regexp;
36
39
37
- if (!re)
38
- ThrowErrorException (" Could not allocate memory for regular expression" );
39
-
40
40
// remember program and extra stuff
41
41
re->m_program = program;
42
42
re->m_extra = extra;
@@ -81,7 +81,7 @@ LARGE_INTEGER start,
81
81
// free program as an indicator that we can't keep trying to do this one
82
82
if (count <= 0 )
83
83
{
84
- free (prog->m_program );
84
+ pcre_free (prog->m_program );
85
85
prog->m_program = NULL ;
86
86
prog->m_iExecutionError = count; // remember reason
87
87
}
@@ -118,7 +118,7 @@ pcre * program;
118
118
119
119
if (program)
120
120
{
121
- free (program);
121
+ pcre_free (program);
122
122
return true ; // good
123
123
}
124
124
Original file line number Diff line number Diff line change @@ -39,14 +39,11 @@ class t_regexp
39
39
}; // constructor
40
40
~t_regexp () {
41
41
if (m_program)
42
- free (m_program);
42
+ pcre_free (m_program);
43
43
if (m_extra)
44
- free (m_extra);
44
+ pcre_free (m_extra);
45
45
}; // destructor
46
46
47
- // const char *startp [MAX_WILDCARDS];
48
- // const char *endp [MAX_WILDCARDS];
49
-
50
47
// pairs of offsets from match
51
48
vector<int > m_vOffsets;
52
49
// count of matches
@@ -86,7 +83,6 @@ class t_regexp
86
83
iNumber = PCRE_ERROR_NOSUBSTRING;
87
84
else
88
85
iNumber = njg_get_first_set (m_program, sName .c_str (), &m_vOffsets [0 ]);
89
- // iNumber = pcre_get_stringnumber (m_program, sName.c_str ());
90
86
}
91
87
return GetWildcard (iNumber);
92
88
}
You can’t perform that action at this time.
0 commit comments