[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-184
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1844-gf4bbf63 |
Date: |
Wed, 15 Jun 2016 18:50:53 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/fixtype has been updated
via f4bbf63a287cd73f4eb989539e4813a428bf05ad (commit)
via ddb62efafb5659dae532089af83350f066446424 (commit)
via 3da7ad05f8a8c2bfaaf607f5dc2a1f9f17347bcf (commit)
via f9586a3dc83144d6383f2db275532f981601426b (commit)
via 92edf3d8864ca092c9cffb7e1211e38ef7556be5 (commit)
via 68773e1444b7e353346e52756e9db8fb487b56d4 (commit)
via b5a63ab37a2d018b0ae08abbf76ee2e88c3aff4c (commit)
via 153eea8b5edefb9b6921c84de0ed1bd219610d00 (commit)
via 6d5e4b7a4a8839d9406702ab30af62054078d3af (commit)
via e30696930a6335cee3cae0edad156bb4016ff993 (commit)
via b032d9b0e1113a030b94bbfb282c8b0362e76c18 (commit)
via d58de166cf120948edc030f5a748cc4d8a2ef635 (commit)
via 3a71149cd03f00169665a0efe61d258f6e154132 (commit)
via b6748f430ce8f7cfdd5a1c2a9b06dd0bb59b2f65 (commit)
via b39162fe4fda54d060db13f95af88f128307bc3a (commit)
via f54bc428df973ee3af4731057e9c50f69d02745c (commit)
via 2f17c9377828998b8b0f6cabc17b63353efab385 (commit)
via ac268ec2058b1615f41c750ccc55cf038ab1bca6 (commit)
via bb331e22c3207863ebd923bd4c8a36c256485c6b (commit)
via b504b2707e0780d5f0b347aef9bead0e516813a2 (commit)
via 98c043ed84ea6fe877561da25e1bf94f68374a67 (commit)
via 4f758771937fcbd59b1fd2db017c4995513c3988 (commit)
via af38e153c3de3710b7e828f52869b446c73c808d (commit)
via 2ec9d8362cb2d85891417c2ffd98ea74377b2c12 (commit)
via 9867841a4767347cd89c9fd0127db3c7eaf943e6 (commit)
via 88c6afdf1c83a7ea51225fbb173d910533c51bb0 (commit)
from 5826beec258141776469c5fd9b703d52c81a35fb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f4bbf63a287cd73f4eb989539e4813a428bf05ad
commit f4bbf63a287cd73f4eb989539e4813a428bf05ad
Merge: 5826bee ddb62ef
Author: Arnold D. Robbins <address@hidden>
Date: Wed Jun 15 21:50:45 2016 +0300
Merge branch 'master' into feature/fixtype
diff --cc ChangeLog
index 2f4631f,2f94b95..106f3b3
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,100 -1,50 +1,147 @@@
+ 2016-06-15 Arnold D. Robbins <address@hidden>
+
+ * config.sub: Update from GNULIB.
++
+2016-06-14 Andrew J. Schorr <address@hidden>
+
+ * awk.h (boolval): New inline function to standardize testing whether
+ a node's value is true.
+ * builtin.c (do_strftime): Use boolval to handle 3rd argument.
+ * eval.c (set_IGNORECASE, eval_condition): Use new boolval function.
+ * io.c (pty_vs_pipe): Use new boolval function.
+
+2016-06-14 Andrew J. Schorr <address@hidden>
+
+ * builtin.c (do_strftime): Fix handling of 3rd argument to work
+ as a standard boolean: non-null or non-zero.
+
+2016-06-14 Andrew J. Schorr <address@hidden>
+
+ * gawkapi.c (node_to_awk_value): When caller requests AWK_SCALAR
+ or AWK_UNDEFINED, we need to call fixtype before we check the type.
+
+2016-06-13 Andrew J. Schorr <address@hidden>
+
+ * awkgram.y: Eliminate STRCUR tests. Must use STRING to test whether
+ a scalar is a string.
+
+2016-06-12 Andrew J. Schorr <address@hidden>
+
+ * awk.h: Improve comment about STRING and NUMBER type assignment.
+ (nondec2awknum): Add endptr argument.
+ (fixtype): New inline function to clarify a scalar's type.
+ * array.c (sort_up_value_type): Call fixtype before checking the value
+ types.
+ * awkgram.y (yylex): Pass NULL endptr argument to nondec2awknum.
+ (valinfo): Remove dead tests: either STRING or NUMBER or both
+ must be set, so there's no reason to continue with checks for NUMCUR or
+ STRCUR.
+ * builtin.c (do_exp, do_int, do_log, do_sqrt, do_sin, do_cos, do_srand):
+ Fix lint check for non-numeric argument.
+ (do_string): Fix lint check for 1st and 2nd args being strings.
+ (do_length): Fix assert to allow for Node_typedregex.
+ Fix lint check for non-string argument.
+ (format_tree): Fix type detection for '%c' arguments.
+ (do_strftime): Fix lint check for non-numeric 2nd argument and
+ lint check for non-string 1st argument.
+ (do_mktime): Fix lint check for non-string argument. Eliminate useless
+ logic to save and restore terminating NUL.
+ (do_system, do_tolower, do_toupper): Fix lint check for non-string
+ argument.
+ (do_atan2, do_lshift, do_rshift, do_and, do_or, do_xor, do_compl,
+ do_intdiv): Fix lint checks for non-numeric args.
+ (do_sub): Attempt to clean up treatment of 3rd argument to gensub
+ despite vague documentation of expected behavior.
+ (do_strnum): Fix bug in number detection logic, and pass new endptr
+ arg to nondec2awknum.
+ (nondec2awknum): Add endptr argument so caller can detect how much
+ of the string was consumed. Eliminate unnecessary logic to save
+ and restore terminating NUL char.
+ (do_typeof): Use a switch to specify which cases are supported, and
+ issue a warning message when a corrupt type is detected.
+ * debug.c (print_memory): At least one of NUMBER and STRING should
+ be set, so no need to check for NUMCUR or STRCUR in addition.
+ * eval.c (cmp_nodes): Use fixtype function to fix arg types.
+ (set_IGNORECASE): Fix logic for acting on value type. Note that
+ setting IGNORECASE to a string value of "0" with NUMCUR set now enables
+ ignorecase, so that's a subtle change in behavior that seems to match
+ the docs.
+ (set_LINT): Try to clean up configuration logic based on type.
+ * ext.c (get_argument): Remove unused variable pcount.
+ * gawkapi.c (node_to_awk_value): Remove pointless test for NUMCUR
+ after calling force_number. Similarly, no need to test for STRCUR
+ after calling force_string.
+ * int_array.c (is_integer): Reject cases where a string value is
+ present that will not be correctly regenerated from the integer;
+ in particular, this could happen where blank space padding is present,
+ leading zeroes are present, or for hex or octal values.
+ Also fix some bugs where a strnum was converted to a NUMBER without
+ turning off the STRING bit.
+ * io.c (redirect_string): Make lint warning message more accurate.
+ (redirect): Change not_string test to use STRING bit, not STRCUR.
+ (pty_vs_pipe): Use fixtype to correct logic for detecting whether a
+ value is anumber.
+ * mpfr.c (mpg_force_number): If NUMCUR is set, there's no need to
+ test is_mpg_number. If it's not, the NODE is corrupt and we've got
+ bigger problems. Fix flag manipulation logic. Always set NUMCUR and
+ clear MAYBE_NUM,
+ (set_PREC): Fix logic using fixtype function.
+ (do_mpfr_atan2, do_mpfr_intdiv): Fix lint check for non-numeric
+ arguments.
+ (do_mpfr_func, do_mpfr_int, do_mpfr_compl, get_intval, do_mpfr_srand):
+ Fix lint check for non-numeric argument.
+ (do_mpfr_strtonum): Use fixtype and stop testing for NUMCUR bit.
+ * node.c (r_force_number): Eliminate pointless save and restore of
+ terminating NUL char. Always set NUMCUR and clear MAYBE_NUM, and
+ convert STRING to NUMBER if appropriate, fixing bugs in flag
+ manipulations. For non-decimal data, need to consider whether there
+ is trailing non-numeric data in deciding whether a MAYBE_NUM should
+ be converted to a NUMBER, so take advantage of new endptr arg
+ to nondec2awknum.
+ 2016-06-14 Arnold D. Robbins <address@hidden>
+
+ * builtin.c (do_sub): Fix sub for long runs of backslashes.
+ Thanks to Mike Brennan for the report.
+
+ Unrelated:
+ * ext.c (get_argument): Remove unused variable pcount.
+
+ 2016-06-10 Arnold D. Robbins <address@hidden>
+
+ * config.guess, config.sub: Get latest from Gnulib master.
+ * main.c (UPDATE_YEAR): Bump to 2016.
+
+ 2016-06-09 Arnold D. Robbins <address@hidden>
+
+ * dfa.c: Sync with GNU grep.
+
+ Unrelated:
+
+ * configure.ac: Move AM_CONDITIONAL[ENABLE_EXTENSIONS] outside
+ the enclosing if. Thanks to Assaf Gordon <address@hidden>
+ for the report.
+
+ 2016-06-08 Arnold D. Robbins <address@hidden>
+
+ * symbol.c (lookup): If got Node_val, it's a non-variable
+ in SYMTAB, return NULL. Can affect watchpoints in the debugger,
+ maybe other places. Thanks to Hermann Peifer for the
+ test case and report.
+
+ 2016-06-05 Arnold D. Robbins <address@hidden>
+
+ * dfa.c: Sync with GNU grep.
+
+ 2016-06-01 Arnold D. Robbins <address@hidden>
+
+ * nonposix.h (getpgrp): Wrap declaration in ifdef so it doesn't
+ mess things up on POSIX systems (like Solaris). Thanks to
+ Nelson Beebe for the report.
+ * node.c (is_hex): New function to check for 0x preceded by
+ optional sign.
+ (r_force_number): Use it. Thanks to Mike Brennan for the report.
+
2016-05-30 Andrew J. Schorr <address@hidden>
* gawkapi.h (awk_ext_func_t): Rename num_expected_args to
diff --cc node.c
index 7bc48cb,9382327..89d889a
--- a/node.c
+++ b/node.c
@@@ -94,11 -110,16 +108,10 @@@ r_force_number(NODE *n
|| (! do_posix /* not POSIXLY paranoid and */
&& (is_alpha((unsigned char) *cp) /* letter, or */
/* CANNOT do non-decimal and saw 0x */
- || (! do_non_decimal_data && cp[0] == '0'
- && (cp[1] == 'x' || cp[1] == 'X'))))) {
+ || (! do_non_decimal_data && is_hex(cp))))) {
- return n;
+ goto badnum;
}
- if ((n->flags & MAYBE_NUM) != 0) {
- newflags = NUMBER;
- n->flags &= ~(MAYBE_NUM|STRING);
- } else
- newflags = 0;
-
if (cpend - cp == 1) { /* only one character */
if (isdigit((unsigned char) *cp)) { /* it's a digit! */
n->numbr = (AWKNUM)(*cp - '0');
diff --cc test/ChangeLog
index 2a8fb86,5f2d683..e667de5
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@@ -1,15 -1,31 +1,43 @@@
+ 2016-06-14 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (subback): New test.
+ * subback.awk, subback.in, subback.ok: New files.
+ Thanks to Mike Brennan for the test.
+
+ Unrelated:
+
+ * Makefile.am (FAIL_CODE1): Update the list.
+
+ 2016-06-14 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (GAWK_EXT_TESTS): Add mixed1. Who knows
+ how long that's been broken...
+ * mixed1.ok: Adjust to match what the code produces.
+ Thanks to John E. Malmberg <address@hidden> for the report.
+
+2016-06-13 Andrew J. Schorr <address@hidden>
+
+ * Makefile.am (forcenum, ignrcas3, intarray, lintexp, lintindex,
+ lintint, lintlength, lintset, mpfrstrtonum, mpgforcenum, printfchar,
+ strtonum1): New tests.
+ * forcenum.awk, forcenum.ok, ignrcas3.awk, ignrcas3.ok, intarray.awk,
+ intarray.ok, lintexp.awk, lintexp.ok, lintindex.awk, lintindex.ok,
+ lintint.awk, lintint.ok, lintlength.awk, lintlength.ok, lintset.awk,
+ lintset.ok, mpfrstrtonum.awk, mpfrstrtonum.ok, mpgforcenum.awk,
+ mpgforcenum.ok, printfchar.awk, printfchar.ok, strtonum1.awk,
+ strtonum1.ok: New files.
+
+ 2016-06-08 Arnold D. Robbins <address@hidden>
+
+ * symtab10.awk, symtab10.in, symtab10.ok: New files.
+ * Makefile.am (symtab10): New test.
+ Thanks to Hermann Peifer for the report.
+
+ 2016-06-01 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (hex2): New test.
+ * hex2.awk, hex2.in, hex2.ok: New files.
+
2016-05-30 Arnold D. Robbins <address@hidden>
* Makefile.am (fsnul1): New test.
diff --cc test/Makefile.am
index 050a1dd,7ec7550..6c893cc
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@@ -1172,14 -1157,14 +1181,14 @@@ GAWK_EXT_TESTS =
colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 clos1way6 \
crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \
devfd devfd1 devfd2 dumpvars errno exit \
- fieldwdth fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \
+ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen
\
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops gsubind \
- icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
+ icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
- include include2 indirectbuiltin indirectcall indirectcall2 \
- lint lintold lintwarn \
+ include include2 indirectbuiltin indirectcall indirectcall2 intarray \
+ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
- manyfiles match1 match2 match3 mbstr1 mbstr2 \
+ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \
muldimposix \
nastyparm negtime next nondec nondec2 \
nonfatal1 nonfatal2 nonfatal3 \
@@@ -1190,8 -1175,8 +1199,8 @@@
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
sortfor sortu split_after_fpat \
splitarg4 strftime \
- strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
+ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5
symtab6 \
- symtab7 symtab8 symtab9 \
+ symtab7 symtab8 symtab9 symtab10 \
typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
timeout \
watchpoint1
diff --cc test/Makefile.in
index 3fe7c9e,dda3497..11176f1
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@@ -1428,14 -1413,14 +1437,14 @@@ GAWK_EXT_TESTS =
colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 clos1way6 \
crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \
devfd devfd1 devfd2 dumpvars errno exit \
- fieldwdth fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \
+ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen
\
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops gsubind \
- icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
+ icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
- include include2 indirectbuiltin indirectcall indirectcall2 \
- lint lintold lintwarn \
+ include include2 indirectbuiltin indirectcall indirectcall2 intarray \
+ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
- manyfiles match1 match2 match3 mbstr1 mbstr2 \
+ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \
muldimposix \
nastyparm negtime next nondec nondec2 \
nonfatal1 nonfatal2 nonfatal3 \
@@@ -1446,8 -1431,8 +1455,8 @@@
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
sortfor sortu split_after_fpat \
splitarg4 strftime \
- strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
+ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5
symtab6 \
- symtab7 symtab8 symtab9 \
+ symtab7 symtab8 symtab9 symtab10 \
typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
timeout \
watchpoint1
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 47 ++
builtin.c | 10 +-
config.guess | 37 +-
config.sub | 14 +-
configure | 4 +-
configure.ac | 2 +-
dfa.c | 8 +-
doc/ChangeLog | 13 +
doc/awkcard.in | 9 +-
doc/gawk.1 | 19 +-
doc/gawk.info | 1154 +++++++++++++++++++-------------------
doc/gawk.texi | 43 +-
doc/gawkinet.texi | 2 +-
doc/gawktexi.in | 43 +-
extension/build-aux/ChangeLog | 8 +
extension/build-aux/config.guess | 37 +-
extension/build-aux/config.sub | 14 +-
helpers/ChangeLog | 5 +
helpers/changed-files.awk | 19 +
main.c | 2 +-
node.c | 17 +-
nonposix.h | 2 +
pc/ChangeLog | 6 +
pc/Makefile.tst | 22 +-
symbol.c | 4 +-
test/ChangeLog | 28 +
test/Makefile.am | 27 +-
test/Makefile.in | 37 +-
test/Maketests | 10 +
test/hex2.awk | 1 +
test/hex2.in | 2 +
test/{regeq.ok => hex2.ok} | 2 +-
test/mixed1.ok | 4 +-
test/subback.awk | 16 +
test/subback.in | 1 +
test/subback.ok | 12 +
test/symtab10.awk | 1 +
test/symtab10.in | 4 +
test/symtab10.ok | 11 +
39 files changed, 1005 insertions(+), 692 deletions(-)
create mode 100644 helpers/changed-files.awk
create mode 100644 test/hex2.awk
create mode 100644 test/hex2.in
copy test/{regeq.ok => hex2.ok} (50%)
create mode 100644 test/subback.awk
create mode 100644 test/subback.in
create mode 100644 test/subback.ok
create mode 100644 test/symtab10.awk
create mode 100644 test/symtab10.in
create mode 100644 test/symtab10.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1844-gf4bbf63,
Arnold Robbins <=