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-3826-g09efc0


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3826-g09efc00
Date: Tue, 24 Sep 2019 13:44:37 -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  09efc00fdb6af9376c13db420930dd48e9b273d0 (commit)
       via  f66b9207538981ba223eae6dd22a84266dc4a9c8 (commit)
      from  92a7d2382ca92b2f5fcffb757018223c6ff423f5 (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=09efc00fdb6af9376c13db420930dd48e9b273d0

commit 09efc00fdb6af9376c13db420930dd48e9b273d0
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Sep 24 20:43:59 2019 +0300

    New test: mpfranswer42.

diff --git a/test/ChangeLog b/test/ChangeLog
index 9b608be..956a0ff 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-24         Jürgen Kahrs Google   <address@hidden>
+
+       * Makefile.am (EXTRA_DISTS): New test, mpfranswer42.
+       * mpfranswer42.awk, mpfranswer42.ok: New files.
+
 2019-07-23         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (EXTRA_DISTS): Fix typos in filenames.
diff --git a/test/Makefile.am b/test/Makefile.am
index f16225d..6276742 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -719,6 +719,8 @@ EXTRA_DIST = \
        mpfrstrtonum.awk \
        mpfrstrtonum.ok \
        mpfruplus.ok \
+       mpfranswer42.awk \
+       mpfranswer42.ok \
        mpgforcenum.awk \
        mpgforcenum.ok \
        mtchi18n.awk \
@@ -1423,7 +1425,7 @@ NEED_LINT_OLD = lintold
 # List of tests that must be run with -M
 NEED_MPFR = mpfrbigint mpfrbigint2 mpfrexprange mpfrfield mpfrieee mpfrmemok1 \
        mpfrnegzero mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \
-       mpfrstrtonum mpgforcenum mpfruplus
+       mpfrstrtonum mpgforcenum mpfruplus mpfranswer42
 
 # List of tests that need --non-decimal-data
 NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
@@ -2034,6 +2036,11 @@ mpfruplus:
        @$(AWK) -M -f "$(srcdir)"/uplus.awk > _$@ 2>&1 || echo EXIT CODE: $$? 
>> _$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+mpfranswer42:
+       @echo $@
+       @$(AWK) -M -f "$(srcdir)"/mpfranswer42.awk > _$@ 2>&1 || echo EXIT 
CODE: $$? >> _$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 mpfrmemok1:
        @echo $@
        @$(AWK) -p- -M -f "$(srcdir)"/$@.awk 2>&1 | sed 1d > _$@ || echo EXIT 
CODE: $$? >> _$@
diff --git a/test/Makefile.in b/test/Makefile.in
index 4b10060..f5450ff 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -978,6 +978,8 @@ EXTRA_DIST = \
        mpfrstrtonum.awk \
        mpfrstrtonum.ok \
        mpfruplus.ok \
+       mpfranswer42.awk \
+       mpfranswer42.ok \
        mpgforcenum.awk \
        mpgforcenum.ok \
        mtchi18n.awk \
@@ -1680,7 +1682,7 @@ NEED_LINT_OLD = lintold
 # List of tests that must be run with -M
 NEED_MPFR = mpfrbigint mpfrbigint2 mpfrexprange mpfrfield mpfrieee mpfrmemok1 \
        mpfrnegzero mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \
-       mpfrstrtonum mpgforcenum mpfruplus
+       mpfrstrtonum mpgforcenum mpfruplus mpfranswer42
 
 
 # List of tests that need --non-decimal-data
@@ -2483,6 +2485,11 @@ mpfruplus:
        @$(AWK) -M -f "$(srcdir)"/uplus.awk > _$@ 2>&1 || echo EXIT CODE: $$? 
>> _$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+mpfranswer42:
+       @echo $@
+       @$(AWK) -M -f "$(srcdir)"/mpfranswer42.awk > _$@ 2>&1 || echo EXIT 
CODE: $$? >> _$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 mpfrmemok1:
        @echo $@
        @$(AWK) -p- -M -f "$(srcdir)"/$@.awk 2>&1 | sed 1d > _$@ || echo EXIT 
CODE: $$? >> _$@
diff --git a/test/mpfranswer42.awk b/test/mpfranswer42.awk
new file mode 100644
index 0000000..41ca621
--- /dev/null
+++ b/test/mpfranswer42.awk
@@ -0,0 +1,18 @@
+# This test case adds some numbers and the answer is 42.
+# It was written to honour the scientists who solved a longstanding
+# problem that was made popular by Douglas Adams in his book
+# The Hitchhiker's Guide to the Galaxy.
+# 
https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy
+# In September 2019, the University of Bristol made a release
+# about the solution they found:
+# https://www.bristol.ac.uk/news/2019/september/sum-of-three-cubes-.html
+#
+# This test case uses GAWK's big numbers to reproduce the calculation.
+
+BEGIN {
+  x = -80538738812075974
+  y = 80435758145817515
+  z = 12602123297335631
+  print x^3 + y^3 + z^3
+}
+
diff --git a/test/mpfranswer42.ok b/test/mpfranswer42.ok
new file mode 100644
index 0000000..d81cc07
--- /dev/null
+++ b/test/mpfranswer42.ok
@@ -0,0 +1 @@
+42

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

commit f66b9207538981ba223eae6dd22a84266dc4a9c8
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Sep 24 20:37:44 2019 +0300

    Update doc/it/texinfo.tex.

diff --git a/doc/it/ChangeLog b/doc/it/ChangeLog
index 44a47bb..00740b4 100644
--- a/doc/it/ChangeLog
+++ b/doc/it/ChangeLog
@@ -1,3 +1,7 @@
+2019-09-24         Antonio Giovanni Colombo   <address@hidden>
+
+       * texinfo.tex: Updated.
+
 2019-08-12         Antonio Giovanni Colombo   <address@hidden>
 
        * gawktexi.in: Updated.
diff --git a/doc/it/texinfo.tex b/doc/it/texinfo.tex
index d97820c..78b23c1 100644
--- a/doc/it/texinfo.tex
+++ b/doc/it/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{2019-06-01.23}
+\def\texinfoversion{2019-09-20.22}
 %
 % Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
 %
@@ -1068,7 +1068,7 @@ where each line of input produces a line of output.}
             tex.sprint(
               string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o',
-                            (c / 256), (c % 256)))
+                            math.floor(c / 256), math.floor(c % 256)))
           else
             c = c - 0x10000
             local c_hi = c / 1024 + 0xd800
