summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-02-08 03:47:10 +0000
committerKarl Heuer <kwzh@gnu.org>1994-02-08 03:47:10 +0000
commit6cd877474760b5b21813a05ee5161c1d0553f21a (patch)
treef538789e7d8a32f5d783a88743b8d85914de3a86 /src/regex.c
parent37c13cc4fe0f146a9f19fa87e8712a6185e17124 (diff)
downloademacs-6cd877474760b5b21813a05ee5161c1d0553f21a.tar.gz
*** empty log message ***
Diffstat (limited to 'src/regex.c')
-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 ();
#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
+#undef MAX
+#undef MIN
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
@@ -1500,7 +1502,7 @@ regex_compile (pattern, size, syntax, bufp)
they can be reliably used as array indices. */
register unsigned char c, c1;
- /* A random tempory spot in PATTERN. */
+ /* A random temporary spot in PATTERN. */
const char *p1;
/* Points to the end of the buffer, where we should append. */
@@ -2249,7 +2251,7 @@ regex_compile (pattern, size, syntax, bufp)
we're all done, the pattern will look like:
set_number_at <jump count> <upper bound>
set_number_at <succeed_n count> <lower bound>
- succeed_n <after jump addr> <succed_n count>
+ succeed_n <after jump addr> <succeed_n count>
<body of loop>
jump_n <succeed_n addr> <jump count>
(The upper bound and `jump_n' are omitted if
@@ -2493,12 +2495,7 @@ regex_compile (pattern, size, syntax, bufp)
is strictly greater than re_max_failures, the largest possible stack
is 2 * re_max_failures failure points. */
fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
- if (fail_stack.stack)
- fail_stack.stack =
- (fail_stack_elt_t *) realloc (fail_stack.stack,
- (fail_stack.size
- * sizeof (fail_stack_elt_t)));
- else
+ if (! fail_stack.stack)
fail_stack.stack =
(fail_stack_elt_t *) malloc (fail_stack.size
* sizeof (fail_stack_elt_t));