gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, feature/cpp-compile, updated. gawk-4.1.0-5079-gdd507a


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/cpp-compile, updated. gawk-4.1.0-5079-gdd507a47
Date: Mon, 8 Aug 2022 09:37:49 -0400 (EDT)

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/cpp-compile has been updated
       via  dd507a47d5e8fedc5d5b6b3aa7b653ffd2921185 (commit)
       via  a245edf421593a1ef994975cc32fc469089b7e08 (commit)
       via  ab1fc644ceabe10b7bf979b683c07c304faa487d (commit)
       via  c1de10ee6594d8e22168cb0ca9783eda422d59ba (commit)
      from  873d086d98990058053f284f7b384cbb2a289106 (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=dd507a47d5e8fedc5d5b6b3aa7b653ffd2921185

commit dd507a47d5e8fedc5d5b6b3aa7b653ffd2921185
Merge: 873d086d a245edf4
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Aug 8 16:37:36 2022 +0300

    Merge branch 'master' into feature/cpp-compile

diff --cc awk.h
index ff6f1147,834da65a..e6ffed81
--- a/awk.h
+++ b/awk.h
@@@ -341,90 -334,6 +341,90 @@@ typedef struct 
        afunc_t store;
  } array_funcs_t;
  
 +enum reflagvals {
 +      CONSTANT = 1,
 +      FS_DFLT  = 2,
 +};
 +
 +enum flagvals {
 +/* type = Node_val */
 +      /*
 +       * STRING and NUMBER are mutually exclusive, except for the special
 +       * case of an uninitialized value, represented internally by
 +       * Nnull_string. They represent the type of a value as assigned.
 +       * Nnull_string has both STRING and NUMBER attributes, but all other
 +       * scalar values should have precisely one of these bits set.
 +       *
 +       * STRCUR and NUMCUR are not mutually exclusive. They represent that
 +       * the particular type of value is up to date.  For example,
 +       *
 +       *      a = 5           # NUMBER | NUMCUR
 +       *      b = a ""        # Adds STRCUR to a, since a string value
 +       *                      # is now available. But the type hasn't changed!
 +       *
 +       *      a = "42"        # STRING | STRCUR
 +       *      b = a + 0       # Adds NUMCUR to a, since numeric value
 +       *                      # is now available. But the type hasn't changed!
 +       *
 +       * USER_INPUT is the joker.  When STRING|USER_INPUT is set, it means
 +       * "this is string data, but the user may have really wanted it to be a
 +       * number. If we have to guess, like in a comparison, turn it into a
 +       * number if the string is indeed numeric."
 +       * For example,    gawk -v a=42 ....
 +       * Here, `a' gets STRING|STRCUR|USER_INPUT and then when used where
 +       * a number is needed, it gets turned into a NUMBER and STRING
 +       * is cleared. In that case, we leave the USER_INPUT in place, so
 +       * the combination NUMBER|USER_INPUT means it is a strnum a.k.a. a
 +       * "numeric string".
 +       *
 +       * WSTRCUR is for efficiency. If in a multibyte locale, and we
 +       * need to do something character based (substr, length, etc.)
 +       * we create the corresponding wide character string and store it,
 +       * and add WSTRCUR to the flags so that we don't have to do the
 +       * conversion more than once.
 +       *
 +       * The NUMINT flag may be used with a value of any type -- NUMBER,
 +       * STRING, or STRNUM. It indicates that the string representation
 +       * equals the result of sprintf("%ld", <numeric value>). So, for
 +       * example, NUMINT should NOT be set if it's a strnum or string value
 +       * where the string is " 1" or "01" or "+1" or "1.0" or "0.1E1". This
 +       * is a hint to indicate that an integer array optimization may be
 +       * used when this value appears as a subscript.
 +       *
 +       * The BOOL flag indicates that this number should be converted to True
 +       * or False by extensions that interchange data with other languages,
 +       * via JSON, XML or some other serialization mechanism.
 +       *
 +       * We hope that the rest of the flags are self-explanatory. :-)
 +       */
 +      MALLOC  = 0x0001,       /* stptr can be free'd, i.e. not a field node 
pointing into a shared buffer */
 +      STRING  = 0x0002,       /* assigned as string */
 +      STRCUR  = 0x0004,       /* string value is current */
 +      NUMCUR  = 0x0008,       /* numeric value is current */
 +      NUMBER  = 0x0010,       /* assigned as number */
 +      USER_INPUT = 0x0020,    /* user input: if NUMERIC then
 +                               * a NUMBER */
-       BOOL    = 0x0040,       /* this is a boolean value */
++      BOOLVAL = 0x0040,       /* this is a boolean value */
 +      INTLSTR = 0x0080,       /* use localized version */
 +      NUMINT  = 0x0100,       /* numeric value is an integer */
 +      INTIND  = 0x0200,       /* integral value is array index;
 +                               * lazy conversion to string.
 +                               */
 +      WSTRCUR = 0x0400,       /* wide str value is current */
 +      MPFN    = 0x0800,       /* arbitrary-precision floating-point number */
 +      MPZN    = 0x01000,      /* arbitrary-precision integer */
 +      NO_EXT_SET = 0x02000,   /* extension cannot set a value for this 
variable */
 +      NULL_FIELD = 0x04000,   /* this is the null field */
 +
 +/* type = Node_var_array */
 +      ARRAYMAXED      = 0x08000,      /* array is at max size */
 +      HALFHAT         = 0x010000,     /* half-capacity Hashed Array Tree;
 +                                       * See cint_array.c */
 +      XARRAY          = 0x020000,
 +      NUMCONSTSTR     = 0x040000,     /* have string value for numeric 
constant */
 +      REGEX           = 0x080000,     /* this is a typed regex */
 +};
 +
  /*
   * NOTE - this struct is a rather kludgey -- it is packed to minimize
   * space usage, at the expense of cleanliness.  Alter at own risk.

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

Summary of changes:
 ChangeLog                |  7 ++++
 README_d/README.pc       |  4 +--
 awk.h                    |  2 +-
 builtin.c                |  4 +--
 eval.c                   |  2 +-
 gawkapi.c                | 20 +++++------
 node.c                   |  2 +-
 nonposix.h               |  2 ++
 pc/ChangeLog             | 20 +++++++++++
 pc/Makefile              |  2 +-
 pc/Makefile.tst          | 17 ++++++----
 pc/Makefile.tst.prologue |  1 +
 pc/config.h              |  2 +-
 pc/config.sed            |  1 +
 pc/gawkmisc.pc           | 87 +++++++++++++++++-------------------------------
 test/ChangeLog           | 14 ++++++++
 test/Makefile.am         | 10 ++++--
 test/Makefile.in         | 15 +++++----
 test/Maketests           |  5 ---
 test/nsidentifier.awk    |  9 +++--
 test/nsidentifier.ok     |  1 +
 21 files changed, 128 insertions(+), 99 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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