* regex.c: Fix problems when DEBUG is defined.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 May 2013 04:31:16 +0000 (21:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 May 2013 04:31:16 +0000 (21:31 -0700)
commitdc4a2ee0efe25b03973ea5feb5de9e46560a8127
tree47d0bac1b62e90be25687878e3319206c2a95925
parent8c13f3d62856ced64f25fbeedba5c121457d5e76
* regex.c: Fix problems when DEBUG is defined.

(extract_number, extract_number_and_incr): Define regardless of
whether DEBUG is defined; that's simpler and makes the code less
likely to go stale in the normal case when DEBUG is not defined.
Return int rather than taking an int * arg.  All callers changed.
(DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
Remove, replacing with ...
(DEBUG_PRINT): New macro.  All callers changed.
(DEBUG_COMPILES_ARGUMENTS): New macro.
(print_fastmap, print_partial_compiled_pattern) [DEBUG]:
(print_compiled_pattern, print_double_string) [DEBUG]:
Use prototype rather than old-style definition.
(print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
(ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
(POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
(POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
Don't assume ptrdiff_t, size_t, and long are the same width as int.
(POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
This matters only when DEBUG is defined.
src/ChangeLog
src/regex.c