diff options
| author | Karl Heuer | 1994-02-08 03:47:10 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-02-08 03:47:10 +0000 |
| commit | 63268f7602b620bf584b1c16f83e4dbc4532b484 (patch) | |
| tree | f344eecc1bd6d24c68e305ba2dc9031d151c6b98 | |
| parent | 1a7ffe17b7e768c3c660f3a3fc419a47943df71f (diff) | |
| download | emacs-63268f7602b620bf584b1c16f83e4dbc4532b484.tar.gz emacs-63268f7602b620bf584b1c16f83e4dbc4532b484.zip | |
*** empty log message ***
| -rw-r--r-- | src/regex.c | 13 |
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)); |