diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-08 19:55:45 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-08 19:55:45 +0200 |
commit | 0e38201f5879cc91c90876b2b9b219a308e3a2d2 (patch) | |
tree | 04d4d2b948f2393d0c78433224d6affc9f724652 /builtin.c | |
parent | 34c33ee0f9d3863f9ef381e499e396c9f447a941 (diff) | |
parent | 7306300f662a4fd4adc28e60db6aa0201ec1f5b2 (diff) | |
download | egawk-0e38201f5879cc91c90876b2b9b219a308e3a2d2.tar.gz egawk-0e38201f5879cc91c90876b2b9b219a308e3a2d2.tar.bz2 egawk-0e38201f5879cc91c90876b2b9b219a308e3a2d2.zip |
Merge branch 'master' into non-fatal-io-2
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2014 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2015 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -514,6 +514,9 @@ do_length(int nargs) * Support for deferred loading of array elements requires that * we use the array length interface even though it isn't * necessary for the built-in array types. + * + * 1/2015: The deferred arrays are gone, but this is probably + * still a good idea. */ size = assoc_length(tmp); @@ -908,7 +911,10 @@ check_pos: case '*': if (cur == NULL) break; - if (! do_traditional && isdigit((unsigned char) *s1)) { + if (! do_traditional && used_dollar && ! isdigit((unsigned char) *s1)) { + fatal(_("fatal: must use `count$' on all formats or none")); + break; /* silence warnings */ + } else if (! do_traditional && isdigit((unsigned char) *s1)) { int val = 0; for (; n0 > 0 && *s1 && isdigit((unsigned char) *s1); s1++, n0--) { |