gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, feature/typed-regex, updated. gawk-4.1.0


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/typed-regex, updated. gawk-4.1.0-2129-ge63a9dd
Date: Fri, 18 Nov 2016 04:06:18 +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 has been updated
       via  e63a9ddb38bdb520f39de76aba57ba4c84dda859 (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  84a7c376d6322a6e2429af79358091d10d94c004 (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=e63a9ddb38bdb520f39de76aba57ba4c84dda859

commit e63a9ddb38bdb520f39de76aba57ba4c84dda859
Merge: 84a7c37 c2448a5
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Nov 18 06:06:10 2016 +0200

    Merge branch 'master' into feature/typed-regex

diff --cc awk.h
index df90119,dcf97bb..016a90b
--- a/awk.h
+++ b/awk.h
@@@ -1813,21 -1813,30 +1814,33 @@@ dupnode(NODE *n
  }
  #endif
  
- /* force_string --- force a node to have a string value */
+ /*
+  * force_string_fmt --- force a node to have a string value in a given format.
+  * The string representation of a number may change due to whether it was most
+  * recently rendered with CONVFMT or OFMT, or due to changes in the CONVFMT
+  * and OFMT values. But if the value entered gawk as a string or strnum, then
+  * stfmt should be set to STFMT_UNUSED, and the string representation should
+  * not change.
+  */
  
  static inline NODE *
- force_string(NODE *s)
+ force_string_fmt(NODE *s, const char *fmtstr, int fmtidx)
  {
 +      if (s->type == Node_typedregex)
 +              return dupnode(s->re_exp);
 +
        if ((s->flags & STRCUR) != 0
-                   && (s->stfmt == STFMT_UNUSED || s->stfmt == CONVFMTidx)
+                   && (s->stfmt == STFMT_UNUSED || s->stfmt == fmtidx)
        )
                return s;
-       return format_val(CONVFMT, CONVFMTidx, s);
+       return format_val(fmtstr, fmtidx, s);
  }
  
+ /* conceptually should be force_string_convfmt, but this is the typical case 
*/
+ #define force_string(s)               force_string_fmt((s), CONVFMT, 
CONVFMTidx)
+ 
+ #define force_string_ofmt(s)  force_string_fmt((s), OFMT, OFMTidx)
+ 
  #ifdef GAWKDEBUG
  #define unref r_unref
  #define       force_number    str2number
@@@ -1874,9 -1880,9 +1887,9 @@@ force_number(NODE *n
  static inline NODE *
  fixtype(NODE *n)
  {
 -      assert(n->type == Node_val);
 +      assert(n->type == Node_val || n->type == Node_typedregex);
        if (n->type == Node_val) {
-               if ((n->flags & MAYBE_NUM) != 0)
+               if ((n->flags & (NUMCUR|USER_INPUT)) == USER_INPUT)
                        return force_number(n);
                if ((n->flags & INTIND) != 0)
                        return force_string(n);
diff --cc builtin.c
index a7fe631,9a45e10..a15e750
--- a/builtin.c
+++ b/builtin.c
@@@ -2194,13 -2196,10 +2196,13 @@@ do_print(int nargs, int redirtype
                                DEREF(args_array[i]);
                        fatal(_("attempt to use array `%s' in a scalar 
context"), array_vname(tmp));
                }
 -              if (   (tmp->flags & STRCUR) == 0
 +
 +              if (tmp->type == Node_typedregex)
 +                      args_array[i] = force_string(tmp);
-               else if (   (tmp->flags & STRCUR) == 0
-                        || (   tmp->stfmt != STFMT_UNUSED
-                            && tmp->stfmt != OFMTidx))
-                               args_array[i] = format_val(OFMT, OFMTidx, tmp);
++              else if (  (tmp->flags & STRCUR) == 0
+                   || (   tmp->stfmt != STFMT_UNUSED
+                       && tmp->stfmt != OFMTidx))
+                       args_array[i] = force_string_ofmt(tmp);
        }
  
        if (redir_exp != NULL) {
@@@ -3955,12 -3974,9 +3981,12 @@@ do_typeof(int nargs
                res = "array";
                deref = false;
                break;
 +      case Node_typedregex:
 +              res = "regexp";
 +              break;
        case Node_val:
        case Node_var:
-               switch (arg->flags & (STRING|NUMBER|MAYBE_NUM)) {
+               switch (fixtype(arg)->flags & (STRING|NUMBER|USER_INPUT)) {
                case STRING:
                        res = "string";
                        break;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |  199 ++++++-
 array.c                             |   19 +-
 awk.h                               |   73 +--
 awkgram.c                           |    2 +-
 awkgram.y                           |    2 +-
 builtin.c                           |   62 ++-
 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, 1432 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]