aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--builtin.c3
-rw-r--r--pc/ChangeLog4
-rw-r--r--pc/Makefile.tst7
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in11
-rw-r--r--test/Maketests5
-rw-r--r--vms/ChangeLog4
-rw-r--r--vms/vmstest.com6
10 files changed, 49 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 70e39b78..17a6d4ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,17 @@
2012-03-20 Arnold D. Robbins <arnold@skeeve.com>
+ 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 <arnold@skeeve.com>
* getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c,
diff --git a/builtin.c b/builtin.c
index 30cf9a5d..a067eafc 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 e921875a..c4b51d15 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst (printfbad3): New test.
+
2012-03-14 Eli Zaretskii <eliz@gnu.org>
* gawkmisc.pc (btowc): New version for DJGPP.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index ab236942..c10430a7 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 $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+printfbad3:
+ @echo printfbad3
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
procinfs:
@echo procinfs
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index f5d4f395..003dd774 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (printfbad3): New test.
+ * printfbad3.awk, printfbad3.ok: New files.
+
2012-02-22 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (beginfile2, next): Set LC_ALL=C so that error
diff --git a/test/Makefile.am b/test/Makefile.am
index 0625248c..911d8dce 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 402d9406..364d61d9 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 $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+printfbad3:
+ @echo printfbad3
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
procinfs:
@echo procinfs
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index c76769f4..34a0aaa6 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1080,6 +1080,11 @@ printfbad1:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+printfbad3:
+ @echo printfbad3
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
procinfs:
@echo procinfs
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 282b8148..8df0a012 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * vmstest.com: Add printfbad3 test.
+
2012-02-10 Arnold D. Robbins <arnold@skeeve.com>
* vmsbuild.com, descript.mms, vms-conf.h: Update patch level.
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 146053e1..95a9a1d3 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
$