gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2577-g4264c8


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2577-g4264c89
Date: Sun, 18 Jun 2017 15:32:01 -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, master has been updated
       via  4264c894681d11d4a5ce694aa8040223726fad1e (commit)
       via  dfac76cd5d43f32c09e8fecd91184573610734ac (commit)
       via  96e3ef669726c2d43bebb996d59876f608deb658 (commit)
       via  e0e06865d08f44a748ef0f0cd8f650cfb7d4e10e (commit)
      from  58ccf1fe579707c1eb78f7d18ee410d28d88d5e9 (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=4264c894681d11d4a5ce694aa8040223726fad1e

commit 4264c894681d11d4a5ce694aa8040223726fad1e
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 18 22:31:23 2017 +0300

    Minor updates to gettext.h.

diff --git a/ChangeLog b/ChangeLog
index 4553bda..086cbe3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        * builtin.c (mbc_char_count): Fix code to correctly traverse
        the string. Thanks to Hermann Peifer for the bug report.
        * config.guess, config.sub: Update to latest from GNULIB.
+       * gettext.h: Pull in a few nice changes from GNULIB version.
 
 2017-05-30         Arnold D. Robbins     <address@hidden>
 
diff --git a/gettext.h b/gettext.h
index 474419a..b3e8d87 100644
--- a/gettext.h
+++ b/gettext.h
@@ -193,7 +193,8 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-     /* || __STDC_VERSION__ >= 199901L */ )
+     /* || __STDC_VERSION__ == 199901L
+        || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
 #else
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
@@ -234,15 +235,17 @@ dcpgettext_expr (const char *domain,
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcgettext (domain, msg_ctxt_id, category);
+      found_translation = (translation != msg_ctxt_id);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (translation != msg_ctxt_id)
+      if (found_translation)
         return translation;
     }
   return msgid;
@@ -280,15 +283,17 @@ dcnpgettext_expr (const char *domain,
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, 
category);
+      found_translation = !(translation == msg_ctxt_id || translation == 
msgid_plural);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+      if (found_translation)
         return translation;
     }
   return (n == 1 ? msgid : msgid_plural);

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=dfac76cd5d43f32c09e8fecd91184573610734ac

commit dfac76cd5d43f32c09e8fecd91184573610734ac
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 18 22:30:43 2017 +0300

    Update support/intprops.h from GNULIB.

diff --git a/support/ChangeLog b/support/ChangeLog
index e2077bd..5475604 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-18         Arnold D. Robbins     <address@hidden>
+
+       * intprops.h: Sync with GNULIB.
+
 2017-05-22         Arnold D. Robbins     <address@hidden>
 
        * dfa.c, dfa.h, intprops.h, verify.h: Sync with GNULIB.
diff --git a/support/intprops.h b/support/intprops.h
index d8c7120..33a7ec5 100644
--- a/support/intprops.h
+++ b/support/intprops.h
@@ -219,7 +219,11 @@
    : (max) >> (b) < (a))
 
 /* True if __builtin_add_overflow (A, B, P) works when P is non-null.  */
-#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
+#if 5 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW 0
+#endif
 
 /* True if __builtin_add_overflow_p (A, B, C) works.  */
 #define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=96e3ef669726c2d43bebb996d59876f608deb658

commit 96e3ef669726c2d43bebb996d59876f608deb658
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 18 22:29:47 2017 +0300

    Update config.* infrastructure files.

diff --git a/ChangeLog b/ChangeLog
index 58919de..4553bda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * builtin.c (mbc_char_count): Fix code to correctly traverse
        the string. Thanks to Hermann Peifer for the bug report.
+       * config.guess, config.sub: Update to latest from GNULIB.
 
 2017-05-30         Arnold D. Robbins     <address@hidden>
 
diff --git a/config.guess b/config.guess
index 69ed3e5..2193702 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2017-03-05'
+timestamp='2017-05-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1304,14 +1304,21 @@ EOF
        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
            if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') 
| \
-                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-                   grep IS_64BIT_ARCH >/dev/null
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_64BIT_ARCH >/dev/null
                then
                    case $UNAME_PROCESSOR in
                        i386) UNAME_PROCESSOR=x86_64 ;;
                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
                    esac
                fi
+               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_PPC >/dev/null
+               then
+                   UNAME_PROCESSOR=powerpc
+               fi
            fi
        elif test "$UNAME_PROCESSOR" = i386 ; then
            # Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1335,16 +1342,16 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
+    NEO-*:NONSTOP_KERNEL:*:*)
        echo neo-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
+    NSR-*:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSX-?:NONSTOP_KERNEL:*:*)
+    NSX-*:NONSTOP_KERNEL:*:*)
        echo nsx-tandem-nsk${UNAME_RELEASE}
        exit ;;
     *:NonStop-UX:*:*)
