aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-11-03 22:16:06 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-11-03 22:16:06 +0200
commit29fffed7a9937a77de42d4391c9d961c63e47bf7 (patch)
treeba0f776ac7228ef3dc2e57f4c1395e8dba422c5e
parentb3bb8a2bac657b6095e7a63c385c334e4329629c (diff)
parent07aa3d5dafee42fcaa3eaa0370a187c5cb53570e (diff)
downloadegawk-29fffed7a9937a77de42d4391c9d961c63e47bf7.tar.gz
egawk-29fffed7a9937a77de42d4391c9d961c63e47bf7.tar.bz2
egawk-29fffed7a9937a77de42d4391c9d961c63e47bf7.zip
Merge branch 'gawk-4.1-stable'
-rw-r--r--ChangeLog5
-rw-r--r--dfa.c1
-rw-r--r--doc/ChangeLog6
-rw-r--r--doc/gawk.info2
-rw-r--r--doc/gawk.texi10
-rw-r--r--doc/gawktexi.in10
-rw-r--r--test/ChangeLog8
-rw-r--r--test/Makefile.am13
-rw-r--r--test/Makefile.in13
-rw-r--r--test/backsmalls2.awk10
-rw-r--r--test/backsmalls2.ok0
-rw-r--r--test/pipeio3.ok24
12 files changed, 67 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 90aa7551..b39cf92e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c (lex): Reset laststart so that stuff like \s* works.
+ Fix from grep.
+
2013-10-31 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (efwrite): If write error to stdout is EPIPE,
diff --git a/dfa.c b/dfa.c
index b12d2d8b..b4972303 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1526,6 +1526,7 @@ lex (void)
POP_LEX_STATE ();
+ laststart = 0;
return lasttok;
case 'w':
diff --git a/doc/ChangeLog b/doc/ChangeLog
index a0cbfb13..7aeb17f0 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Fix the section and subsection headings in
+ the Preface. Also change the short title page to just
+ "GNU Awk".
+
2013-10-31 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Add @shorttitlepage command.
diff --git a/doc/gawk.info b/doc/gawk.info
index 879c51ea..26fe69dd 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1081,7 +1081,7 @@ by first pressing and holding the `CONTROL' key, next pressing the `d'
key and finally releasing both keys.
Dark Corners
-............
+------------
Dark corners are basically fractal -- no matter how much you
illuminate, there's always a smaller but darker one.
diff --git a/doc/gawk.texi b/doc/gawk.texi
index b651aa9c..321fb50e 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -194,7 +194,7 @@ supports it in developing GNU and promoting software freedom.''
@c during editing and review.
@setchapternewpage odd
-@shorttitlepage @value{TITLE}
+@shorttitlepage GNU Awk
@titlepage
@title @value{TITLE}
@subtitle @value{SUBTITLE}
@@ -1194,7 +1194,7 @@ an @command{awk}-level debugger. This version became available as
for a complete list of those who made important contributions to @command{gawk}.
@node Names
-@section A Rose by Any Other Name
+@unnumberedsec A Rose by Any Other Name
@cindex @command{awk}, new vs.@: old
The @command{awk} language has evolved over the years. Full details are
@@ -1230,7 +1230,7 @@ we simply use the term @command{awk}. When referring to a feature that is
specific to the GNU implementation, we use the term @command{gawk}.
@node This Manual
-@section Using This Book
+@unnumberedsec Using This Book
@cindex @command{awk}, terms describing
The term @command{awk} refers to a particular program as well as to the language you
@@ -1403,7 +1403,7 @@ present the licenses that cover the @command{gawk} source code
and this @value{DOCUMENT}, respectively.
@node Conventions
-@section Typographical Conventions
+@unnumberedsec Typographical Conventions
@cindex Texinfo
This @value{DOCUMENT} is written in @uref{http://www.gnu.org/software/texinfo/, Texinfo},
@@ -1453,7 +1453,7 @@ by first pressing and holding the @kbd{CONTROL} key, next
pressing the @kbd{d} key and finally releasing both keys.
@c fakenode --- for prepinfo
-@subsubheading Dark Corners
+@unnumberedsubsec Dark Corners
@cindex Kernighan, Brian
@quotation
@i{Dark corners are basically fractal --- no matter how much
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 9c30446e..41da54c6 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -189,7 +189,7 @@ supports it in developing GNU and promoting software freedom.''
@c during editing and review.
@setchapternewpage odd
-@shorttitlepage @value{TITLE}
+@shorttitlepage GNU Awk
@titlepage
@title @value{TITLE}
@subtitle @value{SUBTITLE}
@@ -1161,7 +1161,7 @@ an @command{awk}-level debugger. This version became available as
for a complete list of those who made important contributions to @command{gawk}.
@node Names
-@section A Rose by Any Other Name
+@unnumberedsec A Rose by Any Other Name
@cindex @command{awk}, new vs.@: old
The @command{awk} language has evolved over the years. Full details are
@@ -1197,7 +1197,7 @@ we simply use the term @command{awk}. When referring to a feature that is
specific to the GNU implementation, we use the term @command{gawk}.
@node This Manual
-@section Using This Book
+@unnumberedsec Using This Book
@cindex @command{awk}, terms describing
The term @command{awk} refers to a particular program as well as to the language you
@@ -1370,7 +1370,7 @@ present the licenses that cover the @command{gawk} source code
and this @value{DOCUMENT}, respectively.
@node Conventions
-@section Typographical Conventions
+@unnumberedsec Typographical Conventions
@cindex Texinfo
This @value{DOCUMENT} is written in @uref{http://www.gnu.org/software/texinfo/, Texinfo},
@@ -1420,7 +1420,7 @@ by first pressing and holding the @kbd{CONTROL} key, next
pressing the @kbd{d} key and finally releasing both keys.
@c fakenode --- for prepinfo
-@subsubheading Dark Corners
+@unnumberedsubsec Dark Corners
@cindex Kernighan, Brian
@quotation
@i{Dark corners are basically fractal --- no matter how much
diff --git a/test/ChangeLog b/test/ChangeLog
index adc8cd66..d85a026d 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (backsmalls2): New test.
+ (pipeio3): Check results against pipeio3.ok2 if
+ the first check fails.
+ * backsmalls2.awk, backsmalls2.ok: New files.
+ * pipeio3.ok2: New file. This is the results on PPC Mac OS X.
+
2013-10-30 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (pipeio3): Enhance test, again, to be more resilient
diff --git a/test/Makefile.am b/test/Makefile.am
index 597267f9..0023d934 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -118,6 +118,8 @@ EXTRA_DIST = \
backsmalls1.awk \
backsmalls1.in \
backsmalls1.ok \
+ backsmalls2.awk \
+ backsmalls2.ok \
badargs.ok \
badassign1.awk \
badassign1.ok \
@@ -655,6 +657,7 @@ EXTRA_DIST = \
pipeio2.ok \
pipeio3.awk \
pipeio3.ok \
+ pipeio3.ok2 \
posix.awk \
posix.in \
posix.ok \
@@ -1008,7 +1011,7 @@ MACHINE_TESTS = double1 double2 fmtspcl intformat
MPFR_TESTS = mpfrnr mpfrrnd mpfrieee mpfrexprange mpfrsort mpfrbigint
LOCALE_CHARSET_TESTS = \
- asort asorti backbigs1 backsmalls1 \
+ asort asorti backbigs1 backsmalls1 backsmalls2 \
fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \
mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc
@@ -1889,11 +1892,17 @@ backsmalls1:
AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+backsmalls2:
+ @echo $@
+ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \
+ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
pipeio3:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@sed 's/.*sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ || $(CMP) "$(srcdir)"/$@.ok2 _$@ && rm -f _$@
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index d192c171..fd21be38 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -336,6 +336,8 @@ EXTRA_DIST = \
backsmalls1.awk \
backsmalls1.in \
backsmalls1.ok \
+ backsmalls2.awk \
+ backsmalls2.ok \
badargs.ok \
badassign1.awk \
badassign1.ok \
@@ -873,6 +875,7 @@ EXTRA_DIST = \
pipeio2.ok \
pipeio3.awk \
pipeio3.ok \
+ pipeio3.ok2 \
posix.awk \
posix.in \
posix.ok \
@@ -1221,7 +1224,7 @@ INET_TESTS = inetdayu inetdayt inetechu inetecht
MACHINE_TESTS = double1 double2 fmtspcl intformat
MPFR_TESTS = mpfrnr mpfrrnd mpfrieee mpfrexprange mpfrsort mpfrbigint
LOCALE_CHARSET_TESTS = \
- asort asorti backbigs1 backsmalls1 \
+ asort asorti backbigs1 backsmalls1 backsmalls2 \
fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \
mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc
@@ -2283,11 +2286,17 @@ backsmalls1:
AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+backsmalls2:
+ @echo $@
+ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \
+ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
pipeio3:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@sed 's/.*sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ || $(CMP) "$(srcdir)"/$@.ok2 _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/backsmalls2.awk b/test/backsmalls2.awk
new file mode 100644
index 00000000..02326f58
--- /dev/null
+++ b/test/backsmalls2.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ pat["^\\s*$"] = pat["^\\s+$"] = pat["^\\s?$"] = pat["^\\s{1}$"] = 1
+ for (i in pat) {
+ if (" " !~ i) {
+ printf("pattern \"%s\" failed!\n", i) > "/dev/stderr"
+ exit 1
+ }
+ }
+ exit 0
+}
diff --git a/test/backsmalls2.ok b/test/backsmalls2.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/backsmalls2.ok
diff --git a/test/pipeio3.ok2 b/test/pipeio3.ok2
new file mode 100644
index 00000000..25d26293
--- /dev/null
+++ b/test/pipeio3.ok2
@@ -0,0 +1,4 @@
+doing first print
+sh: 1: cart: not found
+gawk: pipeio3.awk:6: fatal: print to "cart" failed (Broken pipe)
+EXIT CODE: 2