diff options
author | Haibo Huang <hhb@google.com> | 2021-02-09 16:44:27 -0800 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2021-02-09 16:44:27 -0800 |
commit | b0528ac077e85673d6cdc144695a4655628579b5 (patch) | |
tree | eae92c9bba3cce66e0f9bff3e57ff3a0c6472d50 | |
parent | a451bd9a443f5b0a0792ecb14443a66ad9f46670 (diff) | |
parent | 178f660b5a4fde6f39e8065185373166f55b6e0c (diff) | |
download | one-true-awk-b0528ac077e85673d6cdc144695a4655628579b5.tar.gz |
Upgrade one-true-awk to 178f660b5a4fde6f39e8065185373166f55b6e0c
Test: make
Change-Id: I1bdb5d423fde981a4c97cc40b218c24314b30845
-rw-r--r-- | FIXES | 4 | ||||
-rw-r--r-- | METADATA | 6 | ||||
-rw-r--r-- | lib.c | 9 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rwxr-xr-x | testdir/T.errmsg | 4 |
5 files changed, 18 insertions, 7 deletions
@@ -25,6 +25,10 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +January 06, 2021: + Fix a decision bug with trailing stuff in lib.c:is_valid_number + after recent changes. Thanks to Ozan Yigit. + December 18, 2020: Fix problems converting inf and NaN values in lib.c:is_valid_number. Enhance number to string conversion to do the right thing for @@ -5,11 +5,11 @@ third_party { type: GIT value: "https://github.com/onetrueawk/awk.git" } - version: "7d1848cfa6b7b3bb9a7c851339626982198a57bc" + version: "178f660b5a4fde6f39e8065185373166f55b6e0c" license_type: NOTICE last_upgrade_date { year: 2021 - month: 1 - day: 5 + month: 2 + day: 9 } } @@ -822,10 +822,17 @@ convert: if (result != NULL) *result = r; - retval = (isspace(*ep) || *ep == '\0' || trailing_stuff_ok); + /* + * check for trailing stuff + */ + while (isspace(*ep)) + ep++; if (no_trailing != NULL) *no_trailing = (*ep == '\0'); + // return true if found the end, or trailing stuff is allowed + retval = *ep == '\0' || trailing_stuff_ok; + return retval; } @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20201218"; +const char *version = "version 20210106"; #define DEBUG #include <stdio.h> diff --git a/testdir/T.errmsg b/testdir/T.errmsg index bf2fd6a..ee2450a 100755 --- a/testdir/T.errmsg +++ b/testdir/T.errmsg @@ -155,8 +155,8 @@ BEGIN { next } illegal .*next.* from END END { next; print NR } -can.t open file /etc/passwd -BEGIN { print "abc" >"/etc/passwd" } +can.t open file ./nonexistentdir/foo +BEGIN { print "abc" >"./nonexistentdir/foo" } you can.t define function f more than once function f() { print 1 } |