diff --git a/config.sub b/config.sub
index 7203bf1..40ea5df 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2017-03-21'
+timestamp='2017-04-02'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -263,7 +263,7 @@ case $basic_machine in
        | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
-       | i370 | i860 | i960 | ia64 \
+       | i370 | i860 | i960 | ia16 | ia64 \
        | ip2k | iq2000 \
        | k1om \
        | le32 | le64 \
@@ -389,7 +389,7 @@ case $basic_machine in
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
+       | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
        | ip2k-* | iq2000-* \
        | k1om-* \
        | le32-* | le64-* \
diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog
index 0851fdf..4e4f038 100644
--- a/extension/build-aux/ChangeLog
+++ b/extension/build-aux/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-18         Arnold D. Robbins     <address@hidden>
+
+       * config.guess, config.sub: Update to latest from GNULIB.
+
 2017-03-23         Arnold D. Robbins     <address@hidden>
 
        * config.sub: Updated again.
diff --git a/extension/build-aux/config.guess b/extension/build-aux/config.guess
index 69ed3e5..2193702 100755
--- a/extension/build-aux/config.guess
+++ b/extension/build-aux/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2017-03-05'
+timestamp='2017-05-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1304,14 +1304,21 @@ EOF
        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
            if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') 
| \
-                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-                   grep IS_64BIT_ARCH >/dev/null
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_64BIT_ARCH >/dev/null
                then
                    case $UNAME_PROCESSOR in
                        i386) UNAME_PROCESSOR=x86_64 ;;
                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
                    esac
                fi
+               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_PPC >/dev/null
+               then
+                   UNAME_PROCESSOR=powerpc
+               fi
            fi
        elif test "$UNAME_PROCESSOR" = i386 ; then
            # Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1335,16 +1342,16 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
+    NEO-*:NONSTOP_KERNEL:*:*)
        echo neo-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
+    NSR-*:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSX-?:NONSTOP_KERNEL:*:*)
+    NSX-*:NONSTOP_KERNEL:*:*)
        echo nsx-tandem-nsk${UNAME_RELEASE}
        exit ;;
     *:NonStop-UX:*:*)
diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub
index 7203bf1..40ea5df 100755
--- a/extension/build-aux/config.sub
+++ b/extension/build-aux/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2017-03-21'
+timestamp='2017-04-02'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -263,7 +263,7 @@ case $basic_machine in
        | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
-       | i370 | i860 | i960 | ia64 \
+       | i370 | i860 | i960 | ia16 | ia64 \
        | ip2k | iq2000 \
        | k1om \
        | le32 | le64 \
@@ -389,7 +389,7 @@ case $basic_machine in
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
+       | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
        | ip2k-* | iq2000-* \
        | k1om-* \
        | le32-* | le64-* \

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e0e06865d08f44a748ef0f0cd8f650cfb7d4e10e

commit e0e06865d08f44a748ef0f0cd8f650cfb7d4e10e
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 18 22:17:49 2017 +0300

    Fix multibyte char printf problem, add test.

diff --git a/ChangeLog b/ChangeLog
index c4a1a1a..58919de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-18         Arnold D. Robbins     <address@hidden>
+
+       * builtin.c (mbc_char_count): Fix code to correctly traverse
+       the string. Thanks to Hermann Peifer for the bug report.
+
 2017-05-30         Arnold D. Robbins     <address@hidden>
 
        * NEWS: Mention PROCINFO["argv"].
diff --git a/builtin.c b/builtin.c
index 87d9dcb..724be05 100644
--- a/builtin.c
+++ b/builtin.c
@@ -4152,12 +4152,13 @@ mbc_char_count(const char *ptr, size_t numbytes)
        if (mb_len <= 0)
                return numbytes;        /* no valid m.b. char */
 
