Mercurial > hg > xemacs-beta
comparison src/regex.c @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | ac2d302a0011 |
children | 441bb1e64a06 |
comparison
equal
deleted
inserted
replaced
15:ad457d5f7d04 | 16:0293115a14e9 |
---|---|
1042 This is a variable only so users of regex can assign to it; we never | 1042 This is a variable only so users of regex can assign to it; we never |
1043 change it ourselves. */ | 1043 change it ourselves. */ |
1044 #if defined (MATCH_MAY_ALLOCATE) | 1044 #if defined (MATCH_MAY_ALLOCATE) |
1045 /* 4400 was enough to cause a crash on Alpha OSF/1, | 1045 /* 4400 was enough to cause a crash on Alpha OSF/1, |
1046 whose default stack limit is 2mb. */ | 1046 whose default stack limit is 2mb. */ |
1047 int re_max_failures = 4000; | 1047 int re_max_failures = 20000; |
1048 #else | 1048 #else |
1049 int re_max_failures = 2000; | 1049 int re_max_failures = 2000; |
1050 #endif | 1050 #endif |
1051 | 1051 |
1052 union fail_stack_elt | 1052 union fail_stack_elt |
1265 #else | 1265 #else |
1266 #define NUM_NONREG_ITEMS 4 | 1266 #define NUM_NONREG_ITEMS 4 |
1267 #endif | 1267 #endif |
1268 | 1268 |
1269 /* We push at most this many items on the stack. */ | 1269 /* We push at most this many items on the stack. */ |
1270 #define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) | 1270 /* We used to use (num_regs - 1), which is the number of registers |
1271 this regexp will save; but that was changed to 5 | |
1272 to avoid stack overflow for a regexp with lots of parens. */ | |
1273 #define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS) | |
1271 | 1274 |
1272 /* We actually push this many items. */ | 1275 /* We actually push this many items. */ |
1273 #define NUM_FAILURE_ITEMS \ | 1276 #define NUM_FAILURE_ITEMS \ |
1274 ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ | 1277 ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ |
1275 + NUM_NONREG_ITEMS) | 1278 + NUM_NONREG_ITEMS) |