aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-02-09 11:33:36 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-02-09 11:33:36 +0200
commita7512f3eb03ae2b6361e56518a2f405e386315a0 (patch)
tree141e85f9b2fee728883e3851628da02f72ef639c
parent4f92f35791d975671881e21f6b79b71050fd2787 (diff)
parentc1e55fde1a4bb72a0627ab37fe5ba1493cbf91eb (diff)
downloadegawk-a7512f3eb03ae2b6361e56518a2f405e386315a0.tar.gz
egawk-a7512f3eb03ae2b6361e56518a2f405e386315a0.tar.bz2
egawk-a7512f3eb03ae2b6361e56518a2f405e386315a0.zip
Merge branch 'gawk-4.2-stable'
-rw-r--r--ChangeLog17
-rw-r--r--doc/ChangeLog7
-rw-r--r--doc/gawk.info130
-rw-r--r--doc/gawk.texi16
-rw-r--r--doc/gawktexi.in16
-rw-r--r--extension/ChangeLog8
-rwxr-xr-xextension/configure2
-rw-r--r--extension/configure.ac4
-rw-r--r--interpret.h3
-rw-r--r--io.c15
-rw-r--r--mpfr.c14
-rw-r--r--po/ChangeLog4
-rw-r--r--po/zh_CN.po104
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am12
-rw-r--r--test/Makefile.in17
-rw-r--r--test/Maketests5
-rw-r--r--test/mpfruplus.ok3
-rw-r--r--test/uplus.awk5
-rw-r--r--test/uplus.ok3
20 files changed, 249 insertions, 141 deletions
diff --git a/ChangeLog b/ChangeLog
index cceb353d..26ec271f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2018-02-09 Arnold D. Robbins <arnold@skeeve.com>
+
+ * io.c (socketopen): Rearrange assigning the flags to use
+ AI_ADDRCONFIG only if family is AF_UNSPEC. Thanks to
+ Houder <houder@xs4all.nl> for the report and initial
+ code suggestion.
+
+2018-02-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ Print +"01" should print "1", not "01".
+ * interpret.h (Op_unary_plus): Need to make a new number node that does
+ not contain the original string representation. The logic is copied
+ from Op_unary_minus.
+ * mpfr.c (mpg_interpret): Add new case for Op_unary_plus based on
+ the Op_unary_minus logic. We need a fresh number node that does not
+ contain the string.
+
2018-01-28 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.sub: Updated.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 308a89ce..965807f1 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2018-02-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Clarify binary mode is default on Cygwin,
+ improve section on using on PCs to refer to MinGW and DJGPP.
+ Thanks for the report to a contributor who wishes to
+ remain anonymous.
+
2018-01-28 Arnold D. Robbins <arnold@skeeve.com>
* wordlist: Updated.
diff --git a/doc/gawk.info b/doc/gawk.info
index d480c784..e3094117 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -29146,8 +29146,12 @@ File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Compiling, Up: PC In
B.3.1.3 Using 'gawk' on PC Operating Systems
............................................
-Under MS-Windows, the Cygwin and MinGW environments support both the
-'|&' operator and TCP/IP networking (*note TCP/IP Networking::).
+Information in this section applies to the MinGW and DJGPP ports of
+'gawk'. *Note Cygwin:: for information about the Cygwin port.
+
+ Under MS-Windows, the MinGW environment supports both the '|&'
+operator and TCP/IP networking (*note TCP/IP Networking::). The DJGPP
+environment does not support '|&'.
The MS-Windows version of 'gawk' searches for program files as
described in *note AWKPATH Variable::. However, semicolons (rather than
@@ -29235,6 +29239,14 @@ Cygwin is the same as for a Unix system:
on Cygwin takes considerably longer. However, it does finish, and then
the 'make' proceeds as usual.
+ Recent versions of Cygwin open all files in binary mode. This means
+that you should use 'RS = "\r?\n"' in order to be able to handle
+standard MS-Windows text files with carriage-return plus line-feed line
+endings.
+
+ The Cygwin environment supports both the '|&' operator and TCP/IP
+networking (*note TCP/IP Networking::).
+

File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation
@@ -33016,7 +33028,7 @@ Index
* /inet/... special files (gawk): TCP/IP Networking. (line 6)
* /inet4/... special files (gawk): TCP/IP Networking. (line 6)
* /inet6/... special files (gawk): TCP/IP Networking. (line 6)
-* ; (semicolon), AWKPATH variable and: PC Using. (line 9)
+* ; (semicolon), AWKPATH variable and: PC Using. (line 13)
* ; (semicolon), separating statements in actions: Statements/Lines.
(line 90)
* ; (semicolon), separating statements in actions <1>: Action Overview.
@@ -33345,7 +33357,7 @@ Index
* awka compiler for awk: Other Versions. (line 73)
* AWKLIBPATH environment variable: AWKLIBPATH Variable. (line 6)
* AWKPATH environment variable: AWKPATH Variable. (line 6)
-* AWKPATH environment variable <1>: PC Using. (line 9)
+* AWKPATH environment variable <1>: PC Using. (line 13)
* awkprof.out file: Profiling. (line 6)
* awksed.awk program: Simple Sed. (line 25)
* awkvars.out file: Options. (line 94)
@@ -33439,7 +33451,7 @@ Index
* bindtextdomain() function (gawk), portability and: I18N Portability.
(line 33)
* BINMODE variable: User-modified. (line 15)
-* BINMODE variable <1>: PC Using. (line 16)
+* BINMODE variable <1>: PC Using. (line 20)
* bit-manipulation functions: Bitwise Functions. (line 6)
* bits2str() user-defined function: Bitwise Functions. (line 69)
* bitwise AND: Bitwise Functions. (line 40)
@@ -33622,7 +33634,7 @@ Index
* common extensions, /dev/stderr special file: Special FD. (line 48)
* common extensions, /dev/stdin special file: Special FD. (line 48)
* common extensions, /dev/stdout special file: Special FD. (line 48)
-* common extensions, BINMODE variable: PC Using. (line 16)
+* common extensions, BINMODE variable: PC Using. (line 20)
* common extensions, delete to delete entire arrays: Delete. (line 39)
* common extensions, func keyword: Definition Syntax. (line 99)
* common extensions, length() applied to an array: String Functions.
@@ -33927,7 +33939,7 @@ Index
* differences in awk and gawk, BINMODE variable: User-modified.
(line 15)
* differences in awk and gawk, BINMODE variable <1>: PC Using.
- (line 16)
+ (line 20)
* differences in awk and gawk, close() function: Close Files And Pipes.
(line 81)
* differences in awk and gawk, close() function <1>: Close Files And Pipes.
@@ -34161,7 +34173,7 @@ Index
* extensions, common, /dev/stderr special file: Special FD. (line 48)
* extensions, common, /dev/stdin special file: Special FD. (line 48)
* extensions, common, /dev/stdout special file: Special FD. (line 48)
-* extensions, common, BINMODE variable: PC Using. (line 16)
+* extensions, common, BINMODE variable: PC Using. (line 20)
* extensions, common, delete to delete entire arrays: Delete. (line 39)
* extensions, common, fflush() function: I/O Functions. (line 43)
* extensions, common, func keyword: Definition Syntax. (line 99)
@@ -34469,7 +34481,7 @@ Index
* gawk, line continuation in: Conditional Exp. (line 34)
* gawk, LINT variable in: User-modified. (line 90)
* gawk, list of contributors to: Contributors. (line 6)
-* gawk, MS-Windows version of: PC Using. (line 9)
+* gawk, MS-Windows version of: PC Using. (line 13)
* gawk, newlines in: Statements/Lines. (line 12)
* gawk, octal numbers and: Nondecimal-numbers. (line 41)
* gawk, predefined variables and: Built-in Variables. (line 14)
@@ -35485,12 +35497,12 @@ Index
* search and replace in strings: String Functions. (line 89)
* search in string: String Functions. (line 155)
* search paths: Programs Exercises. (line 70)
-* search paths <1>: PC Using. (line 9)
+* search paths <1>: PC Using. (line 13)
* search paths <2>: VMS Running. (line 57)
* search paths, for loadable extensions: AWKLIBPATH Variable. (line 6)
* search paths, for source files: AWKPATH Variable. (line 6)
* search paths, for source files <1>: Programs Exercises. (line 70)
-* search paths, for source files <2>: PC Using. (line 9)
+* search paths, for source files <2>: PC Using. (line 13)
* search paths, for source files <3>: VMS Running. (line 57)
* searching, files for regular expressions: Egrep Program. (line 6)
* searching, for words: Dupword Program. (line 6)
@@ -35498,7 +35510,7 @@ Index
* sed utility <1>: Simple Sed. (line 6)
* sed utility <2>: Glossary. (line 16)
* seeding random number generator: Numeric Functions. (line 64)
-* semicolon (;), AWKPATH variable and: PC Using. (line 9)
+* semicolon (;), AWKPATH variable and: PC Using. (line 13)
* semicolon (;), separating statements in actions: Statements/Lines.
(line 90)
* semicolon (;), separating statements in actions <1>: Action Overview.
@@ -36514,52 +36526,52 @@ Node: PC Installation1174372
Node: PC Binary Installation1175210
Node: PC Compiling1175645
Node: PC Using1176762
-Node: Cygwin1179807
-Node: MSYS1180577
-Node: VMS Installation1181078
-Node: VMS Compilation1181869
-Ref: VMS Compilation-Footnote-11183098
-Node: VMS Dynamic Extensions1183156
-Node: VMS Installation Details1184841
-Node: VMS Running1187094
-Node: VMS GNV1191373
-Node: VMS Old Gawk1192108
-Node: Bugs1192579
-Node: Bug address1193242
-Node: Usenet1196034
-Node: Maintainers1196811
-Node: Other Versions1198072
-Node: Installation summary1204834
-Node: Notes1206036
-Node: Compatibility Mode1206901
-Node: Additions1207683
-Node: Accessing The Source1208608
-Node: Adding Code1210045
-Node: New Ports1216264
-Node: Derived Files1220752
-Ref: Derived Files-Footnote-11226398
-Ref: Derived Files-Footnote-21226433
-Ref: Derived Files-Footnote-31227031
-Node: Future Extensions1227145
-Node: Implementation Limitations1227803
-Node: Extension Design1228986
-Node: Old Extension Problems1230140
-Ref: Old Extension Problems-Footnote-11231658
-Node: Extension New Mechanism Goals1231715
-Ref: Extension New Mechanism Goals-Footnote-11235079
-Node: Extension Other Design Decisions1235268
-Node: Extension Future Growth1237381
-Node: Old Extension Mechanism1238217
-Node: Notes summary1239980
-Node: Basic Concepts1241162
-Node: Basic High Level1241843
-Ref: figure-general-flow1242125
-Ref: figure-process-flow1242810
-Ref: Basic High Level-Footnote-11246111
-Node: Basic Data Typing1246296
-Node: Glossary1249624
-Node: Copying1281462
-Node: GNU Free Documentation License1319005
-Node: Index1344125
+Node: Cygwin1179977
+Node: MSYS1181076
+Node: VMS Installation1181577
+Node: VMS Compilation1182368
+Ref: VMS Compilation-Footnote-11183597
+Node: VMS Dynamic Extensions1183655
+Node: VMS Installation Details1185340
+Node: VMS Running1187593
+Node: VMS GNV1191872
+Node: VMS Old Gawk1192607
+Node: Bugs1193078
+Node: Bug address1193741
+Node: Usenet1196533
+Node: Maintainers1197310
+Node: Other Versions1198571
+Node: Installation summary1205333
+Node: Notes1206535
+Node: Compatibility Mode1207400
+Node: Additions1208182
+Node: Accessing The Source1209107
+Node: Adding Code1210544
+Node: New Ports1216763
+Node: Derived Files1221251
+Ref: Derived Files-Footnote-11226897
+Ref: Derived Files-Footnote-21226932
+Ref: Derived Files-Footnote-31227530
+Node: Future Extensions1227644
+Node: Implementation Limitations1228302
+Node: Extension Design1229485
+Node: Old Extension Problems1230639
+Ref: Old Extension Problems-Footnote-11232157
+Node: Extension New Mechanism Goals1232214
+Ref: Extension New Mechanism Goals-Footnote-11235578
+Node: Extension Other Design Decisions1235767
+Node: Extension Future Growth1237880
+Node: Old Extension Mechanism1238716
+Node: Notes summary1240479
+Node: Basic Concepts1241661
+Node: Basic High Level1242342
+Ref: figure-general-flow1242624
+Ref: figure-process-flow1243309
+Ref: Basic High Level-Footnote-11246610
+Node: Basic Data Typing1246795
+Node: Glossary1250123
+Node: Copying1281961
+Node: GNU Free Documentation License1319504
+Node: Index1344624

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 24515bf8..36116543 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -39740,9 +39740,14 @@ type @samp{make mingw32}.
@cindex operating systems, PC, @command{gawk} on
@cindex PC operating systems, @command{gawk} on
-Under MS-Windows, the Cygwin and MinGW environments support
+Information in this section applies to the MinGW and
+DJGPP ports of @command{gawk}. @xref{Cygwin} for information
+about the Cygwin port.
+
+Under MS-Windows, the MinGW environment supports
both the @samp{|&} operator and TCP/IP networking
(@pxref{TCP/IP Networking}).
+The DJGPP environment does not support @samp{|&}.
@cindex search paths
@cindex search paths, for source files
@@ -39868,6 +39873,15 @@ When compared to GNU/Linux on the same system, the @samp{configure}
step on Cygwin takes considerably longer. However, it does finish,
and then the @samp{make} proceeds as usual.
+Recent versions of Cygwin open all files in binary mode. This means
+that you should use @samp{RS = "\r?\n"} in order to be able to
+handle standard MS-Windows text files with carriage-return plus
+line-feed line endings.
+
+The Cygwin environment supports
+both the @samp{|&} operator and TCP/IP networking
+(@pxref{TCP/IP Networking}).
+
@node MSYS
@appendixsubsubsec Using @command{gawk} In The MSYS Environment
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 34ba59cf..b02b8502 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -38714,9 +38714,14 @@ type @samp{make mingw32}.
@cindex operating systems, PC, @command{gawk} on
@cindex PC operating systems, @command{gawk} on
-Under MS-Windows, the Cygwin and MinGW environments support
+Information in this section applies to the MinGW and
+DJGPP ports of @command{gawk}. @xref{Cygwin} for information
+about the Cygwin port.
+
+Under MS-Windows, the MinGW environment supports
both the @samp{|&} operator and TCP/IP networking
(@pxref{TCP/IP Networking}).
+The DJGPP environment does not support @samp{|&}.
@cindex search paths
@cindex search paths, for source files
@@ -38842,6 +38847,15 @@ When compared to GNU/Linux on the same system, the @samp{configure}
step on Cygwin takes considerably longer. However, it does finish,
and then the @samp{make} proceeds as usual.
+Recent versions of Cygwin open all files in binary mode. This means
+that you should use @samp{RS = "\r?\n"} in order to be able to
+handle standard MS-Windows text files with carriage-return plus
+line-feed line endings.
+
+The Cygwin environment supports
+both the @samp{|&} operator and TCP/IP networking
+(@pxref{TCP/IP Networking}).
+
@node MSYS
@appendixsubsubsec Using @command{gawk} In The MSYS Environment
diff --git a/extension/ChangeLog b/extension/ChangeLog
index b811e6ca..83d43729 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,11 @@
+2018-02-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * configure.ac (pkgextensiondir): This must be set to
+ '${libdir}/gawk'${EXTENSIONDIR} to match gawk's value.
+ The previous value of '${pkglibdir}'${EXTENSIONDIR} was incorrect,
+ because it was putting the extensions in the gawk-extensions
+ libdir subdirectory, instead of the gawk subdirectory.
+
2018-02-02 Arnold D. Robbins <arnold@skeeve.com>
* filefuncs.3am, fnmatch.3am, fork.3am, inplace.3am,
diff --git a/extension/configure b/extension/configure
index 084334e1..2ace2d86 100755
--- a/extension/configure
+++ b/extension/configure
@@ -12595,7 +12595,7 @@ CC=$lt_save_CC
-pkgextensiondir='${pkglibdir}'${EXTENSIONDIR}
+pkgextensiondir='${libdir}/gawk'${EXTENSIONDIR}
if test "$GCC" = yes
diff --git a/extension/configure.ac b/extension/configure.ac
index e8b242a0..2b913364 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -56,7 +56,9 @@ dnl AC_PROG_INSTALL
dnl use the same definition as the main configure script.
dnl EXTENSIONDIR is exported if it was set there.
-AC_SUBST([pkgextensiondir], ['${pkglibdir}'${EXTENSIONDIR}])
+dnl N.B. We must use ${libdir}/gawk instead of $pkglibdir because $pkglibdir
+dnl is set to ${libdir}/gawk-extensions, which is not what we want.
+AC_SUBST([pkgextensiondir], ['${libdir}/gawk'${EXTENSIONDIR}])
if test "$GCC" = yes
then
diff --git a/interpret.h b/interpret.h
index 2ee68112..96e2c890 100644
--- a/interpret.h
+++ b/interpret.h
@@ -621,6 +621,9 @@ mod:
case Op_unary_plus:
// Force argument to be numeric
t1 = TOP_NUMBER();
+ r = make_number(t1->numbr);
+ DEREF(t1);
+ REPLACE(r);
break;
case Op_store_sub:
diff --git a/io.c b/io.c
index befc20a1..f09c4a02 100644
--- a/io.c
+++ b/io.c
@@ -1579,10 +1579,23 @@ socketopen(int family, int type, const char *localpname,
int any_remote_host = (strcmp(remotehostname, "0") == 0);
memset(& lhints, '\0', sizeof (lhints));
- lhints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
+
lhints.ai_socktype = type;
lhints.ai_family = family;
+ /*
+ * If only the loopback interface is up and hints.ai_flags has
+ * AI_ADDRCONFIG, getaddrinfo() will succeed and return all wildcard
+ * addresses, but only if hints.ai_family == AF_UNSPEC
+ *
+ * Do return the wildcard address in case the loopback interface
+ * is the only one that is up (and
+ * hints.ai_family == either AF_INET4 or AF_INET6)
+ */
+ lhints.ai_flags = AI_PASSIVE;
+ if (lhints.ai_family == AF_UNSPEC)
+ lhints.ai_flags |= AI_ADDRCONFIG;
+
lerror = getaddrinfo(NULL, localpname, & lhints, & lres);
if (lerror) {
if (strcmp(localpname, "0") != 0) {
diff --git a/mpfr.c b/mpfr.c
index 1c4a2b9b..0c962c67 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1682,6 +1682,20 @@ mod:
REPLACE(r);
break;
+ case Op_unary_plus:
+ t1 = TOP_NUMBER();
+ if (is_mpg_float(t1)) {
+ r = mpg_float();
+ tval = mpfr_set(r->mpg_numbr, t1->mpg_numbr, ROUND_MODE);
+ IEEE_FMT(r->mpg_numbr, tval);
+ } else {
+ r = mpg_integer();
+ mpz_set(r->mpg_i, t1->mpg_i);
+ }
+ DEREF(t1);
+ REPLACE(r);
+ break;
+
case Op_assign_plus:
case Op_assign_minus:
case Op_assign_times:
diff --git a/po/ChangeLog b/po/ChangeLog
index e2491c18..575b488e 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * zh_CN.po: Updated.
+
2018-02-04 Arnold D. Robbins <arnold@skeeve.com>
* pt_BR.po: Updated.
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 36942acf..6c27feed 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8,10 +8,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 4.1.64\n"
+"Project-Id-Version: gawk 4.2.0e\n"
"Report-Msgid-Bugs-To: bug-gawk@gnu.org\n"
"POT-Creation-Date: 2018-01-28 20:07+0200\n"
-"PO-Revision-Date: 2017-09-16 13:10+0200\n"
+"PO-Revision-Date: 2018-02-05 19:53+0100\n"
"Last-Translator: Tianze Wang <zwpwjwtz@126.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@@ -516,8 +516,7 @@ msgid "division by zero attempted in `%%'"
msgstr "在“%%”中试图除 0"
#: awkgram.y:5552
-msgid ""
-"cannot assign a value to the result of a field post-increment expression"
+msgid "cannot assign a value to the result of a field post-increment expression"
msgstr "无法将值赋给字段后增表达式"
#: awkgram.y:5555
@@ -767,8 +766,7 @@ msgstr "substr:开始坐标 %g 超出字符串尾部"
#: builtin.c:1863
#, c-format
-msgid ""
-"substr: length %g at start index %g exceeds length of first argument (%lu)"
+msgid "substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr "substr:在开始坐标 %2$g 下长度 %1$g 超出第一个参数的长度 (%3$lu)"
#: builtin.c:1936
@@ -1007,8 +1005,7 @@ msgstr "intdiv:试图除0"
#: builtin.c:4080
#, c-format
-msgid ""
-"typeof detected invalid flags combination `%s'; please file a bug report."
+msgid "typeof detected invalid flags combination `%s'; please file a bug report."
msgstr "typeof 函数发现一个无效的选项组合“%s”;请向开发者汇报此错误。"
#: builtin.c:4095
@@ -1122,14 +1119,11 @@ msgid "non-zero integer value"
msgstr "非零整数值"
#: command.y:819
-msgid ""
-"backtrace [N] - print trace of all or N innermost (outermost if N < 0) "
-"frames."
+msgid "backtrace [N] - print trace of all or N innermost (outermost if N < 0) frames."
msgstr "backtrace [N] - 显示所有或最近 N 层 (若 N < 0,则显示最远 N 层) 调用。"
#: command.y:821
-msgid ""
-"break [[filename:]N|function] - set breakpoint at the specified location."
+msgid "break [[filename:]N|function] - set breakpoint at the specified location."
msgstr "break [[文件名:]N|函数] - 在指定处设置断点。"
#: command.y:823
@@ -1137,9 +1131,7 @@ msgid "clear [[filename:]N|function] - delete breakpoints previously set."
msgstr "clear [[文件名:]N|函数] - 删除之前设置的断点。"
#: command.y:825
-msgid ""
-"commands [num] - starts a list of commands to be executed at a "
-"breakpoint(watchpoint) hit."
+msgid "commands [num] - starts a list of commands to be executed at a breakpoint(watchpoint) hit."
msgstr "commands [编号] - 在断点 (监视点) 处执行一系列命令。"
#: command.y:827
@@ -1203,12 +1195,8 @@ msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT."
msgstr "ignore N 次数 - 设置忽略断点 N 的次数。"
#: command.y:857
-msgid ""
-"info topic - source|sources|variables|functions|break|frame|args|locals|"
-"display|watch."
-msgstr ""
-"info 主题 - 查看 info 信息,主题可以为 source|sources|variables|functions|"
-"break|frame|args|locals|display|watch。"
+msgid "info topic - source|sources|variables|functions|break|frame|args|locals|display|watch."
+msgstr "info 主题 - 查看 info 信息,主题可以为 source|sources|variables|functions|break|frame|args|locals|display|watch。"
#: command.y:859
msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)."
@@ -1219,8 +1207,7 @@ msgid "next [COUNT] - step program, proceeding through subroutine calls."
msgstr "next [次数] - 单步运行程序,并且步过子调用。"
#: command.y:863
-msgid ""
-"nexti [COUNT] - step one instruction, but proceed through subroutine calls."
+msgid "nexti [COUNT] - step one instruction, but proceed through subroutine calls."
msgstr "nexti [次数] - 单运行一步指令,但步过其子调用。"
#: command.y:865
@@ -1256,8 +1243,7 @@ msgid "set var = value - assign value to a scalar variable."
msgstr "set 变量 = 值 - 给标量变量赋值。"
#: command.y:883
-msgid ""
-"silent - suspends usual message when stopped at a breakpoint/watchpoint."
+msgid "silent - suspends usual message when stopped at a breakpoint/watchpoint."
msgstr "silent - 在断点/监视点处中断时,隐藏常规消息。"
#: command.y:885
@@ -1285,9 +1271,7 @@ msgid "undisplay [N] - remove variable(s) from automatic display list."
msgstr "undisplay [N] - 从自动显示列表中移除指定变量。"
#: command.y:897
-msgid ""
-"until [[filename:]N|function] - execute until program reaches a different "
-"line or line N within current frame."
+msgid "until [[filename:]N|function] - execute until program reaches a different line or line N within current frame."
msgstr "until [[文件名:]N|函数] - 在当前层中执行,在下一行或第 N 行处暂停。"
#: command.y:899
@@ -1303,12 +1287,8 @@ msgid "watch var - set a watchpoint for a variable."
msgstr "watch 变量 - 为变量设置监视点。"
#: command.y:905
-msgid ""
-"where [N] - (same as backtrace) print trace of all or N innermost (outermost "
-"if N < 0) frames."
-msgstr ""
-"where [N] - (与backtrace相同) 显示所有或最近 N 层 (若 N < 0,则显示最远 N "
-"层) 调用。"
+msgid "where [N] - (same as backtrace) print trace of all or N innermost (outermost if N < 0) frames."
+msgstr "where [N] - (与backtrace相同) 显示所有或最近 N 层 (若 N < 0,则显示最远 N 层) 调用。"
#: command.y:1016 debug.c:401 gawkapi.c:258 msg.c:137
#, c-format
@@ -1993,8 +1973,7 @@ msgstr "load_ext:无法打开库“%s”(%s)\n"
#: ext.c:66
#, c-format
-msgid ""
-"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"
+msgid "load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"
msgstr "load_ext:库“%s”:未定义“plugin_is_GPL_compatible”(%s)\n"
#: ext.c:72
@@ -2436,9 +2415,7 @@ msgstr "awk_value_to_node:数值类型“%d”无效"
#: gawkapi.c:520
#, c-format
-msgid ""
-"node_to_awk_value: detected invalid numeric flags combination `%s'; please "
-"file a bug report."
+msgid "node_to_awk_value: detected invalid numeric flags combination `%s'; please file a bug report."
msgstr "node_to_awk_value:发现一个无效的选项组合“%s”;请向开发者汇报此错误。"
#: gawkapi.c:548
@@ -2451,9 +2428,7 @@ msgstr "node_to_awk_value:值为空"
#: gawkapi.c:607 gawkapi.c:641 gawkapi.c:668 gawkapi.c:701
#, c-format
-msgid ""
-"node_to_awk_value detected invalid flags combination `%s'; please file a bug "
-"report."
+msgid "node_to_awk_value detected invalid flags combination `%s'; please file a bug report."
msgstr "node_to_awk_value 发现了一个无效的选项组合“%s”;请向开发者汇报此错误。"
#: gawkapi.c:1072
@@ -2518,8 +2493,7 @@ msgstr "“%s”重定向中的表达式是空字符串"
#: io.c:796
#, c-format
-msgid ""
-"filename `%.*s' for `%s' redirection may be result of logical expression"
+msgid "filename `%.*s' for `%s' redirection may be result of logical expression"
msgstr "“%3$s”重定向中的文件名“%2$.*1$s”可能是逻辑表达式的结果"
#: io.c:844
@@ -2544,8 +2518,7 @@ msgstr "无法为输入打开管道“%s”(%s)"
#: io.c:950
#, c-format
-msgid ""
-"get_file socket creation not supported on this platform for `%s' with fd %d"
+msgid "get_file socket creation not supported on this platform for `%s' with fd %d"
msgstr "此平台不支持使用 get_file 创建文件描述符为 %2$d 的套接字“%1$s”"
#: io.c:961
@@ -2564,8 +2537,7 @@ msgid "can't redirect to `%s' (%s)"
msgstr "无法重定向到“%s”(%s)"
#: io.c:1153
-msgid ""
-"reached system limit for open files: starting to multiplex file descriptors"
+msgid "reached system limit for open files: starting to multiplex file descriptors"
msgstr "打开的文件数达到系统限制:开始复用文件描述符"
#: io.c:1169
@@ -2720,9 +2692,8 @@ msgid "close of slave pty failed (%s)"
msgstr "关闭从 pty 失败(%s)"
#: io.c:2245
-#, fuzzy
msgid "could not create child process or open pty"
-msgstr "无法为“%s”创建子进程(fork:%s)"
+msgstr "无法创建子进程或打开 pty"
#: io.c:2333 io.c:2401 io.c:2613 io.c:2645
#, c-format
@@ -2785,8 +2756,7 @@ msgstr "register_output_parser:指针为空"
#: io.c:3201
#, c-format
-msgid ""
-"output wrapper `%s' conflicts with previously installed output wrapper `%s'"
+msgid "output wrapper `%s' conflicts with previously installed output wrapper `%s'"
msgstr "输出解析器“%s”与之前设置的“%s”相冲突"
#: io.c:3208
@@ -2800,9 +2770,7 @@ msgstr "register_output_processor:指针为空"
#: io.c:3258
#, c-format
-msgid ""
-"two-way processor `%s' conflicts with previously installed two-way processor "
-"`%s'"
+msgid "two-way processor `%s' conflicts with previously installed two-way processor `%s'"
msgstr "双向处理器“%s”与之前设置的“%s”相冲突"
#: io.c:3267
@@ -3010,7 +2978,6 @@ msgstr "\t-Y\t\t--parsedebug\n"
#. address for translation bugs.
#. no-wrap
#: main.c:627
-#, fuzzy
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info'\n"
@@ -3025,6 +2992,7 @@ msgstr ""
"Problems and Bugs”一节。您也可以在\n"
"https://www.gnu.org/software/gawk/manual/html_node/Bugs.html\n"
"中找到相同的信息。\n"
+"请勿在群组 comp.lang.awk 上提交错误报告。\n"
"\n"
#: main.c:634
@@ -3080,9 +3048,7 @@ msgstr ""
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
-msgstr ""
-"你应该收到程序附带的一份 GNU 通用公共许可证(GPL)。如果没有收到,请参看 "
-"http://www.gnu.org/licenses/ 。\n"
+msgstr "你应该收到程序附带的一份 GNU 通用公共许可证(GPL)。如果没有收到,请参看 http://www.gnu.org/licenses/ 。\n"
#: main.c:725
msgid "-Ft does not set FS to tab in POSIX awk"
@@ -3239,9 +3205,7 @@ msgstr "“\\x”转义序列中没有十六进制数"
#: node.c:611
#, c-format
-msgid ""
-"hex escape \\x%.*s of %d characters probably not interpreted the way you "
-"expect"
+msgid "hex escape \\x%.*s of %d characters probably not interpreted the way you expect"
msgstr "十六进制转义符 \\x%.*s 表示的 %d 个字符可能不会被如期望情况解释"
#: node.c:626
@@ -3250,9 +3214,7 @@ msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "转义序列“\\%c”被当作单纯的“%c”"
#: node.c:762
-msgid ""
-"Invalid multibyte data detected. There may be a mismatch between your data "
-"and your locale."
+msgid "Invalid multibyte data detected. There may be a mismatch between your data and your locale."
msgstr "检测到了无效的多字节数据。可能你的数据和区域设置不匹配。"
#: posix/gawkmisc.c:177
@@ -3528,8 +3490,7 @@ msgstr "无法弹出 main 的上下文"
#~ msgid "extension: cannot open library `%s' (%s)"
#~ msgstr "extension:无法打开库“%s”(%s)"
-#~ msgid ""
-#~ "extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)"
+#~ msgid "extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)"
#~ msgstr "extension:库“%s”:未定义“plugin_is_GPL_compatible”(%s)"
#~ msgid "extension: library `%s': cannot call function `%s' (%s)"
@@ -3679,8 +3640,7 @@ msgstr "无法弹出 main 的上下文"
#~ msgid "xor(%lf, %lf): fractional values will be truncated"
#~ msgstr "xor(%lf, %lf): 小数部分会被截断"
-#~ msgid ""
-#~ "for loop: array `%s' changed size from %ld to %ld during loop execution"
+#~ msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
#~ msgstr "for loop: 数组“%s”在循环执行时大小从 %ld 改变为 %ld"
#~ msgid "`break' outside a loop is not portable"
@@ -3701,9 +3661,7 @@ msgstr "无法弹出 main 的上下文"
#~ msgid "statement has no effect"
#~ msgstr "表达式无任何作用"
-#~ msgid ""
-#~ "concatenation: side effects in one expression have changed the length of "
-#~ "another!"
+#~ msgid "concatenation: side effects in one expression have changed the length of another!"
#~ msgstr "concatenation: 一个表达式的额外效应已改变另一个的长度!"
#~ msgid "assignment used in conditional context"
diff --git a/test/ChangeLog b/test/ChangeLog
index 27817e24..c239ba24 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (uplus, mpfruplus): Add new tests.
+ * uplus.awk, uplus.ok, mpfruplus.ok: New files.
+
2018-02-05 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (MPFR_TESTS): Sort tests and use backslash
diff --git a/test/Makefile.am b/test/Makefile.am
index e154338c..1100cb4c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -676,6 +676,7 @@ EXTRA_DIST = \
mpfrsqrt.ok \
mpfrstrtonum.awk \
mpfrstrtonum.ok \
+ mpfruplus.ok \
mpgforcenum.awk \
mpgforcenum.ok \
mtchi18n.awk \
@@ -1176,6 +1177,8 @@ EXTRA_DIST = \
uparrfs.awk \
uparrfs.in \
uparrfs.ok \
+ uplus.awk \
+ uplus.ok \
valgrind.awk \
watchpoint1.awk \
watchpoint1.in \
@@ -1251,7 +1254,7 @@ BASIC_TESTS = \
splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \
subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 \
tradanch tweakfld \
- uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
+ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
zero2 zeroe0 zeroflag
@@ -1299,7 +1302,7 @@ MACHINE_TESTS = double1 double2 fmtspcl intformat
MPFR_TESTS = mpfrbigint mpfrexprange mpfrieee mpfrmemok1 mpfrnegzero \
mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \
- mpfrstrtonum mpgforcenum
+ mpfrstrtonum mpgforcenum mpfruplus
LOCALE_CHARSET_TESTS = \
asort asorti backbigs1 backsmalls1 backsmalls2 \
@@ -2123,6 +2126,11 @@ mpfrstrtonum:
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfruplus:
+ @echo $@
+ @$(AWK) -M -f "$(srcdir)"/uplus.awk > _$@ 2>&1
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
mpgforcenum:
@echo $@
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/Makefile.in b/test/Makefile.in
index 99047fef..3de436f0 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -934,6 +934,7 @@ EXTRA_DIST = \
mpfrsqrt.ok \
mpfrstrtonum.awk \
mpfrstrtonum.ok \
+ mpfruplus.ok \
mpgforcenum.awk \
mpgforcenum.ok \
mtchi18n.awk \
@@ -1434,6 +1435,8 @@ EXTRA_DIST = \
uparrfs.awk \
uparrfs.in \
uparrfs.ok \
+ uplus.awk \
+ uplus.ok \
valgrind.awk \
watchpoint1.awk \
watchpoint1.in \
@@ -1508,7 +1511,7 @@ BASIC_TESTS = \
splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \
subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 \
tradanch tweakfld \
- uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
+ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
zero2 zeroe0 zeroflag
@@ -1552,7 +1555,7 @@ INET_TESTS = inetdayu inetdayt inetechu inetecht
MACHINE_TESTS = double1 double2 fmtspcl intformat
MPFR_TESTS = mpfrbigint mpfrexprange mpfrieee mpfrmemok1 mpfrnegzero \
mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \
- mpfrstrtonum mpgforcenum
+ mpfrstrtonum mpgforcenum mpfruplus
LOCALE_CHARSET_TESTS = \
asort asorti backbigs1 backsmalls1 backsmalls2 \
@@ -2563,6 +2566,11 @@ mpfrstrtonum:
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfruplus:
+ @echo $@
+ @$(AWK) -M -f "$(srcdir)"/uplus.awk > _$@ 2>&1
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
mpgforcenum:
@echo $@
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
@@ -3946,6 +3954,11 @@ uparrfs:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+uplus:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
wjposer1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 314aaaec..e449dd30 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1037,6 +1037,11 @@ uparrfs:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+uplus:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
wjposer1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/mpfruplus.ok b/test/mpfruplus.ok
new file mode 100644
index 00000000..9f6e83e2
--- /dev/null
+++ b/test/mpfruplus.ok
@@ -0,0 +1,3 @@
+1
+1
+-1
diff --git a/test/uplus.awk b/test/uplus.awk
new file mode 100644
index 00000000..3220f7fd
--- /dev/null
+++ b/test/uplus.awk
@@ -0,0 +1,5 @@
+BEGIN {
+ print "01" + 0
+ print +"01"
+ print -"01"
+}
diff --git a/test/uplus.ok b/test/uplus.ok
new file mode 100644
index 00000000..9f6e83e2
--- /dev/null
+++ b/test/uplus.ok
@@ -0,0 +1,3 @@
+1
+1
+-1