-       for (; numbytes > 0; numbytes--) {
+       while (numbytes > 0) {
                mb_len = mbrlen(ptr, numbytes, &cur_state);
                if (mb_len <= 0)
                        break;
                sum++;
                ptr += mb_len;
+               numbytes -= mb_len;
        }
 
        return sum;
diff --git a/test/ChangeLog b/test/ChangeLog
index 0d8978f..d2dd6ab 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-18         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (mbprintf5): New test.
+       * mbprintf5.awk, mbprintf5.in, mbprintf5.ok: New files.
+
 2017-05-24         Andrew J. Schorr     <address@hidden>
 
        * fwtest8.ok: Fix field number in error message, thanks to a bug
diff --git a/test/Makefile.am b/test/Makefile.am
index 443580b..1fcdba3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -626,6 +626,9 @@ EXTRA_DIST = \
        mbprintf4.awk \
        mbprintf4.in \
        mbprintf4.ok \
+       mbprintf5.awk \
+       mbprintf5.in \
+       mbprintf5.ok \
        mbstr1.awk \
        mbstr1.ok \
        mbstr2.awk \
@@ -1283,7 +1286,8 @@ MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem 
mpfrrnd mpfrieee \
 LOCALE_CHARSET_TESTS = \
        asort asorti backbigs1 backsmalls1 backsmalls2 \
        fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \
-       mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc
+       mbprintf1 mbprintf2 mbprintf3 mbprintf4 mbprintf5 \
+       rebt8b2 rtlenmb sort1 sprintfc
 
 SHLIB_TESTS = \
        apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 
inplace2 inplace3 \
@@ -1905,6 +1909,12 @@ mbprintf4::
        $(AWK) -f "$(srcdir)"/address@hidden "$(srcdir)"/address@hidden >_$@ 
2>&1 || echo EXIT CODE: $$? >> _$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+mbprintf5::
+       @echo $@
+       @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
+       $(AWK) -f "$(srcdir)"/address@hidden "$(srcdir)"/address@hidden >_$@ 
2>&1 || echo EXIT CODE: $$? >> _$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 mbfw1::
        @echo $@
        @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
diff --git a/test/Makefile.in b/test/Makefile.in
index e3fe9cb..7bddf5a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -884,6 +884,9 @@ EXTRA_DIST = \
        mbprintf4.awk \
        mbprintf4.in \
        mbprintf4.ok \
+       mbprintf5.awk \
+       mbprintf5.in \
+       mbprintf5.ok \
        mbstr1.awk \
        mbstr1.ok \
        mbstr2.awk \
@@ -1536,7 +1539,8 @@ MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem 
mpfrrnd mpfrieee \
 LOCALE_CHARSET_TESTS = \
        asort asorti backbigs1 backsmalls1 backsmalls2 \
        fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \
-       mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc
+       mbprintf1 mbprintf2 mbprintf3 mbprintf4 mbprintf5 \
+       rebt8b2 rtlenmb sort1 sprintfc
 
 SHLIB_TESTS = \
        apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 
inplace2 inplace3 \
@@ -2345,6 +2349,12 @@ mbprintf4::
        $(AWK) -f "$(srcdir)"/address@hidden "$(srcdir)"/address@hidden >_$@ 
2>&1 || echo EXIT CODE: $$? >> _$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+mbprintf5::
+       @echo $@
+       @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
+       $(AWK) -f "$(srcdir)"/address@hidden "$(srcdir)"/address@hidden >_$@ 
2>&1 || echo EXIT CODE: $$? >> _$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 mbfw1::
        @echo $@
        @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
diff --git a/test/mbprintf5.awk b/test/mbprintf5.awk
new file mode 100644
index 0000000..c9a57b4
--- /dev/null
+++ b/test/mbprintf5.awk
@@ -0,0 +1 @@
+{printf "%-5s%s\n", $1, $2}
diff --git a/test/mbprintf5.in b/test/mbprintf5.in
new file mode 100644
index 0000000..c63daaf
--- /dev/null
+++ b/test/mbprintf5.in
@@ -0,0 +1,3 @@
+Ö ABC
+• ABC
+🜁 ABC
diff --git a/test/mbprintf5.ok b/test/mbprintf5.ok
new file mode 100644
index 0000000..252d95e
--- /dev/null
+++ b/test/mbprintf5.ok
@@ -0,0 +1,3 @@
+Ö    ABC
+•    ABC
+🜁    ABC

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

Summary of changes:
 ChangeLog                        |  7 +++++++
 builtin.c                        |  3 ++-
 config.guess                     | 19 +++++++++++++------
 config.sub                       |  6 +++---
 extension/build-aux/ChangeLog    |  4 ++++
 extension/build-aux/config.guess | 19 +++++++++++++------
 extension/build-aux/config.sub   |  6 +++---
 gettext.h                        | 11 ++++++++---
 support/ChangeLog                |  4 ++++
 support/intprops.h               |  6 +++++-
 test/ChangeLog                   |  5 +++++
 test/Makefile.am                 | 12 +++++++++++-
 test/Makefile.in                 | 12 +++++++++++-
 test/mbprintf5.awk               |  1 +
 test/mbprintf5.in                |  3 +++
 test/mbprintf5.ok                |  3 +++
 16 files changed, 96 insertions(+), 25 deletions(-)
 create mode 100644 test/mbprintf5.awk
 create mode 100644 test/mbprintf5.in
 create mode 100644 test/mbprintf5.ok


hooks/post-receive
-- 
gawk



reply via email to

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