diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-02-06 20:05:06 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-02-06 20:05:06 +0200 |
commit | 44346e48ace060ec46481a77d5c9961e288e288d (patch) | |
tree | c4da3ac14cbb35bcbbac7d0f6ec0a18d3a888839 | |
parent | 4e77e3fe3394482ad26b1561fc45a38ca820bf56 (diff) | |
parent | 8cb65a2e6865322136c6876de4a461331198145d (diff) | |
download | egawk-44346e48ace060ec46481a77d5c9961e288e288d.tar.gz egawk-44346e48ace060ec46481a77d5c9961e288e288d.tar.bz2 egawk-44346e48ace060ec46481a77d5c9961e288e288d.zip |
Merge branch 'gawk-4.0-stable'
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | builtin.c | 9 |
2 files changed, 17 insertions, 5 deletions
@@ -1,9 +1,14 @@ 2013-02-06 Arnold D. Robbins <arnold@skeeve.com> + * builtin.c (printf_common): Move nargs > 0 check into assert. + (do_sprintf): Add nargs check and fatal message to here. + +2013-02-04 Arnold D. Robbins <arnold@skeeve.com> + * main.c (main): Remove undocumented -m option which was for compatibility with BWK awk. His awk dropped it back in 2007. -2013-02-04 Arnold D. Robbins <arnold@skeeve.com> +2013-01-31 Arnold D. Robbins <arnold@skeeve.com> * regcomp.c, regex.c, regex_internal.c, regexec.c: Update copyright years to sync with GLIBC. @@ -16,19 +21,25 @@ (clean_state_log_if_needed): Likewise. (get_subexp): Likewise.` +<<<<<<< HEAD 2013-02-03 Arnold D. Robbins <arnold@skeeve.com> * configure.ac: Add Automake test for cross compiling. +======= +>>>>>>> gawk-4.0-stable 2013-01-31 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Include "dfa.h" which includes regex.h after limits.h so that RE_DUP_MAX gets the correct value. Especially needed on OpenVMS. Thanks to Anders Wallin. +<<<<<<< HEAD * main.c (version): Print out API version numbers if DYNAMIC. Helpful also for knowing if to run the shlib tests. * configure: Regenerated after change in m4/readline.m4. +======= +>>>>>>> gawk-4.0-stable 2013-01-31 Arnold D. Robbins <arnold@skeeve.com> @@ -1582,10 +1582,7 @@ printf_common(int nargs) int i; NODE *r, *tmp; - if (nargs == 0) - fatal(_("[s]printf called with no arguments")); - - assert(nargs <= max_args); + assert(nargs > 0 && nargs <= max_args); for (i = 1; i <= nargs; i++) { tmp = args_array[nargs - i] = POP(); if (tmp->type == Node_var_array) { @@ -1608,6 +1605,10 @@ NODE * do_sprintf(int nargs) { NODE *r; + + if (nargs == 0) + fatal(_("sprintf: no arguments")); + r = printf_common(nargs); if (r == NULL) gawk_exit(EXIT_FATAL); |