summaryrefslogtreecommitdiff
path: root/modules/stdlib.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-05-21 06:59:01 -0600
committerEric Blake <ebb9@byu.net>2008-06-02 06:55:00 -0600
commit3e33a6b3b9b2529939136c34b1e88bd3ee87a172 (patch)
treef3b5122ba6b37a4265d2ddfcf3e8ecac7e347afc /modules/stdlib.c
parentc41ad82fe554e33048e1ef60c4600e602c7207e9 (diff)
downloadm4-3e33a6b3b9b2529939136c34b1e88bd3ee87a172.tar.gz
Stage 24a: Use full call context in error reporting.
* m4/m4module.h (m4_error, m4_warn): Change parameter type. (m4_error_at_line, m4_warn_at_line): Delete. (m4_debug_set_output, m4_skip_line, m4_bad_argc, m4_numeric_arg) (m4_parse_truth_arg, m4_symbol_value_lookup): Adjust all clients. * m4/m4private.h (m4__next_token): Likewise. * m4/utility.c (m4_verror_at_line): Alter parameter, and use caller's location if caller is provided. (m4_error, m4_warn): Change parameter type. (m4_error_at_line, m4_warn_at_line): Delete. (m4_bad_argc, m4_numeric_arg, m4_parse_truth_arg) (m4_symbol_value_lookup): Adjust all callers. * m4/debug.c (set_debug_file, m4_debug_set_output): Likewise. * m4/input.c (m4_skip_line, m4__next_token): Likewise. * m4/macro.c (expand_argument, collect_arguments, m4_macro_call) (process_macro): Likewise. * modules/m4.h (m4_make_temp_func): Likewise. * modules/evalparse.c (m4_evaluate): Likewise. * modules/format.c (arg_int, arg_long, arg_double, format): Likewise. * modules/gnu.c (builtin, changeresyntax, changesyntax, debugfile) (debuglen, debugmode, esyscmd, indir, mkdtemp, patsubst, regexp) (renamesyms, syncoutput, regexp_compile, substitute) (regexp_substitute, m4_resyntax_encode_safe): Likewise. * modules/m4.c (define, undefine, pushdef, popdef, ifdef, ifelse) (m4_dump_symbols, defn, syscmd, incr, decr, divert, undivert, dnl) (include, maketemp, mkstemp, m4exit, traceon, traceoff, substr): Likewise. * modules/stdlib.c (setenv, getpwuid, srand): Likewise. * modules/time.c (ctime, gmtime, localtime, mktime, strftime): Likewise. * tests/options.at (--syncoutput): Add test for invalid command-line argument. Split xfailed portion... (--syncoutput and diversions): ...into new test. (unknown option): New test. * tests/freeze.at (reloading unknown builtin): Update expected output. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/stdlib.c')
-rw-r--r--modules/stdlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/stdlib.c b/modules/stdlib.c
index c24fa2b9..0fd492fb 100644
--- a/modules/stdlib.c
+++ b/modules/stdlib.c
@@ -108,7 +108,7 @@ M4BUILTIN_HANDLER (setenv)
int overwrite = 1;
if (argc >= 4)
- if (!m4_numeric_arg (context, M4ARG (0), M4ARG (3), &overwrite))
+ if (!m4_numeric_arg (context, m4_arg_info (argv), M4ARG (3), &overwrite))
return;
#if HAVE_SETENV
@@ -206,7 +206,7 @@ M4BUILTIN_HANDLER (getpwuid)
struct passwd *pw;
int uid;
- if (!m4_numeric_arg (context, M4ARG (0), M4ARG (1), &uid))
+ if (!m4_numeric_arg (context, m4_arg_info (argv), M4ARG (1), &uid))
return;
pw = getpwuid (uid);
@@ -261,7 +261,7 @@ M4BUILTIN_HANDLER (srand)
seed = time (0L) * getpid ();
else
{
- if (!m4_numeric_arg (context, M4ARG (0), M4ARG (1), &seed))
+ if (!m4_numeric_arg (context, m4_arg_info (argv), M4ARG (1), &seed))
return;
}