Refactor error messages to avoid macros.
commit910837ec453663d0423f73eb79c17740486450a0
authorEric Blake <ebb9@byu.net>
Thu, 22 Nov 2007 21:13:49 +0000 (22 14:13 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 22 Nov 2007 21:13:49 +0000 (22 14:13 -0700)
tree78ca321ec29090df39b8f6fe19f9a4fe3dabc4f7
parent031a71a80442ed2ad3c2ee14d5811c786a12c51b
Refactor error messages to avoid macros.

* src/m4.h (_): Define, as a placeholder for now.
(M4ERROR, M4ERROR_AT_LINE): Delete.
(m4_error, m4_error_at_line): Change prototype.
(m4_warn, m4_warn_at_line): New prototypes.
* src/m4.c (m4_verror_at_line): New helper function.
(m4_error, m4_error_at_line): Use new function, and properly call
va_end.
(m4_warn, m4_warn_at_line): New functions.
(stackovf_handler, main): All callers changed.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/format.c: Likewise.
* src/freeze.c: Likewise.
* src/input.c: Likewise.
* src/macro.c: Likewise.
* doc/m4.texinfo (Indir, Builtin, Dumpdef, Incr, Eval, Substr)
(Improved forloop): Adjust tests accordingly.

Signed-off-by: Eric Blake <ebb9@byu.net>
13 files changed:
ChangeLog
doc/m4.texinfo
src/builtin.c
src/debug.c
src/eval.c
src/format.c
src/freeze.c
src/input.c
src/m4.c
src/m4.h
src/macro.c
src/output.c
src/path.c