diff options
author | Eric Blake <ebb9@byu.net> | 2008-05-08 20:39:16 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-05-08 20:39:16 -0600 |
commit | b9738adbaaf9c8f02c97c6179b9e595a0d28121c (patch) | |
tree | f2b04622145b0050611f1e4c5431329f33ae4475 /tests/macros.at | |
parent | d74cecd6377345903ba25c9d9b82729324fbbcf8 (diff) | |
download | m4-b9738adbaaf9c8f02c97c6179b9e595a0d28121c.tar.gz |
Stage 23: allow tracing of indirect macro calls.
* m4/m4module.h (m4_input_block): Remove.
(m4_call_info): New opaque type.
(m4_trace_prepare, m4_arg_info): New prototypes.
(m4_macro_call, m4_push_string_finish, m4_input_print): Change
prototypes.
* m4/m4private.h (struct m4_macro_args): Add info field.
(struct m4_call_info): New structure.
(m4_arg_info): New accessor.
* m4/input.c (m4_input_block): Make typedef local.
(m4_push_string_init): Initialize length.
(m4_push_string_finish, m4_input_print): Change signature, so that
printing can be done before finalization.
(struct input_funcs): Add parameter to print_func.
(file_print, string_print, composite_print): Adjust accordingly.
* m4/macro.c (trace_header, trace_flush, trace_pre, trace_post):
Change signatures for stacked trace messages, and for using call
context.
(trace_prepre): Export and rename...
(m4_trace_prepare): ...to this, for use by indir. Alter signature
to use call context.
(collect_arguments): Alter signature, to manage new field.
(expand_macro): Change call context management. Move tracing...
(m4_macro_call): ...here. Remove redundant parameter.
(m4_arg_argc): New function.
(m4_make_argv_ref): Replace unused skip parameter with new trace
parameter; manage new field.
* modules/gnu.c (builtin, indir): Adjust callers.
* src/main.c (usage): Update debugmode flag summary.
* tests/null.m4: Enhance test.
* tests/null.err: Update expected output.
* tests/macros.at (Tracing Hanoi Towers): Likewise.
* doc/m4.texinfo (Trace): Mention more about trace formatting.
(Debugmode): Enhance description of 'c' and 'x'. Enhance test to
cover line numbering details in traces.
(Debuglen): Enhance test to cover indir tracing.
* NEWS: Mention these changes.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'tests/macros.at')
-rw-r--r-- | tests/macros.at | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/macros.at b/tests/macros.at index c4db9e60..fe425189 100644 --- a/tests/macros.at +++ b/tests/macros.at @@ -356,7 +356,7 @@ m4trace: -2- eval(`1<=1') -> `1' m4trace: -1- ifelse(`1', `1', `move(auxilliary, destination)', `_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)') -> `move(auxilliary, destination)' m4trace: -1- move(`auxilliary', `destination') -> `Move one disk from `auxilliary' to `destination'. ' -m4trace: -1- debugmode -> @&t@ +m4trace: -1- debugmode -> `' m4trace: -1- _hanoi(2, source, destination, auxilliary) -> ifelse(eval(`2'<=1), 1, `move(source, destination)', `_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)') m4trace: -1- _hanoi(1, source, auxilliary, destination) -> ifelse(eval(`1'<=1), 1, `move(source, auxilliary)', |