diff options
author | Haibo Huang <hhb@google.com> | 2021-02-10 03:41:53 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-02-10 03:41:53 +0000 |
commit | 39d1e116127e21f74e3a34777dc931e706dc40bf (patch) | |
tree | eae92c9bba3cce66e0f9bff3e57ff3a0c6472d50 | |
parent | 2b34dbd4fc9a0ff73557d2a3c34de0d09fc3185b (diff) | |
parent | 7121bc054859f03d51c7912cab5b04c5b72366c6 (diff) | |
download | one-true-awk-39d1e116127e21f74e3a34777dc931e706dc40bf.tar.gz |
Upgrade one-true-awk to 178f660b5a4fde6f39e8065185373166f55b6e0c am: b0528ac077 am: 7121bc0548
Original change: https://android-review.googlesource.com/c/platform/external/one-true-awk/+/1582270
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I699ec4293f126d671eba3d64b7ec1d59b7287c26
-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 } |