diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | awkgram.c | 2 | ||||
-rw-r--r-- | awkgram.y | 2 | ||||
-rw-r--r-- | builtin.c | 3 |
4 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2012-12-23 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (tokentab): Whitespace fix for "include". + * builtin.c (printf_common): Do a fatal error if no args to printf() + or sprintf(). + 2012-12-15 Arnold D. Robbins <arnold@skeeve.com> Infrastructure Updates: @@ -4362,7 +4362,7 @@ static const struct token tokentab[] = { {"gsub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, {"if", Op_K_if, LEX_IF, 0, 0}, {"in", Op_symbol, LEX_IN, 0, 0}, -{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, +{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, {"index", Op_builtin, LEX_BUILTIN, A(2), do_index}, {"int", Op_builtin, LEX_BUILTIN, A(1), do_int}, {"isarray", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_isarray}, @@ -1851,7 +1851,7 @@ static const struct token tokentab[] = { {"gsub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, {"if", Op_K_if, LEX_IF, 0, 0}, {"in", Op_symbol, LEX_IN, 0, 0}, -{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, +{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, {"index", Op_builtin, LEX_BUILTIN, A(2), do_index}, {"int", Op_builtin, LEX_BUILTIN, A(1), do_int}, {"isarray", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_isarray}, @@ -1392,6 +1392,9 @@ printf_common(int nargs) int i; NODE *r, *tmp; + if (nargs == 0) + fatal(_("[s]printf called with no arguments")); + assert(nargs <= max_args); for (i = 1; i <= nargs; i++) { tmp = args_array[nargs - i] = POP(); |