1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
*** gnu_regex.c 2004-03-19 04:10:29.000000000 -0600
--- gnu_regex.c 2005-01-15 00:43:20.709695328 -0600
*************** regex_compile (pattern, size, syntax, bu
*** 1635,1644 ****
--- 1635,1646 ----
if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
if (COMPILE_STACK_EMPTY)
+ {
if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
goto normal_backslash;
else
return REG_ERPAREN;
+ }
handle_close:
if (fixup_alt_jump)
*************** regex_compile (pattern, size, syntax, bu
*** 1655,1664 ****
--- 1657,1668 ----
/* See similar code for backslashed left paren above. */
if (COMPILE_STACK_EMPTY)
+ {
if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
goto normal_char;
else
return REG_ERPAREN;
+ }
/* Since we just checked for an empty stack above, this
``can't happen''. */
*************** typedef struct
*** 2362,2368 ****
#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
do { \
- char *destination; \
/* Must be int, so when we don't save any registers, the arithmetic \
of 0 + -1 isn't done as unsigned. */ \
int this_reg; \
--- 2366,2371 ----
*************** re_match_2 (bufp, string1, size1, string
*** 3843,3849 ****
/* Compare that many; failure if mismatch, else move
past them. */
if (translate
! ? bcmp_translate (d, d2, mcnt, translate)
: bcmp (d, d2, mcnt))
goto fail;
d += mcnt, d2 += mcnt;
--- 3846,3852 ----
/* Compare that many; failure if mismatch, else move
past them. */
if (translate
! ? bcmp_translate ((unsigned char*)d, (unsigned char*)d2, mcnt, translate)
: bcmp (d, d2, mcnt))
goto fail;
d += mcnt, d2 += mcnt;
|