diff options
author | Eric Blake <ebb9@byu.net> | 2007-11-23 15:18:40 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2007-11-23 15:18:40 -0700 |
commit | f6e28cf9c7345716927f6279f22f085ccfbcde77 (patch) | |
tree | ba3df914db261ab0d4512aaaa37415253bd88245 /m4/macro.c | |
parent | 969296fe02fb61b739d606b3144d6410ed5cd793 (diff) | |
download | m4-f6e28cf9c7345716927f6279f22f085ccfbcde77.tar.gz |
Factor out handling of macro name in error messages.
* m4/m4module.h (m4_error, m4_error_at_line, m4_warn)
(m4_warn_at_line): Add new parameter.
* m4/utility.c (m4_verror_at_line): New helper method.
(m4_error, m4_error_at_line, m4_warn, m4_warn_at_line): Add new
parameter.
(m4_bad_argc, m4_numeric_arg, m4_parse_truth_arg): All callers
changed.
* m4/debug.c: Likewise.
* m4/input.c: Likewise.
* m4/macro.c: Likewise.
* m4/module.c: Likewise.
* m4/output.c: Likewise.
* m4/path.c: Likewise.
* modules/evalparse.c: Likewise.
* modules/format.c: Likewise.
* modules/gnu.c: Likewise.
* modules/load.c: Likewise.
* modules/m4.c: Likewise.
* modules/mpeval.c: Likewise.
* src/freeze.c: Likewise.
* src/main.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'm4/macro.c')
-rw-r--r-- | m4/macro.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -204,8 +204,8 @@ expand_argument (m4 *context, m4_obstack *obs, m4_symbol_value *argp, break; case M4_TOKEN_EOF: - m4_error_at_line (context, EXIT_FAILURE, 0, file, line, - _("%s: end of file in argument list"), caller); + m4_error_at_line (context, EXIT_FAILURE, 0, file, line, caller, + _("end of file in argument list")); break; case M4_TOKEN_WORD: @@ -282,7 +282,7 @@ expand_macro (m4 *context, const char *name, m4_symbol *symbol) expansion_level++; if (m4_get_nesting_limit_opt (context) > 0 && expansion_level > m4_get_nesting_limit_opt (context)) - m4_error (context, EXIT_FAILURE, 0, _("\ + m4_error (context, EXIT_FAILURE, 0, NULL, _("\ recursion limit of %zu exceeded, use -L<N> to change it"), m4_get_nesting_limit_opt (context)); @@ -404,9 +404,9 @@ m4_macro_call (m4 *context, m4_symbol_value *value, m4_obstack *expansion, } else if (m4_is_symbol_value_placeholder (value)) { - m4_warn (context, 0, - _("%s: builtin `%s' requested by frozen file not found"), - M4ARG (0), m4_get_symbol_value_placeholder (value)); + m4_warn (context, 0, M4ARG (0), + _("builtin `%s' requested by frozen file not found"), + m4_get_symbol_value_placeholder (value)); } else { @@ -514,9 +514,9 @@ process_macro (m4 *context, m4_symbol_value *value, m4_obstack *obs, } else { - m4_error (context, 0, 0, - _("%s: unterminated parameter reference: %s"), - M4ARG (0), key); + m4_error (context, 0, 0, M4ARG (0), + _("unterminated parameter reference: %s"), + key); } text = *endp ? 1 + endp : endp; |