diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-06-27 11:55:40 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-06-27 11:55:40 +0300 |
commit | cafd9f8ce2abbfd4e84a374a2081c93c02a1edac (patch) | |
tree | 5ed23a17305b92af5d2716154437051c779a65a5 | |
parent | d18166bf5ba5c8ca75b57afc033ab3aa3aa5fc7b (diff) | |
parent | 8e9e1dfbc6c34a6d502d9738b651ae4c70806b1b (diff) | |
download | egawk-cafd9f8ce2abbfd4e84a374a2081c93c02a1edac.tar.gz egawk-cafd9f8ce2abbfd4e84a374a2081c93c02a1edac.tar.bz2 egawk-cafd9f8ce2abbfd4e84a374a2081c93c02a1edac.zip |
Merge branch 'gawk-4.1-stable'
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.texi | 2 | ||||
-rw-r--r-- | doc/gawktexi.in | 2 | ||||
-rw-r--r-- | doc/texinfo.tex | 31 | ||||
-rw-r--r-- | helpers/ChangeLog | 12 | ||||
-rw-r--r-- | helpers/testdfa.c | 2 | ||||
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 11 | ||||
-rw-r--r-- | test/Makefile.in | 11 | ||||
-rw-r--r-- | test/dfamb1.awk | 4 | ||||
-rw-r--r-- | test/dfamb1.in | 1 | ||||
-rw-r--r-- | test/dfamb1.ok | 2 |
12 files changed, 79 insertions, 10 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 3385ba09..c1754161 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2013-06-27 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Update from Karl, fixes a formating problem. + * gawktexi.in (Conversions): Undo @w{} around @option{--posix}. + 2013-06-22 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Type Functions): Add more explanation to isarray(), diff --git a/doc/gawk.texi b/doc/gawk.texi index c9211007..fa3e5871 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -10121,7 +10121,7 @@ point, so the default behavior was restored to use a period as the decimal point character. You can use the @option{--use-lc-numeric} option (@pxref{Options}) to force @command{gawk} to use the locale's decimal point character. (@command{gawk} also uses the locale's decimal -point character when in POSIX mode, either via @w{@option{--posix}}, or the +point character when in POSIX mode, either via @option{--posix}, or the @env{POSIXLY_CORRECT} environment variable, as shown previously.) @ref{table-locale-affects} describes the cases in which the locale's decimal diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 68316d1c..59ee1a69 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -9618,7 +9618,7 @@ point, so the default behavior was restored to use a period as the decimal point character. You can use the @option{--use-lc-numeric} option (@pxref{Options}) to force @command{gawk} to use the locale's decimal point character. (@command{gawk} also uses the locale's decimal -point character when in POSIX mode, either via @w{@option{--posix}}, or the +point character when in POSIX mode, either via @option{--posix}, or the @env{POSIXLY_CORRECT} environment variable, as shown previously.) @ref{table-locale-affects} describes the cases in which the locale's decimal diff --git a/doc/texinfo.tex b/doc/texinfo.tex index a0c9d080..9cf29f2e 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2013-03-19.11} +\def\texinfoversion{2013-06-21.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -2475,14 +2475,14 @@ end } % We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate at a dash. -% -- rms. +% and arrange explicitly to hyphenate at a dash. -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active @@ -2499,14 +2499,33 @@ end \let-\normaldash \let_\realunder \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % \codex } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + \global\let\codedashprev=\next + } } - +\def\normaldash{-} +% \def\codex #1{\tclose{#1}\endgroup} -\def\normaldash{-} -\def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) diff --git a/helpers/ChangeLog b/helpers/ChangeLog new file mode 100644 index 00000000..4b720787 --- /dev/null +++ b/helpers/ChangeLog @@ -0,0 +1,12 @@ +2013-06-27 Arnold D. Robbins <arnold@skeeve.com> + + * ChangeLog: Created. + * testdfa.c: Add ifdef around xalloc.h, for use with grep dfa. + +2013-06-03 Arnold D. Robbins <arnold@skeeve.com> + + * testdfa.c: New file. + +2013-06-03 Arnold D. Robbins <arnold@skeeve.com> + + * testnet.awk, testnet.c, fixdump.awk: New files. diff --git a/helpers/testdfa.c b/helpers/testdfa.c index 653a28f8..c644fb04 100644 --- a/helpers/testdfa.c +++ b/helpers/testdfa.c @@ -732,6 +732,7 @@ char casetable[] = { #undef C +#ifdef GREP_DFA /* not needed for gawk */ /* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, @@ -1069,3 +1070,4 @@ xmemdup (T const *p, size_t s) #endif /* !XALLOC_H_ */ +#endif /* GREP_DFA */ diff --git a/test/ChangeLog b/test/ChangeLog index 2eada5aa..fcd922c1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2013-06-27 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (dfamb1): New test. + * dfamb1.awk, dfamb1.in, dfamb1.ok: New files. + Test case from Steven Daniels <stevendaniels88@gmail.com>. + 2013-06-24 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (clos1way): Move to here since Maketests gets diff --git a/test/Makefile.am b/test/Makefile.am index fb73a76f..fe6d3a59 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -177,6 +177,9 @@ EXTRA_DIST = \ devfd1.awk \ devfd1.ok \ devfd2.ok \ + dfamb1.awk \ + dfamb1.in \ + dfamb1.ok \ dfastress.awk \ dfastress.ok \ double1.awk \ @@ -925,7 +928,7 @@ BASIC_TESTS = \ back89 backgsub \ childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ - datanonl defref delargv delarpm2 delarprm delfunc dfastress dynlj \ + datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit exit2 exitval1 exitval2 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ @@ -1838,6 +1841,12 @@ clos1way: @AWKPATH=$(srcdir) LC_ALL=C $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +dfamb1: + @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 _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index 5bb3e201..06946c0c 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -395,6 +395,9 @@ EXTRA_DIST = \ devfd1.awk \ devfd1.ok \ devfd2.ok \ + dfamb1.awk \ + dfamb1.in \ + dfamb1.ok \ dfastress.awk \ dfastress.ok \ double1.awk \ @@ -1142,7 +1145,7 @@ BASIC_TESTS = \ back89 backgsub \ childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ - datanonl defref delargv delarpm2 delarprm delfunc dfastress dynlj \ + datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit exit2 exitval1 exitval2 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ @@ -2231,6 +2234,12 @@ clos1way: @echo $@ @AWKPATH=$(srcdir) LC_ALL=C $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +dfamb1: + @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 _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/dfamb1.awk b/test/dfamb1.awk new file mode 100644 index 00000000..7647adf5 --- /dev/null +++ b/test/dfamb1.awk @@ -0,0 +1,4 @@ +# The first of these used to core dump gawk. As of 7/2013 it's fixed. +# This file is to make sure that remains true. +{match($0, /(([^ \?.]*\?pos=ad |([^ \?.]*\?pos=(jj|va) )地\?pos=dev ){0,2})/ , arr)} { if(arr[0]) print arr[1], arr[4], $6} +{match($0, /(([^ \?.]*\?pos=ad |([^ \?.]*\?pos=(jj|va) )[地]\?pos=dev ){0,2})/ , arr)} { if(arr[0]) print arr[1], arr[4], $6} diff --git a/test/dfamb1.in b/test/dfamb1.in new file mode 100644 index 00000000..8347590f --- /dev/null +++ b/test/dfamb1.in @@ -0,0 +1 @@ +很?pos=ad 宽广?pos=va , 更?pos=ad 是?pos=vc1 diff --git a/test/dfamb1.ok b/test/dfamb1.ok new file mode 100644 index 00000000..ad443a23 --- /dev/null +++ b/test/dfamb1.ok @@ -0,0 +1,2 @@ +很?pos=ad +很?pos=ad |