diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 95 | ||||
-rw-r--r-- | doc/ChangeLog | 47 | ||||
-rw-r--r-- | doc/Makefile.am | 14 | ||||
-rw-r--r-- | doc/Makefile.in | 14 | ||||
-rw-r--r-- | doc/awkcard.in | 3 | ||||
-rw-r--r-- | doc/gawk.1 | 25 | ||||
-rw-r--r-- | doc/gawk.info | 1388 | ||||
-rw-r--r-- | doc/gawk.texi | 194 | ||||
-rw-r--r-- | doc/gawktexi.in | 214 |
9 files changed, 1254 insertions, 740 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 00000000..e12f5de0 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,95 @@ +# +# doc/CMakeLists.txt --- CMake input file for gawk +# +# Copyright (C) 2013 +# the Free Software Foundation, Inc. +# +# This file is part of GAWK, the GNU implementation of the +# AWK Programming Language. +# +# GAWK is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# GAWK is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# + +## process this file with CMake to produce Makefile + +MACRO(DocDependency outfile) + add_dependencies(doc ${outfile}) + add_custom_target( + ${outfile} + DEPENDS ${ARGN} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${CMAKE_SOURCE_DIR}/cmake/docmaker ${outfile} ${ARGN} + ) +ENDMACRO(DocDependency) + +find_program(TEXI2DVI_CONVERTER texi2dvi) +if (TEXI2DVI_CONVERTER) + add_custom_target(doc) + DocDependency(gawk.texi gawktexi.in rflashlight.eps api-figure1.fig api-figure2.fig api-figure3.fig general-program.fig process-flow.fig) + DocDependency(rflashlight.eps) + DocDependency(api-figure1.fig) + DocDependency(api-figure2.fig) + DocDependency(api-figure3.fig) + DocDependency(general-program.fig) + DocDependency(process-flow.fig) + DocDependency(gawk.dvi gawk.texi) + DocDependency(gawk.info gawk.texi) + DocDependency(gawkinet.dvi gawkinet.texi) + DocDependency(gawkinet.info gawkinet.texi) + DocDependency(gawkinet.texi statist.eps) + DocDependency(gawk.1.ps gawk.1) + DocDependency(igawk.1.ps igawk.1) + find_program(DVIPS_CONVERTER dvips) + if (DVIPS_CONVERTER) + DocDependency(gawk.ps gawk.dvi) + DocDependency(gawkinet.ps gawkinet.dvi) + find_program(PS2PDF_CONVERTER ps2pdf) + if (PS2PDF_CONVERTER) + DocDependency(gawk.1.pdf gawk.1.ps) + DocDependency(igawk.1.pdf igawk.1.ps) + DocDependency(gawk.pdf gawk.ps) + DocDependency(gawkinet.pdf gawkinet.ps) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.1.pdf DESTINATION doc) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/igawk.1.pdf DESTINATION doc) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.info DESTINATION doc) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawk.pdf DESTINATION doc) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawkinet.info DESTINATION doc) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gawkinet.pdf DESTINATION doc) + + set(CARDSRC macros cardfonts colors awkcard.tr) + set(CARDSRC_N macros cardfonts no.colors awkcard.tr) + set(CARDFILES ${CARDSRC} ad.block awkcard.in setter.outline) + DocDependency(awkcard.tr awkcard.in) + DocDependency(awkcard.nc ${CARDFILES}) + DocDependency(awkcard.ps ${CARDFILES}) + DocDependency(awkcard.pdf awkcard.ps) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/awkcard.pdf DESTINATION doc) + + else() + message(WARNING "Found no ps2pdf tool; no doc will be generated") + install(CODE "MESSAGE(\"doc generated only in .ps files\")") + endif() + else() + message(WARNING "Found no dvips tool; no doc will be generated") + install(CODE "MESSAGE(\"doc generated only in .dvi files and man pages in .ps files\")") + endif() +else() + message(WARNING "Found no texi2dvi tool; no doc will be generated") + add_custom_command( + TARGET doc + COMMAND echo no doc generated because of missing texi2dvi + ) +endif() + diff --git a/doc/ChangeLog b/doc/ChangeLog index 55a3d905..3f6d0641 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -18,10 +18,25 @@ * gawktexi.in: Pretty much done! + Unrelated: + + * gawktexi.in: Fix braino in awk version of div function. + Thanks to Katie Wasserman for the catch. + 2014-10-01 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: More fixes after reading through the MS. + Unrelated: + + * gawktexi.in: Add Katie Wasserman's program to compute + the digits of PI. + + Unrelated: + + * gawktexi.in: Document the differences between profiling + and pretty printing. + 2014-09-30 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: More fixes after reading through the MS. @@ -117,6 +132,10 @@ exercises. Remove use of LC_ALL in an example; doesn't seem to be needed anymore. + Unrelated: + + * gawktexi.in: Document that MirBSD is no longer supported. + 2014-08-25 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Exercises are excluded from print edition. @@ -150,6 +169,10 @@ * gawktexi.in: Starting on reviewer comments. Update acknowledgements. +2014-08-12 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Cause div.awk to get into the example files. + 2014-08-06 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Misc minor additions. @@ -164,6 +187,18 @@ * gawktexi.in: Fix doc for API get_record - errcode needs to be greater than zero. +2014-07-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Numeric Functions): For `div()', clarify + truncation is towards zero. Thanks to Michal Jaegermann + for pointing out the need to clarify this. + +2014-07-10 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Numeric Functions): Document new `div()' function. + (Arbitrary Precision Integers): Document raison d'etre for div(). + * gawk.1, awkcard.in: Document `div()'. + 2014-07-04 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Bracket Expressions): Add a note about how to @@ -174,6 +209,11 @@ * gawktexi.in: Update permissions on copyright page per latest maintain.texi. Add GPL to print version of book. +2014-06-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Document that --pretty-print no longer runs the + program. Remove mention of GAWK_NO_PP_RUN env var. + 2014-06-22 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Typo fixes and minor corrections. @@ -470,7 +510,7 @@ 2013-12-26 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: More minor additions / fixes. - (Bugs): Add John Malmberg for VMS. + (Bugs): Add John Malmberg for VMS. Other minor edits. 2013-12-25 Arnold D. Robbins <arnold@skeeve.com> @@ -544,6 +584,11 @@ * gawktexi.in (FN, FFN, DF,DDF, PVERSION, CTL): Remove macros. They have no alternate versions and are just in the way. +2013-08-15 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Document that ENVIRON updates affect the environment. + * gawktexi.in: Ditto. + 2013-06-27 Arnold D. Robbins <arnold@skeeve.com> * texinfo.tex: Update from Karl, fixes a formating problem. diff --git a/doc/Makefile.am b/doc/Makefile.am index 86321bbc..8a0442a7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -26,7 +26,7 @@ info_TEXINFOS = gawk.texi gawkinet.texi -man_MANS = gawk.1 igawk.1 +man_MANS = gawk.1 EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ @@ -50,7 +50,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ bc_notes # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf MAKEINFO = @MAKEINFO@ --no-split --force @@ -75,9 +75,9 @@ AWKCARD = awkcard.ps gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi -postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf gawk.ps: gawk.dvi TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi @@ -91,12 +91,6 @@ gawk.1.ps: gawk.1 gawk.1.pdf: gawk.1.ps ps2pdf gawk.1.ps gawk.1.pdf -igawk.1.ps: igawk.1 - -groff -man $(srcdir)/igawk.1 > igawk.1.ps - -igawk.1.pdf: igawk.1.ps - ps2pdf igawk.1.ps igawk.1.pdf - awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr diff --git a/doc/Makefile.in b/doc/Makefile.in index abaf5601..d89beffd 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -341,7 +341,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi -man_MANS = gawk.1 igawk.1 +man_MANS = gawk.1 EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ api-figure1.eps api-figure1.fig api-figure1.pdf \ @@ -365,7 +365,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" @@ -869,9 +869,9 @@ uninstall-man: uninstall-man1 gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi -postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf gawk.ps: gawk.dvi TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi @@ -885,12 +885,6 @@ gawk.1.ps: gawk.1 gawk.1.pdf: gawk.1.ps ps2pdf gawk.1.ps gawk.1.pdf -igawk.1.ps: igawk.1 - -groff -man $(srcdir)/igawk.1 > igawk.1.ps - -igawk.1.pdf: igawk.1.ps - ps2pdf igawk.1.ps igawk.1.pdf - awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr diff --git a/doc/awkcard.in b/doc/awkcard.in index ca28f0a7..556bdc1e 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1609,6 +1609,9 @@ expand; l lw(2i). \*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR The arctangent of \*(FIy/x\fP in radians. \*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians. +\*(CB\*(FCdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI res\*(FR\*(FC)\*(FR T{ +Return the result of integer division in \*(FIres\*(FR.\*(CD +T} \*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). \*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer. \*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR). @@ -917,11 +917,17 @@ An array containing the values of the current environment. The array is indexed by the environment variables, each element being the value of that variable (e.g., \fBENVIRON["HOME"]\fP might be \fB"/home/arnold"\fR). -Changing this array does not affect the environment seen by programs which +.sp +In POSIX mode, +changing this array does not affect the environment seen by programs which .I gawk spawns via redirection or the .B system() function. +Otherwise, +.I gawk +updates its real environment so that programs it spawns see +the changes. .TP .B ERRNO If a system error occurs either doing a redirection for @@ -2628,6 +2634,23 @@ Return the cosine of .IR expr , which is in radians. .TP +.BI div( num ", " denom ", " result ) +Truncate +.I num +and +.I denom +to integers. Return the quotient of +.I num +divided by +.I denom +in \fIresult\fB["quotient"]\fR +and the remainder in +in \fIresult\fB["remainder"]\fR. +This is a +.I gawk +extension, primarily of value when working with +arbitrarily large integers. +.TP .BI exp( expr ) The exponential function. .TP diff --git a/doc/gawk.info b/doc/gawk.info index ce710af4..65b7d008 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2588,10 +2588,8 @@ The following list describes options mandated by the POSIX standard: different file name for the output. No space is allowed between the `-o' and FILE, if FILE is supplied. - NOTE: Due to the way `gawk' has evolved, with this option - your program is still executed. This will change in the next - major release such that `gawk' will only pretty-print the - program and not run it. + NOTE: In the past, this option would also execute your + program. This is no longer the case. `-O' `--optimize' @@ -2980,13 +2978,6 @@ change. The variables are: supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -`GAWK_NO_PP_RUN' - If this variable exists, then when invoked with the - `--pretty-print' option, `gawk' skips running the program. - - CAUTION: This variable will not survive into the next major - release. - `GAWK_STACKSIZE' This specifies the amount by which `gawk' should grow its internal evaluation stack, when needed. @@ -3378,15 +3369,17 @@ sequences apply to both string constants and regexp constants: `\xHH...' The hexadecimal value HH, where HH stands for a sequence of - hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). Like - the same construct in ISO C, the escape sequence continues until - the first nonhexadecimal digit is seen. (c.e.) However, using - more than two hexadecimal digits produces undefined results. (The - `\x' escape sequence is not allowed in POSIX `awk'.) + hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). A + maximum of two digts are allowed after the `\x'. Any further + hexadecimal digits are treated as simple letters or numbers. + (c.e.) - CAUTION: The next major relase of `gawk' will change, such - that a maximum of two hexadecimal digits following the `\x' - will be used. + CAUTION: In ISO C, the escape sequence continues until the + first nonhexadecimal digit is seen. For many years, `gawk' + would continue incorporating hexadecimal digits into the + value until a non-hexadecimal digit or the end of the string + was encountered. However, using more than two hexadecimal + digits produces `\/' A literal slash (necessary for regexp constants only). This @@ -10259,10 +10252,18 @@ Options::), they are not special. An associative array containing the values of the environment. The array indices are the environment variable names; the elements are the values of the particular environment variables. For - example, `ENVIRON["HOME"]' might be `"/home/arnold"'. Changing - this array does not affect the environment passed on to any - programs that `awk' may spawn via redirection or the `system()' - function. (In a future version of `gawk', it may do so.) + example, `ENVIRON["HOME"]' might be `/home/arnold'. + + For POSIX `awk', changing this array does not affect the + environment passed on to any programs that `awk' may spawn via + redirection or the `system()' function. + + However, beginning with version 4.2, if not in POSIX compatibility + mode, `gawk' does update its own environment when `ENVIRON' is + changed, thus changing the environment seen by programs that it + creates. You should therefore be especially careful if you modify + `ENVIRON["PATH"]"', which is the search path for finding + executable programs. Some operating systems may not have environment variables. On such systems, the `ENVIRON' array is empty (except for @@ -11807,6 +11808,21 @@ brackets ([ ]): `cos(X)' Return the cosine of X, with X in radians. +`div(NUMERATOR, DENOMINATOR, RESULT)' + Perform integer division, similar to the standard C function of the + same name. First, truncate `numerator' and `denominator' towards + zero, creating integer values. Clear the `result' array, and then + set `result["quotient"]' to the result of `numerator / + denominator', truncated towards zero to an integer, and set + `result["remainder"]' to the result of `numerator % denominator', + truncated towards zero to an integer. This function is primarily + intended for use with arbitrary length integers; it avoids + creating MPFR arbitrary precision floating-point values (*note + Arbitrary Precision Integers::). + + This function is a `gawk' extension. It is not available in + compatibility mode (*note Options::). + `exp(X)' Return the exponential of X (`e ^ X') or report an error if X is out of range. The range of values X can have depends on your @@ -19857,8 +19873,8 @@ by the `Ctrl-<\>' key. called this way, `gawk' "pretty prints" the program into `awkprof.out', without any execution counts. - NOTE: The `--pretty-print' option still runs your program. This - will change in the next major release. + NOTE: Once upon a time, the `--pretty-print' option would also run + your program. This is is no longer the case. File: gawk.info, Node: Advanced Features Summary, Prev: Profiling, Up: Advanced Features @@ -22343,6 +22359,62 @@ just use the following: gawk -M 'BEGIN { n = 13; print n % 2 }' + When dividing two arbitrary precision integers with either `/' or +`%', the result is typically an arbitrary precision floating point +value (unless the denominator evenly divides into the numerator). In +order to do integer division or remainder with arbitrary precision +integers, use the built-in `div()' function (*note Numeric Functions::). + + You can simulate the `div()' function in standard `awk' using this +user-defined function: + + # div --- do integer division + + function div(numerator, denominator, result) + { + split("", result) + + numerator = int(numerator) + denominator = int(denominator) + result["quotient"] = int(numerator / denominator) + result["remainder"] = int(numerator % denominator) + + return 0.0 + } + + The following example program, contributed by Katie Wasserman, uses +`div()' to compute the digits of pi to as many places as you choose to +set: + + # pi.awk --- compute the digits of pi + + BEGIN { + digits = 100000 + two = 2 * 10 ^ digits + pi = two + for (m = digits * 4; m > 0; --m) { + d = m * 2 + 1 + x = pi * m + div(x, d, result) + pi = result["quotient"] + pi = pi + two + } + print pi + } + + When asked about the algorithm used, Katie replied: + + It's not that well known but it's not that obscure either. It's + Euler's modification to Newton's method for calculating pi. Take + a look at lines (23) - (25) here: + `http://mathworld.wolfram.com/PiFormulas.htm'. + + The algorithm I wrote simply expands the multiply by 2 and works + from the innermost expression outwards. I used this to program HP + calculators because it's quite easy to modify for tiny memory + devices with smallish word sizes. See + `http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899'. + ---------- Footnotes ---------- (1) Weisstein, Eric W. `Sylvester's Sequence'. From MathWorld--A @@ -26367,6 +26439,8 @@ the current version of `gawk'. - Ultrix + * Support for MirBSD was removed at `gawk' version 4.2. + File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -27269,7 +27343,9 @@ Various `.c', `.y', and `.h' files `doc/igawk.1' The `troff' source for a manual page describing the `igawk' - program presented in *note Igawk Program::. + program presented in *note Igawk Program::. (Since `gawk' can do + its own `@include' processing, neither `igawk' nor `igawk.1' are + installed.) `doc/Makefile.in' The input file used during the configuration process to generate @@ -27311,11 +27387,10 @@ Various `.c', `.y', and `.h' files contains a `Makefile.in' file, which `configure' uses to generate a `Makefile'. `Makefile.am' is used by GNU Automake to create `Makefile.in'. The library functions from *note Library - Functions::, and the `igawk' program from *note Igawk Program::, - are included as ready-to-use files in the `gawk' distribution. - They are installed as part of the installation process. The rest - of the programs in this Info file are available in appropriate - subdirectories of `awklib/eg'. + Functions::, are included as ready-to-use files in the `gawk' + distribution. They are installed as part of the installation + process. The rest of the programs in this Info file are available + in appropriate subdirectories of `awklib/eg'. `extension/*' The source code, manual pages, and infrastructure files for the @@ -31261,20 +31336,20 @@ Index * --include option: Options. (line 159) * --lint option <1>: Options. (line 185) * --lint option: Command Line. (line 20) -* --lint-old option: Options. (line 297) +* --lint-old option: Options. (line 295) * --load option: Options. (line 173) * --non-decimal-data option <1>: Nondecimal Data. (line 6) * --non-decimal-data option: Options. (line 211) * --non-decimal-data option, strtonum() function and: Nondecimal Data. (line 35) -* --optimize option: Options. (line 239) -* --posix option: Options. (line 256) -* --posix option, --traditional option and: Options. (line 275) +* --optimize option: Options. (line 237) +* --posix option: Options. (line 254) +* --posix option, --traditional option and: Options. (line 273) * --pretty-print option: Options. (line 226) * --profile option <1>: Profiling. (line 12) -* --profile option: Options. (line 244) -* --re-interval option: Options. (line 281) -* --sandbox option: Options. (line 288) +* --profile option: Options. (line 242) +* --re-interval option: Options. (line 279) +* --sandbox option: Options. (line 286) * --sandbox option, disabling system() function: I/O Functions. (line 96) * --sandbox option, input redirection with getline: Getline. (line 19) @@ -31282,9 +31357,9 @@ Index (line 6) * --source option: Options. (line 117) * --traditional option: Options. (line 81) -* --traditional option, --posix option and: Options. (line 275) +* --traditional option, --posix option and: Options. (line 273) * --use-lc-numeric option: Options. (line 221) -* --version option: Options. (line 302) +* --version option: Options. (line 300) * --with-whiny-user-strftime configuration option: Additional Configuration Options. (line 35) * -b option: Options. (line 68) @@ -31292,32 +31367,32 @@ Index * -c option: Options. (line 81) * -D option: Options. (line 108) * -d option: Options. (line 93) -* -e option: Options. (line 338) +* -e option: Options. (line 336) * -E option: Options. (line 125) * -e option: Options. (line 117) * -f option: Options. (line 25) * -F option: Options. (line 21) * -f option: Long. (line 12) -* -F option, -Ft sets FS to TAB: Options. (line 310) +* -F option, -Ft sets FS to TAB: Options. (line 308) * -F option, command-line: Command Line Field Separator. (line 6) -* -f option, multiple uses: Options. (line 315) +* -f option, multiple uses: Options. (line 313) * -g option: Options. (line 147) * -h option: Options. (line 154) * -i option: Options. (line 159) -* -L option: Options. (line 297) +* -L option: Options. (line 295) * -l option: Options. (line 173) * -M option: Options. (line 205) * -N option: Options. (line 221) * -n option: Options. (line 211) -* -O option: Options. (line 239) +* -O option: Options. (line 237) * -o option: Options. (line 226) -* -P option: Options. (line 256) -* -p option: Options. (line 244) -* -r option: Options. (line 281) -* -S option: Options. (line 288) +* -P option: Options. (line 254) +* -p option: Options. (line 242) +* -r option: Options. (line 279) +* -S option: Options. (line 286) * -v option: Assignment Options. (line 12) -* -V option: Options. (line 302) +* -V option: Options. (line 300) * -v option: Options. (line 32) * -W option: Options. (line 46) * . (period), regexp operator: Regexp Operators. (line 44) @@ -31379,10 +31454,10 @@ Index (line 8) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) -* \ (backslash), \" escape sequence: Escape Sequences. (line 82) +* \ (backslash), \" escape sequence: Escape Sequences. (line 84) * \ (backslash), \' operator (gawk): GNU Regexp Operators. (line 56) -* \ (backslash), \/ escape sequence: Escape Sequences. (line 73) +* \ (backslash), \/ escape sequence: Escape Sequences. (line 75) * \ (backslash), \< operator (gawk): GNU Regexp Operators. (line 30) * \ (backslash), \> operator (gawk): GNU Regexp Operators. @@ -31422,7 +31497,7 @@ Index * \ (backslash), in bracket expressions: Bracket Expressions. (line 17) * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. - (line 118) + (line 120) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31590,7 +31665,7 @@ Index * awf (amazingly workable formatter) program: Glossary. (line 24) * awk debugging, enabling: Options. (line 108) * awk language, POSIX version: Assignment Ops. (line 137) -* awk profiling, enabling: Options. (line 244) +* awk profiling, enabling: Options. (line 242) * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) @@ -31648,10 +31723,10 @@ Index * awkvars.out file: Options. (line 93) * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) -* backslash (\), \" escape sequence: Escape Sequences. (line 82) +* backslash (\), \" escape sequence: Escape Sequences. (line 84) * backslash (\), \' operator (gawk): GNU Regexp Operators. (line 56) -* backslash (\), \/ escape sequence: Escape Sequences. (line 73) +* backslash (\), \/ escape sequence: Escape Sequences. (line 75) * backslash (\), \< operator (gawk): GNU Regexp Operators. (line 30) * backslash (\), \> operator (gawk): GNU Regexp Operators. @@ -31691,7 +31766,7 @@ Index * backslash (\), in bracket expressions: Bracket Expressions. (line 17) * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. - (line 118) + (line 120) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31796,7 +31871,7 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 122) +* Brian Kernighan's awk <13>: Escape Sequences. (line 124) * Brian Kernighan's awk: When. (line 21) * Brian Kernighan's awk, extensions: BTL. (line 6) * Brian Kernighan's awk, source code: Other Versions. (line 13) @@ -31990,7 +32065,7 @@ Index * cosine: Numeric Functions. (line 15) * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 356) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 354) * csh utility, |& operator, comparison with: Two-way I/O. (line 25) * ctime() user-defined function: Function Example. (line 74) * currency symbols, localization: Explaining gettext. (line 104) @@ -32021,13 +32096,13 @@ Index * dark corner, CONVFMT variable: Strings And Numbers. (line 40) * dark corner, escape sequences: Other Arguments. (line 38) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 140) + (line 142) * dark corner, exit statement: Exit Statement. (line 30) * dark corner, field separators: Field Splitting Summary. (line 46) -* dark corner, FILENAME variable <1>: Auto-set. (line 90) +* dark corner, FILENAME variable <1>: Auto-set. (line 98) * dark corner, FILENAME variable: Getline Notes. (line 19) -* dark corner, FNR/NR variables: Auto-set. (line 308) +* dark corner, FNR/NR variables: Auto-set. (line 316) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) @@ -32175,7 +32250,7 @@ Index * debugger, read commands from a file: Debugger Info. (line 96) * debugging awk programs: Debugger. (line 6) * debugging gawk, bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 272) +* decimal point character, locale specific: Options. (line 270) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott <1>: Bugs. (line 72) @@ -32214,12 +32289,12 @@ Index (line 81) * differences in awk and gawk, command-line directories: Command-line directories. (line 6) -* differences in awk and gawk, ERRNO variable: Auto-set. (line 74) +* differences in awk and gawk, ERRNO variable: Auto-set. (line 82) * differences in awk and gawk, error messages: Special FD. (line 19) * differences in awk and gawk, FIELDWIDTHS variable: User-modified. (line 37) * differences in awk and gawk, FPAT variable: User-modified. (line 43) -* differences in awk and gawk, FUNCTAB variable: Auto-set. (line 115) +* differences in awk and gawk, FUNCTAB variable: Auto-set. (line 123) * differences in awk and gawk, function arguments (gawk): Calling Built-in. (line 16) * differences in awk and gawk, getline command: Getline. (line 19) @@ -32242,7 +32317,7 @@ Index (line 262) * differences in awk and gawk, print/printf statements: Format Modifiers. (line 13) -* differences in awk and gawk, PROCINFO array: Auto-set. (line 129) +* differences in awk and gawk, PROCINFO array: Auto-set. (line 137) * differences in awk and gawk, read timeouts: Read Timeout. (line 6) * differences in awk and gawk, record separators: awk split records. (line 125) @@ -32252,7 +32327,7 @@ Index (line 26) * differences in awk and gawk, RS/RT variables: gawk split records. (line 58) -* differences in awk and gawk, RT variable: Auto-set. (line 264) +* differences in awk and gawk, RT variable: Auto-set. (line 272) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -32260,7 +32335,7 @@ Index * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: gawk split records. (line 77) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 268) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 276) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 151) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -32276,6 +32351,7 @@ Index * display debugger command: Viewing And Changing Data. (line 8) * display debugger options: Debugger Info. (line 57) +* div: Numeric Functions. (line 18) * division: Arithmetic Ops. (line 44) * do-while statement: Do Statement. (line 6) * do-while statement, use of regexps in: Regexp Usage. (line 19) @@ -32300,8 +32376,8 @@ Index * dynamically loaded extensions: Dynamic Extensions. (line 6) * e debugger command (alias for enable): Breakpoint Control. (line 73) * EBCDIC: Ordinal Functions. (line 45) -* effective group ID of gawk user: Auto-set. (line 134) -* effective user ID of gawk user: Auto-set. (line 138) +* effective group ID of gawk user: Auto-set. (line 142) +* effective user ID of gawk user: Auto-set. (line 146) * egrep utility <1>: Egrep Program. (line 6) * egrep utility: Bracket Expressions. (line 26) * egrep.awk program: Egrep Program. (line 54) @@ -32356,13 +32432,13 @@ Index (line 11) * EREs (Extended Regular Expressions): Bracket Expressions. (line 26) * ERRNO variable <1>: TCP/IP Networking. (line 54) -* ERRNO variable: Auto-set. (line 74) +* ERRNO variable: Auto-set. (line 82) * ERRNO variable, with BEGINFILE pattern: BEGINFILE/ENDFILE. (line 26) * ERRNO variable, with close() function: Close Files And Pipes. (line 140) * ERRNO variable, with getline command: Getline. (line 19) * error handling: Special FD. (line 19) -* error handling, ERRNO variable and: Auto-set. (line 74) +* error handling, ERRNO variable and: Auto-set. (line 82) * error output: Special FD. (line 6) * escape processing, gsub()/gensub()/sub() functions: Gory Details. (line 6) @@ -32395,10 +32471,10 @@ Index * exit status, of VMS: VMS Running. (line 29) * exit the debugger: Miscellaneous Debugger Commands. (line 99) -* exp: Numeric Functions. (line 18) +* exp: Numeric Functions. (line 33) * expand utility: Very Simple. (line 72) * Expat XML parser library: gawkextlib. (line 31) -* exponent: Numeric Functions. (line 18) +* exponent: Numeric Functions. (line 33) * expressions: Expressions. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * expressions, assignment: Assignment Ops. (line 6) @@ -32416,7 +32492,7 @@ Index (line 6) * extension API version: Extension Versioning. (line 6) -* extension API, version number: Auto-set. (line 231) +* extension API, version number: Auto-set. (line 239) * extension example: Extension Example. (line 6) * extension registration: Registration Functions. (line 6) @@ -32498,7 +32574,7 @@ Index * file names, distinguishing: Auto-set. (line 56) * file names, in compatibility mode: Special Caveats. (line 9) * file names, standard streams in gawk: Special FD. (line 48) -* FILENAME variable <1>: Auto-set. (line 90) +* FILENAME variable <1>: Auto-set. (line 98) * FILENAME variable: Reading Files. (line 6) * FILENAME variable, getline, setting with: Getline Notes. (line 19) * filenames, assignments as: Ignoring Assigns. (line 6) @@ -32566,9 +32642,9 @@ Index * flush buffered output: I/O Functions. (line 28) * fnmatch() extension function: Extension Sample Fnmatch. (line 12) -* FNR variable <1>: Auto-set. (line 99) +* FNR variable <1>: Auto-set. (line 107) * FNR variable: Records. (line 6) -* FNR variable, changing: Auto-set. (line 308) +* FNR variable, changing: Auto-set. (line 316) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -32605,7 +32681,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 268) +* FS variable, as TAB character: Options. (line 266) * FS variable, changing value of: Field Separators. (line 35) * FS variable, running awk programs and: Cut Program. (line 63) * FS variable, setting from command line: Command Line Field Separator. @@ -32618,7 +32694,7 @@ Index * FSF (Free Software Foundation): Manual History. (line 6) * fts() extension function: Extension Sample File Functions. (line 61) -* FUNCTAB array: Auto-set. (line 115) +* FUNCTAB array: Auto-set. (line 123) * function calls: Function Calls. (line 6) * function calls, indirect: Indirect Calls. (line 6) * function calls, indirect, @-notation for: Indirect Calls. (line 47) @@ -32668,7 +32744,7 @@ Index * G-d: Acknowledgments. (line 94) * Garfinkle, Scott: Contributors. (line 34) * gawk program, dynamic profiling: Profiling. (line 179) -* gawk version: Auto-set. (line 206) +* gawk version: Auto-set. (line 214) * gawk, ARGIND variable in: Other Arguments. (line 15) * gawk, awk and <1>: This Manual. (line 14) * gawk, awk and: Preface. (line 21) @@ -32686,13 +32762,13 @@ Index * gawk, distribution: Distribution contents. (line 6) * gawk, ERRNO variable in <1>: TCP/IP Networking. (line 54) -* gawk, ERRNO variable in <2>: Auto-set. (line 74) +* gawk, ERRNO variable in <2>: Auto-set. (line 82) * gawk, ERRNO variable in <3>: BEGINFILE/ENDFILE. (line 26) * gawk, ERRNO variable in <4>: Close Files And Pipes. (line 140) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 130) -* gawk, extensions, disabling: Options. (line 256) +* gawk, escape sequences: Escape Sequences. (line 132) +* gawk, extensions, disabling: Options. (line 254) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) * gawk, field separators and: User-modified. (line 71) @@ -32703,7 +32779,7 @@ Index * gawk, FPAT variable in <1>: User-modified. (line 43) * gawk, FPAT variable in: Splitting By Content. (line 27) -* gawk, FUNCTAB array in: Auto-set. (line 115) +* gawk, FUNCTAB array in: Auto-set. (line 123) * gawk, function arguments and: Calling Built-in. (line 16) * gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42) * gawk, IGNORECASE variable in <1>: Array Sorting Functions. @@ -32735,7 +32811,7 @@ Index * gawk, predefined variables and: Built-in Variables. (line 14) * gawk, PROCINFO array in <1>: Two-way I/O. (line 99) * gawk, PROCINFO array in <2>: Time Functions. (line 47) -* gawk, PROCINFO array in: Auto-set. (line 129) +* gawk, PROCINFO array in: Auto-set. (line 137) * gawk, regexp constants and: Using Constant Regexps. (line 28) * gawk, regular expressions, case sensitivity: Case-sensitivity. @@ -32743,18 +32819,18 @@ Index * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) * gawk, regular expressions, precedence: Regexp Operators. (line 161) -* gawk, RT variable in <1>: Auto-set. (line 264) +* gawk, RT variable in <1>: Auto-set. (line 272) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 125) * gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Constant Size. (line 88) * gawk, string-translation functions: I18N Functions. (line 6) -* gawk, SYMTAB array in: Auto-set. (line 268) +* gawk, SYMTAB array in: Auto-set. (line 276) * gawk, TEXTDOMAIN variable in: User-modified. (line 151) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) -* gawk, versions of, information about, printing: Options. (line 302) +* gawk, versions of, information about, printing: Options. (line 300) * gawk, VMS version of: VMS Installation. (line 6) * gawk, word-boundary operator: GNU Regexp Operators. (line 63) @@ -32836,7 +32912,7 @@ Index * Grigera, Juan: Contributors. (line 57) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) -* group ID of gawk user: Auto-set. (line 179) +* group ID of gawk user: Auto-set. (line 187) * groups, information about: Group Functions. (line 6) * gsub <1>: String Functions. (line 139) * gsub: Using Constant Regexps. @@ -32937,7 +33013,7 @@ Index * installation, VMS: VMS Installation. (line 6) * installing gawk: Installation. (line 6) * instruction tracing, in debugger: Debugger Info. (line 89) -* int: Numeric Functions. (line 23) +* int: Numeric Functions. (line 38) * INT signal (MS-Windows): Profiling. (line 214) * integer array indices: Numeric Array Subscripts. (line 31) @@ -33066,7 +33142,7 @@ Index * lint checking, empty programs: Command Line. (line 16) * lint checking, issuing warnings: Options. (line 185) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 341) + (line 339) * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 88) @@ -33082,14 +33158,14 @@ Index * loading, extensions: Options. (line 173) * local variables, in a function: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 81) -* locale decimal point character: Options. (line 272) +* locale decimal point character: Options. (line 270) * locale, definition of: Locales. (line 6) * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. (line 6) -* log: Numeric Functions. (line 30) +* log: Numeric Functions. (line 45) * log files, timestamps in: Time Functions. (line 6) -* logarithm: Numeric Functions. (line 30) +* logarithm: Numeric Functions. (line 45) * logical false/true: Truth Values. (line 6) * logical operators, See Boolean expressions: Boolean Ops. (line 6) * login information: Passwd Functions. (line 16) @@ -33130,8 +33206,8 @@ Index * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) -* mawk utility: Escape Sequences. (line 130) -* maximum precision supported by MPFR library: Auto-set. (line 220) +* mawk utility: Escape Sequences. (line 132) +* maximum precision supported by MPFR library: Auto-set. (line 228) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) * message object files: Explaining gettext. (line 42) @@ -33143,8 +33219,8 @@ Index (line 54) * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) -* metacharacters, escape sequences for: Escape Sequences. (line 136) -* minimum precision supported by MPFR library: Auto-set. (line 223) +* metacharacters, escape sequences for: Escape Sequences. (line 138) +* minimum precision supported by MPFR library: Auto-set. (line 231) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) * monetary information, localization: Explaining gettext. (line 104) @@ -33164,7 +33240,7 @@ Index * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 69) -* newlines <2>: Options. (line 262) +* newlines <2>: Options. (line 260) * newlines: Statements/Lines. (line 6) * newlines, as field separators: Default Field Splitting. (line 6) @@ -33193,7 +33269,7 @@ Index (line 47) * nexti debugger command: Debugger Execution Control. (line 49) -* NF variable <1>: Auto-set. (line 104) +* NF variable <1>: Auto-set. (line 112) * NF variable: Fields. (line 33) * NF variable, decrementing: Changing Fields. (line 107) * ni debugger command (alias for nexti): Debugger Execution Control. @@ -33202,9 +33278,9 @@ Index * non-existent array elements: Reference to Elements. (line 23) * not Boolean-logic operator: Boolean Ops. (line 6) -* NR variable <1>: Auto-set. (line 124) +* NR variable <1>: Auto-set. (line 132) * NR variable: Records. (line 6) -* NR variable, changing: Auto-set. (line 308) +* NR variable, changing: Auto-set. (line 316) * null strings <1>: Basic Data Typing. (line 26) * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. @@ -33318,7 +33394,7 @@ Index * p debugger command (alias for print): Viewing And Changing Data. (line 36) * Papadopoulos, Panos: Contributors. (line 128) -* parent process ID of gawk process: Auto-set. (line 188) +* parent process ID of gawk process: Auto-set. (line 196) * parentheses (), in a profile: Profiling. (line 146) * parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) @@ -33360,14 +33436,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 105) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 100) +* portability: Escape Sequences. (line 102) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) * portability, ARGV variable: Executable Scripts. (line 59) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 118) + (line 120) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33385,7 +33461,7 @@ Index * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX awk: Precedence. (line 98) -* portability, POSIXLY_CORRECT environment variable: Options. (line 361) +* portability, POSIXLY_CORRECT environment variable: Options. (line 359) * portability, substr() function: String Functions. (line 511) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 37) @@ -33406,7 +33482,7 @@ Index * POSIX awk, < operator and: Getline/File. (line 26) * POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30) * POSIX awk, backslashes in string constants: Escape Sequences. - (line 118) + (line 120) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) * POSIX awk, bracket expressions and: Bracket Expressions. (line 26) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. @@ -33434,11 +33510,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 55) -* POSIX mode: Options. (line 256) +* POSIX mode: Options. (line 254) * POSIX, awk and: Preface. (line 21) * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) -* POSIXLY_CORRECT environment variable: Options. (line 341) +* POSIXLY_CORRECT environment variable: Options. (line 339) * PREC variable: User-modified. (line 123) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) @@ -33485,24 +33561,24 @@ Index * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) * private variables: Library Names. (line 11) -* process group idIDof gawk process: Auto-set. (line 182) -* process ID of gawk process: Auto-set. (line 185) +* process group idIDof gawk process: Auto-set. (line 190) +* process ID of gawk process: Auto-set. (line 193) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array <1>: Passwd Functions. (line 6) * PROCINFO array <2>: Time Functions. (line 47) -* PROCINFO array: Auto-set. (line 129) +* PROCINFO array: Auto-set. (line 137) * PROCINFO array, and communications via ptys: Two-way I/O. (line 99) * PROCINFO array, and group membership: Group Functions. (line 6) * PROCINFO array, and user and group ID numbers: Id Program. (line 15) * PROCINFO array, testing the field splitting: Passwd Functions. (line 154) -* PROCINFO array, uses: Auto-set. (line 241) +* PROCINFO array, uses: Auto-set. (line 249) * PROCINFO, values of sorted_in: Controlling Scanning. (line 26) * profiling awk programs: Profiling. (line 6) * profiling awk programs, dynamically: Profiling. (line 179) -* program identifiers: Auto-set. (line 147) +* program identifiers: Auto-set. (line 155) * program, definition of: Getting Started. (line 21) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 35) @@ -33546,12 +33622,12 @@ Index * Rakitzis, Byron: History Sorting. (line 25) * Ramey, Chet <1>: General Data Types. (line 6) * Ramey, Chet: Acknowledgments. (line 60) -* rand: Numeric Functions. (line 35) +* rand: Numeric Functions. (line 50) * random numbers, Cliff: Cliff Random Function. (line 6) * random numbers, rand()/srand() functions: Numeric Functions. - (line 35) -* random numbers, seed of: Numeric Functions. (line 65) + (line 50) +* random numbers, seed of: Numeric Functions. (line 80) * range expressions (regexps): Bracket Expressions. (line 6) * range patterns: Ranges. (line 6) * range patterns, line continuation and: Ranges. (line 65) @@ -33620,7 +33696,7 @@ Index (line 59) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 70) -* regular expressions, interval expressions and: Options. (line 281) +* regular expressions, interval expressions and: Options. (line 279) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators <1>: Regexp Operators. (line 6) @@ -33660,7 +33736,7 @@ Index * right shift: Bitwise Functions. (line 53) * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 251) +* RLENGTH variable: Auto-set. (line 259) * RLENGTH variable, match() function and: String Functions. (line 227) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 72) @@ -33678,7 +33754,7 @@ Index * Robbins, Miriam <2>: Getline/Pipe. (line 39) * Robbins, Miriam: Acknowledgments. (line 94) * Rommel, Kai Uwe: Contributors. (line 42) -* round to nearest integer: Numeric Functions. (line 23) +* round to nearest integer: Numeric Functions. (line 38) * round() user-defined function: Round Function. (line 16) * rounding numbers: Round Function. (line 6) * ROUNDMODE variable: User-modified. (line 127) @@ -33686,9 +33762,9 @@ Index * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 53) -* RSTART variable: Auto-set. (line 257) +* RSTART variable: Auto-set. (line 265) * RSTART variable, match() function and: String Functions. (line 227) -* RT variable <1>: Auto-set. (line 264) +* RT variable <1>: Auto-set. (line 272) * RT variable <2>: Multiple Line. (line 129) * RT variable: awk split records. (line 125) * Rubin, Paul <1>: Contributors. (line 15) @@ -33701,14 +33777,14 @@ Index (line 68) * sample debugging session: Sample Debugging Session. (line 6) -* sandbox mode: Options. (line 288) +* sandbox mode: Options. (line 286) * save debugger options: Debugger Info. (line 84) * scalar or array: Type Functions. (line 11) * scalar values: Basic Data Typing. (line 13) * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew <1>: Contributors. (line 133) -* Schorr, Andrew <2>: Auto-set. (line 291) +* Schorr, Andrew <2>: Auto-set. (line 299) * Schorr, Andrew: Acknowledgments. (line 60) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -33728,7 +33804,7 @@ Index * sed utility <2>: Simple Sed. (line 6) * sed utility: Field Splitting Summary. (line 46) -* seeding random number generator: Numeric Functions. (line 65) +* seeding random number generator: Numeric Functions. (line 80) * semicolon (;), AWKPATH variable and: PC Using. (line 10) * semicolon (;), separating statements in actions <1>: Statements. (line 10) @@ -33789,14 +33865,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 116) + (line 118) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) -* sidebar, Changing NR and FNR: Auto-set. (line 306) +* sidebar, Changing NR and FNR: Auto-set. (line 314) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 137) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 134) + (line 136) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33829,8 +33905,8 @@ Index * SIGUSR1 signal, for dynamic profiling: Profiling. (line 188) * silent debugger command: Debugger Execution Control. (line 10) -* sin: Numeric Functions. (line 76) -* sine: Numeric Functions. (line 76) +* sin: Numeric Functions. (line 91) +* sine: Numeric Functions. (line 91) * single quote ('): One-shot. (line 15) * single quote (') in gawk command lines: Long. (line 35) * single quote ('), in shell commands: Quoting. (line 48) @@ -33880,10 +33956,10 @@ Index * sprintf() function, OFMT variable and: User-modified. (line 113) * sprintf() function, print/printf statements and: Round Function. (line 6) -* sqrt: Numeric Functions. (line 79) +* sqrt: Numeric Functions. (line 94) * square brackets ([]), regexp operator: Regexp Operators. (line 56) -* square root: Numeric Functions. (line 79) -* srand: Numeric Functions. (line 83) +* square root: Numeric Functions. (line 94) +* srand: Numeric Functions. (line 98) * stack frame: Debugging Terms. (line 10) * Stallman, Richard <1>: Glossary. (line 296) * Stallman, Richard <2>: Contributors. (line 23) @@ -33955,9 +34031,9 @@ Index * substr: String Functions. (line 480) * substring: String Functions. (line 480) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 236) +* supplementary groups of gawk process: Auto-set. (line 244) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 268) +* SYMTAB array: Auto-set. (line 276) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) * system: I/O Functions. (line 74) @@ -34024,7 +34100,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 118) + (line 120) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -34080,7 +34156,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 130) + (line 132) * Unix awk, close() function and: Close Files And Pipes. (line 132) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -34134,10 +34210,10 @@ Index * variables, uninitialized, as array subscripts: Uninitialized Subscripts. (line 6) * variables, user-defined: Variables. (line 6) -* version of gawk: Auto-set. (line 206) -* version of gawk extension API: Auto-set. (line 231) -* version of GNU MP library: Auto-set. (line 217) -* version of GNU MPFR library: Auto-set. (line 213) +* version of gawk: Auto-set. (line 214) +* version of gawk extension API: Auto-set. (line 239) +* version of GNU MP library: Auto-set. (line 225) +* version of GNU MPFR library: Auto-set. (line 221) * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 65) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 9) @@ -34174,7 +34250,7 @@ Index * whitespace, as field separators: Default Field Splitting. (line 6) * whitespace, functions, calling: Calling Built-in. (line 10) -* whitespace, newlines as: Options. (line 262) +* whitespace, newlines as: Options. (line 260) * Williams, Kent: Contributors. (line 34) * Woehlke, Matthew: Contributors. (line 79) * Woods, John: Contributors. (line 27) @@ -34266,518 +34342,518 @@ Node: Intro Summary110454 Node: Invoking Gawk111337 Node: Command Line112852 Node: Options113643 -Ref: Options-Footnote-1129538 -Node: Other Arguments129563 -Node: Naming Standard Input132524 -Node: Environment Variables133617 -Node: AWKPATH Variable134175 -Ref: AWKPATH Variable-Footnote-1137027 -Ref: AWKPATH Variable-Footnote-2137072 -Node: AWKLIBPATH Variable137332 -Node: Other Environment Variables138091 -Node: Exit Status141811 -Node: Include Files142486 -Node: Loading Shared Libraries146064 -Node: Obsolete147491 -Node: Undocumented148188 -Node: Invoking Summary148455 -Node: Regexp150121 -Node: Regexp Usage151580 -Node: Escape Sequences153613 -Node: Regexp Operators159630 -Ref: Regexp Operators-Footnote-1167064 -Ref: Regexp Operators-Footnote-2167211 -Node: Bracket Expressions167309 -Ref: table-char-classes169326 -Node: Leftmost Longest172266 -Node: Computed Regexps173568 -Node: GNU Regexp Operators176965 -Node: Case-sensitivity180667 -Ref: Case-sensitivity-Footnote-1183557 -Ref: Case-sensitivity-Footnote-2183792 -Node: Regexp Summary183900 -Node: Reading Files185369 -Node: Records187463 -Node: awk split records188195 -Node: gawk split records193109 -Ref: gawk split records-Footnote-1197648 -Node: Fields197685 -Ref: Fields-Footnote-1200483 -Node: Nonconstant Fields200569 -Ref: Nonconstant Fields-Footnote-1202805 -Node: Changing Fields203007 -Node: Field Separators208939 -Node: Default Field Splitting211643 -Node: Regexp Field Splitting212760 -Node: Single Character Fields216110 -Node: Command Line Field Separator217169 -Node: Full Line Fields220381 -Ref: Full Line Fields-Footnote-1220889 -Node: Field Splitting Summary220935 -Ref: Field Splitting Summary-Footnote-1224066 -Node: Constant Size224167 -Node: Splitting By Content228773 -Ref: Splitting By Content-Footnote-1232846 -Node: Multiple Line232886 -Ref: Multiple Line-Footnote-1238775 -Node: Getline238954 -Node: Plain Getline241165 -Node: Getline/Variable243805 -Node: Getline/File244952 -Node: Getline/Variable/File246336 -Ref: Getline/Variable/File-Footnote-1247937 -Node: Getline/Pipe248024 -Node: Getline/Variable/Pipe250707 -Node: Getline/Coprocess251838 -Node: Getline/Variable/Coprocess253090 -Node: Getline Notes253829 -Node: Getline Summary256621 -Ref: table-getline-variants257033 -Node: Read Timeout257862 -Ref: Read Timeout-Footnote-1261676 -Node: Command-line directories261734 -Node: Input Summary262638 -Node: Input Exercises265890 -Node: Printing266618 -Node: Print268395 -Node: Print Examples269852 -Node: Output Separators272631 -Node: OFMT274649 -Node: Printf276003 -Node: Basic Printf276788 -Node: Control Letters278359 -Node: Format Modifiers282343 -Node: Printf Examples288350 -Node: Redirection290832 -Node: Special FD297671 -Ref: Special FD-Footnote-1300828 -Node: Special Files300902 -Node: Other Inherited Files301518 -Node: Special Network302518 -Node: Special Caveats303379 -Node: Close Files And Pipes304330 -Ref: Close Files And Pipes-Footnote-1311509 -Ref: Close Files And Pipes-Footnote-2311657 -Node: Output Summary311807 -Node: Output Exercises312803 -Node: Expressions313483 -Node: Values314668 -Node: Constants315344 -Node: Scalar Constants316024 -Ref: Scalar Constants-Footnote-1316883 -Node: Nondecimal-numbers317133 -Node: Regexp Constants320133 -Node: Using Constant Regexps320658 -Node: Variables323796 -Node: Using Variables324451 -Node: Assignment Options326361 -Node: Conversion328236 -Node: Strings And Numbers328760 -Ref: Strings And Numbers-Footnote-1331824 -Node: Locale influences conversions331933 -Ref: table-locale-affects334678 -Node: All Operators335266 -Node: Arithmetic Ops335896 -Node: Concatenation338401 -Ref: Concatenation-Footnote-1341220 -Node: Assignment Ops341326 -Ref: table-assign-ops346309 -Node: Increment Ops347587 -Node: Truth Values and Conditions351025 -Node: Truth Values352108 -Node: Typing and Comparison353157 -Node: Variable Typing353950 -Node: Comparison Operators357602 -Ref: table-relational-ops358012 -Node: POSIX String Comparison361527 -Ref: POSIX String Comparison-Footnote-1362599 -Node: Boolean Ops362737 -Ref: Boolean Ops-Footnote-1367216 -Node: Conditional Exp367307 -Node: Function Calls369034 -Node: Precedence372914 -Node: Locales376582 -Node: Expressions Summary378213 -Node: Patterns and Actions380787 -Node: Pattern Overview381907 -Node: Regexp Patterns383586 -Node: Expression Patterns384129 -Node: Ranges387909 -Node: BEGIN/END391015 -Node: Using BEGIN/END391777 -Ref: Using BEGIN/END-Footnote-1394514 -Node: I/O And BEGIN/END394620 -Node: BEGINFILE/ENDFILE396934 -Node: Empty399835 -Node: Using Shell Variables400152 -Node: Action Overview402428 -Node: Statements404755 -Node: If Statement406603 -Node: While Statement408101 -Node: Do Statement410129 -Node: For Statement411271 -Node: Switch Statement414426 -Node: Break Statement416814 -Node: Continue Statement418855 -Node: Next Statement420680 -Node: Nextfile Statement423060 -Node: Exit Statement425690 -Node: Built-in Variables428093 -Node: User-modified429226 -Ref: User-modified-Footnote-1436906 -Node: Auto-set436968 -Ref: Auto-set-Footnote-1449825 -Ref: Auto-set-Footnote-2450030 -Node: ARGC and ARGV450086 -Node: Pattern Action Summary454290 -Node: Arrays456717 -Node: Array Basics458046 -Node: Array Intro458890 -Ref: figure-array-elements460854 -Ref: Array Intro-Footnote-1463378 -Node: Reference to Elements463506 -Node: Assigning Elements465956 -Node: Array Example466447 -Node: Scanning an Array468205 -Node: Controlling Scanning471221 -Ref: Controlling Scanning-Footnote-1476410 -Node: Numeric Array Subscripts476726 -Node: Uninitialized Subscripts478911 -Node: Delete480528 -Ref: Delete-Footnote-1483272 -Node: Multidimensional483329 -Node: Multiscanning486424 -Node: Arrays of Arrays488013 -Node: Arrays Summary492774 -Node: Functions494879 -Node: Built-in495752 -Node: Calling Built-in496830 -Node: Numeric Functions498818 -Ref: Numeric Functions-Footnote-1502840 -Ref: Numeric Functions-Footnote-2503197 -Ref: Numeric Functions-Footnote-3503245 -Node: String Functions503514 -Ref: String Functions-Footnote-1526986 -Ref: String Functions-Footnote-2527115 -Ref: String Functions-Footnote-3527363 -Node: Gory Details527450 -Ref: table-sub-escapes529231 -Ref: table-sub-proposed530751 -Ref: table-posix-sub532115 -Ref: table-gensub-escapes533655 -Ref: Gory Details-Footnote-1534487 -Node: I/O Functions534638 -Ref: I/O Functions-Footnote-1541739 -Node: Time Functions541886 -Ref: Time Functions-Footnote-1552355 -Ref: Time Functions-Footnote-2552423 -Ref: Time Functions-Footnote-3552581 -Ref: Time Functions-Footnote-4552692 -Ref: Time Functions-Footnote-5552804 -Ref: Time Functions-Footnote-6553031 -Node: Bitwise Functions553297 -Ref: table-bitwise-ops553859 -Ref: Bitwise Functions-Footnote-1558167 -Node: Type Functions558336 -Node: I18N Functions559485 -Node: User-defined561130 -Node: Definition Syntax561934 -Ref: Definition Syntax-Footnote-1567340 -Node: Function Example567409 -Ref: Function Example-Footnote-1570326 -Node: Function Caveats570348 -Node: Calling A Function570866 -Node: Variable Scope571821 -Node: Pass By Value/Reference574809 -Node: Return Statement578319 -Node: Dynamic Typing581303 -Node: Indirect Calls582232 -Ref: Indirect Calls-Footnote-1593536 -Node: Functions Summary593664 -Node: Library Functions596363 -Ref: Library Functions-Footnote-1599981 -Ref: Library Functions-Footnote-2600124 -Node: Library Names600295 -Ref: Library Names-Footnote-1603755 -Ref: Library Names-Footnote-2603975 -Node: General Functions604061 -Node: Strtonum Function605164 -Node: Assert Function608184 -Node: Round Function611508 -Node: Cliff Random Function613049 -Node: Ordinal Functions614065 -Ref: Ordinal Functions-Footnote-1617130 -Ref: Ordinal Functions-Footnote-2617382 -Node: Join Function617593 -Ref: Join Function-Footnote-1619364 -Node: Getlocaltime Function619564 -Node: Readfile Function623305 -Node: Shell Quoting625275 -Node: Data File Management626676 -Node: Filetrans Function627308 -Node: Rewind Function631367 -Node: File Checking632752 -Ref: File Checking-Footnote-1634080 -Node: Empty Files634281 -Node: Ignoring Assigns636260 -Node: Getopt Function637811 -Ref: Getopt Function-Footnote-1649271 -Node: Passwd Functions649474 -Ref: Passwd Functions-Footnote-1658325 -Node: Group Functions658413 -Ref: Group Functions-Footnote-1666316 -Node: Walking Arrays666529 -Node: Library Functions Summary668132 -Node: Library Exercises669533 -Node: Sample Programs670813 -Node: Running Examples671583 -Node: Clones672311 -Node: Cut Program673535 -Node: Egrep Program683265 -Ref: Egrep Program-Footnote-1690769 -Node: Id Program690879 -Node: Split Program694523 -Ref: Split Program-Footnote-1697969 -Node: Tee Program698097 -Node: Uniq Program700884 -Node: Wc Program708305 -Ref: Wc Program-Footnote-1712553 -Node: Miscellaneous Programs712645 -Node: Dupword Program713858 -Node: Alarm Program715889 -Node: Translate Program720693 -Ref: Translate Program-Footnote-1725257 -Node: Labels Program725527 -Ref: Labels Program-Footnote-1728876 -Node: Word Sorting728960 -Node: History Sorting733030 -Node: Extract Program734866 -Node: Simple Sed742398 -Node: Igawk Program745460 -Ref: Igawk Program-Footnote-1759786 -Ref: Igawk Program-Footnote-2759987 -Ref: Igawk Program-Footnote-3760109 -Node: Anagram Program760224 -Node: Signature Program763286 -Node: Programs Summary764533 -Node: Programs Exercises765726 -Ref: Programs Exercises-Footnote-1769857 -Node: Advanced Features769948 -Node: Nondecimal Data771896 -Node: Array Sorting773486 -Node: Controlling Array Traversal774183 -Ref: Controlling Array Traversal-Footnote-1782514 -Node: Array Sorting Functions782632 -Ref: Array Sorting Functions-Footnote-1786524 -Node: Two-way I/O786718 -Ref: Two-way I/O-Footnote-1791662 -Ref: Two-way I/O-Footnote-2791848 -Node: TCP/IP Networking791930 -Node: Profiling794802 -Node: Advanced Features Summary802346 -Node: Internationalization804279 -Node: I18N and L10N805759 -Node: Explaining gettext806445 -Ref: Explaining gettext-Footnote-1811474 -Ref: Explaining gettext-Footnote-2811658 -Node: Programmer i18n811823 -Ref: Programmer i18n-Footnote-1816689 -Node: Translator i18n816738 -Node: String Extraction817532 -Ref: String Extraction-Footnote-1818663 -Node: Printf Ordering818749 -Ref: Printf Ordering-Footnote-1821535 -Node: I18N Portability821599 -Ref: I18N Portability-Footnote-1824048 -Node: I18N Example824111 -Ref: I18N Example-Footnote-1826911 -Node: Gawk I18N826983 -Node: I18N Summary827621 -Node: Debugger828960 -Node: Debugging829982 -Node: Debugging Concepts830423 -Node: Debugging Terms832280 -Node: Awk Debugging834855 -Node: Sample Debugging Session835747 -Node: Debugger Invocation836267 -Node: Finding The Bug837651 -Node: List of Debugger Commands844126 -Node: Breakpoint Control845458 -Node: Debugger Execution Control849150 -Node: Viewing And Changing Data852514 -Node: Execution Stack855879 -Node: Debugger Info857517 -Node: Miscellaneous Debugger Commands861534 -Node: Readline Support866726 -Node: Limitations867618 -Node: Debugging Summary869715 -Node: Arbitrary Precision Arithmetic870883 -Node: Computer Arithmetic872299 -Ref: table-numeric-ranges875900 -Ref: Computer Arithmetic-Footnote-1876759 -Node: Math Definitions876816 -Ref: table-ieee-formats880103 -Ref: Math Definitions-Footnote-1880707 -Node: MPFR features880812 -Node: FP Math Caution882483 -Ref: FP Math Caution-Footnote-1883533 -Node: Inexactness of computations883902 -Node: Inexact representation884850 -Node: Comparing FP Values886205 -Node: Errors accumulate887278 -Node: Getting Accuracy888711 -Node: Try To Round891370 -Node: Setting precision892269 -Ref: table-predefined-precision-strings892953 -Node: Setting the rounding mode894747 -Ref: table-gawk-rounding-modes895111 -Ref: Setting the rounding mode-Footnote-1898565 -Node: Arbitrary Precision Integers898744 -Ref: Arbitrary Precision Integers-Footnote-1901735 -Node: POSIX Floating Point Problems901884 -Ref: POSIX Floating Point Problems-Footnote-1905760 -Node: Floating point summary905798 -Node: Dynamic Extensions907990 -Node: Extension Intro909542 -Node: Plugin License910808 -Node: Extension Mechanism Outline911605 -Ref: figure-load-extension912033 -Ref: figure-register-new-function913513 -Ref: figure-call-new-function914517 -Node: Extension API Description916503 -Node: Extension API Functions Introduction917953 -Node: General Data Types922789 -Ref: General Data Types-Footnote-1928476 -Node: Memory Allocation Functions928775 -Ref: Memory Allocation Functions-Footnote-1931605 -Node: Constructor Functions931701 -Node: Registration Functions933435 -Node: Extension Functions934120 -Node: Exit Callback Functions936416 -Node: Extension Version String937664 -Node: Input Parsers938314 -Node: Output Wrappers948129 -Node: Two-way processors952645 -Node: Printing Messages954849 -Ref: Printing Messages-Footnote-1955926 -Node: Updating `ERRNO'956078 -Node: Requesting Values956818 -Ref: table-value-types-returned957546 -Node: Accessing Parameters958504 -Node: Symbol Table Access959735 -Node: Symbol table by name960249 -Node: Symbol table by cookie962229 -Ref: Symbol table by cookie-Footnote-1966368 -Node: Cached values966431 -Ref: Cached values-Footnote-1969935 -Node: Array Manipulation970026 -Ref: Array Manipulation-Footnote-1971124 -Node: Array Data Types971163 -Ref: Array Data Types-Footnote-1973820 -Node: Array Functions973912 -Node: Flattening Arrays977766 -Node: Creating Arrays984653 -Node: Extension API Variables989420 -Node: Extension Versioning990056 -Node: Extension API Informational Variables991957 -Node: Extension API Boilerplate993045 -Node: Finding Extensions996861 -Node: Extension Example997421 -Node: Internal File Description998193 -Node: Internal File Ops1002260 -Ref: Internal File Ops-Footnote-11013918 -Node: Using Internal File Ops1014058 -Ref: Using Internal File Ops-Footnote-11016441 -Node: Extension Samples1016714 -Node: Extension Sample File Functions1018238 -Node: Extension Sample Fnmatch1025840 -Node: Extension Sample Fork1027322 -Node: Extension Sample Inplace1028535 -Node: Extension Sample Ord1030210 -Node: Extension Sample Readdir1031046 -Ref: table-readdir-file-types1031902 -Node: Extension Sample Revout1032713 -Node: Extension Sample Rev2way1033304 -Node: Extension Sample Read write array1034045 -Node: Extension Sample Readfile1035984 -Node: Extension Sample Time1037079 -Node: Extension Sample API Tests1038428 -Node: gawkextlib1038919 -Node: Extension summary1041569 -Node: Extension Exercises1045251 -Node: Language History1045973 -Node: V7/SVR3.11047630 -Node: SVR41049811 -Node: POSIX1051256 -Node: BTL1052645 -Node: POSIX/GNU1053379 -Node: Feature History1058948 -Node: Common Extensions1072039 -Node: Ranges and Locales1073363 -Ref: Ranges and Locales-Footnote-11078002 -Ref: Ranges and Locales-Footnote-21078029 -Ref: Ranges and Locales-Footnote-31078263 -Node: Contributors1078484 -Node: History summary1084024 -Node: Installation1085393 -Node: Gawk Distribution1086349 -Node: Getting1086833 -Node: Extracting1087657 -Node: Distribution contents1089299 -Node: Unix Installation1095016 -Node: Quick Installation1095633 -Node: Additional Configuration Options1098064 -Node: Configuration Philosophy1099804 -Node: Non-Unix Installation1102155 -Node: PC Installation1102613 -Node: PC Binary Installation1103939 -Node: PC Compiling1105787 -Ref: PC Compiling-Footnote-11108808 -Node: PC Testing1108913 -Node: PC Using1110089 -Node: Cygwin1114204 -Node: MSYS1115027 -Node: VMS Installation1115525 -Node: VMS Compilation1116317 -Ref: VMS Compilation-Footnote-11117539 -Node: VMS Dynamic Extensions1117597 -Node: VMS Installation Details1119281 -Node: VMS Running1121533 -Node: VMS GNV1124374 -Node: VMS Old Gawk1125108 -Node: Bugs1125578 -Node: Other Versions1129482 -Node: Installation summary1135695 -Node: Notes1136751 -Node: Compatibility Mode1137616 -Node: Additions1138398 -Node: Accessing The Source1139323 -Node: Adding Code1140759 -Node: New Ports1146931 -Node: Derived Files1151413 -Ref: Derived Files-Footnote-11156888 -Ref: Derived Files-Footnote-21156922 -Ref: Derived Files-Footnote-31157518 -Node: Future Extensions1157632 -Node: Implementation Limitations1158238 -Node: Extension Design1159486 -Node: Old Extension Problems1160640 -Ref: Old Extension Problems-Footnote-11162157 -Node: Extension New Mechanism Goals1162214 -Ref: Extension New Mechanism Goals-Footnote-11165574 -Node: Extension Other Design Decisions1165763 -Node: Extension Future Growth1167871 -Node: Old Extension Mechanism1168707 -Node: Notes summary1170469 -Node: Basic Concepts1171655 -Node: Basic High Level1172336 -Ref: figure-general-flow1172608 -Ref: figure-process-flow1173207 -Ref: Basic High Level-Footnote-11176436 -Node: Basic Data Typing1176621 -Node: Glossary1179949 -Node: Copying1205107 -Node: GNU Free Documentation License1242663 -Node: Index1267799 +Ref: Options-Footnote-1129409 +Node: Other Arguments129434 +Node: Naming Standard Input132395 +Node: Environment Variables133488 +Node: AWKPATH Variable134046 +Ref: AWKPATH Variable-Footnote-1136898 +Ref: AWKPATH Variable-Footnote-2136943 +Node: AWKLIBPATH Variable137203 +Node: Other Environment Variables137962 +Node: Exit Status141453 +Node: Include Files142128 +Node: Loading Shared Libraries145706 +Node: Obsolete147133 +Node: Undocumented147830 +Node: Invoking Summary148097 +Node: Regexp149763 +Node: Regexp Usage151222 +Node: Escape Sequences153255 +Node: Regexp Operators159355 +Ref: Regexp Operators-Footnote-1166789 +Ref: Regexp Operators-Footnote-2166936 +Node: Bracket Expressions167034 +Ref: table-char-classes169051 +Node: Leftmost Longest171991 +Node: Computed Regexps173293 +Node: GNU Regexp Operators176690 +Node: Case-sensitivity180392 +Ref: Case-sensitivity-Footnote-1183282 +Ref: Case-sensitivity-Footnote-2183517 +Node: Regexp Summary183625 +Node: Reading Files185094 +Node: Records187188 +Node: awk split records187920 +Node: gawk split records192834 +Ref: gawk split records-Footnote-1197373 +Node: Fields197410 +Ref: Fields-Footnote-1200208 +Node: Nonconstant Fields200294 +Ref: Nonconstant Fields-Footnote-1202530 +Node: Changing Fields202732 +Node: Field Separators208664 +Node: Default Field Splitting211368 +Node: Regexp Field Splitting212485 +Node: Single Character Fields215835 +Node: Command Line Field Separator216894 +Node: Full Line Fields220106 +Ref: Full Line Fields-Footnote-1220614 +Node: Field Splitting Summary220660 +Ref: Field Splitting Summary-Footnote-1223791 +Node: Constant Size223892 +Node: Splitting By Content228498 +Ref: Splitting By Content-Footnote-1232571 +Node: Multiple Line232611 +Ref: Multiple Line-Footnote-1238500 +Node: Getline238679 +Node: Plain Getline240890 +Node: Getline/Variable243530 +Node: Getline/File244677 +Node: Getline/Variable/File246061 +Ref: Getline/Variable/File-Footnote-1247662 +Node: Getline/Pipe247749 +Node: Getline/Variable/Pipe250432 +Node: Getline/Coprocess251563 +Node: Getline/Variable/Coprocess252815 +Node: Getline Notes253554 +Node: Getline Summary256346 +Ref: table-getline-variants256758 +Node: Read Timeout257587 +Ref: Read Timeout-Footnote-1261401 +Node: Command-line directories261459 +Node: Input Summary262363 +Node: Input Exercises265615 +Node: Printing266343 +Node: Print268120 +Node: Print Examples269577 +Node: Output Separators272356 +Node: OFMT274374 +Node: Printf275728 +Node: Basic Printf276513 +Node: Control Letters278084 +Node: Format Modifiers282068 +Node: Printf Examples288075 +Node: Redirection290557 +Node: Special FD297396 +Ref: Special FD-Footnote-1300553 +Node: Special Files300627 +Node: Other Inherited Files301243 +Node: Special Network302243 +Node: Special Caveats303104 +Node: Close Files And Pipes304055 +Ref: Close Files And Pipes-Footnote-1311234 +Ref: Close Files And Pipes-Footnote-2311382 +Node: Output Summary311532 +Node: Output Exercises312528 +Node: Expressions313208 +Node: Values314393 +Node: Constants315069 +Node: Scalar Constants315749 +Ref: Scalar Constants-Footnote-1316608 +Node: Nondecimal-numbers316858 +Node: Regexp Constants319858 +Node: Using Constant Regexps320383 +Node: Variables323521 +Node: Using Variables324176 +Node: Assignment Options326086 +Node: Conversion327961 +Node: Strings And Numbers328485 +Ref: Strings And Numbers-Footnote-1331549 +Node: Locale influences conversions331658 +Ref: table-locale-affects334403 +Node: All Operators334991 +Node: Arithmetic Ops335621 +Node: Concatenation338126 +Ref: Concatenation-Footnote-1340945 +Node: Assignment Ops341051 +Ref: table-assign-ops346034 +Node: Increment Ops347312 +Node: Truth Values and Conditions350750 +Node: Truth Values351833 +Node: Typing and Comparison352882 +Node: Variable Typing353675 +Node: Comparison Operators357327 +Ref: table-relational-ops357737 +Node: POSIX String Comparison361252 +Ref: POSIX String Comparison-Footnote-1362324 +Node: Boolean Ops362462 +Ref: Boolean Ops-Footnote-1366941 +Node: Conditional Exp367032 +Node: Function Calls368759 +Node: Precedence372639 +Node: Locales376307 +Node: Expressions Summary377938 +Node: Patterns and Actions380512 +Node: Pattern Overview381632 +Node: Regexp Patterns383311 +Node: Expression Patterns383854 +Node: Ranges387634 +Node: BEGIN/END390740 +Node: Using BEGIN/END391502 +Ref: Using BEGIN/END-Footnote-1394239 +Node: I/O And BEGIN/END394345 +Node: BEGINFILE/ENDFILE396659 +Node: Empty399560 +Node: Using Shell Variables399877 +Node: Action Overview402153 +Node: Statements404480 +Node: If Statement406328 +Node: While Statement407826 +Node: Do Statement409854 +Node: For Statement410996 +Node: Switch Statement414151 +Node: Break Statement416539 +Node: Continue Statement418580 +Node: Next Statement420405 +Node: Nextfile Statement422785 +Node: Exit Statement425415 +Node: Built-in Variables427818 +Node: User-modified428951 +Ref: User-modified-Footnote-1436631 +Node: Auto-set436693 +Ref: Auto-set-Footnote-1449887 +Ref: Auto-set-Footnote-2450092 +Node: ARGC and ARGV450148 +Node: Pattern Action Summary454352 +Node: Arrays456779 +Node: Array Basics458108 +Node: Array Intro458952 +Ref: figure-array-elements460916 +Ref: Array Intro-Footnote-1463440 +Node: Reference to Elements463568 +Node: Assigning Elements466018 +Node: Array Example466509 +Node: Scanning an Array468267 +Node: Controlling Scanning471283 +Ref: Controlling Scanning-Footnote-1476472 +Node: Numeric Array Subscripts476788 +Node: Uninitialized Subscripts478973 +Node: Delete480590 +Ref: Delete-Footnote-1483334 +Node: Multidimensional483391 +Node: Multiscanning486486 +Node: Arrays of Arrays488075 +Node: Arrays Summary492836 +Node: Functions494941 +Node: Built-in495814 +Node: Calling Built-in496892 +Node: Numeric Functions498880 +Ref: Numeric Functions-Footnote-1503704 +Ref: Numeric Functions-Footnote-2504061 +Ref: Numeric Functions-Footnote-3504109 +Node: String Functions504378 +Ref: String Functions-Footnote-1527850 +Ref: String Functions-Footnote-2527979 +Ref: String Functions-Footnote-3528227 +Node: Gory Details528314 +Ref: table-sub-escapes530095 +Ref: table-sub-proposed531615 +Ref: table-posix-sub532979 +Ref: table-gensub-escapes534519 +Ref: Gory Details-Footnote-1535351 +Node: I/O Functions535502 +Ref: I/O Functions-Footnote-1542603 +Node: Time Functions542750 +Ref: Time Functions-Footnote-1553219 +Ref: Time Functions-Footnote-2553287 +Ref: Time Functions-Footnote-3553445 +Ref: Time Functions-Footnote-4553556 +Ref: Time Functions-Footnote-5553668 +Ref: Time Functions-Footnote-6553895 +Node: Bitwise Functions554161 +Ref: table-bitwise-ops554723 +Ref: Bitwise Functions-Footnote-1559031 +Node: Type Functions559200 +Node: I18N Functions560349 +Node: User-defined561994 +Node: Definition Syntax562798 +Ref: Definition Syntax-Footnote-1568204 +Node: Function Example568273 +Ref: Function Example-Footnote-1571190 +Node: Function Caveats571212 +Node: Calling A Function571730 +Node: Variable Scope572685 +Node: Pass By Value/Reference575673 +Node: Return Statement579183 +Node: Dynamic Typing582167 +Node: Indirect Calls583096 +Ref: Indirect Calls-Footnote-1594400 +Node: Functions Summary594528 +Node: Library Functions597227 +Ref: Library Functions-Footnote-1600845 +Ref: Library Functions-Footnote-2600988 +Node: Library Names601159 +Ref: Library Names-Footnote-1604619 +Ref: Library Names-Footnote-2604839 +Node: General Functions604925 +Node: Strtonum Function606028 +Node: Assert Function609048 +Node: Round Function612372 +Node: Cliff Random Function613913 +Node: Ordinal Functions614929 +Ref: Ordinal Functions-Footnote-1617994 +Ref: Ordinal Functions-Footnote-2618246 +Node: Join Function618457 +Ref: Join Function-Footnote-1620228 +Node: Getlocaltime Function620428 +Node: Readfile Function624169 +Node: Shell Quoting626139 +Node: Data File Management627540 +Node: Filetrans Function628172 +Node: Rewind Function632231 +Node: File Checking633616 +Ref: File Checking-Footnote-1634944 +Node: Empty Files635145 +Node: Ignoring Assigns637124 +Node: Getopt Function638675 +Ref: Getopt Function-Footnote-1650135 +Node: Passwd Functions650338 +Ref: Passwd Functions-Footnote-1659189 +Node: Group Functions659277 +Ref: Group Functions-Footnote-1667180 +Node: Walking Arrays667393 +Node: Library Functions Summary668996 +Node: Library Exercises670397 +Node: Sample Programs671677 +Node: Running Examples672447 +Node: Clones673175 +Node: Cut Program674399 +Node: Egrep Program684129 +Ref: Egrep Program-Footnote-1691633 +Node: Id Program691743 +Node: Split Program695387 +Ref: Split Program-Footnote-1698833 +Node: Tee Program698961 +Node: Uniq Program701748 +Node: Wc Program709169 +Ref: Wc Program-Footnote-1713417 +Node: Miscellaneous Programs713509 +Node: Dupword Program714722 +Node: Alarm Program716753 +Node: Translate Program721557 +Ref: Translate Program-Footnote-1726121 +Node: Labels Program726391 +Ref: Labels Program-Footnote-1729740 +Node: Word Sorting729824 +Node: History Sorting733894 +Node: Extract Program735730 +Node: Simple Sed743262 +Node: Igawk Program746324 +Ref: Igawk Program-Footnote-1760650 +Ref: Igawk Program-Footnote-2760851 +Ref: Igawk Program-Footnote-3760973 +Node: Anagram Program761088 +Node: Signature Program764150 +Node: Programs Summary765397 +Node: Programs Exercises766590 +Ref: Programs Exercises-Footnote-1770721 +Node: Advanced Features770812 +Node: Nondecimal Data772760 +Node: Array Sorting774350 +Node: Controlling Array Traversal775047 +Ref: Controlling Array Traversal-Footnote-1783378 +Node: Array Sorting Functions783496 +Ref: Array Sorting Functions-Footnote-1787388 +Node: Two-way I/O787582 +Ref: Two-way I/O-Footnote-1792526 +Ref: Two-way I/O-Footnote-2792712 +Node: TCP/IP Networking792794 +Node: Profiling795666 +Node: Advanced Features Summary803219 +Node: Internationalization805152 +Node: I18N and L10N806632 +Node: Explaining gettext807318 +Ref: Explaining gettext-Footnote-1812347 +Ref: Explaining gettext-Footnote-2812531 +Node: Programmer i18n812696 +Ref: Programmer i18n-Footnote-1817562 +Node: Translator i18n817611 +Node: String Extraction818405 +Ref: String Extraction-Footnote-1819536 +Node: Printf Ordering819622 +Ref: Printf Ordering-Footnote-1822408 +Node: I18N Portability822472 +Ref: I18N Portability-Footnote-1824921 +Node: I18N Example824984 +Ref: I18N Example-Footnote-1827784 +Node: Gawk I18N827856 +Node: I18N Summary828494 +Node: Debugger829833 +Node: Debugging830855 +Node: Debugging Concepts831296 +Node: Debugging Terms833153 +Node: Awk Debugging835728 +Node: Sample Debugging Session836620 +Node: Debugger Invocation837140 +Node: Finding The Bug838524 +Node: List of Debugger Commands844999 +Node: Breakpoint Control846331 +Node: Debugger Execution Control850023 +Node: Viewing And Changing Data853387 +Node: Execution Stack856752 +Node: Debugger Info858390 +Node: Miscellaneous Debugger Commands862407 +Node: Readline Support867599 +Node: Limitations868491 +Node: Debugging Summary870588 +Node: Arbitrary Precision Arithmetic871756 +Node: Computer Arithmetic873172 +Ref: table-numeric-ranges876773 +Ref: Computer Arithmetic-Footnote-1877632 +Node: Math Definitions877689 +Ref: table-ieee-formats880976 +Ref: Math Definitions-Footnote-1881580 +Node: MPFR features881685 +Node: FP Math Caution883356 +Ref: FP Math Caution-Footnote-1884406 +Node: Inexactness of computations884775 +Node: Inexact representation885723 +Node: Comparing FP Values887078 +Node: Errors accumulate888151 +Node: Getting Accuracy889584 +Node: Try To Round892243 +Node: Setting precision893142 +Ref: table-predefined-precision-strings893826 +Node: Setting the rounding mode895620 +Ref: table-gawk-rounding-modes895984 +Ref: Setting the rounding mode-Footnote-1899438 +Node: Arbitrary Precision Integers899617 +Ref: Arbitrary Precision Integers-Footnote-1904521 +Node: POSIX Floating Point Problems904670 +Ref: POSIX Floating Point Problems-Footnote-1908546 +Node: Floating point summary908584 +Node: Dynamic Extensions910776 +Node: Extension Intro912328 +Node: Plugin License913594 +Node: Extension Mechanism Outline914391 +Ref: figure-load-extension914819 +Ref: figure-register-new-function916299 +Ref: figure-call-new-function917303 +Node: Extension API Description919289 +Node: Extension API Functions Introduction920739 +Node: General Data Types925575 +Ref: General Data Types-Footnote-1931262 +Node: Memory Allocation Functions931561 +Ref: Memory Allocation Functions-Footnote-1934391 +Node: Constructor Functions934487 +Node: Registration Functions936221 +Node: Extension Functions936906 +Node: Exit Callback Functions939202 +Node: Extension Version String940450 +Node: Input Parsers941100 +Node: Output Wrappers950915 +Node: Two-way processors955431 +Node: Printing Messages957635 +Ref: Printing Messages-Footnote-1958712 +Node: Updating `ERRNO'958864 +Node: Requesting Values959604 +Ref: table-value-types-returned960332 +Node: Accessing Parameters961290 +Node: Symbol Table Access962521 +Node: Symbol table by name963035 +Node: Symbol table by cookie965015 +Ref: Symbol table by cookie-Footnote-1969154 +Node: Cached values969217 +Ref: Cached values-Footnote-1972721 +Node: Array Manipulation972812 +Ref: Array Manipulation-Footnote-1973910 +Node: Array Data Types973949 +Ref: Array Data Types-Footnote-1976606 +Node: Array Functions976698 +Node: Flattening Arrays980552 +Node: Creating Arrays987439 +Node: Extension API Variables992206 +Node: Extension Versioning992842 +Node: Extension API Informational Variables994743 +Node: Extension API Boilerplate995831 +Node: Finding Extensions999647 +Node: Extension Example1000207 +Node: Internal File Description1000979 +Node: Internal File Ops1005046 +Ref: Internal File Ops-Footnote-11016704 +Node: Using Internal File Ops1016844 +Ref: Using Internal File Ops-Footnote-11019227 +Node: Extension Samples1019500 +Node: Extension Sample File Functions1021024 +Node: Extension Sample Fnmatch1028626 +Node: Extension Sample Fork1030108 +Node: Extension Sample Inplace1031321 +Node: Extension Sample Ord1032996 +Node: Extension Sample Readdir1033832 +Ref: table-readdir-file-types1034688 +Node: Extension Sample Revout1035499 +Node: Extension Sample Rev2way1036090 +Node: Extension Sample Read write array1036831 +Node: Extension Sample Readfile1038770 +Node: Extension Sample Time1039865 +Node: Extension Sample API Tests1041214 +Node: gawkextlib1041705 +Node: Extension summary1044355 +Node: Extension Exercises1048037 +Node: Language History1048759 +Node: V7/SVR3.11050416 +Node: SVR41052597 +Node: POSIX1054042 +Node: BTL1055431 +Node: POSIX/GNU1056165 +Node: Feature History1061794 +Node: Common Extensions1074885 +Node: Ranges and Locales1076209 +Ref: Ranges and Locales-Footnote-11080848 +Ref: Ranges and Locales-Footnote-21080875 +Ref: Ranges and Locales-Footnote-31081109 +Node: Contributors1081330 +Node: History summary1086870 +Node: Installation1088239 +Node: Gawk Distribution1089195 +Node: Getting1089679 +Node: Extracting1090503 +Node: Distribution contents1092145 +Node: Unix Installation1097915 +Node: Quick Installation1098532 +Node: Additional Configuration Options1100963 +Node: Configuration Philosophy1102703 +Node: Non-Unix Installation1105054 +Node: PC Installation1105512 +Node: PC Binary Installation1106838 +Node: PC Compiling1108686 +Ref: PC Compiling-Footnote-11111707 +Node: PC Testing1111812 +Node: PC Using1112988 +Node: Cygwin1117103 +Node: MSYS1117926 +Node: VMS Installation1118424 +Node: VMS Compilation1119216 +Ref: VMS Compilation-Footnote-11120438 +Node: VMS Dynamic Extensions1120496 +Node: VMS Installation Details1122180 +Node: VMS Running1124432 +Node: VMS GNV1127273 +Node: VMS Old Gawk1128007 +Node: Bugs1128477 +Node: Other Versions1132381 +Node: Installation summary1138594 +Node: Notes1139650 +Node: Compatibility Mode1140515 +Node: Additions1141297 +Node: Accessing The Source1142222 +Node: Adding Code1143658 +Node: New Ports1149830 +Node: Derived Files1154312 +Ref: Derived Files-Footnote-11159787 +Ref: Derived Files-Footnote-21159821 +Ref: Derived Files-Footnote-31160417 +Node: Future Extensions1160531 +Node: Implementation Limitations1161137 +Node: Extension Design1162385 +Node: Old Extension Problems1163539 +Ref: Old Extension Problems-Footnote-11165056 +Node: Extension New Mechanism Goals1165113 +Ref: Extension New Mechanism Goals-Footnote-11168473 +Node: Extension Other Design Decisions1168662 +Node: Extension Future Growth1170770 +Node: Old Extension Mechanism1171606 +Node: Notes summary1173368 +Node: Basic Concepts1174554 +Node: Basic High Level1175235 +Ref: figure-general-flow1175507 +Ref: figure-process-flow1176106 +Ref: Basic High Level-Footnote-11179335 +Node: Basic Data Typing1179520 +Node: Glossary1182848 +Node: Copying1208006 +Node: GNU Free Documentation License1245562 +Node: Index1270698 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index cbd6206c..be14ec3d 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3944,10 +3944,8 @@ No space is allowed between the @option{-o} and @var{file}, if @var{file} is supplied. @quotation NOTE -Due to the way @command{gawk} has evolved, with this option -your program is still executed. This will change in the -next major release such that @command{gawk} will only -pretty-print the program and not run it. +In the past, this option would also execute your program. +This is no longer the case. @end quotation @item @option{-O} @@ -4441,14 +4439,6 @@ two regexp matchers that @command{gawk} uses internally. (There aren't supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -@item GAWK_NO_PP_RUN -If this variable exists, then when invoked with the @option{--pretty-print} -option, @command{gawk} skips running the program. - -@quotation CAUTION -This variable will not survive into the next major release. -@end quotation - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -5029,17 +5019,18 @@ between @samp{0} and @samp{7}. For example, the code for the ASCII ESC @item \x@var{hh}@dots{} The hexadecimal value @var{hh}, where @var{hh} stands for a sequence of hexadecimal digits (@samp{0}--@samp{9}, and either @samp{A}--@samp{F} -or @samp{a}--@samp{f}). Like the same construct -in ISO C, the escape sequence continues until the first nonhexadecimal -digit is seen. @value{COMMONEXT} -However, using more than two hexadecimal digits produces -undefined results. (The @samp{\x} escape sequence is not allowed in -POSIX @command{awk}.) +or @samp{a}--@samp{f}). A maximum of two digts are allowed after +the @samp{\x}. Any further hexadecimal digits are treated as simple +letters or numbers. @value{COMMONEXT} @quotation CAUTION -The next major relase of @command{gawk} will change, such -that a maximum of two hexadecimal digits following the -@samp{\x} will be used. +In ISO C, the escape sequence continues until the first nonhexadecimal +digit is seen. +@c FIXME: Add exact version here. +For many years, @command{gawk} would continue incorporating +hexadecimal digits into the value until a non-hexadecimal digit +or the end of the string was encountered. +However, using more than two hexadecimal digits produces @end quotation @cindex @code{\} (backslash), @code{\/} escape sequence @@ -14729,10 +14720,18 @@ opens the next file. An associative array containing the values of the environment. The array indices are the environment variable names; the elements are the values of the particular environment variables. For example, -@code{ENVIRON["HOME"]} might be @code{"/home/arnold"}. Changing this array -does not affect the environment passed on to any programs that -@command{awk} may spawn via redirection or the @code{system()} function. -(In a future version of @command{gawk}, it may do so.) +@code{ENVIRON["HOME"]} might be @code{/home/arnold}. + +For POSIX @command{awk}, changing this array does not affect the +environment passed on to any programs that @command{awk} may spawn via +redirection or the @code{system()} function. + +However, beginning with version 4.2, if not in POSIX +compatibility mode, @command{gawk} does update its own environment when +@code{ENVIRON} is changed, thus changing the environment seen by programs +that it creates. You should therefore be especially careful if you +modify @code{ENVIRON["PATH"]"}, which is the search path for finding +executable programs. Some operating systems may not have environment variables. On such systems, the @code{ENVIRON} array is empty (except for @@ -16839,6 +16838,23 @@ You can use @samp{pi = atan2(0, -1)} to retrieve the value of @cindex cosine Return the cosine of @var{x}, with @var{x} in radians. +@item @code{div(@var{numerator}, @var{denominator}, @var{result})} +@cindexawkfunc{div} +@cindex div +Perform integer division, similar to the standard C function of the +same name. First, truncate @code{numerator} and @code{denominator} +towards zero, creating integer values. Clear the @code{result} +array, and then set @code{result["quotient"]} to the result of +@samp{numerator / denominator}, truncated towards zero to an integer, +and set @code{result["remainder"]} to the result of @samp{numerator % +denominator}, truncated towards zero to an integer. This function is +primarily intended for use with arbitrary length integers; it avoids +creating MPFR arbitrary precision floating-point values (@pxref{Arbitrary +Precision Integers}). + +This function is a @code{gawk} extension. It is not available in +compatibility mode (@pxref{Options}). + @item @code{exp(@var{x})} @cindexawkfunc{exp} @cindex exponent @@ -27887,8 +27903,8 @@ When called this way, @command{gawk} ``pretty prints'' the program into @file{awkprof.out}, without any execution counts. @quotation NOTE -The @option{--pretty-print} option still runs your program. -This will change in the next major release. +Once upon a time, the @option{--pretty-print} option would also run +your program. This is is no longer the case. @end quotation @c ENDOFRANGE awkp @c ENDOFRANGE proawk @@ -30953,6 +30969,119 @@ to just use the following: gawk -M 'BEGIN @{ n = 13; print n % 2 @}' @end example +When dividing two arbitrary precision integers with either +@samp{/} or @samp{%}, the result is typically an arbitrary +precision floating point value (unless the denominator evenly +divides into the numerator). In order to do integer division +or remainder with arbitrary precision integers, use the built-in +@code{div()} function (@pxref{Numeric Functions}). + +You can simulate the @code{div()} function in standard @command{awk} +using this user-defined function: + +@example +@c file eg/lib/div.awk +# div --- do integer division + +@c endfile +@ignore +@c file eg/lib/div.awk +# +# Arnold Robbins, arnold@@skeeve.com, Public Domain +# July, 2014 + +@c endfile + +@end ignore +@c file eg/lib/div.awk +function div(numerator, denominator, result) +@{ + split("", result) + + numerator = int(numerator) + denominator = int(denominator) + result["quotient"] = int(numerator / denominator) + result["remainder"] = int(numerator % denominator) + + return 0.0 +@} +@c endfile +@end example + +The following example program, contributed by Katie Wasserman, +uses @code{div()} to +compute the digits of @value{PI} to as many places as you +choose to set: + +@example +@c file eg/prog/pi.awk +# pi.awk --- compute the digits of pi +@c endfile +@c endfile +@ignore +@c file eg/prog/pi.awk +# +# Katie Wasserman, katie@@wass.net +# August 2014 +@c endfile +@end ignore +@c file eg/prog/pi.awk + +BEGIN @{ + digits = 100000 + two = 2 * 10 ^ digits + pi = two + for (m = digits * 4; m > 0; --m) @{ + d = m * 2 + 1 + x = pi * m + div(x, d, result) + pi = result["quotient"] + pi = pi + two + @} + print pi +@} +@c endfile +@end example + +@ignore +Date: Wed, 20 Aug 2014 10:19:11 -0400 +To: arnold@skeeve.com +From: Katherine Wasserman <katie@wass.net> +Subject: Re: computation of digits of pi? + +Arnold, + +>The program that you sent to compute the digits of pi using div(). Is +>that some standard algorithm that every math student knows? If so, +>what's it called? + +It's not that well known but it's not that obscure either + +It's Euler's modification to Newton's method for calculating pi. + +Take a look at lines (23) - (25) here: http://mathworld.wolfram.com/PiFormulas.htm + +The algorithm I wrote simply expands the multiply by 2 and works from the innermost expression outwards. I used this to program HP calculators because it's quite easy to modify for tiny memory devices with smallish word sizes. + +http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899 + +-Katie +@end ignore + +When asked about the algorithm used, Katie replied: + +@quotation +It's not that well known but it's not that obscure either. +It's Euler's modification to Newton's method for calculating pi. +Take a look at lines (23) - (25) here: @uref{http://mathworld.wolfram.com/PiFormulas.htm}. + +The algorithm I wrote simply expands the multiply by 2 and works from +the innermost expression outwards. I used this to program HP calculators +because it's quite easy to modify for tiny memory devices with smallish +word sizes. See +@uref{http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899}. +@end quotation + @node POSIX Floating Point Problems @section Standards Versus Existing Practice @@ -35779,6 +35908,10 @@ for @command{gawk} @value{PVERSION} 4.1: Ultrix @end itemize +@item +@c FIXME: Verify the version here. +Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. + @end itemize @c XXX ADD MORE STUFF HERE @@ -37062,6 +37195,8 @@ The generated Info file for The @command{troff} source for a manual page describing the @command{igawk} program presented in @ref{Igawk Program}. +(Since @command{gawk} can do its own @code{@@include} processing, +neither @command{igawk} nor @file{igawk.1} are installed.) @item doc/Makefile.in The input file used during the configuration process to generate the @@ -37106,8 +37241,6 @@ source file for this @value{DOCUMENT}. It also contains a @file{Makefile.in} fil @file{Makefile.am} is used by GNU Automake to create @file{Makefile.in}. The library functions from @ref{Library Functions}, -and the @command{igawk} program from -@ref{Igawk Program}, are included as ready-to-use files in the @command{gawk} distribution. They are installed as part of the installation process. The rest of the programs in this @value{DOCUMENT} are available in appropriate @@ -38185,7 +38318,8 @@ The people maintaining the various @command{gawk} ports are: @end multitable If your bug is also reproducible under Unix, please send a copy of your -report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. +report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email +list as well. @c ENDOFRANGE dbugg @c ENDOFRANGE tblgawb diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 99cd14ea..c354d2c8 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -3855,10 +3855,8 @@ No space is allowed between the @option{-o} and @var{file}, if @var{file} is supplied. @quotation NOTE -Due to the way @command{gawk} has evolved, with this option -your program is still executed. This will change in the -next major release such that @command{gawk} will only -pretty-print the program and not run it. +In the past, this option would also execute your program. +This is no longer the case. @end quotation @item @option{-O} @@ -4352,14 +4350,6 @@ two regexp matchers that @command{gawk} uses internally. (There aren't supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -@item GAWK_NO_PP_RUN -If this variable exists, then when invoked with the @option{--pretty-print} -option, @command{gawk} skips running the program. - -@quotation CAUTION -This variable will not survive into the next major release. -@end quotation - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -4940,17 +4930,18 @@ between @samp{0} and @samp{7}. For example, the code for the ASCII ESC @item \x@var{hh}@dots{} The hexadecimal value @var{hh}, where @var{hh} stands for a sequence of hexadecimal digits (@samp{0}--@samp{9}, and either @samp{A}--@samp{F} -or @samp{a}--@samp{f}). Like the same construct -in ISO C, the escape sequence continues until the first nonhexadecimal -digit is seen. @value{COMMONEXT} -However, using more than two hexadecimal digits produces -undefined results. (The @samp{\x} escape sequence is not allowed in -POSIX @command{awk}.) +or @samp{a}--@samp{f}). A maximum of two digts are allowed after +the @samp{\x}. Any further hexadecimal digits are treated as simple +letters or numbers. @value{COMMONEXT} @quotation CAUTION -The next major relase of @command{gawk} will change, such -that a maximum of two hexadecimal digits following the -@samp{\x} will be used. +In ISO C, the escape sequence continues until the first nonhexadecimal +digit is seen. +@c FIXME: Add exact version here. +For many years, @command{gawk} would continue incorporating +hexadecimal digits into the value until a non-hexadecimal digit +or the end of the string was encountered. +However, using more than two hexadecimal digits produces @end quotation @cindex @code{\} (backslash), @code{\/} escape sequence @@ -14059,10 +14050,18 @@ opens the next file. An associative array containing the values of the environment. The array indices are the environment variable names; the elements are the values of the particular environment variables. For example, -@code{ENVIRON["HOME"]} might be @code{"/home/arnold"}. Changing this array -does not affect the environment passed on to any programs that -@command{awk} may spawn via redirection or the @code{system()} function. -(In a future version of @command{gawk}, it may do so.) +@code{ENVIRON["HOME"]} might be @code{/home/arnold}. + +For POSIX @command{awk}, changing this array does not affect the +environment passed on to any programs that @command{awk} may spawn via +redirection or the @code{system()} function. + +However, beginning with version 4.2, if not in POSIX +compatibility mode, @command{gawk} does update its own environment when +@code{ENVIRON} is changed, thus changing the environment seen by programs +that it creates. You should therefore be especially careful if you +modify @code{ENVIRON["PATH"]"}, which is the search path for finding +executable programs. Some operating systems may not have environment variables. On such systems, the @code{ENVIRON} array is empty (except for @@ -16123,6 +16122,23 @@ You can use @samp{pi = atan2(0, -1)} to retrieve the value of @cindex cosine Return the cosine of @var{x}, with @var{x} in radians. +@item @code{div(@var{numerator}, @var{denominator}, @var{result})} +@cindexawkfunc{div} +@cindex div +Perform integer division, similar to the standard C function of the +same name. First, truncate @code{numerator} and @code{denominator} +towards zero, creating integer values. Clear the @code{result} +array, and then set @code{result["quotient"]} to the result of +@samp{numerator / denominator}, truncated towards zero to an integer, +and set @code{result["remainder"]} to the result of @samp{numerator % +denominator}, truncated towards zero to an integer. This function is +primarily intended for use with arbitrary length integers; it avoids +creating MPFR arbitrary precision floating-point values (@pxref{Arbitrary +Precision Integers}). + +This function is a @code{gawk} extension. It is not available in +compatibility mode (@pxref{Options}). + @item @code{exp(@var{x})} @cindexawkfunc{exp} @cindex exponent @@ -26886,8 +26902,7 @@ The profiled version of your program may not look exactly like what you 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{gawk} can produce -a standard representation. The disadvantage is that all source-code -comments are lost. +a standard representation. Also, things such as: @example @@ -26981,9 +26996,26 @@ When called this way, @command{gawk} ``pretty prints'' the program into @file{awkprof.out}, without any execution counts. @quotation NOTE -The @option{--pretty-print} option still runs your program. -This will change in the next major release. +Once upon a time, the @option{--pretty-print} option would also run +your program. This is is no longer the case. @end quotation + +There is a significant difference between the output created when +profiling, and that created when pretty-printing. Pretty-printed output +preserves the original comments that were in the program, although their +placement may not correspond exactly to their original locations in the +source code. + +However, as a deliberate design decision, profiling output @emph{omits} +the original program's comments. This allows you to focus on the +execution count data and helps you avoid the temptation to use the +profiler for pretty-printing. + +Additionally, pretty-printed output does not have the leading indentation +that the profiling output does. This makes it easy to pretty-print your +code once development is completed, and then use the result as the final +version of your program. + @c ENDOFRANGE awkp @c ENDOFRANGE proawk @@ -30047,6 +30079,119 @@ to just use the following: gawk -M 'BEGIN @{ n = 13; print n % 2 @}' @end example +When dividing two arbitrary precision integers with either +@samp{/} or @samp{%}, the result is typically an arbitrary +precision floating point value (unless the denominator evenly +divides into the numerator). In order to do integer division +or remainder with arbitrary precision integers, use the built-in +@code{div()} function (@pxref{Numeric Functions}). + +You can simulate the @code{div()} function in standard @command{awk} +using this user-defined function: + +@example +@c file eg/lib/div.awk +# div --- do integer division + +@c endfile +@ignore +@c file eg/lib/div.awk +# +# Arnold Robbins, arnold@@skeeve.com, Public Domain +# July, 2014 + +@c endfile + +@end ignore +@c file eg/lib/div.awk +function div(numerator, denominator, result) +@{ + split("", result) + + numerator = int(numerator) + denominator = int(denominator) + result["quotient"] = int(numerator / denominator) + result["remainder"] = int(numerator % denominator) + + return 0.0 +@} +@c endfile +@end example + +The following example program, contributed by Katie Wasserman, +uses @code{div()} to +compute the digits of @value{PI} to as many places as you +choose to set: + +@example +@c file eg/prog/pi.awk +# pi.awk --- compute the digits of pi +@c endfile +@c endfile +@ignore +@c file eg/prog/pi.awk +# +# Katie Wasserman, katie@@wass.net +# August 2014 +@c endfile +@end ignore +@c file eg/prog/pi.awk + +BEGIN @{ + digits = 100000 + two = 2 * 10 ^ digits + pi = two + for (m = digits * 4; m > 0; --m) @{ + d = m * 2 + 1 + x = pi * m + div(x, d, result) + pi = result["quotient"] + pi = pi + two + @} + print pi +@} +@c endfile +@end example + +@ignore +Date: Wed, 20 Aug 2014 10:19:11 -0400 +To: arnold@skeeve.com +From: Katherine Wasserman <katie@wass.net> +Subject: Re: computation of digits of pi? + +Arnold, + +>The program that you sent to compute the digits of pi using div(). Is +>that some standard algorithm that every math student knows? If so, +>what's it called? + +It's not that well known but it's not that obscure either + +It's Euler's modification to Newton's method for calculating pi. + +Take a look at lines (23) - (25) here: http://mathworld.wolfram.com/PiFormulas.htm + +The algorithm I wrote simply expands the multiply by 2 and works from the innermost expression outwards. I used this to program HP calculators because it's quite easy to modify for tiny memory devices with smallish word sizes. + +http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899 + +-Katie +@end ignore + +When asked about the algorithm used, Katie replied: + +@quotation +It's not that well known but it's not that obscure either. +It's Euler's modification to Newton's method for calculating pi. +Take a look at lines (23) - (25) here: @uref{http://mathworld.wolfram.com/PiFormulas.htm}. + +The algorithm I wrote simply expands the multiply by 2 and works from +the innermost expression outwards. I used this to program HP calculators +because it's quite easy to modify for tiny memory devices with smallish +word sizes. See +@uref{http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899}. +@end quotation + @node POSIX Floating Point Problems @section Standards Versus Existing Practice @@ -34873,6 +35018,10 @@ for @command{gawk} @value{PVERSION} 4.1: Ultrix @end itemize +@item +@c FIXME: Verify the version here. +Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. + @end itemize @c XXX ADD MORE STUFF HERE @@ -36156,6 +36305,8 @@ The generated Info file for The @command{troff} source for a manual page describing the @command{igawk} program presented in @ref{Igawk Program}. +(Since @command{gawk} can do its own @code{@@include} processing, +neither @command{igawk} nor @file{igawk.1} are installed.) @item doc/Makefile.in The input file used during the configuration process to generate the @@ -36200,8 +36351,6 @@ source file for this @value{DOCUMENT}. It also contains a @file{Makefile.in} fil @file{Makefile.am} is used by GNU Automake to create @file{Makefile.in}. The library functions from @ref{Library Functions}, -and the @command{igawk} program from -@ref{Igawk Program}, are included as ready-to-use files in the @command{gawk} distribution. They are installed as part of the installation process. The rest of the programs in this @value{DOCUMENT} are available in appropriate @@ -37279,7 +37428,8 @@ The people maintaining the various @command{gawk} ports are: @end multitable If your bug is also reproducible under Unix, please send a copy of your -report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. +report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email +list as well. @c ENDOFRANGE dbugg @c ENDOFRANGE tblgawb |