Stage 6: convert builtins to push arg at a time.
commitd28166a2233b32f0f37bdd486a590a814209b765
authorEric Blake <ebb9@byu.net>
Thu, 25 Oct 2007 14:27:28 +0000 (25 08:27 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 10 Dec 2007 13:27:15 +0000 (10 06:27 -0700)
treefdc4af4c032ada22b0144592f637cd7d005eb1a8
parentbd9900d65eb9cd5add0f107e94b513fa267495ba
Stage 6: convert builtins to push arg at a time.

* src/m4.h (includes): Include <limits.h> here, instead of in
individual files.
(input_block): New typedef.
(trace_pre, trace_post, push_string_finish): Update prototypes.
(obstack_print, input_print, push_arg, push_args): New
prototypes.
* src/input.c (push_string_finish): Change return type.
(input_print): New function.
* src/debug.c (trace_format): Add %B specifier, and use new
function.
(trace_pre): Remove redundant argc parameter.
(trace_post): Likewise, and change signature.
(obstack_print): New function.
* src/macro.c (expand_macro): Update caller.
(push_arg, push_args): New functions.
* src/builtin.c (m4_ifdef, m4_ifelse, m4_shift, m4_substr)
(m4_patsubst, expand_user_macro): Use new functions.
(mkstemp_helper, m4_maketemp): Avoid extra trailing NULs.
* src/m4.c (max_debug_argument_length, main): Set to INT_MAX, not
0, for unlimited.
* src/output.c: Update includes.
* src/symtab.c: Likewise.

(cherry picked from commit 6dcf7d2e3c5deac2d16ee9a29b6a307474603dc7)

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
src/builtin.c
src/debug.c
src/input.c
src/m4.c
src/m4.h
src/macro.c
src/output.c
src/symtab.c