rebase: updated to latest stable version from upstream (gawk-4.2.0)
* gawk-4.2.0-000-do-not-fold-constant-strings.patch added, to prevent some newly found regression: http://lists.gnu.org/archive/html/bug-gawk/2017-10/msg00033.html * enabled BuildRequires for bison because of patch above * gawk-4.2.0-001-rwarray-small-improvements.patch added
This commit is contained in:
parent
2523130c4e
commit
76007242b5
@ -1,81 +0,0 @@
|
||||
From ef05a73f24871dff51a7ac686f7cfbc03addf4c8 Mon Sep 17 00:00:00 2001
|
||||
From: "Arnold D. Robbins" <arnold@skeeve.com>
|
||||
Date: Wed, 13 Sep 2017 21:50:12 +0300
|
||||
Subject: [PATCH] Small fixes to doc for use with info command.
|
||||
|
||||
---
|
||||
doc/gawk.info | 2 +-
|
||||
doc/gawk.texi | 2 +-
|
||||
doc/gawkinet.info | 2 +-
|
||||
doc/gawkinet.texi | 2 +-
|
||||
doc/gawktexi.in | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/doc/gawk.info b/doc/gawk.info
|
||||
index 6dcbfc3..e1c610e 100644
|
||||
--- a/doc/gawk.info
|
||||
+++ b/doc/gawk.info
|
||||
@@ -25,7 +25,7 @@ END-INFO-DIR-ENTRY
|
||||
|
||||
INFO-DIR-SECTION Individual utilities
|
||||
START-INFO-DIR-ENTRY
|
||||
-* awk: (gawk)Invoking gawk. Text scanning and processing.
|
||||
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
diff --git a/doc/gawk.texi b/doc/gawk.texi
|
||||
index acf57e5..ff72a6f 100644
|
||||
--- a/doc/gawk.texi
|
||||
+++ b/doc/gawk.texi
|
||||
@@ -16,7 +16,7 @@
|
||||
@end direntry
|
||||
@dircategory Individual utilities
|
||||
@direntry
|
||||
-* awk: (gawk)Invoking gawk. Text scanning and processing.
|
||||
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
|
||||
@end direntry
|
||||
|
||||
@c Enable better indexing, requires texindex from Texinfo 6 or later.
|
||||
diff --git a/doc/gawkinet.info b/doc/gawkinet.info
|
||||
index d5a7abf..bb89265 100644
|
||||
--- a/doc/gawkinet.info
|
||||
+++ b/doc/gawkinet.info
|
||||
@@ -24,7 +24,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
|
||||
software freedom."
|
||||
INFO-DIR-SECTION Network applications
|
||||
START-INFO-DIR-ENTRY
|
||||
-* Gawkinet: (gawkinet). TCP/IP Internetworking With 'gawk'.
|
||||
+* awkinet: (gawkinet). TCP/IP Internetworking With 'gawk'.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
This file documents the networking features in GNU 'awk'.
|
||||
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi
|
||||
index 07b117d..143ec46 100644
|
||||
--- a/doc/gawkinet.texi
|
||||
+++ b/doc/gawkinet.texi
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
@dircategory Network applications
|
||||
@direntry
|
||||
-* Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
|
||||
+* awkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
|
||||
@end direntry
|
||||
|
||||
@c Enable better indexing, requires texindex from Texinfo 6 or later.
|
||||
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
|
||||
index 2c94c30..2696b46 100644
|
||||
--- a/doc/gawktexi.in
|
||||
+++ b/doc/gawktexi.in
|
||||
@@ -11,7 +11,7 @@
|
||||
@end direntry
|
||||
@dircategory Individual utilities
|
||||
@direntry
|
||||
-* awk: (gawk)Invoking gawk. Text scanning and processing.
|
||||
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
|
||||
@end direntry
|
||||
|
||||
@c Enable better indexing, requires texindex from Texinfo 6 or later.
|
||||
--
|
||||
2.9.5
|
||||
|
651
gawk-4.2.0-000-do-not-fold-constant-strings.patch
Normal file
651
gawk-4.2.0-000-do-not-fold-constant-strings.patch
Normal file
@ -0,0 +1,651 @@
|
||||
From e8e2a80b1089cc2b76fb638cb9af72094f0e0e34 Mon Sep 17 00:00:00 2001
|
||||
From: "Arnold D. Robbins" <arnold@skeeve.com>
|
||||
Date: Sat, 21 Oct 2017 20:59:19 +0300
|
||||
Subject: [PATCH] Don't fold constant strings if either is translatable.
|
||||
|
||||
---
|
||||
awkgram.c | 243 +++++++++++++++++++++++++++++++-------------------------------
|
||||
awkgram.y | 3 +-
|
||||
2 files changed, 124 insertions(+), 122 deletions(-)
|
||||
|
||||
diff --git a/awkgram.c b/awkgram.c
|
||||
index 97b5970..1700a83 100644
|
||||
--- a/awkgram.c
|
||||
+++ b/awkgram.c
|
||||
@@ -684,13 +684,13 @@ static const yytype_uint16 yyrline[] =
|
||||
1401, 1409, 1414, 1423, 1424, 1429, 1431, 1436, 1438, 1446,
|
||||
1451, 1459, 1460, 1465, 1472, 1476, 1478, 1480, 1493, 1510,
|
||||
1520, 1527, 1529, 1534, 1536, 1538, 1546, 1548, 1553, 1555,
|
||||
- 1560, 1562, 1564, 1620, 1622, 1624, 1626, 1628, 1630, 1632,
|
||||
- 1634, 1648, 1653, 1658, 1683, 1689, 1691, 1693, 1695, 1697,
|
||||
- 1699, 1704, 1708, 1740, 1747, 1753, 1759, 1772, 1773, 1774,
|
||||
- 1779, 1784, 1788, 1792, 1807, 1828, 1833, 1870, 1899, 1900,
|
||||
- 1906, 1907, 1912, 1914, 1921, 1938, 1955, 1957, 1964, 1969,
|
||||
- 1977, 1987, 1999, 2008, 2012, 2016, 2020, 2024, 2028, 2031,
|
||||
- 2033, 2037, 2041, 2045
|
||||
+ 1560, 1562, 1564, 1621, 1623, 1625, 1627, 1629, 1631, 1633,
|
||||
+ 1635, 1649, 1654, 1659, 1684, 1690, 1692, 1694, 1696, 1698,
|
||||
+ 1700, 1705, 1709, 1741, 1748, 1754, 1760, 1773, 1774, 1775,
|
||||
+ 1780, 1785, 1789, 1793, 1808, 1829, 1834, 1871, 1900, 1901,
|
||||
+ 1907, 1908, 1913, 1915, 1922, 1939, 1956, 1958, 1965, 1970,
|
||||
+ 1978, 1988, 2000, 2009, 2013, 2017, 2021, 2025, 2029, 2032,
|
||||
+ 2034, 2038, 2042, 2046
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -3627,7 +3627,8 @@ regular_print:
|
||||
|
||||
// 1.5 "" # can't fold this if program mucks with CONVFMT.
|
||||
// See test #12 in test/posix.awk.
|
||||
- if ((n1->flags & (NUMBER|NUMINT)) != 0 || (n2->flags & (NUMBER|NUMINT)) != 0)
|
||||
+ // Also can't fold if one or the other is translatable.
|
||||
+ if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0)
|
||||
goto plain_concat;
|
||||
|
||||
n1 = force_string(n1);
|
||||
@@ -3652,47 +3653,47 @@ regular_print:
|
||||
max_args = count;
|
||||
}
|
||||
}
|
||||
-#line 3656 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3657 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 144:
|
||||
-#line 1623 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1624 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3662 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3663 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 145:
|
||||
-#line 1625 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1626 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3668 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3669 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 146:
|
||||
-#line 1627 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1628 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3674 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3675 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 147:
|
||||
-#line 1629 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1630 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3680 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3681 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 148:
|
||||
-#line 1631 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1632 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3686 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3687 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 149:
|
||||
-#line 1633 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1634 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3692 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3693 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 150:
|
||||
-#line 1635 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1636 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
/*
|
||||
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
|
||||
@@ -3706,29 +3707,29 @@ regular_print:
|
||||
_("non-redirected `getline' undefined inside END action"));
|
||||
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input);
|
||||
}
|
||||
-#line 3710 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3711 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 151:
|
||||
-#line 1649 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1650 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[0])->opcode = Op_postincrement;
|
||||
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
|
||||
}
|
||||
-#line 3719 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3720 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 152:
|
||||
-#line 1654 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1655 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[0])->opcode = Op_postdecrement;
|
||||
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
|
||||
}
|
||||
-#line 3728 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3729 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 153:
|
||||
-#line 1659 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1660 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
if (do_lint_old) {
|
||||
warning_ln((yyvsp[-1])->source_line,
|
||||
@@ -3748,64 +3749,64 @@ regular_print:
|
||||
(yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1]));
|
||||
}
|
||||
}
|
||||
-#line 3752 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3753 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 154:
|
||||
-#line 1684 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1685 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type);
|
||||
bcfree((yyvsp[-2]));
|
||||
}
|
||||
-#line 3761 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3762 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 155:
|
||||
-#line 1690 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1691 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3767 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3768 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 156:
|
||||
-#line 1692 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1693 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3773 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3774 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 157:
|
||||
-#line 1694 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1695 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3779 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3780 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 158:
|
||||
-#line 1696 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1697 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3785 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3786 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 159:
|
||||
-#line 1698 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1699 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3791 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3792 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 160:
|
||||
-#line 1700 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1701 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
|
||||
-#line 3797 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3798 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 161:
|
||||
-#line 1705 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1706 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_create((yyvsp[0]));
|
||||
}
|
||||
-#line 3805 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3806 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 162:
|
||||
-#line 1709 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1710 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
if ((yyvsp[0])->opcode == Op_match_rec) {
|
||||
(yyvsp[0])->opcode = Op_nomatch;
|
||||
@@ -3837,42 +3838,42 @@ regular_print:
|
||||
}
|
||||
}
|
||||
}
|
||||
-#line 3841 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3842 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 163:
|
||||
-#line 1741 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1742 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
if (do_pretty_print)
|
||||
(yyval) = list_append((yyvsp[-1]), bcalloc(Op_parens, 1, sourceline));
|
||||
else
|
||||
(yyval) = (yyvsp[-1]);
|
||||
}
|
||||
-#line 3852 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3853 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 164:
|
||||
-#line 1748 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1749 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
|
||||
if ((yyval) == NULL)
|
||||
YYABORT;
|
||||
}
|
||||
-#line 3862 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3863 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 165:
|
||||
-#line 1754 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1755 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
|
||||
if ((yyval) == NULL)
|
||||
YYABORT;
|
||||
}
|
||||
-#line 3872 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3873 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 166:
|
||||
-#line 1760 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1761 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
static bool warned = false;
|
||||
|
||||
@@ -3885,45 +3886,45 @@ regular_print:
|
||||
if ((yyval) == NULL)
|
||||
YYABORT;
|
||||
}
|
||||
-#line 3889 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3890 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 169:
|
||||
-#line 1775 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1776 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[-1])->opcode = Op_preincrement;
|
||||
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
|
||||
}
|
||||
-#line 3898 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3899 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 170:
|
||||
-#line 1780 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1781 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[-1])->opcode = Op_predecrement;
|
||||
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
|
||||
}
|
||||
-#line 3907 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3908 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 171:
|
||||
-#line 1785 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1786 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_create((yyvsp[0]));
|
||||
}
|
||||
-#line 3915 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3916 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 172:
|
||||
-#line 1789 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1790 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_create((yyvsp[0]));
|
||||
}
|
||||
-#line 3923 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3924 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 173:
|
||||
-#line 1793 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1794 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
if ((yyvsp[0])->lasti->opcode == Op_push_i
|
||||
&& ((yyvsp[0])->lasti->memory->flags & STRING) == 0
|
||||
@@ -3938,11 +3939,11 @@ regular_print:
|
||||
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
|
||||
}
|
||||
}
|
||||
-#line 3942 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3943 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 174:
|
||||
-#line 1808 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1809 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
if ((yyvsp[0])->lasti->opcode == Op_push_i
|
||||
&& ((yyvsp[0])->lasti->memory->flags & STRING) == 0
|
||||
@@ -3960,20 +3961,20 @@ regular_print:
|
||||
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
|
||||
}
|
||||
}
|
||||
-#line 3964 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3965 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 175:
|
||||
-#line 1829 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1830 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
|
||||
(yyval) = (yyvsp[0]);
|
||||
}
|
||||
-#line 3973 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 3974 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 176:
|
||||
-#line 1834 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1835 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
/* indirect function call */
|
||||
INSTRUCTION *f, *t;
|
||||
@@ -4007,11 +4008,11 @@ regular_print:
|
||||
(yyval) = list_prepend((yyvsp[0]), t);
|
||||
at_seen = false;
|
||||
}
|
||||
-#line 4011 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4012 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 177:
|
||||
-#line 1871 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1872 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
NODE *n;
|
||||
|
||||
@@ -4036,49 +4037,49 @@ regular_print:
|
||||
(yyval) = list_append(t, (yyvsp[-3]));
|
||||
}
|
||||
}
|
||||
-#line 4040 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4041 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 178:
|
||||
-#line 1899 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1900 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = NULL; }
|
||||
-#line 4046 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4047 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 179:
|
||||
-#line 1901 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1902 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[0]); }
|
||||
-#line 4052 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4053 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 180:
|
||||
-#line 1906 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1907 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = NULL; }
|
||||
-#line 4058 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4059 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 181:
|
||||
-#line 1908 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1909 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[-1]); }
|
||||
-#line 4064 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4065 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 182:
|
||||
-#line 1913 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1914 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[0]); }
|
||||
-#line 4070 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4071 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 183:
|
||||
-#line 1915 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1916 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
|
||||
}
|
||||
-#line 4078 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4079 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 184:
|
||||
-#line 1922 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1923 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
INSTRUCTION *ip = (yyvsp[0])->lasti;
|
||||
int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
|
||||
@@ -4092,11 +4093,11 @@ regular_print:
|
||||
sub_counter++; /* count # of dimensions */
|
||||
(yyval) = (yyvsp[0]);
|
||||
}
|
||||
-#line 4096 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4097 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 185:
|
||||
-#line 1939 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1940 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
INSTRUCTION *t = (yyvsp[-1]);
|
||||
if ((yyvsp[-1]) == NULL) {
|
||||
@@ -4110,31 +4111,31 @@ regular_print:
|
||||
(yyvsp[0])->sub_count = count_expressions(&t, false);
|
||||
(yyval) = list_append(t, (yyvsp[0]));
|
||||
}
|
||||
-#line 4114 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4115 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 186:
|
||||
-#line 1956 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1957 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[0]); }
|
||||
-#line 4120 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4121 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 187:
|
||||
-#line 1958 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1959 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
|
||||
}
|
||||
-#line 4128 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4129 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 188:
|
||||
-#line 1965 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1966 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[-1]); }
|
||||
-#line 4134 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4135 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 189:
|
||||
-#line 1970 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1971 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
char *var_name = (yyvsp[0])->lextok;
|
||||
|
||||
@@ -4142,22 +4143,22 @@ regular_print:
|
||||
(yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new);
|
||||
(yyval) = list_create((yyvsp[0]));
|
||||
}
|
||||
-#line 4146 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4147 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 190:
|
||||
-#line 1978 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1979 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
char *arr = (yyvsp[-1])->lextok;
|
||||
(yyvsp[-1])->memory = variable((yyvsp[-1])->source_line, arr, Node_var_new);
|
||||
(yyvsp[-1])->opcode = Op_push_array;
|
||||
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-1]));
|
||||
}
|
||||
-#line 4157 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4158 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 191:
|
||||
-#line 1988 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 1989 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
INSTRUCTION *ip = (yyvsp[0])->nexti;
|
||||
if (ip->opcode == Op_push
|
||||
@@ -4169,73 +4170,73 @@ regular_print:
|
||||
} else
|
||||
(yyval) = (yyvsp[0]);
|
||||
}
|
||||
-#line 4173 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4174 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 192:
|
||||
-#line 2000 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2001 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
|
||||
if ((yyvsp[0]) != NULL)
|
||||
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
|
||||
}
|
||||
-#line 4183 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4184 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 193:
|
||||
-#line 2009 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2010 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[0])->opcode = Op_postincrement;
|
||||
}
|
||||
-#line 4191 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4192 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 194:
|
||||
-#line 2013 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2014 "awkgram.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyvsp[0])->opcode = Op_postdecrement;
|
||||
}
|
||||
-#line 4199 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4200 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 195:
|
||||
-#line 2016 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2017 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = NULL; }
|
||||
-#line 4205 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4206 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 197:
|
||||
-#line 2024 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2025 "awkgram.y" /* yacc.c:1646 */
|
||||
{ yyerrok; }
|
||||
-#line 4211 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4212 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 198:
|
||||
-#line 2028 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2029 "awkgram.y" /* yacc.c:1646 */
|
||||
{ yyerrok; }
|
||||
-#line 4217 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4218 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 201:
|
||||
-#line 2037 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2038 "awkgram.y" /* yacc.c:1646 */
|
||||
{ yyerrok; }
|
||||
-#line 4223 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4224 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 202:
|
||||
-#line 2041 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2042 "awkgram.y" /* yacc.c:1646 */
|
||||
{ (yyval) = (yyvsp[0]); yyerrok; }
|
||||
-#line 4229 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4230 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 203:
|
||||
-#line 2045 "awkgram.y" /* yacc.c:1646 */
|
||||
+#line 2046 "awkgram.y" /* yacc.c:1646 */
|
||||
{ yyerrok; }
|
||||
-#line 4235 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4236 "awkgram.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
|
||||
-#line 4239 "awkgram.c" /* yacc.c:1646 */
|
||||
+#line 4240 "awkgram.c" /* yacc.c:1646 */
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@@ -4463,7 +4464,7 @@ yyreturn:
|
||||
#endif
|
||||
return yyresult;
|
||||
}
|
||||
-#line 2047 "awkgram.y" /* yacc.c:1906 */
|
||||
+#line 2048 "awkgram.y" /* yacc.c:1906 */
|
||||
|
||||
|
||||
struct token {
|
||||
diff --git a/awkgram.y b/awkgram.y
|
||||
index 1a75e64..9f35143 100644
|
||||
--- a/awkgram.y
|
||||
+++ b/awkgram.y
|
||||
@@ -1589,7 +1589,8 @@ common_exp
|
||||
|
||||
// 1.5 "" # can't fold this if program mucks with CONVFMT.
|
||||
// See test #12 in test/posix.awk.
|
||||
- if ((n1->flags & (NUMBER|NUMINT)) != 0 || (n2->flags & (NUMBER|NUMINT)) != 0)
|
||||
+ // Also can't fold if one or the other is translatable.
|
||||
+ if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0)
|
||||
goto plain_concat;
|
||||
|
||||
n1 = force_string(n1);
|
||||
--
|
||||
2.9.5
|
||||
|
51
gawk-4.2.0-001-rwarray-small-improvements.patch
Normal file
51
gawk-4.2.0-001-rwarray-small-improvements.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 750e3168705de678474fea0a551f9cf29e9e077d Mon Sep 17 00:00:00 2001
|
||||
From: "Arnold D. Robbins" <arnold@skeeve.com>
|
||||
Date: Sat, 28 Oct 2017 23:22:15 +0300
|
||||
Subject: [PATCH] Small improvements in extension/rwarray.c.
|
||||
|
||||
---
|
||||
extension/ChangeLog | 5 +++++
|
||||
extension/rwarray.c | 6 ++++--
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/extension/ChangeLog b/extension/ChangeLog
|
||||
index 4bfd896..c04e9c2 100644
|
||||
--- a/extension/ChangeLog
|
||||
+++ b/extension/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2017-10-28 Arnold D. Robbins <arnold@skeeve.com>
|
||||
+
|
||||
+ * rwarray.c (do_writea): Fix description in comment.
|
||||
+ (write_array): Free the flattened array if writing an element fails.
|
||||
+
|
||||
2017-10-19 Arnold D. Robbins <arnold@skeeve.com>
|
||||
|
||||
* 4.2.0: Release tar ball made.
|
||||
diff --git a/extension/rwarray.c b/extension/rwarray.c
|
||||
index 2e82ca7..997b6b2 100644
|
||||
--- a/extension/rwarray.c
|
||||
+++ b/extension/rwarray.c
|
||||
@@ -114,7 +114,7 @@ do_writea(int nargs, awk_value_t *result, struct awk_ext_func *unused)
|
||||
if (nargs < 2)
|
||||
goto out;
|
||||
|
||||
- /* directory is first arg, array to dump is second */
|
||||
+ /* filename is first arg, array to dump is second */
|
||||
if (! get_argument(0, AWK_STRING, & filename)) {
|
||||
fprintf(stderr, _("do_writea: argument 0 is not a string\n"));
|
||||
errno = EINVAL;
|
||||
@@ -178,8 +178,10 @@ write_array(FILE *fp, awk_array_t array)
|
||||
return awk_false;
|
||||
|
||||
for (i = 0; i < flat_array->count; i++) {
|
||||
- if (! write_elem(fp, & flat_array->elements[i]))
|
||||
+ if (! write_elem(fp, & flat_array->elements[i])) {
|
||||
+ (void) release_flattened_array(array, flat_array);
|
||||
return awk_false;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (! release_flattened_array(array, flat_array)) {
|
||||
--
|
||||
2.9.5
|
||||
|
18
gawk.spec
18
gawk.spec
@ -43,8 +43,8 @@
|
||||
|
||||
Name: gawk
|
||||
Summary: The GNU version of the AWK text processing utility
|
||||
Version: 4.1.4
|
||||
Release: 7%{?dist}
|
||||
Version: 4.2.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD
|
||||
|
||||
@ -88,7 +88,7 @@ BuildRequires: texlive-cm-super
|
||||
#
|
||||
# INFO: Upstream explicitly wishes that we do not use 'yacc' instead of bison.
|
||||
# For more info, see: https://bugzilla.redhat.com/show_bug.cgi?id=1176993
|
||||
#BuildRequires: bison
|
||||
BuildRequires: bison
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@ -99,7 +99,8 @@ BuildRequires: texlive-cm-super
|
||||
|
||||
# Upstream patches -- official upstream patches released by upstream since the
|
||||
# ---------------- last rebase that are necessary for any reason:
|
||||
Patch000: gawk-4.1.4-000-info-pages-fixes.patch
|
||||
Patch000: gawk-4.2.0-000-do-not-fold-constant-strings.patch
|
||||
Patch001: gawk-4.2.0-001-rwarray-small-improvements.patch
|
||||
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
@ -237,9 +238,10 @@ fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%{_bindir}/*awk
|
||||
%{_libdir}/gawk
|
||||
%{_libexecdir}/*awk
|
||||
%{_libdir}/*awk
|
||||
%{_datadir}/*awk
|
||||
%{_libexecdir}/*awk
|
||||
%{_sysconfdir}/profile.d/gawk.*
|
||||
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man3/*
|
||||
@ -264,6 +266,10 @@ fi
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Tue Nov 07 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 4.2.0-1
|
||||
- Update to late stable release from upstream [new API version - 2.0]
|
||||
- Added latest relevant patches from upstream's gawk-4.2-stable branch
|
||||
|
||||
* Fri Sep 15 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 4.1.4-7
|
||||
- Revert previous change of adding 'awk*' symlinks for info pages (bug #1486924)
|
||||
- Added patch to correctly fix the info pages issue (bug #1486924)
|
||||
|
Loading…
Reference in New Issue
Block a user