aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog55
-rw-r--r--doc/gawk.19
-rw-r--r--doc/gawk.info1738
-rw-r--r--doc/gawk.texi1027
-rw-r--r--doc/gawkinet.info72
-rw-r--r--doc/gawkinet.texi6
-rw-r--r--doc/gawktexi.in1017
-rw-r--r--doc/texinfo.tex210
8 files changed, 2968 insertions, 1166 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 8508436e..52574058 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,58 @@
+2014-02-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Add a quote to the alarm clock program.
+
+2014-02-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * texinfo.tex: Update to latest.
+
+2014-02-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Lots of small edits.
+
+2014-02-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: More minor fixes, update UPDATE_MONTH.
+
+2014-02-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: More minor fixes, in indexing.
+
+2014-02-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in, gawkinet.texi: Minor fixes, mostly in indexing.
+ * texinfo.tex: Update to latest.
+
+2014-01-31 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Add `()' to names of extension functions in indexing
+ commands and in one place in the text. Consistency, don'tcha know.
+
+2014-01-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Add a few missing STARTOFRANGE comments.
+ * gawk.1: Note that `(i, j) in array' doesn't work in for loops.
+ Update the copyright year.
+
+2014-01-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Update info for Anders Wallin.
+
+2014-01-25 Arnold D. Robbins <arnold@skeeve.com>
+
+ * texinfo.tex: Updated to current version.
+ * gawktexi.in: Add magic stuff so that PDFs have "dark red"
+ links like before.
+
+2014-01-23 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in (Feature History): New node.
+ (Common Extensions): Update features now in mawk, too.
+
+2014-12-14 John E. Malmberg <wb8tyw@qsl.net>
+
+ * gawktexi.in: Add information on building VMS PCSI kit.
+
2014-01-03 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in (Full Line Fields): New node.
diff --git a/doc/gawk.1 b/doc/gawk.1
index 8d343024..bd58b10c 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -13,7 +13,7 @@
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
-.TH GAWK 1 "Aug 15 2013" "Free Software Foundation" "Utility Commands"
+.TH GAWK 1 "Jan 28 2014" "Free Software Foundation" "Utility Commands"
.SH NAME
gawk \- pattern scanning and processing language
.SH SYNOPSIS
@@ -1370,6 +1370,11 @@ The
construct may also be used in a
.B for
loop to iterate over all the elements of an array.
+However, the
+.B "(i, j) in array"
+construct only works in tests, not in
+.B for
+loops.
.PP
An element may be deleted from an array using the
.B delete
@@ -3968,7 +3973,7 @@ We thank him.
.SH COPYING PERMISSIONS
Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
-2010, 2011, 2012, 2013
+2010, 2011, 2012, 2013, 2014
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/doc/gawk.info b/doc/gawk.info
index b60ecf82..5deb6482 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -193,7 +193,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
field.
* Command Line Field Separator:: Setting `FS' from the
command-line.
-* Full Line Fields:: Making the full line be a single field.
+* Full Line Fields:: Making the full line be a single
+ field.
* Field Splitting Summary:: Some final points and a summary table.
* Constant Size:: Reading constant width data.
* Splitting By Content:: Defining Fields By Content
@@ -583,6 +584,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
version of `awk'.
* POSIX/GNU:: The extensions in `gawk' not
in POSIX `awk'.
+* Feature History:: The history of the features in `gawk'.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp
ranges.
@@ -1268,11 +1270,11 @@ acknowledgements:
Dr. Nelson Beebe, Andreas Buening, Dr. Manuel Collado, Antonio
Colombo, Stephen Davies, Scott Deifik, Akim Demaille, Darrel Hankerson,
Michal Jaegermann, Ju"rgen Kahrs, Stepan Kasal, John Malmberg, Dave
-Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna Vinschen, Anders
-Wallin, and Eli Zaretskii (in alphabetical order) make up the current
-`gawk' "crack portability team." Without their hard work and help,
-`gawk' would not be nearly the fine program it is today. It has been
-and continues to be a pleasure working with this team of fine people.
+Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna Vinschen, and Eli
+Zaretskii (in alphabetical order) make up the current `gawk' "crack
+portability team." Without their hard work and help, `gawk' would not
+be nearly the fine program it is today. It has been and continues to
+be a pleasure working with this team of fine people.
Notable code and documentation contributions were made by a number
of people. *Note Contributors::, for the full list.
@@ -1814,18 +1816,8 @@ and the first four months of the current year.
Mar 24 75 70 495
Apr 21 70 74 514
- If you are reading this in GNU Emacs using Info, you can copy the
-regions of text showing these sample files into your own test files.
-This way you can try out the examples shown in the remainder of this
-document. You do this by using the command `M-x write-region' to copy
-text from the Info file into a file for use with `awk' (*Note
-Miscellaneous File Operations: (emacs)Misc File Ops, for more
-information). Using this information, create your own `BBS-list' and
-`inventory-shipped' files and practice what you learn in this Info file.
-
- If you are using the stand-alone version of Info, see *note Extract
-Program::, for an `awk' program that extracts these data files from
-`gawk.texi', the (generated) Texinfo source file for this Info file.
+ The sample files are included in the `gawk' distribution, in the
+directory `awklib/eg/data'.

File: gawk.info, Node: Very Simple, Next: Two Rules, Prev: Sample Data Files, Up: Getting Started
@@ -2236,7 +2228,7 @@ File: gawk.info, Node: Invoking Gawk, Next: Regexp, Prev: Getting Started, U
2 Running `awk' and `gawk'
**************************
-This major node covers how to run awk, both POSIX-standard and
+This major node covers how to run `awk', both POSIX-standard and
`gawk'-specific command-line options, and what `awk' and `gawk' do with
non-option arguments. It then proceeds to cover how `gawk' searches
for source files, reading standard input along with other files,
@@ -2312,22 +2304,8 @@ The following list describes options mandated by the POSIX standard:
`--file SOURCE-FILE'
Read `awk' program source from SOURCE-FILE instead of in the first
non-option argument. This option may be given multiple times; the
- `awk' program consists of the concatenation the contents of each
- specified SOURCE-FILE.
-
-`-i SOURCE-FILE'
-`--include SOURCE-FILE'
- Read `awk' source library from SOURCE-FILE. This option is
- completely equivalent to using the `@include' directive inside
- your program. This option is very similar to the `-f' option, but
- there are two important differences. First, when `-i' is used,
- the program source will not be loaded if it has been previously
- loaded, whereas the `-f' will always load the file. Second,
- because this option is intended to be used with code libraries,
- `gawk' does not recognize such files as constituting main program
- input. Thus, after processing an `-i' argument, `gawk' still
- expects to find the main source code via the `-f' option or on the
- command-line.
+ `awk' program consists of the concatenation of the contents of
+ each specified SOURCE-FILE.
`-v VAR=VAL'
`--assign VAR=VAL'
@@ -2456,6 +2434,20 @@ The following list describes options mandated by the POSIX standard:
Print a "usage" message summarizing the short and long style
options that `gawk' accepts and then exit.
+`-i SOURCE-FILE'
+`--include SOURCE-FILE'
+ Read `awk' source library from SOURCE-FILE. This option is
+ completely equivalent to using the `@include' directive inside
+ your program. This option is very similar to the `-f' option, but
+ there are two important differences. First, when `-i' is used,
+ the program source will not be loaded if it has been previously
+ loaded, whereas the `-f' will always load the file. Second,
+ because this option is intended to be used with code libraries,
+ `gawk' does not recognize such files as constituting main program
+ input. Thus, after processing an `-i' argument, `gawk' still
+ expects to find the main source code via the `-f' option or on the
+ command-line.
+
`-l LIB'
`--load LIB'
Load a shared library LIB. This searches for the library using the
@@ -4091,18 +4083,23 @@ use for `RS' in this case:
BEGIN { RS = "\0" } # whole file becomes one record?
`gawk' in fact accepts this, and uses the NUL character for the
-record separator. However, this usage is _not_ portable to other `awk'
-implementations.
+record separator. However, this usage is _not_ portable to most other
+`awk' implementations.
- All other `awk' implementations(1) store strings internally as
-C-style strings. C strings use the NUL character as the string
+ Almost all other `awk' implementations(1) store strings internally
+as C-style strings. C strings use the NUL character as the string
terminator. In effect, this means that `RS = "\0"' is the same as `RS
= ""'. (d.c.)
+ It happens that recent versions of `mawk' can use the NUL character
+as a record separator. However, this is a special case: `mawk' does not
+allow embedded NUL characters in strings.
+
The best way to treat a whole file as a single record is to simply
read the file in, one record at a time, concatenating each record onto
the end of the previous ones.
+
---------- Footnotes ----------
(1) At least that we know about.
@@ -4763,14 +4760,15 @@ File: gawk.info, Node: Constant Size, Next: Splitting By Content, Prev: Field
4.6 Reading Fixed-Width Data
============================
-(This minor node discusses an advanced feature of `awk'. If you are a
-novice `awk' user, you might want to skip it on the first reading.)
+ NOTE: This minor node discusses an advanced feature of `gawk'. If
+ you are a novice `awk' user, you might want to skip it on the
+ first reading.
-`gawk' provides a facility for dealing with fixed-width fields with no
-distinctive field separator. For example, data of this nature arises
-in the input for old Fortran programs where numbers are run together,
-or in the output of programs that did not anticipate the use of their
-output as input for other programs.
+ `gawk' provides a facility for dealing with fixed-width fields with
+no distinctive field separator. For example, data of this nature
+arises in the input for old Fortran programs where numbers are run
+together, or in the output of programs that did not anticipate the use
+of their output as input for other programs.
An example of the latter is a table where all the columns are lined
up by the use of a variable number of spaces and _empty fields are just
@@ -4869,10 +4867,11 @@ File: gawk.info, Node: Splitting By Content, Next: Multiple Line, Prev: Const
4.7 Defining Fields By Content
==============================
-(This minor node discusses an advanced feature of `awk'. If you are a
-novice `awk' user, you might want to skip it on the first reading.)
+ NOTE: This minor node discusses an advanced feature of `gawk'. If
+ you are a novice `awk' user, you might want to skip it on the
+ first reading.
-Normally, when using `FS', `gawk' defines the fields as the parts of
+ Normally, when using `FS', `gawk' defines the fields as the parts of
the record that occur in between each field separator. In other words,
`FS' defines what a field _is not_, instead of what a field _is_.
However, there are times when you really want to define the fields by
@@ -7177,7 +7176,7 @@ decimal point when reading the `awk' program source code, and for
command-line variable assignments (*note Other Arguments::). However,
when interpreting input data, for `print' and `printf' output, and for
number to string conversion, the local decimal point character is used.
-(d.c.). Here are some examples indicating the difference in behavior,
+(d.c.) Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
$ export POSIXLY_CORRECT=1 Force POSIX behavior
@@ -7904,7 +7903,6 @@ of error is very difficult to spot when scanning the source code.
string comparison (true)
`a = 2; b = " +2"'
-
`a == b'
string comparison (false)
@@ -13993,7 +13991,7 @@ corresponding character. Both functions are written very nicely in
}
}
- Some explanation of the numbers used by `chr' is worthwhile. The
+ Some explanation of the numbers used by `chr()' is worthwhile. The
most prominent character set in use today is ASCII.(1) Although an
8-bit byte can hold 256 distinct values (from 0 to 255), ASCII only
defines characters that use the values from 0 to 127.(2) In the now
@@ -16668,6 +16666,8 @@ File: gawk.info, Node: Alarm Program, Next: Translate Program, Prev: Dupword
Nothing cures insomnia like a ringing alarm clock. -- Arnold
Robbins
+ Sleep is for web developers. -- Erik Quanstrom
+
The following program is a simple "alarm clock" program. You give
it a time of day and an optional message. At the specified time, it
prints the message on the standard output. In addition, you can give it
@@ -21888,11 +21888,8 @@ that use them.
allowing `gawk' to use them as it needs to.
`typedef enum awk_bool {'
-
` awk_false = 0,'
-
` awk_true'
-
`} awk_bool_t;'
A simple boolean type.
@@ -24910,6 +24907,7 @@ you can find more information.
`awk'.
* POSIX/GNU:: The extensions in `gawk' not in POSIX
`awk'.
+* Feature History:: The history of the features in `gawk'.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp ranges.
* Contributors:: The major contributors to `gawk'.
@@ -25088,7 +25086,7 @@ in his version of `awk'.
available in his `awk'.

-File: gawk.info, Node: POSIX/GNU, Next: Common Extensions, Prev: BTL, Up: Language History
+File: gawk.info, Node: POSIX/GNU, Next: Feature History, Prev: BTL, Up: Language History
A.5 Extensions in `gawk' Not in POSIX `awk'
===========================================
@@ -25245,9 +25243,391 @@ the current version of `gawk'.

-File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: POSIX/GNU, Up: Language History
+File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History
+
+A.6 History of `gawk' Features
+==============================
+
+This minor node describes the features in `gawk' over and above those
+in POSIX `awk', in the order they were added to `gawk'.
+
+ Version 2.10 of `gawk' introduced the following features:
+
+ * The `AWKPATH' environment variable for specifying a path search for
+ the `-f' command-line option (*note Options::).
+
+ * The `IGNORECASE' variable and its effects (*note
+ Case-sensitivity::).
+
+ * The `/dev/stdin', `/dev/stdout', `/dev/stderr' and `/dev/fd/N'
+ special file names (*note Special Files::).
+
+ Version 2.13 of `gawk' introduced the following features:
+
+ * The `FIELDWIDTHS' variable and its effects (*note Constant Size::).
+
+ * The `systime()' and `strftime()' built-in functions for obtaining
+ and printing timestamps (*note Time Functions::).
+
+ * Additional command-line options (*note Options::):
+
+ - The `-W lint' option to provide error and portability checking
+ for both the source code and at runtime.
+
+ - The `-W compat' option to turn off the GNU extensions.
+
+ - The `-W posix' option for full POSIX compliance.
+
+ Version 2.14 of `gawk' introduced the following feature:
+
+ * The `next file' statement for skipping to the next data file
+ (*note Nextfile Statement::).
+
+ Version 2.15 of `gawk' introduced the following features:
+
+ * New variables (*note Built-in Variables::):
+
+ - `ARGIND', which tracks the movement of `FILENAME' through
+ `ARGV'.
+
+ - `ERRNO', which contains the system error message when
+ `getline' returns -1 or `close()' fails.
+
+ * The `/dev/pid', `/dev/ppid', `/dev/pgrpid', and `/dev/user'
+ special file names. These have since been removed.
+
+ * The ability to delete all of an array at once with `delete ARRAY'
+ (*note Delete::).
+
+ * Command line option changes (*note Options::):
+
+ - The ability to use GNU-style long-named options that start
+ with `--'.
+
+ - The `--source' option for mixing command-line and library-file
+ source code.
+
+ Version 3.0 of `gawk' introduced the following features:
+
+ * New or changed variables:
+
+ - `IGNORECASE' changed, now applying to string comparison as
+ well as regexp operations (*note Case-sensitivity::).
+
+ - `RT', which contains the input text that matched `RS' (*note
+ Records::).
+
+ * Full support for both POSIX and GNU regexps (*note Regexp::).
+
+ * The `gensub()' function for more powerful text manipulation (*note
+ String Functions::).
+
+ * The `strftime()' function acquired a default time format, allowing
+ it to be called with no arguments (*note Time Functions::).
+
+ * The ability for `FS' and for the third argument to `split()' to be
+ null strings (*note Single Character Fields::).
+
+ * The ability for `RS' to be a regexp (*note Records::).
+
+ * The `next file' statement became `nextfile' (*note Nextfile
+ Statement::).
+
+ * The `fflush()' function from the Bell Laboratories research
+ version of `awk' (*note I/O Functions::).
+
+ * New command line options:
+
+ - The `--lint-old' option to warn about constructs that are not
+ available in the original Version 7 Unix version of `awk'
+ (*note V7/SVR3.1::).
+
+ - The `-m' option from the Bell Laboratories research version
+ of `awk' This was later removed.
+
+ - The `--re-interval' option to provide interval expressions in
+ regexps (*note Regexp Operators::).
+
+ - The `--traditional' option was added as a better name for
+ `--compat' (*note Options::).
+
+ * The use of GNU Autoconf to control the configuration process
+ (*note Quick Installation::).
+
+ * Amiga support.
+
+
+ Version 3.1 of `gawk' introduced the following features:
+
+ * New variables (*note Built-in Variables::):
+
+ - `BINMODE', for non-POSIX systems, which allows binary I/O for
+ input and/or output files (*note PC Using::).
+
+ - `LINT', which dynamically controls lint warnings.
+
+ - `PROCINFO', an array for providing process-related
+ information.
+
+ - `TEXTDOMAIN', for setting an application's
+ internationalization text domain (*note
+ Internationalization::).
+
+ * The ability to use octal and hexadecimal constants in `awk'
+ program source code (*note Nondecimal-numbers::).
+
+ * The `|&' operator for two-way I/O to a coprocess (*note Two-way
+ I/O::).
+
+ * The `/inet' special files for TCP/IP networking using `|&' (*note
+ TCP/IP Networking::).
+
+ * The optional second argument to `close()' that allows closing one
+ end of a two-way pipe to a coprocess (*note Two-way I/O::).
+
+ * The optional third argument to the `match()' function for
+ capturing text-matching subexpressions within a regexp (*note
+ String Functions::).
+
+ * Positional specifiers in `printf' formats for making translations
+ easier (*note Printf Ordering::).
+
+ * A number of new built-in functions:
+
+ - The `asort()' and `asorti()' functions for sorting arrays
+ (*note Array Sorting::).
+
+ - The `bindtextdomain()', `dcgettext()' and `dcngettext()'
+ functions for internationalization (*note Programmer i18n::).
+
+ - The `extension()' function and the ability to add new
+ built-in functions dynamically (*note Dynamic Extensions::).
+
+ - The `mktime()' function for creating timestamps (*note Time
+ Functions::).
+
+ - The `and()', `or()', `xor()', `compl()', `lshift()',
+ `rshift()', and `strtonum()' functions (*note Bitwise
+ Functions::).
+
+ * The support for `next file' as two words was removed completely
+ (*note Nextfile Statement::).
-A.6 Common Extensions Summary
+ * Additional commnd line options (*note Options::):
+
+ - The `--dump-variables' option to print a list of all global
+ variables.
+
+ - The `--exec' option, for use in CGI scripts.
+
+ - The `--gen-po' command-line option and the use of a leading
+ underscore to mark strings that should be translated (*note
+ String Extraction::).
+
+ - The `--non-decimal-data' option to allow non-decimal input
+ data (*note Nondecimal Data::).
+
+ - The `--profile' option and `pgawk', the profiling version of
+ `gawk', for producing execution profiles of `awk' programs
+ (*note Profiling::).
+
+ - The `--use-lc-numeric' option to force `gawk' to use the
+ locale's decimal point for parsing input data (*note
+ Conversion::).
+
+ * The use of GNU Automake to help in standardizing the configuration
+ process (*note Quick Installation::).
+
+ * The use of GNU `gettext' for `gawk''s own message output (*note
+ Gawk I18N::).
+
+ * BeOS support. This was later removed.
+
+ * Tandem support. This was later removed.
+
+ * The Atari port became officially unsupported.
+
+ * The source code changed to use ISO C standard-style function
+ definitions.
+
+ * POSIX compliance for `sub()' and `gsub()' (*note Gory Details::).
+
+ * The `length()' function was extended to accept an array argument
+ and return the number of elements in the array (*note String
+ Functions::).
+
+ * The `strftime()' function acquired a third argument to enable
+ printing times as UTC (*note Time Functions::).
+
+ Version 4.0 of `gawk' introduced the following features:
+
+ * Variable additions:
+
+ - `FPAT', which allows you to specify a regexp that matches the
+ fields, instead of matching the field separator (*note
+ Splitting By Content::).
+
+ - If `PROCINFO["sorted_in"]' exists, `for(iggy in foo)' loops
+ sort the indices before looping over them. The value of this
+ element provides control over how the indices are sorted
+ before the loop traversal starts (*note Controlling
+ Scanning::).
+
+ - `PROCINFO["strftime"]', which holds the default format for
+ `strftime()' (*note Time Functions::).
+
+ * The special files `/dev/pid', `/dev/ppid', `/dev/pgrpid' and
+ `/dev/user' were removed.
+
+ * Support for IPv6 was added via the `/inet6' special file.
+ `/inet4' forces IPv4 and `/inet' chooses the system default, which
+ is probably IPv4 (*note TCP/IP Networking::).
+
+ * The use of `\s' and `\S' escape sequences in regular expressions
+ (*note GNU Regexp Operators::).
+
+ * Interval expressions became part of default regular expressions
+ (*note Regexp Operators::).
+
+ * POSIX character classes work even with `--traditional' (*note
+ Regexp Operators::).
+
+ * `break' and `continue' became invalid outside a loop, even with
+ `--traditional' (*note Break Statement::, and also see *note
+ Continue Statement::).
+
+ * `fflush()', `nextfile', and `delete ARRAY' are allowed if
+ `--posix' or `--traditional', since they are all now part of POSIX.
+
+ * An optional third argument to `asort()' and `asorti()', specifying
+ how to sort (*note String Functions::).
+
+ * The behavior of `fflush()' changed to match Brian Kernighan's `awk'
+ and for POSIX; now both `fflush()' and `fflush("")' flush all open
+ output redirections (*note I/O Functions::).
+
+ * The `isarray()' function which distinguishes if an item is an array
+ or not, to make it possible to traverse multidimensional arrays
+ (*note Type Functions::).
+
+ * The `patsplit()' function which gives the same capability as
+ `FPAT', for splitting (*note String Functions::).
+
+ * An optional fourth argument to the `split()' function, which is an
+ array to hold the values of the separators (*note String
+ Functions::).
+
+ * Arrays of arrays (*note Arrays of Arrays::).
+
+ * The `BEGINFILE' and `ENDFILE' special patterns (*note
+ BEGINFILE/ENDFILE::).
+
+ * Indirect function calls (*note Indirect Calls::).
+
+ * `switch' / `case' are enabled by default (*note Switch
+ Statement::).
+
+ * Command line option changes (*note Options::):
+
+ - The `-b' and `--characters-as-bytes' options which prevent
+ `gawk' from treating input as a multibyte string.
+
+ - The redundant `--compat', `--copyleft', and `--usage' long
+ options were removed.
+
+ - The `--gen-po' option was finally renamed to the correct
+ `--gen-pot'.
+
+ - The `--sandbox' option which disables certain features.
+
+ - All long options acquired corresponding short options, for
+ use in `#!' scripts.
+
+ * Directories named on the command line now produce a warning, not a
+ fatal error, unless `--posix' or `--traditional' are used (*note
+ Command line directories::).
+
+ * The `gawk' internals were rewritten, bringing the `dgawk' debugger
+ and possibly improved performance (*note Debugger::).
+
+ * Per the GNU Coding Standards, dynamic extensions must now define a
+ global symbol indicating that they are GPL-compatible (*note
+ Plugin License::).
+
+ * In POSIX mode, string comparisons use `strcoll()' / `wcscoll()'
+ (*note POSIX String Comparison::).
+
+ * The option for raw sockets was removed, since it was never
+ implemented (*note TCP/IP Networking::).
+
+ * Ranges of the form `[d-h]' are treated as if they were in the C
+ locale, no matter what kind of regexp is being used, and even if
+ `--posix' (*note Ranges and Locales::).
+
+ * Support was removed for the following systems:
+
+ - Atari
+
+ - Amiga
+
+ - BeOS
+
+ - Cray
+
+ - MIPS RiscOS
+
+ - MS-DOS with Microsoft Compiler
+
+ - MS-Windows with Microsoft Compiler
+
+ - NeXT
+
+ - SunOS 3.x, Sun 386 (Road Runner)
+
+ - Tandem (non-POSIX)
+
+ - Prestandard VAX C compiler for VAX/VMS
+
+ Version 4.1 of `gawk' introduced the following features:
+
+ * Three new arrays: `SYMTAB', `FUNCTAB', and
+ `PROCINFO["identifiers"]' (*note Auto-set::).
+
+ * The three executables `gawk', `pgawk', and `dgawk', were merged
+ into one, named just `gawk'. As a result the command line options
+ changed.
+
+ * Command line option changes (*note Options::):
+
+ - The `-D' option invokes the debugger.
+
+ - The `-i' and `--include' options load `awk' library files.
+
+ - The `-l' and `--load' options for load compiled dynamic
+ extensions.
+
+ - The `-M' and `--bignum' options enable MPFR.
+
+ - The `-o' only does pretty-printing.
+
+ - The `-p' option is used for profiling.
+
+ - The `-R' option was removed.
+
+ * Support for high precision arithmetic with MPFR. (*note Gawk and
+ MPFR::).
+
+ * The `and()', `or()' and `xor()' functions allow any number of
+ arguments, with a minimum of two (*note Bitwise Functions::).
+
+ * The dynamic extension interface was completely redone (*note
+ Dynamic Extensions::).
+
+
+
+File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: Feature History, Up: Language History
+
+A.7 Common Extensions Summary
=============================
This minor node summarizes the common extensions supported by `gawk',
@@ -25259,7 +25639,7 @@ Feature BWK Awk Mawk GNU Awk
`\x' Escape sequence X X X
`RS' as regexp X X
`FS' as null string X X X
-`/dev/stdin' special file X X
+`/dev/stdin' special file X X X
`/dev/stdout' special file X X X
`/dev/stderr' special file X X X
`**' and `**=' operators X X
@@ -25267,7 +25647,7 @@ Feature BWK Awk Mawk GNU Awk
`func' keyword X X
`nextfile' statement X X X
`delete' without subscript X X X
-`length()' of an array X X
+`length()' of an array X X X
`BINMODE' variable X X
Time related functions X X
@@ -25278,7 +25658,7 @@ POSIX.)

File: gawk.info, Node: Ranges and Locales, Next: Contributors, Prev: Common Extensions, Up: Language History
-A.7 Regexp Ranges and Locales: A Long Sad Story
+A.8 Regexp Ranges and Locales: A Long Sad Story
===============================================
This minor node describes the confusing history of ranges within
@@ -25384,7 +25764,7 @@ and its rationale

