Mercurial > hg > xemacs-beta
comparison src/regex.c @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children | a145efe76779 |
comparison
equal
deleted
inserted
replaced
81:ebca3d831cea | 82:6a378aca36af |
---|---|
1123 This is a variable only so users of regex can assign to it; we never | 1123 This is a variable only so users of regex can assign to it; we never |
1124 change it ourselves. */ | 1124 change it ourselves. */ |
1125 #if defined (MATCH_MAY_ALLOCATE) | 1125 #if defined (MATCH_MAY_ALLOCATE) |
1126 /* 4400 was enough to cause a crash on Alpha OSF/1, | 1126 /* 4400 was enough to cause a crash on Alpha OSF/1, |
1127 whose default stack limit is 2mb. */ | 1127 whose default stack limit is 2mb. */ |
1128 int re_max_failures = 4000; | 1128 int re_max_failures = 20000; |
1129 #else | 1129 #else |
1130 int re_max_failures = 2000; | 1130 int re_max_failures = 2000; |
1131 #endif | 1131 #endif |
1132 | 1132 |
1133 union fail_stack_elt | 1133 union fail_stack_elt |
1346 #else | 1346 #else |
1347 #define NUM_NONREG_ITEMS 4 | 1347 #define NUM_NONREG_ITEMS 4 |
1348 #endif | 1348 #endif |
1349 | 1349 |
1350 /* We push at most this many items on the stack. */ | 1350 /* We push at most this many items on the stack. */ |
1351 #define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) | 1351 /* We used to use (num_regs - 1), which is the number of registers |
1352 this regexp will save; but that was changed to 5 | |
1353 to avoid stack overflow for a regexp with lots of parens. */ | |
1354 #define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS) | |
1352 | 1355 |
1353 /* We actually push this many items. */ | 1356 /* We actually push this many items. */ |
1354 #define NUM_FAILURE_ITEMS \ | 1357 #define NUM_FAILURE_ITEMS \ |
1355 ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ | 1358 ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ |
1356 + NUM_NONREG_ITEMS) | 1359 + NUM_NONREG_ITEMS) |