aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regex.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/regex.c b/src/regex.c
index 645b661c208..e02f0fefb4e 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1241,20 +1241,22 @@ typedef union
1241/* Call this when have matched a real character; it sets `matched' flags 1241/* Call this when have matched a real character; it sets `matched' flags
1242 for the subexpressions which we are currently inside. Also records 1242 for the subexpressions which we are currently inside. Also records
1243 that those subexprs have matched. */ 1243 that those subexprs have matched. */
1244#define SET_REGS_MATCHED() \ 1244#define SET_REGS_MATCHED() \
1245 if (!set_regs_matched_done) \ 1245 do \
1246 { \ 1246 { \
1247 unsigned r; \ 1247 if (!set_regs_matched_done) \
1248 set_regs_matched_done = 1; \ 1248 { \
1249 for (r = lowest_active_reg; r <= highest_active_reg; r++) \ 1249 unsigned r; \
1250 { \ 1250 set_regs_matched_done = 1; \
1251 MATCHED_SOMETHING (reg_info[r]) \ 1251 for (r = lowest_active_reg; r <= highest_active_reg; r++) \
1252 = EVER_MATCHED_SOMETHING (reg_info[r]) \ 1252 { \
1253 = 1; \ 1253 MATCHED_SOMETHING (reg_info[r]) \
1254 } \ 1254 = EVER_MATCHED_SOMETHING (reg_info[r]) \
1255 } \ 1255 = 1; \
1256 else 1256 } \
1257 1257 } \
1258 } \
1259 while (0)
1258 1260
1259/* Registers are set to a sentinel when they haven't yet matched. */ 1261/* Registers are set to a sentinel when they haven't yet matched. */
1260static char reg_unset_dummy; 1262static char reg_unset_dummy;