aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog24
-rw-r--r--doc/awkcard.in37
-rw-r--r--doc/gawk.1144
-rw-r--r--doc/gawk.info2013
-rw-r--r--doc/gawk.texi585
5 files changed, 1594 insertions, 1209 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 202cc516..43c9ffdd 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,23 @@
+2012-02-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi, gawk.1: And some minor edits thereunto.
+
+2012-02-03 John Haque <j.eh@mchsi.com>
+
+ * gawk.texi, gawk.1: Add text on read timeout.
+
+2011-12-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkcard.in, gawk.1: Minor edits after merge of executables.
+
+2011-12-21 John Haque <j.eh@mchsi.com>
+
+ * gawk.texi: Updated sections on profiling and debugging
+ after merging the exes. Document new options --debug and
+ --load, and add a sub-section on loading extension library.
+ * gawk.1: Same.
+ * awkcard.in: Same.
+
2012-03-28 Arnold D. Robbins <arnold@skeeve.com>
* 4.0.1: Release tar ball made.
@@ -31,6 +51,10 @@
Jeroen Schot <schot@A-Eskwadraat.nl>.
* gawk.texi: Some minor fixes.
+2011-08-31 John Haque <j.eh@mchsi.com>
+
+ * gawk.texi: Updated gawk dynamic extension doc.
+
2011-07-28 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi (Gory Details): Restore text on historical behavior
diff --git a/doc/awkcard.in b/doc/awkcard.in
index 22b4716f..adc506c3 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -26,7 +26,6 @@
.\" Strings to save typing
.ds AK \*(FCawk\*(FR
.ds GK \*(FCgawk\*(FR
-.ds PK \*(FCpgawk\*(FR
.ds NK Bell Labs \*(FCawk\*(FR
.ds MK \*(FCmawk\*(FR
.\"
@@ -77,7 +76,7 @@ Pattern Elements 8
Printf Formats 14
Records 10
Regular Expressions 11
-Signals (\*(PK) 4
+Signals (\*(GK \*(FC\-\^\-profile\*(FR) 4
Special Filenames 12
String Functions 16
Time Functions (\*(GK) 17
@@ -254,6 +253,9 @@ their types and final values to
If no \*(FIfile\*(FR
is provided, \*(FCgawk\*(FR
uses \*(FCawkvars.out\*(FR.
+.TI "\*(FC\-D\*(FR[\*(FC\*(FIfile\*(FR], \*(FC\-\^\-debug\*(FR[\*(FC=\*(FIfile\*(FR]
+Enable debugging of program. Optionally read stored commands
+from \*(FIfile\*(FR.
.TI "\*(FC-e '\*(FItext\*(FC'\*(FR, \*(FC\-\^\-source '\*(FItext\*(FC'\*(FR
Use \*(FItext\*(FR as AWK program source code.
.TI "\*(FC\-E \*(FIfile\*(FR, \*(FC\-\^\-exec \*(FIfile\*(FR
@@ -269,6 +271,8 @@ for localization.
.TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR
Print a short summary of the available
options on \*(FCstdout\*(FR, then exit zero.
+.TI "\*(FC\-l \*(FIlib\*(FR, \*(FC\-\^\-load \*(FIlib\*(FR
+Load dynamic extension \*(FIlib\fP.
.TI "\*(FC\-L \*(FR[\*(FC\*(FIvalue\*(FR], \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR]
Warn about dubious or non-portable constructs.
If \*(FIvalue\*(FR is
@@ -283,31 +287,23 @@ Recognize octal and hexadecimal values in input data.
\*(FIUse this option with great caution!\*(FR
.TI "\*(FC\-N\*(FR, \*(FC\-\^\-use\-lc\-numeric\*(FR
Force use of the locale's decimal point character when parsing input data.
+.TI "\*(FC\-o\*(FR[\*(FC\*(FIfile\*(FR], \*(FC\-\^\-pretty-print\*(FR[\*(FC=\*(FIfile\*(FR]
+Output a pretty printed version of the program to \*(FIfile\*(FR
+(default: \*(FCawkprof.out\*(FR).
.TI "\*(FC\-O\*(FR, \*(FC\-\^\-optimize\*(FR
Enable some internal optimizations.
.TI "\*(FC\-p\*(FR[\*(FC\*(FIfile\*(FR], \*(FC\-\^\-profile\*(FR[\*(FC=\*(FIfile\*(FR]
Send profiling data to \*(FIfile\*(FR
(default: \*(FCawkprof.out\*(FR).
-With \*(GK,
-the profile is just a ``pretty printed'' version of the program.
-With \*(PK,
-the profile contains execution counts in the left margin
+The profile contains execution counts in the left margin
of each statement in the program.
.TI "\*(FC\-P\*(FR, \*(FC\-\^\-posix\*(FR
Disable common and GNU extensions.
-.TI "\*(FC\-R \*(FIfile\*(FR, \*(FC\-\^\-command \*(FIfile\*(FR"
-\*(FCdgawk\*(FR only.
-Read stored debugger commands from \*(FIfile\*(FR.
.TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR
Enable \*(FIinterval expressions\*(FR in regular
expression matching (see \fHRegular
Expressions\fP below). Useful if
-\*(FC\-\^\-traditional\*(FR is specified.
-.TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR
-Disable the \*(FCsystem()\*(FR function,
-input redirection with \*(FCgetline\*(FR,
-output redirection with \*(FCprint\*(FR and \*(FCprintf\*(FR,
-and dynamic extensions loading.\*(CB
+\*(FC\-\^\-traditional\*(FR is specified.\*(CB
.in -4n
.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0"
@@ -319,6 +315,11 @@ and dynamic extensions loading.\*(CB
.ES
.fi
.in +4n
+.TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR
+Disable the \*(FCsystem()\*(FR function,
+input redirection with \*(FCgetline\*(FR,
+output redirection with \*(FCprint\*(FR and \*(FCprintf\*(FR,
+and dynamic extensions loading.
.TI "\*(FC-t\*(FR, \*(FC\-\^\-lint\-old\*(FR
Warn about constructs that are not
portable to the original version of
@@ -383,14 +384,14 @@ The options may be abbreviated using just the first letter, e.g.,
and so on.\*(CB
.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(MK\f(HB)\*(FR\s0"
.sp .7
-.\" --- Signals (pgawk)
+.\" --- Signals (gawk --profile)
.ES
.fi
-\*(CD\*(PK accepts two signals.
+\*(CD\*(GK accepts two signals while profiling.
\*(FCSIGUSR1\fP dumps a profile and function call stack to the
profile file. It then continues to run.
\*(FCSIGHUP\fP is similar, but exits.\*(CB
-.EB "\s+2\f(HBSIGNALS (\*(PK\f(HB)\*(FR\s0"
+.EB "\s+2\f(HBSIGNALS (\*(GK \f(HB\-\^\-profile)\*(FR\s0"
.\" --- Lines And Statements
.ES
diff --git a/doc/gawk.1 b/doc/gawk.1
index e26f9a2e..07a8d0e3 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -33,30 +33,6 @@ gawk \- pattern scanning and processing language
]
.I program-text
file .\|.\|.
-.sp
-.B pgawk
-[ \*(PX or \*(GN style options ]
-.B \-f
-.I program-file
-[
-.B \-\^\-
-] file .\|.\|.
-.br
-.B pgawk
-[ \*(PX or \*(GN style options ]
-[
-.B \-\^\-
-]
-.I program-text
-file .\|.\|.
-.sp
-.B dgawk
-[ \*(PX or \*(GN style options ]
-.B \-f
-.I program-file
-[
-.B \-\^\-
-] file .\|.\|.
.SH DESCRIPTION
.I Gawk
is the \*(GN Project's implementation of the \*(AK programming language.
@@ -84,27 +60,31 @@ and
.B ARGV
pre-defined \*(AK variables.
.PP
-.I Pgawk
-is the profiling version of
-.IR gawk .
-It is identical in every way to
-.IR gawk ,
-except that programs run more slowly,
-and it automatically produces an execution profile in the file
+When
+.I gawk
+is invoked with the
+.B \-\^\-profile
+option, it starts gathering profiling statistics
+from the execution of the program.
+.I Gawk
+runs more slowly in this mode, and automatically produces an execution
+profile in the file
.B awkprof.out
when done.
See the
.B \-\^\-profile
option, below.
.PP
-.I Dgawk
-is an
-.I awk
-debugger. Instead of running the program directly, it loads the
+.I Gawk
+also has an integrated debugger. An interactive debugging session can
+be started by supplying the
+.B \-\^\-debug
+option to the command line. In this mode of execution,
+.I gawk
+loads the
AWK source code and then prompts for debugging commands.
-Unlike
-.IR gawk " and " pgawk ", " dgawk
-only processes AWK program source provided with the
+.I Gawk
+can only debug AWK program source provided with the
.B \-f
option.
The debugger is documented in \*(EP.
@@ -117,8 +97,8 @@ while long options start with \*(lq\-\^\-\*(rq.
Long options are provided for both \*(GN-specific features and
for \*(PX-mandated features.
.PP
-.IR Gawk -
-specific options are typically used in long-option form.
+.IR Gawk -specific
+options are typically used in long-option form.
Arguments to long options are either joined with the option
by an
.B =
@@ -273,6 +253,18 @@ names like
and so on.)
.TP
.PD 0
+\fB\-D\fR[\fIfile\fR]
+.TP
+.PD
+\fB\-\^\-debug\fR[\fB=\fIfile\fR]
+Enable debugging of \*(AK programs.
+By default, the debugger reads commands interactively from the terminal.
+The optional
+.IR file
+argument can be used to specify a file with a list
+of commands for the debugger to execute non-interactively.
+.TP
+.PD 0
.BI "\-e " program-text
.TP
.PD
@@ -331,6 +323,21 @@ the standard output.
these options cause an immediate, successful exit.)
.TP
.PD 0
+.BI "\-l " lib
+.TP
+.PD
+.BI \-\^\-load " lib"
+Load a shared library
+.IR lib .
+This searches for the library using the
+.B AWKPATH
+environment variable. The suffix
+.I .so
+in the library name is optional, and
+the library initialization routine is expected to be named
+.BR dlload() .
+.TP
+.PD 0
.BR "\-L " [ \fIvalue\fR ]
.TP
.PD
@@ -387,12 +394,28 @@ users.
..
.TP
.PD 0
+\fB\-o\fR[\fIfile\fR]
+.TP
+.PD
+\fB\-\^\-pretty-print\fR[\fB=\fIfile\fR]
+Output a pretty printed version of the program to
+.IR file .
+If no
+.I file
+is provided,
+.I gawk
+uses a file named
+.B awkprof.out
+in the current directory.
+.TP
+.PD 0
.B \-O
.TP
.PD
.B \-\^\-optimize
Enable optimizations upon the internal representation of the program.
-Currently, this includes just simple constant-folding. The
+Currently, this includes simple constant-folding, and tail call
+elimination for recursive functions. The
.I gawk
maintainer hopes to add additional optimizations over time.
.TP
@@ -401,16 +424,11 @@ maintainer hopes to add additional optimizations over time.
.TP
.PD
\fB\-\^\-profile\fR[\fB=\fIprof_file\fR]
-Send profiling data to
+Start a profiling session, and send the profiling data to
.IR prof_file .
The default is
.BR awkprof.out .
-When run with
-.IR gawk ,
-the profile is just a \*(lqpretty printed\*(rq version of the program.
-When run with
-.IR pgawk ,
-the profile contains execution counts of each statement in the program
+The profile contains execution counts of each statement in the program
in the left margin and function call counts for each user-defined function.
.TP
.PD 0
@@ -482,15 +500,6 @@ They are enabled by default, but this option remains for use with
.BR \-\^-traditional .
.TP
.PD 0
-.B \-R
-.TP
-.PD
-.BI \-\^\-command " file"
-.I Dgawk
-only. Read stored debugger commands from
-.IR file .
-.TP
-.PD 0
.BI \-S
.TP
.PD
@@ -1120,6 +1129,14 @@ corresponding values of the two elements being compared.
It should return a number less than, equal to, or greater than 0,
depending on how the elements of the array are to be ordered.
.TP
+\fBPROCINFO["input", "READ_TIMEOUT"]\fP
+specifies the timeout in milliseconds for reading data from
+.IR input ,
+where
+.I input
+is a redirection string or a filename. A value of zero or
+less than zero means no timeout.
+.TP
\fBPROCINFO["version"]\fP
the version of
.IR gawk .
@@ -3122,8 +3139,9 @@ Using this feature at the C level is not pretty, but
it is unlikely to go away. Additional mechanisms may
be added at some point.
.SH SIGNALS
-.I pgawk
-accepts two signals.
+The
+.I gawk
+profiler accepts two signals.
.B SIGUSR1
causes it to dump a profile and function call stack to the
profile file, which is either
@@ -3133,7 +3151,7 @@ or whatever file was named with the
option. It then continues to run.
.B SIGHUP
causes
-.I pgawk
+.I gawk
to dump the profile and function call stack and then exit.
.SH INTERNATIONALIZATION
.PP
@@ -3577,6 +3595,12 @@ and
.B \-\^\-file
options.
.PP
+The
+.B GAWK_READ_TIMEOUT
+environment variable can be used to specify a timeout
+in milliseconds for reading input from a terminal, pipe
+or two-way communication including sockets.
+.PP
For socket communication, two special environment variables can be used to control the number of retries
.RB ( GAWK_SOCK_RETRIES ),
and the interval between retries
diff --git a/doc/gawk.info b/doc/gawk.info
index a33027cd..ca6b661f 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -94,7 +94,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Library Functions:: A Library of `awk' Functions.
* Sample Programs:: Many `awk' programs with complete
explanations.
-* Debugger:: The `dgawk' debugger.
+* Debugger:: The `gawk' debugger.
* Language History:: The evolution of the `awk'
language.
* Installation:: Installing `gawk' under various
@@ -196,6 +196,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Getline Notes:: Important things to know about
`getline'.
* Getline Summary:: Summary of `getline' Variants.
+* Read Timeout:: Reading input with a timeout.
* Command line directories:: What happens if you put a directory on the
command line.
* Print:: The `print' statement.
@@ -417,23 +418,23 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Anagram Program:: Finding anagrams from a dictionary.
* Signature Program:: People do amazing things with too much time
on their hands.
-* Debugging:: Introduction to `dgawk'.
-* Debugging Concepts:: Debugging In General.
+* Debugging:: Introduction to `gawk' Debugger.
+* Debugging Concepts:: Debugging in General.
* Debugging Terms:: Additional Debugging Concepts.
* Awk Debugging:: Awk Debugging.
-* Sample dgawk session:: Sample `dgawk' session.
-* dgawk invocation:: `dgawk' Invocation.
-* Finding The Bug:: Finding The Bug.
-* List of Debugger Commands:: Main `dgawk' Commands.
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program and
- the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Sample Debugging Session:: Sample Debugging Session.
+* Debugger Invocation:: How to Start the Debugger.
+* Finding The Bug:: Finding the Bug.
+* List of Debugger Commands:: Main Commands.
+* Breakpoint Control:: Control of Breakpoints.
+* Debugger Execution Control:: Control of Execution.
+* Viewing And Changing Data:: Viewing and Changing Data.
+* Execution Stack:: Dealing with the Stack.
+* Debugger Info:: Obtaining Information about the Program and
+ the Debugger State.
+* Miscellaneous Debugger Commands:: Miscellaneous Commands.
* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
+* Limitations:: Limitations and Future Plans.
* V7/SVR3.1:: The major changes between V7 and System V
Release 3.1.
* SVR4:: Minor changes between System V Releases 3.1
@@ -489,6 +490,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Internals:: A brief look at some `gawk'
internals.
* Plugin License:: A note about licensing.
+* Loading Extensions:: How to load dynamic extensions.
* Sample Library:: A example of new functions.
* Internal File Description:: What the new functions will do.
* Internal File Ops:: The code for internal file operations.
@@ -849,7 +851,7 @@ and profile your `awk' programs.
sample `awk' programs. Reading them allows you to see `awk' solving
real problems.
- *note Debugger::, describes the `awk' debugger, `dgawk'.
+ *note Debugger::, describes the `awk' debugger.
*note Language History::, describes how the `awk' language has
evolved since its first release to present. It also describes how
@@ -2216,6 +2218,15 @@ The following list describes options mandated by the POSIX standard:
particularly easy mistake to make with simple variable names like
`i', `j', etc.)
+`-D[FILE]'
+`--debug=[FILE]'
+ Enable debugging of `awk' programs (*note Debugging::). By
+ default, the debugger reads commands interactively from the
+ terminal. The optional FILE argument allows you to specify a file
+ with a list of commands for the debugger to execute
+ non-interactively. No space is allowed between the `-D' and FILE,
+ if FILE is supplied.
+
`-e PROGRAM-TEXT'
`--source PROGRAM-TEXT'
Provide program source code in the PROGRAM-TEXT. This option
@@ -2258,6 +2269,13 @@ 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.
+`-l LIB'
+`--load LIB'
+ Load a shared library LIB. This searches for the library using the
+ `AWKPATH' environment variable. The suffix `.so' in the library
+ name is optional. The library initialization routine should be
+ named `dlload()'.
+
`-L [value]'
`--lint[=value]'
Warn about constructs that are dubious or nonportable to other
@@ -2290,6 +2308,14 @@ The following list describes options mandated by the POSIX standard:
Force the use of the locale's decimal point character when parsing
numeric input data (*note Locales::).
+`-o[FILE]'
+`--pretty-print[=FILE]'
+ Enable pretty-printing of `awk' programs. By default, output
+ program is created in a file named `awkprof.out'. The optional
+ FILE argument allows you to specify a different file name for the
+ output. No space is allowed between the `-o' and FILE, if FILE is
+ supplied.
+
`-O'
`--optimize'
Enable some optimizations on the internal representation of the
@@ -2305,10 +2331,9 @@ The following list describes options mandated by the POSIX standard:
for the profile file. No space is allowed between the `-p' and
FILE, if FILE is supplied.
- When run with `gawk', the profile is just a "pretty printed"
- version of the program. When run with `pgawk', the profile
- contains execution counts for each statement in the program in the
- left margin, and function call counts for each function.
+ The profile contains execution counts for each statement in the
+ program in the left margin, and function call counts for each
+ function.
`-P'
`--posix'
@@ -2342,11 +2367,6 @@ The following list describes options mandated by the POSIX standard:
remains both for backward compatibility, and for use in
combination with the `--traditional' option.
-`-R FILE'
-`--command=FILE'
- `dgawk' only. Read `dgawk' debugger options and commands from
- FILE. *Note Dgawk Info::, for more information.
-
`-S'
`--sandbox'
Disable the `system()' function, input redirections with `getline',
@@ -2611,6 +2631,10 @@ used by regular users.
milliseconds. On systems that do not support the `usleep()' system
call, the value is rounded up to an integral number of seconds.
+`GAWK_READ_TIMEOUT'
+ Specifies the time, in milliseconds, for `gawk' to wait for input
+ before returning with an error. *Note Read Timeout::.
+
The environment variables in the following list are meant for use by
the `gawk' developers for testing and tuning. They are subject to
change. The variables are:
@@ -3612,6 +3636,8 @@ have to be named on the `awk' command line (*note Getline::).
* Multiple Line:: Reading multi-line records.
* Getline:: Reading files under explicit program control
using the `getline' function.
+* Read Timeout:: Reading input with a timeout.
+
* Command line directories:: What happens if you put a directory on the
command line.
@@ -4799,7 +4825,7 @@ feature of `RS' does not apply. It does apply to the default field
separator of a single space: `FS = " "'.

-File: gawk.info, Node: Getline, Next: Command line directories, Prev: Multiple Line, Up: Reading Files
+File: gawk.info, Node: Getline, Next: Read Timeout, Prev: Multiple Line, Up: Reading Files
4.9 Explicit Input with `getline'
=================================
@@ -5224,9 +5250,101 @@ VAR
Table 4.1: getline Variants and What They Set

-File: gawk.info, Node: Command line directories, Prev: Getline, Up: Reading Files
+File: gawk.info, Node: Read Timeout, Next: Command line directories, Prev: Getline, Up: Reading Files
+
+4.10 Reading Input With A Timeout
+=================================
+
+You may specify a timeout in milliseconds for reading input from a
+terminal, pipe or two-way communication including, TCP/IP sockets. This
+can be done on a per input, command or connection basis, by setting a
+special element in the `PROCINFO' array:
+
+ PROCINFO["input_name", "READ_TIMEOUT"] = TIMEOUT IN MILLISECONDS
+
+ When set, this will cause `gawk' to time out and return failure if
+no data is available to read within the specified timeout period. For
+example, a TCP client can decide to give up on receiving any response
+from the server after a certain amount of time:
+
+ Service = "/inet/tcp/0/localhost/daytime"
+ PROCINFO[Service, "READ_TIMEOUT"] = 100
+ if ((Service |& getline) > 0)
+ print $0
+ else if (ERRNO != "")
+ print ERRNO
+
+ Here is how to read interactively from the terminal(1) without
+waiting for more than five seconds:
+
+ PROCINFO["/dev/stdin", "READ_TIMEOUT"] = 5000
+ while ((getline < "/dev/stdin") > 0)
+ print $0
+
+ `gawk' will terminate the read operation if input does not arrive
+after waiting for the timeout period, return failure and set the
+`ERRNO' variable to an appropriate string value. A negative or zero
+value for the timeout is the same as specifying no timeout at all.
+
+ A timeout can also be set for reading from the terminal in the
+implicit loop that reads input records and matches them against
+patterns, like so:
+
+ $ gawk 'BEGIN { PROCINFO["-", "READ_TIMEOUT"] = 5000 }
+ > { print "You entered: " $0 }'
+ gawk
+ -| You entered: gawk
-4.10 Directories On The Command Line
+ In this case, failure to respond within five seconds results in the
+following error message:
+
+ error--> gawk: cmd. line:2: (FILENAME=- FNR=1) fatal: error reading input file `-': Connection timed out
+
+ The timeout can be set or changed at any time, and will take effect
+on the next attempt to read from the input device. In the following
+example, we start with a timeout value of one second, and progressively
+reduce it by one-tenth of a second until we wait indefinitely for the
+input to arrive:
+
+ PROCINFO[Service, "READ_TIMEOUT"] = 1000
+ while ((Service |& getline) > 0) {
+ print $0
+ PROCINFO[S, "READ_TIMEOUT"] -= 100
+ }
+
+ NOTE: You should not assume that the read operation will block
+ exactly after the tenth record has been printed. It is possible
+ that `gawk' will read and buffer more than one record's worth of
+ data the first time. Because of this, changing the value of
+ timeout like in the above example is not very useful.
+
+ If the `PROCINFO' element is not present and the environment
+variable `GAWK_READ_TIMEOUT' exists, `gawk' uses its value to
+initialize the timeout value. The exclusive use of the environment
+variable to specify timeout has the disadvantage of not being able to
+control it on a per command or connection basis.
+
+ `gawk' considers a timeout event to be an error even though the
+attempt to read from the underlying device may succeed in a later
+attempt. This is a limitation, and it also means that you cannot use
+this to multiplex input from two or more sources.
+
+ Assigning a timeout value prevents read operations from blocking
+indefinitely. But bear in mind that there are other ways `gawk' can
+stall waiting for an input device to be ready. A network client can
+sometimes take a long time to establish a connection before it can
+start reading any data, or the attempt to open a FIFO special file for
+reading can block indefinitely until some other process opens it for
+writing.
+
+ ---------- Footnotes ----------
+
+ (1) This assumes that standard input is the keyboard
+
+
+File: gawk.info, Node: Command line directories, Prev: Read Timeout, Up: Reading Files
+
+4.11 Directories On The Command Line
====================================
According to the POSIX standard, files named on the `awk' command line
@@ -14121,25 +14239,22 @@ File: gawk.info, Node: Profiling, Prev: TCP/IP Networking, Up: Advanced Featu
==================================
You may produce execution traces of your `awk' programs. This is done
-with a specially compiled version of `gawk', called `pgawk' ("profiling
-`gawk'").
-
- `pgawk' is identical in every way to `gawk', except that when it has
-finished running, it creates a profile of your program in a file named
-`awkprof.out'. Because it is profiling, it also executes up to 45%
+by passing the option `--profile' to `gawk'. When `gawk' has finished
+running, it creates a profile of your program in a file named
+`awkprof.out'. Because it is profiling, it also executes up to 45%
slower than `gawk' normally does.
As shown in the following example, the `--profile' option can be
-used to change the name of the file where `pgawk' will write the
-profile:
+used to change the name of the file where `gawk' will write the profile:
- pgawk --profile=myprog.prof -f myprog.awk data1 data2
+ gawk --profile=myprog.prof -f myprog.awk data1 data2
-In the above example, `pgawk' places the profile in `myprog.prof'
+In the above example, `gawk' places the profile in `myprog.prof'
instead of in `awkprof.out'.
Here is a sample session showing a simple `awk' program, its input
-data, and the results from running `pgawk'. First, the `awk' program:
+data, and the results from running `gawk' with the `--profile' option.
+First, the `awk' program:
BEGIN { print "First BEGIN rule" }
@@ -14175,9 +14290,9 @@ data, and the results from running `pgawk'. First, the `awk' program:
foo
junk
- Here is the `awkprof.out' that results from running `pgawk' on this
-program and data (this example also illustrates that `awk' programmers
-sometimes have to work late):
+ Here is the `awkprof.out' that results from running the `gawk'
+profiler on this program and data (this example also illustrates that
+`awk' programmers sometimes have to work late):
# gawk profile, created Sun Aug 13 00:00:15 2000
@@ -14266,14 +14381,14 @@ output. They are as follows:
redirection. Similarly, if the target of a redirection isn't a
scalar, it gets parenthesized.
- * `pgawk' supplies leading comments in front of the `BEGIN' and
- `END' rules, the pattern/action rules, and the functions.
+ * `gawk' supplies leading comments in front of the `BEGIN' and `END'
+ rules, the pattern/action rules, and the functions.
The profiled version of your program may not look exactly like what
-you typed when you wrote it. This is because `pgawk' creates the
+you typed when you wrote it. This is because `gawk' creates the
profiled version by "pretty printing" its internal representation of
-the program. The advantage to this is that `pgawk' can produce a
+the program. The advantage to this is that `gawk' can produce a
standard representation. The disadvantage is that all source-code
comments are lost, as are the distinctions among multiple `BEGIN',
`END', `BEGINFILE', and `ENDFILE' rules. Also, things such as:
@@ -14288,21 +14403,23 @@ come out as:
which is correct, but possibly surprising.
- Besides creating profiles when a program has completed, `pgawk' can
+ Besides creating profiles when a program has completed, `gawk' can
produce a profile while it is running. This is useful if your `awk'
program goes into an infinite loop and you want to see what has been
-executed. To use this feature, run `pgawk' in the background:
+executed. To use this feature, run `gawk' with the `--profile' option
+in the background:
- $ pgawk -f myprog &
+ $ gawk --profile -f myprog &
[1] 13992
The shell prints a job number and process ID number; in this case,
-13992. Use the `kill' command to send the `USR1' signal to `pgawk':
+13992. Use the `kill' command to send the `USR1' signal to `gawk':
$ kill -USR1 13992
As usual, the profiled version of the program is written to
-`awkprof.out', or to a different file if you use the `--profile' option.
+`awkprof.out', or to a different file if one specified with the
+`--profile' option.
Along with the regular profile, as shown earlier, the profile
includes a trace of any active functions:
@@ -14314,22 +14431,22 @@ includes a trace of any active functions:
# 1. foo
# -- main --
- You may send `pgawk' the `USR1' signal as many times as you like.
+ You may send `gawk' the `USR1' signal as many times as you like.
Each time, the profile and function call trace are appended to the
output profile file.
- If you use the `HUP' signal instead of the `USR1' signal, `pgawk'
+ If you use the `HUP' signal instead of the `USR1' signal, `gawk'
produces the profile and the function call trace and then exits.
- When `pgawk' runs on MS-Windows systems, it uses the `INT' and
-`QUIT' signals for producing the profile and, in the case of the `INT'
-signal, `pgawk' exits. This is because these systems don't support the
-`kill' command, so the only signals you can deliver to a program are
-those generated by the keyboard. The `INT' signal is generated by the
+ When `gawk' runs on MS-Windows systems, it uses the `INT' and `QUIT'
+signals for producing the profile and, in the case of the `INT' signal,
+`gawk' exits. This is because these systems don't support the `kill'
+command, so the only signals you can deliver to a program are those
+generated by the keyboard. The `INT' signal is generated by the
`Ctrl-<C>' or `Ctrl-<BREAK>' key, while the `QUIT' signal is generated
by the `Ctrl-<\>' key.
- Finally, regular `gawk' also accepts the `--profile' option. When
+ Finally, `gawk' also accepts another option `--pretty-print'. When
called this way, `gawk' "pretty prints" the program into `awkprof.out',
without any execution counts.
@@ -18708,45 +18825,46 @@ supplies the following copyright terms:

File: gawk.info, Node: Debugger, Next: Language History, Prev: Sample Programs, Up: Top
-14 `dgawk': The `awk' Debugger
-******************************
+14 Debugging `awk' Programs
+***************************
It would be nice if computer programs worked perfectly the first time
they were run, but in real life, this rarely happens for programs of
any complexity. Thus, most programming languages have facilities
available for "debugging" programs, and now `awk' is no exception.
- The `dgawk' debugger is purposely modeled after the GNU Debugger
+ The `gawk' debugger is purposely modeled after the GNU Debugger
(GDB) (http://www.gnu.org/software/gdb/) command-line debugger. If you
-are familiar with GDB, learning `dgawk' is easy.
+are familiar with GDB, learning how to use `gawk' for debugging your
+program is easy.
* Menu:
-* Debugging:: Introduction to `dgawk'.
-* Sample dgawk session:: Sample `dgawk' session.
-* List of Debugger Commands:: Main `dgawk' Commands.
-* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
+* Debugging:: Introduction to `gawk' debugger.
+* Sample Debugging Session:: Sample debugging session.
+* List of Debugger Commands:: Main debugger commands.
+* Readline Support:: Readline support.
+* Limitations:: Limitations and future plans.

-File: gawk.info, Node: Debugging, Next: Sample dgawk session, Up: Debugger
+File: gawk.info, Node: Debugging, Next: Sample Debugging Session, Up: Debugger
-14.1 Introduction to `dgawk'
-============================
+14.1 Introduction to `gawk' Debugger
+====================================
This minor node introduces debugging in general and begins the
discussion of debugging in `gawk'.
* Menu:
-* Debugging Concepts:: Debugging In General.
+* Debugging Concepts:: Debugging in General.
* Debugging Terms:: Additional Debugging Concepts.
* Awk Debugging:: Awk Debugging.

File: gawk.info, Node: Debugging Concepts, Next: Debugging Terms, Up: Debugging
-14.1.1 Debugging In General
+14.1.1 Debugging in General
---------------------------
(If you have used debuggers in other languages, you may want to skip
@@ -18790,9 +18908,8 @@ File: gawk.info, Node: Debugging Terms, Next: Awk Debugging, Prev: Debugging
------------------------------------
Before diving in to the details, we need to introduce several important
-concepts that apply to just about all debuggers, including `dgawk'.
-The following list defines terms used throughout the rest of this
-major node.
+concepts that apply to just about all debuggers. The following list
+defines terms used throughout the rest of this major node.
"Stack Frame"
Programs generally call functions during the course of their
@@ -18810,11 +18927,11 @@ major node.
needed to manage the call stack. This data area is termed a
"stack frame".
- `gawk' also follows this model, and `dgawk' gives you access to
- the call stack and to each stack frame. You can see the call
- stack, as well as from where each function on the stack was
- invoked. Commands that print the call stack print information about
- each stack frame (as detailed later on).
+ `gawk' also follows this model, and gives you access to the call
+ stack and to each stack frame. You can see the call stack, as well
+ as from where each function on the stack was invoked. Commands
+ that print the call stack print information about each stack frame
+ (as detailed later on).
"Breakpoint"
During debugging, you often wish to let the program run until it
@@ -18859,54 +18976,57 @@ individual primitive instructions carried out by the higher-level `awk'
commands.

-File: gawk.info, Node: Sample dgawk session, Next: List of Debugger Commands, Prev: Debugging, Up: Debugger
+File: gawk.info, Node: Sample Debugging Session, Next: List of Debugger Commands, Prev: Debugging, Up: Debugger
-14.2 Sample `dgawk' session
-===========================
+14.2 Sample Debugging Session
+=============================
-In order to illustrate the use of `dgawk', let's look at a sample
-debugging session. We will use the `awk' implementation of the POSIX
-`uniq' command described earlier (*note Uniq Program::) as our example.
+In order to illustrate the use of `gawk' as a debugger, let's look at a
+sample debugging session. We will use the `awk' implementation of the
+POSIX `uniq' command described earlier (*note Uniq Program::) as our
+example.
* Menu:
-* dgawk invocation:: `dgawk' Invocation.
-* Finding The Bug:: Finding The Bug.
+* Debugger Invocation:: How to Start the Debugger.
+* Finding The Bug:: Finding the Bug.

-File: gawk.info, Node: dgawk invocation, Next: Finding The Bug, Up: Sample dgawk session
+File: gawk.info, Node: Debugger Invocation, Next: Finding The Bug, Up: Sample Debugging Session
-14.2.1 `dgawk' Invocation
--------------------------
+14.2.1 How to Start the Debugger
+--------------------------------
-Starting `dgawk' is exactly like running `awk'. The file(s) containing
-the program and any supporting code are given on the command line as
-arguments to one or more `-f' options. (`dgawk' is not designed to
-debug command-line programs, only programs contained in files.) In our
-case, we call `dgawk' like this:
+Starting the debugger is almost exactly like running `awk', except you
+have to pass an additional option `--debug' or the corresponding short
+option `-D'. The file(s) containing the program and any supporting
+code are given on the command line as arguments to one or more `-f'
+options. (`gawk' is not designed to debug command-line programs, only
+programs contained in files.) In our case, we invoke the debugger like
+this:
- $ dgawk -f getopt.awk -f join.awk -f uniq.awk inputfile
+ $ gawk -D -f getopt.awk -f join.awk -f uniq.awk inputfile
where both `getopt.awk' and `uniq.awk' are in `$AWKPATH'. (Experienced
users of GDB or similar debuggers should note that this syntax is
-slightly different from what they are used to. With `dgawk', the
-arguments for running the program are given in the command line to the
-debugger rather than as part of the `run' command at the debugger
+slightly different from what they are used to. With `gawk' debugger,
+the arguments for running the program are given in the command line to
+the debugger rather than as part of the `run' command at the debugger
prompt.)
Instead of immediately running the program on `inputfile', as `gawk'
-would ordinarily do, `dgawk' merely loads all the program source files,
-compiles them internally, and then gives us a prompt:
+would ordinarily do, the debugger merely loads all the program source
+files, compiles them internally, and then gives us a prompt:
- dgawk>
+ gawk>
from which we can issue commands to the debugger. At this point, no
code has been executed.

-File: gawk.info, Node: Finding The Bug, Prev: dgawk invocation, Up: Sample dgawk session
+File: gawk.info, Node: Finding The Bug, Prev: Debugger Invocation, Up: Sample Debugging Session
-14.2.2 Finding The Bug
+14.2.2 Finding the Bug
----------------------
Let's say that we are having a problem using (a faulty version of)
@@ -18936,27 +19056,27 @@ for a breakpoint in `uniq.awk' is at the beginning of the function
`are_equal()', which compares the current line with the previous one.
To set the breakpoint, use the `b' (breakpoint) command:
- dgawk> b are_equal
+ gawk> b are_equal
-| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64
The debugger tells us the file and line number where the breakpoint
is. Now type `r' or `run' and the program runs until it hits the
breakpoint for the first time:
- dgawk> r
+ gawk> r
-| Starting program:
-| Stopping in Rule ...
-| Breakpoint 1, are_equal(n, m, clast, cline, alast, aline)
at `awklib/eg/prog/uniq.awk':64
-| 64 if (fcount == 0 && charcount == 0)
- dgawk>
+ gawk>
Now we can look at what's going on inside our program. First of all,
let's see how we got to where we are. At the prompt, we type `bt'
-(short for "backtrace"), and `dgawk' responds with a listing of the
-current stack frames:
+(short for "backtrace"), and the debugger responds with a listing of
+the current stack frames:
- dgawk> bt
+ gawk> bt
-| #0 are_equal(n, m, clast, cline, alast, aline)
at `awklib/eg/prog/uniq.awk':69
-| #1 in main() at `awklib/eg/prog/uniq.awk':89
@@ -18970,9 +19090,9 @@ the key to finding the source of the problem.)
Now that we're in `are_equal()', we can start looking at the values
of some variables. Let's say we type `p n' (`p' is short for "print").
We would expect to see the value of `n', a parameter to `are_equal()'.
-Actually, `dgawk' gives us:
+Actually, the debugger gives us:
- dgawk> p n
+ gawk> p n
-| n = untyped variable
In this case, `n' is an uninitialized local variable, since the
@@ -18980,13 +19100,13 @@ function was called without arguments (*note Function Calls::).
A more useful variable to display might be the current record:
- dgawk> p $0
+ gawk> p $0
-| $0 = string ("gawk is a wonderful program!")
This might be a bit puzzling at first since this is the second line of
our test input above. Let's look at `NR':
- dgawk> p NR
+ gawk> p NR
-| NR = number (2)
So we can see that `are_equal()' was only called for the second record
@@ -19000,7 +19120,7 @@ for `NR == 1':
OK, let's just check that that rule worked correctly:
- dgawk> p last
+ gawk> p last
-| last = string ("awk is a wonderful program!")
Everything we have done so far has verified that the program has
@@ -19009,7 +19129,7 @@ the problem must be inside this function. To investigate further, we
must begin "stepping through" the lines of `are_equal()'. We start by
typing `n' (for "next"):
- dgawk> n
+ gawk> n
-| 67 if (fcount > 0) {
This tells us that `gawk' is now ready to execute line 67, which
@@ -19025,15 +19145,15 @@ was false.)
Continuing to step, we now get to the splitting of the current and
last records:
- dgawk> n
+ gawk> n
-| 68 n = split(last, alast)
- dgawk> n
+ gawk> n
-| 69 m = split($0, aline)
At this point, we should be curious to see what our records were
split into, so we try to look:
- dgawk> p n m alast aline
+ gawk> p n m alast aline
-| n = number (5)
-| m = number (5)
-| alast = array, 5 elements
@@ -19049,19 +19169,19 @@ want to see inside the array?
The first choice would be to use subscripts:
- dgawk> p alast[0]
+ gawk> p alast[0]
-| "0" not in array `alast'
Oops!
- dgawk> p alast[1]
+ gawk> p alast[1]
-| alast["1"] = string ("awk")
- This would be kind of slow for a 100-member array, though, so
-`dgawk' provides a shortcut (reminiscent of another language not to be
+ This would be kind of slow for a 100-member array, though, so `gawk'
+provides a shortcut (reminiscent of another language not to be
mentioned):
- dgawk> p @alast
+ gawk> p @alast
-| alast["1"] = string ("awk")
-| alast["2"] = string ("is")
-| alast["3"] = string ("a")
@@ -19070,9 +19190,9 @@ mentioned):
It looks like we got this far OK. Let's take another step or two:
- dgawk> n
+ gawk> n
-| 70 clast = join(alast, fcount, n)
- dgawk> n
+ gawk> n
-| 71 cline = join(aline, fcount, m)
Well, here we are at our error (sorry to spoil the suspense). What
@@ -19080,7 +19200,7 @@ we had in mind was to join the fields starting from the second one to
make the virtual record to compare, and if the first field was numbered
zero, this would work. Let's look at what we've got:
- dgawk> p cline clast
+ gawk> p cline clast
-| cline = string ("gawk is a wonderful program!")
-| clast = string ("awk is a wonderful program!")
@@ -19088,9 +19208,9 @@ zero, this would work. Let's look at what we've got:
unaltered, input records. A little thinking (the human brain is still
the best debugging tool), and we realize that we were off by one!
- We get out of `dgawk':
+ We get out of the debugger:
- dgawk> q
+ gawk> q
-| The program is running. Exit anyway (y/n)? y
Then we get into an editor:
@@ -19101,12 +19221,13 @@ Then we get into an editor:
and problem solved!

-File: gawk.info, Node: List of Debugger Commands, Next: Readline Support, Prev: Sample dgawk session, Up: Debugger
+File: gawk.info, Node: List of Debugger Commands, Next: Readline Support, Prev: Sample Debugging Session, Up: Debugger
-14.3 Main `dgawk' Commands
-==========================
+14.3 Main Debugger Commands
+===========================
-The `dgawk' command set can be divided into the following categories:
+The `gawk' debugger command set can be divided into the following
+categories:
* Breakpoint control
@@ -19122,26 +19243,26 @@ The `dgawk' command set can be divided into the following categories:
Each of these are discussed in the following subsections. In the
following descriptions, commands which may be abbreviated show the
-abbreviation on a second description line. A `dgawk' command name may
-also be truncated if that partial name is unambiguous. `dgawk' has the
-built-in capability to automatically repeat the previous command when
-just hitting <Enter>. This works for the commands `list', `next',
+abbreviation on a second description line. A debugger command name may
+also be truncated if that partial name is unambiguous. The debugger has
+the built-in capability to automatically repeat the previous command
+when just hitting <Enter>. This works for the commands `list', `next',
`nexti', `step', `stepi' and `continue' executed without any argument.
* Menu:
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program and
- the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Breakpoint Control:: Control of Breakpoints.
+* Debugger Execution Control:: Control of Execution.
+* Viewing And Changing Data:: Viewing and Changing Data.
+* Execution Stack:: Dealing with the Stack.
+* Debugger Info:: Obtaining Information about the Program and
+ the Debugger State.
+* Miscellaneous Debugger Commands:: Miscellaneous Commands.

-File: gawk.info, Node: Breakpoint Control, Next: Dgawk Execution Control, Up: List of Debugger Commands
+File: gawk.info, Node: Breakpoint Control, Next: Debugger Execution Control, Up: List of Debugger Commands
-14.3.1 Control Of Breakpoints
+14.3.1 Control of Breakpoints
-----------------------------
As we saw above, the first thing you probably want to do in a debugging
@@ -19169,10 +19290,10 @@ controlling breakpoints are:
it from the breakpoint list using the `delete' command.
With a breakpoint, you may also supply a condition. This is an
- `awk' expression (enclosed in double quotes) that `dgawk'
+ `awk' expression (enclosed in double quotes) that the debugger
evaluates whenever the breakpoint is reached. If the condition is
- true, then `dgawk' stops execution and prompts for a command.
- Otherwise, `dgawk' continues executing the program.
+ true, then the debugger stops execution and prompts for a command.
+ Otherwise, it continues executing the program.
`clear' [[FILENAME`:']N | FUNCTION]
Without any argument, delete any breakpoint at the next instruction
@@ -19194,12 +19315,13 @@ controlling breakpoints are:
`condition' N `"EXPRESSION"'
Add a condition to existing breakpoint or watchpoint N. The
- condition is an `awk' expression that `dgawk' evaluates whenever
- the breakpoint or watchpoint is reached. If the condition is true,
- then `dgawk' stops execution and prompts for a command. Otherwise,
- `dgawk' continues executing the program. If the condition
- expression is not specified, any existing condition is removed;
- i.e., the breakpoint or watchpoint is made unconditional.
+ condition is an `awk' expression that the debugger evaluates
+ whenever the breakpoint or watchpoint is reached. If the condition
+ is true, then the debugger stops execution and prompts for a
+ command. Otherwise, the debugger continues executing the program.
+ If the condition expression is not specified, any existing
+ condition is removed; i.e., the breakpoint or watchpoint is made
+ unconditional.
`delete' [N1 N2 ...] [N-M]
`d' [N1 N2 ...] [N-M]
@@ -19233,7 +19355,7 @@ controlling breakpoints are:
arguments are the same as for `break'.

-File: gawk.info, Node: Dgawk Execution Control, Next: Viewing And Changing Data, Prev: Breakpoint Control, Up: List of Debugger Commands
+File: gawk.info, Node: Debugger Execution Control, Next: Viewing And Changing Data, Prev: Breakpoint Control, Up: List of Debugger Commands
14.3.2 Control of Execution
---------------------------
@@ -19256,14 +19378,14 @@ execution of the program than we saw in our earlier example:
`continue') terminates the list (an implicit `end'), and
subsequent commands are ignored. For example:
- dgawk> commands
+ gawk> commands
> silent
> printf "A silent breakpoint; i = %d\n", i
> info locals
> set i = 10
> continue
> end
- dgawk>
+ gawk>
`continue' [COUNT]
`c' [COUNT]
@@ -19296,9 +19418,9 @@ execution of the program than we saw in our earlier example:
`run'
`r'
- Start/restart execution of the program. When restarting, `dgawk'
- retains the current breakpoints, watchpoints, command history,
- automatic display variables, and debugger options.
+ Start/restart execution of the program. When restarting, the
+ debugger retains the current breakpoints, watchpoints, command
+ history, automatic display variables, and debugger options.
`step' [COUNT]
`s' [COUNT]
@@ -19313,7 +19435,7 @@ execution of the program than we saw in our earlier example:
Execute one (or COUNT) instruction(s), stepping inside function
calls. (For illustration of what is meant by an "instruction" in
`gawk', see the output shown under `dump' in *note Miscellaneous
- Dgawk Commands::.)
+ Debugger Commands::.)
`until' [[FILENAME`:']N | FUNCTION]
`u' [[FILENAME`:']N | FUNCTION]
@@ -19323,7 +19445,7 @@ execution of the program than we saw in our earlier example:
current stack frame returns.

-File: gawk.info, Node: Viewing And Changing Data, Next: Dgawk Stack, Prev: Dgawk Execution Control, Up: List of Debugger Commands
+File: gawk.info, Node: Viewing And Changing Data, Next: Execution Stack, Prev: Debugger Execution Control, Up: List of Debugger Commands
14.3.3 Viewing and Changing Data
--------------------------------
@@ -19335,7 +19457,7 @@ The commands for viewing and changing variables inside of `gawk' are:
of the variable or field is displayed each time the program stops.
Each variable added to the list is identified by a unique number:
- dgawk> display x
+ gawk> display x
-| 10: x = 1
displays the assigned item number, the variable name and its
@@ -19363,7 +19485,7 @@ AWK STATEMENTS
Print the value of a `gawk' variable or field. Fields must be
referenced by constants:
- dgawk> print $3
+ gawk> print $3
This prints the third field in the input record (if the specified
field does not exist, it prints `Null field'). A variable can be
@@ -19391,16 +19513,16 @@ AWK STATEMENTS
`watch' VAR | `$'N [`"EXPRESSION"']
`w' VAR | `$'N [`"EXPRESSION"']
- Add variable VAR (or field `$N') to the watch list. `dgawk' then
- stops whenever the value of the variable or field changes. Each
- watched item is assigned a number which can be used to delete it
- from the watch list using the `unwatch' command.
+ Add variable VAR (or field `$N') to the watch list. The debugger
+ then stops whenever the value of the variable or field changes.
+ Each watched item is assigned a number which can be used to delete
+ it from the watch list using the `unwatch' command.
With a watchpoint, you may also supply a condition. This is an
- `awk' expression (enclosed in double quotes) that `dgawk'
+ `awk' expression (enclosed in double quotes) that the debugger
evaluates whenever the watchpoint is reached. If the condition is
- true, then `dgawk' stops execution and prompts for a command.
- Otherwise, `dgawk' continues executing the program.
+ true, then the debugger stops execution and prompts for a command.
+ Otherwise, `gawk' continues executing the program.
`undisplay' [N]
Remove item number N (or all items, if no argument) from the
@@ -19412,9 +19534,9 @@ AWK STATEMENTS

-File: gawk.info, Node: Dgawk Stack, Next: Dgawk Info, Prev: Viewing And Changing Data, Up: List of Debugger Commands
+File: gawk.info, Node: Execution Stack, Next: Debugger Info, Prev: Viewing And Changing Data, Up: List of Debugger Commands
-14.3.4 Dealing With The Stack
+14.3.4 Dealing with the Stack
-----------------------------
Whenever you run a program which contains any function calls, `gawk'
@@ -19449,16 +19571,17 @@ are:
frame. Then select and print the frame.

-File: gawk.info, Node: Dgawk Info, Next: Miscellaneous Dgawk Commands, Prev: Dgawk Stack, Up: List of Debugger Commands
+File: gawk.info, Node: Debugger Info, Next: Miscellaneous Debugger Commands, Prev: Execution Stack, Up: List of Debugger Commands
-14.3.5 Obtaining Information About The Program and The Debugger State
+14.3.5 Obtaining Information about the Program and the Debugger State
---------------------------------------------------------------------
Besides looking at the values of variables, there is often a need to get
other sorts of information about the state of your program and of the
-debugging environment itself. `dgawk' has one command which provides
-this information, appropriately called `info'. `info' is used with one
-of a number of arguments that tell it exactly what you want to know:
+debugging environment itself. The `gawk' debugger has one command which
+provides this information, appropriately called `info'. `info' is used
+with one of a number of arguments that tell it exactly what you want to
+know:
`info' WHAT
`i' WHAT
@@ -19486,10 +19609,10 @@ of a number of arguments that tell it exactly what you want to know:
`source'
The name of the current source file. Each time the program
stops, the current source file is the file containing the
- current instruction. When `dgawk' first starts, the current
- source file is the first file included via the `-f' option.
- The `list FILENAME:LINENO' command can be used at any time to
- change the current source.
+ current instruction. When the debugger first starts, the
+ current source file is the first file included via the `-f'
+ option. The `list FILENAME:LINENO' command can be used at any
+ time to change the current source.
`sources'
List all program sources.
@@ -19513,7 +19636,7 @@ from a file. The commands are:
`history_size'
The maximum number of lines to keep in the history file
- `./.dgawk_history'. The default is 100.
+ `./.gawk_history'. The default is 100.
`listsize'
The number of lines that `list' prints. The default is 15.
@@ -19524,14 +19647,14 @@ from a file. The commands are:
standard output.
`prompt'
- The debugger prompt. The default is `dgawk> '.
+ The debugger prompt. The default is `gawk> '.
`save_history [on | off]'
- Save command history to file `./.dgawk_history'. The default
+ Save command history to file `./.gawk_history'. The default
is `on'.
`save_options [on | off]'
- Save current options to file `./.dgawkrc' upon exit. The
+ Save current options to file `./.gawkrc' upon exit. The
default is `on'. Options are read back in to the next
session upon startup.
@@ -19549,15 +19672,15 @@ from a file. The commands are:
ignored; they do _not_ repeat the last command. You can't restart
the program by having more than one `run' command in the file.
Also, the list of commands may include additional `source'
- commands; however, `dgawk' will not source the same file more than
- once in order to avoid infinite recursion.
+ commands; however, the `gawk' debugger will not source the same
+ file more than once in order to avoid infinite recursion.
In addition to, or instead of the `source' command, you can use
- the `-R FILE' or `--command=FILE' command-line options to execute
+ the `-D FILE' or `--debug=FILE' command-line options to execute
commands from a file non-interactively (*note Options::.

-File: gawk.info, Node: Miscellaneous Dgawk Commands, Prev: Dgawk Info, Up: List of Debugger Commands
+File: gawk.info, Node: Miscellaneous Debugger Commands, Prev: Debugger Info, Up: List of Debugger Commands
14.3.6 Miscellaneous Commands
-----------------------------
@@ -19573,7 +19696,7 @@ categories, as follows:
partial dump of Davide Brini's obfuscated code (*note Signature
Program::) demonstrates:
- dgawk> dump
+ gawk> dump
-| # BEGIN
-|
-| [ 2:0x89faef4] Op_rule : [in_rule = BEGIN] [source_file = brini.awk]
@@ -19622,13 +19745,13 @@ categories, as follows:
-| [ :0x89fa3b0] Op_after_beginfile :
-| [ :0x89fa388] Op_no_op :
-| [ :0x89fa3c4] Op_after_endfile :
- dgawk>
+ gawk>
`help'
`h'
- Print a list of all of the `dgawk' commands with a short summary
- of their usage. `help COMMAND' prints the information about the
- command COMMAND.
+ Print a list of all of the `gawk' debugger commands with a short
+ summary of their usage. `help COMMAND' prints the information
+ about the command COMMAND.
`list' [`-' | `+' | N | FILENAME`:'N | N-M | FUNCTION]
`l' [`-' | `+' | N | FILENAME`:'N | N-M | FUNCTION]
@@ -19662,7 +19785,7 @@ categories, as follows:
Exit the debugger. Debugging is great fun, but sometimes we all
have to tend to other obligations in life, and sometimes we find
the bug, and are free to go on to the next one! As we saw above,
- if you are running a program, `dgawk' warns you if you
+ if you are running a program, the debugger warns you if you
accidentally type `q' or `quit', to make sure you really want to
quit.
@@ -19677,12 +19800,12 @@ categories, as follows:

-File: gawk.info, Node: Readline Support, Next: Dgawk Limitations, Prev: List of Debugger Commands, Up: Debugger
+File: gawk.info, Node: Readline Support, Next: Limitations, Prev: List of Debugger Commands, Up: Debugger
14.4 Readline Support
=====================
-If `dgawk' is compiled with the `readline' library, you can take
+If `gawk' is compiled with the `readline' library, you can take
advantage of that library's command completion and history expansion
features. The following types of completion are available:
@@ -19704,27 +19827,27 @@ Variable name completion

-File: gawk.info, Node: Dgawk Limitations, Prev: Readline Support, Up: Debugger
+File: gawk.info, Node: Limitations, Prev: Readline Support, Up: Debugger
14.5 Limitations and Future Plans
=================================
-We hope you find `dgawk' useful and enjoyable to work with, but as with
-any program, especially in its early releases, it still has some
-limitations. A few which are worth being aware of are:
+We hope you find the `gawk' debugger useful and enjoyable to work with,
+but as with any program, especially in its early releases, it still has
+some limitations. A few which are worth being aware of are:
- * At this point, `dgawk' does not give a detailed explanation of
+ * At this point, the debugger does not give a detailed explanation of
what you did wrong when you type in something it doesn't like.
Rather, it just responds `syntax error'. When you do figure out
what your mistake was, though, you'll feel like a real guru.
- * If you perused the dump of opcodes in *note Miscellaneous Dgawk
+ * If you perused the dump of opcodes in *note Miscellaneous Debugger
Commands::, (or if you are already familiar with `gawk' internals),
you will realize that much of the internal manipulation of data in
`gawk', as in many interpreters, is done on a stack. `Op_push',
`Op_pop', etc., are the "bread and butter" of most `gawk' code.
- Unfortunately, as of now, `dgawk' does not allow you to examine
- the stack's contents.
+ Unfortunately, as of now, the `gawk' debugger does not allow you
+ to examine the stack's contents.
That is, the intermediate results of expression evaluation are on
the stack, but cannot be printed. Rather, only variables which
@@ -19737,13 +19860,15 @@ limitations. A few which are worth being aware of are:
expressions to see if you got it right. As an `awk' programmer,
you are expected to know what `/[^[:alnum:][:blank:]]/' means.
- * `dgawk' is designed to be used by running a program (with all its
- parameters) on the command line, as described in *note dgawk
- invocation::. There is no way (as of now) to attach or "break in"
- to a running program. This seems reasonable for a language which
- is used mainly for quickly executing, short programs.
+ * The `gawk' debugger is designed to be used by running a program
+ (with all its parameters) on the command line, as described in
+ *note Debugger Invocation::. There is no way (as of now) to
+ attach or "break in" to a running program. This seems reasonable
+ for a language which is used mainly for quickly executing, short
+ programs.
- * `dgawk' only accepts source supplied with the `-f' option.
+ * The `gawk' debugger only accepts source supplied with the `-f'
+ option.
Look forward to a future release when these and other missing
features may be added, and of course feel free to try to add them
@@ -20319,7 +20444,7 @@ Info file, in approximate chronological order:
Windows32 environments. (This is no longer supported)
* John Haque reworked the `gawk' internals to use a byte-code engine,
- providing the `dgawk' debugger for `awk' programs.
+ providing the `gawk' debugger for `awk' programs.
* Efraim Yawitz contributed the original text for *note Debugger::.
@@ -21336,9 +21461,10 @@ Unix `awk'
`pawk'
Nelson H.F. Beebe at the University of Utah has modified Brian
Kernighan's `awk' to provide timing and profiling information. It
- is different from `pgawk' (*note Profiling::), in that it uses
- CPU-based profiling, not line-count profiling. You may find it at
- either `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or
+ is different from `gawk' with the `--profile' option. (*note
+ Profiling::), in that it uses CPU-based profiling, not line-count
+ profiling. You may find it at either
+ `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or
`http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'.
Busybox Awk
@@ -21735,6 +21861,7 @@ is necessary when reading this minor node.
* Internals:: A brief look at some `gawk' internals.
* Plugin License:: A note about licensing.
+* Loading Extensions:: How to load dynamic extensions.
* Sample Library:: A example of new functions.

@@ -21779,16 +21906,9 @@ when writing extensions. The next minor node shows how they are used:
is current. It may end up calling an internal `gawk' function.
It also guarantees that the wide string is zero-terminated.
-`size_t get_curfunc_arg_count(void)'
- This function returns the actual number of parameters passed to
- the current function. Inside the code of an extension this can be
- used to determine the maximum index which is safe to use with
- `get_actual_argument'. If this value is greater than `nargs', the
- function was called incorrectly from the `awk' program.
-
`nargs'
- Inside an extension function, this is the maximum number of
- expected parameters, as set by the `make_builtin()' function.
+ Inside an extension function, this is the actual number of
+ parameters passed to the current function.
`n->stptr'
`n->stlen'
@@ -21816,12 +21936,10 @@ when writing extensions. The next minor node shows how they are used:
Clears the associative array pointed to by `n'. Make sure that
`n->type == Node_var_array' first.
-`NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)'
+`NODE **assoc_lookup(NODE *symbol, NODE *subs)'
Finds, and installs if necessary, array elements. `symbol' is the
array, `subs' is the subscript. This is usually a value created
- with `make_string()' (see below). `reference' should be `TRUE' if
- it is an error to use the value before it is created. Typically,
- `FALSE' is the correct value to use from extension functions.
+ with `make_string()' (see below).
`NODE *make_string(char *s, size_t len)'
Take a C string and turn it into a pointer to a `NODE' that can be
@@ -21943,7 +22061,7 @@ function parameter.
just blindly copy this code.

-File: gawk.info, Node: Plugin License, Next: Sample Library, Prev: Internals, Up: Dynamic Extensions
+File: gawk.info, Node: Plugin License, Next: Loading Extensions, Prev: Internals, Up: Dynamic Extensions
C.3.2 Extension Licensing
-------------------------
@@ -21960,9 +22078,54 @@ the symbol exists in the global scope. Something like this is enough:
int plugin_is_GPL_compatible;

-File: gawk.info, Node: Sample Library, Prev: Plugin License, Up: Dynamic Extensions
+File: gawk.info, Node: Loading Extensions, Next: Sample Library, Prev: Plugin License, Up: Dynamic Extensions
+
+C.3.3 Loading a Dynamic Extension
+---------------------------------
+
+There are two ways to load a dynamically linked library. The first is
+to use the builtin `extension()':
+
+ extension(libname, init_func)
+
+ where `libname' is the library to load, and `init_func' is the name
+of the initialization or bootstrap routine to run once loaded.
+
+ The second method for dynamic loading of a library is to use the
+command line option `-l':
+
+ $ gawk -l libname -f myprog
+
+ This will work only if the initialization routine is named
+`dlload()'.
+
+ If you use `extension()', the library will be loaded at run time.
+This means that the functions are available only to the rest of your
+script. If you use the command line option `-l' instead, the library
+will be loaded before `gawk' starts compiling the actual program. The
+net effect is that you can use those functions anywhere in the program.
+
+ `gawk' has a list of directories where it searches for libraries.
+By default, the list includes directories that depend upon how gawk was
+built and installed (*note AWKPATH Variable::). If you want `gawk' to
+look for libraries in your private directory, you have to tell it. The
+way to do it is to set the `AWKPATH' environment variable (*note
+AWKPATH Variable::). `gawk' supplies the default suffix `.so' if it is
+not present in the name of the library. If the name of your library is
+`mylib.so', you can simply type
+
+ $ gawk -l mylib -f myprog
+
+ and `gawk' will do everything necessary to load in your library, and
+then call your `dlload()' routine.
+
+ You can always specify the library using an absolute pathname, in
+which case `gawk' will not use `AWKPATH' to search for it.
+
+
+File: gawk.info, Node: Sample Library, Prev: Loading Extensions, Up: Dynamic Extensions
-C.3.3 Example: Directory and File Operation Built-ins
+C.3.4 Example: Directory and File Operation Built-ins
-----------------------------------------------------
Two useful functions that are not in `awk' are `chdir()' (so that an
@@ -21979,7 +22142,7 @@ implements these functions for `gawk' in an external extension library.

File: gawk.info, Node: Internal File Description, Next: Internal File Ops, Up: Sample Library
-C.3.3.1 Using `chdir()' and `stat()'
+C.3.4.1 Using `chdir()' and `stat()'
....................................
This minor node shows how to use the new functions at the `awk' level
@@ -22102,7 +22265,7 @@ Elements::):

File: gawk.info, Node: Internal File Ops, Next: Using Internal File Ops, Prev: Internal File Description, Up: Sample Library
-C.3.3.2 C Code for `chdir()' and `stat()'
+C.3.4.2 C Code for `chdir()' and `stat()'
.........................................
Here is the C code for these extensions. They were written for
@@ -22123,7 +22286,7 @@ other POSIX-compliant systems:(1)
NODE *newdir;
int ret = -1;
- if (do_lint && get_curfunc_arg_count() != 1)
+ if (do_lint && nargs != 1)
lintwarn("chdir: called with incorrect number of arguments");
newdir = get_scalar_argument(0, FALSE);
@@ -22180,7 +22343,7 @@ declarations and argument checking:
char *pmode; /* printable mode */
char *type = "unknown";
- if (do_lint && get_curfunc_arg_count() > 2)
+ if (do_lint && nargs > 2)
lintwarn("stat: called with too many arguments");
Then comes the actual work. First, the function gets the arguments.
@@ -22207,15 +22370,15 @@ link. If there's an error, it sets `ERRNO' and returns:
calls are shown here, since they all follow the same pattern:
/* fill in the array */
- aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4));
*aptr = dupnode(file);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4));
*aptr = make_number((AWKNUM) sbuf.st_mode);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5));
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
unref(tmp);
@@ -22252,7 +22415,7 @@ version.

File: gawk.info, Node: Using Internal File Ops, Prev: Internal File Ops, Up: Sample Library
-C.3.3.3 Integrating the Extensions
+C.3.4.3 Integrating the Extensions
..................................
Now that the code is written, it must be possible to add it at runtime
@@ -24690,8 +24853,8 @@ Index
* ' (single quote): One-shot. (line 15)
* ' (single quote), vs. apostrophe: Comments. (line 27)
* ' (single quote), with double quotes: Quoting. (line 53)
+* () (parentheses) <1>: Profiling. (line 138)
* () (parentheses): Regexp Operators. (line 79)
-* () (parentheses), pgawk program: Profiling. (line 141)
* * (asterisk), * operator, as multiplication operator: Precedence.
(line 55)
* * (asterisk), * operator, as regexp operator: Regexp Operators.
@@ -24723,71 +24886,74 @@ Index
* --assign option: Options. (line 32)
* --c option: Options. (line 78)
* --characters-as-bytes option: Options. (line 68)
-* --command option: Options. (line 231)
* --copyright option: Options. (line 85)
+* --debug option: Options. (line 105)
* --disable-lint configuration option: Additional Configuration Options.
(line 9)
* --disable-nls configuration option: Additional Configuration Options.
(line 24)
* --dump-variables option <1>: Library Names. (line 45)
* --dump-variables option: Options. (line 90)
-* --exec option: Options. (line 113)
+* --exec option: Options. (line 122)
* --field-separator option: Options. (line 21)
* --file option: Options. (line 25)
* --gen-pot option <1>: String Extraction. (line 6)
-* --gen-pot option: Options. (line 135)
-* --help option: Options. (line 142)
-* --L option: Options. (line 245)
-* --lint option <1>: Options. (line 147)
+* --gen-pot option: Options. (line 144)
+* --help option: Options. (line 151)
+* --L option: Options. (line 263)
+* --lint option <1>: Options. (line 163)
* --lint option: Command Line. (line 20)
-* --lint-old option: Options. (line 245)
+* --lint-old option: Options. (line 263)
+* --load option: Options. (line 156)
* --non-decimal-data option <1>: Nondecimal Data. (line 6)
-* --non-decimal-data option: Options. (line 166)
+* --non-decimal-data option: Options. (line 182)
* --non-decimal-data option, strtonum() function and: Nondecimal Data.
(line 36)
-* --optimize option: Options. (line 179)
-* --posix option: Options. (line 199)
-* --posix option, --traditional option and: Options. (line 218)
-* --profile option <1>: Profiling. (line 15)
-* --profile option: Options. (line 186)
-* --re-interval option: Options. (line 224)
-* --sandbox option: Options. (line 236)
+* --optimize option: Options. (line 203)
+* --posix option: Options. (line 222)
+* --posix option, --traditional option and: Options. (line 241)
+* --pretty-print option: Options. (line 195)
+* --profile option <1>: Profiling. (line 12)
+* --profile option: Options. (line 210)
+* --re-interval option: Options. (line 247)
+* --sandbox option: Options. (line 254)
* --sandbox option, disabling system() function: I/O Functions.
(line 85)
* --sandbox option, input redirection with getline: Getline. (line 19)
* --sandbox option, output redirection with print, printf: Redirection.
(line 6)
-* --source option: Options. (line 105)
+* --source option: Options. (line 114)
* --traditional option: Options. (line 78)
-* --traditional option, --posix option and: Options. (line 218)
-* --use-lc-numeric option: Options. (line 174)
-* --version option: Options. (line 250)
+* --traditional option, --posix option and: Options. (line 241)
+* --use-lc-numeric option: Options. (line 190)
+* --version option: Options. (line 268)
* --with-whiny-user-strftime configuration option: Additional Configuration Options.
(line 29)
* -b option: Options. (line 68)
* -C option: Options. (line 85)
+* -D option: Options. (line 105)
* -d option: Options. (line 90)
-* -E option: Options. (line 113)
-* -e option: Options. (line 105)
+* -E option: Options. (line 122)
+* -e option: Options. (line 114)
* -F option: Command Line Field Separator.
(line 6)
* -f option: Options. (line 25)
* -F option: Options. (line 21)
* -f option: Long. (line 12)
-* -F option, -Ft sets FS to TAB: Options. (line 258)
-* -f option, on command line: Options. (line 263)
-* -g option: Options. (line 135)
-* -h option: Options. (line 142)
-* -l option: Options. (line 147)
-* -N option: Options. (line 174)
-* -n option: Options. (line 166)
-* -O option: Options. (line 179)
-* -P option: Options. (line 199)
-* -p option: Options. (line 186)
-* -R option: Options. (line 231)
-* -r option: Options. (line 224)
-* -S option: Options. (line 236)
-* -V option: Options. (line 250)
+* -F option, -Ft sets FS to TAB: Options. (line 276)
+* -f option, on command line: Options. (line 281)
+* -g option: Options. (line 144)
+* -h option: Options. (line 151)
+* -l option: Options. (line 156)
+* -N option: Options. (line 190)
+* -n option: Options. (line 182)
+* -O option: Options. (line 203)
+* -o option: Options. (line 195)
+* -P option: Options. (line 222)
+* -p option: Options. (line 210)
+* -r option: Options. (line 247)
+* -S option: Options. (line 254)
+* -V option: Options. (line 268)
* -v option: Options. (line 32)
* -v option, variables, assigning: Assignment Options. (line 12)
* -W option: Options. (line 46)
@@ -24976,18 +25142,18 @@ Index
* arguments, command-line, invoking awk: Command Line. (line 6)
* arguments, in function calls: Function Calls. (line 16)
* arguments, processing: Getopt Function. (line 6)
-* arguments, retrieving: Internals. (line 120)
+* arguments, retrieving: Internals. (line 111)
* arithmetic operators: Arithmetic Ops. (line 6)
* arrays: Arrays. (line 6)
* arrays, as parameters to functions: Pass By Value/Reference.
(line 47)
* arrays, associative: Array Intro. (line 50)
-* arrays, associative, clearing: Internals. (line 75)
+* arrays, associative, clearing: Internals. (line 68)
* arrays, associative, library functions and: Library Names. (line 57)
* arrays, deleting entire contents: Delete. (line 39)
* arrays, elements, assigning: Assigning Elements. (line 6)
* arrays, elements, deleting: Delete. (line 6)
-* arrays, elements, installing: Internals. (line 79)
+* arrays, elements, installing: Internals. (line 72)
* arrays, elements, order of: Scanning an Array. (line 48)
* arrays, elements, referencing: Reference to Elements.
(line 6)
@@ -25026,8 +25192,8 @@ Index
* assignment operators, evaluation order: Assignment Ops. (line 111)
* assignment operators, lvalues/rvalues: Assignment Ops. (line 32)
* assignments as filenames: Ignoring Assigns. (line 6)
-* assoc_clear() internal function: Internals. (line 75)
-* assoc_lookup() internal function: Internals. (line 79)
+* assoc_clear() internal function: Internals. (line 68)
+* assoc_lookup() internal function: Internals. (line 72)
* associative arrays: Array Intro. (line 50)
* asterisk (*), * operator, as multiplication operator: Precedence.
(line 55)
@@ -25043,7 +25209,10 @@ 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 105)
+* awk enabling: Options. (line 195)
* awk language, POSIX version: Assignment Ops. (line 136)
+* awk profiling, enabling: Options. (line 210)
* awk programs <1>: Two Rules. (line 6)
* awk programs <2>: Executable Scripts. (line 6)
* awk programs: Getting Started. (line 12)
@@ -25059,7 +25228,6 @@ Index
* awk programs, location of: Options. (line 25)
* awk programs, one-line examples: Very Simple. (line 45)
* awk programs, profiling: Profiling. (line 6)
-* awk programs, profiling, enabling: Options. (line 186)
* awk programs, running <1>: Long. (line 6)
* awk programs, running: Running gawk. (line 6)
* awk programs, running, from shell scripts: One-shot. (line 22)
@@ -25099,7 +25267,7 @@ Index
* AWKNUM internal type: Internals. (line 19)
* AWKPATH environment variable <1>: PC Using. (line 11)
* AWKPATH environment variable: AWKPATH Variable. (line 6)
-* awkprof.out file: Profiling. (line 10)
+* awkprof.out file: Profiling. (line 6)
* awksed.awk program: Simple Sed. (line 25)
* awkvars.out file: Options. (line 90)
* b debugger command (alias for break): Breakpoint Control. (line 11)
@@ -25153,12 +25321,13 @@ Index
* backslash (\), in escape sequences, POSIX and: Escape Sequences.
(line 113)
* backslash (\), regexp constants: Computed Regexps. (line 28)
-* backtrace debugger command: Dgawk Stack. (line 13)
+* backtrace debugger command: Execution Stack. (line 13)
* BBS-list file: Sample Data Files. (line 6)
* Beebe, Nelson <1>: Other Versions. (line 69)
* Beebe, Nelson: Acknowledgments. (line 60)
-* BEGIN pattern <1>: BEGIN/END. (line 6)
-* BEGIN pattern <2>: Field Separators. (line 44)
+* BEGIN pattern <1>: Profiling. (line 62)
+* BEGIN pattern <2>: BEGIN/END. (line 6)
+* BEGIN pattern <3>: Field Separators. (line 44)
* BEGIN pattern: Records. (line 29)
* BEGIN pattern, assert() user-defined function and: Assert Function.
(line 83)
@@ -25173,7 +25342,6 @@ Index
* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
(line 20)
* BEGIN pattern, operators and: Using BEGIN/END. (line 17)
-* BEGIN pattern, pgawk program: Profiling. (line 65)
* BEGIN pattern, print statement and: I/O And BEGIN/END. (line 16)
* BEGIN pattern, pwcat program: Passwd Functions. (line 143)
* BEGIN pattern, running awk programs and: Cut Program. (line 68)
@@ -25202,8 +25370,8 @@ Index
* Boolean expressions, as patterns: Expression Patterns. (line 41)
* Boolean operators, See Boolean expressions: Boolean Ops. (line 6)
* Bourne shell, quoting rules for: Quoting. (line 18)
+* braces ({}): Profiling. (line 134)
* braces ({}), actions and: Action Overview. (line 19)
-* braces ({}), pgawk program: Profiling. (line 137)
* braces ({}), statements, grouping: Statements. (line 10)
* bracket expressions <1>: Bracket Expressions. (line 6)
* bracket expressions: Regexp Operators. (line 55)
@@ -25230,7 +25398,7 @@ Index
* Broder, Alan J.: Contributors. (line 88)
* Brown, Martin: Contributors. (line 82)
* BSD-based operating systems: Glossary. (line 611)
-* bt debugger command (alias for backtrace): Dgawk Stack. (line 13)
+* bt debugger command (alias for backtrace): Execution Stack. (line 13)
* Buening, Andreas <1>: Bugs. (line 71)
* Buening, Andreas <2>: Contributors. (line 92)
* Buening, Andreas: Acknowledgments. (line 60)
@@ -25248,7 +25416,7 @@ Index
* 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 78)
+* Busybox Awk: Other Versions. (line 79)
* call by reference: Pass By Value/Reference.
(line 47)
* call by value: Pass By Value/Reference.
@@ -25268,7 +25436,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 113)
+* CGI, awk scripts for: Options. (line 122)
* 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.
@@ -25298,7 +25466,7 @@ Index
* close() function, two-way pipes and: Two-way I/O. (line 77)
* Close, Diane <1>: Contributors. (line 21)
* Close, Diane: Manual History. (line 41)
-* close_func() input method: Internals. (line 160)
+* close_func() input method: Internals. (line 151)
* collating elements: Bracket Expressions. (line 69)
* collating symbols: Bracket Expressions. (line 76)
* Colombo, Antonio: Acknowledgments. (line 60)
@@ -25322,7 +25490,7 @@ Index
* 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)
-* commands debugger command: Dgawk Execution Control.
+* commands debugger command: Debugger Execution Control.
(line 10)
* commenting: Comments. (line 6)
* commenting, backslash continuation and: Statements/Lines. (line 76)
@@ -25399,7 +25567,7 @@ Index
* cos() function: Numeric Functions. (line 15)
* counting: Wc Program. (line 6)
* csh utility: Statements/Lines. (line 44)
-* csh utility, POSIXLY_CORRECT environment variable: Options. (line 305)
+* csh utility, POSIXLY_CORRECT environment variable: Options. (line 323)
* csh utility, |& operator, comparison with: Two-way I/O. (line 44)
* ctime() user-defined function: Function Example. (line 72)
* currency symbols, localization: Explaining gettext. (line 103)
@@ -25407,7 +25575,7 @@ Index
(line 30)
* cut utility: Cut Program. (line 6)
* cut.awk program: Cut Program. (line 45)
-* d debugger command (alias for delete): Breakpoint Control. (line 63)
+* d debugger command (alias for delete): Breakpoint Control. (line 64)
* d.c., See dark corner: Conventions. (line 38)
* dark corner <1>: Glossary. (line 193)
* dark corner <2>: Truth Values. (line 24)
@@ -25471,113 +25639,113 @@ Index
(line 33)
* deadlocks: Two-way I/O. (line 70)
* debugger commands, b (break): Breakpoint Control. (line 11)
-* debugger commands, backtrace: Dgawk Stack. (line 13)
+* debugger commands, backtrace: Execution Stack. (line 13)
* debugger commands, break: Breakpoint Control. (line 11)
-* debugger commands, bt (backtrace): Dgawk Stack. (line 13)
-* debugger commands, c (continue): Dgawk Execution Control.
+* debugger commands, bt (backtrace): Execution Stack. (line 13)
+* debugger commands, c (continue): Debugger Execution Control.
(line 33)
* debugger commands, clear: Breakpoint Control. (line 36)
-* debugger commands, commands: Dgawk Execution Control.
+* debugger commands, commands: Debugger Execution Control.
(line 10)
* debugger commands, condition: Breakpoint Control. (line 54)
-* debugger commands, continue: Dgawk Execution Control.
+* debugger commands, continue: Debugger Execution Control.
(line 33)
-* debugger commands, d (delete): Breakpoint Control. (line 63)
-* debugger commands, delete: Breakpoint Control. (line 63)
-* debugger commands, disable: Breakpoint Control. (line 68)
+* debugger commands, d (delete): Breakpoint Control. (line 64)
+* debugger commands, delete: Breakpoint Control. (line 64)
+* debugger commands, disable: Breakpoint Control. (line 69)
* debugger commands, display: Viewing And Changing Data.
(line 8)
-* debugger commands, down: Dgawk Stack. (line 21)
-* debugger commands, dump: Miscellaneous Dgawk Commands.
+* debugger commands, down: Execution Stack. (line 21)
+* debugger commands, dump: Miscellaneous Debugger Commands.
(line 9)
-* debugger commands, e (enable): Breakpoint Control. (line 72)
-* debugger commands, enable: Breakpoint Control. (line 72)
-* debugger commands, end: Dgawk Execution Control.
+* debugger commands, e (enable): Breakpoint Control. (line 73)
+* debugger commands, enable: Breakpoint Control. (line 73)
+* debugger commands, end: Debugger Execution Control.
(line 10)
* debugger commands, eval: Viewing And Changing Data.
(line 23)
-* debugger commands, f (frame): Dgawk Stack. (line 25)
-* debugger commands, finish: Dgawk Execution Control.
+* debugger commands, f (frame): Execution Stack. (line 25)
+* debugger commands, finish: Debugger Execution Control.
(line 39)
-* debugger commands, frame: Dgawk Stack. (line 25)
-* debugger commands, h (help): Miscellaneous Dgawk Commands.
+* debugger commands, frame: Execution Stack. (line 25)
+* debugger commands, h (help): Miscellaneous Debugger Commands.
(line 68)
-* debugger commands, help: Miscellaneous Dgawk Commands.
+* debugger commands, help: Miscellaneous Debugger Commands.
(line 68)
-* debugger commands, i (info): Dgawk Info. (line 12)
-* debugger commands, ignore: Breakpoint Control. (line 86)
-* debugger commands, info: Dgawk Info. (line 12)
-* debugger commands, l (list): Miscellaneous Dgawk Commands.
+* debugger commands, i (info): Debugger Info. (line 13)
+* debugger commands, ignore: Breakpoint Control. (line 87)
+* debugger commands, info: Debugger Info. (line 13)
+* debugger commands, l (list): Miscellaneous Debugger Commands.
(line 74)
-* debugger commands, list: Miscellaneous Dgawk Commands.
+* debugger commands, list: Miscellaneous Debugger Commands.
(line 74)
-* debugger commands, n (next): Dgawk Execution Control.
+* debugger commands, n (next): Debugger Execution Control.
(line 43)
-* debugger commands, next: Dgawk Execution Control.
+* debugger commands, next: Debugger Execution Control.
(line 43)
-* debugger commands, nexti: Dgawk Execution Control.
+* debugger commands, nexti: Debugger Execution Control.
(line 49)
-* debugger commands, ni (nexti): Dgawk Execution Control.
+* debugger commands, ni (nexti): Debugger Execution Control.
(line 49)
-* debugger commands, o (option): Dgawk Info. (line 56)
-* debugger commands, option: Dgawk Info. (line 56)
+* debugger commands, o (option): Debugger Info. (line 57)
+* debugger commands, option: Debugger Info. (line 57)
* debugger commands, p (print): Viewing And Changing Data.
(line 36)
* debugger commands, print: Viewing And Changing Data.
(line 36)
* debugger commands, printf: Viewing And Changing Data.
(line 54)
-* debugger commands, q (quit): Miscellaneous Dgawk Commands.
+* debugger commands, q (quit): Miscellaneous Debugger Commands.
(line 101)
-* debugger commands, quit: Miscellaneous Dgawk Commands.
+* debugger commands, quit: Miscellaneous Debugger Commands.
(line 101)
-* debugger commands, r (run): Dgawk Execution Control.
+* debugger commands, r (run): Debugger Execution Control.
(line 62)
-* debugger commands, return: Dgawk Execution Control.
+* debugger commands, return: Debugger Execution Control.
(line 54)
-* debugger commands, run: Dgawk Execution Control.
+* debugger commands, run: Debugger Execution Control.
(line 62)
-* debugger commands, s (step): Dgawk Execution Control.
+* debugger commands, s (step): Debugger Execution Control.
(line 68)
* debugger commands, set: Viewing And Changing Data.
(line 59)
-* debugger commands, si (stepi): Dgawk Execution Control.
+* debugger commands, si (stepi): Debugger Execution Control.
(line 76)
-* debugger commands, silent: Dgawk Execution Control.
+* debugger commands, silent: Debugger Execution Control.
(line 10)
-* debugger commands, step: Dgawk Execution Control.
+* debugger commands, step: Debugger Execution Control.
(line 68)
-* debugger commands, stepi: Dgawk Execution Control.
+* debugger commands, stepi: Debugger Execution Control.
(line 76)
-* debugger commands, t (tbreak): Breakpoint Control. (line 89)
-* debugger commands, tbreak: Breakpoint Control. (line 89)
-* debugger commands, trace: Miscellaneous Dgawk Commands.
+* debugger commands, t (tbreak): Breakpoint Control. (line 90)
+* debugger commands, tbreak: Breakpoint Control. (line 90)
+* debugger commands, trace: Miscellaneous Debugger Commands.
(line 110)
-* debugger commands, u (until): Dgawk Execution Control.
+* debugger commands, u (until): Debugger Execution Control.
(line 83)
* debugger commands, undisplay: Viewing And Changing Data.
(line 80)
-* debugger commands, until: Dgawk Execution Control.
+* debugger commands, until: Debugger Execution Control.
(line 83)
* debugger commands, unwatch: Viewing And Changing Data.
(line 84)
-* debugger commands, up: Dgawk Stack. (line 33)
+* debugger commands, up: Execution Stack. (line 33)
* debugger commands, w (watch): Viewing And Changing Data.
(line 67)
* debugger commands, watch: Viewing And Changing Data.
(line 67)
+* debugging awk programs: Debugger. (line 6)
* debugging gawk, bug reports: Bugs. (line 9)
-* decimal point character, locale specific: Options. (line 215)
+* decimal point character, locale specific: Options. (line 238)
* decrement operators: Increment Ops. (line 35)
* default keyword: Switch Statement. (line 6)
* Deifik, Scott <1>: Bugs. (line 70)
* Deifik, Scott <2>: Contributors. (line 54)
* Deifik, Scott: Acknowledgments. (line 60)
-* delete debugger command: Breakpoint Control. (line 63)
+* delete debugger command: Breakpoint Control. (line 64)
* delete statement: Delete. (line 6)
* deleting elements in arrays: Delete. (line 6)
* deleting entire arrays: Delete. (line 39)
-* dgawk: Debugger. (line 6)
* differences between gawk and awk: String Functions. (line 196)
* differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV.
(line 88)
@@ -25648,7 +25816,7 @@ Index
(line 6)
* directories, searching <1>: Igawk Program. (line 368)
* directories, searching: AWKPATH Variable. (line 6)
-* disable debugger command: Breakpoint Control. (line 68)
+* disable debugger command: Breakpoint Control. (line 69)
* display debugger command: Viewing And Changing Data.
(line 8)
* division: Arithmetic Ops. (line 44)
@@ -25666,14 +25834,14 @@ Index
* double quote (") <1>: Quoting. (line 37)
* double quote ("): Read Terminal. (line 25)
* double quote ("), regexp constants: Computed Regexps. (line 28)
-* down debugger command: Dgawk Stack. (line 21)
+* down debugger command: Execution Stack. (line 21)
* Drepper, Ulrich: Acknowledgments. (line 52)
* DuBois, John: Acknowledgments. (line 60)
-* dump debugger command: Miscellaneous Dgawk Commands.
+* dump debugger command: Miscellaneous Debugger Commands.
(line 9)
-* dupnode() internal function: Internals. (line 96)
+* dupnode() internal function: Internals. (line 87)
* dupword.awk program: Dupword Program. (line 31)
-* e debugger command (alias for enable): Breakpoint Control. (line 72)
+* e debugger command (alias for enable): Breakpoint Control. (line 73)
* EBCDIC: Ordinal Functions. (line 45)
* egrep utility <1>: Egrep Program. (line 6)
* egrep utility: Bracket Expressions. (line 24)
@@ -25689,9 +25857,10 @@ Index
* empty pattern: Empty. (line 6)
* empty strings, See null strings: Regexp Field Splitting.
(line 43)
-* enable debugger command: Breakpoint Control. (line 72)
-* end debugger command: Dgawk Execution Control.
+* enable debugger command: Breakpoint Control. (line 73)
+* end debugger command: Debugger Execution Control.
(line 10)
+* END pattern <1>: Profiling. (line 62)
* END pattern: BEGIN/END. (line 6)
* END pattern, assert() user-defined function and: Assert Function.
(line 75)
@@ -25703,7 +25872,6 @@ Index
* END pattern, next/nextfile statements and: I/O And BEGIN/END.
(line 37)
* END pattern, operators and: Using BEGIN/END. (line 17)
-* END pattern, pgawk program: Profiling. (line 65)
* END pattern, print statement and: I/O And BEGIN/END. (line 16)
* ENDFILE pattern: BEGINFILE/ENDFILE. (line 6)
* ENDFILE pattern, Boolean patterns and: Expression Patterns. (line 73)
@@ -25712,7 +25880,7 @@ Index
* endgrent() user-defined function: Group Functions. (line 218)
* endpwent() function (C library): Passwd Functions. (line 210)
* endpwent() user-defined function: Passwd Functions. (line 213)
-* ENVIRON array <1>: Internals. (line 149)
+* ENVIRON array <1>: Internals. (line 140)
* ENVIRON array: Auto-set. (line 60)
* environment variables: Auto-set. (line 60)
* epoch, definition of: Glossary. (line 239)
@@ -25721,7 +25889,7 @@ Index
* equals sign (=), == operator: Comparison Operators.
(line 11)
* EREs (Extended Regular Expressions): Bracket Expressions. (line 24)
-* ERRNO variable <1>: Internals. (line 139)
+* ERRNO variable <1>: Internals. (line 130)
* ERRNO variable <2>: TCP/IP Networking. (line 54)
* ERRNO variable <3>: Auto-set. (line 72)
* ERRNO variable <4>: BEGINFILE/ENDFILE. (line 26)
@@ -25770,7 +25938,7 @@ Index
(line 9)
* expressions, selecting: Conditional Exp. (line 6)
* Extended Regular Expressions (EREs): Bracket Expressions. (line 24)
-* eXtensible Markup Language (XML): Internals. (line 160)
+* eXtensible Markup Language (XML): Internals. (line 151)
* extension() function (gawk): Using Internal File Ops.
(line 15)
* extensions, Brian Kernighan's awk <1>: Other Versions. (line 13)
@@ -25795,7 +25963,7 @@ Index
* extract.awk program: Extract Program. (line 78)
* extraction, of marked strings (internationalization): String Extraction.
(line 6)
-* f debugger command (alias for frame): Dgawk Stack. (line 25)
+* f debugger command (alias for frame): Execution Stack. (line 25)
* false, logical: Truth Values. (line 6)
* FDL (Free Documentation License): GNU Free Documentation License.
(line 6)
@@ -25862,7 +26030,7 @@ Index
* files, /inet6/... (gawk): TCP/IP Networking. (line 6)
* files, as single records: Records. (line 196)
* files, awk programs in: Long. (line 6)
-* files, awkprof.out: Profiling. (line 10)
+* files, awkprof.out: Profiling. (line 6)
* files, awkvars.out: Options. (line 90)
* files, closing: I/O Functions. (line 10)
* files, descriptors, See file descriptors: Special FD. (line 6)
@@ -25891,7 +26059,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 135)
+* files, portable object, generating: Options. (line 144)
* files, processing, ARGIND variable and: Auto-set. (line 47)
* files, reading: Rewind Function. (line 6)
* files, reading, multiline records: Multiple Line. (line 6)
@@ -25900,7 +26068,7 @@ Index
* files, source, search path for: Igawk Program. (line 368)
* files, splitting: Split Program. (line 6)
* files, Texinfo, extracting programs from: Extract Program. (line 6)
-* finish debugger command: Dgawk Execution Control.
+* finish debugger command: Debugger Execution Control.
(line 39)
* Fish, Fred: Contributors. (line 51)
* fixed-width data: Constant Size. (line 9)
@@ -25935,7 +26103,7 @@ Index
* FPAT variable <1>: User-modified. (line 45)
* FPAT variable: Splitting By Content.
(line 26)
-* frame debugger command: Dgawk Stack. (line 25)
+* frame debugger command: Execution Stack. (line 25)
* Free Documentation License (FDL): GNU Free Documentation License.
(line 6)
* Free Software Foundation (FSF) <1>: Glossary. (line 301)
@@ -25947,7 +26115,7 @@ Index
* FS variable, --field-separator option and: Options. (line 21)
* FS variable, as null string: Single Character Fields.
(line 20)
-* FS variable, as TAB character: Options. (line 211)
+* FS variable, as TAB character: Options. (line 234)
* FS variable, changing value of: Field Separators. (line 34)
* FS variable, running awk programs and: Cut Program. (line 68)
* FS variable, setting from command line: Command Line Field Separator.
@@ -25992,13 +26160,13 @@ Index
* functions, names of <1>: Definition Syntax. (line 20)
* functions, names of: Arrays. (line 18)
* functions, recursive: Definition Syntax. (line 73)
-* functions, return values, setting: Internals. (line 139)
+* functions, return values, setting: Internals. (line 130)
* functions, string-translation: I18N Functions. (line 6)
* functions, undefined: Pass By Value/Reference.
(line 71)
* functions, user-defined: User-defined. (line 6)
* functions, user-defined, calling: Calling A Function. (line 6)
-* functions, user-defined, counts: Profiling. (line 132)
+* functions, user-defined, counts: Profiling. (line 129)
* functions, user-defined, library of: Library Functions. (line 6)
* functions, user-defined, next/nextfile statements and <1>: Nextfile Statement.
(line 44)
@@ -26006,6 +26174,7 @@ Index
(line 45)
* G-d: Acknowledgments. (line 81)
* Garfinkle, Scott: Contributors. (line 35)
+* gawk program, dynamic profiling: Profiling. (line 171)
* gawk, ARGIND variable in: Other Arguments. (line 12)
* gawk, awk and <1>: This Manual. (line 14)
* gawk, awk and: Preface. (line 23)
@@ -26032,7 +26201,7 @@ Index
(line 139)
* gawk, ERRNO variable in: Getline. (line 19)
* gawk, escape sequences: Escape Sequences. (line 125)
-* gawk, extensions, disabling: Options. (line 199)
+* gawk, extensions, disabling: Options. (line 222)
* gawk, features, adding: Adding Code. (line 6)
* gawk, features, advanced: Advanced Features. (line 6)
* gawk, fflush() function in: I/O Functions. (line 44)
@@ -26046,6 +26215,7 @@ Index
(line 26)
* gawk, function arguments and: Calling Built-in. (line 16)
* gawk, functions, adding: Dynamic Extensions. (line 10)
+* gawk, functions, loading: Loading Extensions. (line 6)
* gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42)
* gawk, IGNORECASE variable in <1>: Array Sorting Functions.
(line 81)
@@ -26096,7 +26266,7 @@ Index
* gawk, TEXTDOMAIN variable in: User-modified. (line 153)
* gawk, timestamps: Time Functions. (line 6)
* gawk, uses for: Preface. (line 36)
-* gawk, versions of, information about, printing: Options. (line 250)
+* gawk, versions of, information about, printing: Options. (line 268)
* gawk, VMS version of: VMS Installation. (line 6)
* gawk, word-boundary operator: GNU Regexp Operators.
(line 63)
@@ -26106,12 +26276,11 @@ Index
* gensub() function (gawk): Using Constant Regexps.
(line 43)
* gensub() function (gawk), escape processing: Gory Details. (line 6)
-* get_actual_argument() internal function: Internals. (line 125)
-* get_argument() internal function: Internals. (line 120)
-* get_array_argument() internal macro: Internals. (line 136)
-* get_curfunc_arg_count() internal function: Internals. (line 42)
-* get_record() input method: Internals. (line 160)
-* get_scalar_argument() internal macro: Internals. (line 133)
+* get_actual_argument() internal function: Internals. (line 116)
+* get_argument() internal function: Internals. (line 111)
+* get_array_argument() internal macro: Internals. (line 127)
+* get_record() input method: Internals. (line 151)
+* get_scalar_argument() internal macro: Internals. (line 124)
* getaddrinfo() function (C library): TCP/IP Networking. (line 38)
* getgrent() function (C library): Group Functions. (line 6)
* getgrent() user-defined function: Group Functions. (line 6)
@@ -26157,7 +26326,7 @@ Index
* GNU Lesser General Public License: Glossary. (line 397)
* GNU long options <1>: Options. (line 6)
* GNU long options: Command Line. (line 13)
-* GNU long options, printing list of: Options. (line 142)
+* GNU long options, printing list of: Options. (line 151)
* GNU Project <1>: Glossary. (line 319)
* GNU Project: Manual History. (line 11)
* GNU/Linux <1>: Glossary. (line 611)
@@ -26176,7 +26345,7 @@ Index
(line 43)
* gsub() function, arguments of: String Functions. (line 462)
* gsub() function, escape processing: Gory Details. (line 6)
-* h debugger command (alias for help): Miscellaneous Dgawk Commands.
+* h debugger command (alias for help): Miscellaneous Debugger Commands.
(line 68)
* Hankerson, Darrel <1>: Contributors. (line 61)
* Hankerson, Darrel: Acknowledgments. (line 60)
@@ -26185,13 +26354,13 @@ Index
* Hartholz, Elaine: Acknowledgments. (line 38)
* Hartholz, Marshall: Acknowledgments. (line 38)
* Hasegawa, Isamu: Contributors. (line 94)
-* help debugger command: Miscellaneous Dgawk Commands.
+* help debugger command: Miscellaneous Debugger Commands.
(line 68)
* hexadecimal numbers: Nondecimal-numbers. (line 6)
-* hexadecimal values, enabling interpretation of: Options. (line 166)
+* hexadecimal values, enabling interpretation of: Options. (line 182)
* histsort.awk program: History Sorting. (line 25)
* Hughes, Phil: Acknowledgments. (line 43)
-* HUP signal: Profiling. (line 204)
+* HUP signal: Profiling. (line 203)
* hyphen (-), - operator: Precedence. (line 52)
* hyphen (-), -- (decrement/increment) operators: Precedence. (line 46)
* hyphen (-), -- operator: Increment Ops. (line 48)
@@ -26199,14 +26368,14 @@ Index
* hyphen (-), -= operator: Assignment Ops. (line 129)
* hyphen (-), filenames beginning with: Options. (line 59)
* hyphen (-), in bracket expressions: Bracket Expressions. (line 17)
-* i debugger command (alias for info): Dgawk Info. (line 12)
+* i debugger command (alias for info): Debugger Info. (line 13)
* id utility: Id Program. (line 6)
* id.awk program: Id Program. (line 30)
* if statement <1>: If Statement. (line 6)
* if statement: Regexp Usage. (line 19)
* if statement, actions, changing: Ranges. (line 25)
* igawk.sh program: Igawk Program. (line 124)
-* ignore debugger command: Breakpoint Control. (line 86)
+* ignore debugger command: Breakpoint Control. (line 87)
* IGNORECASE variable <1>: Array Sorting Functions.
(line 81)
* IGNORECASE variable <2>: String Functions. (line 29)
@@ -26234,7 +26403,7 @@ Index
* index() function: String Functions. (line 155)
* indexing arrays: Array Intro. (line 50)
* indirect function calls: Indirect Calls. (line 6)
-* info debugger command: Dgawk Info. (line 12)
+* info debugger command: Debugger Info. (line 13)
* initialization, automatic: More Complex. (line 38)
* input files: Reading Files. (line 6)
* input files, closing: Close Files And Pipes.
@@ -26259,42 +26428,41 @@ Index
* insomnia, cure for: Alarm Program. (line 6)
* installation, VMS: VMS Installation. (line 6)
* installing gawk: Installation. (line 6)
-* INT signal (MS-Windows): Profiling. (line 207)
+* INT signal (MS-Windows): Profiling. (line 206)
* int() function: Numeric Functions. (line 23)
* integers: Basic Data Typing. (line 21)
* integers, unsigned: Basic Data Typing. (line 30)
* interacting with other programs: I/O Functions. (line 63)
-* internal constant, INVALID_HANDLE: Internals. (line 160)
-* internal function, assoc_clear(): Internals. (line 75)
-* internal function, assoc_lookup(): Internals. (line 79)
-* internal function, dupnode(): Internals. (line 96)
+* internal constant, INVALID_HANDLE: Internals. (line 151)
+* internal function, assoc_clear(): Internals. (line 68)
+* internal function, assoc_lookup(): Internals. (line 72)
+* internal function, dupnode(): Internals. (line 87)
* internal function, force_number(): Internals. (line 27)
* internal function, force_string(): Internals. (line 32)
* internal function, force_wstring(): Internals. (line 37)
-* internal function, get_actual_argument(): Internals. (line 125)
-* internal function, get_argument(): Internals. (line 120)
-* internal function, get_curfunc_arg_count(): Internals. (line 42)
-* internal function, iop_alloc(): Internals. (line 160)
-* internal function, make_builtin(): Internals. (line 106)
-* internal function, make_number(): Internals. (line 91)
-* internal function, make_string(): Internals. (line 86)
-* internal function, register_deferred_variable(): Internals. (line 149)
-* internal function, register_open_hook(): Internals. (line 160)
-* internal function, unref(): Internals. (line 101)
-* internal function, update_ERRNO(): Internals. (line 139)
-* internal function, update_ERRNO_saved(): Internals. (line 144)
-* internal macro, get_array_argument(): Internals. (line 136)
-* internal macro, get_scalar_argument(): Internals. (line 133)
-* internal structure, IOBUF: Internals. (line 160)
+* internal function, get_actual_argument(): Internals. (line 116)
+* internal function, get_argument(): Internals. (line 111)
+* internal function, iop_alloc(): Internals. (line 151)
+* internal function, make_builtin(): Internals. (line 97)
+* internal function, make_number(): Internals. (line 82)
+* internal function, make_string(): Internals. (line 77)
+* internal function, register_deferred_variable(): Internals. (line 140)
+* internal function, register_open_hook(): Internals. (line 151)
+* internal function, unref(): Internals. (line 92)
+* internal function, update_ERRNO(): Internals. (line 130)
+* internal function, update_ERRNO_saved(): Internals. (line 135)
+* internal macro, get_array_argument(): Internals. (line 127)
+* internal macro, get_scalar_argument(): Internals. (line 124)
+* internal structure, IOBUF: Internals. (line 151)
* internal type, AWKNUM: Internals. (line 19)
* internal type, NODE: Internals. (line 23)
-* internal variable, nargs: Internals. (line 49)
-* internal variable, stlen: Internals. (line 53)
-* internal variable, stptr: Internals. (line 53)
-* internal variable, type: Internals. (line 66)
-* internal variable, vname: Internals. (line 71)
-* internal variable, wstlen: Internals. (line 61)
-* internal variable, wstptr: Internals. (line 61)
+* internal variable, nargs: Internals. (line 42)
+* internal variable, stlen: Internals. (line 46)
+* internal variable, stptr: Internals. (line 46)
+* internal variable, type: Internals. (line 59)
+* internal variable, vname: Internals. (line 64)
+* internal variable, wstlen: Internals. (line 54)
+* internal variable, wstptr: Internals. (line 54)
* internationalization <1>: I18N and L10N. (line 6)
* internationalization: I18N Functions. (line 6)
* internationalization, localization <1>: Internationalization.
@@ -26314,10 +26482,10 @@ Index
* interpreted programs <1>: Glossary. (line 361)
* interpreted programs: Basic High Level. (line 14)
* interval expressions: Regexp Operators. (line 116)
-* INVALID_HANDLE internal constant: Internals. (line 160)
+* INVALID_HANDLE internal constant: Internals. (line 151)
* inventory-shipped file: Sample Data Files. (line 32)
-* IOBUF internal structure: Internals. (line 160)
-* iop_alloc() internal function: Internals. (line 160)
+* IOBUF internal structure: Internals. (line 151)
+* iop_alloc() internal function: Internals. (line 151)
* isarray() function (gawk): Type Functions. (line 11)
* ISO: Glossary. (line 372)
* ISO 8859-1: Glossary. (line 141)
@@ -26325,9 +26493,9 @@ Index
* Jacobs, Andrew: Passwd Functions. (line 90)
* Jaegermann, Michal <1>: Contributors. (line 46)
* Jaegermann, Michal: Acknowledgments. (line 60)
-* Java implementation of awk: Other Versions. (line 96)
+* Java implementation of awk: Other Versions. (line 97)
* Java programming language: Glossary. (line 380)
-* jawk: Other Versions. (line 96)
+* jawk: Other Versions. (line 97)
* Jedi knights: Undocumented. (line 6)
* join() user-defined function: Join Function. (line 18)
* Kahrs, Ju"rgen <1>: Contributors. (line 70)
@@ -26342,10 +26510,10 @@ Index
* Kernighan, Brian <6>: Acknowledgments. (line 75)
* Kernighan, Brian <7>: Conventions. (line 34)
* Kernighan, Brian: History. (line 17)
-* kill command, dynamic profiling: Profiling. (line 182)
+* kill command, dynamic profiling: Profiling. (line 180)
* Knights, jedi: Undocumented. (line 6)
* Kwok, Conrad: Contributors. (line 35)
-* l debugger command (alias for list): Miscellaneous Dgawk Commands.
+* l debugger command (alias for list): Miscellaneous Debugger Commands.
(line 74)
* labels.awk program: Labels Program. (line 51)
* languages, data-driven: Basic High Level. (line 83)
@@ -26371,7 +26539,7 @@ Index
* length() function: String Functions. (line 166)
* Lesser General Public License (LGPL): Glossary. (line 397)
* LGPL (Lesser General Public License): Glossary. (line 397)
-* libmawk: Other Versions. (line 104)
+* libmawk: Other Versions. (line 105)
* libraries of awk functions: Library Functions. (line 6)
* libraries of awk functions, assertions: Assert Function. (line 6)
* libraries of awk functions, associative arrays and: Library Names.
@@ -26409,20 +26577,22 @@ Index
* lint checking, array subscripts: Uninitialized Subscripts.
(line 43)
* lint checking, empty programs: Command Line. (line 16)
-* lint checking, issuing warnings: Options. (line 147)
+* lint checking, issuing warnings: Options. (line 163)
* lint checking, POSIXLY_CORRECT environment variable: Options.
- (line 289)
+ (line 307)
* lint checking, undefined functions: Pass By Value/Reference.
(line 88)
* LINT variable: User-modified. (line 98)
* Linux <1>: Glossary. (line 611)
* Linux <2>: I18N Example. (line 55)
* Linux: Manual History. (line 28)
-* list debugger command: Miscellaneous Dgawk Commands.
+* list debugger command: Miscellaneous Debugger Commands.
(line 74)
+* loading extension: Loading Extensions. (line 6)
+* loading, library: Options. (line 156)
* local variables: Variable Scope. (line 6)
* locale categories: Explaining gettext. (line 80)
-* locale decimal point character: Options. (line 215)
+* locale decimal point character: Options. (line 238)
* locale, definition of: Locales. (line 6)
* localization: I18N and L10N. (line 6)
* localization, See internationalization, localization: I18N and L10N.
@@ -26435,7 +26605,7 @@ Index
* long options: Command Line. (line 13)
* loops: While Statement. (line 6)
* loops, continue statements and: For Statement. (line 64)
-* loops, count for header: Profiling. (line 126)
+* loops, count for header: Profiling. (line 123)
* loops, exiting: Break Statement. (line 6)
* loops, See Also while statement: While Statement. (line 6)
* Lost In Space: Dynamic Extensions. (line 6)
@@ -26444,9 +26614,9 @@ Index
* lvalues/rvalues: Assignment Ops. (line 32)
* mailing labels, printing: Labels Program. (line 6)
* mailing list, GNITS: Acknowledgments. (line 52)
-* make_builtin() internal function: Internals. (line 106)
-* make_number() internal function: Internals. (line 91)
-* make_string() internal function: Internals. (line 86)
+* make_builtin() internal function: Internals. (line 97)
+* make_number() internal function: Internals. (line 82)
+* make_string() internal function: Internals. (line 77)
* mark parity: Ordinal Functions. (line 45)
* marked string extraction (internationalization): String Extraction.
(line 6)
@@ -26461,7 +26631,7 @@ Index
* matching, null strings: Gory Details. (line 164)
* mawk program: Other Versions. (line 35)
* McPhee, Patrick: Contributors. (line 100)
-* memory, releasing: Internals. (line 101)
+* memory, releasing: Internals. (line 92)
* message object files: Explaining gettext. (line 41)
* message object files, converting from portable object files: I18N Example.
(line 62)
@@ -26474,7 +26644,7 @@ Index
* modifiers, in format specifiers: Format Modifiers. (line 6)
* monetary information, localization: Explaining gettext. (line 103)
* msgfmt utility: I18N Example. (line 62)
-* n debugger command (alias for next): Dgawk Execution Control.
+* n debugger command (alias for next): Debugger Execution Control.
(line 43)
* names, arrays/variables <1>: Library Names. (line 6)
* names, arrays/variables: Arrays. (line 18)
@@ -26483,14 +26653,14 @@ Index
* namespace issues <1>: Library Names. (line 6)
* namespace issues: Arrays. (line 18)
* namespace issues, functions: Definition Syntax. (line 20)
-* nargs internal variable: Internals. (line 49)
+* nargs internal variable: Internals. (line 42)
* nawk utility: Names. (line 17)
* negative zero: Unexpected Results. (line 28)
* NetBSD: Glossary. (line 611)
* networks, programming: TCP/IP Networking. (line 6)
* networks, support for: Special Network. (line 6)
* newlines <1>: Boolean Ops. (line 67)
-* newlines <2>: Options. (line 205)
+* newlines <2>: Options. (line 228)
* newlines: Statements/Lines. (line 6)
* newlines, as field separators: Default Field Splitting.
(line 6)
@@ -26501,7 +26671,7 @@ Index
* newlines, separating statements in actions <1>: Statements. (line 10)
* newlines, separating statements in actions: Action Overview.
(line 19)
-* next debugger command: Dgawk Execution Control.
+* next debugger command: Debugger Execution Control.
(line 43)
* next statement <1>: Next Statement. (line 6)
* next statement: Boolean Ops. (line 85)
@@ -26516,16 +26686,16 @@ Index
(line 26)
* nextfile statement, user-defined functions and: Nextfile Statement.
(line 44)
-* nexti debugger command: Dgawk Execution Control.
+* nexti debugger command: Debugger Execution Control.
(line 49)
* NF variable <1>: Auto-set. (line 107)
* NF variable: Fields. (line 33)
* NF variable, decrementing: Changing Fields. (line 107)
-* ni debugger command (alias for nexti): Dgawk Execution Control.
+* ni debugger command (alias for nexti): Debugger Execution Control.
(line 49)
* noassign.awk program: Ignoring Assigns. (line 15)
* NODE internal type: Internals. (line 23)
-* nodes, duplicating: Internals. (line 96)
+* nodes, duplicating: Internals. (line 87)
* not Boolean-logic operator: Boolean Ops. (line 6)
* NR variable <1>: Auto-set. (line 118)
* NR variable: Records. (line 6)
@@ -26546,7 +26716,7 @@ Index
* number sign (#), #! (executable scripts), portability issues with: Executable Scripts.
(line 6)
* number sign (#), commenting: Comments. (line 6)
-* numbers: Internals. (line 91)
+* numbers: Internals. (line 82)
* numbers, as array subscripts: Numeric Array Subscripts.
(line 6)
* numbers, as values of characters: Ordinal Functions. (line 6)
@@ -26566,11 +26736,11 @@ Index
* numeric, output format: OFMT. (line 6)
* numeric, strings: Variable Typing. (line 6)
* numeric, values: Internals. (line 27)
-* o debugger command (alias for option): Dgawk Info. (line 56)
+* o debugger command (alias for option): Debugger Info. (line 57)
* oawk utility: Names. (line 17)
* obsolete features: Obsolete. (line 6)
* octal numbers: Nondecimal-numbers. (line 6)
-* octal values, enabling interpretation of: Options. (line 166)
+* octal values, enabling interpretation of: Options. (line 182)
* OFMT variable <1>: User-modified. (line 115)
* OFMT variable <2>: Conversion. (line 55)
* OFMT variable: OFMT. (line 15)
@@ -26579,7 +26749,7 @@ Index
* OFS variable <2>: Output Separators. (line 6)
* OFS variable: Changing Fields. (line 64)
* OpenBSD: Glossary. (line 611)
-* OpenSolaris: Other Versions. (line 86)
+* OpenSolaris: Other Versions. (line 87)
* operating systems, BSD-based: Manual History. (line 28)
* operating systems, PC, gawk on: PC Using. (line 6)
* operating systems, PC, gawk on, installing: PC Installation.
@@ -26612,7 +26782,7 @@ Index
(line 48)
* operators, word-boundary (gawk): GNU Regexp Operators.
(line 63)
-* option debugger command: Dgawk Info. (line 56)
+* option debugger command: Debugger Info. (line 57)
* options, command-line <1>: Command Line Field Separator.
(line 6)
* options, command-line <2>: Options. (line 6)
@@ -26623,7 +26793,7 @@ Index
* options, deprecated: Obsolete. (line 6)
* options, long <1>: Options. (line 6)
* options, long: Command Line. (line 13)
-* options, printing list of: Options. (line 142)
+* options, printing list of: Options. (line 151)
* OR bitwise operation: Bitwise Functions. (line 6)
* or Boolean-logic operator: Boolean Ops. (line 6)
* or() function (gawk): Bitwise Functions. (line 48)
@@ -26649,15 +26819,15 @@ Index
(line 36)
* P1003.1 POSIX standard: Glossary. (line 454)
* P1003.2 POSIX standard: Glossary. (line 454)
-* parameters, number of: Internals. (line 49)
+* parameters, number of: Internals. (line 42)
+* parentheses () <1>: Profiling. (line 138)
* parentheses (): Regexp Operators. (line 79)
-* parentheses (), pgawk program: Profiling. (line 141)
* password file: Passwd Functions. (line 16)
* patsplit() function: String Functions. (line 293)
* patterns: Patterns and Actions.
(line 6)
* patterns, comparison expressions as: Expression Patterns. (line 14)
-* patterns, counts: Profiling. (line 113)
+* patterns, counts: Profiling. (line 110)
* patterns, default: Very Simple. (line 34)
* patterns, empty: Empty. (line 6)
* patterns, expressions as: Regexp Patterns. (line 6)
@@ -26675,9 +26845,6 @@ Index
* Perl: Future Extensions. (line 6)
* Peters, Arno: Contributors. (line 85)
* Peterson, Hal: Contributors. (line 40)
-* pgawk program: Profiling. (line 6)
-* pgawk program, awkprof.out file: Profiling. (line 10)
-* pgawk program, dynamic profiling: Profiling. (line 174)
* pipes, closing: Close Files And Pipes.
(line 6)
* pipes, input: Getline/Pipe. (line 6)
@@ -26718,13 +26885,13 @@ Index
* portability, NF variable, decrementing: Changing Fields. (line 115)
* portability, operators: Increment Ops. (line 61)
* portability, operators, not in POSIX awk: Precedence. (line 98)
-* portability, POSIXLY_CORRECT environment variable: Options. (line 310)
+* portability, POSIXLY_CORRECT environment variable: Options. (line 328)
* portability, substr() function: String Functions. (line 512)
* portable object files <1>: Translator i18n. (line 6)
* 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 135)
+* portable object files, generating: Options. (line 144)
* portable object template files: Explaining gettext. (line 30)
* porting gawk: New Ports. (line 6)
* positional specifiers, printf statement <1>: Printf Ordering.
@@ -26768,11 +26935,11 @@ Index
* POSIX awk, regular expressions and: Regexp Operators. (line 161)
* POSIX awk, timestamps and: Time Functions. (line 6)
* POSIX awk, | I/O operator and: Getline/Pipe. (line 52)
-* POSIX mode: Options. (line 199)
+* POSIX mode: Options. (line 222)
* POSIX, awk and: Preface. (line 23)
* POSIX, gawk extensions not included in: POSIX/GNU. (line 6)
* POSIX, programs, implementing in awk: Clones. (line 6)
-* POSIXLY_CORRECT environment variable: Options. (line 289)
+* POSIXLY_CORRECT environment variable: Options. (line 307)
* precedence <1>: Precedence. (line 6)
* precedence: Increment Ops. (line 61)
* precedence, regexp operators: Regexp Operators. (line 156)
@@ -26806,14 +26973,14 @@ 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 142)
+* printing, list of options: Options. (line 151)
* printing, mailing labels: Labels Program. (line 6)
* printing, unduplicated lines of text: Uniq Program. (line 6)
* printing, user information: Id Program. (line 6)
* private variables: Library Names. (line 11)
* processes, two-way communications with: Two-way I/O. (line 23)
* processing data: Basic High Level. (line 6)
-* PROCINFO array <1>: Internals. (line 149)
+* PROCINFO array <1>: Internals. (line 140)
* PROCINFO array <2>: Id Program. (line 15)
* PROCINFO array <3>: Group Functions. (line 6)
* PROCINFO array <4>: Passwd Functions. (line 6)
@@ -26822,8 +26989,8 @@ Index
* PROCINFO array <7>: Auto-set. (line 123)
* PROCINFO array: Obsolete. (line 11)
* profiling awk programs: Profiling. (line 6)
-* profiling awk programs, dynamically: Profiling. (line 174)
-* profiling gawk, See pgawk program: Profiling. (line 6)
+* profiling awk programs, dynamically: Profiling. (line 171)
+* profiling gawk: Profiling. (line 6)
* program, definition of: Getting Started. (line 21)
* programmers, attractiveness of: Two-way I/O. (line 6)
* programming conventions, --non-decimal-data option: Nondecimal Data.
@@ -26847,23 +27014,23 @@ Index
* programming, basic steps: Basic High Level. (line 19)
* programming, concepts: Basic Concepts. (line 6)
* pwcat program: Passwd Functions. (line 23)
-* q debugger command (alias for quit): Miscellaneous Dgawk Commands.
+* q debugger command (alias for quit): Miscellaneous Debugger Commands.
(line 101)
-* QSE Awk: Other Versions. (line 108)
+* QSE Awk: Other Versions. (line 109)
* question mark (?) regexp operator <1>: GNU Regexp Operators.
(line 59)
* question mark (?) regexp operator: Regexp Operators. (line 111)
* question mark (?), ?: operator: Precedence. (line 92)
-* QuikTrim Awk: Other Versions. (line 112)
-* quit debugger command: Miscellaneous Dgawk Commands.
+* QuikTrim Awk: Other Versions. (line 113)
+* quit debugger command: Miscellaneous Debugger Commands.
(line 101)
-* QUIT signal (MS-Windows): Profiling. (line 207)
+* QUIT signal (MS-Windows): Profiling. (line 206)
* quoting <1>: Comments. (line 27)
* quoting <2>: Long. (line 26)
* quoting: Read Terminal. (line 25)
* quoting, rules for: Quoting. (line 6)
* quoting, tricks for: Quoting. (line 71)
-* r debugger command (alias for run): Dgawk Execution Control.
+* r debugger command (alias for run): Debugger Execution Control.
(line 62)
* Rakitzis, Byron: History Sorting. (line 25)
* rand() function: Numeric Functions. (line 34)
@@ -26909,8 +27076,8 @@ Index
* regexp constants, slashes vs. quotes: Computed Regexps. (line 28)
* regexp constants, vs. string constants: Computed Regexps. (line 38)
* regexp, See regular expressions: Regexp. (line 6)
-* register_deferred_variable() internal function: Internals. (line 149)
-* register_open_hook() internal function: Internals. (line 160)
+* register_deferred_variable() internal function: Internals. (line 140)
+* register_open_hook() internal function: Internals. (line 151)
* regular expressions: Regexp. (line 6)
* regular expressions as field separators: Field Separators. (line 50)
* regular expressions, anchors in: Regexp Operators. (line 22)
@@ -26929,7 +27096,7 @@ Index
(line 59)
* regular expressions, gawk, command-line options: GNU Regexp Operators.
(line 70)
-* regular expressions, interval expressions and: Options. (line 224)
+* regular expressions, interval expressions and: Options. (line 247)
* regular expressions, leftmost longest match: Leftmost Longest.
(line 6)
* regular expressions, operators <1>: Regexp Operators. (line 6)
@@ -26945,7 +27112,7 @@ Index
* regular expressions, searching for: Egrep Program. (line 6)
* relational operators, See comparison operators: Typing and Comparison.
(line 9)
-* return debugger command: Dgawk Execution Control.
+* return debugger command: Debugger Execution Control.
(line 54)
* return statement, user-defined functions: Return Statement. (line 6)
* return values, close() function: Close Files And Pipes.
@@ -26998,12 +27165,12 @@ Index
* Rubin, Paul <1>: Contributors. (line 16)
* Rubin, Paul: History. (line 30)
* rule, definition of: Getting Started. (line 21)
-* run debugger command: Dgawk Execution Control.
+* run debugger command: Debugger Execution Control.
(line 62)
* rvalues/lvalues: Assignment Ops. (line 32)
-* s debugger command (alias for step): Dgawk Execution Control.
+* s debugger command (alias for step): Debugger Execution Control.
(line 68)
-* sandbox mode: Options. (line 236)
+* sandbox mode: Options. (line 254)
* scalar values: Basic Data Typing. (line 13)
* Schorr, Andrew: Acknowledgments. (line 60)
* Schreiber, Bert: Acknowledgments. (line 38)
@@ -27049,7 +27216,7 @@ Index
(line 6)
* shift, bitwise: Bitwise Functions. (line 32)
* short-circuit operators: Boolean Ops. (line 57)
-* si debugger command (alias for stepi): Dgawk Execution Control.
+* si debugger command (alias for stepi): Debugger Execution Control.
(line 76)
* side effects <1>: Increment Ops. (line 11)
* side effects: Concatenation. (line 42)
@@ -27064,15 +27231,15 @@ Index
* side effects, FILENAME variable: Getline Notes. (line 19)
* side effects, function calls: Function Calls. (line 54)
* side effects, statements: Action Overview. (line 32)
-* SIGHUP signal: Profiling. (line 204)
-* SIGINT signal (MS-Windows): Profiling. (line 207)
-* signals, HUP/SIGHUP: Profiling. (line 204)
-* signals, INT/SIGINT (MS-Windows): Profiling. (line 207)
-* signals, QUIT/SIGQUIT (MS-Windows): Profiling. (line 207)
-* signals, USR1/SIGUSR1: Profiling. (line 182)
-* SIGQUIT signal (MS-Windows): Profiling. (line 207)
-* SIGUSR1 signal: Profiling. (line 182)
-* silent debugger command: Dgawk Execution Control.
+* SIGHUP signal: Profiling. (line 203)
+* SIGINT signal (MS-Windows): Profiling. (line 206)
+* signals, HUP/SIGHUP: Profiling. (line 203)
+* signals, INT/SIGINT (MS-Windows): Profiling. (line 206)
+* signals, QUIT/SIGQUIT (MS-Windows): Profiling. (line 206)
+* signals, USR1/SIGUSR1: Profiling. (line 180)
+* SIGQUIT signal (MS-Windows): Profiling. (line 206)
+* SIGUSR1 signal: Profiling. (line 180)
+* silent debugger command: Debugger Execution Control.
(line 10)
* sin() function: Numeric Functions. (line 75)
* single precision floating-point: Basic Data Typing. (line 36)
@@ -27085,7 +27252,7 @@ Index
(line 6)
* Skywalker, Luke: Undocumented. (line 6)
* sleep utility: Alarm Program. (line 109)
-* Solaris, POSIX-compliant awk: Other Versions. (line 86)
+* Solaris, POSIX-compliant awk: Other Versions. (line 87)
* sort function, arrays, sorting: Array Sorting Functions.
(line 6)
* sort utility: Word Sorting. (line 50)
@@ -27094,17 +27261,17 @@ Index
(line 93)
* source code, awka: Other Versions. (line 55)
* source code, Brian Kernighan's awk: Other Versions. (line 13)
-* source code, Busybox Awk: Other Versions. (line 78)
+* source code, Busybox Awk: Other Versions. (line 79)
* source code, gawk: Gawk Distribution. (line 6)
-* source code, jawk: Other Versions. (line 96)
-* source code, libmawk: Other Versions. (line 104)
+* source code, jawk: Other Versions. (line 97)
+* source code, libmawk: Other Versions. (line 105)
* source code, mawk: Other Versions. (line 35)
-* source code, mixing: Options. (line 105)
+* source code, mixing: Options. (line 114)
* source code, pawk: Other Versions. (line 69)
-* source code, QSE Awk: Other Versions. (line 108)
-* source code, QuikTrim Awk: Other Versions. (line 112)
-* source code, Solaris awk: Other Versions. (line 86)
-* source code, xgawk: Other Versions. (line 119)
+* source code, QSE Awk: Other Versions. (line 109)
+* source code, QuikTrim Awk: Other Versions. (line 113)
+* source code, Solaris awk: Other Versions. (line 87)
+* source code, xgawk: Other Versions. (line 120)
* source files, search path for: Igawk Program. (line 368)
* sparse arrays: Array Intro. (line 71)
* Spencer, Henry: Glossary. (line 12)
@@ -27132,12 +27299,12 @@ Index
* statements, compound, control statements and: Statements. (line 10)
* statements, control, in actions: Statements. (line 6)
* statements, multiple: Statements/Lines. (line 91)
-* step debugger command: Dgawk Execution Control.
+* step debugger command: Debugger Execution Control.
(line 68)
-* stepi debugger command: Dgawk Execution Control.
+* stepi debugger command: Debugger Execution Control.
(line 76)
-* stlen internal variable: Internals. (line 53)
-* stptr internal variable: Internals. (line 53)
+* stlen internal variable: Internals. (line 46)
+* stptr internal variable: Internals. (line 46)
* stream editors <1>: Simple Sed. (line 6)
* stream editors: Field Splitting Summary.
(line 47)
@@ -27148,7 +27315,7 @@ Index
(line 6)
* string operators: Concatenation. (line 9)
* string-matching operators: Regexp Usage. (line 19)
-* strings: Internals. (line 86)
+* strings: Internals. (line 77)
* strings, converting <1>: Bitwise Functions. (line 107)
* strings, converting: Conversion. (line 6)
* strings, converting, numbers to: User-modified. (line 28)
@@ -27188,8 +27355,8 @@ Index
(line 148)
* system() function: I/O Functions. (line 63)
* systime() function (gawk): Time Functions. (line 64)
-* t debugger command (alias for tbreak): Breakpoint Control. (line 89)
-* tbreak debugger command: Breakpoint Control. (line 89)
+* t debugger command (alias for tbreak): Breakpoint Control. (line 90)
+* tbreak debugger command: Breakpoint Control. (line 90)
* Tcl: Library Names. (line 57)
* TCP/IP: TCP/IP Networking. (line 6)
* TCP/IP, support for: Special Network. (line 6)
@@ -27228,6 +27395,7 @@ Index
* time, managing: Gettimeofday Function.
(line 6)
* time, retrieving: Time Functions. (line 17)
+* timeout, reading input: Read Timeout. (line 6)
* timestamps: Time Functions. (line 6)
* timestamps, converting dates to: Time Functions. (line 74)
* timestamps, formatted: Gettimeofday Function.
@@ -27235,10 +27403,10 @@ Index
* tolower() function: String Functions. (line 523)
* toupper() function: String Functions. (line 529)
* tr utility: Translate Program. (line 6)
-* trace debugger command: Miscellaneous Dgawk Commands.
+* trace debugger command: Miscellaneous Debugger Commands.
(line 110)
* translate.awk program: Translate Program. (line 55)
-* troubleshooting, --non-decimal-data option: Options. (line 166)
+* troubleshooting, --non-decimal-data option: Options. (line 182)
* troubleshooting, == operator: Comparison Operators.
(line 37)
* troubleshooting, awk uses FS not IFS: Field Separators. (line 29)
@@ -27278,8 +27446,8 @@ Index
* trunc-mod operation: Arithmetic Ops. (line 66)
* truth values: Truth Values. (line 6)
* type conversion: Conversion. (line 21)
-* type internal variable: Internals. (line 66)
-* u debugger command (alias for until): Dgawk Execution Control.
+* type internal variable: Internals. (line 59)
+* u debugger command (alias for until): Debugger Execution Control.
(line 83)
* undefined functions: Pass By Value/Reference.
(line 71)
@@ -27304,23 +27472,23 @@ Index
(line 72)
* Unix, awk scripts and: Executable Scripts. (line 6)
* UNIXROOT variable, on OS/2 systems: PC Using. (line 17)
-* unref() internal function: Internals. (line 101)
+* unref() internal function: Internals. (line 92)
* unsigned integers: Basic Data Typing. (line 30)
-* until debugger command: Dgawk Execution Control.
+* until debugger command: Debugger Execution Control.
(line 83)
* unwatch debugger command: Viewing And Changing Data.
(line 84)
-* up debugger command: Dgawk Stack. (line 33)
-* update_ERRNO() internal function: Internals. (line 139)
-* update_ERRNO_saved() internal function: Internals. (line 144)
+* up debugger command: Execution Stack. (line 33)
+* update_ERRNO() internal function: Internals. (line 130)
+* update_ERRNO_saved() internal function: Internals. (line 135)
* user database, reading: Passwd Functions. (line 6)
* user-defined, functions: User-defined. (line 6)
-* user-defined, functions, counts: Profiling. (line 132)
+* user-defined, functions, counts: Profiling. (line 129)
* user-defined, variables: Variables. (line 6)
* user-modifiable variables: User-modified. (line 6)
* users, information about, printing: Id Program. (line 6)
* users, information about, retrieving: Passwd Functions. (line 16)
-* USR1 signal: Profiling. (line 182)
+* USR1 signal: Profiling. (line 180)
* values, numeric: Basic Data Typing. (line 13)
* values, string: Basic Data Typing. (line 13)
* variable typing: Typing and Comparison.
@@ -27363,7 +27531,7 @@ Index
* vertical bar (|), || operator <1>: Precedence. (line 89)
* vertical bar (|), || operator: Boolean Ops. (line 57)
* Vinschen, Corinna: Acknowledgments. (line 60)
-* vname internal variable: Internals. (line 71)
+* vname internal variable: Internals. (line 64)
* w debugger command (alias for watch): Viewing And Changing Data.
(line 67)
* w utility: Constant Size. (line 22)
@@ -27371,7 +27539,7 @@ Index
* Wall, Larry <1>: Future Extensions. (line 6)
* Wall, Larry: Array Intro. (line 6)
* Wallin, Anders: Acknowledgments. (line 60)
-* warnings, issuing: Options. (line 147)
+* warnings, issuing: Options. (line 163)
* watch debugger command: Viewing And Changing Data.
(line 67)
* wc utility: Wc Program. (line 6)
@@ -27383,7 +27551,7 @@ Index
* whitespace, as field separators: Default Field Splitting.
(line 6)
* whitespace, functions, calling: Calling Built-in. (line 10)
-* whitespace, newlines as: Options. (line 205)
+* whitespace, newlines as: Options. (line 228)
* Williams, Kent: Contributors. (line 35)
* Woehlke, Matthew: Contributors. (line 79)
* Woods, John: Contributors. (line 28)
@@ -27397,11 +27565,11 @@ Index
* words, counting: Wc Program. (line 6)
* words, duplicate, searching for: Dupword Program. (line 6)
* words, usage counts, generating: Word Sorting. (line 6)
-* wstlen internal variable: Internals. (line 61)
-* wstptr internal variable: Internals. (line 61)
-* xgawk: Other Versions. (line 119)
+* wstlen internal variable: Internals. (line 54)
+* wstptr internal variable: Internals. (line 54)
+* xgawk: Other Versions. (line 120)
* xgettext utility: String Extraction. (line 13)
-* XML (eXtensible Markup Language): Internals. (line 160)
+* XML (eXtensible Markup Language): Internals. (line 151)
* XOR bitwise operation: Bitwise Functions. (line 6)
* xor() function (gawk): Bitwise Functions. (line 54)
* Yawitz, Efraim: Contributors. (line 106)
@@ -27411,8 +27579,8 @@ Index
* zero, negative vs. positive: Unexpected Results. (line 28)
* zerofile.awk program: Empty Files. (line 21)
* Zoulas, Christos: Contributors. (line 67)
+* {} (braces): Profiling. (line 134)
* {} (braces), actions and: Action Overview. (line 19)
-* {} (braces), pgawk program: Profiling. (line 137)
* {} (braces), statements, grouping: Statements. (line 10)
* | (vertical bar): Regexp Operators. (line 69)
* | (vertical bar), | operator (I/O) <1>: Precedence. (line 65)
@@ -27439,416 +27607,419 @@ Index

Tag Table:
Node: Top1352
-Node: Foreword30282
-Node: Preface34627
-Ref: Preface-Footnote-137680
-Ref: Preface-Footnote-237786
-Node: History38018
-Node: Names40409
-Ref: Names-Footnote-141886
-Node: This Manual41958
-Ref: This Manual-Footnote-146905
-Node: Conventions47005
-Node: Manual History49139
-Ref: Manual History-Footnote-152409
-Ref: Manual History-Footnote-252450
-Node: How To Contribute52524
-Node: Acknowledgments53668
-Node: Getting Started57999
-Node: Running gawk60378
-Node: One-shot61564
-Node: Read Terminal62789
-Ref: Read Terminal-Footnote-164439
-Ref: Read Terminal-Footnote-264715
-Node: Long64886
-Node: Executable Scripts66262
-Ref: Executable Scripts-Footnote-168131
-Ref: Executable Scripts-Footnote-268233
-Node: Comments68780
-Node: Quoting71247
-Node: DOS Quoting75870
-Node: Sample Data Files76545
-Node: Very Simple79577
-Node: Two Rules84176
-Node: More Complex86323
-Ref: More Complex-Footnote-189253
-Node: Statements/Lines89338
-Ref: Statements/Lines-Footnote-193800
-Node: Other Features94065
-Node: When94993
-Node: Invoking Gawk97140
-Node: Command Line98525
-Node: Options99308
-Ref: Options-Footnote-1112745
-Node: Other Arguments112770
-Node: Naming Standard Input115428
-Node: Environment Variables116522
-Node: AWKPATH Variable116966
-Ref: AWKPATH Variable-Footnote-1119563
-Node: Other Environment Variables119823
-Node: Exit Status122163
-Node: Include Files122838
-Node: Obsolete126323
-Node: Undocumented127009
-Node: Regexp127250
-Node: Regexp Usage128639
-Node: Escape Sequences130665
-Node: Regexp Operators136428
-Ref: Regexp Operators-Footnote-1143808
-Ref: Regexp Operators-Footnote-2143955
-Node: Bracket Expressions144053
-Ref: table-char-classes145943
-Node: GNU Regexp Operators148466
-Node: Case-sensitivity152189
-Ref: Case-sensitivity-Footnote-1155157
-Ref: Case-sensitivity-Footnote-2155392
-Node: Leftmost Longest155500
-Node: Computed Regexps156701
-Node: Reading Files160111
-Node: Records162052
-Ref: Records-Footnote-1170726
-Node: Fields170763
-Ref: Fields-Footnote-1173796
-Node: Nonconstant Fields173882
-Node: Changing Fields176084
-Node: Field Separators182065
-Node: Default Field Splitting184694
-Node: Regexp Field Splitting185811
-Node: Single Character Fields189153
-Node: Command Line Field Separator190212
-Node: Field Splitting Summary193653
-Ref: Field Splitting Summary-Footnote-1196845
-Node: Constant Size196946
-Node: Splitting By Content201530
-Ref: Splitting By Content-Footnote-1205256
-Node: Multiple Line205296
-Ref: Multiple Line-Footnote-1211143
-Node: Getline211322
-Node: Plain Getline213550
-Node: Getline/Variable215639
-Node: Getline/File216780
-Node: Getline/Variable/File218102
-Ref: Getline/Variable/File-Footnote-1219701
-Node: Getline/Pipe219788
-Node: Getline/Variable/Pipe222348
-Node: Getline/Coprocess223455
-Node: Getline/Variable/Coprocess224698
-Node: Getline Notes225412
-Node: Getline Summary227354
-Ref: table-getline-variants227697
-Node: Command line directories228553
-Node: Printing229178
-Node: Print230809
-Node: Print Examples232146
-Node: Output Separators234930
-Node: OFMT236690
-Node: Printf238048
-Node: Basic Printf238954
-Node: Control Letters240493
-Node: Format Modifiers244305
-Node: Printf Examples250314
-Node: Redirection253029
-Node: Special Files260013
-Node: Special FD260546
-Ref: Special FD-Footnote-1264171
-Node: Special Network264245
-Node: Special Caveats265095
-Node: Close Files And Pipes265891
-Ref: Close Files And Pipes-Footnote-1272914
-Ref: Close Files And Pipes-Footnote-2273062
-Node: Expressions273212
-Node: Values274344
-Node: Constants275020
-Node: Scalar Constants275700
-Ref: Scalar Constants-Footnote-1276559
-Node: Nondecimal-numbers276741
-Node: Regexp Constants279800
-Node: Using Constant Regexps280275
-Node: Variables283330
-Node: Using Variables283985
-Node: Assignment Options285709
-Node: Conversion287581
-Ref: table-locale-affects292957
-Ref: Conversion-Footnote-1293581
-Node: All Operators293690
-Node: Arithmetic Ops294320
-Node: Concatenation296825
-Ref: Concatenation-Footnote-1299618
-Node: Assignment Ops299738
-Ref: table-assign-ops304726
-Node: Increment Ops306134
-Node: Truth Values and Conditions309604
-Node: Truth Values310687
-Node: Typing and Comparison311736
-Node: Variable Typing312525
-Ref: Variable Typing-Footnote-1316422
-Node: Comparison Operators316544
-Ref: table-relational-ops316954
-Node: POSIX String Comparison320503
-Ref: POSIX String Comparison-Footnote-1321459
-Node: Boolean Ops321597
-Ref: Boolean Ops-Footnote-1325675
-Node: Conditional Exp325766
-Node: Function Calls327498
-Node: Precedence331092
-Node: Locales334761
-Node: Patterns and Actions335850
-Node: Pattern Overview336904
-Node: Regexp Patterns338573
-Node: Expression Patterns339116
-Node: Ranges342801
-Node: BEGIN/END345767
-Node: Using BEGIN/END346529
-Ref: Using BEGIN/END-Footnote-1349260
-Node: I/O And BEGIN/END349366
-Node: BEGINFILE/ENDFILE351648
-Node: Empty354541
-Node: Using Shell Variables354857
-Node: Action Overview357142
-Node: Statements359499
-Node: If Statement361353
-Node: While Statement362852
-Node: Do Statement364896
-Node: For Statement366052
-Node: Switch Statement369204
-Node: Break Statement371301
-Node: Continue Statement373291
-Node: Next Statement375084
-Node: Nextfile Statement377474
-Node: Exit Statement380019
-Node: Built-in Variables382435
-Node: User-modified383530
-Ref: User-modified-Footnote-1391556
-Node: Auto-set391618
-Ref: Auto-set-Footnote-1400909
-Node: ARGC and ARGV401114
-Node: Arrays404965
-Node: Array Basics406470
-Node: Array Intro407296
-Node: Reference to Elements411614
-Node: Assigning Elements413884
-Node: Array Example414375
-Node: Scanning an Array416107
-Node: Controlling Scanning418421
-Ref: Controlling Scanning-Footnote-1423354
-Node: Delete423670
-Ref: Delete-Footnote-1426105
-Node: Numeric Array Subscripts426162
-Node: Uninitialized Subscripts428345
-Node: Multi-dimensional429973
-Node: Multi-scanning433067
-Node: Arrays of Arrays434658
-Node: Functions439303
-Node: Built-in440125
-Node: Calling Built-in441203
-Node: Numeric Functions443191
-Ref: Numeric Functions-Footnote-1447023
-Ref: Numeric Functions-Footnote-2447380
-Ref: Numeric Functions-Footnote-3447428
-Node: String Functions447697
-Ref: String Functions-Footnote-1471194
-Ref: String Functions-Footnote-2471323
-Ref: String Functions-Footnote-3471571
-Node: Gory Details471658
-Ref: table-sub-escapes473337
-Ref: table-sub-posix-92474691
-Ref: table-sub-proposed476034
-Ref: table-posix-sub477384
-Ref: table-gensub-escapes478930
-Ref: Gory Details-Footnote-1480137
-Ref: Gory Details-Footnote-2480188
-Node: I/O Functions480339
-Ref: I/O Functions-Footnote-1486994
-Node: Time Functions487141
-Ref: Time Functions-Footnote-1498033
-Ref: Time Functions-Footnote-2498101
-Ref: Time Functions-Footnote-3498259
-Ref: Time Functions-Footnote-4498370
-Ref: Time Functions-Footnote-5498482
-Ref: Time Functions-Footnote-6498709
-Node: Bitwise Functions498975
-Ref: table-bitwise-ops499533
-Ref: Bitwise Functions-Footnote-1503693
-Node: Type Functions503877
-Node: I18N Functions504347
-Node: User-defined505974
-Node: Definition Syntax506778
-Ref: Definition Syntax-Footnote-1511688
-Node: Function Example511757
-Node: Function Caveats514351
-Node: Calling A Function514772
-Node: Variable Scope515887
-Node: Pass By Value/Reference517862
-Node: Return Statement521302
-Node: Dynamic Typing524283
-Node: Indirect Calls525018
-Node: Internationalization534703
-Node: I18N and L10N536129
-Node: Explaining gettext536815
-Ref: Explaining gettext-Footnote-1541881
-Ref: Explaining gettext-Footnote-2542065
-Node: Programmer i18n542230
-Node: Translator i18n546430
-Node: String Extraction547223
-Ref: String Extraction-Footnote-1548184
-Node: Printf Ordering548270
-Ref: Printf Ordering-Footnote-1551054
-Node: I18N Portability551118
-Ref: I18N Portability-Footnote-1553567
-Node: I18N Example553630
-Ref: I18N Example-Footnote-1556265
-Node: Gawk I18N556337
-Node: Advanced Features556954
-Node: Nondecimal Data558467
-Node: Array Sorting560050
-Node: Controlling Array Traversal560747
-Node: Array Sorting Functions568984
-Ref: Array Sorting Functions-Footnote-1572658
-Ref: Array Sorting Functions-Footnote-2572751
-Node: Two-way I/O572945
-Ref: Two-way I/O-Footnote-1578377
-Node: TCP/IP Networking578447
-Node: Profiling581291
-Node: Library Functions588765
-Ref: Library Functions-Footnote-1591772
-Node: Library Names591943
-Ref: Library Names-Footnote-1595414
-Ref: Library Names-Footnote-2595634
-Node: General Functions595720
-Node: Strtonum Function596673
-Node: Assert Function599603
-Node: Round Function602929
-Node: Cliff Random Function604472
-Node: Ordinal Functions605488
-Ref: Ordinal Functions-Footnote-1608558
-Ref: Ordinal Functions-Footnote-2608810
-Node: Join Function609019
-Ref: Join Function-Footnote-1610790
-Node: Gettimeofday Function610990
-Node: Data File Management614705
-Node: Filetrans Function615337
-Node: Rewind Function619476
-Node: File Checking620863
-Node: Empty Files621957
-Node: Ignoring Assigns624187
-Node: Getopt Function625740
-Ref: Getopt Function-Footnote-1637044
-Node: Passwd Functions637247
-Ref: Passwd Functions-Footnote-1646222
-Node: Group Functions646310
-Node: Walking Arrays654394
-Node: Sample Programs655963
-Node: Running Examples656628
-Node: Clones657356
-Node: Cut Program658580
-Node: Egrep Program668425
-Ref: Egrep Program-Footnote-1676198
-Node: Id Program676308
-Node: Split Program679924
-Ref: Split Program-Footnote-1683443
-Node: Tee Program683571
-Node: Uniq Program686374
-Node: Wc Program693803
-Ref: Wc Program-Footnote-1698069
-Ref: Wc Program-Footnote-2698269
-Node: Miscellaneous Programs698361
-Node: Dupword Program699549
-Node: Alarm Program701580
-Node: Translate Program706329
-Ref: Translate Program-Footnote-1710716
-Ref: Translate Program-Footnote-2710944
-Node: Labels Program711078
-Ref: Labels Program-Footnote-1714449
-Node: Word Sorting714533
-Node: History Sorting718417
-Node: Extract Program720256
-Ref: Extract Program-Footnote-1727739
-Node: Simple Sed727867
-Node: Igawk Program730929
-Ref: Igawk Program-Footnote-1746086
-Ref: Igawk Program-Footnote-2746287
-Node: Anagram Program746425
-Node: Signature Program749493
-Node: Debugger750593
-Node: Debugging751504
-Node: Debugging Concepts751917
-Node: Debugging Terms753773
-Node: Awk Debugging756396
-Node: Sample dgawk session757288
-Node: dgawk invocation757780
-Node: Finding The Bug758962
-Node: List of Debugger Commands765448
-Node: Breakpoint Control766759
-Node: Dgawk Execution Control770395
-Node: Viewing And Changing Data773746
-Node: Dgawk Stack777083
-Node: Dgawk Info778543
-Node: Miscellaneous Dgawk Commands782491
-Node: Readline Support787919
-Node: Dgawk Limitations788757
-Node: Language History790946
-Node: V7/SVR3.1792458
-Node: SVR4794779
-Node: POSIX796221
-Node: BTL797229
-Node: POSIX/GNU797963
-Node: Common Extensions803114
-Node: Ranges and Locales804221
-Ref: Ranges and Locales-Footnote-1808825
-Node: Contributors809046
-Node: Installation813308
-Node: Gawk Distribution814202
-Node: Getting814686
-Node: Extracting815512
-Node: Distribution contents817204
-Node: Unix Installation822426
-Node: Quick Installation823043
-Node: Additional Configuration Options825005
-Node: Configuration Philosophy826482
-Node: Non-Unix Installation828824
-Node: PC Installation829282
-Node: PC Binary Installation830581
-Node: PC Compiling832429
-Node: PC Testing835373
-Node: PC Using836549
-Node: Cygwin840734
-Node: MSYS841734
-Node: VMS Installation842248
-Node: VMS Compilation842851
-Ref: VMS Compilation-Footnote-1843858
-Node: VMS Installation Details843916
-Node: VMS Running845551
-Node: VMS Old Gawk847158
-Node: Bugs847632
-Node: Other Versions851484
-Node: Notes856765
-Node: Compatibility Mode857457
-Node: Additions858240
-Node: Accessing The Source859052
-Node: Adding Code860477
-Node: New Ports866444
-Node: Dynamic Extensions870557
-Node: Internals871933
-Node: Plugin License881036
-Node: Sample Library881670
-Node: Internal File Description882356
-Node: Internal File Ops886071
-Ref: Internal File Ops-Footnote-1890852
-Node: Using Internal File Ops890992
-Node: Future Extensions893369
-Node: Basic Concepts895873
-Node: Basic High Level896630
-Ref: Basic High Level-Footnote-1900665
-Node: Basic Data Typing900850
-Node: Floating Point Issues905375
-Node: String Conversion Precision906458
-Ref: String Conversion Precision-Footnote-1908158
-Node: Unexpected Results908267
-Node: POSIX Floating Point Problems910093
-Ref: POSIX Floating Point Problems-Footnote-1913798
-Node: Glossary913836
-Node: Copying938812
-Node: GNU Free Documentation License976369
-Node: Index1001506
+Node: Foreword30423
+Node: Preface34768
+Ref: Preface-Footnote-137821
+Ref: Preface-Footnote-237927
+Node: History38159
+Node: Names40550
+Ref: Names-Footnote-142027
+Node: This Manual42099
+Ref: This Manual-Footnote-147037
+Node: Conventions47137
+Node: Manual History49271
+Ref: Manual History-Footnote-152541
+Ref: Manual History-Footnote-252582
+Node: How To Contribute52656
+Node: Acknowledgments53800
+Node: Getting Started58131
+Node: Running gawk60510
+Node: One-shot61696
+Node: Read Terminal62921
+Ref: Read Terminal-Footnote-164571
+Ref: Read Terminal-Footnote-264847
+Node: Long65018
+Node: Executable Scripts66394
+Ref: Executable Scripts-Footnote-168263
+Ref: Executable Scripts-Footnote-268365
+Node: Comments68912
+Node: Quoting71379
+Node: DOS Quoting76002
+Node: Sample Data Files76677
+Node: Very Simple79709
+Node: Two Rules84308
+Node: More Complex86455
+Ref: More Complex-Footnote-189385
+Node: Statements/Lines89470
+Ref: Statements/Lines-Footnote-193932
+Node: Other Features94197
+Node: When95125
+Node: Invoking Gawk97272
+Node: Command Line98657
+Node: Options99440
+Ref: Options-Footnote-1113585
+Node: Other Arguments113610
+Node: Naming Standard Input116268
+Node: Environment Variables117362
+Node: AWKPATH Variable117806
+Ref: AWKPATH Variable-Footnote-1120403
+Node: Other Environment Variables120663
+Node: Exit Status123155
+Node: Include Files123830
+Node: Obsolete127315
+Node: Undocumented128001
+Node: Regexp128242
+Node: Regexp Usage129631
+Node: Escape Sequences131657
+Node: Regexp Operators137420
+Ref: Regexp Operators-Footnote-1144800
+Ref: Regexp Operators-Footnote-2144947
+Node: Bracket Expressions145045
+Ref: table-char-classes146935
+Node: GNU Regexp Operators149458
+Node: Case-sensitivity153181
+Ref: Case-sensitivity-Footnote-1156149
+Ref: Case-sensitivity-Footnote-2156384
+Node: Leftmost Longest156492
+Node: Computed Regexps157693
+Node: Reading Files161103
+Node: Records163107
+Ref: Records-Footnote-1171781
+Node: Fields171818
+Ref: Fields-Footnote-1174851
+Node: Nonconstant Fields174937
+Node: Changing Fields177139
+Node: Field Separators183120
+Node: Default Field Splitting185749
+Node: Regexp Field Splitting186866
+Node: Single Character Fields190208
+Node: Command Line Field Separator191267
+Node: Field Splitting Summary194708
+Ref: Field Splitting Summary-Footnote-1197900
+Node: Constant Size198001
+Node: Splitting By Content202585
+Ref: Splitting By Content-Footnote-1206311
+Node: Multiple Line206351
+Ref: Multiple Line-Footnote-1212198
+Node: Getline212377
+Node: Plain Getline214593
+Node: Getline/Variable216682
+Node: Getline/File217823
+Node: Getline/Variable/File219145
+Ref: Getline/Variable/File-Footnote-1220744
+Node: Getline/Pipe220831
+Node: Getline/Variable/Pipe223391
+Node: Getline/Coprocess224498
+Node: Getline/Variable/Coprocess225741
+Node: Getline Notes226455
+Node: Getline Summary228397
+Ref: table-getline-variants228740
+Node: Read Timeout229596
+Ref: Read Timeout-Footnote-1233341
+Node: Command line directories233398
+Node: Printing234028
+Node: Print235659
+Node: Print Examples236996
+Node: Output Separators239780
+Node: OFMT241540
+Node: Printf242898
+Node: Basic Printf243804
+Node: Control Letters245343
+Node: Format Modifiers249155
+Node: Printf Examples255164
+Node: Redirection257879
+Node: Special Files264863
+Node: Special FD265396
+Ref: Special FD-Footnote-1269021
+Node: Special Network269095
+Node: Special Caveats269945
+Node: Close Files And Pipes270741
+Ref: Close Files And Pipes-Footnote-1277764
+Ref: Close Files And Pipes-Footnote-2277912
+Node: Expressions278062
+Node: Values279194
+Node: Constants279870
+Node: Scalar Constants280550
+Ref: Scalar Constants-Footnote-1281409
+Node: Nondecimal-numbers281591
+Node: Regexp Constants284650
+Node: Using Constant Regexps285125
+Node: Variables288180
+Node: Using Variables288835
+Node: Assignment Options290559
+Node: Conversion292431
+Ref: table-locale-affects297807
+Ref: Conversion-Footnote-1298431
+Node: All Operators298540
+Node: Arithmetic Ops299170
+Node: Concatenation301675
+Ref: Concatenation-Footnote-1304468
+Node: Assignment Ops304588
+Ref: table-assign-ops309576
+Node: Increment Ops310984
+Node: Truth Values and Conditions314454
+Node: Truth Values315537
+Node: Typing and Comparison316586
+Node: Variable Typing317375
+Ref: Variable Typing-Footnote-1321272
+Node: Comparison Operators321394
+Ref: table-relational-ops321804
+Node: POSIX String Comparison325353
+Ref: POSIX String Comparison-Footnote-1326309
+Node: Boolean Ops326447
+Ref: Boolean Ops-Footnote-1330525
+Node: Conditional Exp330616
+Node: Function Calls332348
+Node: Precedence335942
+Node: Locales339611
+Node: Patterns and Actions340700
+Node: Pattern Overview341754
+Node: Regexp Patterns343423
+Node: Expression Patterns343966
+Node: Ranges347651
+Node: BEGIN/END350617
+Node: Using BEGIN/END351379
+Ref: Using BEGIN/END-Footnote-1354110
+Node: I/O And BEGIN/END354216
+Node: BEGINFILE/ENDFILE356498
+Node: Empty359391
+Node: Using Shell Variables359707
+Node: Action Overview361992
+Node: Statements364349
+Node: If Statement366203
+Node: While Statement367702
+Node: Do Statement369746
+Node: For Statement370902
+Node: Switch Statement374054
+Node: Break Statement376151
+Node: Continue Statement378141
+Node: Next Statement379934
+Node: Nextfile Statement382324
+Node: Exit Statement384869
+Node: Built-in Variables387285
+Node: User-modified388380
+Ref: User-modified-Footnote-1396406
+Node: Auto-set396468
+Ref: Auto-set-Footnote-1405759
+Node: ARGC and ARGV405964
+Node: Arrays409815
+Node: Array Basics411320
+Node: Array Intro412146
+Node: Reference to Elements416464
+Node: Assigning Elements418734
+Node: Array Example419225
+Node: Scanning an Array420957
+Node: Controlling Scanning423271
+Ref: Controlling Scanning-Footnote-1428204
+Node: Delete428520
+Ref: Delete-Footnote-1430955
+Node: Numeric Array Subscripts431012
+Node: Uninitialized Subscripts433195
+Node: Multi-dimensional434823
+Node: Multi-scanning437917
+Node: Arrays of Arrays439508
+Node: Functions444153
+Node: Built-in444975
+Node: Calling Built-in446053
+Node: Numeric Functions448041
+Ref: Numeric Functions-Footnote-1451873
+Ref: Numeric Functions-Footnote-2452230
+Ref: Numeric Functions-Footnote-3452278
+Node: String Functions452547
+Ref: String Functions-Footnote-1476044
+Ref: String Functions-Footnote-2476173
+Ref: String Functions-Footnote-3476421
+Node: Gory Details476508
+Ref: table-sub-escapes478187
+Ref: table-sub-posix-92479541
+Ref: table-sub-proposed480884
+Ref: table-posix-sub482234
+Ref: table-gensub-escapes483780
+Ref: Gory Details-Footnote-1484987
+Ref: Gory Details-Footnote-2485038
+Node: I/O Functions485189
+Ref: I/O Functions-Footnote-1491844
+Node: Time Functions491991
+Ref: Time Functions-Footnote-1502883
+Ref: Time Functions-Footnote-2502951
+Ref: Time Functions-Footnote-3503109
+Ref: Time Functions-Footnote-4503220
+Ref: Time Functions-Footnote-5503332
+Ref: Time Functions-Footnote-6503559
+Node: Bitwise Functions503825
+Ref: table-bitwise-ops504383
+Ref: Bitwise Functions-Footnote-1508543
+Node: Type Functions508727
+Node: I18N Functions509197
+Node: User-defined510824
+Node: Definition Syntax511628
+Ref: Definition Syntax-Footnote-1516538
+Node: Function Example516607
+Node: Function Caveats519201
+Node: Calling A Function519622
+Node: Variable Scope520737
+Node: Pass By Value/Reference522712
+Node: Return Statement526152
+Node: Dynamic Typing529133
+Node: Indirect Calls529868
+Node: Internationalization539553
+Node: I18N and L10N540979
+Node: Explaining gettext541665
+Ref: Explaining gettext-Footnote-1546731
+Ref: Explaining gettext-Footnote-2546915
+Node: Programmer i18n547080
+Node: Translator i18n551280
+Node: String Extraction552073
+Ref: String Extraction-Footnote-1553034
+Node: Printf Ordering553120
+Ref: Printf Ordering-Footnote-1555904
+Node: I18N Portability555968
+Ref: I18N Portability-Footnote-1558417
+Node: I18N Example558480
+Ref: I18N Example-Footnote-1561115
+Node: Gawk I18N561187
+Node: Advanced Features561804
+Node: Nondecimal Data563317
+Node: Array Sorting564900
+Node: Controlling Array Traversal565597
+Node: Array Sorting Functions573834
+Ref: Array Sorting Functions-Footnote-1577508
+Ref: Array Sorting Functions-Footnote-2577601
+Node: Two-way I/O577795
+Ref: Two-way I/O-Footnote-1583227
+Node: TCP/IP Networking583297
+Node: Profiling586141
+Node: Library Functions593595
+Ref: Library Functions-Footnote-1596602
+Node: Library Names596773
+Ref: Library Names-Footnote-1600244
+Ref: Library Names-Footnote-2600464
+Node: General Functions600550
+Node: Strtonum Function601503
+Node: Assert Function604433
+Node: Round Function607759
+Node: Cliff Random Function609302
+Node: Ordinal Functions610318
+Ref: Ordinal Functions-Footnote-1613388
+Ref: Ordinal Functions-Footnote-2613640
+Node: Join Function613849
+Ref: Join Function-Footnote-1615620
+Node: Gettimeofday Function615820
+Node: Data File Management619535
+Node: Filetrans Function620167
+Node: Rewind Function624306
+Node: File Checking625693
+Node: Empty Files626787
+Node: Ignoring Assigns629017
+Node: Getopt Function630570
+Ref: Getopt Function-Footnote-1641874
+Node: Passwd Functions642077
+Ref: Passwd Functions-Footnote-1651052
+Node: Group Functions651140
+Node: Walking Arrays659224
+Node: Sample Programs660793
+Node: Running Examples661458
+Node: Clones662186
+Node: Cut Program663410
+Node: Egrep Program673255
+Ref: Egrep Program-Footnote-1681028
+Node: Id Program681138
+Node: Split Program684754
+Ref: Split Program-Footnote-1688273
+Node: Tee Program688401
+Node: Uniq Program691204
+Node: Wc Program698633
+Ref: Wc Program-Footnote-1702899
+Ref: Wc Program-Footnote-2703099
+Node: Miscellaneous Programs703191
+Node: Dupword Program704379
+Node: Alarm Program706410
+Node: Translate Program711159
+Ref: Translate Program-Footnote-1715546
+Ref: Translate Program-Footnote-2715774
+Node: Labels Program715908
+Ref: Labels Program-Footnote-1719279
+Node: Word Sorting719363
+Node: History Sorting723247
+Node: Extract Program725086
+Ref: Extract Program-Footnote-1732569
+Node: Simple Sed732697
+Node: Igawk Program735759
+Ref: Igawk Program-Footnote-1750916
+Ref: Igawk Program-Footnote-2751117
+Node: Anagram Program751255
+Node: Signature Program754323
+Node: Debugger755423
+Node: Debugging756375
+Node: Debugging Concepts756808
+Node: Debugging Terms758664
+Node: Awk Debugging761261
+Node: Sample Debugging Session762153
+Node: Debugger Invocation762673
+Node: Finding The Bug764002
+Node: List of Debugger Commands770490
+Node: Breakpoint Control771824
+Node: Debugger Execution Control775488
+Node: Viewing And Changing Data778848
+Node: Execution Stack782204
+Node: Debugger Info783671
+Node: Miscellaneous Debugger Commands787652
+Node: Readline Support793097
+Node: Limitations793928
+Node: Language History796180
+Node: V7/SVR3.1797692
+Node: SVR4800013
+Node: POSIX801455
+Node: BTL802463
+Node: POSIX/GNU803197
+Node: Common Extensions808348
+Node: Ranges and Locales809455
+Ref: Ranges and Locales-Footnote-1814059
+Node: Contributors814280
+Node: Installation818541
+Node: Gawk Distribution819435
+Node: Getting819919
+Node: Extracting820745
+Node: Distribution contents822437
+Node: Unix Installation827659
+Node: Quick Installation828276
+Node: Additional Configuration Options830238
+Node: Configuration Philosophy831715
+Node: Non-Unix Installation834057
+Node: PC Installation834515
+Node: PC Binary Installation835814
+Node: PC Compiling837662
+Node: PC Testing840606
+Node: PC Using841782
+Node: Cygwin845967
+Node: MSYS846967
+Node: VMS Installation847481
+Node: VMS Compilation848084
+Ref: VMS Compilation-Footnote-1849091
+Node: VMS Installation Details849149
+Node: VMS Running850784
+Node: VMS Old Gawk852391
+Node: Bugs852865
+Node: Other Versions856717
+Node: Notes862032
+Node: Compatibility Mode862724
+Node: Additions863507
+Node: Accessing The Source864319
+Node: Adding Code865744
+Node: New Ports871711
+Node: Dynamic Extensions875824
+Node: Internals877264
+Node: Plugin License885783
+Node: Loading Extensions886421
+Node: Sample Library888231
+Node: Internal File Description888921
+Node: Internal File Ops892636
+Ref: Internal File Ops-Footnote-1897360
+Node: Using Internal File Ops897500
+Node: Future Extensions899877
+Node: Basic Concepts902381
+Node: Basic High Level903138
+Ref: Basic High Level-Footnote-1907173
+Node: Basic Data Typing907358
+Node: Floating Point Issues911883
+Node: String Conversion Precision912966
+Ref: String Conversion Precision-Footnote-1914666
+Node: Unexpected Results914775
+Node: POSIX Floating Point Problems916601
+Ref: POSIX Floating Point Problems-Footnote-1920306
+Node: Glossary920344
+Node: Copying945320
+Node: GNU Free Documentation License982877
+Node: Index1008014

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 83bd3b5d..0946f888 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -290,7 +290,7 @@ particular records in a file and perform operations upon them.
* Library Functions:: A Library of @command{awk} Functions.
* Sample Programs:: Many @command{awk} programs with complete
explanations.
-* Debugger:: The @code{dgawk} debugger.
+* Debugger:: The @code{gawk} debugger.
* Language History:: The evolution of the @command{awk}
language.
* Installation:: Installing @command{gawk} under various
@@ -393,6 +393,7 @@ particular records in a file and perform operations upon them.
* Getline Notes:: Important things to know about
@code{getline}.
* Getline Summary:: Summary of @code{getline} Variants.
+* Read Timeout:: Reading input with a timeout.
* Command line directories:: What happens if you put a directory on the
command line.
* Print:: The @code{print} statement.
@@ -614,23 +615,23 @@ particular records in a file and perform operations upon them.
* Anagram Program:: Finding anagrams from a dictionary.
* Signature Program:: People do amazing things with too much time
on their hands.
-* Debugging:: Introduction to @command{dgawk}.
-* Debugging Concepts:: Debugging In General.
+* Debugging:: Introduction to @command{gawk} Debugger.
+* Debugging Concepts:: Debugging in General.
* Debugging Terms:: Additional Debugging Concepts.
* Awk Debugging:: Awk Debugging.
-* Sample dgawk session:: Sample @command{dgawk} session.
-* dgawk invocation:: @command{dgawk} Invocation.
-* Finding The Bug:: Finding The Bug.
-* List of Debugger Commands:: Main @command{dgawk} Commands.
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program and
- the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Sample Debugging Session:: Sample Debugging Session.
+* Debugger Invocation:: How to Start the Debugger.
+* Finding The Bug:: Finding the Bug.
+* List of Debugger Commands:: Main Commands.
+* Breakpoint Control:: Control of Breakpoints.
+* Debugger Execution Control:: Control of Execution.
+* Viewing And Changing Data:: Viewing and Changing Data.
+* Execution Stack:: Dealing with the Stack.
+* Debugger Info:: Obtaining Information about the Program and
+ the Debugger State.
+* Miscellaneous Debugger Commands:: Miscellaneous Commands.
* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
+* Limitations:: Limitations and Future Plans.
* V7/SVR3.1:: The major changes between V7 and System V
Release 3.1.
* SVR4:: Minor changes between System V Releases 3.1
@@ -686,6 +687,7 @@ particular records in a file and perform operations upon them.
* Internals:: A brief look at some @command{gawk}
internals.
* Plugin License:: A note about licensing.
+* Loading Extensions:: How to load dynamic extensions.
* Sample Library:: A example of new functions.
* Internal File Description:: What the new functions will do.
* Internal File Ops:: The code for internal file operations.
@@ -1164,8 +1166,7 @@ provide many sample @command{awk} programs.
Reading them allows you to see @command{awk}
solving real problems.
-@ref{Debugger}, describes the @command{awk} debugger,
-@command{dgawk}.
+@ref{Debugger}, describes the @command{awk} debugger.
@ref{Language History},
describes how the @command{awk} language has evolved since
@@ -3103,6 +3104,19 @@ inadvertently use global variables that you meant to be local.
(This is a particularly easy mistake to make with simple variable
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 @command{awk} debugging, enabling
+Enable debugging of @command{awk} programs
+(@pxref{Debugging}).
+By default, the debugger reads commands interactively from the terminal.
+The optional @var{file} argument allows you to specify a file with a list
+of commands for the debugger to execute non-interactively.
+No space is allowed between the @option{-D} and @var{file}, if
+@var{file} is supplied.
+
@item -e @var{program-text}
@itemx --source @var{program-text}
@cindex @code{-e} option
@@ -3168,6 +3182,15 @@ for information about this option.
Print a ``usage'' message summarizing the short and long style options
that @command{gawk} accepts and then exit.
+@item -l @var{lib}
+@itemx --load @var{lib}
+@cindex @code{-l} option
+@cindex @code{--load} option
+@cindex loading, library
+Load a shared library @var{lib}. This searches for the library using the @env{AWKPATH}
+environment variable. The suffix @samp{.so} in the library name is optional.
+The library initialization routine should be named @code{dlload()}.
+
@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
@cindex @code{-l} option
@@ -3214,6 +3237,18 @@ Use with care.
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 @command{awk} enabling
+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
+@value{FN} for the output.
+No space is allowed between the @option{-o} and @var{file}, if
+@var{file} is supplied.
+
@item -O
@itemx --optimize
@cindex @code{--optimize} option
@@ -3226,7 +3261,7 @@ maintainer hopes to add more optimizations over time.
@itemx --profile@r{[}=@var{file}@r{]}
@cindex @code{-p} option
@cindex @code{--profile} option
-@cindex @command{awk} programs, profiling, enabling
+@cindex @command{awk} profiling, enabling
Enable profiling of @command{awk} programs
(@pxref{Profiling}).
By default, profiles are created in a file named @file{awkprof.out}.
@@ -3235,10 +3270,8 @@ The optional @var{file} argument allows you to specify a different
No space is allowed between the @option{-p} and @var{file}, if
@var{file} is supplied.
-When run with @command{gawk}, the profile is just a ``pretty printed'' version
-of the program. When run with @command{pgawk}, the profile contains execution
-counts for each statement in the program in the left margin, and function
-call counts for each function.
+The profile contains execution counts for each statement in the program
+in the left margin, and function call counts for each function.
@item -P
@itemx --posix
@@ -3302,14 +3335,6 @@ This is now @command{gawk}'s default behavior.
Nevertheless, this option remains both for backward compatibility,
and for use in combination with the @option{--traditional} option.
-@item -R @var{file}
-@itemx --command=@var{file}
-@cindex @code{-R} option
-@cindex @code{--command} option
-@command{dgawk} only.
-Read @command{dgawk} debugger options and commands from @var{file}.
-@xref{Dgawk Info}, for more information.
-
@item -S
@itemx --sandbox
@cindex @code{-S} option
@@ -3633,6 +3658,11 @@ Specifies the interval between connection retries,
in milliseconds. On systems that do not support
the @code{usleep()} system call,
the value is rounded up to an integral number of seconds.
+
+@item GAWK_READ_TIMEOUT
+Specifies the time, in milliseconds, for @command{gawk} to
+wait for input before returning with an error.
+@xref{Read Timeout}.
@end table
The environment variables in the following list are meant
@@ -3706,7 +3736,7 @@ into smaller, more manageable pieces, and also lets you reuse common @command{aw
code from various @command{awk} scripts. In other words, you can group
together @command{awk} functions, used to carry out specific tasks,
into external files. These files can be used just like function libraries,
-using the @samp{@@include} keyword in conjunction with the @code{AWKPATH}
+using the @samp{@@include} keyword in conjunction with the @env{AWKPATH}
environment variable.
Let's see an example.
@@ -5119,6 +5149,8 @@ used with it do not have to be named on the @command{awk} command line
* Multiple Line:: Reading multi-line records.
* Getline:: Reading files under explicit program control
using the @code{getline} function.
+* Read Timeout:: Reading input with a timeout.
+
* Command line directories:: What happens if you put a directory on the
command line.
@end menu
@@ -7197,6 +7229,110 @@ and whether the variant is standard or a @command{gawk} extension.
@c ENDOFRANGE inex
@c ENDOFRANGE infir
+@node Read Timeout
+@section Reading Input With A Timeout
+@cindex timeout, reading input
+
+You may specify a timeout in milliseconds for reading input from a terminal,
+pipe or two-way communication including, TCP/IP sockets. This can be done
+on a per input, command or connection basis, by setting a special element
+in the @code{PROCINFO} array:
+
+@example
+PROCINFO["input_name", "READ_TIMEOUT"] = @var{timeout in milliseconds}
+@end example
+
+When set, this will cause @command{gawk} to time out and return failure
+if no data is available to read within the specified timeout period.
+For example, a TCP client can decide to give up on receiving
+any response from the server after a certain amount of time:
+
+@example
+Service = "/inet/tcp/0/localhost/daytime"
+PROCINFO[Service, "READ_TIMEOUT"] = 100
+if ((Service |& getline) > 0)
+ print $0
+else if (ERRNO != "")
+ print ERRNO
+@end example
+
+Here is how to read interactively from the terminal@footnote{This assumes
+that standard input is the keyboard} without waiting
+for more than five seconds:
+
+@example
+PROCINFO["/dev/stdin", "READ_TIMEOUT"] = 5000
+while ((getline < "/dev/stdin") > 0)
+ print $0
+@end example
+
+@command{gawk} will terminate the read operation if input does not
+arrive after waiting for the timeout period, return failure
+and set the @code{ERRNO} variable to an appropriate string value.
+A negative or zero value for the timeout is the same as specifying
+no timeout at all.
+
+A timeout can also be set for reading from the terminal in the implicit
+loop that reads input records and matches them against patterns,
+like so:
+
+@example
+$ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}}
+> @kbd{@{ print "You entered: " $0 @}'}
+@kbd{gawk}
+@print{} You entered: gawk
+@end example
+
+In this case, failure to respond within five seconds results in the following
+error message:
+
+@example
+@error{} gawk: cmd. line:2: (FILENAME=- FNR=1) fatal: error reading input file `-': Connection timed out
+@end example
+
+The timeout can be set or changed at any time, and will take effect on the
+next attempt to read from the input device. In the following example,
+we start with a timeout value of one second, and progressively
+reduce it by one-tenth of a second until we wait indefinitely
+for the input to arrive:
+
+@example
+PROCINFO[Service, "READ_TIMEOUT"] = 1000
+while ((Service |& getline) > 0) @{
+ print $0
+ PROCINFO[S, "READ_TIMEOUT"] -= 100
+@}
+@end example
+
+@quotation NOTE
+You should not assume that the read operation will block
+exactly after the tenth record has been printed. It is possible that
+@command{gawk} will read and buffer more than one record's
+worth of data the first time. Because of this, changing the value
+of timeout like in the above example is not very useful.
+@end quotation
+
+If the @code{PROCINFO} element is not present and the environment
+variable @env{GAWK_READ_TIMEOUT} exists,
+@command{gawk} uses its value to initialize the timeout value.
+The exclusive use of the environment variable to specify timeout
+has the disadvantage of not being able to control it
+on a per command or connection basis.
+
+@command{gawk} considers a timeout event to be an error even though
+the attempt to read from the underlying device may
+succeed in a later attempt. This is a limitation, and it also
+means that you cannot use this to multiplex input from
+two or more sources.
+
+Assigning a timeout value prevents read operations from
+blocking indefinitely. But bear in mind that there are other ways
+@command{gawk} can stall waiting for an input device to be ready.
+A network client can sometimes take a long time to establish
+a connection before it can start reading any data,
+or the attempt to open a FIFO special file for reading can block
+indefinitely until some other process opens it for writing.
+
@node Command line directories
@section Directories On The Command Line
@cindex directories, command line
@@ -18967,40 +19103,32 @@ extensive examples.
@cindex @command{awk} programs, profiling
@c STARTOFRANGE proawk
@cindex profiling @command{awk} programs
-@c STARTOFRANGE pgawk
-@cindex @command{pgawk} program
-@cindex profiling @command{gawk}, See @command{pgawk} program
-
-You may produce execution
-traces of your @command{awk} programs.
-This is done with a specially compiled version of @command{gawk},
-called @command{pgawk} (``profiling @command{gawk}'').
-
+@cindex profiling @command{gawk}
@cindex @code{awkprof.out} file
@cindex files, @code{awkprof.out}
-@cindex @command{pgawk} program, @code{awkprof.out} file
-@command{pgawk} is identical in every way to @command{gawk}, except that when
-it has finished running, it creates a profile of your program in a file
-named @file{awkprof.out}.
-Because it is profiling, it also executes up to 45% slower than
+
+You may produce execution traces of your @command{awk} programs.
+This is done by passing the option @option{--profile} to @command{gawk}.
+When @command{gawk} has finished running, it creates a profile of your program in a file
+named @file{awkprof.out}. Because it is profiling, it also executes up to 45% slower than
@command{gawk} normally does.
@cindex @code{--profile} option
As shown in the following example,
the @option{--profile} option can be used to change the name of the file
-where @command{pgawk} will write the profile:
+where @command{gawk} will write the profile:
@example
-pgawk --profile=myprog.prof -f myprog.awk data1 data2
+gawk --profile=myprog.prof -f myprog.awk data1 data2
@end example
@noindent
-In the above example, @command{pgawk} places the profile in
+In the above example, @command{gawk} places the profile in
@file{myprog.prof} instead of in @file{awkprof.out}.
-Here is a sample
-session showing a simple @command{awk} program, its input data, and the
-results from running @command{pgawk}. First, the @command{awk} program:
+Here is a sample session showing a simple @command{awk} program, its input data, and the
+results from running @command{gawk} with the @option{--profile} option.
+First, the @command{awk} program:
@example
BEGIN @{ print "First BEGIN rule" @}
@@ -19040,12 +19168,12 @@ foo
junk
@end example
-Here is the @file{awkprof.out} that results from running @command{pgawk}
-on this program and data (this example also illustrates that @command{awk}
+Here is the @file{awkprof.out} that results from running the @command{gawk}
+profiler on this program and data (this example also illustrates that @command{awk}
programmers sometimes have to work late):
-@cindex @code{BEGIN} pattern, @command{pgawk} program
-@cindex @code{END} pattern, @command{pgawk} program
+@cindex @code{BEGIN} pattern
+@cindex @code{END} pattern
@example
# gawk profile, created Sun Aug 13 00:00:15 2000
@@ -19137,15 +19265,15 @@ keyword indicates how many times the function was called.
The counts next to the statements in the body show how many times
those statements were executed.
-@cindex @code{@{@}} (braces), @command{pgawk} program
-@cindex braces (@code{@{@}}), @command{pgawk} program
+@cindex @code{@{@}} (braces)
+@cindex braces (@code{@{@}})
@item
The layout uses ``K&R'' style with TABs.
Braces are used everywhere, even when
the body of an @code{if}, @code{else}, or loop is only a single statement.
-@cindex @code{()} (parentheses), @command{pgawk} program
-@cindex parentheses @code{()}, @command{pgawk} program
+@cindex @code{()} (parentheses)
+@cindex parentheses @code{()}
@item
Parentheses are used only where needed, as indicated by the structure
of the program and the precedence rules.
@@ -19168,16 +19296,16 @@ Similarly, if
the target of a redirection isn't a scalar, it gets parenthesized.
@item
-@command{pgawk} supplies leading comments in
+@command{gawk} supplies leading comments in
front of the @code{BEGIN} and @code{END} rules,
the pattern/action rules, and the functions.
@end itemize
The profiled version of your program may not look exactly like what you
-typed when you wrote it. This is because @command{pgawk} creates the
+typed when you wrote it. This is because @command{gawk} creates the
profiled version by ``pretty printing'' its internal representation of
-the program. The advantage to this is that @command{pgawk} can produce
+the program. The advantage to this is that @command{gawk} can produce
a standard representation. The disadvantage is that all source-code
comments are lost, as are the distinctions among multiple @code{BEGIN},
@code{END}, @code{BEGINFILE}, and @code{ENDFILE} rules. Also, things such as:
@@ -19199,15 +19327,16 @@ come out as:
which is correct, but possibly surprising.
@cindex profiling @command{awk} programs, dynamically
-@cindex @command{pgawk} program, dynamic profiling
+@cindex @command{gawk} program, dynamic profiling
Besides creating profiles when a program has completed,
-@command{pgawk} can produce a profile while it is running.
+@command{gawk} can produce a profile while it is running.
This is useful if your @command{awk} program goes into an
infinite loop and you want to see what has been executed.
-To use this feature, run @command{pgawk} in the background:
+To use this feature, run @command{gawk} with the @option{--profile}
+option in the background:
@example
-$ @kbd{pgawk -f myprog &}
+$ @kbd{gawk --profile -f myprog &}
[1] 13992
@end example
@@ -19218,7 +19347,7 @@ $ @kbd{pgawk -f myprog &}
@noindent
The shell prints a job number and process ID number; in this case, 13992.
Use the @command{kill} command to send the @code{USR1} signal
-to @command{pgawk}:
+to @command{gawk}:
@example
$ @kbd{kill -USR1 13992}
@@ -19226,8 +19355,8 @@ $ @kbd{kill -USR1 13992}
@noindent
As usual, the profiled version of the program is written to
-@file{awkprof.out}, or to a different file if you use the @option{--profile}
-option.
+@file{awkprof.out}, or to a different file if one specified with
+the @option{--profile} option.
Along with the regular profile, as shown earlier, the profile
includes a trace of any active functions:
@@ -19241,7 +19370,7 @@ includes a trace of any active functions:
# -- main --
@end example
-You may send @command{pgawk} the @code{USR1} signal as many times as you like.
+You may send @command{gawk} the @code{USR1} signal as many times as you like.
Each time, the profile and function call trace are appended to the output
profile file.
@@ -19249,7 +19378,7 @@ profile file.
@cindex @code{SIGHUP} signal
@cindex signals, @code{HUP}/@code{SIGHUP}
If you use the @code{HUP} signal instead of the @code{USR1} signal,
-@command{pgawk} produces the profile and the function call trace and then exits.
+@command{gawk} produces the profile and the function call trace and then exits.
@cindex @code{INT} signal (MS-Windows)
@cindex @code{SIGINT} signal (MS-Windows)
@@ -19257,21 +19386,20 @@ If you use the @code{HUP} signal instead of the @code{USR1} signal,
@cindex @code{QUIT} signal (MS-Windows)
@cindex @code{SIGQUIT} signal (MS-Windows)
@cindex signals, @code{QUIT}/@code{SIGQUIT} (MS-Windows)
-When @command{pgawk} runs on MS-Windows systems, it uses the
+When @command{gawk} runs on MS-Windows systems, it uses the
@code{INT} and @code{QUIT} signals for producing the profile and, in
-the case of the @code{INT} signal, @command{pgawk} exits. This is
+the case of the @code{INT} signal, @command{gawk} exits. This is
because these systems don't support the @command{kill} command, so the
only signals you can deliver to a program are those generated by the
keyboard. The @code{INT} signal is generated by the
@kbd{@value{CTL}-@key{C}} or @kbd{@value{CTL}-@key{BREAK}} key, while the
@code{QUIT} signal is generated by the @kbd{@value{CTL}-@key{\}} key.
-Finally, regular @command{gawk} also accepts the @option{--profile} option.
+Finally, @command{gawk} also accepts another option @option{--pretty-print}.
When called this way, @command{gawk} ``pretty prints'' the program into
@file{awkprof.out}, without any execution counts.
@c ENDOFRANGE advgaw
@c ENDOFRANGE gawadv
-@c ENDOFRANGE pgawk
@c ENDOFRANGE awkp
@c ENDOFRANGE proawk
@@ -25153,41 +25281,41 @@ BEGIN {
@c FIXME: Add more indexing.
@node Debugger
-@chapter @command{dgawk}: The @command{awk} Debugger
-@cindex @command{dgawk}
+@chapter Debugging @command{awk} Programs
+@cindex debugging @command{awk} programs
It would be nice if computer programs worked perfectly the first time they
were run, but in real life, this rarely happens for programs of
any complexity. Thus, most programming languages have facilities available
for ``debugging'' programs, and now @command{awk} is no exception.
-The @command{dgawk} debugger is purposely modeled after
+The @command{gawk} debugger is purposely modeled after
@uref{http://www.gnu.org/software/gdb/, the GNU Debugger (GDB)}
command-line debugger. If you are familiar with GDB, learning
-@command{dgawk} is easy.
+how to use @command{gawk} for debugging your program is easy.
@menu
-* Debugging:: Introduction to @command{dgawk}.
-* Sample dgawk session:: Sample @command{dgawk} session.
-* List of Debugger Commands:: Main @command{dgawk} Commands.
-* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
+* Debugging:: Introduction to @command{gawk} debugger.
+* Sample Debugging Session:: Sample debugging session.
+* List of Debugger Commands:: Main debugger commands.
+* Readline Support:: Readline support.
+* Limitations:: Limitations and future plans.
@end menu
@node Debugging
-@section Introduction to @command{dgawk}
+@section Introduction to @command{gawk} Debugger
This @value{SECTION} introduces debugging in general and begins
the discussion of debugging in @command{gawk}.
@menu
-* Debugging Concepts:: Debugging In General.
+* Debugging Concepts:: Debugging in General.
* Debugging Terms:: Additional Debugging Concepts.
* Awk Debugging:: Awk Debugging.
@end menu
@node Debugging Concepts
-@subsection Debugging In General
+@subsection Debugging in General
(If you have used debuggers in other languages, you may want to skip
ahead to the next section on the specific features of the @command{awk}
@@ -25233,8 +25361,7 @@ functional program that you or someone else wrote).
@subsection Additional Debugging Concepts
Before diving in to the details, we need to introduce several
-important concepts that apply to just about all debuggers, including
-@command{dgawk}.
+important concepts that apply to just about all debuggers.
The following list defines terms used throughout the rest of
this @value{CHAPTER}.
@@ -25253,7 +25380,7 @@ that contains the function's parameters, local variables, and return value,
as well as any other ``bookkeeping'' information needed to manage the
call stack. This data area is termed a @dfn{stack frame}.
-@command{gawk} also follows this model, and @command{dgawk} gives you
+@command{gawk} also follows this model, and gives you
access to the call stack and to each stack frame. You can see the
call stack, as well as from where each function on the stack was
invoked. Commands that print the call stack print information about
@@ -25298,48 +25425,48 @@ each line of @command{awk} code. The debugger provides the opportunity
to look at the individual primitive instructions carried out
by the higher-level @command{awk} commands.
-@node Sample dgawk session
-@section Sample @command{dgawk} session
+@node Sample Debugging Session
+@section Sample Debugging Session
-In order to illustrate the use of @command{dgawk}, let's look at a sample
+In order to illustrate the use of @command{gawk} as a debugger, let's look at a sample
debugging session. We will use the @command{awk} implementation of the
POSIX @command{uniq} command described earlier (@pxref{Uniq Program})
as our example.
@menu
-* dgawk invocation:: @command{dgawk} Invocation.
-* Finding The Bug:: Finding The Bug.
+* Debugger Invocation:: How to Start the Debugger.
+* Finding The Bug:: Finding the Bug.
@end menu
-@node dgawk invocation
-@subsection @command{dgawk} Invocation
+@node Debugger Invocation
+@subsection How to Start the Debugger
-Starting @command{dgawk} is exactly like running @command{awk}. The
-file(s) containing the program and any supporting code are given on the
-command line as arguments to one or more @option{-f} options.
-(@command{dgawk} is not designed to debug command-line
-programs, only programs contained in files.) In our case,
-we call @command{dgawk} like this:
+Starting the debugger is almost exactly like running @command{awk}, except you have to
+pass an additional option @option{--debug} or the corresponding short option @option{-D}.
+The file(s) containing the program and any supporting code are given on the command
+line as arguments to one or more @option{-f} options. (@command{gawk} is not designed
+to debug command-line programs, only programs contained in files.) In our case,
+we invoke the debugger like this:
@example
-$ @kbd{dgawk -f getopt.awk -f join.awk -f uniq.awk inputfile}
+$ @kbd{gawk -D -f getopt.awk -f join.awk -f uniq.awk inputfile}
@end example
@noindent
where both @file{getopt.awk} and @file{uniq.awk} are in @env{$AWKPATH}.
(Experienced users of GDB or similar debuggers should note that
this syntax is slightly different from what they are used to.
-With @command{dgawk}, the arguments for running the program are given
+With @command{gawk} debugger, the arguments for running the program are given
in the command line to the debugger rather than as part of the @code{run}
command at the debugger prompt.)
Instead of immediately running the program on @file{inputfile}, as
-@command{gawk} would ordinarily do, @command{dgawk} merely loads all
+@command{gawk} would ordinarily do, the debugger merely loads all
the program source files, compiles them internally, and then gives
us a prompt:
@example
-dgawk>
+gawk>
@end example
@noindent
@@ -25347,7 +25474,7 @@ from which we can issue commands to the debugger. At this point, no
code has been executed.
@node Finding The Bug
-@subsection Finding The Bug
+@subsection Finding the Bug
Let's say that we are having a problem using (a faulty version of)
@file{uniq.awk} in the ``field-skipping'' mode, and it doesn't seem to be
@@ -25383,7 +25510,7 @@ a breakpoint in @file{uniq.awk} is at the beginning of the function
the breakpoint, use the @code{b} (breakpoint) command:
@example
-dgawk> @kbd{b are_equal}
+gawk> @kbd{b are_equal}
@print{} Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64
@end example
@@ -25392,22 +25519,22 @@ Now type @samp{r} or @samp{run} and the program runs until it hits
the breakpoint for the first time:
@example
-dgawk> @kbd{r}
+gawk> @kbd{r}
@print{} Starting program:
@print{} Stopping in Rule ...
@print{} Breakpoint 1, are_equal(n, m, clast, cline, alast, aline)
at `awklib/eg/prog/uniq.awk':64
@print{} 64 if (fcount == 0 && charcount == 0)
-dgawk>
+gawk>
@end example
Now we can look at what's going on inside our program. First of all,
let's see how we got to where we are. At the prompt, we type @samp{bt}
-(short for ``backtrace''), and @command{dgawk} responds with a
+(short for ``backtrace''), and the debugger responds with a
listing of the current stack frames:
@example
-dgawk> @kbd{bt}
+gawk> @kbd{bt}
@print{} #0 are_equal(n, m, clast, cline, alast, aline)
at `awklib/eg/prog/uniq.awk':69
@print{} #1 in main() at `awklib/eg/prog/uniq.awk':89
@@ -25422,11 +25549,11 @@ the key to finding the source of the problem.)
Now that we're in @code{are_equal()}, we can start looking at the values
of some variables. Let's say we type @samp{p n}
(@code{p} is short for ``print''). We would expect to see the value of
-@code{n}, a parameter to @code{are_equal()}. Actually, @command{dgawk}
+@code{n}, a parameter to @code{are_equal()}. Actually, the debugger
gives us:
@example
-dgawk> @kbd{p n}
+gawk> @kbd{p n}
@print{} n = untyped variable
@end example
@@ -25437,7 +25564,7 @@ function was called without arguments (@pxref{Function Calls}).
A more useful variable to display might be the current record:
@example
-dgawk> @kbd{p $0}
+gawk> @kbd{p $0}
@print{} $0 = string ("gawk is a wonderful program!")
@end example
@@ -25446,7 +25573,7 @@ This might be a bit puzzling at first since this is the second line of
our test input above. Let's look at @code{NR}:
@example
-dgawk> @kbd{p NR}
+gawk> @kbd{p NR}
@print{} NR = number (2)
@end example
@@ -25465,7 +25592,7 @@ NR == 1 @{
OK, let's just check that that rule worked correctly:
@example
-dgawk> @kbd{p last}
+gawk> @kbd{p last}
@print{} last = string ("awk is a wonderful program!")
@end example
@@ -25476,7 +25603,7 @@ be inside this function. To investigate further, we must begin
@samp{n} (for ``next''):
@example
-dgawk> @kbd{n}
+gawk> @kbd{n}
@print{} 67 if (fcount > 0) @{
@end example
@@ -25496,9 +25623,9 @@ Continuing to step, we now get to the splitting of the current and
last records:
@example
-dgawk> @kbd{n}
+gawk> @kbd{n}
@print{} 68 n = split(last, alast)
-dgawk> @kbd{n}
+gawk> @kbd{n}
@print{} 69 m = split($0, aline)
@end example
@@ -25506,7 +25633,7 @@ At this point, we should be curious to see what our records were split
into, so we try to look:
@example
-dgawk> @kbd{p n m alast aline}
+gawk> @kbd{p n m alast aline}
@print{} n = number (5)
@print{} m = number (5)
@print{} alast = array, 5 elements
@@ -25525,7 +25652,7 @@ inside the array?
The first choice would be to use subscripts:
@example
-dgawk> @kbd{p alast[0]}
+gawk> @kbd{p alast[0]}
@print{} "0" not in array `alast'
@end example
@@ -25533,16 +25660,16 @@ dgawk> @kbd{p alast[0]}
Oops!
@example
-dgawk> @kbd{p alast[1]}
+gawk> @kbd{p alast[1]}
@print{} alast["1"] = string ("awk")
@end example
This would be kind of slow for a 100-member array, though, so
-@command{dgawk} provides a shortcut (reminiscent of another language
+@command{gawk} provides a shortcut (reminiscent of another language
not to be mentioned):
@example
-dgawk> @kbd{p @@alast}
+gawk> @kbd{p @@alast}
@print{} alast["1"] = string ("awk")
@print{} alast["2"] = string ("is")
@print{} alast["3"] = string ("a")
@@ -25554,9 +25681,9 @@ It looks like we got this far OK. Let's take another step
or two:
@example
-dgawk> @kbd{n}
+gawk> @kbd{n}
@print{} 70 clast = join(alast, fcount, n)
-dgawk> @kbd{n}
+gawk> @kbd{n}
@print{} 71 cline = join(aline, fcount, m)
@end example
@@ -25566,7 +25693,7 @@ the virtual record to compare, and if the first field was numbered zero,
this would work. Let's look at what we've got:
@example
-dgawk> @kbd{p cline clast}
+gawk> @kbd{p cline clast}
@print{} cline = string ("gawk is a wonderful program!")
@print{} clast = string ("awk is a wonderful program!")
@end example
@@ -25575,10 +25702,10 @@ Hey, those look pretty familiar! They're just our original, unaltered,
input records. A little thinking (the human brain is still the best
debugging tool), and we realize that we were off by one!
-We get out of @command{dgawk}:
+We get out of the debugger:
@example
-dgawk> @kbd{q}
+gawk> @kbd{q}
@print{} The program is running. Exit anyway (y/n)? @kbd{y}
@end example
@@ -25594,9 +25721,9 @@ cline = join(aline, fcount+1, m)
and problem solved!
@node List of Debugger Commands
-@section Main @command{dgawk} Commands
+@section Main Debugger Commands
-The @command{dgawk} command set can be divided into the
+The @command{gawk} debugger command set can be divided into the
following categories:
@itemize @bullet{}
@@ -25623,24 +25750,24 @@ Miscellaneous
Each of these are discussed in the following subsections.
In the following descriptions, commands which may be abbreviated
show the abbreviation on a second description line.
-A @command{dgawk} command name may also be truncated if that partial
-name is unambiguous. @command{dgawk} has the built-in capability to
+A debugger command name may also be truncated if that partial
+name is unambiguous. The debugger has the built-in capability to
automatically repeat the previous command when just hitting @key{Enter}.
This works for the commands @code{list}, @code{next}, @code{nexti}, @code{step}, @code{stepi}
and @code{continue} executed without any argument.
@menu
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program and
- the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Breakpoint Control:: Control of Breakpoints.
+* Debugger Execution Control:: Control of Execution.
+* Viewing And Changing Data:: Viewing and Changing Data.
+* Execution Stack:: Dealing with the Stack.
+* Debugger Info:: Obtaining Information about the Program and
+ the Debugger State.
+* Miscellaneous Debugger Commands:: Miscellaneous Commands.
@end menu
@node Breakpoint Control
-@subsection Control Of Breakpoints
+@subsection Control of Breakpoints
As we saw above, the first thing you probably want to do in a debugging
session is to get your breakpoints set up, since otherwise your program
@@ -25675,10 +25802,10 @@ Each breakpoint is assigned a number which can be used to delete it from
the breakpoint list using the @code{delete} command.
With a breakpoint, you may also supply a condition. This is an
-@command{awk} expression (enclosed in double quotes) that @command{dgawk}
+@command{awk} expression (enclosed in double quotes) that the debugger
evaluates whenever the breakpoint is reached. If the condition is true,
-then @command{dgawk} stops execution and prompts for a command. Otherwise,
-@command{dgawk} continues executing the program.
+then the debugger stops execution and prompts for a command. Otherwise,
+it continues executing the program.
@cindex debugger commands, @code{clear}
@cindex @code{clear} debugger command
@@ -25704,10 +25831,10 @@ Delete breakpoint(s) set at entry to function @var{function}.
@cindex @code{condition} debugger command
@item @code{condition} @var{n} @code{"@var{expression}"}
Add a condition to existing breakpoint or watchpoint @var{n}. The
-condition is an @command{awk} expression that @command{dgawk} evaluates
+condition is an @command{awk} expression that the debugger evaluates
whenever the breakpoint or watchpoint is reached. If the condition is true, then
-@command{dgawk} stops execution and prompts for a command. Otherwise,
-@command{dgawk} continues executing the program. If the condition expression is
+the debugger stops execution and prompts for a command. Otherwise,
+the debugger continues executing the program. If the condition expression is
not specified, any existing condition is removed; i.e., the breakpoint or
watchpoint is made unconditional.
@@ -25763,7 +25890,7 @@ Set a temporary breakpoint (enabled for only one stop).
The arguments are the same as for @code{break}.
@end table
-@node Dgawk Execution Control
+@node Debugger Execution Control
@subsection Control of Execution
Now that your breakpoints are ready, you can start running the program
@@ -25792,14 +25919,14 @@ in the list that resumes execution (e.g., @code{continue}) terminates the list
For example:
@example
-dgawk> @kbd{commands}
+gawk> @kbd{commands}
> @kbd{silent}
> @kbd{printf "A silent breakpoint; i = %d\n", i}
> @kbd{info locals}
> @kbd{set i = 10}
> @kbd{continue}
> @kbd{end}
-dgawk>
+gawk>
@end example
@cindex debugger commands, @code{c} (@code{continue})
@@ -25849,7 +25976,7 @@ and the caller of that frame becomes the innermost frame.
@cindex @code{r} debugger command (alias for @code{run})
@item @code{run}
@itemx @code{r}
-Start/restart execution of the program. When restarting, @command{dgawk}
+Start/restart execution of the program. When restarting, the debugger
retains the current breakpoints, watchpoints, command history,
automatic display variables, and debugger options.
@@ -25872,7 +25999,7 @@ stopping, unless it encounters a breakpoint or watchpoint.
@itemx @code{si} [@var{count}]
Execute one (or @var{count}) instruction(s), stepping inside function calls.
(For illustration of what is meant by an ``instruction'' in @command{gawk},
-see the output shown under @code{dump} in @ref{Miscellaneous Dgawk Commands}.)
+see the output shown under @code{dump} in @ref{Miscellaneous Debugger Commands}.)
@cindex debugger commands, @code{u} (@code{until})
@cindex debugger commands, @code{until}
@@ -25900,7 +26027,7 @@ The value of the variable or field is displayed each time the program stops.
Each variable added to the list is identified by a unique number:
@example
-dgawk> @kbd{display x}
+gawk> @kbd{display x}
@print{} 10: x = 1
@end example
@@ -25937,7 +26064,7 @@ Print the value of a @command{gawk} variable or field.
Fields must be referenced by constants:
@example
-dgawk> @kbd{print $3}
+gawk> @kbd{print $3}
@end example
@noindent
@@ -25979,16 +26106,16 @@ You can also set special @command{awk} variables, such as @code{FS},
@item @code{watch} @var{var} | @code{$}@var{n} [@code{"@var{expression}"}]
@itemx @code{w} @var{var} | @code{$}@var{n} [@code{"@var{expression}"}]
Add variable @var{var} (or field @code{$@var{n}}) to the watch list.
-@command{dgawk} then stops whenever
+The debugger then stops whenever
the value of the variable or field changes. Each watched item is assigned a
number which can be used to delete it from the watch list using the
@code{unwatch} command.
With a watchpoint, you may also supply a condition. This is an
-@command{awk} expression (enclosed in double quotes) that @command{dgawk}
+@command{awk} expression (enclosed in double quotes) that the debugger
evaluates whenever the watchpoint is reached. If the condition is true,
-then @command{dgawk} stops execution and prompts for a command. Otherwise,
-@command{dgawk} continues executing the program.
+then the debugger stops execution and prompts for a command. Otherwise,
+@command{gawk} continues executing the program.
@cindex debugger commands, @code{undisplay}
@cindex @code{undisplay} debugger command
@@ -26004,8 +26131,8 @@ watch list.
@end table
-@node Dgawk Stack
-@subsection Dealing With The Stack
+@node Execution Stack
+@subsection Dealing with the Stack
Whenever you run a program which contains any function calls,
@command{gawk} maintains a stack of all of the function calls leading up
@@ -26049,12 +26176,12 @@ Move @var{count} (default 1) frames up the stack toward the outermost frame.
Then select and print the frame.
@end table
-@node Dgawk Info
-@subsection Obtaining Information About The Program and The Debugger State
+@node Debugger Info
+@subsection Obtaining Information about the Program and the Debugger State
Besides looking at the values of variables, there is often a need to get
other sorts of information about the state of your program and of the
-debugging environment itself. @command{dgawk} has one command which
+debugging environment itself. The @command{gawk} debugger has one command which
provides this information, appropriately called @code{info}. @code{info}
is used with one of a number of arguments that tell it exactly what
you want to know:
@@ -26092,7 +26219,7 @@ Local variables of the selected frame.
@item source
The name of the current source file. Each time the program stops, the
current source file is the file containing the current instruction.
-When @command{dgawk} first starts, the current source file is the first file
+When the debugger first starts, the current source file is the first file
included via the @option{-f} option. The
@samp{list @var{filename}:@var{lineno}} command can
be used at any time to change the current source.
@@ -26128,7 +26255,7 @@ The available options are:
@c nested table
@table @code
@item history_size
-The maximum number of lines to keep in the history file @file{./.dgawk_history}.
+The maximum number of lines to keep in the history file @file{./.gawk_history}.
The default is 100.
@item listsize
@@ -26140,14 +26267,14 @@ to standard output. An empty string (@code{""}) resets output to
standard output.
@item prompt
-The debugger prompt. The default is @samp{@w{dgawk> }}.
+The debugger prompt. The default is @samp{@w{gawk> }}.
@item save_history @r{[}on @r{|} off@r{]}
-Save command history to file @file{./.dgawk_history}.
+Save command history to file @file{./.gawk_history}.
The default is @code{on}.
@item save_options @r{[}on @r{|} off@r{]}
-Save current options to file @file{./.dgawkrc} upon exit.
+Save current options to file @file{./.gawkrc} upon exit.
The default is @code{on}.
Options are read back in to the next session upon startup.
@@ -26167,16 +26294,16 @@ Empty lines are ignored; they do @emph{not}
repeat the last command.
You can't restart the program by having more than one @code{run}
command in the file. Also, the list of commands may include additional
-@code{source} commands; however, @command{dgawk} will not source the
+@code{source} commands; however, the @command{gawk} debugger will not source the
same file more than once in order to avoid infinite recursion.
In addition to, or instead of the @code{source} command, you can use
-the @option{-R @var{file}} or @option{--command=@var{file}} command-line
+the @option{-D @var{file}} or @option{--debug=@var{file}} command-line
options to execute commands from a file non-interactively
(@pxref{Options}.
@end table
-@node Miscellaneous Dgawk Commands
+@node Miscellaneous Debugger Commands
@subsection Miscellaneous Commands
There are a few more commands which do not fit into the
@@ -26194,7 +26321,7 @@ partial dump of Davide Brini's obfuscated code
(@pxref{Signature Program}) demonstrates:
@smallexample
-dgawk> @kbd{dump}
+gawk> @kbd{dump}
@print{} # BEGIN
@print{}
@print{} [ 2:0x89faef4] Op_rule : [in_rule = BEGIN] [source_file = brini.awk]
@@ -26243,7 +26370,7 @@ dgawk> @kbd{dump}
@print{} [ :0x89fa3b0] Op_after_beginfile :
@print{} [ :0x89fa388] Op_no_op :
@print{} [ :0x89fa3c4] Op_after_endfile :
-dgawk>
+gawk>
@end smallexample
@cindex debugger commands, @code{h} (@code{help})
@@ -26252,7 +26379,7 @@ dgawk>
@cindex @code{h} debugger command (alias for @code{help})
@item @code{help}
@itemx @code{h}
-Print a list of all of the @command{dgawk} commands with a short
+Print a list of all of the @command{gawk} debugger commands with a short
summary of their usage. @samp{help @var{command}} prints the information
about the command @var{command}.
@@ -26299,7 +26426,7 @@ function @var{function}. This command may change the current source file.
Exit the debugger. Debugging is great fun, but sometimes we all have
to tend to other obligations in life, and sometimes we find the bug,
and are free to go on to the next one! As we saw above, if you are
-running a program, @command{dgawk} warns you if you accidentally type
+running a program, the debugger warns you if you accidentally type
@samp{q} or @samp{quit}, to make sure you really want to quit.
@cindex debugger commands, @code{trace}
@@ -26318,7 +26445,7 @@ fairly self-explanatory, and using @code{stepi} and @code{nexti} while
@node Readline Support
@section Readline Support
-If @command{dgawk} is compiled with the @code{readline} library, you
+If @command{gawk} is compiled with the @code{readline} library, you
can take advantage of that library's command completion and history expansion
features. The following types of completion are available:
@@ -26350,28 +26477,28 @@ and
@end table
-@node Dgawk Limitations
+@node Limitations
@section Limitations and Future Plans
-We hope you find @command{dgawk} useful and enjoyable to work with,
+We hope you find the @command{gawk} debugger useful and enjoyable to work with,
but as with any program, especially in its early releases, it still has
some limitations. A few which are worth being aware of are:
@itemize @bullet{}
@item
-At this point, @command{dgawk} does not give a detailed explanation of
+At this point, the debugger does not give a detailed explanation of
what you did wrong when you type in something it doesn't like. Rather, it just
responds @samp{syntax error}. When you do figure out what your mistake was,
though, you'll feel like a real guru.
@item
-If you perused the dump of opcodes in @ref{Miscellaneous Dgawk Commands},
+If you perused the dump of opcodes in @ref{Miscellaneous Debugger Commands},
(or if you are already familiar with @command{gawk} internals),
you will realize that much of the internal manipulation of data
in @command{gawk}, as in many interpreters, is done on a stack.
@code{Op_push}, @code{Op_pop}, etc., are the ``bread and butter'' of
-most @command{gawk} code. Unfortunately, as of now, @command{dgawk}
-does not allow you to examine the stack's contents.
+most @command{gawk} code. Unfortunately, as of now, the @command{gawk}
+debugger does not allow you to examine the stack's contents.
That is, the intermediate results of expression evaluation are on the
stack, but cannot be printed. Rather, only variables which are defined
@@ -26386,14 +26513,14 @@ programmer, you are expected to know what @code{/[^[:alnum:][:blank:]]/}
means.
@item
-@command{dgawk} is designed to be used by running a program (with all its
-parameters) on the command line, as described in @ref{dgawk invocation}.
+The @command{gawk} debugger is designed to be used by running a program (with all its
+parameters) on the command line, as described in @ref{Debugger Invocation}.
There is no way (as of now) to attach or ``break in'' to a running program.
This seems reasonable for a language which is used mainly for quickly
executing, short programs.
@item
-@command{dgawk} only accepts source supplied with the @option{-f} option.
+The @command{gawk} debugger only accepts source supplied with the @option{-f} option.
@end itemize
Look forward to a future release when these and other missing features may
@@ -27302,7 +27429,7 @@ environments.
@cindex Haque, John
John Haque
reworked the @command{gawk} internals to use a byte-code engine,
-providing the @command{dgawk} debugger for @command{awk} programs.
+providing the @command{gawk} debugger for @command{awk} programs.
@item
@cindex Yawitz, Efraim
@@ -28572,7 +28699,7 @@ since approximately 2003.
@item @command{pawk}
Nelson H.F.@: Beebe at the University of Utah has modified
Brian Kernighan's @command{awk} to provide timing and profiling information.
-It is different from @command{pgawk}
+It is different from @command{gawk} with the @option{--profile} option.
(@pxref{Profiling}),
in that it uses CPU-based profiling, not line-count
profiling. You may find it at either
@@ -29077,6 +29204,7 @@ When @option{--sandbox} is specified, extensions are disabled
@menu
* Internals:: A brief look at some @command{gawk} internals.
* Plugin License:: A note about licensing.
+* Loading Extensions:: How to load dynamic extensions.
* Sample Library:: A example of new functions.
@end menu
@@ -29141,22 +29269,12 @@ macro guarantees that a @code{NODE}'s wide-string value is current.
It may end up calling an internal @command{gawk} function.
It also guarantees that the wide string is zero-terminated.
-@cindex @code{get_curfunc_arg_count()} internal function
-@cindex internal function, @code{get_curfunc_arg_count()}
-@item size_t get_curfunc_arg_count(void)
-This function returns the actual number of parameters passed
-to the current function. Inside the code of an extension
-this can be used to determine the maximum index which is
-safe to use with @code{get_actual_argument}. If this value is
-greater than @code{nargs}, the function was
-called incorrectly from the @command{awk} program.
-
@cindex parameters@comma{} number of
@cindex @code{nargs} internal variable
@cindex internal variable, @code{nargs}
@item nargs
-Inside an extension function, this is the maximum number of
-expected parameters, as set by the @code{make_builtin()} function.
+Inside an extension function, this is the actual number of
+parameters passed to the current function.
@cindex @code{stptr} internal variable
@cindex internal variable, @code{stptr}
@@ -29202,13 +29320,10 @@ Make sure that @samp{n->type == Node_var_array} first.
@cindex arrays, elements, installing
@cindex @code{assoc_lookup()} internal function
@cindex internal function, @code{assoc_lookup()}
-@item NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)
+@item NODE **assoc_lookup(NODE *symbol, NODE *subs)
Finds, and installs if necessary, array elements.
@code{symbol} is the array, @code{subs} is the subscript.
This is usually a value created with @code{make_string()} (see below).
-@code{reference} should be @code{TRUE} if it is an error to use the
-value before it is created. Typically, @code{FALSE} is the
-correct value to use from extension functions.
@cindex strings
@cindex @code{make_string()} internal function
@@ -29400,6 +29515,56 @@ the symbol exists in the global scope. Something like this is enough:
int plugin_is_GPL_compatible;
@end example
+@node Loading Extensions
+@appendixsubsec Loading a Dynamic Extension
+@cindex loading extension
+@cindex @command{gawk}, functions, loading
+There are two ways to load a dynamically linked library. The first is to use the
+builtin @code{extension()}:
+
+@example
+extension(libname, init_func)
+@end example
+
+where @file{libname} is the library to load, and @samp{init_func} is the
+name of the initialization or bootstrap routine to run once loaded.
+
+The second method for dynamic loading of a library is to use the
+command line option @option{-l}:
+
+@example
+$ @kbd{gawk -l libname -f myprog}
+@end example
+
+This will work only if the initialization routine is named @code{dlload()}.
+
+If you use @code{extension()}, the library will be loaded
+at run time. This means that the functions are available only to the rest of
+your script. If you use the command line option @option{-l} instead,
+the library will be loaded before @command{gawk} starts compiling the
+actual program. The net effect is that you can use those functions
+anywhere in the program.
+
+@command{gawk} has a list of directories where it searches for libraries.
+By default, the list includes directories that depend upon how gawk was built
+and installed (@pxref{AWKPATH Variable}). If you want @command{gawk}
+to look for libraries in your private directory, you have to tell it.
+The way to do it is to set the @env{AWKPATH} environment variable
+(@pxref{AWKPATH Variable}).
+@command{gawk} supplies the default suffix @samp{.so} if it is not
+present in the name of the library.
+If the name of your library is @file{mylib.so}, you can simply type
+
+@example
+$ @kbd{gawk -l mylib -f myprog}
+@end example
+
+and @command{gawk} will do everything necessary to load in your library,
+and then call your @code{dlload()} routine.
+
+You can always specify the library using an absolute pathname, in which
+case @command{gawk} will not use @env{AWKPATH} to search for it.
+
@node Sample Library
@appendixsubsec Example: Directory and File Operation Built-ins
@c STARTOFRANGE chdirg
@@ -29592,7 +29757,7 @@ do_chdir(int nargs)
NODE *newdir;
int ret = -1;
- if (do_lint && get_curfunc_arg_count() != 1)
+ if (do_lint && nargs != 1)
lintwarn("chdir: called with incorrect number of arguments");
newdir = get_scalar_argument(0, FALSE);
@@ -29665,7 +29830,7 @@ do_stat(int nargs)
char *pmode; /* printable mode */
char *type = "unknown";
- if (do_lint && get_curfunc_arg_count() > 2)
+ if (do_lint && nargs > 2)
lintwarn("stat: called with too many arguments");
@end example
@@ -29699,15 +29864,15 @@ calls are shown here, since they all follow the same pattern:
@example
/* fill in the array */
- aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4));
*aptr = dupnode(file);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4));
*aptr = make_number((AWKNUM) sbuf.st_mode);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5));
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
unref(tmp);