File: gawk.info, Node: Contributors, Prev: Ranges and Locales, Up: Language History
-A.8 Major Contributors to `gawk'
+A.9 Major Contributors to `gawk'
================================
Always give credit where credit is due. -- Anonymous
@@ -25484,6 +25864,8 @@ Info file, in approximate chronological order:
* Patrick T.J. McPhee contributed the code for dynamic loading in
Windows32 environments. (This is no longer supported)
+ * Anders Wallin helped keep the VMS port going for several years.
+
* John Haque made the following contributions:
- The modifications to convert `gawk' into a byte-code
@@ -26403,7 +26785,19 @@ directory tree, the program will be known as
`GNV$GNU:[bin]gnv$gawk.exe' and the help file will be
`GNV$GNU:[vms_help]gawk.hlp'.
- Optionally, the help entry can be loaded into a VMS help library:
+ The PCSI kit also installs a `GNV$GNU:[vms_bin]gawk_verb.cld' file
+which can be used to add `gawk' and `awk' as DCL commands.
+
+ For just the current process you can use:
+
+ $ set command gnv$gnu:[vms_bin]gawk_verb.cld
+
+ Or the system manager can use `GNV$GNU:[vms_bin]gawk_verb.cld' to
+add the `gawk' and `awk' to the system wide `DCLTABLES'.
+
+ The DCL syntax is documented in the `gawk.hlp' file.
+
+ Optionally, `gawk.hlp' entry can be loaded into a VMS help library:
$ LIBRARY/HELP sys$help:helplib [.vms]gawk.hlp
@@ -26504,8 +26898,10 @@ reorganized to supply individual PCSI packages for each component. See
`https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/'.
The normal build procedure for `gawk' produces a program that is
-suitable for use with GNV. At this time work is being done to create
-the procedures for building a PCSI kit to replace the older `gawk' port.
+suitable for use with GNV.
+
+ The `vms/gawk_build_steps.txt' in the source documents the procedure
+for building a VMS PCSI kit that is compatible with GNV.

File: gawk.info, Node: VMS Old Gawk, Prev: VMS GNV, Up: VMS Installation
@@ -26595,7 +26991,7 @@ MS-DOS with DJGPP Scott Deifik, <scottd.mail@sbcglobal.net>.
MS-Windows with MINGW Eli Zaretskii, <eliz@gnu.org>.
OS/2 Andreas Buening, <andreas.buening@nexgo.de>.
VMS Pat Rankin, <r.pat.rankin@gmail.com>, and John
- Malmberg, <wb8tyw@gmail.com>.
+ Malmberg, <wb8tyw@qsl.net>.
z/OS (OS/390) Dave Pitts, <dpitts@cozx.com>.
If your bug is also reproducible under Unix, please send a copy of
@@ -29614,14 +30010,13 @@ Index
* - (hyphen), -- operator: Increment Ops. (line 48)
* - (hyphen), -= operator <1>: Precedence. (line 95)
* - (hyphen), -= operator: Assignment Ops. (line 129)
-* - (hyphen), filenames beginning with: Options. (line 73)
+* - (hyphen), filenames beginning with: Options. (line 59)
* - (hyphen), in bracket expressions: Bracket Expressions. (line 17)
-* --assign option: Options. (line 46)
+* --assign option: Options. (line 32)
* --bignum option: Options. (line 201)
-* --c option: Options. (line 95)
-* --characters-as-bytes option: Options. (line 82)
-* --copyright option: Options. (line 102)
-* --debug option: Options. (line 122)
+* --characters-as-bytes option: Options. (line 68)
+* --copyright option: Options. (line 88)
+* --debug option: Options. (line 108)
* --disable-extensions configuration option: Additional Configuration Options.
(line 9)
* --disable-lint configuration option: Additional Configuration Options.
@@ -29629,15 +30024,14 @@ Index
* --disable-nls configuration option: Additional Configuration Options.
(line 30)
* --dump-variables option <1>: Library Names. (line 45)
-* --dump-variables option: Options. (line 107)
-* --exec option: Options. (line 139)
+* --dump-variables option: Options. (line 93)
+* --exec option: Options. (line 125)
* --field-separator option: Options. (line 21)
* --file option: Options. (line 25)
* --gen-pot option <1>: String Extraction. (line 6)
-* --gen-pot option: Options. (line 161)
-* --help option: Options. (line 168)
-* --include option: Options. (line 32)
-* --L option: Options. (line 288)
+* --gen-pot option: Options. (line 147)
+* --help option: Options. (line 154)
+* --include option: Options. (line 159)
* --lint option <1>: Options. (line 182)
* --lint option: Command Line. (line 20)
* --lint-old option: Options. (line 288)
@@ -29659,19 +30053,20 @@ Index
* --sandbox option, input redirection with getline: Getline. (line 19)
* --sandbox option, output redirection with print, printf: Redirection.
(line 6)
-* --source option: Options. (line 131)
-* --traditional option: Options. (line 95)
+* --source option: Options. (line 117)
+* --traditional option: Options. (line 81)
* --traditional option, --posix option and: Options. (line 266)
* --use-lc-numeric option: Options. (line 215)
* --version option: Options. (line 293)
* --with-whiny-user-strftime configuration option: Additional Configuration Options.
(line 35)
-* -b option: Options. (line 82)
-* -C option: Options. (line 102)
-* -D option: Options. (line 122)
-* -d option: Options. (line 107)
-* -E option: Options. (line 139)
-* -e option: Options. (line 131)
+* -b option: Options. (line 68)
+* -C option: Options. (line 88)
+* -c option: Options. (line 81)
+* -D option: Options. (line 108)
+* -d option: Options. (line 93)
+* -E option: Options. (line 125)
+* -e option: Options. (line 117)
* -F option: Command Line Field Separator.
(line 6)
* -f option: Options. (line 25)
@@ -29679,9 +30074,10 @@ Index
* -f option: Long. (line 12)
* -F option, -Ft sets FS to TAB: Options. (line 301)
* -f option, multiple uses: Options. (line 306)
-* -g option: Options. (line 161)
-* -h option: Options. (line 168)
-* -i option: Options. (line 32)
+* -g option: Options. (line 147)
+* -h option: Options. (line 154)
+* -i option: Options. (line 159)
+* -L option: Options. (line 288)
* -l option: Options. (line 173)
* -M option: Options. (line 201)
* -N option: Options. (line 215)
@@ -29694,8 +30090,8 @@ Index
* -S option: Options. (line 279)
* -v option: Assignment Options. (line 12)
* -V option: Options. (line 293)
-* -v option: Options. (line 46)
-* -W option: Options. (line 60)
+* -v option: Options. (line 32)
+* -W option: Options. (line 46)
* . (period): Regexp Operators. (line 43)
* .gmo files: Explaining gettext. (line 41)
* .gmo files, converting from .po: I18N Example. (line 62)
@@ -29824,7 +30220,7 @@ Index
* Ada programming language: Glossary. (line 20)
* adding, features to gawk: Adding Code. (line 6)
* adding, fields: Changing Fields. (line 53)
-* advanced features, fixed-width data: Constant Size. (line 9)
+* advanced features, fixed-width data: Constant Size. (line 10)
* advanced features, gawk: Advanced Features. (line 6)
* advanced features, network connections, See Also networks, connections: Advanced Features.
(line 6)
@@ -29833,11 +30229,11 @@ Index
* advanced features, processes, communicating with: Two-way I/O.
(line 23)
* advanced features, specifying field content: Splitting By Content.
- (line 9)
+ (line 10)
* Aho, Alfred <1>: Contributors. (line 11)
* Aho, Alfred: History. (line 17)
-* alarm clock example program: Alarm Program. (line 9)
-* alarm.awk program: Alarm Program. (line 29)
+* alarm clock example program: Alarm Program. (line 11)
+* alarm.awk program: Alarm Program. (line 31)
* algorithms: Basic High Level. (line 68)
* Alpha (DEC): Manual History. (line 28)
* amazing awk assembler (aaa): Glossary. (line 12)
@@ -29935,7 +30331,7 @@ Index
* asterisk (*), *= operator: Assignment Ops. (line 129)
* atan2() function: Numeric Functions. (line 11)
* awf (amazingly workable formatter) program: Glossary. (line 25)
-* awk debugging, enabling: Options. (line 122)
+* awk debugging, enabling: Options. (line 108)
* awk language, POSIX version: Assignment Ops. (line 136)
* awk profiling, enabling: Options. (line 235)
* awk programs <1>: Two Rules. (line 6)
@@ -29972,7 +30368,7 @@ Index
* awk, POSIX and: Preface. (line 23)
* awk, POSIX and, See Also POSIX awk: Preface. (line 23)
* awk, regexp constants and: Comparison Operators.
- (line 103)
+ (line 102)
* awk, See Also gawk: Preface. (line 36)
* awk, terms describing: This Manual. (line 6)
* awk, uses for <1>: When. (line 6)
@@ -29993,7 +30389,7 @@ Index
* AWKPATH environment variable: AWKPATH Variable. (line 6)
* awkprof.out file: Profiling. (line 6)
* awksed.awk program: Simple Sed. (line 25)
-* awkvars.out file: Options. (line 107)
+* awkvars.out file: Options. (line 93)
* b debugger command (alias for break): Breakpoint Control. (line 11)
* backslash (\) <1>: Regexp Operators. (line 18)
* backslash (\) <2>: Quoting. (line 31)
@@ -30137,7 +30533,7 @@ Index
* built-in functions: Functions. (line 6)
* built-in functions, evaluation order: Calling Built-in. (line 30)
* built-in variables: Built-in Variables. (line 6)
-* built-in variables, -v option, setting with: Options. (line 54)
+* built-in variables, -v option, setting with: Options. (line 40)
* built-in variables, conveying information: Auto-set. (line 6)
* built-in variables, user-modifiable: User-modified. (line 6)
* Busybox Awk: Other Versions. (line 88)
@@ -30160,7 +30556,7 @@ Index
* case sensitivity, regexps and <1>: User-modified. (line 82)
* case sensitivity, regexps and: Case-sensitivity. (line 6)
* case sensitivity, string comparisons and: User-modified. (line 82)
-* CGI, awk scripts for: Options. (line 139)
+* CGI, awk scripts for: Options. (line 125)
* character lists, See bracket expressions: Regexp Operators. (line 55)
* character sets (machine character encodings) <1>: Glossary. (line 141)
* character sets (machine character encodings): Ordinal Functions.
@@ -30171,10 +30567,10 @@ Index
* characters, transliterating: Translate Program. (line 6)
* characters, values of as numbers: Ordinal Functions. (line 6)
* Chassell, Robert J.: Acknowledgments. (line 33)
-* chdir extension function: Extension Sample File Functions.
+* chdir() extension function: Extension Sample File Functions.
(line 12)
* chem utility: Glossary. (line 151)
-* chr extension function: Extension Sample Ord.
+* chr() extension function: Extension Sample Ord.
(line 15)
* chr() user-defined function: Ordinal Functions. (line 16)
* clear debugger command: Breakpoint Control. (line 36)
@@ -30213,7 +30609,7 @@ Index
(line 6)
* command line, options <2>: Options. (line 6)
* command line, options: Long. (line 12)
-* command line, options, end of: Options. (line 68)
+* command line, options, end of: Options. (line 54)
* command line, variables, assigning on: Assignment Options. (line 6)
* command-line options, processing: Getopt Function. (line 6)
* command-line options, string extraction: String Extraction. (line 6)
@@ -30240,14 +30636,14 @@ Index
(line 9)
* comparison expressions, as patterns: Expression Patterns. (line 14)
* comparison expressions, string vs. regexp: Comparison Operators.
- (line 79)
+ (line 78)
* compatibility mode (gawk), extensions: POSIX/GNU. (line 6)
* compatibility mode (gawk), file names: Special Caveats. (line 9)
* compatibility mode (gawk), hexadecimal numbers: Nondecimal-numbers.
(line 60)
* compatibility mode (gawk), octal numbers: Nondecimal-numbers.
(line 60)
-* compatibility mode (gawk), specifying: Options. (line 95)
+* compatibility mode (gawk), specifying: Options. (line 81)
* compiled programs <1>: Glossary. (line 165)
* compiled programs: Basic High Level. (line 15)
* compiling gawk for Cygwin: Cygwin. (line 6)
@@ -30352,7 +30748,7 @@ Index
* dark corner, split() function: String Functions. (line 358)
* dark corner, strings, storing: Records. (line 195)
* dark corner, value of ARGV[0]: Auto-set. (line 35)
-* data, fixed-width: Constant Size. (line 9)
+* data, fixed-width: Constant Size. (line 10)
* data-driven languages: Basic High Level. (line 85)
* database, group, reading: Group Functions. (line 6)
* database, users, reading: Passwd Functions. (line 6)
@@ -30740,7 +31136,7 @@ Index
* fields, single-character: Single Character Fields.
(line 6)
* FIELDWIDTHS variable <1>: User-modified. (line 35)
-* FIELDWIDTHS variable: Constant Size. (line 22)
+* FIELDWIDTHS variable: Constant Size. (line 23)
* file descriptors: Special FD. (line 6)
* file names, distinguishing: Auto-set. (line 52)
* file names, in compatibility mode: Special Caveats. (line 9)
@@ -30761,10 +31157,10 @@ Index
* files, /inet/... (gawk): TCP/IP Networking. (line 6)
* files, /inet4/... (gawk): TCP/IP Networking. (line 6)
* files, /inet6/... (gawk): TCP/IP Networking. (line 6)
-* files, as single records: Records. (line 200)
+* files, as single records: Records. (line 204)
* files, awk programs in: Long. (line 6)
* files, awkprof.out: Profiling. (line 6)
-* files, awkvars.out: Options. (line 107)
+* files, awkvars.out: Options. (line 93)
* files, closing: I/O Functions. (line 10)
* files, descriptors, See file descriptors: Special FD. (line 6)
* files, group: Group Functions. (line 6)
@@ -30791,7 +31187,7 @@ Index
* files, portable object template: Explaining gettext. (line 30)
* files, portable object, converting to message object files: I18N Example.
(line 62)
-* files, portable object, generating: Options. (line 161)
+* files, portable object, generating: Options. (line 147)
* files, processing, ARGIND variable and: Auto-set. (line 47)
* files, reading: Rewind Function. (line 6)
* files, reading, multiline records: Multiple Line. (line 6)
@@ -30803,7 +31199,7 @@ Index
* finish debugger command: Debugger Execution Control.
(line 39)
* Fish, Fred: Contributors. (line 50)
-* fixed-width data: Constant Size. (line 9)
+* fixed-width data: Constant Size. (line 10)
* flag variables <1>: Tee Program. (line 20)
* flag variables: Boolean Ops. (line 67)
* floating-point numbers, arbitrary precision: Arbitrary Precision Arithmetic.
@@ -30811,14 +31207,14 @@ Index
* floating-point, numbers <1>: Unexpected Results. (line 6)
* floating-point, numbers: General Arithmetic. (line 6)
* floating-point, VAX/VMS: VMS Running. (line 51)
-* fnmatch extension function: Extension Sample Fnmatch.
+* fnmatch() extension function: Extension Sample Fnmatch.
(line 6)
* FNR variable <1>: Auto-set. (line 112)
* FNR variable: Records. (line 6)
* FNR variable, changing: Auto-set. (line 323)
* for statement: For Statement. (line 6)
* for statement, looping over arrays: Scanning an Array. (line 20)
-* fork extension function: Extension Sample Fork.
+* fork() extension function: Extension Sample Fork.
(line 11)
* format specifiers, mixing regular with positional specifiers: Printf Ordering.
(line 57)
@@ -30837,7 +31233,7 @@ Index
* forward slash (/), patterns and: Expression Patterns. (line 24)
* FPAT variable <1>: User-modified. (line 45)
* FPAT variable: Splitting By Content.
- (line 26)
+ (line 27)
* frame debugger command: Execution Stack. (line 25)
* Free Documentation License (FDL): GNU Free Documentation License.
(line 6)
@@ -30860,7 +31256,7 @@ Index
* FSF (Free Software Foundation) <1>: Glossary. (line 305)
* FSF (Free Software Foundation) <2>: Getting. (line 10)
* FSF (Free Software Foundation): Manual History. (line 6)
-* fts extension function: Extension Sample File Functions.
+* fts() extension function: Extension Sample File Functions.
(line 77)
* FUNCTAB array: Auto-set. (line 128)
* function calls: Function Calls. (line 6)
@@ -30942,12 +31338,12 @@ Index
* gawk, features, advanced: Advanced Features. (line 6)
* gawk, field separators and: User-modified. (line 77)
* gawk, FIELDWIDTHS variable in <1>: User-modified. (line 35)
-* gawk, FIELDWIDTHS variable in: Constant Size. (line 22)
+* gawk, FIELDWIDTHS variable in: Constant Size. (line 23)
* gawk, file names in: Special Files. (line 6)
* gawk, format-control characters: Control Letters. (line 18)
* gawk, FPAT variable in <1>: User-modified. (line 45)
* gawk, FPAT variable in: Splitting By Content.
- (line 26)
+ (line 27)
* gawk, FUNCTAB array in: Auto-set. (line 128)
* gawk, function arguments and: Calling Built-in. (line 16)
* gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42)
@@ -30994,7 +31390,7 @@ Index
* gawk, RT variable in: Records. (line 117)
* gawk, See Also awk: Preface. (line 36)
* gawk, source code, obtaining: Getting. (line 6)
-* gawk, splitting fields and: Constant Size. (line 87)
+* gawk, splitting fields and: Constant Size. (line 88)
* gawk, string-translation functions: I18N Functions. (line 6)
* gawk, SYMTAB array in: Auto-set. (line 283)
* gawk, TEXTDOMAIN variable in: User-modified. (line 162)
@@ -31048,7 +31444,7 @@ Index
* gettext library: Explaining gettext. (line 6)
* gettext library, locale categories: Explaining gettext. (line 80)
* gettext() function (C library): Explaining gettext. (line 62)
-* gettimeofday extension function: Extension Sample Time.
+* gettimeofday() extension function: Extension Sample Time.
(line 13)
* GMP: Arbitrary Precision Arithmetic.
(line 6)
@@ -31060,7 +31456,7 @@ Index
* GNU Lesser General Public License: Glossary. (line 405)
* GNU long options <1>: Options. (line 6)
* GNU long options: Command Line. (line 13)
-* GNU long options, printing list of: Options. (line 168)
+* GNU long options, printing list of: Options. (line 154)
* GNU Project <1>: Glossary. (line 323)
* GNU Project: Manual History. (line 11)
* GNU/Linux <1>: Glossary. (line 624)
@@ -31068,7 +31464,7 @@ Index
* GNU/Linux: Manual History. (line 28)
* GPL (General Public License) <1>: Glossary. (line 314)
* GPL (General Public License): Manual History. (line 11)
-* GPL (General Public License), printing: Options. (line 102)
+* GPL (General Public License), printing: Options. (line 88)
* grcat program: Group Functions. (line 16)
* Grigera, Juan: Contributors. (line 57)
* group database, reading: Group Functions. (line 6)
@@ -31083,7 +31479,7 @@ Index
(line 66)
* Hankerson, Darrel <1>: Contributors. (line 60)
* Hankerson, Darrel: Acknowledgments. (line 60)
-* Haque, John: Contributors. (line 103)
+* Haque, John: Contributors. (line 105)
* Hartholz, Elaine: Acknowledgments. (line 38)
* Hartholz, Marshall: Acknowledgments. (line 38)
* Hasegawa, Isamu: Contributors. (line 94)
@@ -31099,7 +31495,7 @@ Index
* hyphen (-), -- operator: Increment Ops. (line 48)
* hyphen (-), -= operator <1>: Precedence. (line 95)
* hyphen (-), -= operator: Assignment Ops. (line 129)
-* hyphen (-), filenames beginning with: Options. (line 73)
+* hyphen (-), filenames beginning with: Options. (line 59)
* hyphen (-), in bracket expressions: Bracket Expressions. (line 17)
* i debugger command (alias for info): Debugger Info. (line 13)
* id utility: Id Program. (line 6)
@@ -31385,6 +31781,7 @@ Index
(line 19)
* next debugger command: Debugger Execution Control.
(line 43)
+* next file statement: Feature History. (line 168)
* next statement <1>: Next Statement. (line 6)
* next statement: Boolean Ops. (line 85)
* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 37)
@@ -31491,17 +31888,17 @@ Index
(line 6)
* options, command-line <2>: Options. (line 6)
* options, command-line: Long. (line 12)
-* options, command-line, end of: Options. (line 68)
+* options, command-line, end of: Options. (line 54)
* options, command-line, invoking awk: Command Line. (line 6)
* options, command-line, processing: Getopt Function. (line 6)
* options, deprecated: Obsolete. (line 6)
* options, long <1>: Options. (line 6)
* options, long: Command Line. (line 13)
-* options, printing list of: Options. (line 168)
+* options, printing list of: Options. (line 154)
* OR bitwise operation: Bitwise Functions. (line 6)
* or Boolean-logic operator: Boolean Ops. (line 6)
* or() function (gawk): Bitwise Functions. (line 49)
-* ord extension function: Extension Sample Ord.
+* ord() extension function: Extension Sample Ord.
(line 12)
* ord() user-defined function: Ordinal Functions. (line 16)
* order of evaluation, concatenation: Concatenation. (line 41)
@@ -31593,7 +31990,7 @@ Index
* portable object files: Explaining gettext. (line 36)
* portable object files, converting to message object files: I18N Example.
(line 62)
-* portable object files, generating: Options. (line 161)
+* portable object files, generating: Options. (line 147)
* portable object template files: Explaining gettext. (line 30)
* porting gawk: New Ports. (line 6)
* positional specifiers, printf statement <1>: Printf Ordering.
@@ -31677,7 +32074,7 @@ Index
* printf statement, sprintf() function and: Round Function. (line 6)
* printf statement, syntax of: Basic Printf. (line 6)
* printing: Printing. (line 6)
-* printing, list of options: Options. (line 168)
+* printing, list of options: Options. (line 154)
* printing, mailing labels: Labels Program. (line 6)
* printing, unduplicated lines of text: Uniq Program. (line 6)
* printing, user information: Id Program. (line 6)
@@ -31720,6 +32117,7 @@ Index
* q debugger command (alias for quit): Miscellaneous Debugger Commands.
(line 99)
* QSE Awk: Other Versions. (line 130)
+* Quanstrom, Erik: Alarm Program. (line 8)
* question mark (?) regexp operator <1>: GNU Regexp Operators.
(line 59)
* question mark (?) regexp operator: Regexp Operators. (line 111)
@@ -31749,13 +32147,13 @@ Index
* Rankin, Pat <2>: Contributors. (line 37)
* Rankin, Pat <3>: Assignment Ops. (line 100)
* Rankin, Pat: Acknowledgments. (line 60)
-* reada extension function: Extension Sample Read write array.
+* reada() extension function: Extension Sample Read write array.
(line 15)
* readable data files, checking: File Checking. (line 6)
* readable.awk program: File Checking. (line 11)
* readdir extension: Extension Sample Readdir.
(line 9)
-* readfile extension function: Extension Sample Readfile.
+* readfile() extension function: Extension Sample Readfile.
(line 11)
* readfile() user-defined function: Readfile Function. (line 30)
* recipe for a programming language: History. (line 6)
@@ -31770,14 +32168,14 @@ Index
* records, printing: Print. (line 22)
* records, splitting input into: Records. (line 6)
* records, terminating: Records. (line 117)
-* records, treating files as: Records. (line 200)
+* records, treating files as: Records. (line 204)
* recursive functions: Definition Syntax. (line 73)
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
* reference counting, sorting arrays: Array Sorting Functions.
(line 77)
* regexp constants <1>: Comparison Operators.
- (line 103)
+ (line 102)
* regexp constants <2>: Regexp Constants. (line 6)
* regexp constants: Regexp Usage. (line 57)
* regexp constants, /=.../, /= operator and: Assignment Ops. (line 147)
@@ -31847,7 +32245,7 @@ Index
* RLENGTH variable, match() function and: String Functions. (line 220)
* Robbins, Arnold <1>: Future Extensions. (line 6)
* Robbins, Arnold <2>: Bugs. (line 32)
-* Robbins, Arnold <3>: Contributors. (line 130)
+* Robbins, Arnold <3>: Contributors. (line 132)
* Robbins, Arnold <4>: Alarm Program. (line 6)
* Robbins, Arnold <5>: Passwd Functions. (line 90)
* Robbins, Arnold <6>: Getline/Pipe. (line 39)
@@ -31887,7 +32285,7 @@ Index
(line 68)
* sandbox mode: Options. (line 279)
* scalar values: Basic Data Typing. (line 13)
-* Schorr, Andrew <1>: Contributors. (line 126)
+* Schorr, Andrew <1>: Contributors. (line 128)
* Schorr, Andrew: Acknowledgments. (line 60)
* Schreiber, Bert: Acknowledgments. (line 38)
* Schreiber, Rita: Acknowledgments. (line 38)
@@ -31999,9 +32397,9 @@ Index
* single-character fields: Single Character Fields.
(line 6)
* Skywalker, Luke: Undocumented. (line 6)
-* sleep extension function: Extension Sample Time.
+* sleep utility: Alarm Program. (line 111)
+* sleep() extension function: Extension Sample Time.
(line 23)
-* sleep utility: Alarm Program. (line 109)
* Solaris, POSIX-compliant awk: Other Versions. (line 96)
* sort function, arrays, sorting: Array Sorting Functions.
(line 6)
@@ -32017,7 +32415,7 @@ Index
* source code, jawk: Other Versions. (line 112)
* source code, libmawk: Other Versions. (line 120)
* source code, mawk: Other Versions. (line 44)
-* source code, mixing: Options. (line 131)
+* source code, mixing: Options. (line 117)
* source code, pawk: Other Versions. (line 78)
* source code, QSE Awk: Other Versions. (line 130)
* source code, QuikTrim Awk: Other Versions. (line 134)
@@ -32045,7 +32443,7 @@ Index
* standard input <1>: Special FD. (line 6)
* standard input: Read Terminal. (line 6)
* standard output: Special FD. (line 6)
-* stat extension function: Extension Sample File Functions.
+* stat() extension function: Extension Sample File Functions.
(line 18)
* statements, compound, control statements and: Statements. (line 10)
* statements, control, in actions: Statements. (line 6)
@@ -32119,7 +32517,6 @@ Index
* Texinfo <3>: Extract Program. (line 12)
* Texinfo <4>: Dupword Program. (line 17)
* Texinfo <5>: Library Functions. (line 33)
-* Texinfo <6>: Sample Data Files. (line 66)
* Texinfo: Conventions. (line 6)
* Texinfo, chapter beginnings in files: Regexp Operators. (line 22)
* Texinfo, extracting programs from source files: Extract Program.
@@ -32139,7 +32536,7 @@ Index
* tilde (~), ~ operator <5>: Computed Regexps. (line 6)
* tilde (~), ~ operator <6>: Case-sensitivity. (line 26)
* tilde (~), ~ operator: Regexp Usage. (line 19)
-* time, alarm clock example program: Alarm Program. (line 9)
+* time, alarm clock example program: Alarm Program. (line 11)
* time, localization and: Explaining gettext. (line 115)
* time, managing: Getlocaltime Function.
(line 6)
@@ -32163,7 +32560,7 @@ Index
(line 112)
* troubleshooting, division: Arithmetic Ops. (line 44)
* troubleshooting, fatal errors, field widths, specifying: Constant Size.
- (line 22)
+ (line 23)
* troubleshooting, fatal errors, printf format strings: Format Modifiers.
(line 159)
* troubleshooting, fflush() function: I/O Functions. (line 60)
@@ -32187,7 +32584,7 @@ Index
* troubleshooting, substr() function: String Functions. (line 496)
* troubleshooting, system() function: I/O Functions. (line 94)
* troubleshooting, typographical errors, global variables: Options.
- (line 112)
+ (line 98)
* true, logical: Truth Values. (line 6)
* Trueman, David <1>: Contributors. (line 30)
* Trueman, David <2>: Acknowledgments. (line 47)
@@ -32243,7 +32640,7 @@ Index
* variables, assigning on command line: Assignment Options. (line 6)
* variables, built-in <1>: Built-in Variables. (line 6)
* variables, built-in: Using Variables. (line 20)
-* variables, built-in, -v option, setting with: Options. (line 54)
+* variables, built-in, -v option, setting with: Options. (line 40)
* variables, built-in, conveying information: Auto-set. (line 6)
* variables, flag: Boolean Ops. (line 67)
* variables, getline command into, using <1>: Getline/Variable/Coprocess.
@@ -32254,12 +32651,12 @@ Index
(line 6)
* variables, getline command into, using: Getline/Variable. (line 6)
* variables, global, for library functions: Library Names. (line 11)
-* variables, global, printing list of: Options. (line 107)
+* variables, global, printing list of: Options. (line 93)
* variables, initializing: Using Variables. (line 20)
* variables, local: Variable Scope. (line 6)
* variables, names of: Arrays. (line 18)
* variables, private: Library Names. (line 11)
-* variables, setting: Options. (line 46)
+* variables, setting: Options. (line 32)
* variables, shadowing: Definition Syntax. (line 61)
* variables, types of: Assignment Ops. (line 40)
* variables, types of, comparison expressions and: Typing and Comparison.
@@ -32278,15 +32675,15 @@ Index
* Vinschen, Corinna: Acknowledgments. (line 60)
* w debugger command (alias for watch): Viewing And Changing Data.
(line 67)
-* w utility: Constant Size. (line 22)
-* wait extension function: Extension Sample Fork.
+* w utility: Constant Size. (line 23)
+* wait() extension function: Extension Sample Fork.
(line 22)
-* waitpid extension function: Extension Sample Fork.
+* waitpid() extension function: Extension Sample Fork.
(line 18)
* walk_array() user-defined function: Walking Arrays. (line 14)
* Wall, Larry <1>: Future Extensions. (line 6)
* Wall, Larry: Array Intro. (line 6)
-* Wallin, Anders: Acknowledgments. (line 60)
+* Wallin, Anders: Contributors. (line 103)
* warnings, issuing: Options. (line 182)
* watch debugger command: Viewing And Changing Data.
(line 67)
@@ -32313,12 +32710,12 @@ Index
* words, counting: Wc Program. (line 6)
* words, duplicate, searching for: Dupword Program. (line 6)
* words, usage counts, generating: Word Sorting. (line 6)
-* writea extension function: Extension Sample Read write array.
+* writea() extension function: Extension Sample Read write array.
(line 9)
* xgettext utility: String Extraction. (line 13)
* XOR bitwise operation: Bitwise Functions. (line 6)
* xor() function (gawk): Bitwise Functions. (line 55)
-* Yawitz, Efraim: Contributors. (line 124)
+* Yawitz, Efraim: Contributors. (line 126)
* Zaretskii, Eli <1>: Bugs. (line 70)
* Zaretskii, Eli <2>: Contributors. (line 55)
* Zaretskii, Eli: Acknowledgments. (line 60)
@@ -32353,524 +32750,525 @@ Index

Tag Table:
Node: Top1366
-Node: Foreword40737
-Node: Preface45082
-Ref: Preface-Footnote-148135
-Ref: Preface-Footnote-248231
-Node: History48463
-Node: Names50837
-Ref: Names-Footnote-152314
-Node: This Manual52386
-Ref: This Manual-Footnote-158160
-Node: Conventions58260
-Node: Manual History60416
-Ref: Manual History-Footnote-163864
-Ref: Manual History-Footnote-263905
-Node: How To Contribute63979
-Node: Acknowledgments65123
-Node: Getting Started69332
-Node: Running gawk71711
-Node: One-shot72897
-Node: Read Terminal74122
-Ref: Read Terminal-Footnote-175772
-Ref: Read Terminal-Footnote-276048
-Node: Long76219
-Node: Executable Scripts77595
-Ref: Executable Scripts-Footnote-179428
-Ref: Executable Scripts-Footnote-279530
-Node: Comments80077
-Node: Quoting82544
-Node: DOS Quoting87167
-Node: Sample Data Files87842
-Node: Very Simple90886
-Node: Two Rules95485
-Node: More Complex97632
-Ref: More Complex-Footnote-1100562
-Node: Statements/Lines100647
-Ref: Statements/Lines-Footnote-1105109
-Node: Other Features105374
-Node: When106302
-Node: Invoking Gawk108449
-Node: Command Line109910
-Node: Options110693
-Ref: Options-Footnote-1126085
-Node: Other Arguments126110
-Node: Naming Standard Input128768
-Node: Environment Variables129862
-Node: AWKPATH Variable130420
-Ref: AWKPATH Variable-Footnote-1133178
-Node: AWKLIBPATH Variable133438
-Node: Other Environment Variables134156
-Node: Exit Status137119
-Node: Include Files137794
-Node: Loading Shared Libraries141363
-Node: Obsolete142727
-Node: Undocumented143424
-Node: Regexp143666
-Node: Regexp Usage145055
-Node: Escape Sequences147081
-Node: Regexp Operators152750
-Ref: Regexp Operators-Footnote-1160130
-Ref: Regexp Operators-Footnote-2160277
-Node: Bracket Expressions160375
-Ref: table-char-classes162265
-Node: GNU Regexp Operators164788
-Node: Case-sensitivity168511
-Ref: Case-sensitivity-Footnote-1171479
-Ref: Case-sensitivity-Footnote-2171714
-Node: Leftmost Longest171822
-Node: Computed Regexps173023
-Node: Reading Files176360
-Node: Records178362
-Ref: Records-Footnote-1187251
-Node: Fields187288
-Ref: Fields-Footnote-1190321
-Node: Nonconstant Fields190407
-Node: Changing Fields192609
-Node: Field Separators198568
-Node: Default Field Splitting201270
-Node: Regexp Field Splitting202387
-Node: Single Character Fields205729
-Node: Command Line Field Separator206788
-Node: Full Line Fields210222
-Ref: Full Line Fields-Footnote-1210730
-Node: Field Splitting Summary210776
-Ref: Field Splitting Summary-Footnote-1213875
-Node: Constant Size213976
-Node: Splitting By Content218560
-Ref: Splitting By Content-Footnote-1222286
-Node: Multiple Line222326
-Ref: Multiple Line-Footnote-1228173
-Node: Getline228352
-Node: Plain Getline230568
-Node: Getline/Variable232663
-Node: Getline/File233810
-Node: Getline/Variable/File235151
-Ref: Getline/Variable/File-Footnote-1236750
-Node: Getline/Pipe236837
-Node: Getline/Variable/Pipe239536
-Node: Getline/Coprocess240643
-Node: Getline/Variable/Coprocess241895
-Node: Getline Notes242632
-Node: Getline Summary245419
-Ref: table-getline-variants245827
-Node: Read Timeout246739
-Ref: Read Timeout-Footnote-1250480
-Node: Command line directories250537
-Node: Printing251167
-Node: Print252798
-Node: Print Examples254135
-Node: Output Separators256919
-Node: OFMT258679
-Node: Printf260037
-Node: Basic Printf260943
-Node: Control Letters262482
-Node: Format Modifiers266294
-Node: Printf Examples272303
-Node: Redirection275018
-Node: Special Files281983
-Node: Special FD282516
-Ref: Special FD-Footnote-1286141
-Node: Special Network286215
-Node: Special Caveats287065
-Node: Close Files And Pipes287861
-Ref: Close Files And Pipes-Footnote-1294844
-Ref: Close Files And Pipes-Footnote-2294992
-Node: Expressions295142
-Node: Values296274
-Node: Constants296950
-Node: Scalar Constants297630
-Ref: Scalar Constants-Footnote-1298489
-Node: Nondecimal-numbers298671
-Node: Regexp Constants301671
-Node: Using Constant Regexps302146
-Node: Variables305201
-Node: Using Variables305856
-Node: Assignment Options307580
-Node: Conversion309452
-Ref: table-locale-affects314953
-Ref: Conversion-Footnote-1315577
-Node: All Operators315686
-Node: Arithmetic Ops316316
-Node: Concatenation318821
-Ref: Concatenation-Footnote-1321613
-Node: Assignment Ops321733
-Ref: table-assign-ops326721
-Node: Increment Ops328052
-Node: Truth Values and Conditions331486
-Node: Truth Values332569
-Node: Typing and Comparison333618
-Node: Variable Typing334411
-Ref: Variable Typing-Footnote-1338308
-Node: Comparison Operators338430
-Ref: table-relational-ops338840
-Node: POSIX String Comparison342389
-Ref: POSIX String Comparison-Footnote-1343345
-Node: Boolean Ops343483
-Ref: Boolean Ops-Footnote-1347561
-Node: Conditional Exp347652
-Node: Function Calls349384
-Node: Precedence352978
-Node: Locales356647
-Node: Patterns and Actions357736
-Node: Pattern Overview358790
-Node: Regexp Patterns360459
-Node: Expression Patterns361002
-Node: Ranges364687
-Node: BEGIN/END367653
-Node: Using BEGIN/END368415
-Ref: Using BEGIN/END-Footnote-1371146
-Node: I/O And BEGIN/END371252
-Node: BEGINFILE/ENDFILE373534
-Node: Empty376448
-Node: Using Shell Variables376764
-Node: Action Overview379049
-Node: Statements381406
-Node: If Statement383260
-Node: While Statement384759
-Node: Do Statement386803
-Node: For Statement387959
-Node: Switch Statement391111
-Node: Break Statement393208
-Node: Continue Statement395198
-Node: Next Statement396991
-Node: Nextfile Statement399381
-Node: Exit Statement402024
-Node: Built-in Variables404440
-Node: User-modified405535
-Ref: User-modified-Footnote-1413893
-Node: Auto-set413955
-Ref: Auto-set-Footnote-1427425
-Ref: Auto-set-Footnote-2427630
-Node: ARGC and ARGV427686
-Node: Arrays431537
-Node: Array Basics433042
-Node: Array Intro433868
-Node: Reference to Elements438185
-Node: Assigning Elements440455
-Node: Array Example440946
-Node: Scanning an Array442678
-Node: Controlling Scanning444992
-Ref: Controlling Scanning-Footnote-1450079
-Node: Delete450395
-Ref: Delete-Footnote-1453160
-Node: Numeric Array Subscripts453217
-Node: Uninitialized Subscripts455400
-Node: Multidimensional457027
-Node: Multiscanning460120
-Node: Arrays of Arrays461709
-Node: Functions466349
-Node: Built-in467168
-Node: Calling Built-in468246
-Node: Numeric Functions470234
-Ref: Numeric Functions-Footnote-1474066
-Ref: Numeric Functions-Footnote-2474423
-Ref: Numeric Functions-Footnote-3474471
-Node: String Functions474740
-Ref: String Functions-Footnote-1497660
-Ref: String Functions-Footnote-2497789
-Ref: String Functions-Footnote-3498037
-Node: Gory Details498124
-Ref: table-sub-escapes499803
-Ref: table-sub-posix-92501157
-Ref: table-sub-proposed502508
-Ref: table-posix-sub503862
-Ref: table-gensub-escapes505407
-Ref: Gory Details-Footnote-1506583
-Ref: Gory Details-Footnote-2506634
-Node: I/O Functions506785
-Ref: I/O Functions-Footnote-1513770
-Node: Time Functions513917
-Ref: Time Functions-Footnote-1524850
-Ref: Time Functions-Footnote-2524918
-Ref: Time Functions-Footnote-3525076
-Ref: Time Functions-Footnote-4525187
-Ref: Time Functions-Footnote-5525299
-Ref: Time Functions-Footnote-6525526
-Node: Bitwise Functions525792
-Ref: table-bitwise-ops526354
-Ref: Bitwise Functions-Footnote-1530575
-Node: Type Functions530759
-Node: I18N Functions531910
-Node: User-defined533537
-Node: Definition Syntax534341
-Ref: Definition Syntax-Footnote-1539251
-Node: Function Example539320
-Node: Function Caveats541914
-Node: Calling A Function542335
-Node: Variable Scope543450
-Node: Pass By Value/Reference546413
-Node: Return Statement549921
-Node: Dynamic Typing552902
-Node: Indirect Calls553833
-Node: Library Functions563518
-Ref: Library Functions-Footnote-1567031
-Ref: Library Functions-Footnote-2567174
-Node: Library Names567345
-Ref: Library Names-Footnote-1570816
-Ref: Library Names-Footnote-2571036
-Node: General Functions571122
-Node: Strtonum Function572150
-Node: Assert Function575080
-Node: Round Function578406
-Node: Cliff Random Function579949
-Node: Ordinal Functions580965
-Ref: Ordinal Functions-Footnote-1584035
-Ref: Ordinal Functions-Footnote-2584287
-Node: Join Function584496
-Ref: Join Function-Footnote-1586267
-Node: Getlocaltime Function586467
-Node: Readfile Function590208
-Node: Data File Management592047
-Node: Filetrans Function592679
-Node: Rewind Function596748
-Node: File Checking598135
-Node: Empty Files599229
-Node: Ignoring Assigns601459
-Node: Getopt Function603012
-Ref: Getopt Function-Footnote-1614315
-Node: Passwd Functions614518
-Ref: Passwd Functions-Footnote-1623493
-Node: Group Functions623581
-Node: Walking Arrays631665
-Node: Sample Programs633802
-Node: Running Examples634476
-Node: Clones635204
-Node: Cut Program636428
-Node: Egrep Program646273
-Ref: Egrep Program-Footnote-1654046
-Node: Id Program654156
-Node: Split Program657772
-Ref: Split Program-Footnote-1661291
-Node: Tee Program661419
-Node: Uniq Program664222
-Node: Wc Program671651
-Ref: Wc Program-Footnote-1675917
-Ref: Wc Program-Footnote-2676117
-Node: Miscellaneous Programs676209
-Node: Dupword Program677397
-Node: Alarm Program679428
-Node: Translate Program684181
-Ref: Translate Program-Footnote-1688568
-Ref: Translate Program-Footnote-2688816
-Node: Labels Program688950
-Ref: Labels Program-Footnote-1692321
-Node: Word Sorting692405
-Node: History Sorting696289
-Node: Extract Program698128
-Ref: Extract Program-Footnote-1705631
-Node: Simple Sed705759
-Node: Igawk Program708821
-Ref: Igawk Program-Footnote-1723978
-Ref: Igawk Program-Footnote-2724179
-Node: Anagram Program724317
-Node: Signature Program727385
-Node: Advanced Features728485
-Node: Nondecimal Data730371
-Node: Array Sorting731954
-Node: Controlling Array Traversal732651
-Node: Array Sorting Functions740935
-Ref: Array Sorting Functions-Footnote-1744804
-Node: Two-way I/O744998
-Ref: Two-way I/O-Footnote-1750430
-Node: TCP/IP Networking750500
-Node: Profiling753344
-Node: Internationalization760841
-Node: I18N and L10N762266
-Node: Explaining gettext762952
-Ref: Explaining gettext-Footnote-1768020
-Ref: Explaining gettext-Footnote-2768204
-Node: Programmer i18n768369
-Node: Translator i18n772571
-Node: String Extraction773364
-Ref: String Extraction-Footnote-1774325
-Node: Printf Ordering774411
-Ref: Printf Ordering-Footnote-1777195
-Node: I18N Portability777259
-Ref: I18N Portability-Footnote-1779708
-Node: I18N Example779771
-Ref: I18N Example-Footnote-1782409
-Node: Gawk I18N782481
-Node: Debugger783102
-Node: Debugging784073
-Node: Debugging Concepts784506
-Node: Debugging Terms786362
-Node: Awk Debugging788959
-Node: Sample Debugging Session789851
-Node: Debugger Invocation790371
-Node: Finding The Bug791703
-Node: List of Debugger Commands798191
-Node: Breakpoint Control799525
-Node: Debugger Execution Control803189
-Node: Viewing And Changing Data806549
-Node: Execution Stack809905
-Node: Debugger Info811372
-Node: Miscellaneous Debugger Commands815354
-Node: Readline Support820530
-Node: Limitations821361
-Node: Arbitrary Precision Arithmetic823613
-Ref: Arbitrary Precision Arithmetic-Footnote-1825262
-Node: General Arithmetic825410
-Node: Floating Point Issues827130
-Node: String Conversion Precision828011
-Ref: String Conversion Precision-Footnote-1829716
-Node: Unexpected Results829825
-Node: POSIX Floating Point Problems831978
-Ref: POSIX Floating Point Problems-Footnote-1835803
-Node: Integer Programming835841
-Node: Floating-point Programming837580
-Ref: Floating-point Programming-Footnote-1843911
-Ref: Floating-point Programming-Footnote-2844181
-Node: Floating-point Representation844445
-Node: Floating-point Context845610
-Ref: table-ieee-formats846449
-Node: Rounding Mode847833
-Ref: table-rounding-modes848312
-Ref: Rounding Mode-Footnote-1851327
-Node: Gawk and MPFR851506
-Node: Arbitrary Precision Floats852761
-Ref: Arbitrary Precision Floats-Footnote-1855204
-Node: Setting Precision855520
-Ref: table-predefined-precision-strings856206
-Node: Setting Rounding Mode858351
-Ref: table-gawk-rounding-modes858755
-Node: Floating-point Constants859942
-Node: Changing Precision861371
-Ref: Changing Precision-Footnote-1862768
-Node: Exact Arithmetic862942
-Node: Arbitrary Precision Integers866080
-Ref: Arbitrary Precision Integers-Footnote-1869098
-Node: Dynamic Extensions869245
-Node: Extension Intro870703
-Node: Plugin License871968
-Node: Extension Mechanism Outline872653
-Ref: load-extension873070
-Ref: load-new-function874548
-Ref: call-new-function875543
-Node: Extension API Description877558
-Node: Extension API Functions Introduction878771
-Node: General Data Types883637
-Ref: General Data Types-Footnote-1889242
-Node: Requesting Values889541
-Ref: table-value-types-returned890272
-Node: Constructor Functions891226
-Node: Registration Functions894246
-Node: Extension Functions894931
-Node: Exit Callback Functions897156
-Node: Extension Version String898405
-Node: Input Parsers899055
-Node: Output Wrappers908812
-Node: Two-way processors913322
-Node: Printing Messages915530
-Ref: Printing Messages-Footnote-1916607
-Node: Updating `ERRNO'916759
-Node: Accessing Parameters917498
-Node: Symbol Table Access918728
-Node: Symbol table by name919240
-Node: Symbol table by cookie920987
-Ref: Symbol table by cookie-Footnote-1925117
-Node: Cached values925180
-Ref: Cached values-Footnote-1928629
-Node: Array Manipulation928720
-Ref: Array Manipulation-Footnote-1929818
-Node: Array Data Types929857
-Ref: Array Data Types-Footnote-1932560
-Node: Array Functions932652
-Node: Flattening Arrays936418
-Node: Creating Arrays943270
-Node: Extension API Variables947995
-Node: Extension Versioning948631
-Node: Extension API Informational Variables950532
-Node: Extension API Boilerplate951618
-Node: Finding Extensions955422
-Node: Extension Example955982
-Node: Internal File Description956712
-Node: Internal File Ops960803
-Ref: Internal File Ops-Footnote-1972311
-Node: Using Internal File Ops972451
-Ref: Using Internal File Ops-Footnote-1974804
-Node: Extension Samples975070
-Node: Extension Sample File Functions976594
-Node: Extension Sample Fnmatch985079
-Node: Extension Sample Fork986805
-Node: Extension Sample Inplace988023
-Node: Extension Sample Ord989801
-Node: Extension Sample Readdir990637
-Node: Extension Sample Revout992169
-Node: Extension Sample Rev2way992762
-Node: Extension Sample Read write array993452
-Node: Extension Sample Readfile995335
-Node: Extension Sample API Tests996153
-Node: Extension Sample Time996678
-Node: gawkextlib998042
-Node: Language History1000823
-Node: V7/SVR3.11002345
-Node: SVR41004665
-Node: POSIX1006107
-Node: BTL1007493
-Node: POSIX/GNU1008227
-Node: Common Extensions1013828
-Node: Ranges and Locales1015134
-Ref: Ranges and Locales-Footnote-11019752
-Ref: Ranges and Locales-Footnote-21019779
-Ref: Ranges and Locales-Footnote-31020039
-Node: Contributors1020260
-Node: Installation1025335
-Node: Gawk Distribution1026229
-Node: Getting1026713
-Node: Extracting1027539
-Node: Distribution contents1029231
-Node: Unix Installation1034936
-Node: Quick Installation1035553
-Node: Additional Configuration Options1037997
-Node: Configuration Philosophy1039733
-Node: Non-Unix Installation1042087
-Node: PC Installation1042545
-Node: PC Binary Installation1043844
-Node: PC Compiling1045692
-Node: PC Testing1048636
-Node: PC Using1049812
-Node: Cygwin1053997
-Node: MSYS1054997
-Node: VMS Installation1055511
-Node: VMS Compilation1056275
-Ref: VMS Compilation-Footnote-11057890
-Node: VMS Dynamic Extensions1057948
-Node: VMS Installation Details1059321
-Node: VMS Running1061155
-Node: VMS GNV1063989
-Node: VMS Old Gawk1064698
-Node: Bugs1065168
-Node: Other Versions1069088
-Node: Notes1075172
-Node: Compatibility Mode1075972
-Node: Additions1076755
-Node: Accessing The Source1077682
-Node: Adding Code1079122
-Node: New Ports1085167
-Node: Derived Files1089302
-Ref: Derived Files-Footnote-11094623
-Ref: Derived Files-Footnote-21094657
-Ref: Derived Files-Footnote-31095257
-Node: Future Extensions1095355
-Node: Implementation Limitations1095938
-Node: Extension Design1097190
-Node: Old Extension Problems1098344
-Ref: Old Extension Problems-Footnote-11099852
-Node: Extension New Mechanism Goals1099909
-Ref: Extension New Mechanism Goals-Footnote-11103274
-Node: Extension Other Design Decisions1103460
-Node: Extension Future Growth1105566
-Node: Old Extension Mechanism1106402
-Node: Basic Concepts1108142
-Node: Basic High Level1108823
-Ref: figure-general-flow1109094
-Ref: figure-process-flow1109693
-Ref: Basic High Level-Footnote-11112922
-Node: Basic Data Typing1113107
-Node: Glossary1116462
-Node: Copying1141924
-Node: GNU Free Documentation License1179481
-Node: Index1204618
+Node: Foreword40856
+Node: Preface45201
+Ref: Preface-Footnote-148254
+Ref: Preface-Footnote-248350
+Node: History48582
+Node: Names50956
+Ref: Names-Footnote-152433
+Node: This Manual52505
+Ref: This Manual-Footnote-158279
+Node: Conventions58379
+Node: Manual History60535
+Ref: Manual History-Footnote-163983
+Ref: Manual History-Footnote-264024
+Node: How To Contribute64098
+Node: Acknowledgments65242
+Node: Getting Started69436
+Node: Running gawk71815
+Node: One-shot73001
+Node: Read Terminal74226
+Ref: Read Terminal-Footnote-175876
+Ref: Read Terminal-Footnote-276152
+Node: Long76323
+Node: Executable Scripts77699
+Ref: Executable Scripts-Footnote-179532
+Ref: Executable Scripts-Footnote-279634
+Node: Comments80181
+Node: Quoting82648
+Node: DOS Quoting87271
+Node: Sample Data Files87946
+Node: Very Simple90332
+Node: Two Rules94931
+Node: More Complex97078
+Ref: More Complex-Footnote-1100008
+Node: Statements/Lines100093
+Ref: Statements/Lines-Footnote-1104555
+Node: Other Features104820
+Node: When105748
+Node: Invoking Gawk107895
+Node: Command Line109358
+Node: Options110141
+Ref: Options-Footnote-1125536
+Node: Other Arguments125561
+Node: Naming Standard Input128219
+Node: Environment Variables129313
+Node: AWKPATH Variable129871
+Ref: AWKPATH Variable-Footnote-1132629
+Node: AWKLIBPATH Variable132889
+Node: Other Environment Variables133607
+Node: Exit Status136570
+Node: Include Files137245
+Node: Loading Shared Libraries140814
+Node: Obsolete142178
+Node: Undocumented142875
+Node: Regexp143117
+Node: Regexp Usage144506
+Node: Escape Sequences146532
+Node: Regexp Operators152201
+Ref: Regexp Operators-Footnote-1159581
+Ref: Regexp Operators-Footnote-2159728
+Node: Bracket Expressions159826
+Ref: table-char-classes161716
+Node: GNU Regexp Operators164239
+Node: Case-sensitivity167962
+Ref: Case-sensitivity-Footnote-1170930
+Ref: Case-sensitivity-Footnote-2171165
+Node: Leftmost Longest171273
+Node: Computed Regexps172474
+Node: Reading Files175811
+Node: Records177813
+Ref: Records-Footnote-1186901
+Node: Fields186938
+Ref: Fields-Footnote-1189971
+Node: Nonconstant Fields190057
+Node: Changing Fields192259
+Node: Field Separators198218
+Node: Default Field Splitting200920
+Node: Regexp Field Splitting202037
+Node: Single Character Fields205379
+Node: Command Line Field Separator206438
+Node: Full Line Fields209872
+Ref: Full Line Fields-Footnote-1210380
+Node: Field Splitting Summary210426
+Ref: Field Splitting Summary-Footnote-1213525
+Node: Constant Size213626
+Node: Splitting By Content218233
+Ref: Splitting By Content-Footnote-1221982
+Node: Multiple Line222022
+Ref: Multiple Line-Footnote-1227869
+Node: Getline228048
+Node: Plain Getline230264
+Node: Getline/Variable232359
+Node: Getline/File233506
+Node: Getline/Variable/File234847
+Ref: Getline/Variable/File-Footnote-1236446
+Node: Getline/Pipe236533
+Node: Getline/Variable/Pipe239232
+Node: Getline/Coprocess240339
+Node: Getline/Variable/Coprocess241591
+Node: Getline Notes242328
+Node: Getline Summary245115
+Ref: table-getline-variants245523
+Node: Read Timeout246435
+Ref: Read Timeout-Footnote-1250176
+Node: Command line directories250233
+Node: Printing250863
+Node: Print252494
+Node: Print Examples253831
+Node: Output Separators256615
+Node: OFMT258375
+Node: Printf259733
+Node: Basic Printf260639
+Node: Control Letters262178
+Node: Format Modifiers265990
+Node: Printf Examples271999
+Node: Redirection274714
+Node: Special Files281679
+Node: Special FD282212
+Ref: Special FD-Footnote-1285837
+Node: Special Network285911
+Node: Special Caveats286761
+Node: Close Files And Pipes287557
+Ref: Close Files And Pipes-Footnote-1294540
+Ref: Close Files And Pipes-Footnote-2294688
+Node: Expressions294838
+Node: Values295970
+Node: Constants296646
+Node: Scalar Constants297326
+Ref: Scalar Constants-Footnote-1298185
+Node: Nondecimal-numbers298367
+Node: Regexp Constants301367
+Node: Using Constant Regexps301842
+Node: Variables304897
+Node: Using Variables305552
+Node: Assignment Options307276
+Node: Conversion309148
+Ref: table-locale-affects314648
+Ref: Conversion-Footnote-1315272
+Node: All Operators315381
+Node: Arithmetic Ops316011
+Node: Concatenation318516
+Ref: Concatenation-Footnote-1321308
+Node: Assignment Ops321428
+Ref: table-assign-ops326416
+Node: Increment Ops327747
+Node: Truth Values and Conditions331181
+Node: Truth Values332264
+Node: Typing and Comparison333313
+Node: Variable Typing334106
+Ref: Variable Typing-Footnote-1338003
+Node: Comparison Operators338125
+Ref: table-relational-ops338535
+Node: POSIX String Comparison342083
+Ref: POSIX String Comparison-Footnote-1343039
+Node: Boolean Ops343177
+Ref: Boolean Ops-Footnote-1347255
+Node: Conditional Exp347346
+Node: Function Calls349078
+Node: Precedence352672
+Node: Locales356341
+Node: Patterns and Actions357430
+Node: Pattern Overview358484
+Node: Regexp Patterns360153
+Node: Expression Patterns360696
+Node: Ranges364381
+Node: BEGIN/END367347
+Node: Using BEGIN/END368109
+Ref: Using BEGIN/END-Footnote-1370840
+Node: I/O And BEGIN/END370946
+Node: BEGINFILE/ENDFILE373228
+Node: Empty376142
+Node: Using Shell Variables376458
+Node: Action Overview378743
+Node: Statements381100
+Node: If Statement382954
+Node: While Statement384453
+Node: Do Statement386497
+Node: For Statement387653
+Node: Switch Statement390805
+Node: Break Statement392902
+Node: Continue Statement394892
+Node: Next Statement396685
+Node: Nextfile Statement399075
+Node: Exit Statement401718
+Node: Built-in Variables404134
+Node: User-modified405229
+Ref: User-modified-Footnote-1413587
+Node: Auto-set413649
+Ref: Auto-set-Footnote-1427119
+Ref: Auto-set-Footnote-2427324
+Node: ARGC and ARGV427380
+Node: Arrays431231
+Node: Array Basics432736
+Node: Array Intro433562
+Node: Reference to Elements437879
+Node: Assigning Elements440149
+Node: Array Example440640
+Node: Scanning an Array442372
+Node: Controlling Scanning444686
+Ref: Controlling Scanning-Footnote-1449773
+Node: Delete450089
+Ref: Delete-Footnote-1452854
+Node: Numeric Array Subscripts452911
+Node: Uninitialized Subscripts455094
+Node: Multidimensional456721
+Node: Multiscanning459814
+Node: Arrays of Arrays461403
+Node: Functions466043
+Node: Built-in466862
+Node: Calling Built-in467940
+Node: Numeric Functions469928
+Ref: Numeric Functions-Footnote-1473760
+Ref: Numeric Functions-Footnote-2474117
+Ref: Numeric Functions-Footnote-3474165
+Node: String Functions474434
+Ref: String Functions-Footnote-1497354
+Ref: String Functions-Footnote-2497483
+Ref: String Functions-Footnote-3497731
+Node: Gory Details497818
+Ref: table-sub-escapes499497
+Ref: table-sub-posix-92500851
+Ref: table-sub-proposed502202
+Ref: table-posix-sub503556
+Ref: table-gensub-escapes505101
+Ref: Gory Details-Footnote-1506277
+Ref: Gory Details-Footnote-2506328
+Node: I/O Functions506479
+Ref: I/O Functions-Footnote-1513464
+Node: Time Functions513611
+Ref: Time Functions-Footnote-1524544
+Ref: Time Functions-Footnote-2524612
+Ref: Time Functions-Footnote-3524770
+Ref: Time Functions-Footnote-4524881
+Ref: Time Functions-Footnote-5524993
+Ref: Time Functions-Footnote-6525220
+Node: Bitwise Functions525486
+Ref: table-bitwise-ops526048
+Ref: Bitwise Functions-Footnote-1530269
+Node: Type Functions530453
+Node: I18N Functions531604
+Node: User-defined533231
+Node: Definition Syntax534035
+Ref: Definition Syntax-Footnote-1538945
+Node: Function Example539014
+Node: Function Caveats541608
+Node: Calling A Function542029
+Node: Variable Scope543144
+Node: Pass By Value/Reference546107
+Node: Return Statement549615
+Node: Dynamic Typing552596
+Node: Indirect Calls553527
+Node: Library Functions563212
+Ref: Library Functions-Footnote-1566725
+Ref: Library Functions-Footnote-2566868
+Node: Library Names567039
+Ref: Library Names-Footnote-1570510
+Ref: Library Names-Footnote-2570730
+Node: General Functions570816
+Node: Strtonum Function571844
+Node: Assert Function574774
+Node: Round Function578100
+Node: Cliff Random Function579643
+Node: Ordinal Functions580659
+Ref: Ordinal Functions-Footnote-1583731
+Ref: Ordinal Functions-Footnote-2583983
+Node: Join Function584192
+Ref: Join Function-Footnote-1585963
+Node: Getlocaltime Function586163
+Node: Readfile Function589904
+Node: Data File Management591743
+Node: Filetrans Function592375
+Node: Rewind Function596444
+Node: File Checking597831
+Node: Empty Files598925
+Node: Ignoring Assigns601155
+Node: Getopt Function602708
+Ref: Getopt Function-Footnote-1614011
+Node: Passwd Functions614214
+Ref: Passwd Functions-Footnote-1623189
+Node: Group Functions623277
+Node: Walking Arrays631361
+Node: Sample Programs633498
+Node: Running Examples634172
+Node: Clones634900
+Node: Cut Program636124
+Node: Egrep Program645969
+Ref: Egrep Program-Footnote-1653742
+Node: Id Program653852
+Node: Split Program657468
+Ref: Split Program-Footnote-1660987
+Node: Tee Program661115
+Node: Uniq Program663918
+Node: Wc Program671347
+Ref: Wc Program-Footnote-1675613
+Ref: Wc Program-Footnote-2675813
+Node: Miscellaneous Programs675905
+Node: Dupword Program677093
+Node: Alarm Program679124
+Node: Translate Program683931
+Ref: Translate Program-Footnote-1688318
+Ref: Translate Program-Footnote-2688566
+Node: Labels Program688700
+Ref: Labels Program-Footnote-1692071
+Node: Word Sorting692155
+Node: History Sorting696039
+Node: Extract Program697878
+Ref: Extract Program-Footnote-1705381
+Node: Simple Sed705509
+Node: Igawk Program708571
+Ref: Igawk Program-Footnote-1723728
+Ref: Igawk Program-Footnote-2723929
+Node: Anagram Program724067
+Node: Signature Program727135
+Node: Advanced Features728235
+Node: Nondecimal Data730121
+Node: Array Sorting731704
+Node: Controlling Array Traversal732401
+Node: Array Sorting Functions740685
+Ref: Array Sorting Functions-Footnote-1744554
+Node: Two-way I/O744748
+Ref: Two-way I/O-Footnote-1750180
+Node: TCP/IP Networking750250
+Node: Profiling753094
+Node: Internationalization760591
+Node: I18N and L10N762016
+Node: Explaining gettext762702
+Ref: Explaining gettext-Footnote-1767770
+Ref: Explaining gettext-Footnote-2767954
+Node: Programmer i18n768119
+Node: Translator i18n772321
+Node: String Extraction773114
+Ref: String Extraction-Footnote-1774075
+Node: Printf Ordering774161
+Ref: Printf Ordering-Footnote-1776945
+Node: I18N Portability777009
+Ref: I18N Portability-Footnote-1779458
+Node: I18N Example779521
+Ref: I18N Example-Footnote-1782159
+Node: Gawk I18N782231
+Node: Debugger782852
+Node: Debugging783823
+Node: Debugging Concepts784256
+Node: Debugging Terms786112
+Node: Awk Debugging788709
+Node: Sample Debugging Session789601
+Node: Debugger Invocation790121
+Node: Finding The Bug791453
+Node: List of Debugger Commands797941
+Node: Breakpoint Control799275
+Node: Debugger Execution Control802939
+Node: Viewing And Changing Data806299
+Node: Execution Stack809655
+Node: Debugger Info811122
+Node: Miscellaneous Debugger Commands815104
+Node: Readline Support820280
+Node: Limitations821111
+Node: Arbitrary Precision Arithmetic823363
+Ref: Arbitrary Precision Arithmetic-Footnote-1825012
+Node: General Arithmetic825160
+Node: Floating Point Issues826880
+Node: String Conversion Precision827761
+Ref: String Conversion Precision-Footnote-1829466
+Node: Unexpected Results829575
+Node: POSIX Floating Point Problems831728
+Ref: POSIX Floating Point Problems-Footnote-1835553
+Node: Integer Programming835591
+Node: Floating-point Programming837330
+Ref: Floating-point Programming-Footnote-1843661
+Ref: Floating-point Programming-Footnote-2843931
+Node: Floating-point Representation844195
+Node: Floating-point Context845360
+Ref: table-ieee-formats846199
+Node: Rounding Mode847583
+Ref: table-rounding-modes848062
+Ref: Rounding Mode-Footnote-1851077
+Node: Gawk and MPFR851256
+Node: Arbitrary Precision Floats852511
+Ref: Arbitrary Precision Floats-Footnote-1854954
+Node: Setting Precision855270
+Ref: table-predefined-precision-strings855956
+Node: Setting Rounding Mode858101
+Ref: table-gawk-rounding-modes858505
+Node: Floating-point Constants859692
+Node: Changing Precision861121
+Ref: Changing Precision-Footnote-1862518
+Node: Exact Arithmetic862692
+Node: Arbitrary Precision Integers865830
+Ref: Arbitrary Precision Integers-Footnote-1868848
+Node: Dynamic Extensions868995
+Node: Extension Intro870453
+Node: Plugin License871718
+Node: Extension Mechanism Outline872403
+Ref: load-extension872820
+Ref: load-new-function874298
+Ref: call-new-function875293
+Node: Extension API Description877308
+Node: Extension API Functions Introduction878521
+Node: General Data Types883387
+Ref: General Data Types-Footnote-1888989
+Node: Requesting Values889288
+Ref: table-value-types-returned890019
+Node: Constructor Functions890973
+Node: Registration Functions893993
+Node: Extension Functions894678
+Node: Exit Callback Functions896903
+Node: Extension Version String898152
+Node: Input Parsers898802
+Node: Output Wrappers908559
+Node: Two-way processors913069
+Node: Printing Messages915277
+Ref: Printing Messages-Footnote-1916354
+Node: Updating `ERRNO'916506
+Node: Accessing Parameters917245
+Node: Symbol Table Access918475
+Node: Symbol table by name918987
+Node: Symbol table by cookie920734
+Ref: Symbol table by cookie-Footnote-1924864
+Node: Cached values924927
+Ref: Cached values-Footnote-1928376
+Node: Array Manipulation928467
+Ref: Array Manipulation-Footnote-1929565
+Node: Array Data Types929604
+Ref: Array Data Types-Footnote-1932307
+Node: Array Functions932399
+Node: Flattening Arrays936165
+Node: Creating Arrays943017
+Node: Extension API Variables947742
+Node: Extension Versioning948378
+Node: Extension API Informational Variables950279
+Node: Extension API Boilerplate951365
+Node: Finding Extensions955169
+Node: Extension Example955729
+Node: Internal File Description956459
+Node: Internal File Ops960550
+Ref: Internal File Ops-Footnote-1972058
+Node: Using Internal File Ops972198
+Ref: Using Internal File Ops-Footnote-1974551
+Node: Extension Samples974817
+Node: Extension Sample File Functions976341
+Node: Extension Sample Fnmatch984826
+Node: Extension Sample Fork986552
+Node: Extension Sample Inplace987770
+Node: Extension Sample Ord989548
+Node: Extension Sample Readdir990384
+Node: Extension Sample Revout991916
+Node: Extension Sample Rev2way992509
+Node: Extension Sample Read write array993199
+Node: Extension Sample Readfile995082
+Node: Extension Sample API Tests995900
+Node: Extension Sample Time996425
+Node: gawkextlib997789
+Node: Language History1000570
+Node: V7/SVR3.11002163
+Node: SVR41004483
+Node: POSIX1005925
+Node: BTL1007311
+Node: POSIX/GNU1008045
+Node: Feature History1013644
+Node: Common Extensions1026608
+Node: Ranges and Locales1027920
+Ref: Ranges and Locales-Footnote-11032538
+Ref: Ranges and Locales-Footnote-21032565
+Ref: Ranges and Locales-Footnote-31032825
+Node: Contributors1033046
+Node: Installation1038191
+Node: Gawk Distribution1039085
+Node: Getting1039569
+Node: Extracting1040395
+Node: Distribution contents1042087
+Node: Unix Installation1047792
+Node: Quick Installation1048409
+Node: Additional Configuration Options1050853
+Node: Configuration Philosophy1052589
+Node: Non-Unix Installation1054943
+Node: PC Installation1055401
+Node: PC Binary Installation1056700
+Node: PC Compiling1058548
+Node: PC Testing1061492
+Node: PC Using1062668
+Node: Cygwin1066853
+Node: MSYS1067853
+Node: VMS Installation1068367
+Node: VMS Compilation1069131
+Ref: VMS Compilation-Footnote-11070746
+Node: VMS Dynamic Extensions1070804
+Node: VMS Installation Details1072177
+Node: VMS Running1074424
+Node: VMS GNV1077258
+Node: VMS Old Gawk1077981
+Node: Bugs1078451
+Node: Other Versions1082369
+Node: Notes1088453
+Node: Compatibility Mode1089253
+Node: Additions1090036
+Node: Accessing The Source1090963
+Node: Adding Code1092403
+Node: New Ports1098448
+Node: Derived Files1102583
+Ref: Derived Files-Footnote-11107904
+Ref: Derived Files-Footnote-21107938
+Ref: Derived Files-Footnote-31108538
+Node: Future Extensions1108636
+Node: Implementation Limitations1109219
+Node: Extension Design1110471
+Node: Old Extension Problems1111625
+Ref: Old Extension Problems-Footnote-11113133
+Node: Extension New Mechanism Goals1113190
+Ref: Extension New Mechanism Goals-Footnote-11116555
+Node: Extension Other Design Decisions1116741
+Node: Extension Future Growth1118847
+Node: Old Extension Mechanism1119683
+Node: Basic Concepts1121423
+Node: Basic High Level1122104
+Ref: figure-general-flow1122375
+Ref: figure-process-flow1122974
+Ref: Basic High Level-Footnote-11126203
+Node: Basic Data Typing1126388
+Node: Glossary1129743
+Node: Copying1155205
+Node: GNU Free Documentation License1192762
+Node: Index1217899

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 663783f3..0d780286 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -19,6 +19,20 @@
* awk: (gawk)Invoking gawk. Text scanning and processing.
@end direntry
+@ifset FOR_PRINT
+@tex
+\gdef\xrefprintnodename#1{``#1''}
+@end tex
+@end ifset
+@ifclear FOR_PRINT
+@c With early 2014 texinfo.tex, restore PDF links and colors
+@tex
+\gdef\linkcolor{0.5 0.09 0.12} % Dark Red
+\gdef\urlcolor{0.5 0.09 0.12} % Also
+\global\urefurlonlylinktrue
+@end tex
+@end ifclear
+
@set xref-automatic-section-title
@c The following information should be updated here only!
@@ -26,7 +40,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH January, 2014
+@set UPDATE-MONTH February, 2014
@set VERSION 4.1
@set PATCHLEVEL 0
@@ -122,10 +136,7 @@
@ignore
Some comments on the layout for TeX.
-1. Use at least texinfo.tex 2000-09-06.09
-2. I have done A LOT of work to make this look good. There are `@page' commands
- and use of `@group ... @end group' in a number of places. If you muck
- with anything, it's your responsibility not to break the layout.
+1. Use at least texinfo.tex 2014-01-30.15
@end ignore
@c merge the function and variable indexes into the concept index
@@ -402,7 +413,8 @@ particular records in a file and perform operations upon them.
field.
* Command Line Field Separator:: Setting @code{FS} from the
command-line.
-* Full Line Fields:: Making the full line be a single field.
+* Full Line Fields:: Making the full line be a single
+ field.
* Field Splitting Summary:: Some final points and a summary table.
* Constant Size:: Reading constant width data.
* Splitting By Content:: Defining Fields By Content
@@ -792,6 +804,7 @@ particular records in a file and perform operations upon them.
version of @command{awk}.
* POSIX/GNU:: The extensions in @command{gawk} not
in POSIX @command{awk}.
+* Feature History:: The history of the features in @command{gawk}.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp
ranges.
@@ -1245,7 +1258,7 @@ and the program ``the @command{awk} utility.''
This @value{DOCUMENT} explains
both how to write programs in the @command{awk} language and how to
run the @command{awk} utility.
-The term @dfn{@command{awk} program} refers to a program written by you in
+The term ``@command{awk} program'' refers to a program written by you in
the @command{awk} programming language.
@cindex @command{gawk}, @command{awk} and
@@ -1778,7 +1791,6 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Rankin, Pat
@cindex Schorr, Andrew
@cindex Vinschen, Corinna
-@cindex Wallin, Anders
@cindex Zaretskii, Eli
Dr.@: Nelson Beebe,
@@ -1798,7 +1810,6 @@ Chet Ramey,
Pat Rankin,
Andrew Schorr,
Corinna Vinschen,
-Anders Wallin,
and Eli Zaretskii
(in alphabetical order)
make up the current
@@ -2099,7 +2110,7 @@ more convenient to put the program into a separate file. In order to tell
awk -f @var{source-file} @var{input-file1} @var{input-file2} @dots{}
@end example
-@cindex @code{-f} option
+@cindex @option{-f} option
@cindex command line, options
@cindex options, command-line
The @option{-f} instructs the @command{awk} utility to get the @command{awk} program
@@ -2609,23 +2620,8 @@ Apr 21 70 74 514
@c endfile
@end example
-@ifinfo
-If you are reading this in GNU Emacs using Info, you can copy the regions
-of text showing these sample files into your own test files. This way you
-can try out the examples shown in the remainder of this document. You do
-this by using the command @kbd{M-x write-region} to copy text from the Info
-file into a file for use with @command{awk}
-(@xref{Misc File Ops, , Miscellaneous File Operations, emacs, GNU Emacs Manual},
-for more information). Using this information, create your own
-@file{BBS-list} and @file{inventory-shipped} files and practice what you
-learn in this @value{DOCUMENT}.
-
-@cindex Texinfo
-If you are using the stand-alone version of Info,
-see @ref{Extract Program},
-for an @command{awk} program that extracts these data files from
-@file{gawk.texi}, the (generated) Texinfo source file for this Info file.
-@end ifinfo
+The sample files are included in the @command{gawk} distribution,
+in the directory @file{awklib/eg/data}.
@node Very Simple
@section Some Simple Examples
@@ -3122,7 +3118,7 @@ easier to maintain and usually run more efficiently.
@node Invoking Gawk
@chapter Running @command{awk} and @command{gawk}
-This @value{CHAPTER} covers how to run awk, both POSIX-standard
+This @value{CHAPTER} covers how to run @command{awk}, both POSIX-standard
and @command{gawk}-specific command-line options, and what
@command{awk} and
@command{gawk} do with non-option arguments.
@@ -3179,7 +3175,7 @@ It is possible to invoke @command{awk} with an empty program:
awk '' datafile1 datafile2
@end example
-@cindex @code{--lint} option
+@cindex @option{--lint} option
@noindent
Doing so makes little sense, though; @command{awk} exits
silently when given an empty program.
@@ -3219,43 +3215,27 @@ The following list describes options mandated by the POSIX standard:
@table @code
@item -F @var{fs}
@itemx --field-separator @var{fs}
-@cindex @code{-F} option
-@cindex @code{--field-separator} option
+@cindex @option{-F} option
+@cindex @option{--field-separator} option
@cindex @code{FS} variable, @code{--field-separator} option and
Set the @code{FS} variable to @var{fs}
(@pxref{Field Separators}).
@item -f @var{source-file}
@itemx --file @var{source-file}
-@cindex @code{-f} option
-@cindex @code{--file} option
+@cindex @option{-f} option
+@cindex @option{--file} option
@cindex @command{awk} programs, location of
Read @command{awk} program source from @var{source-file}
instead of in the first non-option argument.
This option may be given multiple times; the @command{awk}
-program consists of the concatenation the contents of
+program consists of the concatenation of the contents of
each specified @var{source-file}.
-@item -i @var{source-file}
-@itemx --include @var{source-file}
-@cindex @code{-i} option
-@cindex @code{--include} option
-@cindex @command{awk} programs, location of
-Read @command{awk} source library from @var{source-file}. This option is
-completely equivalent to using the @samp{@@include} directive inside
-your program. This option is very
-similar to the @option{-f} option, but there are two important differences.
-First, when @option{-i} is used, the program source will not be loaded if it has
-been previously loaded, whereas the @option{-f} will always load the file.
-Second, because this option is intended to be used with code libraries,
-@command{gawk} does not recognize such files as constituting main program
-input. Thus, after processing an @option{-i} argument, @command{gawk} still expects to
-find the main source code via the @option{-f} option or on the command-line.
-
@item -v @var{var}=@var{val}
@itemx --assign @var{var}=@var{val}
-@cindex @code{-v} option
-@cindex @code{--assign} option
+@cindex @option{-v} option
+@cindex @option{--assign} option
@cindex variables, setting
Set the variable @var{var} to the value @var{val} @emph{before}
execution of the program begins. Such variable values are available
@@ -3276,7 +3256,7 @@ predefined value you may have given.
@end quotation
@item -W @var{gawk-opt}
-@cindex @code{-W} option
+@cindex @option{-W} option
Provide an implementation-specific option.
This is the POSIX convention for providing implementation-specific options.
These options
@@ -3309,8 +3289,8 @@ The following list describes @command{gawk}-specific options:
@table @code
@item -b
@itemx --characters-as-bytes
-@cindex @code{-b} option
-@cindex @code{--characters-as-bytes} option
+@cindex @option{-b} option
+@cindex @option{--characters-as-bytes} option
Cause @command{gawk} to treat all input data as single-byte characters.
In addition, all output written with @code{print} or @code{printf}
are treated as single-byte characters.
@@ -3324,8 +3304,8 @@ multibyte characters. This option is an easy way to tell @command{gawk}:
@item -c
@itemx --traditional
-@cindex @code{--c} option
-@cindex @code{--traditional} option
+@cindex @option{-c} option
+@cindex @option{--traditional} option
@cindex compatibility mode (@command{gawk}), specifying
Specify @dfn{compatibility mode}, in which the GNU extensions to
the @command{awk} language are disabled, so that @command{gawk} behaves just
@@ -3336,17 +3316,17 @@ which summarizes the extensions. Also see
@item -C
@itemx --copyright
-@cindex @code{-C} option
-@cindex @code{--copyright} option
+@cindex @option{-C} option
+@cindex @option{--copyright} option
@cindex GPL (General Public License), printing
Print the short version of the General Public License and then exit.
@item -d@r{[}@var{file}@r{]}
@itemx --dump-variables@r{[}=@var{file}@r{]}
-@cindex @code{-d} option
-@cindex @code{--dump-variables} option
-@cindex @code{awkvars.out} file
-@cindex files, @code{awkvars.out}
+@cindex @option{-d} option
+@cindex @option{--dump-variables} option
+@cindex @file{awkvars.out} file
+@cindex files, @file{awkvars.out}
@cindex variables, global, printing list of
Print a sorted list of global variables, their types, and final values
to @var{file}. If no @var{file} is provided, print this
@@ -3365,8 +3345,8 @@ names like @code{i}, @code{j}, etc.)
@item -D@r{[}@var{file}@r{]}
@itemx --debug=@r{[}@var{file}@r{]}
-@cindex @code{-D} option
-@cindex @code{--debug} option
+@cindex @option{-D} option
+@cindex @option{--debug} option
@cindex @command{awk} debugging, enabling
Enable debugging of @command{awk} programs
(@pxref{Debugging}).
@@ -3378,8 +3358,8 @@ No space is allowed between the @option{-D} and @var{file}, if
@item -e @var{program-text}
@itemx --source @var{program-text}
-@cindex @code{-e} option
-@cindex @code{--source} option
+@cindex @option{-e} option
+@cindex @option{--source} option
@cindex source code, mixing
Provide program source code in the @var{program-text}.
This option allows you to mix source code in files with source
@@ -3390,8 +3370,8 @@ programs (@pxref{AWKPATH Variable}).
@item -E @var{file}
@itemx --exec @var{file}
-@cindex @code{-E} option
-@cindex @code{--exec} option
+@cindex @option{-E} option
+@cindex @option{--exec} option
@cindex @command{awk} programs, location of
@cindex CGI, @command{awk} scripts for
Similar to @option{-f}, read @command{awk} program text from @var{file}.
@@ -3421,8 +3401,8 @@ with @samp{#!} scripts (@pxref{Executable Scripts}), like so:
@item -g
@itemx --gen-pot
-@cindex @code{-g} option
-@cindex @code{--gen-pot} option
+@cindex @option{-g} option
+@cindex @option{--gen-pot} option
@cindex portable object files, generating
@cindex files, portable object, generating
Analyze the source program and
@@ -3433,18 +3413,34 @@ for information about this option.
@item -h
@itemx --help
-@cindex @code{-h} option
-@cindex @code{--help} option
+@cindex @option{-h} option
+@cindex @option{--help} option
@cindex GNU long options, printing list of
@cindex options, printing list of
@cindex printing, list of options
Print a ``usage'' message summarizing the short and long style options
that @command{gawk} accepts and then exit.
+@item -i @var{source-file}
+@itemx --include @var{source-file}
+@cindex @option{-i} option
+@cindex @option{--include} option
+@cindex @command{awk} programs, location of
+Read @command{awk} source library from @var{source-file}. This option is
+completely equivalent to using the @samp{@@include} directive inside
+your program. This option is very
+similar to the @option{-f} option, but there are two important differences.
+First, when @option{-i} is used, the program source will not be loaded if it has
+been previously loaded, whereas the @option{-f} will always load the file.
+Second, because this option is intended to be used with code libraries,
+@command{gawk} does not recognize such files as constituting main program
+input. Thus, after processing an @option{-i} argument, @command{gawk} still expects to
+find the main source code via the @option{-f} option or on the command-line.
+
@item -l @var{lib}
@itemx --load @var{lib}
-@cindex @code{-l} option
-@cindex @code{--load} option
+@cindex @option{-l} option
+@cindex @option{--load} option
@cindex loading, library
Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH}
environment variable. The correct library suffix for your platform will be
@@ -3455,8 +3451,8 @@ a shared library.
@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
-@cindex @code{-l} option
-@cindex @code{--lint} option
+@cindex @option{-l} option
+@cindex @option{--lint} option
@cindex lint checking, issuing warnings
@cindex warnings, issuing
Warn about constructs that are dubious or nonportable to
@@ -3478,16 +3474,16 @@ care to search for all occurrences of each inappropriate construct. As
@item -M
@itemx --bignum
-@cindex @code{-M} option
-@cindex @code{--bignum} option
+@cindex @option{-M} option
+@cindex @option{--bignum} option
Force arbitrary precision arithmetic on numbers. This option has no effect
if @command{gawk} is not compiled to use the GNU MPFR and MP libraries
(@pxref{Arbitrary Precision Arithmetic}).
@item -n
@itemx --non-decimal-data
-@cindex @code{-n} option
-@cindex @code{--non-decimal-data} option
+@cindex @option{-n} option
+@cindex @option{--non-decimal-data} option
@cindex hexadecimal values@comma{} enabling interpretation of
@cindex octal values@comma{} enabling interpretation of
@cindex troubleshooting, @code{--non-decimal-data} option
@@ -3502,15 +3498,15 @@ Use with care.
@item -N
@itemx --use-lc-numeric
-@cindex @code{-N} option
-@cindex @code{--use-lc-numeric} option
+@cindex @option{-N} option
+@cindex @option{--use-lc-numeric} option
Force the use of the locale's decimal point character
when parsing numeric input data (@pxref{Locales}).
@item -o@r{[}@var{file}@r{]}
@itemx --pretty-print@r{[}=@var{file}@r{]}
-@cindex @code{-o} option
-@cindex @code{--pretty-print} option
+@cindex @option{-o} option
+@cindex @option{--pretty-print} option
Enable pretty-printing of @command{awk} programs.
By default, output program is created in a file named @file{awkprof.out}.
The optional @var{file} argument allows you to specify a different
@@ -3520,16 +3516,16 @@ No space is allowed between the @option{-o} and @var{file}, if
@item -O
@itemx --optimize
-@cindex @code{--optimize} option
-@cindex @code{-O} option
+@cindex @option{--optimize} option
+@cindex @option{-O} option
Enable some optimizations on the internal representation of the program.
At the moment this includes just simple constant folding. The @command{gawk}
maintainer hopes to add more optimizations over time.
@item -p@r{[}@var{file}@r{]}
@itemx --profile@r{[}=@var{file}@r{]}
-@cindex @code{-p} option
-@cindex @code{--profile} option
+@cindex @option{-p} option
+@cindex @option{--profile} option
@cindex @command{awk} profiling, enabling
Enable profiling of @command{awk} programs
(@pxref{Profiling}).
@@ -3544,8 +3540,8 @@ in the left margin, and function call counts for each function.
@item -P
@itemx --posix
-@cindex @code{-P} option
-@cindex @code{--posix} option
+@cindex @option{-P} option
+@cindex @option{--posix} option
@cindex POSIX mode
@cindex @command{gawk}, extensions@comma{} disabling
Operate in strict POSIX mode. This disables all @command{gawk}
@@ -3586,16 +3582,16 @@ data (@pxref{Locales}).
@c @cindex automatic warnings
@c @cindex warnings, automatic
-@cindex @code{--traditional} option, @code{--posix} option and
-@cindex @code{--posix} option, @code{--traditional} option and
+@cindex @option{--traditional} option, @code{--posix} option and
+@cindex @option{--posix} option, @code{--traditional} option and
If you supply both @option{--traditional} and @option{--posix} on the
command line, @option{--posix} takes precedence. @command{gawk}
also issues a warning if both options are supplied.
@item -r
@itemx --re-interval
-@cindex @code{-r} option
-@cindex @code{--re-interval} option
+@cindex @option{-r} option
+@cindex @option{--re-interval} option
@cindex regular expressions, interval expressions and
Allow interval expressions
(@pxref{Regexp Operators})
@@ -3606,8 +3602,8 @@ and for use in combination with the @option{--traditional} option.
@item -S
@itemx --sandbox
-@cindex @code{-S} option
-@cindex @code{--sandbox} option
+@cindex @option{-S} option
+@cindex @option{--sandbox} option
@cindex sandbox mode
Disable the @code{system()} function,
input redirections with @code{getline},
@@ -3619,16 +3615,16 @@ can't access your system (other than the specified input data file).
@item -t
@itemx --lint-old
-@cindex @code{--L} option
-@cindex @code{--lint-old} option
+@cindex @option{-L} option
+@cindex @option{--lint-old} option
Warn about constructs that are not available in the original version of
@command{awk} from Version 7 Unix
(@pxref{V7/SVR3.1}).
@item -V
@itemx --version
-@cindex @code{-V} option
-@cindex @code{--version} option
+@cindex @option{-V} option
+@cindex @option{--version} option
@cindex @command{gawk}, versions of, information about@comma{} printing
Print version information for this particular copy of @command{gawk}.
This allows you to determine if your copy of @command{gawk} is up to date
@@ -3642,14 +3638,14 @@ As long as program text has been supplied,
any other options are flagged as invalid with a warning message but
are otherwise ignored.
-@cindex @code{-F} option, @code{-Ft} sets @code{FS} to TAB
+@cindex @option{-F} option, @option{-Ft} sets @code{FS} to TAB
In compatibility mode, as a special case, if the value of @var{fs} supplied
to the @option{-F} option is @samp{t}, then @code{FS} is set to the TAB
character (@code{"\t"}). This is true only for @option{--traditional} and not
for @option{--posix}
(@pxref{Field Separators}).
-@cindex @code{-f} option, multiple uses
+@cindex @option{-f} option, multiple uses
The @option{-f} option may be used more than once on the command line.
If it is, @command{awk} reads its program source from all of the named files, as
if they had been concatenated together into one big file. This is
@@ -3676,7 +3672,7 @@ and library source code
(@pxref{AWKPATH Variable}).
The @option{--source} option may also be used multiple times on the command line.
-@cindex @code{--source} option
+@cindex @option{--source} option
If no @option{-f} or @option{--source} option is specified, then @command{gawk}
uses the first non-option command-line argument as the text of the
program source code.
@@ -5047,8 +5043,8 @@ These sequences are:
@item Collating symbols
Multicharacter collating elements enclosed between
@samp{[.} and @samp{.]}. For example, if @samp{ch} is a collating element,
-then @code{[[.ch.]]} is a regexp that matches this collating element, whereas
-@code{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
+then @samp{[[.ch.]]} is a regexp that matches this collating element, whereas
+@samp{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
@cindex bracket expressions, equivalence classes
@item Equivalence classes
@@ -5056,7 +5052,7 @@ Locale-specific names for a list of
characters that are equal. The name is enclosed between
@samp{[=} and @samp{=]}.
For example, the name @samp{e} might be used to represent all of
-``e,'' ``@`e,'' and ``@'e.'' In this case, @code{[[=e=]]} is a regexp
+``e,'' ``@`e,'' and ``@'e.'' In this case, @samp{[[=e=]]} is a regexp
that matches any of @samp{e}, @samp{@'e}, or @samp{@`e}.
@end table
@@ -5100,7 +5096,7 @@ or underscores (@samp{_}):
@item \s
Matches any whitespace character.
Think of it as shorthand for
-@w{@code{[[:space:]]}}.
+@w{@samp{[[:space:]]}}.
@c @cindex operators, @code{\S} (@command{gawk})
@cindex backslash (@code{\}), @code{\S} operator (@command{gawk})
@@ -5108,7 +5104,7 @@ Think of it as shorthand for
@item \S
Matches any character that is not whitespace.
Think of it as shorthand for
-@w{@code{[^[:space:]]}}.
+@w{@samp{[^[:space:]]}}.
@c @cindex operators, @code{\w} (@command{gawk})
@cindex backslash (@code{\}), @code{\w} operator (@command{gawk})
@@ -5116,7 +5112,7 @@ Think of it as shorthand for
@item \w
Matches any word-constituent character---that is, it matches any
letter, digit, or underscore. Think of it as shorthand for
-@w{@code{[[:alnum:]_]}}.
+@w{@samp{[[:alnum:]_]}}.
@c @cindex operators, @code{\W} (@command{gawk})
@cindex backslash (@code{\}), @code{\W} operator (@command{gawk})
@@ -5124,7 +5120,7 @@ letter, digit, or underscore. Think of it as shorthand for
@item \W
Matches any character that is not word-constituent.
Think of it as shorthand for
-@w{@code{[^[:alnum:]_]}}.
+@w{@samp{[^[:alnum:]_]}}.
@c @cindex operators, @code{\<} (@command{gawk})
@cindex backslash (@code{\}), @code{\<} operator (@command{gawk})
@@ -5235,7 +5231,7 @@ are allowed.
@item @code{--traditional}
Traditional Unix @command{awk} regexps are matched. The GNU operators
are not special, and interval expressions are not available.
-The POSIX character classes (@code{[[:alnum:]]}, etc.) are supported,
+The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported,
as Brian Kernighan's @command{awk} does support them.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regexp metacharacters.
@@ -5861,21 +5857,27 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
@sc{nul} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
+
@docbook
</sidebar>
@end docbook
@@ -5906,20 +5908,26 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
@sc{nul} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
@end cartouche
@end ifnotdocbook
@c ENDOFRANGE inspl
@@ -6562,7 +6570,7 @@ behaves this way.
@node Command Line Field Separator
@subsection Setting @code{FS} from the Command Line
-@cindex @code{-F} option
+@cindex @option{-F} option
@cindex options, command-line
@cindex command line, options
@cindex field separators, on command line
@@ -6897,19 +6905,11 @@ will take effect.
@node Constant Size
@section Reading Fixed-Width Data
-@ifnotinfo
@quotation NOTE
This @value{SECTION} discusses an advanced
feature of @command{gawk}. If you are a novice @command{awk} user,
you might want to skip it on the first reading.
@end quotation
-@end ifnotinfo
-
-@ifinfo
-(This @value{SECTION} discusses an advanced feature of @command{awk}.
-If you are a novice @command{awk} user, you might want to skip it on
-the first reading.)
-@end ifinfo
@cindex data, fixed-width
@cindex fixed-width data
@@ -7039,19 +7039,11 @@ for an example of such a function).
@node Splitting By Content
@section Defining Fields By Content
-@ifnotinfo
@quotation NOTE
This @value{SECTION} discusses an advanced
feature of @command{gawk}. If you are a novice @command{awk} user,
you might want to skip it on the first reading.
@end quotation
-@end ifnotinfo
-
-@ifinfo
-(This @value{SECTION} discusses an advanced feature of @command{awk}.
-If you are a novice @command{awk} user, you might want to skip it on
-the first reading.)
-@end ifinfo
@cindex advanced features, specifying field content
Normally, when using @code{FS}, @command{gawk} defines the fields as the
@@ -7348,6 +7340,7 @@ then @command{gawk} sets @code{RT} to the null string.
@c STARTOFRANGE getl
@cindex @code{getline} command, explicit input with
+@c STARTOFRANGE inex
@cindex input, explicit
So far we have been getting our input data from @command{awk}'s main
input stream---either the standard input (usually your terminal, sometimes
@@ -7367,7 +7360,7 @@ rest of this @value{DOCUMENT} and have a good knowledge of how @command{awk} wor
@cindex @code{ERRNO} variable
@cindex differences in @command{awk} and @command{gawk}, @code{getline} command
@cindex @code{getline} command, return values
-@cindex @code{--sandbox} option, input redirection with @command{getline}
+@cindex @option{--sandbox} option, input redirection with @code{getline}
The @code{getline} command returns one if it finds a record and zero if
it encounters the end of the file. If there is some error in getting
@@ -8819,9 +8812,11 @@ on the @code{print} statement
@node Redirection
@section Redirecting Output of @code{print} and @code{printf}
+@c STARTOFRANGE outre
@cindex output redirection
+@c STARTOFRANGE reout
@cindex redirection of output
-@cindex @code{--sandbox} option, output redirection with @code{print}, @code{printf}
+@cindex @option{--sandbox} option, output redirection with @code{print}, @code{printf}
So far, the output from @code{print} and @code{printf} has gone
to the standard
output, usually the screen. Both @code{print} and @code{printf} can
@@ -8838,8 +8833,8 @@ Redirections in @command{awk} are written just like redirections in shell
commands, except that they are written inside the @command{awk} program.
@c the commas here are part of the see also
-@cindex @code{print} statement, See Also redirection, of output
-@cindex @code{printf} statement, See Also redirection, of output
+@cindex @code{print} statement, See Also redirection@comma{} of output
+@cindex @code{printf} statement, See Also redirection@comma{} of output
There are four forms of output redirection: output to a file, output
appended to a file, output through a pipe to another command, and output
to a coprocess. They are all shown for the @code{print} statement,
@@ -9588,6 +9583,8 @@ which provide the values used in expressions.
@node Constants
@subsection Constant Expressions
+
+@c STARTOFRANGE cnst
@cindex constants, types of
The simplest type of expression is the @dfn{constant}, which always has
@@ -9962,7 +9959,7 @@ Such an assignment has the following form:
@var{variable}=@var{text}
@end example
-@cindex @code{-v} option
+@cindex @option{-v} option
@noindent
With it, a variable is set either at the beginning of the
@command{awk} run or in between input files.
@@ -10120,7 +10117,7 @@ point when reading the @command{awk} program source code, and for command-line
variable assignments (@pxref{Other Arguments}).
However, when interpreting input data, for @code{print} and @code{printf} output,
and for number to string conversion, the local decimal point character is used.
-@value{DARKCORNER}.
+@value{DARKCORNER}
Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
@@ -10793,6 +10790,7 @@ just like variables. (Use @samp{$(i++)} when you want to do a field reference
and a variable increment at the same time. The parentheses are necessary
because of the precedence of the field reference operator @samp{$}.)
+@c STARTOFRANGE deop
@cindex decrement operators
The decrement operator @samp{--} works just like @samp{++}, except that
it subtracts one instead of adding it. As with @samp{++}, it can be used before
@@ -11269,7 +11267,7 @@ string comparison (true)
string comparison (true)
@item a = 2; b = " +2"
-@item a == b
+@itemx a == b
string comparison (false)
@end table
@@ -13762,13 +13760,7 @@ The number of fields in the current input record.
@code{NF} is set each time a new record is read, when a new field is
created or when @code{$0} changes (@pxref{Fields}).
-Unlike most of the variables described in this
-@ifnotinfo
-section,
-@end ifnotinfo
-@ifinfo
-node,
-@end ifinfo
+Unlike most of the variables described in this @value{SUBSECTION},
assigning a value to @code{NF} has the potential to affect
@command{awk}'s internal workings. In particular, assignments
to @code{NF} can be used to create or remove fields from the
@@ -16832,7 +16824,7 @@ close("/bin/sh")
@noindent
@cindex troubleshooting, @code{system()} function
-@cindex @code{--sandbox} option, disabling @code{system()} function
+@cindex @option{--sandbox} option, disabling @code{system()} function
However, if your @command{awk}
program is interactive, @code{system()} is useful for running large
self-contained programs, such as a shell or an editor.
@@ -19058,7 +19050,7 @@ The leading capital letter indicates that it is global, while the fact that
the variable name is not all capital letters indicates that the variable is
not one of @command{awk}'s built-in variables, such as @code{FS}.
-@cindex @code{--dump-variables} option
+@cindex @option{--dump-variables} option
It is also important that @emph{all} variables in library
functions that do not need to save state are, in fact, declared
local.@footnote{@command{gawk}'s @option{--dump-variables} command-line
@@ -19518,7 +19510,7 @@ function _ord_init( low, high, i, t)
@cindex ASCII
@cindex EBCDIC
@cindex mark parity
-Some explanation of the numbers used by @code{chr} is worthwhile.
+Some explanation of the numbers used by @code{chr()} is worthwhile.
The most prominent character set in use today is ASCII.@footnote{This
is changing; many systems use Unicode, a very large character set
that includes ASCII as a subset. On systems with full Unicode support,
@@ -20624,7 +20616,7 @@ use @code{getopt()} to process their arguments.
@c STARTOFRANGE libfudata
@cindex libraries of @command{awk} functions, user database, reading
@c STARTOFRANGE flibudata
-@cindex functions, library, user database, reading
+@cindex functions, library, user database@comma{} reading
@c STARTOFRANGE udatar
@cindex user database@comma{} reading
@c STARTOFRANGE dataur
@@ -20992,7 +20984,7 @@ uses these functions.
@c STARTOFRANGE libfgdata
@cindex libraries of @command{awk} functions, group database, reading
@c STARTOFRANGE flibgdata
-@cindex functions, library, group database, reading
+@cindex functions, library, group database@comma{} reading
@c STARTOFRANGE gdatar
@cindex group database, reading
@c STARTOFRANGE datagr
@@ -23131,6 +23123,32 @@ word, comparing it to the previous one:
@i{Nothing cures insomnia like a ringing alarm clock.}
@author Arnold Robbins
@end quotation
+@cindex Quanstrom, Erik
+@ignore
+Date: Sat, 15 Feb 2014 16:47:09 -0500
+Subject: Re: 9atom install question
+Message-ID: <l2jcvx6j6mey60xnrkb0hhob.1392500829294@email.android.com>
+From: Erik Quanstrom <quanstro@quanstro.net>
+To: Aharon Robbins <arnold@skeeve.com>
+
+yes.
+
+- erik
+
+Aharon Robbins <arnold@skeeve.com> wrote:
+
+>> sleep is for web developers.
+>
+>Can I quote you, in the gawk manual?
+>
+>Thanks,
+>
+>Arnold
+@end ignore
+@quotation
+@i{Sleep is for web developers.}
+@author Erik Quanstrom
+@end quotation
@c STARTOFRANGE tialarm
@cindex time, alarm clock example program
@@ -23798,7 +23816,8 @@ printed and online documentation.
@ifnotinfo
Texinfo is fully documented in the book
@cite{Texinfo---The GNU Documentation Format},
-available from the Free Software Foundation.
+available from the Free Software Foundation,
+and also available @uref{http://www.gnu.org/software/texinfo/manual/texinfo/, online}.
@end ifnotinfo
@ifinfo
The Texinfo language is described fully, starting with
@@ -24931,7 +24950,7 @@ It contains the following chapters:
@node Advanced Features
@chapter Advanced Features of @command{gawk}
-@cindex advanced features, network connections, See Also networks, connections
+@cindex advanced features, network connections, See Also networks@comma{} connections
@c STARTOFRANGE gawadv
@cindex @command{gawk}, features, advanced
@c STARTOFRANGE advgaw
@@ -24997,7 +25016,7 @@ discusses the ability to dynamically add new built-in functions to
@node Nondecimal Data
@section Allowing Nondecimal Input Data
-@cindex @code{--non-decimal-data} option
+@cindex @option{--non-decimal-data} option
@cindex advanced features, nondecimal input data
@cindex input, data@comma{} nondecimal
@cindex constants, nondecimal
@@ -25041,7 +25060,7 @@ using this facility could lead to surprising results, the default is to leave it
disabled. If you want it, you must explicitly request it.
@cindex programming conventions, @code{--non-decimal-data} option
-@cindex @code{--non-decimal-data} option, @code{strtonum()} function and
+@cindex @option{--non-decimal-data} option, @code{strtonum()} function and
@cindex @code{strtonum()} function (@command{gawk}), @code{--non-decimal-data} option and
@quotation CAUTION
@emph{Use of this option is not recommended.}
@@ -25749,7 +25768,7 @@ When @command{gawk} has finished running, it creates a profile of your program i
named @file{awkprof.out}. Because it is profiling, it also executes up to 45% slower than
@command{gawk} normally does.
-@cindex @code{--profile} option
+@cindex @option{--profile} option
As shown in the following example,
the @option{--profile} option can be used to change the name of the file
where @command{gawk} will write the profile:
@@ -26468,13 +26487,13 @@ is covered.
@subsection Extracting Marked Strings
@cindex strings, extracting
@cindex marked strings@comma{} extracting
-@cindex @code{--gen-pot} option
+@cindex @option{--gen-pot} option
@cindex command-line options, string extraction
@cindex string extraction (internationalization)
@cindex marked string extraction (internationalization)
@cindex extraction, of marked strings (internationalization)
-@cindex @code{--gen-pot} option
+@cindex @option{--gen-pot} option
Once your @command{awk} program is working, and all the strings have
been marked and you've set (and perhaps bound) the text domain,
it is time to produce translations.
@@ -29671,9 +29690,9 @@ certain fields in the API data structures unwritable from extension code,
while allowing @command{gawk} to use them as it needs to.
@item typedef enum awk_bool @{
-@item @ @ @ @ awk_false = 0,
-@item @ @ @ @ awk_true
-@item @} awk_bool_t;
+@itemx @ @ @ @ awk_false = 0,
+@itemx @ @ @ @ awk_true
+@itemx @} awk_bool_t;
A simple boolean type.
@item typedef struct awk_string @{
@@ -32260,14 +32279,14 @@ The usage is:
@item @@load "filefuncs"
This is how you load the extension.
-@cindex @code{chdir} extension function
+@cindex @code{chdir()} extension function
@item result = chdir("/some/directory")
The @code{chdir()} function is a direct hook to the @code{chdir()}
system call to change the current directory. It returns zero
upon success or less than zero upon error. In the latter case it updates
@code{ERRNO}.
-@cindex @code{stat} extension function
+@cindex @code{stat()} extension function
@item result = stat("/some/path", statdata [, follow])
The @code{stat()} function provides a hook into the
@code{stat()} system call.
@@ -32357,7 +32376,7 @@ or
Not all systems support all file types.
@end multitable
-@cindex @code{fts} extension function
+@cindex @code{fts()} extension function
@item flags = or(FTS_PHYSICAL, ...)
@itemx result = fts(pathlist, flags, filedata)
Walk the file trees provided in @code{pathlist} and fill in the
@@ -32478,7 +32497,7 @@ See @file{test/fts.awk} in the @command{gawk} distribution for an example.
@node Extension Sample Fnmatch
@subsection Interface To @code{fnmatch()}
-@cindex @code{fnmatch} extension function
+@cindex @code{fnmatch()} extension function
This extension provides an interface to the C library
@code{fnmatch()} function. The usage is:
@@ -32551,7 +32570,7 @@ The @code{fork} extension adds three functions, as follows.
@item @@load "fork"
This is how you load the extension.
-@cindex @code{fork} extension function
+@cindex @code{fork()} extension function
@item pid = fork()
This function creates a new process. The return value is the zero in the
child and the process-id number of the child in the parent, or @minus{}1
@@ -32559,13 +32578,13 @@ upon error. In the latter case, @code{ERRNO} indicates the problem.
In the child, @code{PROCINFO["pid"]} and @code{PROCINFO["ppid"]} are
updated to reflect the correct values.
-@cindex @code{waitpid} extension function
+@cindex @code{waitpid()} extension function
@item ret = waitpid(pid)
This function takes a numeric argument, which is the process-id to
wait for. The return value is that of the
@code{waitpid()} system call.
-@cindex @code{wait} extension function
+@cindex @code{wait()} extension function
@item ret = wait()
This function waits for the first child to die.
The return value is that of the
@@ -32652,11 +32671,11 @@ The @code{ordchr} extension adds two functions, named
@item @@load "ordchr"
This is how you load the extension.
-@cindex @code{ord} extension function
+@cindex @code{ord()} extension function
@item number = ord(string)
Return the numeric value of the first character in @code{string}.
-@cindex @code{chr} extension function
+@cindex @code{chr()} extension function
@item char = chr(number)
Return a string whose first character is that represented by @code{number}.
@end table
@@ -32773,14 +32792,14 @@ The @code{rwarray} extension adds two functions,
named @code{writea()} and @code{reada()}, as follows:
@table @code
-@cindex @code{writea} extension function
+@cindex @code{writea()} extension function
@item ret = writea(file, array)
This function takes a string argument, which is the name of the file
to which dump the array, and the array itself as the second argument.
@code{writea()} understands multidimensional arrays. It returns one on
success, or zero upon failure.
-@cindex @code{reada} extension function
+@cindex @code{reada()} extension function
@item ret = reada(file, array)
@code{reada()} is the inverse of @code{writea()};
it reads the file named as its first argument, filling in
@@ -32823,7 +32842,7 @@ named @code{readfile()}:
@item @@load "readfile"
This is how you load the extension.
-@cindex @code{readfile} extension function
+@cindex @code{readfile()} extension function
@item result = readfile("/some/path")
The argument is the name of the file to read. The return value is a
string containing the entire contents of the requested file. Upon error,
@@ -32864,7 +32883,7 @@ inserting @samp{@@load "time"} in your script.
@item @@load "time"
This is how you load the extension.
-@cindex @code{gettimeofday} extension function
+@cindex @code{gettimeofday()} extension function
@item the_time = gettimeofday()
Return the time in seconds that has elapsed since 1970-01-01 UTC as a
floating point value. If the time is unavailable on this platform, return
@@ -32874,7 +32893,7 @@ If the standard C @code{gettimeofday()} system call is available on this
platform, then it simply returns the value. Otherwise, if on Windows,
it tries to use @code{GetSystemTimeAsFileTime()}.
-@cindex @code{sleep} extension function
+@cindex @code{sleep()} extension function
@item result = sleep(@var{seconds})
Attempt to sleep for @var{seconds} seconds. If @var{seconds} is negative,
or the attempt to sleep fails, return @minus{}1 and set @code{ERRNO}.
@@ -33033,6 +33052,7 @@ of the @value{DOCUMENT} where you can find more information.
@command{awk}.
* POSIX/GNU:: The extensions in @command{gawk} not in POSIX
@command{awk}.
+* Feature History:: The history of the features in @command{gawk}.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp ranges.
* Contributors:: The major contributors to @command{gawk}.
@@ -33611,6 +33631,612 @@ GCC for VAX and Alpha has not been tested for a while.
@c ENDOFRANGE exgnot
@c ENDOFRANGE posnot
+@node Feature History
+@appendixsec History of @command{gawk} Features
+
+@ignore
+See the thread:
+https://groups.google.com/forum/#!topic/comp.lang.awk/SAUiRuff30c
+This motivated me to add this section.
+@end ignore
+
+@ignore
+I've tried to follow this general order, esp.@: for the 3.0 and 3.1 sections:
+ variables
+ special files
+ language changes (e.g., hex constants)
+ differences in standard awk functions
+ new gawk functions
+ new keywords
+ new command-line options
+ behavioral changes
+ new ports
+Within each category, be alphabetical.
+@end ignore
+
+This @value{SECTION} describes the features in @command{gawk}
+over and above those in POSIX @command{awk},
+in the order they were added to @command{gawk}.
+
+Version 2.10 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+The @env{AWKPATH} environment variable for specifying a path search for
+the @option{-f} command-line option
+(@pxref{Options}).
+
+@item
+The @code{IGNORECASE} variable and its effects
+(@pxref{Case-sensitivity}).
+
+@item
+The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and
+@file{/dev/fd/@var{N}} special file names
+(@pxref{Special Files}).
+@end itemize
+
+Version 2.13 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+The @code{FIELDWIDTHS} variable and its effects
+(@pxref{Constant Size}).
+
+@item
+The @code{systime()} and @code{strftime()} built-in functions for obtaining
+and printing timestamps
+(@pxref{Time Functions}).
+
+@item
+Additional command-line options
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-W lint} option to provide error and portability checking
+for both the source code and at runtime.
+
+@item
+The @option{-W compat} option to turn off the GNU extensions.
+
+@item
+The @option{-W posix} option for full POSIX compliance.
+@end itemize
+@end itemize
+
+Version 2.14 of @command{gawk} introduced the following feature:
+
+@itemize @bullet
+@item
+The @code{next file} statement for skipping to the next data file
+(@pxref{Nextfile Statement}).
+@end itemize
+
+Version 2.15 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New variables (@pxref{Built-in Variables}):
+
+@itemize @minus
+@item
+@code{ARGIND}, which tracks the movement of @code{FILENAME}
+through @code{ARGV}.
+
+@item
+@code{ERRNO}, which contains the system error message when
+@code{getline} returns @minus{}1 or @code{close()} fails.
+@end itemize
+
+@item
+The @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}, and
+@file{/dev/user} special file names. These have since been removed.
+
+@item
+The ability to delete all of an array at once with @samp{delete @var{array}}
+(@pxref{Delete}).
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The ability to use GNU-style long-named options that start with @option{--}.
+
+@item
+The @option{--source} option for mixing command-line and library-file
+source code.
+@end itemize
+@end itemize
+
+Version 3.0 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New or changed variables:
+
+@itemize @minus
+@item
+@code{IGNORECASE} changed, now applying to string comparison as well
+as regexp operations
+(@pxref{Case-sensitivity}).
+
+@item
+@code{RT}, which contains the input text that matched @code{RS}
+(@pxref{Records}).
+@end itemize
+
+@item
+Full support for both POSIX and GNU regexps
+(@pxref{Regexp}).
+
+@item
+The @code{gensub()} function for more powerful text manipulation
+(@pxref{String Functions}).
+
+@item
+The @code{strftime()} function acquired a default time format,
+allowing it to be called with no arguments
+(@pxref{Time Functions}).
+
+@item
+The ability for @code{FS} and for the third
+argument to @code{split()} to be null strings
+(@pxref{Single Character Fields}).
+
+@item
+The ability for @code{RS} to be a regexp
+(@pxref{Records}).
+
+@item
+The @code{next file} statement became @code{nextfile}
+(@pxref{Nextfile Statement}).
+
+@item
+The @code{fflush()} function from the
+Bell Laboratories research version of @command{awk}
+(@pxref{I/O Functions}).
+
+@item
+New command line options:
+
+@itemize @minus
+@item
+The @option{--lint-old} option to
+warn about constructs that are not available in
+the original Version 7 Unix version of @command{awk}
+(@pxref{V7/SVR3.1}).
+
+@item
+The @option{-m} option from the
+Bell Laboratories research version of @command{awk}
+This was later removed.
+
+@item
+The @option{--re-interval} option to provide interval expressions in regexps
+(@pxref{Regexp Operators}).
+
+@item
+The @option{--traditional} option was added as a better name for
+@option{--compat} (@pxref{Options}).
+@end itemize
+
+@item
+The use of GNU Autoconf to control the configuration process
+(@pxref{Quick Installation}).
+
+@item
+Amiga support.
+
+@end itemize
+
+Version 3.1 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New variables
+(@pxref{Built-in Variables}):
+
+@itemize @minus
+@item
+@code{BINMODE}, for non-POSIX systems,
+which allows binary I/O for input and/or output files
+(@pxref{PC Using}).
+
+@item
+@code{LINT}, which dynamically controls lint warnings.
+
+@item
+@code{PROCINFO}, an array for providing process-related information.
+
+@item
+@code{TEXTDOMAIN}, for setting an application's internationalization text domain
+(@pxref{Internationalization}).
+@end itemize
+
+@item
+The ability to use octal and hexadecimal constants in @command{awk}
+program source code
+(@pxref{Nondecimal-numbers}).
+
+@item
+The @samp{|&} operator for two-way I/O to a coprocess
+(@pxref{Two-way I/O}).
+
+@item
+The @file{/inet} special files for TCP/IP networking using @samp{|&}
+(@pxref{TCP/IP Networking}).
+
+@item
+The optional second argument to @code{close()} that allows closing one end
+of a two-way pipe to a coprocess
+(@pxref{Two-way I/O}).
+
+@item
+The optional third argument to the @code{match()} function
+for capturing text-matching subexpressions within a regexp
+(@pxref{String Functions}).
+
+@item
+Positional specifiers in @code{printf} formats for
+making translations easier
+(@pxref{Printf Ordering}).
+
+@item
+A number of new built-in functions:
+
+@itemize @minus
+@item
+The @code{asort()} and @code{asorti()} functions for sorting arrays
+(@pxref{Array Sorting}).
+
+@item
+The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions
+for internationalization
+(@pxref{Programmer i18n}).
+
+@item
+The @code{extension()} function and the ability to add
+new built-in functions dynamically
+(@pxref{Dynamic Extensions}).
+
+@item
+The @code{mktime()} function for creating timestamps
+(@pxref{Time Functions}).
+
+@item
+The @code{and()}, @code{or()}, @code{xor()}, @code{compl()},
+@code{lshift()}, @code{rshift()}, and @code{strtonum()} functions
+(@pxref{Bitwise Functions}).
+@end itemize
+
+@item
+@cindex @code{next file} statement
+The support for @samp{next file} as two words was removed completely
+(@pxref{Nextfile Statement}).
+
+@item
+Additional commnd line options
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{--dump-variables} option to print a list of all global variables.
+
+@item
+The @option{--exec} option, for use in CGI scripts.
+
+@item
+The @option{--gen-po} command-line option and the use of a leading
+underscore to mark strings that should be translated
+(@pxref{String Extraction}).
+
+@item
+The @option{--non-decimal-data} option to allow non-decimal
+input data
+(@pxref{Nondecimal Data}).
+
+@item
+The @option{--profile} option and @command{pgawk}, the
+profiling version of @command{gawk}, for producing execution
+profiles of @command{awk} programs
+(@pxref{Profiling}).
+
+@item
+The @option{--use-lc-numeric} option to force @command{gawk}
+to use the locale's decimal point for parsing input data
+(@pxref{Conversion}).
+@end itemize
+
+@item
+The use of GNU Automake to help in standardizing the configuration process
+(@pxref{Quick Installation}).
+
+@item
+The use of GNU @code{gettext} for @command{gawk}'s own message output
+(@pxref{Gawk I18N}).
+
+@item
+BeOS support. This was later removed.
+
+@item
+Tandem support. This was later removed.
+
+@item
+The Atari port became officially unsupported.
+
+@item
+The source code changed to use ISO C standard-style function definitions.
+
+@item
+POSIX compliance for @code{sub()} and @code{gsub()}
+(@pxref{Gory Details}).
+
+@item
+The @code{length()} function was extended to accept an array argument
+and return the number of elements in the array
+(@pxref{String Functions}).
+
+@item
+The @code{strftime()} function acquired a third argument to
+enable printing times as UTC
+(@pxref{Time Functions}).
+@end itemize
+
+Version 4.0 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+
+@item
+Variable additions:
+
+@itemize @minus
+@item
+@code{FPAT}, which allows you to specify a regexp that matches
+the fields, instead of matching the field separator
+(@pxref{Splitting By Content}).
+
+@item
+If @code{PROCINFO["sorted_in"]} exists, @samp{for(iggy in foo)} loops sort the
+indices before looping over them. The value of this element
+provides control over how the indices are sorted before the loop
+traversal starts
+(@pxref{Controlling Scanning}).
+
+@item
+@code{PROCINFO["strftime"]}, which holds
+the default format for @code{strftime()}
+(@pxref{Time Functions}).
+@end itemize
+
+@item
+The special files @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}
+and @file{/dev/user} were removed.
+
+@item
+Support for IPv6 was added via the @file{/inet6} special file.
+@file{/inet4} forces IPv4 and @file{/inet} chooses the system
+default, which is probably IPv4
+(@pxref{TCP/IP Networking}).
+
+@item
+The use of @samp{\s} and @samp{\S} escape sequences in regular expressions
+(@pxref{GNU Regexp Operators}).
+
+@item
+Interval expressions became part of default regular expressions
+(@pxref{Regexp Operators}).
+
+@item
+POSIX character classes work even with @option{--traditional}
+(@pxref{Regexp Operators}).
+
+@item
+@code{break} and @code{continue} became invalid outside a loop,
+even with @option{--traditional}
+(@pxref{Break Statement}, and also see
+@ref{Continue Statement}).
+
+@item
+@code{fflush()}, @code{nextfile}, and @samp{delete @var{array}}
+are allowed if @option{--posix} or @option{--traditional}, since they
+are all now part of POSIX.
+
+@item
+An optional third argument to
+@code{asort()} and @code{asorti()}, specifying how to sort
+(@pxref{String Functions}).
+
+@item
+The behavior of @code{fflush()} changed to match Brian Kernighan's @command{awk}
+and for POSIX; now both @samp{fflush()} and @samp{fflush("")}
+flush all open output redirections
+(@pxref{I/O Functions}).
+
+@item
+The @code{isarray()}
+function which distinguishes if an item is an array
+or not, to make it possible to traverse multidimensional arrays
+(@pxref{Type Functions}).
+
+@item
+The @code{patsplit()}
+function which gives the same capability as @code{FPAT}, for splitting
+(@pxref{String Functions}).
+
+@item
+An optional fourth argument to the @code{split()} function,
+which is an array to hold the values of the separators
+(@pxref{String Functions}).
+
+@item
+Arrays of arrays
+(@pxref{Arrays of Arrays}).
+
+@item
+The @code{BEGINFILE} and @code{ENDFILE} special patterns
+(@pxref{BEGINFILE/ENDFILE}).
+
+@item
+Indirect function calls
+(@pxref{Indirect Calls}).
+
+@item
+@code{switch} / @code{case} are enabled by default
+(@pxref{Switch Statement}).
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-b} and @option{--characters-as-bytes} options
+which prevent @command{gawk} from treating input as a multibyte string.
+
+@item
+The redundant @option{--compat}, @option{--copyleft}, and @option{--usage}
+long options were removed.
+
+@item
+The @option{--gen-po} option was finally renamed to the correct @option{--gen-pot}.
+
+@item
+The @option{--sandbox} option which disables certain features.
+
+@item
+All long options acquired corresponding short options, for use in @samp{#!} scripts.
+@end itemize
+
+@item
+Directories named on the command line now produce a warning, not a fatal
+error, unless @option{--posix} or @option{--traditional} are used
+(@pxref{Command line directories}).
+
+@item
+The @command{gawk} internals were rewritten, bringing the @command{dgawk}
+debugger and possibly improved performance
+(@pxref{Debugger}).
+
+@item
+Per the GNU Coding Standards, dynamic extensions must now define
+a global symbol indicating that they are GPL-compatible
+(@pxref{Plugin License}).
+
+@item
+In POSIX mode, string comparisons use @code{strcoll()} / @code{wcscoll()}
+(@pxref{POSIX String Comparison}).
+
+@item
+The option for raw sockets was removed, since it was never implemented
+(@pxref{TCP/IP Networking}).
+
+@item
+Ranges of the form @samp{[d-h]} are treated as if they were in the
+C locale, no matter what kind of regexp is being used, and even if
+@option{--posix}
+(@pxref{Ranges and Locales}).
+
+@item
+Support was removed for the following systems:
+
+@itemize @minus
+@item
+Atari
+
+@item
+Amiga
+
+@item
+BeOS
+
+@item
+Cray
+
+@item
+MIPS RiscOS
+
+@item
+MS-DOS with Microsoft Compiler
+
+@item
+MS-Windows with Microsoft Compiler
+
+@item
+NeXT
+
+@item
+SunOS 3.x, Sun 386 (Road Runner)
+
+@item
+Tandem (non-POSIX)
+
+@item
+Prestandard VAX C compiler for VAX/VMS
+@end itemize
+@end itemize
+
+Version 4.1 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+
+@item
+Three new arrays:
+@code{SYMTAB}, @code{FUNCTAB}, and @code{PROCINFO["identifiers"]}
+(@pxref{Auto-set}).
+
+@item
+The three executables @command{gawk}, @command{pgawk}, and @command{dgawk}, were merged into
+one, named just @command{gawk}. As a result the command line options changed.
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-D} option invokes the debugger.
+
+@item
+The @option{-i} and @option{--include} options
+load @command{awk} library files.
+
+@item
+The @option{-l} and @option{--load} options for load compiled dynamic extensions.
+
+@item
+The @option{-M} and @option{--bignum} options enable MPFR.
+
+@item
+The @option{-o} only does pretty-printing.
+
+@item
+The @option{-p} option is used for profiling.
+
+@item
+The @option{-R} option was removed.
+@end itemize
+
+@item
+Support for high precision arithmetic with MPFR.
+(@pxref{Gawk and MPFR}).
+
+@item
+The @code{and()}, @code{or()} and @code{xor()} functions
+allow any number of arguments,
+with a minimum of two
+(@pxref{Bitwise Functions}).
+
+@item
+The dynamic extension interface was completely redone
+(@pxref{Dynamic Extensions}).
+
+@end itemize
+
+@c XXX ADD MORE STUFF HERE
+
@node Common Extensions
@appendixsec Common Extensions Summary
@@ -33626,7 +34252,7 @@ the three most widely-used freely available versions of @command{awk}
@item @samp{\x} Escape sequence @tab X @tab X @tab X
@item @code{RS} as regexp @tab @tab X @tab X
@item @code{FS} as null string @tab X @tab X @tab X
-@item @file{/dev/stdin} special file @tab X @tab @tab X
+@item @file{/dev/stdin} special file @tab X @tab X @tab X
@item @file{/dev/stdout} special file @tab X @tab X @tab X
@item @file{/dev/stderr} special file @tab X @tab X @tab X
@item @code{**} and @code{**=} operators @tab X @tab @tab X
@@ -33634,7 +34260,7 @@ the three most widely-used freely available versions of @command{awk}
@item @code{func} keyword @tab X @tab @tab X
@item @code{nextfile} statement @tab X @tab X @tab X
@item @code{delete} without subscript @tab X @tab X @tab X
-@item @code{length()} of an array @tab X @tab @tab X
+@item @code{length()} of an array @tab X @tab X @tab X
@item @code{BINMODE} variable @tab @tab X @tab X
@item Time related functions @tab @tab X @tab X
@end multitable
@@ -33716,7 +34342,7 @@ When @command{gawk} switched to using locale-aware regexp matchers,
the problems began; especially as both GNU/Linux and commercial Unix
vendors started implementing non-ASCII locales, @emph{and making them
the default}. Perhaps the most frequently asked question became something
-like ``why does @code{[A-Z]} match lowercase letters?!?''
+like ``why does @samp{[A-Z]} match lowercase letters?!?''
This situation existed for close to 10 years, if not more, and
the @command{gawk} maintainer grew weary of trying to explain that
@@ -33936,6 +34562,10 @@ environments.
(This is no longer supported)
@item
+@cindex Wallin, Anders
+Anders Wallin helped keep the VMS port going for several years.
+
+@item
@cindex Haque, John
John Haque made the following contributions:
@@ -33989,7 +34619,7 @@ helping David Trueman, and as the primary maintainer since around 1994.
@appendix Installing @command{gawk}
@c last two commas are part of see also
-@cindex operating systems, See Also GNU/Linux, PC operating systems, Unix
+@cindex operating systems, See Also GNU/Linux@comma{} PC operating systems@comma{} Unix
@c STARTOFRANGE gligawk
@cindex @command{gawk}, installing
@c STARTOFRANGE ingawk
@@ -34394,7 +35024,7 @@ command line when compiling @command{gawk} from scratch, including:
@table @code
-@cindex @code{--disable-extensions} configuration option
+@cindex @option{--disable-extensions} configuration option
@cindex configuration option, @code{--disable-extensions}
@item --disable-extensions
Disable configuring and building the sample extensions in the
@@ -34402,7 +35032,7 @@ Disable configuring and building the sample extensions in the
The default action is to dynamically check if the extensions
can be configured and compiled.
-@cindex @code{--disable-lint} configuration option
+@cindex @option{--disable-lint} configuration option
@cindex configuration option, @code{--disable-lint}
@item --disable-lint
Disable all lint checking within @code{gawk}. The
@@ -34422,14 +35052,14 @@ Using this option may bring you some slight performance improvement.
Using this option will cause some of the tests in the test suite
to fail. This option may be removed at a later date.
-@cindex @code{--disable-nls} configuration option
+@cindex @option{--disable-nls} configuration option
@cindex configuration option, @code{--disable-nls}
@item --disable-nls
Disable all message-translation facilities.
This is usually not desirable, but it may bring you some slight performance
improvement.
-@cindex @code{--with-whiny-user-strftime} configuration option
+@cindex @option{--with-whiny-user-strftime} configuration option
@cindex configuration option, @code{--with-whiny-user-strftime}
@item --with-whiny-user-strftime
Force use of the included version of the @code{strftime()}
@@ -35024,7 +35654,21 @@ If your @command{gawk} was installed by a PCSI kit into the
@file{GNV$GNU:[bin]gnv$gawk.exe} and the help file will be
@file{GNV$GNU:[vms_help]gawk.hlp}.
-Optionally, the help entry can be loaded into a VMS help library:
+The PCSI kit also installs a @file{GNV$GNU:[vms_bin]gawk_verb.cld} file
+which can be used to add @command{gawk} and @command{awk} as DCL commands.
+
+For just the current process you can use:
+
+@example
+$ @kbd{set command gnv$gnu:[vms_bin]gawk_verb.cld}
+@end example
+
+Or the system manager can use @file{GNV$GNU:[vms_bin]gawk_verb.cld} to
+add the @command{gawk} and @command{awk} to the system wide @samp{DCLTABLES}.
+
+The DCL syntax is documented in the @file{gawk.hlp} file.
+
+Optionally, @file{gawk.hlp} entry can be loaded into a VMS help library:
@example
$ @kbd{LIBRARY/HELP sys$help:helplib [.vms]gawk.hlp}
@@ -35135,9 +35779,10 @@ to supply individual PCSI packages for each component.
See @uref{https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/}.
The normal build procedure for @command{gawk} produces a program that
-is suitable for use with GNV. At this time work is being done to create
-the procedures for building a PCSI kit to replace the older @command{gawk}
-port.
+is suitable for use with GNV.
+
+The @file{vms/gawk_build_steps.txt} in the source documents the procedure
+for building a VMS PCSI kit that is compatible with GNV.
@ignore
@c The VMS POSIX product, also known as POSIX for OpenVMS, is long defunct
@@ -35291,7 +35936,7 @@ as follows:
@cindex Rankin, Pat
@cindex Malmberg, John
@item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com}, and
-John Malmberg, @EMAIL{wb8tyw@@gmail.com,wb8tyw at gmail.com}.
+John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}.
@cindex Pitts, Dave
@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}.
@@ -35652,7 +36297,7 @@ for information on getting the latest version of @command{gawk}.)
@item
@ifnotinfo
-Follow the @cite{GNU Coding Standards}.
+Follow the @uref{http://www.gnu.org/prep/standards/, @cite{GNU Coding Standards}}.
@end ifnotinfo
@ifinfo
See @inforef{Top, , Version, standards, GNU Coding Standards}.
@@ -35811,11 +36456,9 @@ Be prepared to sign the appropriate paperwork.
In order for the FSF to distribute your code, you must either place
your code in the public domain and submit a signed statement to that
effect, or assign the copyright in your code to the FSF.
-@ifinfo
Both of these actions are easy to do and @emph{many} people have done so
already. If you have questions, please contact me, or
@email{gnu@@gnu.org}.
-@end ifinfo
@item
When doing a port, bear in mind that your code must coexist peacefully
diff --git a/doc/gawkinet.info b/doc/gawkinet.info
index c8ce6b8d..0a0d69d8 100644
--- a/doc/gawkinet.info
+++ b/doc/gawkinet.info
@@ -613,7 +613,7 @@ tcp, udp x 0 x Invalid
tcp, udp 0 0 0 Invalid
tcp, udp 0 x 0 Invalid
-Table 2.1: /inet Special File Components
+Table 2.1: /inet Special File Components
In general, TCP is the preferred mechanism to use. It is the
simplest protocol to understand and to use. Use UDP only if
@@ -4358,40 +4358,40 @@ Node: Using Networking17966
Node: Gawk Special Files20284
Node: Special File Fields22094
Ref: table-inet-components25967
-Node: Comparing Protocols27290
-Node: File /inet/tcp27823
-Node: File /inet/udp28849
-Node: TCP Connecting29947
-Node: Troubleshooting32285
-Ref: Troubleshooting-Footnote-135337
-Node: Interacting35906
-Node: Setting Up38636
-Node: Email42130
-Node: Web page44456
-Ref: Web page-Footnote-147261
-Node: Primitive Service47458
-Node: Interacting Service50192
-Ref: Interacting Service-Footnote-159321
-Node: CGI Lib59353
-Node: Simple Server66314
-Ref: Simple Server-Footnote-174037
-Node: Caveats74138
-Node: Challenges75281
-Node: Some Applications and Techniques83960
-Node: PANIC86417
-Node: GETURL88135
-Node: REMCONF90758
-Node: URLCHK96234
-Node: WEBGRAB100069
-Node: STATIST104519
-Ref: STATIST-Footnote-1116227
-Node: MAZE116672
-Node: MOBAGWHO122856
-Ref: MOBAGWHO-Footnote-1136800
-Node: STOXPRED136855
-Node: PROTBASE151110
-Node: Links164191
-Node: GNU Free Documentation License167625
-Node: Index192764
+Node: Comparing Protocols27287
+Node: File /inet/tcp27820
+Node: File /inet/udp28846
+Node: TCP Connecting29944
+Node: Troubleshooting32282
+Ref: Troubleshooting-Footnote-135334
+Node: Interacting35903
+Node: Setting Up38633
+Node: Email42127
+Node: Web page44453
+Ref: Web page-Footnote-147258
+Node: Primitive Service47455
+Node: Interacting Service50189
+Ref: Interacting Service-Footnote-159318
+Node: CGI Lib59350
+Node: Simple Server66311
+Ref: Simple Server-Footnote-174034
+Node: Caveats74135
+Node: Challenges75278
+Node: Some Applications and Techniques83957
+Node: PANIC86414
+Node: GETURL88132
+Node: REMCONF90755
+Node: URLCHK96231
+Node: WEBGRAB100066
+Node: STATIST104516
+Ref: STATIST-Footnote-1116224
+Node: MAZE116669
+Node: MOBAGWHO122853
+Ref: MOBAGWHO-Footnote-1136797
+Node: STOXPRED136852
+Node: PROTBASE151107
+Node: Links164188
+Node: GNU Free Documentation License167622
+Node: Index192761

End Tag Table
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi
index eb0f2d81..40198e1d 100644
--- a/doc/gawkinet.texi
+++ b/doc/gawkinet.texi
@@ -597,7 +597,7 @@ is started, @command{gawk} creates the appropriate network
connection, and then two-way I/O proceeds as usual.
@c last comma is part of see-also
-@cindex input/output, two-way, See Also @command{gawk}, networking
+@cindex input/output, two-way, See Also @command{gawk}@comma{} networking
@cindex TCP/IP, sockets and
At the C, C++, and Perl level, networking is accomplished
via @dfn{sockets}, an Application Programming Interface (API) originally
@@ -1144,9 +1144,9 @@ or the application cannot tolerate virtual circuit overhead.
@node Setting Up, Email, Interacting, Using Networking
@section Setting Up a Service
@c last comma is part of tertiary
-@cindex networks, @command{gawk} and, service, establishing
+@cindex networks, @command{gawk} and, service@comma{} establishing
@c last comma is part of tertiary
-@cindex @command{gawk}, networking, service, establishing
+@cindex @command{gawk}, networking, service@comma{} establishing
The preceding programs behaved as clients that connect to a server somewhere
on the Internet and request a particular service. Now we set up such a
service to mimic the behavior of the @samp{daytime} service.
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 94f77e9e..6b9acdea 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -14,6 +14,20 @@
* awk: (gawk)Invoking gawk. Text scanning and processing.
@end direntry
+@ifset FOR_PRINT
+@tex
+\gdef\xrefprintnodename#1{``#1''}
+@end tex
+@end ifset
+@ifclear FOR_PRINT
+@c With early 2014 texinfo.tex, restore PDF links and colors
+@tex
+\gdef\linkcolor{0.5 0.09 0.12} % Dark Red
+\gdef\urlcolor{0.5 0.09 0.12} % Also
+\global\urefurlonlylinktrue
+@end tex
+@end ifclear
+
@set xref-automatic-section-title
@c The following information should be updated here only!
@@ -21,7 +35,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH January, 2014
+@set UPDATE-MONTH February, 2014
@set VERSION 4.1
@set PATCHLEVEL 0
@@ -117,10 +131,7 @@
@ignore
Some comments on the layout for TeX.
-1. Use at least texinfo.tex 2000-09-06.09
-2. I have done A LOT of work to make this look good. There are `@page' commands
- and use of `@group ... @end group' in a number of places. If you muck
- with anything, it's your responsibility not to break the layout.
+1. Use at least texinfo.tex 2014-01-30.15
@end ignore
@c merge the function and variable indexes into the concept index
@@ -397,7 +408,8 @@ particular records in a file and perform operations upon them.
field.
* Command Line Field Separator:: Setting @code{FS} from the
command-line.
-* Full Line Fields:: Making the full line be a single field.
+* Full Line Fields:: Making the full line be a single
+ field.
* Field Splitting Summary:: Some final points and a summary table.
* Constant Size:: Reading constant width data.
* Splitting By Content:: Defining Fields By Content
@@ -787,6 +799,7 @@ particular records in a file and perform operations upon them.
version of @command{awk}.
* POSIX/GNU:: The extensions in @command{gawk} not
in POSIX @command{awk}.
+* Feature History:: The history of the features in @command{gawk}.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp
ranges.
@@ -1212,7 +1225,7 @@ and the program ``the @command{awk} utility.''
This @value{DOCUMENT} explains
both how to write programs in the @command{awk} language and how to
run the @command{awk} utility.
-The term @dfn{@command{awk} program} refers to a program written by you in
+The term ``@command{awk} program'' refers to a program written by you in
the @command{awk} programming language.
@cindex @command{gawk}, @command{awk} and
@@ -1745,7 +1758,6 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Rankin, Pat
@cindex Schorr, Andrew
@cindex Vinschen, Corinna
-@cindex Wallin, Anders
@cindex Zaretskii, Eli
Dr.@: Nelson Beebe,
@@ -1765,7 +1777,6 @@ Chet Ramey,
Pat Rankin,
Andrew Schorr,
Corinna Vinschen,
-Anders Wallin,
and Eli Zaretskii
(in alphabetical order)
make up the current
@@ -2066,7 +2077,7 @@ more convenient to put the program into a separate file. In order to tell
awk -f @var{source-file} @var{input-file1} @var{input-file2} @dots{}
@end example
-@cindex @code{-f} option
+@cindex @option{-f} option
@cindex command line, options
@cindex options, command-line
The @option{-f} instructs the @command{awk} utility to get the @command{awk} program
@@ -2537,23 +2548,8 @@ Apr 21 70 74 514
@c endfile
@end example
-@ifinfo
-If you are reading this in GNU Emacs using Info, you can copy the regions
-of text showing these sample files into your own test files. This way you
-can try out the examples shown in the remainder of this document. You do
-this by using the command @kbd{M-x write-region} to copy text from the Info
-file into a file for use with @command{awk}
-(@xref{Misc File Ops, , Miscellaneous File Operations, emacs, GNU Emacs Manual},
-for more information). Using this information, create your own
-@file{BBS-list} and @file{inventory-shipped} files and practice what you
-learn in this @value{DOCUMENT}.
-
-@cindex Texinfo
-If you are using the stand-alone version of Info,
-see @ref{Extract Program},
-for an @command{awk} program that extracts these data files from
-@file{gawk.texi}, the (generated) Texinfo source file for this Info file.
-@end ifinfo
+The sample files are included in the @command{gawk} distribution,
+in the directory @file{awklib/eg/data}.
@node Very Simple
@section Some Simple Examples
@@ -3050,7 +3046,7 @@ easier to maintain and usually run more efficiently.
@node Invoking Gawk
@chapter Running @command{awk} and @command{gawk}
-This @value{CHAPTER} covers how to run awk, both POSIX-standard
+This @value{CHAPTER} covers how to run @command{awk}, both POSIX-standard
and @command{gawk}-specific command-line options, and what
@command{awk} and
@command{gawk} do with non-option arguments.
@@ -3107,7 +3103,7 @@ It is possible to invoke @command{awk} with an empty program:
awk '' datafile1 datafile2
@end example
-@cindex @code{--lint} option
+@cindex @option{--lint} option
@noindent
Doing so makes little sense, though; @command{awk} exits
silently when given an empty program.
@@ -3147,43 +3143,27 @@ The following list describes options mandated by the POSIX standard:
@table @code
@item -F @var{fs}
@itemx --field-separator @var{fs}
-@cindex @code{-F} option
-@cindex @code{--field-separator} option
+@cindex @option{-F} option
+@cindex @option{--field-separator} option
@cindex @code{FS} variable, @code{--field-separator} option and
Set the @code{FS} variable to @var{fs}
(@pxref{Field Separators}).
@item -f @var{source-file}
@itemx --file @var{source-file}
-@cindex @code{-f} option
-@cindex @code{--file} option
+@cindex @option{-f} option
+@cindex @option{--file} option
@cindex @command{awk} programs, location of
Read @command{awk} program source from @var{source-file}
instead of in the first non-option argument.
This option may be given multiple times; the @command{awk}
-program consists of the concatenation the contents of
+program consists of the concatenation of the contents of
each specified @var{source-file}.
-@item -i @var{source-file}
-@itemx --include @var{source-file}
-@cindex @code{-i} option
-@cindex @code{--include} option
-@cindex @command{awk} programs, location of
-Read @command{awk} source library from @var{source-file}. This option is
-completely equivalent to using the @samp{@@include} directive inside
-your program. This option is very
-similar to the @option{-f} option, but there are two important differences.
-First, when @option{-i} is used, the program source will not be loaded if it has
-been previously loaded, whereas the @option{-f} will always load the file.
-Second, because this option is intended to be used with code libraries,
-@command{gawk} does not recognize such files as constituting main program
-input. Thus, after processing an @option{-i} argument, @command{gawk} still expects to
-find the main source code via the @option{-f} option or on the command-line.
-
@item -v @var{var}=@var{val}
@itemx --assign @var{var}=@var{val}
-@cindex @code{-v} option
-@cindex @code{--assign} option
+@cindex @option{-v} option
+@cindex @option{--assign} option
@cindex variables, setting
Set the variable @var{var} to the value @var{val} @emph{before}
execution of the program begins. Such variable values are available
@@ -3204,7 +3184,7 @@ predefined value you may have given.
@end quotation
@item -W @var{gawk-opt}
-@cindex @code{-W} option
+@cindex @option{-W} option
Provide an implementation-specific option.
This is the POSIX convention for providing implementation-specific options.
These options
@@ -3237,8 +3217,8 @@ The following list describes @command{gawk}-specific options:
@table @code
@item -b
@itemx --characters-as-bytes
-@cindex @code{-b} option
-@cindex @code{--characters-as-bytes} option
+@cindex @option{-b} option
+@cindex @option{--characters-as-bytes} option
Cause @command{gawk} to treat all input data as single-byte characters.
In addition, all output written with @code{print} or @code{printf}
are treated as single-byte characters.
@@ -3252,8 +3232,8 @@ multibyte characters. This option is an easy way to tell @command{gawk}:
@item -c
@itemx --traditional
-@cindex @code{--c} option
-@cindex @code{--traditional} option
+@cindex @option{-c} option
+@cindex @option{--traditional} option
@cindex compatibility mode (@command{gawk}), specifying
Specify @dfn{compatibility mode}, in which the GNU extensions to
the @command{awk} language are disabled, so that @command{gawk} behaves just
@@ -3264,17 +3244,17 @@ which summarizes the extensions. Also see
@item -C
@itemx --copyright
-@cindex @code{-C} option
-@cindex @code{--copyright} option
+@cindex @option{-C} option
+@cindex @option{--copyright} option
@cindex GPL (General Public License), printing
Print the short version of the General Public License and then exit.
@item -d@r{[}@var{file}@r{]}
@itemx --dump-variables@r{[}=@var{file}@r{]}
-@cindex @code{-d} option
-@cindex @code{--dump-variables} option
-@cindex @code{awkvars.out} file
-@cindex files, @code{awkvars.out}
+@cindex @option{-d} option
+@cindex @option{--dump-variables} option
+@cindex @file{awkvars.out} file
+@cindex files, @file{awkvars.out}
@cindex variables, global, printing list of
Print a sorted list of global variables, their types, and final values
to @var{file}. If no @var{file} is provided, print this
@@ -3293,8 +3273,8 @@ names like @code{i}, @code{j}, etc.)
@item -D@r{[}@var{file}@r{]}
@itemx --debug=@r{[}@var{file}@r{]}
-@cindex @code{-D} option
-@cindex @code{--debug} option
+@cindex @option{-D} option
+@cindex @option{--debug} option
@cindex @command{awk} debugging, enabling
Enable debugging of @command{awk} programs
(@pxref{Debugging}).
@@ -3306,8 +3286,8 @@ No space is allowed between the @option{-D} and @var{file}, if
@item -e @var{program-text}
@itemx --source @var{program-text}
-@cindex @code{-e} option
-@cindex @code{--source} option
+@cindex @option{-e} option
+@cindex @option{--source} option
@cindex source code, mixing
Provide program source code in the @var{program-text}.
This option allows you to mix source code in files with source
@@ -3318,8 +3298,8 @@ programs (@pxref{AWKPATH Variable}).
@item -E @var{file}
@itemx --exec @var{file}
-@cindex @code{-E} option
-@cindex @code{--exec} option
+@cindex @option{-E} option
+@cindex @option{--exec} option
@cindex @command{awk} programs, location of
@cindex CGI, @command{awk} scripts for
Similar to @option{-f}, read @command{awk} program text from @var{file}.
@@ -3349,8 +3329,8 @@ with @samp{#!} scripts (@pxref{Executable Scripts}), like so:
@item -g
@itemx --gen-pot
-@cindex @code{-g} option
-@cindex @code{--gen-pot} option
+@cindex @option{-g} option
+@cindex @option{--gen-pot} option
@cindex portable object files, generating
@cindex files, portable object, generating
Analyze the source program and
@@ -3361,18 +3341,34 @@ for information about this option.
@item -h
@itemx --help
-@cindex @code{-h} option
-@cindex @code{--help} option
+@cindex @option{-h} option
+@cindex @option{--help} option
@cindex GNU long options, printing list of
@cindex options, printing list of
@cindex printing, list of options
Print a ``usage'' message summarizing the short and long style options
that @command{gawk} accepts and then exit.
+@item -i @var{source-file}
+@itemx --include @var{source-file}
+@cindex @option{-i} option
+@cindex @option{--include} option
+@cindex @command{awk} programs, location of
+Read @command{awk} source library from @var{source-file}. This option is
+completely equivalent to using the @samp{@@include} directive inside
+your program. This option is very
+similar to the @option{-f} option, but there are two important differences.
+First, when @option{-i} is used, the program source will not be loaded if it has
+been previously loaded, whereas the @option{-f} will always load the file.
+Second, because this option is intended to be used with code libraries,
+@command{gawk} does not recognize such files as constituting main program
+input. Thus, after processing an @option{-i} argument, @command{gawk} still expects to
+find the main source code via the @option{-f} option or on the command-line.
+
@item -l @var{lib}
@itemx --load @var{lib}
-@cindex @code{-l} option
-@cindex @code{--load} option
+@cindex @option{-l} option
+@cindex @option{--load} option
@cindex loading, library
Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH}
environment variable. The correct library suffix for your platform will be
@@ -3383,8 +3379,8 @@ a shared library.
@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
-@cindex @code{-l} option
-@cindex @code{--lint} option
+@cindex @option{-l} option
+@cindex @option{--lint} option
@cindex lint checking, issuing warnings
@cindex warnings, issuing
Warn about constructs that are dubious or nonportable to
@@ -3406,16 +3402,16 @@ care to search for all occurrences of each inappropriate construct. As
@item -M
@itemx --bignum
-@cindex @code{-M} option
-@cindex @code{--bignum} option
+@cindex @option{-M} option
+@cindex @option{--bignum} option
Force arbitrary precision arithmetic on numbers. This option has no effect
if @command{gawk} is not compiled to use the GNU MPFR and MP libraries
(@pxref{Arbitrary Precision Arithmetic}).
@item -n
@itemx --non-decimal-data
-@cindex @code{-n} option
-@cindex @code{--non-decimal-data} option
+@cindex @option{-n} option
+@cindex @option{--non-decimal-data} option
@cindex hexadecimal values@comma{} enabling interpretation of
@cindex octal values@comma{} enabling interpretation of
@cindex troubleshooting, @code{--non-decimal-data} option
@@ -3430,15 +3426,15 @@ Use with care.
@item -N
@itemx --use-lc-numeric
-@cindex @code{-N} option
-@cindex @code{--use-lc-numeric} option
+@cindex @option{-N} option
+@cindex @option{--use-lc-numeric} option
Force the use of the locale's decimal point character
when parsing numeric input data (@pxref{Locales}).
@item -o@r{[}@var{file}@r{]}
@itemx --pretty-print@r{[}=@var{file}@r{]}
-@cindex @code{-o} option
-@cindex @code{--pretty-print} option
+@cindex @option{-o} option
+@cindex @option{--pretty-print} option
Enable pretty-printing of @command{awk} programs.
By default, output program is created in a file named @file{awkprof.out}.
The optional @var{file} argument allows you to specify a different
@@ -3448,16 +3444,16 @@ No space is allowed between the @option{-o} and @var{file}, if
@item -O
@itemx --optimize
-@cindex @code{--optimize} option
-@cindex @code{-O} option
+@cindex @option{--optimize} option
+@cindex @option{-O} option
Enable some optimizations on the internal representation of the program.
At the moment this includes just simple constant folding. The @command{gawk}
maintainer hopes to add more optimizations over time.
@item -p@r{[}@var{file}@r{]}
@itemx --profile@r{[}=@var{file}@r{]}
-@cindex @code{-p} option
-@cindex @code{--profile} option
+@cindex @option{-p} option
+@cindex @option{--profile} option
@cindex @command{awk} profiling, enabling
Enable profiling of @command{awk} programs
(@pxref{Profiling}).
@@ -3472,8 +3468,8 @@ in the left margin, and function call counts for each function.
@item -P
@itemx --posix
-@cindex @code{-P} option
-@cindex @code{--posix} option
+@cindex @option{-P} option
+@cindex @option{--posix} option
@cindex POSIX mode
@cindex @command{gawk}, extensions@comma{} disabling
Operate in strict POSIX mode. This disables all @command{gawk}
@@ -3514,16 +3510,16 @@ data (@pxref{Locales}).
@c @cindex automatic warnings
@c @cindex warnings, automatic
-@cindex @code{--traditional} option, @code{--posix} option and
-@cindex @code{--posix} option, @code{--traditional} option and
+@cindex @option{--traditional} option, @code{--posix} option and
+@cindex @option{--posix} option, @code{--traditional} option and
If you supply both @option{--traditional} and @option{--posix} on the
command line, @option{--posix} takes precedence. @command{gawk}
also issues a warning if both options are supplied.
@item -r
@itemx --re-interval
-@cindex @code{-r} option
-@cindex @code{--re-interval} option
+@cindex @option{-r} option
+@cindex @option{--re-interval} option
@cindex regular expressions, interval expressions and
Allow interval expressions
(@pxref{Regexp Operators})
@@ -3534,8 +3530,8 @@ and for use in combination with the @option{--traditional} option.
@item -S
@itemx --sandbox
-@cindex @code{-S} option
-@cindex @code{--sandbox} option
+@cindex @option{-S} option
+@cindex @option{--sandbox} option
@cindex sandbox mode
Disable the @code{system()} function,
input redirections with @code{getline},
@@ -3547,16 +3543,16 @@ can't access your system (other than the specified input data file).
@item -t
@itemx --lint-old
-@cindex @code{--L} option
-@cindex @code{--lint-old} option
+@cindex @option{-L} option
+@cindex @option{--lint-old} option
Warn about constructs that are not available in the original version of
@command{awk} from Version 7 Unix
(@pxref{V7/SVR3.1}).
@item -V
@itemx --version
-@cindex @code{-V} option
-@cindex @code{--version} option
+@cindex @option{-V} option
+@cindex @option{--version} option
@cindex @command{gawk}, versions of, information about@comma{} printing
Print version information for this particular copy of @command{gawk}.
This allows you to determine if your copy of @command{gawk} is up to date
@@ -3570,14 +3566,14 @@ As long as program text has been supplied,
any other options are flagged as invalid with a warning message but
are otherwise ignored.
-@cindex @code{-F} option, @code{-Ft} sets @code{FS} to TAB
+@cindex @option{-F} option, @option{-Ft} sets @code{FS} to TAB
In compatibility mode, as a special case, if the value of @var{fs} supplied
to the @option{-F} option is @samp{t}, then @code{FS} is set to the TAB
character (@code{"\t"}). This is true only for @option{--traditional} and not
for @option{--posix}
(@pxref{Field Separators}).
-@cindex @code{-f} option, multiple uses
+@cindex @option{-f} option, multiple uses
The @option{-f} option may be used more than once on the command line.
If it is, @command{awk} reads its program source from all of the named files, as
if they had been concatenated together into one big file. This is
@@ -3604,7 +3600,7 @@ and library source code
(@pxref{AWKPATH Variable}).
The @option{--source} option may also be used multiple times on the command line.
-@cindex @code{--source} option
+@cindex @option{--source} option
If no @option{-f} or @option{--source} option is specified, then @command{gawk}
uses the first non-option command-line argument as the text of the
program source code.
@@ -4894,8 +4890,8 @@ These sequences are:
@item Collating symbols
Multicharacter collating elements enclosed between
@samp{[.} and @samp{.]}. For example, if @samp{ch} is a collating element,
-then @code{[[.ch.]]} is a regexp that matches this collating element, whereas
-@code{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
+then @samp{[[.ch.]]} is a regexp that matches this collating element, whereas
+@samp{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
@cindex bracket expressions, equivalence classes
@item Equivalence classes
@@ -4903,7 +4899,7 @@ Locale-specific names for a list of
characters that are equal. The name is enclosed between
@samp{[=} and @samp{=]}.
For example, the name @samp{e} might be used to represent all of
-``e,'' ``@`e,'' and ``@'e.'' In this case, @code{[[=e=]]} is a regexp
+``e,'' ``@`e,'' and ``@'e.'' In this case, @samp{[[=e=]]} is a regexp
that matches any of @samp{e}, @samp{@'e}, or @samp{@`e}.
@end table
@@ -4947,7 +4943,7 @@ or underscores (@samp{_}):
@item \s
Matches any whitespace character.
Think of it as shorthand for
-@w{@code{[[:space:]]}}.
+@w{@samp{[[:space:]]}}.
@c @cindex operators, @code{\S} (@command{gawk})
@cindex backslash (@code{\}), @code{\S} operator (@command{gawk})
@@ -4955,7 +4951,7 @@ Think of it as shorthand for
@item \S
Matches any character that is not whitespace.
Think of it as shorthand for
-@w{@code{[^[:space:]]}}.
+@w{@samp{[^[:space:]]}}.
@c @cindex operators, @code{\w} (@command{gawk})
@cindex backslash (@code{\}), @code{\w} operator (@command{gawk})
@@ -4963,7 +4959,7 @@ Think of it as shorthand for
@item \w
Matches any word-constituent character---that is, it matches any
letter, digit, or underscore. Think of it as shorthand for
-@w{@code{[[:alnum:]_]}}.
+@w{@samp{[[:alnum:]_]}}.
@c @cindex operators, @code{\W} (@command{gawk})
@cindex backslash (@code{\}), @code{\W} operator (@command{gawk})
@@ -4971,7 +4967,7 @@ letter, digit, or underscore. Think of it as shorthand for
@item \W
Matches any character that is not word-constituent.
Think of it as shorthand for
-@w{@code{[^[:alnum:]_]}}.
+@w{@samp{[^[:alnum:]_]}}.
@c @cindex operators, @code{\<} (@command{gawk})
@cindex backslash (@code{\}), @code{\<} operator (@command{gawk})
@@ -5082,7 +5078,7 @@ are allowed.
@item @code{--traditional}
Traditional Unix @command{awk} regexps are matched. The GNU operators
are not special, and interval expressions are not available.
-The POSIX character classes (@code{[[:alnum:]]}, etc.) are supported,
+The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported,
as Brian Kernighan's @command{awk} does support them.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regexp metacharacters.
@@ -5659,20 +5655,26 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
@sc{nul} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
@end sidebar
@c ENDOFRANGE inspl
@c ENDOFRANGE recspl
@@ -6283,7 +6285,7 @@ behaves this way.
@node Command Line Field Separator
@subsection Setting @code{FS} from the Command Line
-@cindex @code{-F} option
+@cindex @option{-F} option
@cindex options, command-line
@cindex command line, options
@cindex field separators, on command line
@@ -6523,19 +6525,11 @@ will take effect.
@node Constant Size
@section Reading Fixed-Width Data
-@ifnotinfo
@quotation NOTE
This @value{SECTION} discusses an advanced
feature of @command{gawk}. If you are a novice @command{awk} user,
you might want to skip it on the first reading.
@end quotation
-@end ifnotinfo
-
-@ifinfo
-(This @value{SECTION} discusses an advanced feature of @command{awk}.
-If you are a novice @command{awk} user, you might want to skip it on
-the first reading.)
-@end ifinfo
@cindex data, fixed-width
@cindex fixed-width data
@@ -6665,19 +6659,11 @@ for an example of such a function).
@node Splitting By Content
@section Defining Fields By Content
-@ifnotinfo
@quotation NOTE
This @value{SECTION} discusses an advanced
feature of @command{gawk}. If you are a novice @command{awk} user,
you might want to skip it on the first reading.
@end quotation
-@end ifnotinfo
-
-@ifinfo
-(This @value{SECTION} discusses an advanced feature of @command{awk}.
-If you are a novice @command{awk} user, you might want to skip it on
-the first reading.)
-@end ifinfo
@cindex advanced features, specifying field content
Normally, when using @code{FS}, @command{gawk} defines the fields as the
@@ -6974,6 +6960,7 @@ then @command{gawk} sets @code{RT} to the null string.
@c STARTOFRANGE getl
@cindex @code{getline} command, explicit input with
+@c STARTOFRANGE inex
@cindex input, explicit
So far we have been getting our input data from @command{awk}'s main
input stream---either the standard input (usually your terminal, sometimes
@@ -6993,7 +6980,7 @@ rest of this @value{DOCUMENT} and have a good knowledge of how @command{awk} wor
@cindex @code{ERRNO} variable
@cindex differences in @command{awk} and @command{gawk}, @code{getline} command
@cindex @code{getline} command, return values
-@cindex @code{--sandbox} option, input redirection with @command{getline}
+@cindex @option{--sandbox} option, input redirection with @code{getline}
The @code{getline} command returns one if it finds a record and zero if
it encounters the end of the file. If there is some error in getting
@@ -8445,9 +8432,11 @@ on the @code{print} statement
@node Redirection
@section Redirecting Output of @code{print} and @code{printf}
+@c STARTOFRANGE outre
@cindex output redirection
+@c STARTOFRANGE reout
@cindex redirection of output
-@cindex @code{--sandbox} option, output redirection with @code{print}, @code{printf}
+@cindex @option{--sandbox} option, output redirection with @code{print}, @code{printf}
So far, the output from @code{print} and @code{printf} has gone
to the standard
output, usually the screen. Both @code{print} and @code{printf} can
@@ -8464,8 +8453,8 @@ Redirections in @command{awk} are written just like redirections in shell
commands, except that they are written inside the @command{awk} program.
@c the commas here are part of the see also
-@cindex @code{print} statement, See Also redirection, of output
-@cindex @code{printf} statement, See Also redirection, of output
+@cindex @code{print} statement, See Also redirection@comma{} of output
+@cindex @code{printf} statement, See Also redirection@comma{} of output
There are four forms of output redirection: output to a file, output
appended to a file, output through a pipe to another command, and output
to a coprocess. They are all shown for the @code{print} statement,
@@ -9114,6 +9103,8 @@ which provide the values used in expressions.
@node Constants
@subsection Constant Expressions
+
+@c STARTOFRANGE cnst
@cindex constants, types of
The simplest type of expression is the @dfn{constant}, which always has
@@ -9459,7 +9450,7 @@ Such an assignment has the following form:
@var{variable}=@var{text}
@end example
-@cindex @code{-v} option
+@cindex @option{-v} option
@noindent
With it, a variable is set either at the beginning of the
@command{awk} run or in between input files.
@@ -9617,7 +9608,7 @@ point when reading the @command{awk} program source code, and for command-line
variable assignments (@pxref{Other Arguments}).
However, when interpreting input data, for @code{print} and @code{printf} output,
and for number to string conversion, the local decimal point character is used.
-@value{DARKCORNER}.
+@value{DARKCORNER}
Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
@@ -10236,6 +10227,7 @@ just like variables. (Use @samp{$(i++)} when you want to do a field reference
and a variable increment at the same time. The parentheses are necessary
because of the precedence of the field reference operator @samp{$}.)
+@c STARTOFRANGE deop
@cindex decrement operators
The decrement operator @samp{--} works just like @samp{++}, except that
it subtracts one instead of adding it. As with @samp{++}, it can be used before
@@ -10654,7 +10646,7 @@ string comparison (true)
string comparison (true)
@item a = 2; b = " +2"
-@item a == b
+@itemx a == b
string comparison (false)
@end table
@@ -13147,13 +13139,7 @@ The number of fields in the current input record.
@code{NF} is set each time a new record is read, when a new field is
created or when @code{$0} changes (@pxref{Fields}).
-Unlike most of the variables described in this
-@ifnotinfo
-section,
-@end ifnotinfo
-@ifinfo
-node,
-@end ifinfo
+Unlike most of the variables described in this @value{SUBSECTION},
assigning a value to @code{NF} has the potential to affect
@command{awk}'s internal workings. In particular, assignments
to @code{NF} can be used to create or remove fields from the
@@ -16138,7 +16124,7 @@ close("/bin/sh")
@noindent
@cindex troubleshooting, @code{system()} function
-@cindex @code{--sandbox} option, disabling @code{system()} function
+@cindex @option{--sandbox} option, disabling @code{system()} function
However, if your @command{awk}
program is interactive, @code{system()} is useful for running large
self-contained programs, such as a shell or an editor.
@@ -18236,7 +18222,7 @@ The leading capital letter indicates that it is global, while the fact that
the variable name is not all capital letters indicates that the variable is
not one of @command{awk}'s built-in variables, such as @code{FS}.
-@cindex @code{--dump-variables} option
+@cindex @option{--dump-variables} option
It is also important that @emph{all} variables in library
functions that do not need to save state are, in fact, declared
local.@footnote{@command{gawk}'s @option{--dump-variables} command-line
@@ -18696,7 +18682,7 @@ function _ord_init( low, high, i, t)
@cindex ASCII
@cindex EBCDIC
@cindex mark parity
-Some explanation of the numbers used by @code{chr} is worthwhile.
+Some explanation of the numbers used by @code{chr()} is worthwhile.
The most prominent character set in use today is ASCII.@footnote{This
is changing; many systems use Unicode, a very large character set
that includes ASCII as a subset. On systems with full Unicode support,
@@ -19773,7 +19759,7 @@ use @code{getopt()} to process their arguments.
@c STARTOFRANGE libfudata
@cindex libraries of @command{awk} functions, user database, reading
@c STARTOFRANGE flibudata
-@cindex functions, library, user database, reading
+@cindex functions, library, user database@comma{} reading
@c STARTOFRANGE udatar
@cindex user database@comma{} reading
@c STARTOFRANGE dataur
@@ -20141,7 +20127,7 @@ uses these functions.
@c STARTOFRANGE libfgdata
@cindex libraries of @command{awk} functions, group database, reading
@c STARTOFRANGE flibgdata
-@cindex functions, library, group database, reading
+@cindex functions, library, group database@comma{} reading
@c STARTOFRANGE gdatar
@cindex group database, reading
@c STARTOFRANGE datagr
@@ -22280,6 +22266,32 @@ word, comparing it to the previous one:
@i{Nothing cures insomnia like a ringing alarm clock.}
@author Arnold Robbins
@end quotation
+@cindex Quanstrom, Erik
+@ignore
+Date: Sat, 15 Feb 2014 16:47:09 -0500
+Subject: Re: 9atom install question
+Message-ID: <l2jcvx6j6mey60xnrkb0hhob.1392500829294@email.android.com>
+From: Erik Quanstrom <quanstro@quanstro.net>
+To: Aharon Robbins <arnold@skeeve.com>
+
+yes.
+
+- erik
+
+Aharon Robbins <arnold@skeeve.com> wrote:
+
+>> sleep is for web developers.
+>
+>Can I quote you, in the gawk manual?
+>
+>Thanks,
+>
+>Arnold
+@end ignore
+@quotation
+@i{Sleep is for web developers.}
+@author Erik Quanstrom
+@end quotation
@c STARTOFRANGE tialarm
@cindex time, alarm clock example program
@@ -22947,7 +22959,8 @@ printed and online documentation.
@ifnotinfo
Texinfo is fully documented in the book
@cite{Texinfo---The GNU Documentation Format},
-available from the Free Software Foundation.
+available from the Free Software Foundation,
+and also available @uref{http://www.gnu.org/software/texinfo/manual/texinfo/, online}.
@end ifnotinfo
@ifinfo
The Texinfo language is described fully, starting with
@@ -24080,7 +24093,7 @@ It contains the following chapters:
@node Advanced Features
@chapter Advanced Features of @command{gawk}
-@cindex advanced features, network connections, See Also networks, connections
+@cindex advanced features, network connections, See Also networks@comma{} connections
@c STARTOFRANGE gawadv
@cindex @command{gawk}, features, advanced
@c STARTOFRANGE advgaw
@@ -24146,7 +24159,7 @@ discusses the ability to dynamically add new built-in functions to
@node Nondecimal Data
@section Allowing Nondecimal Input Data
-@cindex @code{--non-decimal-data} option
+@cindex @option{--non-decimal-data} option
@cindex advanced features, nondecimal input data
@cindex input, data@comma{} nondecimal
@cindex constants, nondecimal
@@ -24190,7 +24203,7 @@ using this facility could lead to surprising results, the default is to leave it
disabled. If you want it, you must explicitly request it.
@cindex programming conventions, @code{--non-decimal-data} option
-@cindex @code{--non-decimal-data} option, @code{strtonum()} function and
+@cindex @option{--non-decimal-data} option, @code{strtonum()} function and
@cindex @code{strtonum()} function (@command{gawk}), @code{--non-decimal-data} option and
@quotation CAUTION
@emph{Use of this option is not recommended.}
@@ -24898,7 +24911,7 @@ When @command{gawk} has finished running, it creates a profile of your program i
named @file{awkprof.out}. Because it is profiling, it also executes up to 45% slower than
@command{gawk} normally does.
-@cindex @code{--profile} option
+@cindex @option{--profile} option
As shown in the following example,
the @option{--profile} option can be used to change the name of the file
where @command{gawk} will write the profile:
@@ -25617,13 +25630,13 @@ is covered.
@subsection Extracting Marked Strings
@cindex strings, extracting
@cindex marked strings@comma{} extracting
-@cindex @code{--gen-pot} option
+@cindex @option{--gen-pot} option
@cindex command-line options, string extraction
@cindex string extraction (internationalization)
@cindex marked string extraction (internationalization)
@cindex extraction, of marked strings (internationalization)
-@cindex @code{--gen-pot} option
+@cindex @option{--gen-pot} option
Once your @command{awk} program is working, and all the strings have
been marked and you've set (and perhaps bound) the text domain,
it is time to produce translations.
@@ -28820,9 +28833,9 @@ certain fields in the API data structures unwritable from extension code,
while allowing @command{gawk} to use them as it needs to.
@item typedef enum awk_bool @{
-@item @ @ @ @ awk_false = 0,
-@item @ @ @ @ awk_true
-@item @} awk_bool_t;
+@itemx @ @ @ @ awk_false = 0,
+@itemx @ @ @ @ awk_true
+@itemx @} awk_bool_t;
A simple boolean type.
@item typedef struct awk_string @{
@@ -31409,14 +31422,14 @@ The usage is:
@item @@load "filefuncs"
This is how you load the extension.
-@cindex @code{chdir} extension function
+@cindex @code{chdir()} extension function
@item result = chdir("/some/directory")
The @code{chdir()} function is a direct hook to the @code{chdir()}
system call to change the current directory. It returns zero
upon success or less than zero upon error. In the latter case it updates
@code{ERRNO}.
-@cindex @code{stat} extension function
+@cindex @code{stat()} extension function
@item result = stat("/some/path", statdata [, follow])
The @code{stat()} function provides a hook into the
@code{stat()} system call.
@@ -31506,7 +31519,7 @@ or
Not all systems support all file types.
@end multitable
-@cindex @code{fts} extension function
+@cindex @code{fts()} extension function
@item flags = or(FTS_PHYSICAL, ...)
@itemx result = fts(pathlist, flags, filedata)
Walk the file trees provided in @code{pathlist} and fill in the
@@ -31627,7 +31640,7 @@ See @file{test/fts.awk} in the @command{gawk} distribution for an example.
@node Extension Sample Fnmatch
@subsection Interface To @code{fnmatch()}
-@cindex @code{fnmatch} extension function
+@cindex @code{fnmatch()} extension function
This extension provides an interface to the C library
@code{fnmatch()} function. The usage is:
@@ -31700,7 +31713,7 @@ The @code{fork} extension adds three functions, as follows.
@item @@load "fork"
This is how you load the extension.
-@cindex @code{fork} extension function
+@cindex @code{fork()} extension function
@item pid = fork()
This function creates a new process. The return value is the zero in the
child and the process-id number of the child in the parent, or @minus{}1
@@ -31708,13 +31721,13 @@ upon error. In the latter case, @code{ERRNO} indicates the problem.
In the child, @code{PROCINFO["pid"]} and @code{PROCINFO["ppid"]} are
updated to reflect the correct values.
-@cindex @code{waitpid} extension function
+@cindex @code{waitpid()} extension function
@item ret = waitpid(pid)
This function takes a numeric argument, which is the process-id to
wait for. The return value is that of the
@code{waitpid()} system call.
-@cindex @code{wait} extension function
+@cindex @code{wait()} extension function
@item ret = wait()
This function waits for the first child to die.
The return value is that of the
@@ -31801,11 +31814,11 @@ The @code{ordchr} extension adds two functions, named
@item @@load "ordchr"
This is how you load the extension.
-@cindex @code{ord} extension function
+@cindex @code{ord()} extension function
@item number = ord(string)
Return the numeric value of the first character in @code{string}.
-@cindex @code{chr} extension function
+@cindex @code{chr()} extension function
@item char = chr(number)
Return a string whose first character is that represented by @code{number}.
@end table
@@ -31922,14 +31935,14 @@ The @code{rwarray} extension adds two functions,
named @code{writea()} and @code{reada()}, as follows:
@table @code
-@cindex @code{writea} extension function
+@cindex @code{writea()} extension function
@item ret = writea(file, array)
This function takes a string argument, which is the name of the file
to which dump the array, and the array itself as the second argument.
@code{writea()} understands multidimensional arrays. It returns one on
success, or zero upon failure.
-@cindex @code{reada} extension function
+@cindex @code{reada()} extension function
@item ret = reada(file, array)
@code{reada()} is the inverse of @code{writea()};
it reads the file named as its first argument, filling in
@@ -31972,7 +31985,7 @@ named @code{readfile()}:
@item @@load "readfile"
This is how you load the extension.
-@cindex @code{readfile} extension function
+@cindex @code{readfile()} extension function
@item result = readfile("/some/path")
The argument is the name of the file to read. The return value is a
string containing the entire contents of the requested file. Upon error,
@@ -32013,7 +32026,7 @@ inserting @samp{@@load "time"} in your script.
@item @@load "time"
This is how you load the extension.
-@cindex @code{gettimeofday} extension function
+@cindex @code{gettimeofday()} extension function
@item the_time = gettimeofday()
Return the time in seconds that has elapsed since 1970-01-01 UTC as a
floating point value. If the time is unavailable on this platform, return
@@ -32023,7 +32036,7 @@ If the standard C @code{gettimeofday()} system call is available on this
platform, then it simply returns the value. Otherwise, if on Windows,
it tries to use @code{GetSystemTimeAsFileTime()}.
-@cindex @code{sleep} extension function
+@cindex @code{sleep()} extension function
@item result = sleep(@var{seconds})
Attempt to sleep for @var{seconds} seconds. If @var{seconds} is negative,
or the attempt to sleep fails, return @minus{}1 and set @code{ERRNO}.
@@ -32182,6 +32195,7 @@ of the @value{DOCUMENT} where you can find more information.
@command{awk}.
* POSIX/GNU:: The extensions in @command{gawk} not in POSIX
@command{awk}.
+* Feature History:: The history of the features in @command{gawk}.
* Common Extensions:: Common Extensions Summary.
* Ranges and Locales:: How locales used to affect regexp ranges.
* Contributors:: The major contributors to @command{gawk}.
@@ -32760,6 +32774,612 @@ GCC for VAX and Alpha has not been tested for a while.
@c ENDOFRANGE exgnot
@c ENDOFRANGE posnot
+@node Feature History
+@appendixsec History of @command{gawk} Features
+
+@ignore
+See the thread:
+https://groups.google.com/forum/#!topic/comp.lang.awk/SAUiRuff30c
+This motivated me to add this section.
+@end ignore
+
+@ignore
+I've tried to follow this general order, esp.@: for the 3.0 and 3.1 sections:
+ variables
+ special files
+ language changes (e.g., hex constants)
+ differences in standard awk functions
+ new gawk functions
+ new keywords
+ new command-line options
+ behavioral changes
+ new ports
+Within each category, be alphabetical.
+@end ignore
+
+This @value{SECTION} describes the features in @command{gawk}
+over and above those in POSIX @command{awk},
+in the order they were added to @command{gawk}.
+
+Version 2.10 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+The @env{AWKPATH} environment variable for specifying a path search for
+the @option{-f} command-line option
+(@pxref{Options}).
+
+@item
+The @code{IGNORECASE} variable and its effects
+(@pxref{Case-sensitivity}).
+
+@item
+The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and
+@file{/dev/fd/@var{N}} special file names
+(@pxref{Special Files}).
+@end itemize
+
+Version 2.13 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+The @code{FIELDWIDTHS} variable and its effects
+(@pxref{Constant Size}).
+
+@item
+The @code{systime()} and @code{strftime()} built-in functions for obtaining
+and printing timestamps
+(@pxref{Time Functions}).
+
+@item
+Additional command-line options
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-W lint} option to provide error and portability checking
+for both the source code and at runtime.
+
+@item
+The @option{-W compat} option to turn off the GNU extensions.
+
+@item
+The @option{-W posix} option for full POSIX compliance.
+@end itemize
+@end itemize
+
+Version 2.14 of @command{gawk} introduced the following feature:
+
+@itemize @bullet
+@item
+The @code{next file} statement for skipping to the next data file
+(@pxref{Nextfile Statement}).
+@end itemize
+
+Version 2.15 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New variables (@pxref{Built-in Variables}):
+
+@itemize @minus
+@item
+@code{ARGIND}, which tracks the movement of @code{FILENAME}
+through @code{ARGV}.
+
+@item
+@code{ERRNO}, which contains the system error message when
+@code{getline} returns @minus{}1 or @code{close()} fails.
+@end itemize
+
+@item
+The @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}, and
+@file{/dev/user} special file names. These have since been removed.
+
+@item
+The ability to delete all of an array at once with @samp{delete @var{array}}
+(@pxref{Delete}).
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The ability to use GNU-style long-named options that start with @option{--}.
+
+@item
+The @option{--source} option for mixing command-line and library-file
+source code.
+@end itemize
+@end itemize
+
+Version 3.0 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New or changed variables:
+
+@itemize @minus
+@item
+@code{IGNORECASE} changed, now applying to string comparison as well
+as regexp operations
+(@pxref{Case-sensitivity}).
+
+@item
+@code{RT}, which contains the input text that matched @code{RS}
+(@pxref{Records}).
+@end itemize
+
+@item
+Full support for both POSIX and GNU regexps
+(@pxref{Regexp}).
+
+@item
+The @code{gensub()} function for more powerful text manipulation
+(@pxref{String Functions}).
+
+@item
+The @code{strftime()} function acquired a default time format,
+allowing it to be called with no arguments
+(@pxref{Time Functions}).
+
+@item
+The ability for @code{FS} and for the third
+argument to @code{split()} to be null strings
+(@pxref{Single Character Fields}).
+
+@item
+The ability for @code{RS} to be a regexp
+(@pxref{Records}).
+
+@item
+The @code{next file} statement became @code{nextfile}
+(@pxref{Nextfile Statement}).
+
+@item
+The @code{fflush()} function from the
+Bell Laboratories research version of @command{awk}
+(@pxref{I/O Functions}).
+
+@item
+New command line options:
+
+@itemize @minus
+@item
+The @option{--lint-old} option to
+warn about constructs that are not available in
+the original Version 7 Unix version of @command{awk}
+(@pxref{V7/SVR3.1}).
+
+@item
+The @option{-m} option from the
+Bell Laboratories research version of @command{awk}
+This was later removed.
+
+@item
+The @option{--re-interval} option to provide interval expressions in regexps
+(@pxref{Regexp Operators}).
+
+@item
+The @option{--traditional} option was added as a better name for
+@option{--compat} (@pxref{Options}).
+@end itemize
+
+@item
+The use of GNU Autoconf to control the configuration process
+(@pxref{Quick Installation}).
+
+@item
+Amiga support.
+
+@end itemize
+
+Version 3.1 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+@item
+New variables
+(@pxref{Built-in Variables}):
+
+@itemize @minus
+@item
+@code{BINMODE}, for non-POSIX systems,
+which allows binary I/O for input and/or output files
+(@pxref{PC Using}).
+
+@item
+@code{LINT}, which dynamically controls lint warnings.
+
+@item
+@code{PROCINFO}, an array for providing process-related information.
+
+@item
+@code{TEXTDOMAIN}, for setting an application's internationalization text domain
+(@pxref{Internationalization}).
+@end itemize
+
+@item
+The ability to use octal and hexadecimal constants in @command{awk}
+program source code
+(@pxref{Nondecimal-numbers}).
+
+@item
+The @samp{|&} operator for two-way I/O to a coprocess
+(@pxref{Two-way I/O}).
+
+@item
+The @file{/inet} special files for TCP/IP networking using @samp{|&}
+(@pxref{TCP/IP Networking}).
+
+@item
+The optional second argument to @code{close()} that allows closing one end
+of a two-way pipe to a coprocess
+(@pxref{Two-way I/O}).
+
+@item
+The optional third argument to the @code{match()} function
+for capturing text-matching subexpressions within a regexp
+(@pxref{String Functions}).
+
+@item
+Positional specifiers in @code{printf} formats for
+making translations easier
+(@pxref{Printf Ordering}).
+
+@item
+A number of new built-in functions:
+
+@itemize @minus
+@item
+The @code{asort()} and @code{asorti()} functions for sorting arrays
+(@pxref{Array Sorting}).
+
+@item
+The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions
+for internationalization
+(@pxref{Programmer i18n}).
+
+@item
+The @code{extension()} function and the ability to add
+new built-in functions dynamically
+(@pxref{Dynamic Extensions}).
+
+@item
+The @code{mktime()} function for creating timestamps
+(@pxref{Time Functions}).
+
+@item
+The @code{and()}, @code{or()}, @code{xor()}, @code{compl()},
+@code{lshift()}, @code{rshift()}, and @code{strtonum()} functions
+(@pxref{Bitwise Functions}).
+@end itemize
+
+@item
+@cindex @code{next file} statement
+The support for @samp{next file} as two words was removed completely
+(@pxref{Nextfile Statement}).
+
+@item
+Additional commnd line options
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{--dump-variables} option to print a list of all global variables.
+
+@item
+The @option{--exec} option, for use in CGI scripts.
+
+@item
+The @option{--gen-po} command-line option and the use of a leading
+underscore to mark strings that should be translated
+(@pxref{String Extraction}).
+
+@item
+The @option{--non-decimal-data} option to allow non-decimal
+input data
+(@pxref{Nondecimal Data}).
+
+@item
+The @option{--profile} option and @command{pgawk}, the
+profiling version of @command{gawk}, for producing execution
+profiles of @command{awk} programs
+(@pxref{Profiling}).
+
+@item
+The @option{--use-lc-numeric} option to force @command{gawk}
+to use the locale's decimal point for parsing input data
+(@pxref{Conversion}).
+@end itemize
+
+@item
+The use of GNU Automake to help in standardizing the configuration process
+(@pxref{Quick Installation}).
+
+@item
+The use of GNU @code{gettext} for @command{gawk}'s own message output
+(@pxref{Gawk I18N}).
+
+@item
+BeOS support. This was later removed.
+
+@item
+Tandem support. This was later removed.
+
+@item
+The Atari port became officially unsupported.
+
+@item
+The source code changed to use ISO C standard-style function definitions.
+
+@item
+POSIX compliance for @code{sub()} and @code{gsub()}
+(@pxref{Gory Details}).
+
+@item
+The @code{length()} function was extended to accept an array argument
+and return the number of elements in the array
+(@pxref{String Functions}).
+
+@item
+The @code{strftime()} function acquired a third argument to
+enable printing times as UTC
+(@pxref{Time Functions}).
+@end itemize
+
+Version 4.0 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+
+@item
+Variable additions:
+
+@itemize @minus
+@item
+@code{FPAT}, which allows you to specify a regexp that matches
+the fields, instead of matching the field separator
+(@pxref{Splitting By Content}).
+
+@item
+If @code{PROCINFO["sorted_in"]} exists, @samp{for(iggy in foo)} loops sort the
+indices before looping over them. The value of this element
+provides control over how the indices are sorted before the loop
+traversal starts
+(@pxref{Controlling Scanning}).
+
+@item
+@code{PROCINFO["strftime"]}, which holds
+the default format for @code{strftime()}
+(@pxref{Time Functions}).
+@end itemize
+
+@item
+The special files @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}
+and @file{/dev/user} were removed.
+
+@item
+Support for IPv6 was added via the @file{/inet6} special file.
+@file{/inet4} forces IPv4 and @file{/inet} chooses the system
+default, which is probably IPv4
+(@pxref{TCP/IP Networking}).
+
+@item
+The use of @samp{\s} and @samp{\S} escape sequences in regular expressions
+(@pxref{GNU Regexp Operators}).
+
+@item
+Interval expressions became part of default regular expressions
+(@pxref{Regexp Operators}).
+
+@item
+POSIX character classes work even with @option{--traditional}
+(@pxref{Regexp Operators}).
+
+@item
+@code{break} and @code{continue} became invalid outside a loop,
+even with @option{--traditional}
+(@pxref{Break Statement}, and also see
+@ref{Continue Statement}).
+
+@item
+@code{fflush()}, @code{nextfile}, and @samp{delete @var{array}}
+are allowed if @option{--posix} or @option{--traditional}, since they
+are all now part of POSIX.
+
+@item
+An optional third argument to
+@code{asort()} and @code{asorti()}, specifying how to sort
+(@pxref{String Functions}).
+
+@item
+The behavior of @code{fflush()} changed to match Brian Kernighan's @command{awk}
+and for POSIX; now both @samp{fflush()} and @samp{fflush("")}
+flush all open output redirections
+(@pxref{I/O Functions}).
+
+@item
+The @code{isarray()}
+function which distinguishes if an item is an array
+or not, to make it possible to traverse multidimensional arrays
+(@pxref{Type Functions}).
+
+@item
+The @code{patsplit()}
+function which gives the same capability as @code{FPAT}, for splitting
+(@pxref{String Functions}).
+
+@item
+An optional fourth argument to the @code{split()} function,
+which is an array to hold the values of the separators
+(@pxref{String Functions}).
+
+@item
+Arrays of arrays
+(@pxref{Arrays of Arrays}).
+
+@item
+The @code{BEGINFILE} and @code{ENDFILE} special patterns
+(@pxref{BEGINFILE/ENDFILE}).
+
+@item
+Indirect function calls
+(@pxref{Indirect Calls}).
+
+@item
+@code{switch} / @code{case} are enabled by default
+(@pxref{Switch Statement}).
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-b} and @option{--characters-as-bytes} options
+which prevent @command{gawk} from treating input as a multibyte string.
+
+@item
+The redundant @option{--compat}, @option{--copyleft}, and @option{--usage}
+long options were removed.
+
+@item
+The @option{--gen-po} option was finally renamed to the correct @option{--gen-pot}.
+
+@item
+The @option{--sandbox} option which disables certain features.
+
+@item
+All long options acquired corresponding short options, for use in @samp{#!} scripts.
+@end itemize
+
+@item
+Directories named on the command line now produce a warning, not a fatal
+error, unless @option{--posix} or @option{--traditional} are used
+(@pxref{Command line directories}).
+
+@item
+The @command{gawk} internals were rewritten, bringing the @command{dgawk}
+debugger and possibly improved performance
+(@pxref{Debugger}).
+
+@item
+Per the GNU Coding Standards, dynamic extensions must now define
+a global symbol indicating that they are GPL-compatible
+(@pxref{Plugin License}).
+
+@item
+In POSIX mode, string comparisons use @code{strcoll()} / @code{wcscoll()}
+(@pxref{POSIX String Comparison}).
+
+@item
+The option for raw sockets was removed, since it was never implemented
+(@pxref{TCP/IP Networking}).
+
+@item
+Ranges of the form @samp{[d-h]} are treated as if they were in the
+C locale, no matter what kind of regexp is being used, and even if
+@option{--posix}
+(@pxref{Ranges and Locales}).
+
+@item
+Support was removed for the following systems:
+
+@itemize @minus
+@item
+Atari
+
+@item
+Amiga
+
+@item
+BeOS
+
+@item
+Cray
+
+@item
+MIPS RiscOS
+
+@item
+MS-DOS with Microsoft Compiler
+
+@item
+MS-Windows with Microsoft Compiler
+
+@item
+NeXT
+
+@item
+SunOS 3.x, Sun 386 (Road Runner)
+
+@item
+Tandem (non-POSIX)
+
+@item
+Prestandard VAX C compiler for VAX/VMS
+@end itemize
+@end itemize
+
+Version 4.1 of @command{gawk} introduced the following features:
+
+@itemize @bullet
+
+@item
+Three new arrays:
+@code{SYMTAB}, @code{FUNCTAB}, and @code{PROCINFO["identifiers"]}
+(@pxref{Auto-set}).
+
+@item
+The three executables @command{gawk}, @command{pgawk}, and @command{dgawk}, were merged into
+one, named just @command{gawk}. As a result the command line options changed.
+
+@item
+Command line option changes
+(@pxref{Options}):
+
+@itemize @minus
+@item
+The @option{-D} option invokes the debugger.
+
+@item
+The @option{-i} and @option{--include} options
+load @command{awk} library files.
+
+@item
+The @option{-l} and @option{--load} options for load compiled dynamic extensions.
+
+@item
+The @option{-M} and @option{--bignum} options enable MPFR.
+
+@item
+The @option{-o} only does pretty-printing.
+
+@item
+The @option{-p} option is used for profiling.
+
+@item
+The @option{-R} option was removed.
+@end itemize
+
+@item
+Support for high precision arithmetic with MPFR.
+(@pxref{Gawk and MPFR}).
+
+@item
+The @code{and()}, @code{or()} and @code{xor()} functions
+allow any number of arguments,
+with a minimum of two
+(@pxref{Bitwise Functions}).
+
+@item
+The dynamic extension interface was completely redone
+(@pxref{Dynamic Extensions}).
+
+@end itemize
+
+@c XXX ADD MORE STUFF HERE
+
@node Common Extensions
@appendixsec Common Extensions Summary
@@ -32775,7 +33395,7 @@ the three most widely-used freely available versions of @command{awk}
@item @samp{\x} Escape sequence @tab X @tab X @tab X
@item @code{RS} as regexp @tab @tab X @tab X
@item @code{FS} as null string @tab X @tab X @tab X
-@item @file{/dev/stdin} special file @tab X @tab @tab X
+@item @file{/dev/stdin} special file @tab X @tab X @tab X
@item @file{/dev/stdout} special file @tab X @tab X @tab X
@item @file{/dev/stderr} special file @tab X @tab X @tab X
@item @code{**} and @code{**=} operators @tab X @tab @tab X
@@ -32783,7 +33403,7 @@ the three most widely-used freely available versions of @command{awk}
@item @code{func} keyword @tab X @tab @tab X
@item @code{nextfile} statement @tab X @tab X @tab X
@item @code{delete} without subscript @tab X @tab X @tab X
-@item @code{length()} of an array @tab X @tab @tab X
+@item @code{length()} of an array @tab X @tab X @tab X
@item @code{BINMODE} variable @tab @tab X @tab X
@item Time related functions @tab @tab X @tab X
@end multitable
@@ -32865,7 +33485,7 @@ When @command{gawk} switched to using locale-aware regexp matchers,
the problems began; especially as both GNU/Linux and commercial Unix
vendors started implementing non-ASCII locales, @emph{and making them
the default}. Perhaps the most frequently asked question became something
-like ``why does @code{[A-Z]} match lowercase letters?!?''
+like ``why does @samp{[A-Z]} match lowercase letters?!?''
This situation existed for close to 10 years, if not more, and
the @command{gawk} maintainer grew weary of trying to explain that
@@ -33085,6 +33705,10 @@ environments.
(This is no longer supported)
@item
+@cindex Wallin, Anders
+Anders Wallin helped keep the VMS port going for several years.
+
+@item
@cindex Haque, John
John Haque made the following contributions:
@@ -33138,7 +33762,7 @@ helping David Trueman, and as the primary maintainer since around 1994.
@appendix Installing @command{gawk}
@c last two commas are part of see also
-@cindex operating systems, See Also GNU/Linux, PC operating systems, Unix
+@cindex operating systems, See Also GNU/Linux@comma{} PC operating systems@comma{} Unix
@c STARTOFRANGE gligawk
@cindex @command{gawk}, installing
@c STARTOFRANGE ingawk
@@ -33543,7 +34167,7 @@ command line when compiling @command{gawk} from scratch, including:
@table @code
-@cindex @code{--disable-extensions} configuration option
+@cindex @option{--disable-extensions} configuration option
@cindex configuration option, @code{--disable-extensions}
@item --disable-extensions
Disable configuring and building the sample extensions in the
@@ -33551,7 +34175,7 @@ Disable configuring and building the sample extensions in the
The default action is to dynamically check if the extensions
can be configured and compiled.
-@cindex @code{--disable-lint} configuration option
+@cindex @option{--disable-lint} configuration option
@cindex configuration option, @code{--disable-lint}
@item --disable-lint
Disable all lint checking within @code{gawk}. The
@@ -33571,14 +34195,14 @@ Using this option may bring you some slight performance improvement.
Using this option will cause some of the tests in the test suite
to fail. This option may be removed at a later date.
-@cindex @code{--disable-nls} configuration option
+@cindex @option{--disable-nls} configuration option
@cindex configuration option, @code{--disable-nls}
@item --disable-nls
Disable all message-translation facilities.
This is usually not desirable, but it may bring you some slight performance
improvement.
-@cindex @code{--with-whiny-user-strftime} configuration option
+@cindex @option{--with-whiny-user-strftime} configuration option
@cindex configuration option, @code{--with-whiny-user-strftime}
@item --with-whiny-user-strftime
Force use of the included version of the @code{strftime()}
@@ -34173,7 +34797,21 @@ If your @command{gawk} was installed by a PCSI kit into the
@file{GNV$GNU:[bin]gnv$gawk.exe} and the help file will be
@file{GNV$GNU:[vms_help]gawk.hlp}.
-Optionally, the help entry can be loaded into a VMS help library:
+The PCSI kit also installs a @file{GNV$GNU:[vms_bin]gawk_verb.cld} file
+which can be used to add @command{gawk} and @command{awk} as DCL commands.
+
+For just the current process you can use:
+
+@example
+$ @kbd{set command gnv$gnu:[vms_bin]gawk_verb.cld}
+@end example
+
+Or the system manager can use @file{GNV$GNU:[vms_bin]gawk_verb.cld} to
+add the @command{gawk} and @command{awk} to the system wide @samp{DCLTABLES}.
+
+The DCL syntax is documented in the @file{gawk.hlp} file.
+
+Optionally, @file{gawk.hlp} entry can be loaded into a VMS help library:
@example
$ @kbd{LIBRARY/HELP sys$help:helplib [.vms]gawk.hlp}
@@ -34284,9 +34922,10 @@ to supply individual PCSI packages for each component.
See @uref{https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/}.
The normal build procedure for @command{gawk} produces a program that
-is suitable for use with GNV. At this time work is being done to create
-the procedures for building a PCSI kit to replace the older @command{gawk}
-port.
+is suitable for use with GNV.
+
+The @file{vms/gawk_build_steps.txt} in the source documents the procedure
+for building a VMS PCSI kit that is compatible with GNV.
@ignore
@c The VMS POSIX product, also known as POSIX for OpenVMS, is long defunct
@@ -34440,7 +35079,7 @@ as follows:
@cindex Rankin, Pat
@cindex Malmberg, John
@item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com}, and
-John Malmberg, @EMAIL{wb8tyw@@gmail.com,wb8tyw at gmail.com}.
+John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}.
@cindex Pitts, Dave
@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}.
@@ -34801,7 +35440,7 @@ for information on getting the latest version of @command{gawk}.)
@item
@ifnotinfo
-Follow the @cite{GNU Coding Standards}.
+Follow the @uref{http://www.gnu.org/prep/standards/, @cite{GNU Coding Standards}}.
@end ifnotinfo
@ifinfo
See @inforef{Top, , Version, standards, GNU Coding Standards}.
@@ -34960,11 +35599,9 @@ Be prepared to sign the appropriate paperwork.
In order for the FSF to distribute your code, you must either place
your code in the public domain and submit a signed statement to that
effect, or assign the copyright in your code to the FSF.
-@ifinfo
Both of these actions are easy to do and @emph{many} people have done so
already. If you have questions, please contact me, or
@email{gnu@@gnu.org}.
-@end ifinfo
@item
When doing a port, bear in mind that your code must coexist peacefully
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 9cf29f2e..b51ac3dc 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2013-06-21.17}
+\def\texinfoversion{2014-02-09.15}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -281,9 +281,9 @@
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
- \the\toks0 \the\toks2
- \noexpand\or \the\toks4 \the\toks6
- \noexpand\else \the\toks8
+ \the\toks0 \the\toks2 % 0: top marks (\last...)
+ \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...)
+ \noexpand\else \the\toks8 % 2: color marks
}%
}
% \topmark doesn't work for the very first chapter (after the title
@@ -322,10 +322,13 @@
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
+ \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars}
+ %
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
- \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+ %
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
- \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
%
{%
% Have to do this stuff outside the \shipout because we want it to
@@ -1135,10 +1138,12 @@ output) for that.)}
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex,
+ % Color manipulation macros using ideas from pdfcolor.tex,
% except using rgb instead of cmyk; the latter is said to render as a
% very dark gray on-screen and a very dark halftone in print, instead
- % of actual black.
+ % of actual black. The dark red here is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing. We use
+ % black by default, though.
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
@@ -1248,10 +1253,9 @@ output) for that.)}
% used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
%
- % by default, use a color that is dark enough to print on paper as
- % nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\rgbDarkRed}
- \def\linkcolor{\rgbDarkRed}
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -2377,8 +2381,10 @@ end
\ifx\next,%
\else\ifx\next-%
\else\ifx\next.%
+ \else\ifx\next\.%
+ \else\ifx\next\comma%
\else\ptexslash
- \fi\fi\fi
+ \fi\fi\fi\fi\fi
\aftersmartic
}
@@ -2519,7 +2525,9 @@ end
\ifx\codedashprev\codedash
\else \discretionary{}{}{}\fi
\fi
- \global\let\codedashprev=\next
+ % we need the space after the = for the case when \next itself is a
+ % space token; it would get swallowed otherwise. As in @code{- a}.
+ \global\let\codedashprev= \next
}
}
\def\normaldash{-}
@@ -2567,37 +2575,21 @@ end
\let\file=\code
\let\option=\code
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
+% @uref (abbreviation for `urlref') aka @url takes an optional
+% (comma-separated) second argument specifying the text to display and
+% an optional third arg as text to display instead of (rather than in
+% addition to) the url itself. First (mandatory) arg is the url.
+
+% TeX-only option to allow changing PDF output to show only the second
+% arg (if given), and not the url (which is then just the link target).
+\newif\ifurefurlonlylink
-% This \urefbreak definition is the active one.
+% The main macro is \urefbreak, which allows breaking at expected
+% places within the url. (There used to be another version, which
+% didn't support automatic breaking.)
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
\let\uref=\urefbreak
+%
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
@@ -2606,12 +2598,19 @@ end
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
- \setbox0 = \hbox{\ignorespaces #2}%
+ \setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt
\ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
\else
- \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
\fi
\else
\urefcode{#1}% only url given, so show it
@@ -2651,8 +2650,10 @@ end
% we put a little stretch before and after the breakable chars, to help
% line breaking of long url's. The unequal skips make look better in
% cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+\def\urefprestretchamount{.13em}
+\def\urefpoststretchamount{.1em}
+\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
%
\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
\def\urefcodedot{\urefprestretch .\urefpoststretch}
@@ -2887,6 +2888,15 @@ end
\def\inlinefmtname{#1}%
\ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
}
+%
+% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
+% FMTNAME is tex, else ELSE-TEXT.
+\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
+\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
+}
+%
% For raw, must switch into @tex before parsing the argument, to avoid
% setting catcodes prematurely. Doing it this way means that, for
% example, @inlineraw{html, foo{bar} gets a parse error instead of being
@@ -2903,6 +2913,23 @@ end
\endgroup % close group opened by \tex.
}
+% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
+%
+\long\def\inlineifset#1{\doinlineifset #1,\finish}
+\long\def\doinlineifset#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
+ \else\ignorespaces#2\fi
+}
+
+% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
+%
+\long\def\inlineifclear#1{\doinlineifclear #1,\finish}
+\long\def\doinlineifclear#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
+}
+
\message{glyphs,}
% and logos.
@@ -3658,7 +3685,7 @@ end
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
- % Try typesetting the item mark that if the document erroneously says
+ % Try typesetting the item mark so that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
@@ -4198,7 +4225,7 @@ end
\def\value{\begingroup\makevalueexpandable\valuexxx}
\def\valuexxx#1{\expandablevalue{#1}\endgroup}
{
- \catcode`\- = \active \catcode`\_ = \active
+ \catcode`\-=\active \catcode`\_=\active
%
\gdef\makevalueexpandable{%
\let\value = \expandablevalue
@@ -4218,7 +4245,12 @@ end
% variable's value contains other Texinfo commands, it's almost certain
% it will fail (although perhaps we could fix that with sufficient work
% to do a one-level expansion on the result, instead of complete).
-%
+%
+% Unfortunately, this has the consequence that when _ is in the *value*
+% of an @set, it does not print properly in the roman fonts (get the cmr
+% dot accent at position 126 instead). No fix comes to mind, and it's
+% been this way since 2003 or earlier, so just ignore it.
+%
\def\expandablevalue#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
{[No value for ``#1'']}%
@@ -4619,6 +4651,16 @@ end
\definedummyword\verb
\definedummyword\w
\definedummyword\xref
+ %
+ % Consider:
+ % @macro mkind{arg1,arg2}
+ % @cindex \arg2\
+ % @end macro
+ % @mkind{foo, bar}
+ % The space after the comma will end up in the temporary definition
+ % that we make for arg2 (see \parsemargdef ff.). We want all this to be
+ % expanded for the sake of the index, so we end up just seeing "bar".
+ \let\xeatspaces = \eatspaces
}
% \indexnofonts is used when outputting the strings to sort the index
@@ -5905,7 +5947,7 @@ end
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
- \let\prevsectiondefs=\lastsectiondefs
+ \global\let\prevsectiondefs=\lastsectiondefs
\domark
%
% Only insert the space after the number if we have a section number.
@@ -6272,8 +6314,8 @@ end
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
- \catcode`\`=\other
- \catcode`\'=\other
+ \catcode `\`=\other
+ \catcode `\'=\other
\escapechar=`\\
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
@@ -6297,7 +6339,7 @@ end
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
- \expandafter \let\csname top\endcsname=\ptextop % outer
+ \expandafter \let\csname top\endcsname=\ptextop % we've made it outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@@ -6381,8 +6423,6 @@ end
% side, and for 6pt waste from
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
- % Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing = t%
%
% If this cartouche directly follows a sectioning command, we need the
% \parskip glue (backspaced over by default) or the cartouche can
@@ -6549,9 +6589,13 @@ end
% @raggedright does more-or-less normal line breaking but no right
-% justification. From plain.tex.
+% justification. From plain.tex. Don't stretch around special
+% characters in urls in this environment, since the stretch at the right
+% should be enough.
\envdef\raggedright{%
- \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+ \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
+ \def\urefprestretchamount{0pt}%
+ \def\urefpoststretchamount{0pt}%
}
\let\Eraggedright\par
@@ -7444,7 +7488,7 @@ end
% Parse the optional {params} list. Set up \paramno and \paramlist
% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument si to be expanded. If
+% in the params list to some hook where the argument is to be expanded. If
% there are less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
% defined `a la TeX in the macro body.
@@ -8306,6 +8350,7 @@ end
\gdef\footnote{%
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
+ %
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
@@ -8329,6 +8374,11 @@ end
%
\gdef\dofootnote{%
\insert\footins\bgroup
+ %
+ % Nested footnotes are not supported in TeX, that would take a lot
+ % more work. (\startsavinginserts does not suffice.)
+ \let\footnote=\errfootnote
+ %
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
@@ -8366,13 +8416,19 @@ end
}
}%end \catcode `\@=11
+\def\errfootnote{%
+ \errhelp=\EMsimple
+ \errmessage{Nested footnotes not supported in texinfo.tex,
+ even though they work in makeinfo; sorry}
+}
+
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
-
+%
% Replace the \insert primitive by a cheating macro.
% Deeper inside, just make sure that the saved insertions are not spilled
% out prematurely.
@@ -9940,11 +9996,9 @@ directory should work if nowhere else does.}
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt\char126}}
+\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
\chardef\hat=`\^
-\catcode`\^=\active
-\def^{{\tt \hat}}
+\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
@@ -9954,16 +10008,26 @@ directory should work if nowhere else does.}
\catcode`\|=\active
\def|{{\tt\char124}}
+
\chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
+\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
\chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
+\catcode`\+=\active \def+{{\tt \char 43}}
+\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% used for headline/footline in the output routine, in case the page
+% breaks in the middle of an @tex block.
+\def\texinfochars{%
+ \let< = \activeless
+ \let> = \activegtr
+ \let~ = \activetilde
+ \let^ = \activehat
+ \markupsetuplqdefault \markupsetuprqdefault
+ \let\b = \strong
+ \let\i = \smartitalic
+ % in principle, all other definitions in \tex have to be undone too.
+}
% If a .fmt file is being used, characters that might appear in a file
% name cannot be active until we have parsed the command line.