aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-06-15 21:50:45 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-06-15 21:50:45 +0300
commitf4bbf63a287cd73f4eb989539e4813a428bf05ad (patch)
tree313b4a799a7b58b6bfedbee30be9d0419c748aed
parent5826beec258141776469c5fd9b703d52c81a35fb (diff)
parentddb62efafb5659dae532089af83350f066446424 (diff)
downloadegawk-f4bbf63a287cd73f4eb989539e4813a428bf05ad.tar.gz
egawk-f4bbf63a287cd73f4eb989539e4813a428bf05ad.tar.bz2
egawk-f4bbf63a287cd73f4eb989539e4813a428bf05ad.zip
Merge branch 'master' into feature/fixtype
-rw-r--r--ChangeLog47
-rw-r--r--builtin.c10
-rwxr-xr-xconfig.guess37
-rwxr-xr-xconfig.sub14
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac2
-rw-r--r--dfa.c8
-rw-r--r--doc/ChangeLog13
-rw-r--r--doc/awkcard.in9
-rw-r--r--doc/gawk.119
-rw-r--r--doc/gawk.info1154
-rw-r--r--doc/gawk.texi43
-rw-r--r--doc/gawkinet.texi2
-rw-r--r--doc/gawktexi.in43
-rw-r--r--extension/build-aux/ChangeLog8
-rwxr-xr-xextension/build-aux/config.guess37
-rwxr-xr-xextension/build-aux/config.sub14
-rw-r--r--helpers/ChangeLog5
-rw-r--r--helpers/changed-files.awk19
-rw-r--r--main.c2
-rw-r--r--node.c17
-rw-r--r--nonposix.h2
-rw-r--r--pc/ChangeLog6
-rw-r--r--pc/Makefile.tst22
-rw-r--r--symbol.c4
-rw-r--r--test/ChangeLog28
-rw-r--r--test/Makefile.am27
-rw-r--r--test/Makefile.in37
-rw-r--r--test/Maketests10
-rw-r--r--test/hex2.awk1
-rw-r--r--test/hex2.in2
-rw-r--r--test/hex2.ok2
-rw-r--r--test/mixed1.ok4
-rw-r--r--test/subback.awk16
-rw-r--r--test/subback.in1
-rw-r--r--test/subback.ok12
-rw-r--r--test/symtab10.awk1
-rw-r--r--test/symtab10.in4
-rw-r--r--test/symtab10.ok11
39 files changed, 1006 insertions, 691 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f4631f1..106f3b3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * config.sub: Update from GNULIB.
+
2016-06-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awk.h (boolval): New inline function to standardize testing whether
@@ -95,6 +99,49 @@
be converted to a NUMBER, so take advantage of new endptr arg
to nondec2awknum.
+2016-06-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c (do_sub): Fix sub for long runs of backslashes.
+ Thanks to Mike Brennan for the report.
+
+ Unrelated:
+ * ext.c (get_argument): Remove unused variable pcount.
+
+2016-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * config.guess, config.sub: Get latest from Gnulib master.
+ * main.c (UPDATE_YEAR): Bump to 2016.
+
+2016-06-09 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with GNU grep.
+
+ Unrelated:
+
+ * configure.ac: Move AM_CONDITIONAL[ENABLE_EXTENSIONS] outside
+ the enclosing if. Thanks to Assaf Gordon <assafgordon@gmail.com>
+ for the report.
+
+2016-06-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * symbol.c (lookup): If got Node_val, it's a non-variable
+ in SYMTAB, return NULL. Can affect watchpoints in the debugger,
+ maybe other places. Thanks to Hermann Peifer for the
+ test case and report.
+
+2016-06-05 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with GNU grep.
+
+2016-06-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * nonposix.h (getpgrp): Wrap declaration in ifdef so it doesn't
+ mess things up on POSIX systems (like Solaris). Thanks to
+ Nelson Beebe for the report.
+ * node.c (is_hex): New function to check for 0x preceded by
+ optional sign.
+ (r_force_number): Use it. Thanks to Mike Brennan for the report.
+
2016-05-30 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawkapi.h (awk_ext_func_t): Rename num_expected_args to
diff --git a/builtin.c b/builtin.c
index 4d9e1452..7ef5d3a1 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2956,8 +2956,10 @@ do_sub(int nargs, unsigned int flags)
leave alone, it goes into the output */
} else {
/* gawk default behavior since 1996 */
- if (strncmp(scan, "\\\\\\&", 4) == 0) {
+ if (strncmp(scan, "\\\\\\&", 4) == 0
+ || strncmp(scan, "\\\\\\\\", 4) == 0) { /* 2016: fixed */
/* \\\& --> \& */
+ /* \\\\ --> \\ */
repllen -= 2;
scan += 3;
} else if (strncmp(scan, "\\\\&", 3) == 0) {
@@ -3070,10 +3072,12 @@ do_sub(int nargs, unsigned int flags)
*bp++ = *scan;
} else {
/* gawk default behavior since 1996 */
- if (strncmp(scan, "\\\\\\&", 4) == 0) {
+ if (strncmp(scan, "\\\\\\&", 4) == 0
+ || strncmp(scan, "\\\\\\\\", 4) == 0) { /* 2016: fixed */
/* \\\& --> \& */
+ /* \\\\ --> \\ */
*bp++ = '\\';
- *bp++ = '&';
+ *bp++ = scan[3];
scan += 3;
} else if (strncmp(scan, "\\\\&", 3) == 0) {
/* \\& --> \<string> */
diff --git a/config.guess b/config.guess
index 373a659a..c4bd827a 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2016-02-11'
+timestamp='2016-05-15'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@@ -386,7 +389,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
@@ -684,7 +687,7 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
@@ -701,7 +704,7 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH=hppa2.0w
@@ -900,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@@ -1276,6 +1279,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1291,7 +1297,7 @@ EOF
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@@ -1386,7 +1392,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@@ -1405,18 +1411,17 @@ esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
diff --git a/config.sub b/config.sub
index 6223dde9..eccd2189 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2016-01-01'
+timestamp='2016-06-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -643,6 +643,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -1399,7 +1407,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos*)
+ | -onefs* | -tirtos* | -phoenix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1531,6 +1539,8 @@ case $os in
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
diff --git a/configure b/configure
index 35d22850..c9955354 100755
--- a/configure
+++ b/configure
@@ -9971,7 +9971,8 @@ fi
as_fn_error $? "extension support requested, but unavailable" "$LINENO" 5
fi
enable_extensions=$extensions_supported
- if test "x$enable_extensions" = "xyes"; then
+fi
+ if test "x$enable_extensions" = "xyes"; then
ENABLE_EXTENSIONS_TRUE=
ENABLE_EXTENSIONS_FALSE='#'
else
@@ -9979,7 +9980,6 @@ else
ENABLE_EXTENSIONS_FALSE=
fi
-fi
case $host_os in
vms*|beos*|os2*|msdos)
diff --git a/configure.ac b/configure.ac
index a3e41e56..bfe785db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,8 +315,8 @@ if test "x$enable_extensions" != "xno"; then
AC_MSG_ERROR([extension support requested, but unavailable])
fi
enable_extensions=$extensions_supported
- AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"])
fi
+AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"])
dnl check for how to use getpgrp
dnl have to hardwire it for VMS POSIX. Sigh.
diff --git a/dfa.c b/dfa.c
index f8dc8b24..ca8c3b15 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1210,7 +1210,7 @@ parse_bracket_exp (void)
if (dfa->multibyte)
{
- static charclass zeroclass;
+ static charclass const zeroclass;
work_mbc->invert = invert;
work_mbc->cset = equal (ccl, zeroclass) ? -1 : charclass_index (ccl);
return MBCSET;
@@ -3399,8 +3399,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
s = allow_nl ? d->newlines[s1] : 0;
}
-
- if (d->fails[s])
+ else if (d->fails[s])
{
if (d->success[s] & sbit[*p])
goto done;
@@ -3413,8 +3412,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
}
else
{
- if (!d->trans[s])
- build_state (s, d);
+ build_state (s, d);
trans = d->trans;
}
}
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 7251f6a7..f5e1b35a 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,16 @@
+2016-06-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.1: Document typeof(), update modified date.
+ * awkcard.in: Document typeof().
+
+2016-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Fix a typo, and replace hard-coded "section" with
+ @value{SECTION} where appropriate. Thanks to Antonio
+ Giovanni Colombo for the reports.
+ (UPDATE-MONTH, PATCHLEVEL): Update to current before release.
+ * awkcard.in: Update version.
+
2016-05-30 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawktexi.in: Replace num_expected_args with max_expected_args.
diff --git a/doc/awkcard.in b/doc/awkcard.in
index 06085343..0b377ee5 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -1887,7 +1887,12 @@ See the manual for details.\*(CB
.ti -.2i
\*(CD\*(FCisarray(\*(FIx\*(FC)\*(FR
.br
-Return true if \*(FIx\fP is an array, false otherwise.\*(CB
+Return true if \*(FIx\fP is an array, false otherwise.
+.br
+.ti -.2i
+\*(FCtypeof(\*(FIx\*(FC)\*(FR
+.br
+Return a string indicating the type of \*(FIx\fP.\*(CB
.in -.2i
.EB "\s+2\f(HBTYPE FUNCTIONS (\*(GK\f(HB)\*(FR\s0"
.sp .5
@@ -1944,7 +1949,7 @@ to use the current domain.\*(CB
.ES
.nf
\*(CDHost: \*(FCftp.gnu.org\*(FR
-File: \*(FC/gnu/gawk/gawk-4.1.3.tar.gz\fP
+File: \*(FC/gnu/gawk/gawk-4.1.4.tar.gz\fP
.in +.2i
.fi
GNU \*(AK (\*(GK). There may be a later version.
diff --git a/doc/gawk.1 b/doc/gawk.1
index f5dd245f..633e8be4 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -13,7 +13,7 @@
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
-.TH GAWK 1 "Mar 7 2016" "Free Software Foundation" "Utility Commands"
+.TH GAWK 1 "Jun 15 2016" "Free Software Foundation" "Utility Commands"
.SH NAME
gawk \- pattern scanning and processing language
.SH SYNOPSIS
@@ -3213,13 +3213,28 @@ bits.
Return the bitwise XOR of the values provided in the argument list.
There must be at least two.
.PP
-.SS Type Function
+.SS Type Functions
The following function is for use with multidimensional arrays.
.TP
\fBisarray(\fIx\fB)\fR
Return true if
.I x
is an array, false otherwise.
+.PP
+You can tell the type of any variable or array element with the
+following function:
+.TP
+\fBtypeof(\fIx\fB)\fR
+Return a string indicating the type of
+.IR x .
+The string will be one of
+\fB"array"\fP,
+\fB"number"\fP,
+\fB"regexp"\fP,
+\fB"string"\fP,
+\fB"strnum"\fP,
+or
+\fB"undefined"\fP.
.SS Internationalization Functions
The following functions may be used from within your AWK program for
translating strings at run-time.
diff --git a/doc/gawk.info b/doc/gawk.info
index 8aa84227..2a190873 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -5,7 +5,7 @@ Free Software Foundation, Inc.
This is Edition 4.1 of 'GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 4.1.3 (or later) version of the GNU
+Guide for GNU Awk', for the 4.1.4 (or later) version of the GNU
implementation of AWK.
Permission is granted to copy, distribute and/or modify this document
@@ -42,7 +42,7 @@ Free Software Foundation, Inc.
This is Edition 4.1 of 'GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 4.1.3 (or later) version of the GNU
+Guide for GNU Awk', for the 4.1.4 (or later) version of the GNU
implementation of AWK.
Permission is granted to copy, distribute and/or modify this document
@@ -1006,8 +1006,8 @@ be of interest on first reading. All appear in the index, under the
heading "sidebar."
Most of the time, the examples use complete 'awk' programs. Some of
-the more advanced sections show only the part of the 'awk' program that
-illustrates the concept being described.
+the more advanced minor nodes show only the part of the 'awk' program
+that illustrates the concept being described.
Although this Info file is aimed principally at people who have not
been exposed to 'awk', there is a lot of information here that even the
@@ -2148,7 +2148,7 @@ variables are automatically initialized to zero.)
rule executes and prints the value of 'sum'. In this example, the value
of 'sum' is 80600.
- These more advanced 'awk' techniques are covered in later sections
+ These more advanced 'awk' techniques are covered in later minor nodes
(*note Action Overview::). Before you can move on to more advanced
'awk' programming, you have to know how 'awk' interprets your input and
displays your output. By manipulating fields and using 'print'
@@ -11987,7 +11987,7 @@ File: gawk.info, Node: Built-in, Next: User-defined, Up: Functions
"Built-in" functions are always available for your 'awk' program to
call. This minor node defines all the built-in functions in 'awk'; some
-of these are mentioned in other sections but are summarized here for
+of these are mentioned in other minor nodes but are summarized here for
your convenience.
* Menu:
@@ -12883,8 +12883,8 @@ the use of 'gawk' and 'gensub()' when you have to do substitutions.
---------- Footnotes ----------
(1) This was rather naive of him, despite there being a note in this
-section indicating that the next major version would move to the POSIX
-rules.
+minor node indicating that the next major version would move to the
+POSIX rules.

File: gawk.info, Node: I/O Functions, Next: Time Functions, Prev: String Functions, Up: Built-in
@@ -24008,7 +24008,7 @@ always be called, and to take effect as appropriate (as the 'readdir'
extension does). Or you may want it to take effect based upon the value
of an 'awk' variable, as the XML extension from the 'gawkextlib' project
does (*note gawkextlib::). In the latter case, code in a 'BEGINFILE'
-section can look at 'FILENAME' and 'ERRNO' to decide whether or not to
+rule can look at 'FILENAME' and 'ERRNO' to decide whether or not to
activate an input parser (*note BEGINFILE/ENDFILE::).
You register your input parser with the following function:
@@ -24158,7 +24158,7 @@ structures as described earlier.
' awk_input_buf_t *inbuf,'
' awk_output_buf_t *outbuf);'
The function pointed to by this field should fill in the
- 'awk_input_buf_t' and 'awk_outut_buf_t' structures pointed to by
+ 'awk_input_buf_t' and 'awk_output_buf_t' structures pointed to by
'inbuf' and 'outbuf', respectively. These structures were
described earlier.
@@ -24429,7 +24429,7 @@ usual. Then get a scalar cookie for the variable using 'sym_lookup()':
...
}
- Next, use the routines in this section for retrieving and updating
+ Next, use the routines in this minor node for retrieving and updating
the value through the cookie. Thus, 'do_magic()' now becomes something
like this:
@@ -24464,7 +24464,7 @@ File: gawk.info, Node: Cached values, Prev: Symbol table by cookie, Up: Symbo
16.4.10.3 Creating and Using Cached Values
..........................................
-The routines in this section allow you to create and release cached
+The routines in this minor node allow you to create and release cached
values. Like scalar cookies, in theory, cached values are not
necessary. You can create numbers and strings using the functions in
*note Constructor Functions::. You can then assign those values to
@@ -24478,7 +24478,7 @@ identical copies of the string.(1)
It is clearly more efficient, if possible, to create a value once,
and then tell 'gawk' to reuse the value for multiple variables. That is
-what the routines in this section let you do. The functions are as
+what the routines in this minor node let you do. The functions are as
follows:
'awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result);'
@@ -27864,7 +27864,7 @@ There are two ways to get GNU software:
supported. If you have the 'wget' program, you can use a command
like the following:
- wget http://ftp.gnu.org/gnu/gawk/gawk-4.1.3.tar.gz
+ wget http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.gz
The GNU software archive is mirrored around the world. The
up-to-date list of mirror sites is available from the main FSF website
@@ -27886,25 +27886,25 @@ compression programs: 'gzip', 'bzip2', and 'xz'. For simplicity, the
rest of these instructions assume you are using the one compressed with
the GNU Gzip program ('gzip').
- Once you have the distribution (e.g., 'gawk-4.1.3.tar.gz'), use
+ Once you have the distribution (e.g., 'gawk-4.1.4.tar.gz'), use
'gzip' to expand the file and then use 'tar' to extract it. You can use
the following pipeline to produce the 'gawk' distribution:
- gzip -d -c gawk-4.1.3.tar.gz | tar -xvpf -
+ gzip -d -c gawk-4.1.4.tar.gz | tar -xvpf -
On a system with GNU 'tar', you can let 'tar' do the decompression
for you:
- tar -xvpzf gawk-4.1.3.tar.gz
+ tar -xvpzf gawk-4.1.4.tar.gz
-Extracting the archive creates a directory named 'gawk-4.1.3' in the
+Extracting the archive creates a directory named 'gawk-4.1.4' in the
current directory.
The distribution file name is of the form 'gawk-V.R.P.tar.gz'. The V
represents the major version of 'gawk', the R represents the current
release of version V, and the P represents a "patch level", meaning that
minor bugs have been fixed in the release. The current patch level is
-3, but when retrieving distributions, you should get the version with
+4, but when retrieving distributions, you should get the version with
the highest version, release, and patch level. (Note, however, that
patch levels greater than or equal to 70 denote "beta" or nonproduction
software; you might not want to retrieve such a version unless you don't
@@ -28121,7 +28121,7 @@ Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin
environment for MS-Windows.
After you have extracted the 'gawk' distribution, 'cd' to
-'gawk-4.1.3'. As with most GNU software, you configure 'gawk' for your
+'gawk-4.1.4'. As with most GNU software, you configure 'gawk' for your
system by running the 'configure' program. This program is a Bourne
shell script that is generated automatically using GNU Autoconf. (The
Autoconf software is described fully starting with *note (Autoconf,
@@ -28580,8 +28580,8 @@ environment provides an excellent simulation of GNU/Linux, using Bash,
GCC, GNU Make, and other GNU programs. Compilation and installation for
Cygwin is the same as for a Unix system:
- tar -xvpzf gawk-4.1.3.tar.gz
- cd gawk-4.1.3
+ tar -xvpzf gawk-4.1.4.tar.gz
+ cd gawk-4.1.4
./configure
make && make check
@@ -29163,9 +29163,9 @@ B.6 Summary
* The 'gawk' distribution is available from the GNU Project's main
distribution site, 'ftp.gnu.org'. The canonical build recipe is:
- wget http://ftp.gnu.org/gnu/gawk/gawk-4.1.3.tar.gz
- tar -xvpzf gawk-4.1.3.tar.gz
- cd gawk-4.1.3
+ wget http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.gz
+ tar -xvpzf gawk-4.1.4.tar.gz
+ cd gawk-4.1.4
./configure && make && make check
* 'gawk' may be built on non-POSIX systems as well. The currently
@@ -35274,557 +35274,557 @@ Node: History51835
Node: Names54187
Ref: Names-Footnote-155281
Node: This Manual55428
-Ref: This Manual-Footnote-161910
-Node: Conventions62010
-Node: Manual History64364
-Ref: Manual History-Footnote-167359
-Ref: Manual History-Footnote-267400
-Node: How To Contribute67474
-Node: Acknowledgments68603
-Node: Getting Started73489
-Node: Running gawk75928
-Node: One-shot77118
-Node: Read Terminal78381
-Node: Long80413
-Node: Executable Scripts81926
-Ref: Executable Scripts-Footnote-184721
-Node: Comments84824
-Node: Quoting87308
-Node: DOS Quoting92825
-Node: Sample Data Files93500
-Node: Very Simple96095
-Node: Two Rules100997
-Node: More Complex102882
-Node: Statements/Lines105745
-Ref: Statements/Lines-Footnote-1110204
-Node: Other Features110469
-Node: When111405
-Ref: When-Footnote-1113159
-Node: Intro Summary113224
-Node: Invoking Gawk114108
-Node: Command Line115622
-Node: Options116420
-Ref: Options-Footnote-1132518
-Ref: Options-Footnote-2132748
-Node: Other Arguments132773
-Node: Naming Standard Input135720
-Node: Environment Variables136813
-Node: AWKPATH Variable137371
-Ref: AWKPATH Variable-Footnote-1140782
-Ref: AWKPATH Variable-Footnote-2140827
-Node: AWKLIBPATH Variable141088
-Node: Other Environment Variables142345
-Node: Exit Status145983
-Node: Include Files146660
-Node: Loading Shared Libraries150255
-Node: Obsolete151683
-Node: Undocumented152375
-Node: Invoking Summary152672
-Node: Regexp154332
-Node: Regexp Usage155851
-Node: Escape Sequences157888
-Node: Regexp Operators164120
-Ref: Regexp Operators-Footnote-1171536
-Ref: Regexp Operators-Footnote-2171683
-Node: Bracket Expressions171781
-Ref: table-char-classes174257
-Node: Leftmost Longest177394
-Node: Computed Regexps178697
-Node: GNU Regexp Operators182124
-Node: Case-sensitivity185803
-Ref: Case-sensitivity-Footnote-1188699
-Ref: Case-sensitivity-Footnote-2188934
-Node: Strong Regexp Constants189042
-Node: Regexp Summary191984
-Node: Reading Files193590
-Node: Records195753
-Node: awk split records196486
-Node: gawk split records201417
-Ref: gawk split records-Footnote-1205957
-Node: Fields205994
-Node: Nonconstant Fields208735
-Ref: Nonconstant Fields-Footnote-1210971
-Node: Changing Fields211175
-Node: Field Separators217103
-Node: Default Field Splitting219801
-Node: Regexp Field Splitting220919
-Node: Single Character Fields224272
-Node: Command Line Field Separator225332
-Node: Full Line Fields228550
-Ref: Full Line Fields-Footnote-1230072
-Ref: Full Line Fields-Footnote-2230118
-Node: Field Splitting Summary230219
-Node: Constant Size232293
-Node: Splitting By Content236871
-Ref: Splitting By Content-Footnote-1240842
-Node: Multiple Line241005
-Ref: Multiple Line-Footnote-1246887
-Node: Getline247066
-Node: Plain Getline249532
-Node: Getline/Variable252171
-Node: Getline/File253320
-Node: Getline/Variable/File254706
-Ref: Getline/Variable/File-Footnote-1256309
-Node: Getline/Pipe256397
-Node: Getline/Variable/Pipe259102
-Node: Getline/Coprocess260235
-Node: Getline/Variable/Coprocess261500
-Node: Getline Notes262240
-Node: Getline Summary265035
-Ref: table-getline-variants265457
-Node: Read Timeout266205
-Ref: Read Timeout-Footnote-1270111
-Node: Retrying Input270169
-Node: Command-line directories271368
-Node: Input Summary272274
-Node: Input Exercises275446
-Node: Printing276174
-Node: Print278008
-Node: Print Examples279465
-Node: Output Separators282245
-Node: OFMT284262
-Node: Printf285618
-Node: Basic Printf286403
-Node: Control Letters287977
-Node: Format Modifiers291965
-Node: Printf Examples297980
-Node: Redirection300466
-Node: Special FD307307
-Ref: Special FD-Footnote-1310475
-Node: Special Files310549
-Node: Other Inherited Files311166
-Node: Special Network312167
-Node: Special Caveats313027
-Node: Close Files And Pipes313976
-Ref: Close Files And Pipes-Footnote-1321163
-Ref: Close Files And Pipes-Footnote-2321311
-Node: Nonfatal321462
-Node: Output Summary323787
-Node: Output Exercises325009
-Node: Expressions325688
-Node: Values326876
-Node: Constants327554
-Node: Scalar Constants328245
-Ref: Scalar Constants-Footnote-1329109
-Node: Nondecimal-numbers329359
-Node: Regexp Constants332372
-Node: Using Constant Regexps332898
-Node: Variables336061
-Node: Using Variables336718
-Node: Assignment Options338628
-Node: Conversion340501
-Node: Strings And Numbers341025
-Ref: Strings And Numbers-Footnote-1344088
-Node: Locale influences conversions344197
-Ref: table-locale-affects346955
-Node: All Operators347573
-Node: Arithmetic Ops348202
-Node: Concatenation350708
-Ref: Concatenation-Footnote-1353555
-Node: Assignment Ops353662
-Ref: table-assign-ops358653
-Node: Increment Ops359966
-Node: Truth Values and Conditions363426
-Node: Truth Values364500
-Node: Typing and Comparison365548
-Node: Variable Typing366368
-Node: Comparison Operators369992
-Ref: table-relational-ops370411
-Node: POSIX String Comparison373906
-Ref: POSIX String Comparison-Footnote-1374980
-Node: Boolean Ops375119
-Ref: Boolean Ops-Footnote-1379601
-Node: Conditional Exp379693
-Node: Function Calls381429
-Node: Precedence385306
-Node: Locales388965
-Node: Expressions Summary390597
-Node: Patterns and Actions393170
-Node: Pattern Overview394290
-Node: Regexp Patterns395967
-Node: Expression Patterns396509
-Node: Ranges400290
-Node: BEGIN/END403398
-Node: Using BEGIN/END404159
-Ref: Using BEGIN/END-Footnote-1406895
-Node: I/O And BEGIN/END407001
-Node: BEGINFILE/ENDFILE409315
-Node: Empty412222
-Node: Using Shell Variables412539
-Node: Action Overview414813
-Node: Statements417138
-Node: If Statement418986
-Node: While Statement420481
-Node: Do Statement422509
-Node: For Statement423657
-Node: Switch Statement426815
-Node: Break Statement429201
-Node: Continue Statement431293
-Node: Next Statement433120
-Node: Nextfile Statement435503
-Node: Exit Statement438155
-Node: Built-in Variables440558
-Node: User-modified441691
-Node: Auto-set449277
-Ref: Auto-set-Footnote-1463664
-Ref: Auto-set-Footnote-2463870
-Node: ARGC and ARGV463926
-Node: Pattern Action Summary468139
-Node: Arrays470569
-Node: Array Basics471898
-Node: Array Intro472742
-Ref: figure-array-elements474717
-Ref: Array Intro-Footnote-1477421
-Node: Reference to Elements477549
-Node: Assigning Elements480013
-Node: Array Example480504
-Node: Scanning an Array482263
-Node: Controlling Scanning485285
-Ref: Controlling Scanning-Footnote-1490684
-Node: Numeric Array Subscripts491000
-Node: Uninitialized Subscripts493184
-Node: Delete494803
-Ref: Delete-Footnote-1497555
-Node: Multidimensional497612
-Node: Multiscanning500707
-Node: Arrays of Arrays502298
-Node: Arrays Summary507065
-Node: Functions509158
-Node: Built-in510196
-Node: Calling Built-in511274
-Node: Numeric Functions513270
-Ref: Numeric Functions-Footnote-1518103
-Ref: Numeric Functions-Footnote-2518460
-Ref: Numeric Functions-Footnote-3518508
-Node: String Functions518780
-Ref: String Functions-Footnote-1542284
-Ref: String Functions-Footnote-2542412
-Ref: String Functions-Footnote-3542660
-Node: Gory Details542747
-Ref: table-sub-escapes544538
-Ref: table-sub-proposed546057
-Ref: table-posix-sub547420
-Ref: table-gensub-escapes548961
-Ref: Gory Details-Footnote-1549784
-Node: I/O Functions549935
-Ref: table-system-return-values556517
-Ref: I/O Functions-Footnote-1558497
-Ref: I/O Functions-Footnote-2558645
-Node: Time Functions558765
-Ref: Time Functions-Footnote-1569270
-Ref: Time Functions-Footnote-2569338
-Ref: Time Functions-Footnote-3569496
-Ref: Time Functions-Footnote-4569607
-Ref: Time Functions-Footnote-5569719
-Ref: Time Functions-Footnote-6569946
-Node: Bitwise Functions570212
-Ref: table-bitwise-ops570806
-Ref: Bitwise Functions-Footnote-1575144
-Node: Type Functions575317
-Node: I18N Functions577978
-Node: User-defined579629
-Node: Definition Syntax580434
-Ref: Definition Syntax-Footnote-1586121
-Node: Function Example586192
-Ref: Function Example-Footnote-1589114
-Node: Function Caveats589136
-Node: Calling A Function589654
-Node: Variable Scope590612
-Node: Pass By Value/Reference593606
-Node: Return Statement597105
-Node: Dynamic Typing600084
-Node: Indirect Calls601014
-Ref: Indirect Calls-Footnote-1611265
-Node: Functions Summary611393
-Node: Library Functions614098
-Ref: Library Functions-Footnote-1617705
-Ref: Library Functions-Footnote-2617848
-Node: Library Names618019
-Ref: Library Names-Footnote-1621479
-Ref: Library Names-Footnote-2621702
-Node: General Functions621788
-Node: Strtonum Function622891
-Node: Assert Function625913
-Node: Round Function629239
-Node: Cliff Random Function630780
-Node: Ordinal Functions631796
-Ref: Ordinal Functions-Footnote-1634859
-Ref: Ordinal Functions-Footnote-2635111
-Node: Join Function635321
-Ref: Join Function-Footnote-1637091
-Node: Getlocaltime Function637291
-Node: Readfile Function641033
-Node: Shell Quoting643005
-Node: Data File Management644406
-Node: Filetrans Function645038
-Node: Rewind Function649134
-Node: File Checking651039
-Ref: File Checking-Footnote-1652373
-Node: Empty Files652574
-Node: Ignoring Assigns654553
-Node: Getopt Function656103
-Ref: Getopt Function-Footnote-1667572
-Node: Passwd Functions667772
-Ref: Passwd Functions-Footnote-1676611
-Node: Group Functions676699
-Ref: Group Functions-Footnote-1684596
-Node: Walking Arrays684803
-Node: Library Functions Summary687811
-Node: Library Exercises689217
-Node: Sample Programs689682
-Node: Running Examples690452
-Node: Clones691180
-Node: Cut Program692404
-Node: Egrep Program702333
-Ref: Egrep Program-Footnote-1709845
-Node: Id Program709955
-Node: Split Program713635
-Ref: Split Program-Footnote-1717094
-Node: Tee Program717223
-Node: Uniq Program720013
-Node: Wc Program727439
-Ref: Wc Program-Footnote-1731694
-Node: Miscellaneous Programs731788
-Node: Dupword Program733001
-Node: Alarm Program735031
-Node: Translate Program739886
-Ref: Translate Program-Footnote-1744451
-Node: Labels Program744721
-Ref: Labels Program-Footnote-1748072
-Node: Word Sorting748156
-Node: History Sorting752228
-Node: Extract Program754063
-Node: Simple Sed761592
-Node: Igawk Program764666
-Ref: Igawk Program-Footnote-1778997
-Ref: Igawk Program-Footnote-2779199
-Ref: Igawk Program-Footnote-3779321
-Node: Anagram Program779436
-Node: Signature Program782498
-Node: Programs Summary783745
-Node: Programs Exercises784959
-Ref: Programs Exercises-Footnote-1789088
-Node: Advanced Features789179
-Node: Nondecimal Data791169
-Node: Array Sorting792760
-Node: Controlling Array Traversal793460
-Ref: Controlling Array Traversal-Footnote-1801827
-Node: Array Sorting Functions801945
-Ref: Array Sorting Functions-Footnote-1807036
-Node: Two-way I/O807232
-Ref: Two-way I/O-Footnote-1813782
-Ref: Two-way I/O-Footnote-2813969
-Node: TCP/IP Networking814051
-Node: Profiling817169
-Ref: Profiling-Footnote-1825662
-Node: Advanced Features Summary825985
-Node: Internationalization827829
-Node: I18N and L10N829309
-Node: Explaining gettext829996
-Ref: Explaining gettext-Footnote-1835019
-Ref: Explaining gettext-Footnote-2835204
-Node: Programmer i18n835369
-Ref: Programmer i18n-Footnote-1840224
-Node: Translator i18n840273
-Node: String Extraction841067
-Ref: String Extraction-Footnote-1842199
-Node: Printf Ordering842285
-Ref: Printf Ordering-Footnote-1845071
-Node: I18N Portability845135
-Ref: I18N Portability-Footnote-1847591
-Node: I18N Example847654
-Ref: I18N Example-Footnote-1850460
-Node: Gawk I18N850533
-Node: I18N Summary851178
-Node: Debugger852519
-Node: Debugging853541
-Node: Debugging Concepts853982
-Node: Debugging Terms855791
-Node: Awk Debugging858366
-Node: Sample Debugging Session859272
-Node: Debugger Invocation859806
-Node: Finding The Bug861192
-Node: List of Debugger Commands867670
-Node: Breakpoint Control869003
-Node: Debugger Execution Control872697
-Node: Viewing And Changing Data876059
-Node: Execution Stack879433
-Node: Debugger Info881070
-Node: Miscellaneous Debugger Commands885141
-Node: Readline Support890229
-Node: Limitations891125
-Ref: Limitations-Footnote-1895356
-Node: Debugging Summary895407
-Node: Arbitrary Precision Arithmetic896686
-Node: Computer Arithmetic898102
-Ref: table-numeric-ranges901693
-Ref: Computer Arithmetic-Footnote-1902415
-Node: Math Definitions902472
-Ref: table-ieee-formats905786
-Ref: Math Definitions-Footnote-1906389
-Node: MPFR features906494
-Node: FP Math Caution908211
-Ref: FP Math Caution-Footnote-1909283
-Node: Inexactness of computations909652
-Node: Inexact representation910612
-Node: Comparing FP Values911972
-Node: Errors accumulate913054
-Node: Getting Accuracy914487
-Node: Try To Round917197
-Node: Setting precision918096
-Ref: table-predefined-precision-strings918793
-Node: Setting the rounding mode920623
-Ref: table-gawk-rounding-modes920997
-Ref: Setting the rounding mode-Footnote-1924405
-Node: Arbitrary Precision Integers924584
-Ref: Arbitrary Precision Integers-Footnote-1929501
-Node: POSIX Floating Point Problems929650
-Ref: POSIX Floating Point Problems-Footnote-1933532
-Node: Floating point summary933570
-Node: Dynamic Extensions935760
-Node: Extension Intro937313
-Node: Plugin License938579
-Node: Extension Mechanism Outline939376
-Ref: figure-load-extension939815
-Ref: figure-register-new-function941380
-Ref: figure-call-new-function942472
-Node: Extension API Description944534
-Node: Extension API Functions Introduction946066
-Node: General Data Types950925
-Ref: General Data Types-Footnote-1956880
-Node: Memory Allocation Functions957179
-Ref: Memory Allocation Functions-Footnote-1960024
-Node: Constructor Functions960123
-Node: Registration Functions961868
-Node: Extension Functions962553
-Node: Exit Callback Functions965176
-Node: Extension Version String966426
-Node: Input Parsers967089
-Node: Output Wrappers976974
-Node: Two-way processors981486
-Node: Printing Messages983750
-Ref: Printing Messages-Footnote-1984921
-Node: Updating ERRNO985074
-Node: Requesting Values985813
-Ref: table-value-types-returned986550
-Node: Accessing Parameters987433
-Node: Symbol Table Access988668
-Node: Symbol table by name989180
-Node: Symbol table by cookie991201
-Ref: Symbol table by cookie-Footnote-1995350
-Node: Cached values995414
-Ref: Cached values-Footnote-1998915
-Node: Array Manipulation999006
-Ref: Array Manipulation-Footnote-11000097
-Node: Array Data Types1000134
-Ref: Array Data Types-Footnote-11002792
-Node: Array Functions1002884
-Node: Flattening Arrays1006742
-Node: Creating Arrays1013650
-Node: Redirection API1018419
-Node: Extension API Variables1021250
-Node: Extension Versioning1021883
-Ref: gawk-api-version1022320
-Node: Extension API Informational Variables1024076
-Node: Extension API Boilerplate1025140
-Node: Finding Extensions1028954
-Node: Extension Example1029513
-Node: Internal File Description1030311
-Node: Internal File Ops1034391
-Ref: Internal File Ops-Footnote-11046153
-Node: Using Internal File Ops1046293
-Ref: Using Internal File Ops-Footnote-11048676
-Node: Extension Samples1048950
-Node: Extension Sample File Functions1050479
-Node: Extension Sample Fnmatch1058128
-Node: Extension Sample Fork1059615
-Node: Extension Sample Inplace1060833
-Node: Extension Sample Ord1064043
-Node: Extension Sample Readdir1064879
-Ref: table-readdir-file-types1065768
-Node: Extension Sample Revout1066573
-Node: Extension Sample Rev2way1067162
-Node: Extension Sample Read write array1067902
-Node: Extension Sample Readfile1069844
-Node: Extension Sample Time1070939
-Node: Extension Sample API Tests1072287
-Node: gawkextlib1072779
-Node: Extension summary1075226
-Node: Extension Exercises1078928
-Node: Language History1080425
-Node: V7/SVR3.11082081
-Node: SVR41084233
-Node: POSIX1085667
-Node: BTL1087046
-Node: POSIX/GNU1087775
-Node: Feature History1093637
-Node: Common Extensions1108007
-Node: Ranges and Locales1109290
-Ref: Ranges and Locales-Footnote-11113906
-Ref: Ranges and Locales-Footnote-21113933
-Ref: Ranges and Locales-Footnote-31114168
-Node: Contributors1114389
-Node: History summary1119958
-Node: Installation1121338
-Node: Gawk Distribution1122282
-Node: Getting1122766
-Node: Extracting1123727
-Node: Distribution contents1125365
-Node: Unix Installation1131459
-Node: Quick Installation1132141
-Node: Shell Startup Files1134555
-Node: Additional Configuration Options1135633
-Node: Configuration Philosophy1137438
-Node: Non-Unix Installation1139807
-Node: PC Installation1140265
-Node: PC Binary Installation1141585
-Node: PC Compiling1143437
-Ref: PC Compiling-Footnote-11146461
-Node: PC Testing1146570
-Node: PC Using1147750
-Node: Cygwin1151864
-Node: MSYS1152634
-Node: VMS Installation1153135
-Node: VMS Compilation1153926
-Ref: VMS Compilation-Footnote-11155155
-Node: VMS Dynamic Extensions1155213
-Node: VMS Installation Details1156898
-Node: VMS Running1159151
-Node: VMS GNV1163430
-Node: VMS Old Gawk1164165
-Node: Bugs1164636
-Node: Other Versions1168833
-Node: Installation summary1175417
-Node: Notes1176475
-Node: Compatibility Mode1177340
-Node: Additions1178122
-Node: Accessing The Source1179047
-Node: Adding Code1180482
-Node: New Ports1186701
-Node: Derived Files1191189
-Ref: Derived Files-Footnote-11196674
-Ref: Derived Files-Footnote-21196709
-Ref: Derived Files-Footnote-31197307
-Node: Future Extensions1197421
-Node: Implementation Limitations1198079
-Node: Extension Design1199262
-Node: Old Extension Problems1200416
-Ref: Old Extension Problems-Footnote-11201934
-Node: Extension New Mechanism Goals1201991
-Ref: Extension New Mechanism Goals-Footnote-11205355
-Node: Extension Other Design Decisions1205544
-Node: Extension Future Growth1207657
-Node: Old Extension Mechanism1208493
-Node: Notes summary1210256
-Node: Basic Concepts1211438
-Node: Basic High Level1212119
-Ref: figure-general-flow1212401
-Ref: figure-process-flow1213086
-Ref: Basic High Level-Footnote-11216387
-Node: Basic Data Typing1216572
-Node: Glossary1219900
-Node: Copying1251846
-Node: GNU Free Documentation License1289385
-Node: Index1314503
+Ref: This Manual-Footnote-161913
+Node: Conventions62013
+Node: Manual History64367
+Ref: Manual History-Footnote-167362
+Ref: Manual History-Footnote-267403
+Node: How To Contribute67477
+Node: Acknowledgments68606
+Node: Getting Started73492
+Node: Running gawk75931
+Node: One-shot77121
+Node: Read Terminal78384
+Node: Long80416
+Node: Executable Scripts81929
+Ref: Executable Scripts-Footnote-184724
+Node: Comments84827
+Node: Quoting87311
+Node: DOS Quoting92828
+Node: Sample Data Files93503
+Node: Very Simple96098
+Node: Two Rules101000
+Node: More Complex102885
+Node: Statements/Lines105751
+Ref: Statements/Lines-Footnote-1110210
+Node: Other Features110475
+Node: When111411
+Ref: When-Footnote-1113165
+Node: Intro Summary113230
+Node: Invoking Gawk114114
+Node: Command Line115628
+Node: Options116426
+Ref: Options-Footnote-1132524
+Ref: Options-Footnote-2132754
+Node: Other Arguments132779
+Node: Naming Standard Input135726
+Node: Environment Variables136819
+Node: AWKPATH Variable137377
+Ref: AWKPATH Variable-Footnote-1140788
+Ref: AWKPATH Variable-Footnote-2140833
+Node: AWKLIBPATH Variable141094
+Node: Other Environment Variables142351
+Node: Exit Status145989
+Node: Include Files146666
+Node: Loading Shared Libraries150261
+Node: Obsolete151689
+Node: Undocumented152381
+Node: Invoking Summary152678
+Node: Regexp154338
+Node: Regexp Usage155857
+Node: Escape Sequences157894
+Node: Regexp Operators164126
+Ref: Regexp Operators-Footnote-1171542
+Ref: Regexp Operators-Footnote-2171689
+Node: Bracket Expressions171787
+Ref: table-char-classes174263
+Node: Leftmost Longest177400
+Node: Computed Regexps178703
+Node: GNU Regexp Operators182130
+Node: Case-sensitivity185809
+Ref: Case-sensitivity-Footnote-1188705
+Ref: Case-sensitivity-Footnote-2188940
+Node: Strong Regexp Constants189048
+Node: Regexp Summary191990
+Node: Reading Files193596
+Node: Records195759
+Node: awk split records196492
+Node: gawk split records201423
+Ref: gawk split records-Footnote-1205963
+Node: Fields206000
+Node: Nonconstant Fields208741
+Ref: Nonconstant Fields-Footnote-1210977
+Node: Changing Fields211181
+Node: Field Separators217109
+Node: Default Field Splitting219807
+Node: Regexp Field Splitting220925
+Node: Single Character Fields224278
+Node: Command Line Field Separator225338
+Node: Full Line Fields228556
+Ref: Full Line Fields-Footnote-1230078
+Ref: Full Line Fields-Footnote-2230124
+Node: Field Splitting Summary230225
+Node: Constant Size232299
+Node: Splitting By Content236877
+Ref: Splitting By Content-Footnote-1240848
+Node: Multiple Line241011
+Ref: Multiple Line-Footnote-1246893
+Node: Getline247072
+Node: Plain Getline249538
+Node: Getline/Variable252177
+Node: Getline/File253326
+Node: Getline/Variable/File254712
+Ref: Getline/Variable/File-Footnote-1256315
+Node: Getline/Pipe256403
+Node: Getline/Variable/Pipe259108
+Node: Getline/Coprocess260241
+Node: Getline/Variable/Coprocess261506
+Node: Getline Notes262246
+Node: Getline Summary265041
+Ref: table-getline-variants265463
+Node: Read Timeout266211
+Ref: Read Timeout-Footnote-1270117
+Node: Retrying Input270175
+Node: Command-line directories271374
+Node: Input Summary272280
+Node: Input Exercises275452
+Node: Printing276180
+Node: Print278014
+Node: Print Examples279471
+Node: Output Separators282251
+Node: OFMT284268
+Node: Printf285624
+Node: Basic Printf286409
+Node: Control Letters287983
+Node: Format Modifiers291971
+Node: Printf Examples297986
+Node: Redirection300472
+Node: Special FD307313
+Ref: Special FD-Footnote-1310481
+Node: Special Files310555
+Node: Other Inherited Files311172
+Node: Special Network312173
+Node: Special Caveats313033
+Node: Close Files And Pipes313982
+Ref: Close Files And Pipes-Footnote-1321169
+Ref: Close Files And Pipes-Footnote-2321317
+Node: Nonfatal321468
+Node: Output Summary323793
+Node: Output Exercises325015
+Node: Expressions325694
+Node: Values326882
+Node: Constants327560
+Node: Scalar Constants328251
+Ref: Scalar Constants-Footnote-1329115
+Node: Nondecimal-numbers329365
+Node: Regexp Constants332378
+Node: Using Constant Regexps332904
+Node: Variables336067
+Node: Using Variables336724
+Node: Assignment Options338634
+Node: Conversion340507
+Node: Strings And Numbers341031
+Ref: Strings And Numbers-Footnote-1344094
+Node: Locale influences conversions344203
+Ref: table-locale-affects346961
+Node: All Operators347579
+Node: Arithmetic Ops348208
+Node: Concatenation350714
+Ref: Concatenation-Footnote-1353561
+Node: Assignment Ops353668
+Ref: table-assign-ops358659
+Node: Increment Ops359972
+Node: Truth Values and Conditions363432
+Node: Truth Values364506
+Node: Typing and Comparison365554
+Node: Variable Typing366374
+Node: Comparison Operators369998
+Ref: table-relational-ops370417
+Node: POSIX String Comparison373912
+Ref: POSIX String Comparison-Footnote-1374986
+Node: Boolean Ops375125
+Ref: Boolean Ops-Footnote-1379607
+Node: Conditional Exp379699
+Node: Function Calls381435
+Node: Precedence385312
+Node: Locales388971
+Node: Expressions Summary390603
+Node: Patterns and Actions393176
+Node: Pattern Overview394296
+Node: Regexp Patterns395973
+Node: Expression Patterns396515
+Node: Ranges400296
+Node: BEGIN/END403404
+Node: Using BEGIN/END404165
+Ref: Using BEGIN/END-Footnote-1406901
+Node: I/O And BEGIN/END407007
+Node: BEGINFILE/ENDFILE409321
+Node: Empty412228
+Node: Using Shell Variables412545
+Node: Action Overview414819
+Node: Statements417144
+Node: If Statement418992
+Node: While Statement420487
+Node: Do Statement422515
+Node: For Statement423663
+Node: Switch Statement426821
+Node: Break Statement429207
+Node: Continue Statement431299
+Node: Next Statement433126
+Node: Nextfile Statement435509
+Node: Exit Statement438161
+Node: Built-in Variables440564
+Node: User-modified441697
+Node: Auto-set449283
+Ref: Auto-set-Footnote-1463670
+Ref: Auto-set-Footnote-2463876
+Node: ARGC and ARGV463932
+Node: Pattern Action Summary468145
+Node: Arrays470575
+Node: Array Basics471904
+Node: Array Intro472748
+Ref: figure-array-elements474723
+Ref: Array Intro-Footnote-1477427
+Node: Reference to Elements477555
+Node: Assigning Elements480019
+Node: Array Example480510
+Node: Scanning an Array482269
+Node: Controlling Scanning485291
+Ref: Controlling Scanning-Footnote-1490690
+Node: Numeric Array Subscripts491006
+Node: Uninitialized Subscripts493190
+Node: Delete494809
+Ref: Delete-Footnote-1497561
+Node: Multidimensional497618
+Node: Multiscanning500713
+Node: Arrays of Arrays502304
+Node: Arrays Summary507071
+Node: Functions509164
+Node: Built-in510202
+Node: Calling Built-in511283
+Node: Numeric Functions513279
+Ref: Numeric Functions-Footnote-1518112
+Ref: Numeric Functions-Footnote-2518469
+Ref: Numeric Functions-Footnote-3518517
+Node: String Functions518789
+Ref: String Functions-Footnote-1542293
+Ref: String Functions-Footnote-2542421
+Ref: String Functions-Footnote-3542669
+Node: Gory Details542756
+Ref: table-sub-escapes544547
+Ref: table-sub-proposed546066
+Ref: table-posix-sub547429
+Ref: table-gensub-escapes548970
+Ref: Gory Details-Footnote-1549793
+Node: I/O Functions549947
+Ref: table-system-return-values556529
+Ref: I/O Functions-Footnote-1558509
+Ref: I/O Functions-Footnote-2558657
+Node: Time Functions558777
+Ref: Time Functions-Footnote-1569282
+Ref: Time Functions-Footnote-2569350
+Ref: Time Functions-Footnote-3569508
+Ref: Time Functions-Footnote-4569619
+Ref: Time Functions-Footnote-5569731
+Ref: Time Functions-Footnote-6569958
+Node: Bitwise Functions570224
+Ref: table-bitwise-ops570818
+Ref: Bitwise Functions-Footnote-1575156
+Node: Type Functions575329
+Node: I18N Functions577990
+Node: User-defined579641
+Node: Definition Syntax580446
+Ref: Definition Syntax-Footnote-1586133
+Node: Function Example586204
+Ref: Function Example-Footnote-1589126
+Node: Function Caveats589148
+Node: Calling A Function589666
+Node: Variable Scope590624
+Node: Pass By Value/Reference593618
+Node: Return Statement597117
+Node: Dynamic Typing600096
+Node: Indirect Calls601026
+Ref: Indirect Calls-Footnote-1611277
+Node: Functions Summary611405
+Node: Library Functions614110
+Ref: Library Functions-Footnote-1617717
+Ref: Library Functions-Footnote-2617860
+Node: Library Names618031
+Ref: Library Names-Footnote-1621491
+Ref: Library Names-Footnote-2621714
+Node: General Functions621800
+Node: Strtonum Function622903
+Node: Assert Function625925
+Node: Round Function629251
+Node: Cliff Random Function630792
+Node: Ordinal Functions631808
+Ref: Ordinal Functions-Footnote-1634871
+Ref: Ordinal Functions-Footnote-2635123
+Node: Join Function635333
+Ref: Join Function-Footnote-1637103
+Node: Getlocaltime Function637303
+Node: Readfile Function641045
+Node: Shell Quoting643017
+Node: Data File Management644418
+Node: Filetrans Function645050
+Node: Rewind Function649146
+Node: File Checking651051
+Ref: File Checking-Footnote-1652385
+Node: Empty Files652586
+Node: Ignoring Assigns654565
+Node: Getopt Function656115
+Ref: Getopt Function-Footnote-1667584
+Node: Passwd Functions667784
+Ref: Passwd Functions-Footnote-1676623
+Node: Group Functions676711
+Ref: Group Functions-Footnote-1684608
+Node: Walking Arrays684815
+Node: Library Functions Summary687823
+Node: Library Exercises689229
+Node: Sample Programs689694
+Node: Running Examples690464
+Node: Clones691192
+Node: Cut Program692416
+Node: Egrep Program702345
+Ref: Egrep Program-Footnote-1709857
+Node: Id Program709967
+Node: Split Program713647
+Ref: Split Program-Footnote-1717106
+Node: Tee Program717235
+Node: Uniq Program720025
+Node: Wc Program727451
+Ref: Wc Program-Footnote-1731706
+Node: Miscellaneous Programs731800
+Node: Dupword Program733013
+Node: Alarm Program735043
+Node: Translate Program739898
+Ref: Translate Program-Footnote-1744463
+Node: Labels Program744733
+Ref: Labels Program-Footnote-1748084
+Node: Word Sorting748168
+Node: History Sorting752240
+Node: Extract Program754075
+Node: Simple Sed761604
+Node: Igawk Program764678
+Ref: Igawk Program-Footnote-1779009
+Ref: Igawk Program-Footnote-2779211
+Ref: Igawk Program-Footnote-3779333
+Node: Anagram Program779448
+Node: Signature Program782510
+Node: Programs Summary783757
+Node: Programs Exercises784971
+Ref: Programs Exercises-Footnote-1789100
+Node: Advanced Features789191
+Node: Nondecimal Data791181
+Node: Array Sorting792772
+Node: Controlling Array Traversal793472
+Ref: Controlling Array Traversal-Footnote-1801839
+Node: Array Sorting Functions801957
+Ref: Array Sorting Functions-Footnote-1807048
+Node: Two-way I/O807244
+Ref: Two-way I/O-Footnote-1813794
+Ref: Two-way I/O-Footnote-2813981
+Node: TCP/IP Networking814063
+Node: Profiling817181
+Ref: Profiling-Footnote-1825674
+Node: Advanced Features Summary825997
+Node: Internationalization827841
+Node: I18N and L10N829321
+Node: Explaining gettext830008
+Ref: Explaining gettext-Footnote-1835031
+Ref: Explaining gettext-Footnote-2835216
+Node: Programmer i18n835381
+Ref: Programmer i18n-Footnote-1840236
+Node: Translator i18n840285
+Node: String Extraction841079
+Ref: String Extraction-Footnote-1842211
+Node: Printf Ordering842297
+Ref: Printf Ordering-Footnote-1845083
+Node: I18N Portability845147
+Ref: I18N Portability-Footnote-1847603
+Node: I18N Example847666
+Ref: I18N Example-Footnote-1850472
+Node: Gawk I18N850545
+Node: I18N Summary851190
+Node: Debugger852531
+Node: Debugging853553
+Node: Debugging Concepts853994
+Node: Debugging Terms855803
+Node: Awk Debugging858378
+Node: Sample Debugging Session859284
+Node: Debugger Invocation859818
+Node: Finding The Bug861204
+Node: List of Debugger Commands867682
+Node: Breakpoint Control869015
+Node: Debugger Execution Control872709
+Node: Viewing And Changing Data876071
+Node: Execution Stack879445
+Node: Debugger Info881082
+Node: Miscellaneous Debugger Commands885153
+Node: Readline Support890241
+Node: Limitations891137
+Ref: Limitations-Footnote-1895368
+Node: Debugging Summary895419
+Node: Arbitrary Precision Arithmetic896698
+Node: Computer Arithmetic898114
+Ref: table-numeric-ranges901705
+Ref: Computer Arithmetic-Footnote-1902427
+Node: Math Definitions902484
+Ref: table-ieee-formats905798
+Ref: Math Definitions-Footnote-1906401
+Node: MPFR features906506
+Node: FP Math Caution908223
+Ref: FP Math Caution-Footnote-1909295
+Node: Inexactness of computations909664
+Node: Inexact representation910624
+Node: Comparing FP Values911984
+Node: Errors accumulate913066
+Node: Getting Accuracy914499
+Node: Try To Round917209
+Node: Setting precision918108
+Ref: table-predefined-precision-strings918805
+Node: Setting the rounding mode920635
+Ref: table-gawk-rounding-modes921009
+Ref: Setting the rounding mode-Footnote-1924417
+Node: Arbitrary Precision Integers924596
+Ref: Arbitrary Precision Integers-Footnote-1929513
+Node: POSIX Floating Point Problems929662
+Ref: POSIX Floating Point Problems-Footnote-1933544
+Node: Floating point summary933582
+Node: Dynamic Extensions935772
+Node: Extension Intro937325
+Node: Plugin License938591
+Node: Extension Mechanism Outline939388
+Ref: figure-load-extension939827
+Ref: figure-register-new-function941392
+Ref: figure-call-new-function942484
+Node: Extension API Description944546
+Node: Extension API Functions Introduction946078
+Node: General Data Types950937
+Ref: General Data Types-Footnote-1956892
+Node: Memory Allocation Functions957191
+Ref: Memory Allocation Functions-Footnote-1960036
+Node: Constructor Functions960135
+Node: Registration Functions961880
+Node: Extension Functions962565
+Node: Exit Callback Functions965188
+Node: Extension Version String966438
+Node: Input Parsers967101
+Node: Output Wrappers976983
+Node: Two-way processors981495
+Node: Printing Messages983760
+Ref: Printing Messages-Footnote-1984931
+Node: Updating ERRNO985084
+Node: Requesting Values985823
+Ref: table-value-types-returned986560
+Node: Accessing Parameters987443
+Node: Symbol Table Access988678
+Node: Symbol table by name989190
+Node: Symbol table by cookie991211
+Ref: Symbol table by cookie-Footnote-1995363
+Node: Cached values995427
+Ref: Cached values-Footnote-1998934
+Node: Array Manipulation999025
+Ref: Array Manipulation-Footnote-11000116
+Node: Array Data Types1000153
+Ref: Array Data Types-Footnote-11002811
+Node: Array Functions1002903
+Node: Flattening Arrays1006761
+Node: Creating Arrays1013669
+Node: Redirection API1018438
+Node: Extension API Variables1021269
+Node: Extension Versioning1021902
+Ref: gawk-api-version1022339
+Node: Extension API Informational Variables1024095
+Node: Extension API Boilerplate1025159
+Node: Finding Extensions1028973
+Node: Extension Example1029532
+Node: Internal File Description1030330
+Node: Internal File Ops1034410
+Ref: Internal File Ops-Footnote-11046172
+Node: Using Internal File Ops1046312
+Ref: Using Internal File Ops-Footnote-11048695
+Node: Extension Samples1048969
+Node: Extension Sample File Functions1050498
+Node: Extension Sample Fnmatch1058147
+Node: Extension Sample Fork1059634
+Node: Extension Sample Inplace1060852
+Node: Extension Sample Ord1064062
+Node: Extension Sample Readdir1064898
+Ref: table-readdir-file-types1065787
+Node: Extension Sample Revout1066592
+Node: Extension Sample Rev2way1067181
+Node: Extension Sample Read write array1067921
+Node: Extension Sample Readfile1069863
+Node: Extension Sample Time1070958
+Node: Extension Sample API Tests1072306
+Node: gawkextlib1072798
+Node: Extension summary1075245
+Node: Extension Exercises1078947
+Node: Language History1080444
+Node: V7/SVR3.11082100
+Node: SVR41084252
+Node: POSIX1085686
+Node: BTL1087065
+Node: POSIX/GNU1087794
+Node: Feature History1093656
+Node: Common Extensions1108026
+Node: Ranges and Locales1109309
+Ref: Ranges and Locales-Footnote-11113925
+Ref: Ranges and Locales-Footnote-21113952
+Ref: Ranges and Locales-Footnote-31114187
+Node: Contributors1114408
+Node: History summary1119977
+Node: Installation1121357
+Node: Gawk Distribution1122301
+Node: Getting1122785
+Node: Extracting1123746
+Node: Distribution contents1125384
+Node: Unix Installation1131478
+Node: Quick Installation1132160
+Node: Shell Startup Files1134574
+Node: Additional Configuration Options1135652
+Node: Configuration Philosophy1137457
+Node: Non-Unix Installation1139826
+Node: PC Installation1140284
+Node: PC Binary Installation1141604
+Node: PC Compiling1143456
+Ref: PC Compiling-Footnote-11146480
+Node: PC Testing1146589
+Node: PC Using1147769
+Node: Cygwin1151883
+Node: MSYS1152653
+Node: VMS Installation1153154
+Node: VMS Compilation1153945
+Ref: VMS Compilation-Footnote-11155174
+Node: VMS Dynamic Extensions1155232
+Node: VMS Installation Details1156917
+Node: VMS Running1159170
+Node: VMS GNV1163449
+Node: VMS Old Gawk1164184
+Node: Bugs1164655
+Node: Other Versions1168852
+Node: Installation summary1175436
+Node: Notes1176494
+Node: Compatibility Mode1177359
+Node: Additions1178141
+Node: Accessing The Source1179066
+Node: Adding Code1180501
+Node: New Ports1186720
+Node: Derived Files1191208
+Ref: Derived Files-Footnote-11196693
+Ref: Derived Files-Footnote-21196728
+Ref: Derived Files-Footnote-31197326
+Node: Future Extensions1197440
+Node: Implementation Limitations1198098
+Node: Extension Design1199281
+Node: Old Extension Problems1200435
+Ref: Old Extension Problems-Footnote-11201953
+Node: Extension New Mechanism Goals1202010
+Ref: Extension New Mechanism Goals-Footnote-11205374
+Node: Extension Other Design Decisions1205563
+Node: Extension Future Growth1207676
+Node: Old Extension Mechanism1208512
+Node: Notes summary1210275
+Node: Basic Concepts1211457
+Node: Basic High Level1212138
+Ref: figure-general-flow1212420
+Ref: figure-process-flow1213105
+Ref: Basic High Level-Footnote-11216406
+Node: Basic Data Typing1216591
+Node: Glossary1219919
+Node: Copying1251865
+Node: GNU Free Documentation License1289404
+Node: Index1314522

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index e23230bf..a4a1e8d7 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -56,9 +56,9 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH December, 2015
+@set UPDATE-MONTH June, 2016
@set VERSION 4.1
-@set PATCHLEVEL 3
+@set PATCHLEVEL 4
@set GAWKINETTITLE TCP/IP Internetworking with @command{gawk}
@ifset FOR_PRINT
@@ -1575,7 +1575,7 @@ All appear in the index, under the heading ``sidebar.''
@end ifclear
Most of the time, the examples use complete @command{awk} programs.
-Some of the more advanced sections show only the part of the @command{awk}
+Some of the more advanced @value{SECTION}s show only the part of the @command{awk}
program that illustrates the concept being described.
Although this @value{DOCUMENT} is aimed principally at people who have not been
@@ -1798,6 +1798,7 @@ The GNU FDL}
is the license that covers this @value{DOCUMENT}.
@end itemize
+@c ok not to use CHAPTER / SECTION here
Some of the chapters have exercise sections; these have also been
omitted from the print edition but are available online.
@end ifset
@@ -2460,7 +2461,7 @@ reliable because there are no other files to misplace.
Later in this chapter, in
@ifdocbook
-the section
+the @value{SECTION}
@end ifdocbook
@ref{Very Simple},
we'll see examples of several short,
@@ -3399,7 +3400,8 @@ After the last line of output from @command{ls} has been processed, the
@code{END} rule executes and prints the value of @code{sum}.
In this example, the value of @code{sum} is 80600.
-These more advanced @command{awk} techniques are covered in later sections
+These more advanced @command{awk} techniques are covered in later
+@value{SECTION}s
(@pxref{Action Overview}). Before you can move on to more
advanced @command{awk} programming, you have to know how @command{awk} interprets
your input and displays your output. By manipulating fields and using
@@ -8732,7 +8734,7 @@ trying to accomplish.
@item
@ifdocbook
-The next section
+The next @value{SECTION}
@end ifdocbook
@ifnotdocbook
@ref{Getline Summary},
@@ -13719,10 +13721,10 @@ As with the @code{BEGIN} and @code{END} rules
@end ifnotdocbook
@end ifnottex
@iftex
-(see the previous section),
+(see the previous @value{SECTION}),
@end iftex
@ifdocbook
-(see the previous section),
+(see the previous @value{SECTION}),
@end ifdocbook
all @code{BEGINFILE} rules in a program are merged, in the order they are
read by @command{gawk}, and all @code{ENDFILE} rules are merged as well.
@@ -14484,7 +14486,7 @@ statement outside a loop the same way they treated a @code{break}
statement outside a loop: as if it were a @code{next}
statement
@ifset FOR_PRINT
-(discussed in the following section).
+(discussed in the following @value{SECTION}).
@end ifset
@ifclear FOR_PRINT
(@pxref{Next Statement}).
@@ -17100,10 +17102,9 @@ be called.
@node Built-in
@section Built-in Functions
-@dfn{Built-in} functions are always available for
-your @command{awk} program to call. This @value{SECTION} defines all
-the built-in
-functions in @command{awk}; some of these are mentioned in other sections
+@dfn{Built-in} functions are always available for your @command{awk}
+program to call. This @value{SECTION} defines all the built-in functions
+in @command{awk}; some of these are mentioned in other @value{SECTION}s
but are summarized here for your convenience.
@menu
@@ -18365,7 +18366,7 @@ that had been its behavior for many years.
When @value{PVERSION} 4.0.0 was released, the @command{gawk} maintainer
made the POSIX rules the default, breaking well over a decade's worth
of backward compatibility.@footnote{This was rather naive of him, despite
-there being a note in this section indicating that the next major version
+there being a note in this @value{SECTION} indicating that the next major version
would move to the POSIX rules.} Needless to say, this was a bad idea,
and as of @value{PVERSION} 4.0.1, @command{gawk} resumed its historical
behavior, and only follows the POSIX rules when @option{--posix} is given.
@@ -23562,7 +23563,7 @@ presenting a potpourri of @command{awk} programs for your reading
enjoyment.
@c FULLXREF OFF
@ifnotinfo
-There are three sections.
+There are three @value{SECTION}s.
The first describes how to run the programs presented
in this @value{CHAPTER}.
@@ -32827,7 +32828,7 @@ it to always be called, and to take effect as appropriate (as the
@code{readdir} extension does). Or you may want it to take effect
based upon the value of an @command{awk} variable, as the XML extension
from the @code{gawkextlib} project does (@pxref{gawkextlib}).
-In the latter case, code in a @code{BEGINFILE} section
+In the latter case, code in a @code{BEGINFILE} rule
can look at @code{FILENAME} and @code{ERRNO} to decide whether or
not to activate an input parser (@pxref{BEGINFILE/ENDFILE}).
@@ -32992,7 +32993,7 @@ values, etc.) within @command{gawk}.
@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ awk_input_buf_t *inbuf,
@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ awk_output_buf_t *outbuf);
The function pointed to by this field should fill in the @code{awk_input_buf_t} and
-@code{awk_outut_buf_t} structures pointed to by @code{inbuf} and
+@code{awk_output_buf_t} structures pointed to by @code{inbuf} and
@code{outbuf}, respectively. These structures were described earlier.
@item awk_const struct two_way_processor *awk_const next;
@@ -33374,7 +33375,7 @@ my_extension_init()
@}
@end example
-Next, use the routines in this section for retrieving and updating
+Next, use the routines in this @value{SECTION} for retrieving and updating
the value through the cookie. Thus, @code{do_magic()} now becomes
something like this:
@@ -33406,7 +33407,7 @@ and carefully check the return values from the API functions.
@node Cached values
@subsubsection Creating and Using Cached Values
-The routines in this section allow you to create and release
+The routines in this @value{SECTION} allow you to create and release
cached values. Like scalar cookies, in theory, cached values
are not necessary. You can create numbers and strings using
the functions in @ref{Constructor Functions}. You can then
@@ -33422,7 +33423,7 @@ are clearly less problematic, requiring only a C @code{double} to store.}
It is clearly more efficient, if possible, to create a value once, and
then tell @command{gawk} to reuse the value for multiple variables. That
-is what the routines in this section let you do. The functions are as follows:
+is what the routines in this @value{SECTION} let you do. The functions are as follows:
@table @code
@item awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result);
@@ -33659,7 +33660,7 @@ structure and fill it in. Set the pointer whose address is passed as @code{data}
to point to this structure.
Return true upon success, or false otherwise.
@ifset FOR_PRINT
-See the next section
+See the next @value{SECTION}
@end ifset
@ifclear FOR_PRINT
@xref{Flattening Arrays},
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi
index 54334623..07b117d0 100644
--- a/doc/gawkinet.texi
+++ b/doc/gawkinet.texi
@@ -67,7 +67,7 @@
@set TITLE TCP/IP Internetworking with @command{gawk}
@set EDITION 1.4
-@set UPDATE-MONTH April, 2016
+@set UPDATE-MONTH June, 2016
@c gawk versions:
@set VERSION 4.1
@set PATCHLEVEL 4
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index a0692e21..e5177ca2 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -51,9 +51,9 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH December, 2015
+@set UPDATE-MONTH June, 2016
@set VERSION 4.1
-@set PATCHLEVEL 3
+@set PATCHLEVEL 4
@set GAWKINETTITLE TCP/IP Internetworking with @command{gawk}
@ifset FOR_PRINT
@@ -1542,7 +1542,7 @@ All appear in the index, under the heading ``sidebar.''
@end ifclear
Most of the time, the examples use complete @command{awk} programs.
-Some of the more advanced sections show only the part of the @command{awk}
+Some of the more advanced @value{SECTION}s show only the part of the @command{awk}
program that illustrates the concept being described.
Although this @value{DOCUMENT} is aimed principally at people who have not been
@@ -1765,6 +1765,7 @@ The GNU FDL}
is the license that covers this @value{DOCUMENT}.
@end itemize
+@c ok not to use CHAPTER / SECTION here
Some of the chapters have exercise sections; these have also been
omitted from the print edition but are available online.
@end ifset
@@ -2427,7 +2428,7 @@ reliable because there are no other files to misplace.
Later in this chapter, in
@ifdocbook
-the section
+the @value{SECTION}
@end ifdocbook
@ref{Very Simple},
we'll see examples of several short,
@@ -3310,7 +3311,8 @@ After the last line of output from @command{ls} has been processed, the
@code{END} rule executes and prints the value of @code{sum}.
In this example, the value of @code{sum} is 80600.
-These more advanced @command{awk} techniques are covered in later sections
+These more advanced @command{awk} techniques are covered in later
+@value{SECTION}s
(@pxref{Action Overview}). Before you can move on to more
advanced @command{awk} programming, you have to know how @command{awk} interprets
your input and displays your output. By manipulating fields and using
@@ -8332,7 +8334,7 @@ trying to accomplish.
@item
@ifdocbook
-The next section
+The next @value{SECTION}
@end ifdocbook
@ifnotdocbook
@ref{Getline Summary},
@@ -13047,10 +13049,10 @@ As with the @code{BEGIN} and @code{END} rules
@end ifnotdocbook
@end ifnottex
@iftex
-(see the previous section),
+(see the previous @value{SECTION}),
@end iftex
@ifdocbook
-(see the previous section),
+(see the previous @value{SECTION}),
@end ifdocbook
all @code{BEGINFILE} rules in a program are merged, in the order they are
read by @command{gawk}, and all @code{ENDFILE} rules are merged as well.
@@ -13812,7 +13814,7 @@ statement outside a loop the same way they treated a @code{break}
statement outside a loop: as if it were a @code{next}
statement
@ifset FOR_PRINT
-(discussed in the following section).
+(discussed in the following @value{SECTION}).
@end ifset
@ifclear FOR_PRINT
(@pxref{Next Statement}).
@@ -16382,10 +16384,9 @@ be called.
@node Built-in
@section Built-in Functions
-@dfn{Built-in} functions are always available for
-your @command{awk} program to call. This @value{SECTION} defines all
-the built-in
-functions in @command{awk}; some of these are mentioned in other sections
+@dfn{Built-in} functions are always available for your @command{awk}
+program to call. This @value{SECTION} defines all the built-in functions
+in @command{awk}; some of these are mentioned in other @value{SECTION}s
but are summarized here for your convenience.
@menu
@@ -17614,7 +17615,7 @@ that had been its behavior for many years.
When @value{PVERSION} 4.0.0 was released, the @command{gawk} maintainer
made the POSIX rules the default, breaking well over a decade's worth
of backward compatibility.@footnote{This was rather naive of him, despite
-there being a note in this section indicating that the next major version
+there being a note in this @value{SECTION} indicating that the next major version
would move to the POSIX rules.} Needless to say, this was a bad idea,
and as of @value{PVERSION} 4.0.1, @command{gawk} resumed its historical
behavior, and only follows the POSIX rules when @option{--posix} is given.
@@ -22653,7 +22654,7 @@ presenting a potpourri of @command{awk} programs for your reading
enjoyment.
@c FULLXREF OFF
@ifnotinfo
-There are three sections.
+There are three @value{SECTION}s.
The first describes how to run the programs presented
in this @value{CHAPTER}.
@@ -31918,7 +31919,7 @@ it to always be called, and to take effect as appropriate (as the
@code{readdir} extension does). Or you may want it to take effect
based upon the value of an @command{awk} variable, as the XML extension
from the @code{gawkextlib} project does (@pxref{gawkextlib}).
-In the latter case, code in a @code{BEGINFILE} section
+In the latter case, code in a @code{BEGINFILE} rule
can look at @code{FILENAME} and @code{ERRNO} to decide whether or
not to activate an input parser (@pxref{BEGINFILE/ENDFILE}).
@@ -32083,7 +32084,7 @@ values, etc.) within @command{gawk}.
@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ awk_input_buf_t *inbuf,
@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ awk_output_buf_t *outbuf);
The function pointed to by this field should fill in the @code{awk_input_buf_t} and
-@code{awk_outut_buf_t} structures pointed to by @code{inbuf} and
+@code{awk_output_buf_t} structures pointed to by @code{inbuf} and
@code{outbuf}, respectively. These structures were described earlier.
@item awk_const struct two_way_processor *awk_const next;
@@ -32465,7 +32466,7 @@ my_extension_init()
@}
@end example
-Next, use the routines in this section for retrieving and updating
+Next, use the routines in this @value{SECTION} for retrieving and updating
the value through the cookie. Thus, @code{do_magic()} now becomes
something like this:
@@ -32497,7 +32498,7 @@ and carefully check the return values from the API functions.
@node Cached values
@subsubsection Creating and Using Cached Values
-The routines in this section allow you to create and release
+The routines in this @value{SECTION} allow you to create and release
cached values. Like scalar cookies, in theory, cached values
are not necessary. You can create numbers and strings using
the functions in @ref{Constructor Functions}. You can then
@@ -32513,7 +32514,7 @@ are clearly less problematic, requiring only a C @code{double} to store.}
It is clearly more efficient, if possible, to create a value once, and
then tell @command{gawk} to reuse the value for multiple variables. That
-is what the routines in this section let you do. The functions are as follows:
+is what the routines in this @value{SECTION} let you do. The functions are as follows:
@table @code
@item awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result);
@@ -32750,7 +32751,7 @@ structure and fill it in. Set the pointer whose address is passed as @code{data}
to point to this structure.
Return true upon success, or false otherwise.
@ifset FOR_PRINT
-See the next section
+See the next @value{SECTION}
@end ifset
@ifclear FOR_PRINT
@xref{Flattening Arrays},
diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog
index 9cecee02..f9db0370 100644
--- a/extension/build-aux/ChangeLog
+++ b/extension/build-aux/ChangeLog
@@ -1,3 +1,11 @@
+2016-06-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * config.sub: Update from GNULIB.
+
+2016-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * config.guess, config.sub: Get latest from Gnulib master.
+
2016-02-23 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.rpath, config.sub: Update to latest
diff --git a/extension/build-aux/config.guess b/extension/build-aux/config.guess
index 373a659a..c4bd827a 100755
--- a/extension/build-aux/config.guess
+++ b/extension/build-aux/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2016-02-11'
+timestamp='2016-05-15'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@@ -386,7 +389,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
@@ -684,7 +687,7 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
@@ -701,7 +704,7 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH=hppa2.0w
@@ -900,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@@ -1276,6 +1279,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1291,7 +1297,7 @@ EOF
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@@ -1386,7 +1392,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@@ -1405,18 +1411,17 @@ esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub
index 6223dde9..eccd2189 100755
--- a/extension/build-aux/config.sub
+++ b/extension/build-aux/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2016-01-01'
+timestamp='2016-06-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -643,6 +643,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -1399,7 +1407,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos*)
+ | -onefs* | -tirtos* | -phoenix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1531,6 +1539,8 @@ case $os in
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index aaf1e489..9802b287 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * changed-files.awk: New program. Helps find files that need
+ copyright updates by scanning ChangeLog files.
+
2016-03-07 Arnold D. Robbins <arnold@skeeve.com>
* fixdump.awk (translate): Remove extraneous spaces in
diff --git a/helpers/changed-files.awk b/helpers/changed-files.awk
new file mode 100644
index 00000000..937ecd51
--- /dev/null
+++ b/helpers/changed-files.awk
@@ -0,0 +1,19 @@
+#! /usr/bin/gawk -f
+
+/^2014-/ { nextfile }
+
+/^\t\*/ {
+ sub(/^\t\*[[:space:]]*/, "")
+ sub(/[:\[(].*/, "")
+ gsub(/,/, "")
+ for (i = 1; i <= NF; i++) {
+ fname = $i
+ if (! (fname in names))
+ names[fname]++
+ }
+}
+
+END {
+ for (i in names)
+ print i
+}
diff --git a/main.c b/main.c
index 166cf89c..f3620c6f 100644
--- a/main.c
+++ b/main.c
@@ -24,7 +24,7 @@
*/
/* FIX THIS BEFORE EVERY RELEASE: */
-#define UPDATE_YEAR 2015
+#define UPDATE_YEAR 2016
#include "awk.h"
#include "getopt.h"
diff --git a/node.c b/node.c
index 7bc48cb9..89d889a4 100644
--- a/node.c
+++ b/node.c
@@ -38,6 +38,20 @@ NODE *(*str2number)(NODE *) = r_force_number;
NODE *(*format_val)(const char *, int, NODE *) = r_format_val;
int (*cmp_numbers)(const NODE *, const NODE *) = cmp_awknums;
+/* is_hex --- return true if a string looks like a hex value */
+
+static bool
+is_hex(const char *str)
+{
+ if (*str == '-' || *str == '+')
+ str++;
+
+ if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
+ return true;
+
+ return false;
+}
+
/* force_number --- force a value to be numeric */
NODE *
@@ -94,8 +108,7 @@ r_force_number(NODE *n)
|| (! do_posix /* not POSIXLY paranoid and */
&& (is_alpha((unsigned char) *cp) /* letter, or */
/* CANNOT do non-decimal and saw 0x */
- || (! do_non_decimal_data && cp[0] == '0'
- && (cp[1] == 'x' || cp[1] == 'X'))))) {
+ || (! do_non_decimal_data && is_hex(cp))))) {
goto badnum;
}
diff --git a/nonposix.h b/nonposix.h
index 3a0510b1..3aae512c 100644
--- a/nonposix.h
+++ b/nonposix.h
@@ -57,7 +57,9 @@ int unsetenv (const char *);
int setenv (const char *, const char *, int);
#endif /* __MINGW32__ */
+#if defined(VMS) || defined(__DJGPP__) || defined(__MINGW32__)
int getpgrp(void);
+#endif
#if defined(__DJGPP__) || defined(__MINGW32__)
int getppid(void);
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 1f93d451..4154fcba 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Sync with mainline:
+ (mixed1, symtab10, subback): New tests.
+ (FAIL_CODE1): Updated.
+
2016-05-25 Eli Zaretskii <eliz@gnu.org>
* Makefile.tst (BASIC_TESTS): Add arrayind1 and sigpipe1.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 404d4b66..e4414294 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -171,7 +171,7 @@ BASIC_TESTS = \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
- splitvar splitwht strcat1 strnum1 strtod subamp subi18n \
+ splitvar splitwht strcat1 strnum1 strtod subamp subback subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
@@ -193,7 +193,7 @@ GAWK_EXT_TESTS = \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectbuiltin indirectcall indirectcall2 \
lint lintold lintwarn \
- manyfiles match1 match2 match3 mbstr1 mbstr2 \
+ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \
muldimposix \
nastyparm negtime next nondec nondec2 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
@@ -203,7 +203,7 @@ GAWK_EXT_TESTS = \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
- symtab7 symtab8 symtab9 \
+ symtab7 symtab8 symtab9 symtab10 \
watchpoint1
EXTRA_TESTS = inftest regtest
@@ -233,7 +233,10 @@ NEED_LINT_OLD = lintold
# List of the tests which fail with EXIT CODE 1
FAIL_CODE1 = \
- fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
+ badassign1 badbuild callparam delfunc fcall_exit fcall_exit2 \
+ fnamedat fnarray fnarray2 fnasgnm fnmisc funsmnam gsubasgn \
+ incdupe2 lintwarn match2 mixed1 noparms paramasfunc1 paramasfunc2 \
+ paramdup paramres parseme readbuf synerr1 synerr2 unterm
# List of files which have .ok versions for MPFR
@@ -1281,6 +1284,12 @@ rscompat:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) --traditional -f $@.awk "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+symtab10:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -D -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:
@@ -2171,6 +2180,11 @@ strtod:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+subback:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
subsepnm:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/symbol.c b/symbol.c
index 84574e7b..8533fad6 100644
--- a/symbol.c
+++ b/symbol.c
@@ -117,7 +117,9 @@ lookup(const char *name)
}
unref(tmp);
- return n; /* NULL or new place */
+ if (n == NULL || n->type == Node_val) /* non-variable in SYMTAB */
+ return NULL;
+ return n; /* new place */
}
/* make_params --- allocate function parameters for the symbol table */
diff --git a/test/ChangeLog b/test/ChangeLog
index 2a8fb86c..e667de55 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,20 @@
+2016-06-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (subback): New test.
+ * subback.awk, subback.in, subback.ok: New files.
+ Thanks to Mike Brennan for the test.
+
+ Unrelated:
+
+ * Makefile.am (FAIL_CODE1): Update the list.
+
+2016-06-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (GAWK_EXT_TESTS): Add mixed1. Who knows
+ how long that's been broken...
+ * mixed1.ok: Adjust to match what the code produces.
+ Thanks to John E. Malmberg <wb8tyw@qsl.net> for the report.
+
2016-06-13 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (forcenum, ignrcas3, intarray, lintexp, lintindex,
@@ -10,6 +27,17 @@
mpgforcenum.ok, printfchar.awk, printfchar.ok, strtonum1.awk,
strtonum1.ok: New files.
+2016-06-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * symtab10.awk, symtab10.in, symtab10.ok: New files.
+ * Makefile.am (symtab10): New test.
+ Thanks to Hermann Peifer for the report.
+
+2016-06-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (hex2): New test.
+ * hex2.awk, hex2.in, hex2.ok: New files.
+
2016-05-30 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (fsnul1): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 050a1dd3..6c893cce 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -442,6 +442,9 @@ EXTRA_DIST = \
hello.awk \
hex.awk \
hex.ok \
+ hex2.awk \
+ hex2.in \
+ hex2.ok \
hsprint.awk \
hsprint.ok \
icasefs.awk \
@@ -1006,6 +1009,9 @@ EXTRA_DIST = \
subamp.awk \
subamp.in \
subamp.ok \
+ subback.awk \
+ subback.in \
+ subback.ok \
subi18n.awk \
subi18n.ok \
subsepnm.awk \
@@ -1041,6 +1047,9 @@ EXTRA_DIST = \
symtab8.ok \
symtab9.awk \
symtab9.ok \
+ symtab10.awk \
+ symtab10.in \
+ symtab10.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -1138,7 +1147,7 @@ BASIC_TESTS = \
getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \
gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \
gsubtst7 gsubtst8 \
- hex hsprint \
+ hex hex2 hsprint \
inpref inputred intest intprec iobug1 \
leaddig leadnl litoct longsub longwrds \
manglprm math membug1 messages minusstr mmap8k mtchi18n \
@@ -1156,7 +1165,7 @@ BASIC_TESTS = \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
- splitvar splitwht strcat1 strnum1 strtod subamp subi18n \
+ splitvar splitwht strcat1 strnum1 strtod subamp subback subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
@@ -1179,7 +1188,7 @@ GAWK_EXT_TESTS = \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectbuiltin indirectcall indirectcall2 intarray \
lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
- manyfiles match1 match2 match3 mbstr1 mbstr2 \
+ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \
muldimposix \
nastyparm negtime next nondec nondec2 \
nonfatal1 nonfatal2 nonfatal3 \
@@ -1191,7 +1200,7 @@ GAWK_EXT_TESTS = \
sortfor sortu split_after_fpat \
splitarg4 strftime \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
- symtab7 symtab8 symtab9 \
+ symtab7 symtab8 symtab9 symtab10 \
typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
timeout \
watchpoint1
@@ -1224,7 +1233,10 @@ NEED_LINT_OLD = lintold
# List of the tests which fail with EXIT CODE 1
FAIL_CODE1 = \
- fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
+ badassign1 badbuild callparam delfunc fcall_exit fcall_exit2 \
+ fnamedat fnarray fnarray2 fnasgnm fnmisc funsmnam gsubasgn \
+ incdupe2 lintwarn match2 mixed1 noparms paramasfunc1 paramasfunc2 \
+ paramdup paramres parseme readbuf synerr1 synerr2 unterm
# List of files which have .ok versions for MPFR
CHECK_MPFR = \
@@ -2294,6 +2306,11 @@ rscompat:
@AWKPATH="$(srcdir)" $(AWK) --traditional -f $@.awk "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab10:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -D -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 3fe7c9ee..11176f1f 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -699,6 +699,9 @@ EXTRA_DIST = \
hello.awk \
hex.awk \
hex.ok \
+ hex2.awk \
+ hex2.in \
+ hex2.ok \
hsprint.awk \
hsprint.ok \
icasefs.awk \
@@ -1263,6 +1266,9 @@ EXTRA_DIST = \
subamp.awk \
subamp.in \
subamp.ok \
+ subback.awk \
+ subback.in \
+ subback.ok \
subi18n.awk \
subi18n.ok \
subsepnm.awk \
@@ -1298,6 +1304,9 @@ EXTRA_DIST = \
symtab8.ok \
symtab9.awk \
symtab9.ok \
+ symtab10.awk \
+ symtab10.in \
+ symtab10.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -1394,7 +1403,7 @@ BASIC_TESTS = \
getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \
gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \
gsubtst7 gsubtst8 \
- hex hsprint \
+ hex hex2 hsprint \
inpref inputred intest intprec iobug1 \
leaddig leadnl litoct longsub longwrds \
manglprm math membug1 messages minusstr mmap8k mtchi18n \
@@ -1412,7 +1421,7 @@ BASIC_TESTS = \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
- splitvar splitwht strcat1 strnum1 strtod subamp subi18n \
+ splitvar splitwht strcat1 strnum1 strtod subamp subback subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
@@ -1435,7 +1444,7 @@ GAWK_EXT_TESTS = \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectbuiltin indirectcall indirectcall2 intarray \
lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
- manyfiles match1 match2 match3 mbstr1 mbstr2 \
+ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \
muldimposix \
nastyparm negtime next nondec nondec2 \
nonfatal1 nonfatal2 nonfatal3 \
@@ -1447,7 +1456,7 @@ GAWK_EXT_TESTS = \
sortfor sortu split_after_fpat \
splitarg4 strftime \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
- symtab7 symtab8 symtab9 \
+ symtab7 symtab8 symtab9 symtab10 \
typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
timeout \
watchpoint1
@@ -1479,7 +1488,10 @@ NEED_LINT_OLD = lintold
# List of the tests which fail with EXIT CODE 1
FAIL_CODE1 = \
- fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
+ badassign1 badbuild callparam delfunc fcall_exit fcall_exit2 \
+ fnamedat fnarray fnarray2 fnasgnm fnmisc funsmnam gsubasgn \
+ incdupe2 lintwarn match2 mixed1 noparms paramasfunc1 paramasfunc2 \
+ paramdup paramres parseme readbuf synerr1 synerr2 unterm
# List of files which have .ok versions for MPFR
@@ -2731,6 +2743,11 @@ rscompat:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) --traditional -f $@.awk "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+symtab10:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -D -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:
@@ -3153,6 +3170,11 @@ hex:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+hex2:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
hsprint:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -3630,6 +3652,11 @@ strtod:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+subback:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
subsepnm:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 641ee5a7..4ee6f384 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -420,6 +420,11 @@ hex:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+hex2:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
hsprint:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -897,6 +902,11 @@ strtod:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+subback:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
subsepnm:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/hex2.awk b/test/hex2.awk
new file mode 100644
index 00000000..49c6203d
--- /dev/null
+++ b/test/hex2.awk
@@ -0,0 +1 @@
+{ print $1 + 7}
diff --git a/test/hex2.in b/test/hex2.in
new file mode 100644
index 00000000..60f06f0f
--- /dev/null
+++ b/test/hex2.in
@@ -0,0 +1,2 @@
+0x4
+-0x4
diff --git a/test/hex2.ok b/test/hex2.ok
new file mode 100644
index 00000000..49019db8
--- /dev/null
+++ b/test/hex2.ok
@@ -0,0 +1,2 @@
+7
+7
diff --git a/test/mixed1.ok b/test/mixed1.ok
index 91608fa3..bd6f447d 100644
--- a/test/mixed1.ok
+++ b/test/mixed1.ok
@@ -1,3 +1,3 @@
-gawk: BEGIN {return junk}
-gawk: ^ `return' used outside function context
+gawk: cmd. line:1: BEGIN {return junk}
+gawk: cmd. line:1: ^ `return' used outside function context
EXIT CODE: 1
diff --git a/test/subback.awk b/test/subback.awk
new file mode 100644
index 00000000..d91513c1
--- /dev/null
+++ b/test/subback.awk
@@ -0,0 +1,16 @@
+BEGIN {
+ A[0] = "&"
+ for(i=1;i<=11;i++) {
+ A[i] = "\\" A[i-1]
+ }
+## A[] holds & \& \\& \\\& \\\\& ...
+}
+
+{
+ for(i=0; i <= 11 ; i++) {
+ x = $0
+ sub(/B/, A[i], x)
+ y = gensub(/B/, A[i], "1", $0)
+ print i, x, y
+ }
+}
diff --git a/test/subback.in b/test/subback.in
new file mode 100644
index 00000000..223b7836
--- /dev/null
+++ b/test/subback.in
@@ -0,0 +1 @@
+B
diff --git a/test/subback.ok b/test/subback.ok
new file mode 100644
index 00000000..9792c82b
--- /dev/null
+++ b/test/subback.ok
@@ -0,0 +1,12 @@
+0 B B
+1 & &
+2 \B \B
+3 \& \&
+4 \\B \\B
+5 \\& \\&
+6 \\\B \\\B
+7 \\\& \\\&
+8 \\\\B \\\\B
+9 \\\\& \\\\&
+10 \\\\\B \\\\\B
+11 \\\\\& \\\\\&
diff --git a/test/symtab10.awk b/test/symtab10.awk
new file mode 100644
index 00000000..6fbd3994
--- /dev/null
+++ b/test/symtab10.awk
@@ -0,0 +1 @@
+BEGIN { SYMTAB["x"] ; y=1 ; y++ }
diff --git a/test/symtab10.in b/test/symtab10.in
new file mode 100644
index 00000000..d9afcd66
--- /dev/null
+++ b/test/symtab10.in
@@ -0,0 +1,4 @@
+watch y
+run
+watch x
+continue
diff --git a/test/symtab10.ok b/test/symtab10.ok
new file mode 100644
index 00000000..b0cabd7c
--- /dev/null
+++ b/test/symtab10.ok
@@ -0,0 +1,11 @@
+Watchpoint 1: y
+Starting program:
+Stopping in BEGIN ...
+Watchpoint 1: y
+ Old value: untyped variable
+ New value: 1
+main() at `symtab10.awk':1
+1 BEGIN { SYMTAB["x"] ; y=1 ; y++ }
+no symbol `x' in current context
+Program exited normally with exit value: 0
+EXIT CODE: 2