gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. b630ded7a3489f


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. b630ded7a3489fc10a104f761013eb3b588fd408
Date: Tue, 20 Mar 2012 18:54:42 +0000

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, gawk-4.0-stable has been updated
       via  b630ded7a3489fc10a104f761013eb3b588fd408 (commit)
       via  366e06bf71b500939fa3a70e3cce91d9a7776e14 (commit)
      from  a95b07bee7574ddf1ef6a9ca6f773cbaf4988707 (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=b630ded7a3489fc10a104f761013eb3b588fd408

commit b630ded7a3489fc10a104f761013eb3b588fd408
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Mar 20 20:52:26 2012 +0200

    Minor printf bug fix + new test for it everywhere.

diff --git a/ChangeLog b/ChangeLog
index 70e39b7..17a6d4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,17 @@
 2012-03-20         Arnold D. Robbins     <address@hidden>
 
+       Get new getopt to work on Linux and C90 compilers:
+
        * getopt.c: Undef ELIDE_CODE for gawk.
        (_getopt_internal_r): Init first.needs_free to 0. In test for -W
        move executable code to after declarations for C90 compilers.
        * getopt1.c: Undef ELIDE_CODE for gawk.
 
+       Minor bug fix with printf, thanks to John Haque:
+
+       * builtin.c (format_tree): Initialize base to zero at the top
+       of the while loop.
+
 2012-03-16         Arnold D. Robbins     <address@hidden>
 
        * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c,
diff --git a/builtin.c b/builtin.c
index 30cf9a5..a067eaf 100644
--- a/builtin.c
+++ b/builtin.c
@@ -613,7 +613,7 @@ format_tree(
        long *cur = NULL;
        uintmax_t uval;
        int sgn;
-       int base = 0;
+       int base;
        /*
         * Although this is an array, the elements serve two different
         * purposes. The first element is the general buffer meant
@@ -724,6 +724,7 @@ format_tree(
                cur = &fw;
                fw = 0;
                prec = 0;
+               base = 0;
                argnum = 0;
                have_prec = FALSE;
                signchar = FALSE;
diff --git a/pc/ChangeLog b/pc/ChangeLog
index e921875..c4b51d1 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-20         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.tst (printfbad3): New test.
+
 2012-03-14         Eli Zaretskii  <address@hidden>
 
        * gawkmisc.pc (btowc): New version for DJGPP.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index ab23694..c10430a 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -177,7 +177,7 @@ GAWK_EXT_TESTS = \
        lint  lintold lintwarn \
        manyfiles match1 match2 match3 mbstr1 \
        nastyparm  next nondec nondec2 \
-       patsplit posix printfbad1 printfbad2 procinfs \
+       patsplit posix printfbad1 printfbad2 printfbad3 procinfs \
        profile1 profile2 profile3 pty1 \
        rebuf regx8bit reint reint2 rsstart1 \
        rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \
@@ -1897,6 +1897,11 @@ printfbad1:
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
 
+printfbad3:
+       @echo printfbad3
+       @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
+       @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
+
 procinfs:
        @echo procinfs
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index f5d4f39..003dd77 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-20         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (printfbad3): New test.
+       * printfbad3.awk, printfbad3.ok: New files.
+
 2012-02-22         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (beginfile2, next): Set LC_ALL=C so that error
diff --git a/test/Makefile.am b/test/Makefile.am
index 0625248..911d8dc 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,7 @@
 #
 # test/Makefile.am --- automake input file for gawk
 #
-# Copyright (C) 1988-2011 the Free Software Foundation, Inc.
+# Copyright (C) 1988-2012 the Free Software Foundation, Inc.
 #
 # This file is part of GAWK, the GNU implementation of the
 # AWK Programming Language.
@@ -573,6 +573,8 @@ EXTRA_DIST = \
        printfbad2.awk \
        printfbad2.in \
        printfbad2.ok \
+       printfbad3.awk \
+       printfbad3.ok \
        printfloat.awk \
        printlang.awk \
        prmarscl.awk \
@@ -835,7 +837,7 @@ GAWK_EXT_TESTS = \
        lint  lintold lintwarn \
        manyfiles match1 match2 match3 mbstr1 \
        nastyparm  next nondec nondec2 \
-       patsplit posix printfbad1 printfbad2 procinfs \
+       patsplit posix printfbad1 printfbad2 printfbad3 procinfs \
        profile1 profile2 profile3 pty1 \
        rebuf regx8bit reint reint2 rsstart1 \
        rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \
diff --git a/test/Makefile.in b/test/Makefile.in
index 402d940..364d61d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -18,7 +18,7 @@
 #
 # test/Makefile.am --- automake input file for gawk
 #
-# Copyright (C) 1988-2011 the Free Software Foundation, Inc.
+# Copyright (C) 1988-2012 the Free Software Foundation, Inc.
 #
 # This file is part of GAWK, the GNU implementation of the
 # AWK Programming Language.
@@ -757,6 +757,8 @@ EXTRA_DIST = \
        printfbad2.awk \
        printfbad2.in \
        printfbad2.ok \
+       printfbad3.awk \
+       printfbad3.ok \
        printfloat.awk \
        printlang.awk \
        prmarscl.awk \
@@ -1019,7 +1021,7 @@ GAWK_EXT_TESTS = \
        lint  lintold lintwarn \
        manyfiles match1 match2 match3 mbstr1 \
        nastyparm  next nondec nondec2 \
-       patsplit posix printfbad1 printfbad2 procinfs \
+       patsplit posix printfbad1 printfbad2 printfbad3 procinfs \
        profile1 profile2 profile3 pty1 \
        rebuf regx8bit reint reint2 rsstart1 \
        rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \
@@ -2880,6 +2882,11 @@ printfbad1:
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
 
+printfbad3:
+       @echo printfbad3
+       @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
+       @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
+
 procinfs:
        @echo procinfs
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index c76769f..34a0aaa 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1080,6 +1080,11 @@ printfbad1:
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
 
+printfbad3:
+       @echo printfbad3
+       @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
+       @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@
+
 procinfs:
        @echo procinfs
        @AWKPATH=$(srcdir) $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 282b814..8df0a01 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-20         Arnold D. Robbins     <address@hidden>
+
+       * vmstest.com: Add printfbad3 test.
+
 2012-02-10         Arnold D. Robbins     <address@hidden>
 
        * vmsbuild.com, descript.mms, vms-conf.h: Update patch level.
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 146053e..95a9a1d 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -107,9 +107,9 @@ $           list = "indirectcall lint lintold lintwarn 
match1" -
                  + " match2 match3 manyfiles mbprintf3 mbstr1" -
                  + " nastyparm next nondec" -
                  + " nondec2 patsplit posix profile1 procinfs printfbad1" -
-                 + " printfbad2 pty1 regx8bit rebuf reint reint2 rsstart1" -
-                 + " rsstart2 rsstart3 rstest6 shadow sortfor sortu" -
-                 + " splitarg4 strtonum strftime switch2"
+                 + " printfbad2 printfbad3 pty1 regx8bit rebuf reint" -
+                 + " reint2 rsstart1 rsstart2 rsstart3 rstest6 shadow" -
+                 + " sortfor sortu splitarg4 strtonum strftime switch2"
 $              gosub list_of_tests
 $              return
 $

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

commit 366e06bf71b500939fa3a70e3cce91d9a7776e14
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Mar 20 20:37:26 2012 +0200

    Make getopt always compile, fix C89 issues.

diff --git a/ChangeLog b/ChangeLog
index 822740d..70e39b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-20         Arnold D. Robbins     <address@hidden>
+
+       * getopt.c: Undef ELIDE_CODE for gawk.
+       (_getopt_internal_r): Init first.needs_free to 0. In test for -W
+       move executable code to after declarations for C90 compilers.
+       * getopt1.c: Undef ELIDE_CODE for gawk.
+
 2012-03-16         Arnold D. Robbins     <address@hidden>
 
        * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c,
diff --git a/getopt.c b/getopt.c
index c539e3d..c5c72a2 100644
--- a/getopt.c
+++ b/getopt.c
@@ -48,6 +48,11 @@
 # endif
 #endif
 
+/* address@hidden&*() !!!!!!!! */
+#ifdef GAWK
+#undef ELIDE_CODE
+#endif
+
 #ifndef ELIDE_CODE
 
 
@@ -582,6 +587,7 @@ _getopt_internal_r (int argc, char *const *argv, const char 
*optstring,
              struct option_list first;
              first.p = pfound;
              first.next = ambig_list;
+             first.needs_free = 0;
              ambig_list = &first;
 
 #if defined _LIBC
@@ -877,9 +883,6 @@ _getopt_internal_r (int argc, char *const *argv, const char 
*optstring,
     /* Convenience. Treat POSIX -W foo same as long option --foo */
     if (temp[0] == 'W' && temp[1] == ';')
       {
-       if (longopts == NULL)
-         goto no_longs;
-
        char *nameend;
        const struct option *p;
        const struct option *pfound = NULL;
@@ -888,6 +891,9 @@ _getopt_internal_r (int argc, char *const *argv, const char 
*optstring,
        int indfound = 0;
        int option_index;
 
+       if (longopts == NULL)
+         goto no_longs;
+
        /* This is an option that requires an argument.  */
        if (*d->__nextchar != '\0')
          {
diff --git a/getopt1.c b/getopt1.c
index 07b742e..03fba35 100644
--- a/getopt1.c
+++ b/getopt1.c
@@ -45,6 +45,11 @@
 #endif
 #endif
 
+/* address@hidden&*() !!!!!!!! */
+#ifdef GAWK
+#undef ELIDE_CODE
+#endif
+
 #ifndef ELIDE_CODE
 
 

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

Summary of changes:
 ChangeLog        |   14 ++++++++++++++
 builtin.c        |    3 ++-
 getopt.c         |   12 +++++++++---
 getopt1.c        |    5 +++++
 pc/ChangeLog     |    4 ++++
 pc/Makefile.tst  |    7 ++++++-
 test/ChangeLog   |    5 +++++
 test/Makefile.am |    6 ++++--
 test/Makefile.in |   11 +++++++++--
 test/Maketests   |    5 +++++
 vms/ChangeLog    |    4 ++++
 vms/vmstest.com  |    6 +++---
 12 files changed, 70 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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