# HG changeset patch # User Karl Heuer # Date 760679230 0 # Node ID 2f86788715e5722a104ab0d4f63d528a0cc4ebcc # Parent e173b4b346e5b24cbeb3c75cea99046640f06570 *** empty log message *** diff -r e173b4b346e5 -r 2f86788715e5 src/regex.c --- a/src/regex.c Mon Feb 07 23:38:22 1994 +0000 +++ b/src/regex.c Tue Feb 08 03:47:10 1994 +0000 @@ -256,6 +256,8 @@ #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 @@ 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 @@ we're all done, the pattern will look like: set_number_at set_number_at - succeed_n + succeed_n jump_n (The upper bound and `jump_n' are omitted if @@ -2493,12 +2495,7 @@ 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));