aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regex.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/regex.c b/src/regex.c
index 2d28eda7016..e71961594ba 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -256,6 +256,8 @@ char *alloca ();
256 256
257#define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) 257#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
258 258
259#undef MAX
260#undef MIN
259#define MAX(a, b) ((a) > (b) ? (a) : (b)) 261#define MAX(a, b) ((a) > (b) ? (a) : (b))
260#define MIN(a, b) ((a) < (b) ? (a) : (b)) 262#define MIN(a, b) ((a) < (b) ? (a) : (b))
261 263
@@ -1500,7 +1502,7 @@ regex_compile (pattern, size, syntax, bufp)
1500 they can be reliably used as array indices. */ 1502 they can be reliably used as array indices. */
1501 register unsigned char c, c1; 1503 register unsigned char c, c1;
1502 1504
1503 /* A random tempory spot in PATTERN. */ 1505 /* A random temporary spot in PATTERN. */
1504 const char *p1; 1506 const char *p1;
1505 1507
1506 /* Points to the end of the buffer, where we should append. */ 1508 /* Points to the end of the buffer, where we should append. */
@@ -2249,7 +2251,7 @@ regex_compile (pattern, size, syntax, bufp)
2249 we're all done, the pattern will look like: 2251 we're all done, the pattern will look like:
2250 set_number_at <jump count> <upper bound> 2252 set_number_at <jump count> <upper bound>
2251 set_number_at <succeed_n count> <lower bound> 2253 set_number_at <succeed_n count> <lower bound>
2252 succeed_n <after jump addr> <succed_n count> 2254 succeed_n <after jump addr> <succeed_n count>
2253 <body of loop> 2255 <body of loop>
2254 jump_n <succeed_n addr> <jump count> 2256 jump_n <succeed_n addr> <jump count>
2255 (The upper bound and `jump_n' are omitted if 2257 (The upper bound and `jump_n' are omitted if
@@ -2493,12 +2495,7 @@ regex_compile (pattern, size, syntax, bufp)
2493 is strictly greater than re_max_failures, the largest possible stack 2495 is strictly greater than re_max_failures, the largest possible stack
2494 is 2 * re_max_failures failure points. */ 2496 is 2 * re_max_failures failure points. */
2495 fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS); 2497 fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
2496 if (fail_stack.stack) 2498 if (! fail_stack.stack)
2497 fail_stack.stack =
2498 (fail_stack_elt_t *) realloc (fail_stack.stack,
2499 (fail_stack.size
2500 * sizeof (fail_stack_elt_t)));
2501 else
2502 fail_stack.stack = 2499 fail_stack.stack =
2503 (fail_stack_elt_t *) malloc (fail_stack.size 2500 (fail_stack_elt_t *) malloc (fail_stack.size
2504 * sizeof (fail_stack_elt_t)); 2501 * sizeof (fail_stack_elt_t));