@@ -1078,8 +1078,8 @@ where each line of input produces a line of output.}
                             string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o',
-                            (c_hi / 256), (c_hi % 256),
-                            (c_lo / 256), (c_lo % 256)))
+                            math.floor(c_hi / 256), math.floor(c_hi % 256),
+                            math.floor(c_lo / 256), math.floor(c_lo % 256)))
           end
         end
       end
@@ -1092,15 +1092,19 @@ where each line of input produces a line of output.}
       function PDFescstr(str)
         for c in string.bytes(str) do
           if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
-            tex.sprint(
+            tex.sprint(-2,
               string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
                             c))
           else
-            tex.sprint(string.char(c))
+            tex.sprint(-2, string.char(c))
           end
         end
       end
     }
+    % The -2 in the arguments here gives all the input to TeX catcode 12 
+    % (other) or 10 (space), preventing undefined control sequence errors. See 
+    % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
+    %
   \endgroup
   \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
   \ifnum\luatexversion>84
@@ -4691,7 +4695,7 @@ end
 % NB flag names containing - or _ may not work here.
 \def\dummyvalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
-    \noexpand\value{#1}%
+    \string\value{#1}%
   \else
     \csname SET#1\endcsname
   \fi
@@ -4859,6 +4863,7 @@ end
   \definedummyletter\ %
   \definedummyletter\{%
   \definedummyletter\}%
+  \definedummyletter\&%
   %
   % Do the redefinitions.
   \definedummies
@@ -4929,6 +4934,7 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\ampchar
   \definedummyword\atchar
   \definedummyword\arrow
   \definedummyword\backslashchar

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

Summary of changes:
 doc/it/ChangeLog      |  4 ++++
 doc/it/texinfo.tex    | 20 +++++++++++++-------
 test/ChangeLog        |  5 +++++
 test/Makefile.am      |  9 ++++++++-
 test/Makefile.in      |  9 ++++++++-
 test/mpfranswer42.awk | 18 ++++++++++++++++++
 test/mpfranswer42.ok  |  1 +
 7 files changed, 57 insertions(+), 9 deletions(-)
 create mode 100644 test/mpfranswer42.awk
 create mode 100644 test/mpfranswer42.ok


hooks/post-receive
-- 
gawk



reply via email to

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