[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/typed-regex-2, updated. gawk-4.1
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/typed-regex-2, updated. gawk-4.1.0-2132-gdc7bf0c |
Date: |
Fri, 18 Nov 2016 04:10:20 +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/typed-regex-2 has been updated
via dc7bf0cfeb2ec3eb26f1767cfe8605199613c4d6 (commit)
via c2448a50be949f5df2da4f7a1baf58358b297970 (commit)
via e8b0cf14d975304166c58a2d04a2943ab821367a (commit)
via cc04afb329cea035d0d9b67cd3b677e06b2f3996 (commit)
via 9a31c12053ef715ccb732f456de00b4afc38d888 (commit)
via 250b5a702471fb3f01244a9e90883d564670a091 (commit)
via 61daea989c84d97c552ea2daf168e7117d82aae0 (commit)
via 9ae43a6c83ef1c843072d93216c6267383df9bfa (commit)
via 55e81e9ae7a16aa3beaadbcb565a4c5ff0b89b76 (commit)
via 74473a65e66f3bd6fc17f39fda8d1f230e134cf9 (commit)
via b0f42533b3b9be43dd7d602890e02fdbb1e91db3 (commit)
via ce01568de72d8413edddbe23db14031787667d12 (commit)
via 4e7f84903580b2bc46946edc93b66b18f1f64e5c (commit)
via cb5ce43cf0f95b7691dde8341d8ffc4b2cc4d1bc (commit)
via ff67a43d663d1f24a9cd26933e57d33af4a4d7a4 (commit)
via 24e562f07cb9c6d70f49eeb9a74ffba8101ba834 (commit)
via e56b6eabe183ed5fa1352ef0f5f49fb6d894578c (commit)
via 2c6c33741890ab08659b7c7ef5b8bc91d487f300 (commit)
via 29acfbef6b126efce263945d0e2c4b707cb8cd4b (commit)
via 956767af308bbdf4a92f9048a6080c4046a08e03 (commit)
via 90478dd4c89715ad3e5dd599c1a615df8433db72 (commit)
via 21da4e0801ad2e54503f0790b328ac81fee5d290 (commit)
via 66f3b2f25f28d88def287e3b7e958bb504bc4eb1 (commit)
via 9a1d173658bcaf0987c4b4892d3872e324d94772 (commit)
via d64da79c830daee5b0c9e125320f240a22aa4110 (commit)
via d6493fae8856653b4eaa866e859f51b7218e4446 (commit)
via 02eaa0a97d906ebedfb298f6797190606093457c (commit)
via ce6abf1336dc249c6a0b0044915cfcd8df50c102 (commit)
via a8836b2d712fef5f31088c9ce1509e2bc11ef9a8 (commit)
via 96f23ecad8027eae6b7cde2b219dc783e6b64814 (commit)
via ca45449843f55136af05494ca60760033ae81838 (commit)
via 0987a787868a1d0772da19766de8a621f3a3be74 (commit)
via 7585f55d91374fb93725fa2ed53a84c118f14a72 (commit)
via 49a4b0bc8f15cd8e574c1a5f0ca9301defbb8b35 (commit)
via 1286aa4eae48d85f2aeda35eb057081b982f8533 (commit)
via fdd32f88f56cd7c338cabdcdf40d6500508c5c40 (commit)
via da45e63a2d84938408a990d105d927079256b692 (commit)
via 6a16b54b2718353694d9398430b192e569bc1742 (commit)
via 448068f27693a7b544dfbcd71980d7473ac12edb (commit)
via 094a71779f3b35f67c8db363ad4908000d4f391e (commit)
via 9a0a31ad7fb61e8f85609c6a647feaf5465feed5 (commit)
via 06d8f4cf720f5399ae32828de8182b34459df664 (commit)
via c4dee818eaee376cd19cb56d69d066e29c6eee2b (commit)
via 5b0b9518e94d4aee27e9b0b0617c2bdd0081592c (commit)
via 14587bf02200b8f184f19f52bbff83973d9d9197 (commit)
via f94d8d12596abd2e48d5131190cb5f643ac03e55 (commit)
via b647466e12da8797dae420889b077f7d60531c58 (commit)
via adb5491f2c9f49bf3d0e57f52c55bcaa4221e36e (commit)
via b7a631b6fa5ed5577520eccb1608956bd40a74e0 (commit)
via 214771c07d5b6cdcc7c309b3635bc322e19f6762 (commit)
via 015ef3064c671228262bbaea5a86a675e1b2fa1a (commit)
via c8ea9b44e9957c193137b0fdbbc50dd8af63a2cf (commit)
via 615093c3aff4f248a4136f5030aaa3219fe35f62 (commit)
via b91a006f9188fdf5249720329c1960ea9d3f3e19 (commit)
via c86137f472fdf876c2c223c8d99f673f477b7554 (commit)
via 4a0f74139fb702a14c2e6782fb1965245e4f9d2f (commit)
via e3de393ff1cbecea875c96294855b230f4779a3a (commit)
via d21117ed7769c6c8da3fde6eec39af81cc818577 (commit)
via eb261daff5e9a96f294cd806d1fd3e68f06fdbaa (commit)
via ce342a04922797cb53557178c54d32c4efafda16 (commit)
via f8424b236fabb881cc977b9e8e2e7c8debf56da0 (commit)
via 5de217ef7d347b8afa6f6f1fbd20cb84a20ae187 (commit)
via f4dfa789e973f98aab5e091492dbcf542747c3b4 (commit)
via ba9c9d88506e819fae0d9d2b0acd72a88765d0eb (commit)
via 166a253ca87240fe7ec463223af0b25a3e0f3d8a (commit)
via f421a5fbef014040712a7c89e8863c7196f6ab93 (commit)
via cedd0829b0075533986fce1e699bc6ae511a891e (commit)
via b3fa425feb23dd36e82d4dd71f0bc1e03495a46b (commit)
from f0b405cceab16dadbb84b95a8d68f705bc20f70f (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=dc7bf0cfeb2ec3eb26f1767cfe8605199613c4d6
commit dc7bf0cfeb2ec3eb26f1767cfe8605199613c4d6
Merge: f0b405c c2448a5
Author: Arnold D. Robbins <address@hidden>
Date: Fri Nov 18 06:10:12 2016 +0200
Merge branch 'master' into feature/typed-regex-2
diff --cc ChangeLog
index 0c1cac3,de34388..a6b97f7
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,42 -1,33 +1,72 @@@
+ 2016-11-17 Arnold D. Robbins <address@hidden>
+
+ General cleanup for zero termination of strings.
+
+ * array.c (do_delete): Use %.*s.
+ (value_info): Get length and use %.*s.
+ (asort_actual): Save and restore character after end.
+ * awkgram.y (split_comment): Use make_string, not make_str_node.
+ * builtin.c (do_fflush): Use %.*s.
+ (locale_category_from_argument, do_dcgettext, do_dcngettext,
+ do_bindtextdomain): Save and restore character after end.
+ * debug.c (do_info, print_array, print_subscript, do_print_var,
+ do_set_var, display, do_watch, print_watch_item, serialize_subscript,
+ do_print_f): Use %.*s.
+ * eval.c (cmp_nodes, fmt_index): Save and restore character after end.
+ * interpret.h (r_interpret): Fix compuation for concatenation of
+ wide strings.
+ * io.c (is_non_fatal_redirect): Add length parameter; save and
+ restore character after last. Adjust all other declarations and calls.
+ (do_close): Save and restore character after end.
+ * mpfr.c (ieee_fmts): Adjust table indentation.
+ (do_mpfr_strtonum): Clear wide string members of the union.
+ * msg.c (err): Use %.*s.
+
+ 2016-11-07 Arnold D. Robbins <address@hidden>
+
+ * awk.h [USER_INPUT]: Renamed from MAYBE_NUM.
+ * builtin.c, eval.c, field.c, int_array.c, io.c, main.c,
+ mpfr.c, node.c: Change all uses.
+
+2016-11-15 Arnold D. Robbins <address@hidden>
+
+ Finish reworking typed regexes.
+
+ * awk.h (typed_re): Replaces tre_reg.
+ * awkgram.y (typed_regexp production): Node_val points to a regular
+ Node_regex and also has string value and length.
+ (make_regnode): Simplified back to its original form.
+ * builtin.c (call_sub, call_match, call_split_func): For REGEX,
+ get n->typed_re.
+ * field.c (do_split, do_patsplit): Ditto, for separator regexp.
+ * profile.c (pprint): Op_match_rec, handle REGEX correctly.
+ * re.c (re_update): If REGEX, get t->typed_re->re_reg.
+
+2016-11-15 Arnold D. Robbins <address@hidden>
+
+ Start reworking typed regexes.
+
+ * awk.h (Node_typedregex): Nuked.
+ [REGEX]: New flag.
+ (tre_reg): New member in val part of NODE union.
+ (force_string, force_number, fixtype): Remove use of Node_typedregex.
+ * awkgram.y (grammer): Use REGEX flag instead of node type.
+ (valinfo); Ditto.
+ (make_regnode): Adjust creation based on node type.
+ * builtin.c (do_length, do_print, call_sub, call_match,
+ call_split_func, do_typeof): Adjust code.
+ * debug.c (watchpoint_triggered, initialize_watch_item,
+ print_memory): Adjust code.
+ * eval.c (nodetypes): Remove Node_typedregex.
+ (flags2str): Add REGEX.
+ (setup_frame): Adjust code after removal of Node_typedregex.
+ * interpret.h (r_interpret): Adjust code after removal
+ of Node_typedregex.
+ * profile.c (pp_typed_regex): Renamed from pp_strong_regex.
+ (pp_string_or_strong_regex): Renamed from pp_string_or_strong_regex.
+ (pprint): Adjust code after removal of Node_typedregex.
+ * re.c (re_update): Adjust code after removal of Node_typedregex.
+
2016-11-04 Eli Zaretskii <address@hidden>
* builtin.c (efwrite) [__MINGW32__]: Call w32_maybe_set_errno if
diff --cc awk.h
index 1cd1d5d,dcf97bb..5574692
--- a/awk.h
+++ b/awk.h
@@@ -441,27 -440,25 +441,26 @@@ typedef struct exp_node
# define STRCUR 0x0004 /* string value is current */
# define NUMCUR 0x0008 /* numeric value is current */
# define NUMBER 0x0010 /* assigned as number */
- # define MAYBE_NUM 0x0020 /* user input: if NUMERIC then
+ # define USER_INPUT 0x0020 /* user input: if NUMERIC then
* a NUMBER */
- # define FIELD 0x0040 /* this is a field */
- # define INTLSTR 0x0080 /* use localized version */
- # define NUMINT 0x0100 /* numeric value is an integer */
- # define INTIND 0x0200 /* integral value is array index;
+ # define INTLSTR 0x0040 /* use localized version */
+ # define NUMINT 0x0080 /* numeric value is an integer */
+ # define INTIND 0x0100 /* integral value is array index;
* lazy conversion to string.
*/
- # define WSTRCUR 0x0400 /* wide str value is current */
- # define MPFN 0x0800 /* arbitrary-precision
floating-point number */
- # define MPZN 0x1000 /* arbitrary-precision integer */
- # define NO_EXT_SET 0x2000 /* extension cannot set a value
for this variable */
- # define NULL_FIELD 0x4000 /* this is the null field */
+ # define WSTRCUR 0x0200 /* wide str value is current */
+ # define MPFN 0x0400 /* arbitrary-precision
floating-point number */
+ # define MPZN 0x0800 /* arbitrary-precision integer */
+ # define NO_EXT_SET 0x1000 /* extension cannot set a value
for this variable */
+ # define NULL_FIELD 0x2000 /* this is the null field */
/* type = Node_var_array */
- # define ARRAYMAXED 0x8000 /* array is at max size */
- # define HALFHAT 0x10000 /* half-capacity Hashed
Array Tree;
+ # define ARRAYMAXED 0x4000 /* array is at max size */
+ # define HALFHAT 0x8000 /* half-capacity Hashed
Array Tree;
* See cint_array.c */
- # define XARRAY 0x20000
- # define NUMCONSTSTR 0x40000 /* have string value for
numeric constant */
- # define REGEX 0x80000 /* this is a typed regex */
+ # define XARRAY 0x10000
+ # define NUMCONSTSTR 0x20000 /* have string value for
numeric constant */
++# define REGEX 0x40000 /* this is a typed regex */
} NODE;
#define vname sub.nodep.name
@@@ -1860,8 -1870,11 +1873,8 @@@ force_number(NODE *n
* please use this function to resolve the type.
*
* It is safe to assume that the return value will be the same NODE,
- * since force_number on a MAYBE_NUM should always return the same NODE,
+ * since force_number on a USER_INPUT should always return the same NODE,
* and force_string on an INTIND should as well.
- *
- * There is no way to handle a Node_typedregex correctly, so we ignore
- * that case.
*/
static inline NODE *
diff --cc builtin.c
index d51eafe,9a45e10..5d7c376
--- a/builtin.c
+++ b/builtin.c
@@@ -3964,19 -3976,16 +3989,19 @@@ do_typeof(int nargs
break;
case Node_val:
case Node_var:
- switch (arg->flags & (STRING|NUMBER|MAYBE_NUM|REGEX)) {
- switch (fixtype(arg)->flags & (STRING|NUMBER|USER_INPUT)) {
++ switch (fixtype(arg)->flags & (STRING|NUMBER|USER_INPUT|REGEX))
{
case STRING:
res = "string";
break;
case NUMBER:
res = "number";
break;
- case STRING|MAYBE_NUM:
+ case NUMBER|USER_INPUT:
res = "strnum";
break;
+ case REGEX:
+ res = "regexp";
+ break;
case NUMBER|STRING:
if (arg == Nnull_string) {
res = "unassigned";
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 199 ++++++-
array.c | 19 +-
awk.h | 75 +--
awkgram.c | 2 +-
awkgram.y | 2 +-
builtin.c | 59 +-
debug.c | 55 +-
doc/ChangeLog | 6 +
doc/gawk.info | 1020 ++++++++++++++++++-----------------
doc/gawk.texi | 148 ++++-
doc/gawktexi.in | 148 ++++-
eval.c | 24 +-
field.c | 79 ++-
gawkapi.c | 58 +-
gawkapi.h | 6 +-
int_array.c | 10 +-
interpret.h | 25 +-
io.c | 37 +-
main.c | 8 +-
mpfr.c | 19 +-
msg.c | 6 +-
node.c | 14 +-
str_array.c | 8 +-
test/ChangeLog | 20 +
test/Makefile.am | 14 +-
test/Makefile.in | 29 +-
test/Maketests | 15 +
test/apiterm.awk | 8 +
test/apiterm.in | 1 +
test/apiterm.ok | 3 +
test/arrayind3.awk | 19 +
test/{arrayprm3.ok => arrayind3.ok} | 1 +
test/fldterm.awk | 10 +
test/fldterm.in | 1 +
test/fldterm.ok | 2 +
test/forcenum.awk | 6 +-
test/forcenum.ok | 6 +-
test/rebuild.in | 2 +-
test/rebuild.ok | 2 +-
39 files changed, 1431 insertions(+), 735 deletions(-)
create mode 100644 test/apiterm.awk
create mode 100644 test/apiterm.in
create mode 100644 test/apiterm.ok
create mode 100644 test/arrayind3.awk
copy test/{arrayprm3.ok => arrayind3.ok} (66%)
create mode 100644 test/fldterm.awk
create mode 100644 test/fldterm.in
create mode 100644 test/fldterm.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/typed-regex-2, updated. gawk-4.1.0-2132-gdc7bf0c,
Arnold Robbins <=