diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 95 | ||||
-rw-r--r-- | doc/ChangeLog | 28 | ||||
-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 | 27 | ||||
-rw-r--r-- | doc/gawk.info | 1337 | ||||
-rw-r--r-- | doc/gawk.texi | 120 | ||||
-rw-r--r-- | doc/gawktexi.in | 120 |
9 files changed, 1028 insertions, 730 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 f161e953..ae380bbd 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -23,6 +23,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. @@ -37,6 +41,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 @@ -47,6 +63,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. @@ -343,7 +364,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> @@ -417,6 +438,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). @@ -13,7 +13,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 17 2014" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Jul 10 2014" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -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 @@ -2623,6 +2629,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 9e4f3ec7..631a1fa0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2569,10 +2569,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' @@ -2954,11 +2952,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. 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. @@ -3348,15 +3341,17 @@ 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 @@ -10185,10 +10180,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 @@ -11707,6 +11710,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 @@ -19616,8 +19634,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 @@ -22092,6 +22110,29 @@ 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, i) + { + split("", result) + + numerator = int(numerator) + denominator = int(denominator) + result["quotient"] = int(numerator / denominator) + result["remainder"] = int(numerator % denominator) + + return 0.0 + } + ---------- Footnotes ---------- (1) Weisstein, Eric W. `Sylvester's Sequence'. From MathWorld--A @@ -27021,7 +27062,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 @@ -27063,11 +27106,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 @@ -31000,20 +31042,20 @@ Index * --include option: Options. (line 159) * --lint option <1>: Options. (line 185) * --lint option: Command Line. (line 20) -* --lint-old option: Options. (line 295) +* --lint-old option: Options. (line 293) * --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 36) -* --optimize option: Options. (line 237) -* --posix option: Options. (line 254) -* --posix option, --traditional option and: Options. (line 273) +* --optimize option: Options. (line 235) +* --posix option: Options. (line 252) +* --posix option, --traditional option and: Options. (line 271) * --pretty-print option: Options. (line 224) * --profile option <1>: Profiling. (line 12) -* --profile option: Options. (line 242) -* --re-interval option: Options. (line 279) -* --sandbox option: Options. (line 286) +* --profile option: Options. (line 240) +* --re-interval option: Options. (line 277) +* --sandbox option: Options. (line 284) * --sandbox option, disabling system() function: I/O Functions. (line 97) * --sandbox option, input redirection with getline: Getline. (line 19) @@ -31021,9 +31063,9 @@ Index (line 6) * --source option: Options. (line 117) * --traditional option: Options. (line 81) -* --traditional option, --posix option and: Options. (line 273) +* --traditional option, --posix option and: Options. (line 271) * --use-lc-numeric option: Options. (line 219) -* --version option: Options. (line 300) +* --version option: Options. (line 298) * --with-whiny-user-strftime configuration option: Additional Configuration Options. (line 35) * -b option: Options. (line 68) @@ -31031,32 +31073,32 @@ Index * -c option: Options. (line 81) * -D option: Options. (line 108) * -d option: Options. (line 93) -* -e option: Options. (line 335) +* -e option: Options. (line 333) * -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 308) +* -F option, -Ft sets FS to TAB: Options. (line 306) * -F option, command-line: Command Line Field Separator. (line 6) -* -f option, multiple uses: Options. (line 313) +* -f option, multiple uses: Options. (line 311) * -g option: Options. (line 147) * -h option: Options. (line 154) * -i option: Options. (line 159) -* -L option: Options. (line 295) +* -L option: Options. (line 293) * -l option: Options. (line 173) * -M option: Options. (line 205) * -N option: Options. (line 219) * -n option: Options. (line 211) -* -O option: Options. (line 237) +* -O option: Options. (line 235) * -o option: Options. (line 224) -* -P option: Options. (line 254) -* -p option: Options. (line 242) -* -r option: Options. (line 279) -* -S option: Options. (line 286) +* -P option: Options. (line 252) +* -p option: Options. (line 240) +* -r option: Options. (line 277) +* -S option: Options. (line 284) * -v option: Assignment Options. (line 12) -* -V option: Options. (line 300) +* -V option: Options. (line 298) * -v option: Options. (line 32) * -W option: Options. (line 46) * . (period), regexp operator: Regexp Operators. (line 44) @@ -31115,10 +31157,10 @@ Index * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash) in shell commands: Read Terminal. (line 25) -* \ (backslash), \" escape sequence: Escape Sequences. (line 80) +* \ (backslash), \" escape sequence: Escape Sequences. (line 82) * \ (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. @@ -31158,7 +31200,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 116) + (line 118) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31327,7 +31369,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 242) +* awk profiling, enabling: Options. (line 240) * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) @@ -31387,10 +31429,10 @@ Index * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) * backslash (\) in shell commands: Read Terminal. (line 25) -* backslash (\), \" escape sequence: Escape Sequences. (line 80) +* backslash (\), \" escape sequence: Escape Sequences. (line 82) * 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. @@ -31430,7 +31472,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 116) + (line 118) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31535,7 +31577,7 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 120) +* Brian Kernighan's awk <13>: Escape Sequences. (line 122) * 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) @@ -31732,7 +31774,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 353) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 351) * 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) @@ -31763,13 +31805,13 @@ Index * dark corner, CONVFMT variable: Strings And Numbers. (line 40) * dark corner, escape sequences: Other Arguments. (line 31) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 138) + (line 140) * 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 301) +* dark corner, FNR/NR variables: Auto-set. (line 309) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) @@ -31916,7 +31958,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 270) +* decimal point character, locale specific: Options. (line 268) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott <1>: Bugs. (line 71) @@ -31955,12 +31997,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 16) * 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) @@ -31983,7 +32025,7 @@ Index (line 260) * differences in awk and gawk, print/printf statements: Format Modifiers. (line 13) -* differences in awk and gawk, PROCINFO array: Auto-set. (line 128) +* differences in awk and gawk, PROCINFO array: Auto-set. (line 136) * differences in awk and gawk, read timeouts: Read Timeout. (line 6) * differences in awk and gawk, record separators: awk split records. (line 124) @@ -31993,7 +32035,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 257) +* differences in awk and gawk, RT variable: Auto-set. (line 265) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -32001,7 +32043,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 261) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 269) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 152) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -32017,6 +32059,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) @@ -32041,8 +32084,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 133) -* effective user ID of gawk user: Auto-set. (line 137) +* effective group ID of gawk user: Auto-set. (line 141) +* effective user ID of gawk user: Auto-set. (line 145) * egrep utility <1>: Egrep Program. (line 6) * egrep utility: Bracket Expressions. (line 26) * egrep.awk program: Egrep Program. (line 54) @@ -32097,13 +32140,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 139) * ERRNO variable, with getline command: Getline. (line 19) * error handling: Special FD. (line 16) -* 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) @@ -32136,10 +32179,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 69) * Expat XML parser library: gawkextlib. (line 35) -* 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) @@ -32157,7 +32200,7 @@ Index (line 6) * extension API version: Extension Versioning. (line 6) -* extension API, version number: Auto-set. (line 224) +* extension API, version number: Auto-set. (line 232) * extension example: Extension Example. (line 6) * extension registration: Registration Functions. (line 6) @@ -32236,7 +32279,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 46) -* 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) @@ -32304,9 +32347,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 301) +* FNR variable, changing: Auto-set. (line 309) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -32343,7 +32386,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 266) +* FS variable, as TAB character: Options. (line 264) * FS variable, changing value of: Field Separators. (line 35) * FS variable, running awk programs and: Cut Program. (line 68) * FS variable, setting from command line: Command Line Field Separator. @@ -32356,7 +32399,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 definition example: Function Example. (line 6) @@ -32406,7 +32449,7 @@ Index * G-d: Acknowledgments. (line 92) * Garfinkle, Scott: Contributors. (line 34) * gawk program, dynamic profiling: Profiling. (line 179) -* gawk version: Auto-set. (line 199) +* gawk version: Auto-set. (line 207) * gawk, ARGIND variable in: Other Arguments. (line 12) * gawk, awk and <1>: This Manual. (line 14) * gawk, awk and: Preface. (line 21) @@ -32427,13 +32470,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 139) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 128) -* gawk, extensions, disabling: Options. (line 254) +* gawk, escape sequences: Escape Sequences. (line 130) +* gawk, extensions, disabling: Options. (line 252) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) * gawk, field separators and: User-modified. (line 71) @@ -32444,7 +32487,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. @@ -32475,7 +32518,7 @@ Index * gawk, OS/2 version of: PC Using. (line 16) * 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 128) +* gawk, PROCINFO array in: Auto-set. (line 136) * gawk, regexp constants and: Using Constant Regexps. (line 28) * gawk, regular expressions, case sensitivity: Case-sensitivity. @@ -32483,18 +32526,18 @@ Index * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) * gawk, regular expressions, precedence: Regexp Operators. (line 163) -* gawk, RT variable in <1>: Auto-set. (line 257) +* gawk, RT variable in <1>: Auto-set. (line 265) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 124) * 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 261) +* gawk, SYMTAB array in: Auto-set. (line 269) * gawk, TEXTDOMAIN variable in: User-modified. (line 152) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) -* gawk, versions of, information about, printing: Options. (line 300) +* gawk, versions of, information about, printing: Options. (line 298) * gawk, VMS version of: VMS Installation. (line 6) * gawk, word-boundary operator: GNU Regexp Operators. (line 63) @@ -32576,7 +32619,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 172) +* group ID of gawk user: Auto-set. (line 180) * groups, information about: Group Functions. (line 6) * gsub <1>: String Functions. (line 139) * gsub: Using Constant Regexps. @@ -32675,7 +32718,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) @@ -32804,7 +32847,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 338) + (line 336) * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 88) @@ -32818,14 +32861,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 270) +* locale decimal point character: Options. (line 268) * 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) @@ -32865,8 +32908,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 128) -* maximum precision supported by MPFR library: Auto-set. (line 213) +* mawk utility: Escape Sequences. (line 130) +* maximum precision supported by MPFR library: Auto-set. (line 221) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) * message object files: Explaining gettext. (line 42) @@ -32878,8 +32921,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 134) -* minimum precision supported by MPFR library: Auto-set. (line 216) +* metacharacters, escape sequences for: Escape Sequences. (line 136) +* minimum precision supported by MPFR library: Auto-set. (line 224) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) * monetary information, localization: Explaining gettext. (line 104) @@ -32902,7 +32945,7 @@ Index * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 67) -* newlines <2>: Options. (line 260) +* newlines <2>: Options. (line 258) * newlines: Statements/Lines. (line 6) * newlines, as field separators: Default Field Splitting. (line 6) @@ -32931,7 +32974,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. @@ -32940,9 +32983,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 123) +* NR variable <1>: Auto-set. (line 131) * NR variable: Records. (line 6) -* NR variable, changing: Auto-set. (line 301) +* NR variable, changing: Auto-set. (line 309) * null strings <1>: Basic Data Typing. (line 26) * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. @@ -33057,7 +33100,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 181) +* parent process ID of gawk process: Auto-set. (line 189) * parentheses (), in a profile: Profiling. (line 146) * parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) @@ -33099,14 +33142,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 104) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 98) +* portability: Escape Sequences. (line 100) * 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 42) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 116) + (line 118) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33124,7 +33167,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 358) +* portability, POSIXLY_CORRECT environment variable: Options. (line 356) * portability, substr() function: String Functions. (line 510) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 37) @@ -33145,7 +33188,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 116) + (line 118) * 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. @@ -33173,11 +33216,11 @@ Index * POSIX awk, regular expressions and: Regexp Operators. (line 163) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 55) -* POSIX mode: Options. (line 254) +* POSIX mode: Options. (line 252) * 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 338) +* POSIXLY_CORRECT environment variable: Options. (line 336) * PREC variable: User-modified. (line 124) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) @@ -33220,24 +33263,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 175) -* process ID of gawk process: Auto-set. (line 178) +* process group idIDof gawk process: Auto-set. (line 183) +* process ID of gawk process: Auto-set. (line 186) * 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 128) +* PROCINFO array: Auto-set. (line 136) * 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 161) -* PROCINFO array, uses: Auto-set. (line 234) +* PROCINFO array, uses: Auto-set. (line 242) * 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 146) +* program identifiers: Auto-set. (line 154) * program, definition of: Getting Started. (line 21) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 36) @@ -33281,12 +33324,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) @@ -33356,7 +33399,7 @@ Index (line 59) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 70) -* regular expressions, interval expressions and: Options. (line 279) +* regular expressions, interval expressions and: Options. (line 277) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators <1>: Regexp Operators. (line 6) @@ -33396,7 +33439,7 @@ Index * right shift: Bitwise Functions. (line 52) * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 244) +* RLENGTH variable: Auto-set. (line 252) * RLENGTH variable, match() function and: String Functions. (line 224) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 32) @@ -33414,7 +33457,7 @@ Index * Robbins, Miriam <2>: Getline/Pipe. (line 39) * Robbins, Miriam: Acknowledgments. (line 92) * 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 128) @@ -33422,9 +33465,9 @@ Index * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 52) -* RSTART variable: Auto-set. (line 250) +* RSTART variable: Auto-set. (line 258) * RSTART variable, match() function and: String Functions. (line 224) -* RT variable <1>: Auto-set. (line 257) +* RT variable <1>: Auto-set. (line 265) * RT variable <2>: Multiple Line. (line 129) * RT variable: awk split records. (line 124) * Rubin, Paul <1>: Contributors. (line 15) @@ -33437,14 +33480,14 @@ Index (line 68) * sample debugging session: Sample Debugging Session. (line 6) -* sandbox mode: Options. (line 286) +* sandbox mode: Options. (line 284) * 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 284) +* Schorr, Andrew <2>: Auto-set. (line 292) * Schorr, Andrew: Acknowledgments. (line 60) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -33464,7 +33507,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) @@ -33526,14 +33569,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 114) + (line 116) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) -* sidebar, Changing NR and FNR: Auto-set. (line 299) +* sidebar, Changing NR and FNR: Auto-set. (line 307) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 138) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 132) + (line 134) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33566,8 +33609,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 33) * single quote ('), in shell commands: Quoting. (line 48) @@ -33617,10 +33660,10 @@ Index * sprintf() function, OFMT variable and: User-modified. (line 114) * 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) @@ -33692,9 +33735,9 @@ Index * substr: String Functions. (line 479) * substring: String Functions. (line 479) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 229) +* supplementary groups of gawk process: Auto-set. (line 237) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 261) +* SYMTAB array: Auto-set. (line 269) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) * system: I/O Functions. (line 75) @@ -33761,7 +33804,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 116) + (line 118) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -33817,7 +33860,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 128) + (line 130) * Unix awk, close() function and: Close Files And Pipes. (line 131) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -33872,10 +33915,10 @@ Index * variables, uninitialized, as array subscripts: Uninitialized Subscripts. (line 6) * variables, user-defined: Variables. (line 6) -* version of gawk: Auto-set. (line 199) -* version of gawk extension API: Auto-set. (line 224) -* version of GNU MP library: Auto-set. (line 210) -* version of GNU MPFR library: Auto-set. (line 206) +* version of gawk: Auto-set. (line 207) +* version of gawk extension API: Auto-set. (line 232) +* version of GNU MP library: Auto-set. (line 218) +* version of GNU MPFR library: Auto-set. (line 214) * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 65) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 9) @@ -33909,7 +33952,7 @@ Index * whitespace, as field separators: Default Field Splitting. (line 6) * whitespace, functions, calling: Calling Built-in. (line 10) -* whitespace, newlines as: Options. (line 260) +* whitespace, newlines as: Options. (line 258) * Williams, Kent: Contributors. (line 34) * Woehlke, Matthew: Contributors. (line 79) * Woods, John: Contributors. (line 27) @@ -34003,511 +34046,511 @@ Node: Intro Summary109912 Node: Invoking Gawk110795 Node: Command Line112310 Node: Options113101 -Ref: Options-Footnote-1128877 -Node: Other Arguments128902 -Node: Naming Standard Input131564 -Node: Environment Variables132657 -Node: AWKPATH Variable133215 -Ref: AWKPATH Variable-Footnote-1136081 -Ref: AWKPATH Variable-Footnote-2136126 -Node: AWKLIBPATH Variable136386 -Node: Other Environment Variables137145 -Node: Exit Status140802 -Node: Include Files141477 -Node: Loading Shared Libraries145055 -Node: Obsolete146439 -Node: Undocumented147136 -Node: Invoking Summary147403 -Node: Regexp149003 -Node: Regexp Usage150462 -Node: Escape Sequences152495 -Node: Regexp Operators158312 -Ref: Regexp Operators-Footnote-1165830 -Ref: Regexp Operators-Footnote-2165977 -Node: Bracket Expressions166075 -Ref: table-char-classes168097 -Node: GNU Regexp Operators171037 -Node: Case-sensitivity174746 -Ref: Case-sensitivity-Footnote-1177638 -Ref: Case-sensitivity-Footnote-2177873 -Node: Leftmost Longest177981 -Node: Computed Regexps179182 -Node: Regexp Summary182554 -Node: Reading Files184023 -Node: Records186115 -Node: awk split records186837 -Node: gawk split records191695 -Ref: gawk split records-Footnote-1196216 -Node: Fields196253 -Ref: Fields-Footnote-1199217 -Node: Nonconstant Fields199303 -Ref: Nonconstant Fields-Footnote-1201533 -Node: Changing Fields201735 -Node: Field Separators207689 -Node: Default Field Splitting210391 -Node: Regexp Field Splitting211508 -Node: Single Character Fields214835 -Node: Command Line Field Separator215894 -Node: Full Line Fields219320 -Ref: Full Line Fields-Footnote-1219828 -Node: Field Splitting Summary219874 -Ref: Field Splitting Summary-Footnote-1223006 -Node: Constant Size223107 -Node: Splitting By Content227713 -Ref: Splitting By Content-Footnote-1231786 -Node: Multiple Line231826 -Ref: Multiple Line-Footnote-1237682 -Node: Getline237861 -Node: Plain Getline240072 -Node: Getline/Variable242167 -Node: Getline/File243314 -Node: Getline/Variable/File244698 -Ref: Getline/Variable/File-Footnote-1246297 -Node: Getline/Pipe246384 -Node: Getline/Variable/Pipe249070 -Node: Getline/Coprocess250177 -Node: Getline/Variable/Coprocess251429 -Node: Getline Notes252166 -Node: Getline Summary254970 -Ref: table-getline-variants255378 -Node: Read Timeout256290 -Ref: Read Timeout-Footnote-1260117 -Node: Command-line directories260175 -Node: Input Summary261079 -Node: Input Exercises264216 -Node: Printing264949 -Node: Print266671 -Node: Print Examples268164 -Node: Output Separators270943 -Node: OFMT272959 -Node: Printf274317 -Node: Basic Printf275223 -Node: Control Letters276762 -Node: Format Modifiers280753 -Node: Printf Examples286780 -Node: Redirection289244 -Node: Special Files296216 -Node: Special FD296749 -Ref: Special FD-Footnote-1300346 -Node: Special Network300420 -Node: Special Caveats301270 -Node: Close Files And Pipes302066 -Ref: Close Files And Pipes-Footnote-1309227 -Ref: Close Files And Pipes-Footnote-2309375 -Node: Output Summary309525 -Node: Output exercises310522 -Node: Expressions311202 -Node: Values312387 -Node: Constants313063 -Node: Scalar Constants313743 -Ref: Scalar Constants-Footnote-1314602 -Node: Nondecimal-numbers314852 -Node: Regexp Constants317852 -Node: Using Constant Regexps318327 -Node: Variables321399 -Node: Using Variables322054 -Node: Assignment Options323778 -Node: Conversion325653 -Node: Strings And Numbers326177 -Ref: Strings And Numbers-Footnote-1329239 -Node: Locale influences conversions329348 -Ref: table-locale-affects332065 -Node: All Operators332653 -Node: Arithmetic Ops333283 -Node: Concatenation335788 -Ref: Concatenation-Footnote-1338607 -Node: Assignment Ops338713 -Ref: table-assign-ops343696 -Node: Increment Ops344999 -Node: Truth Values and Conditions348437 -Node: Truth Values349520 -Node: Typing and Comparison350569 -Node: Variable Typing351362 -Node: Comparison Operators355014 -Ref: table-relational-ops355424 -Node: POSIX String Comparison358974 -Ref: POSIX String Comparison-Footnote-1360058 -Node: Boolean Ops360196 -Ref: Boolean Ops-Footnote-1364271 -Node: Conditional Exp364362 -Node: Function Calls366089 -Node: Precedence369969 -Node: Locales373638 -Node: Expressions Summary375269 -Node: Patterns and Actions377810 -Node: Pattern Overview378926 -Node: Regexp Patterns380603 -Node: Expression Patterns381146 -Node: Ranges384926 -Node: BEGIN/END388032 -Node: Using BEGIN/END388794 -Ref: Using BEGIN/END-Footnote-1391530 -Node: I/O And BEGIN/END391636 -Node: BEGINFILE/ENDFILE393907 -Node: Empty396838 -Node: Using Shell Variables397155 -Node: Action Overview399438 -Node: Statements401765 -Node: If Statement403613 -Node: While Statement405111 -Node: Do Statement407155 -Node: For Statement408311 -Node: Switch Statement411463 -Node: Break Statement413851 -Node: Continue Statement415892 -Node: Next Statement417717 -Node: Nextfile Statement420107 -Node: Exit Statement422743 -Node: Built-in Variables425147 -Node: User-modified426274 -Ref: User-modified-Footnote-1433963 -Node: Auto-set434025 -Ref: Auto-set-Footnote-1446607 -Ref: Auto-set-Footnote-2446812 -Node: ARGC and ARGV446868 -Node: Pattern Action Summary450772 -Node: Arrays452995 -Node: Array Basics454544 -Node: Array Intro455370 -Ref: figure-array-elements457343 -Node: Reference to Elements459750 -Node: Assigning Elements462200 -Node: Array Example462691 -Node: Scanning an Array464423 -Node: Controlling Scanning467424 -Ref: Controlling Scanning-Footnote-1472597 -Node: Delete472913 -Ref: Delete-Footnote-1475664 -Node: Numeric Array Subscripts475721 -Node: Uninitialized Subscripts477904 -Node: Multidimensional479529 -Node: Multiscanning482642 -Node: Arrays of Arrays484231 -Node: Arrays Summary488894 -Node: Functions490999 -Node: Built-in491872 -Node: Calling Built-in492950 -Node: Numeric Functions494938 -Ref: Numeric Functions-Footnote-1498972 -Ref: Numeric Functions-Footnote-2499329 -Ref: Numeric Functions-Footnote-3499377 -Node: String Functions499646 -Ref: String Functions-Footnote-1522643 -Ref: String Functions-Footnote-2522772 -Ref: String Functions-Footnote-3523020 -Node: Gory Details523107 -Ref: table-sub-escapes524880 -Ref: table-sub-proposed526400 -Ref: table-posix-sub527764 -Ref: table-gensub-escapes529304 -Ref: Gory Details-Footnote-1530480 -Node: I/O Functions530631 -Ref: I/O Functions-Footnote-1537741 -Node: Time Functions537888 -Ref: Time Functions-Footnote-1548352 -Ref: Time Functions-Footnote-2548420 -Ref: Time Functions-Footnote-3548578 -Ref: Time Functions-Footnote-4548689 -Ref: Time Functions-Footnote-5548801 -Ref: Time Functions-Footnote-6549028 -Node: Bitwise Functions549294 -Ref: table-bitwise-ops549856 -Ref: Bitwise Functions-Footnote-1554101 -Node: Type Functions554285 -Node: I18N Functions555427 -Node: User-defined557072 -Node: Definition Syntax557876 -Ref: Definition Syntax-Footnote-1563055 -Node: Function Example563124 -Ref: Function Example-Footnote-1565764 -Node: Function Caveats565786 -Node: Calling A Function566304 -Node: Variable Scope567259 -Node: Pass By Value/Reference570247 -Node: Return Statement573757 -Node: Dynamic Typing576741 -Node: Indirect Calls577670 -Node: Functions Summary587383 -Node: Library Functions589922 -Ref: Library Functions-Footnote-1593540 -Ref: Library Functions-Footnote-2593683 -Node: Library Names593854 -Ref: Library Names-Footnote-1597327 -Ref: Library Names-Footnote-2597547 -Node: General Functions597633 -Node: Strtonum Function598661 -Node: Assert Function601441 -Node: Round Function604767 -Node: Cliff Random Function606308 -Node: Ordinal Functions607324 -Ref: Ordinal Functions-Footnote-1610389 -Ref: Ordinal Functions-Footnote-2610641 -Node: Join Function610852 -Ref: Join Function-Footnote-1612623 -Node: Getlocaltime Function612823 -Node: Readfile Function616559 -Node: Data File Management618398 -Node: Filetrans Function619030 -Node: Rewind Function623099 -Node: File Checking624657 -Ref: File Checking-Footnote-1625789 -Node: Empty Files625990 -Node: Ignoring Assigns627969 -Node: Getopt Function629523 -Ref: Getopt Function-Footnote-1640826 -Node: Passwd Functions641029 -Ref: Passwd Functions-Footnote-1650008 -Node: Group Functions650096 -Ref: Group Functions-Footnote-1658027 -Node: Walking Arrays658240 -Node: Library Functions Summary659843 -Node: Library exercises661231 -Node: Sample Programs662511 -Node: Running Examples663281 -Node: Clones664009 -Node: Cut Program665233 -Node: Egrep Program675091 -Ref: Egrep Program-Footnote-1682678 -Node: Id Program682788 -Node: Split Program686442 -Ref: Split Program-Footnote-1689980 -Node: Tee Program690108 -Node: Uniq Program692895 -Node: Wc Program700316 -Ref: Wc Program-Footnote-1704581 -Node: Miscellaneous Programs704673 -Node: Dupword Program705886 -Node: Alarm Program707917 -Node: Translate Program712721 -Ref: Translate Program-Footnote-1717112 -Ref: Translate Program-Footnote-2717382 -Node: Labels Program717516 -Ref: Labels Program-Footnote-1720877 -Node: Word Sorting720961 -Node: History Sorting725004 -Node: Extract Program726840 -Node: Simple Sed734376 -Node: Igawk Program737438 -Ref: Igawk Program-Footnote-1751742 -Ref: Igawk Program-Footnote-2751943 -Node: Anagram Program752081 -Node: Signature Program755149 -Node: Programs Summary756396 -Node: Programs Exercises757611 -Node: Advanced Features761262 -Node: Nondecimal Data763210 -Node: Array Sorting764787 -Node: Controlling Array Traversal765484 -Node: Array Sorting Functions773764 -Ref: Array Sorting Functions-Footnote-1777671 -Node: Two-way I/O777865 -Ref: Two-way I/O-Footnote-1782809 -Ref: Two-way I/O-Footnote-2782988 -Node: TCP/IP Networking783070 -Node: Profiling785915 -Node: Advanced Features Summary793457 -Node: Internationalization795321 -Node: I18N and L10N796801 -Node: Explaining gettext797487 -Ref: Explaining gettext-Footnote-1802513 -Ref: Explaining gettext-Footnote-2802697 -Node: Programmer i18n802862 -Ref: Programmer i18n-Footnote-1807656 -Node: Translator i18n807705 -Node: String Extraction808499 -Ref: String Extraction-Footnote-1809632 -Node: Printf Ordering809718 -Ref: Printf Ordering-Footnote-1812500 -Node: I18N Portability812564 -Ref: I18N Portability-Footnote-1815013 -Node: I18N Example815076 -Ref: I18N Example-Footnote-1817782 -Node: Gawk I18N817854 -Node: I18N Summary818492 -Node: Debugger819831 -Node: Debugging820853 -Node: Debugging Concepts821294 -Node: Debugging Terms823150 -Node: Awk Debugging825747 -Node: Sample Debugging Session826639 -Node: Debugger Invocation827159 -Node: Finding The Bug828492 -Node: List of Debugger Commands834974 -Node: Breakpoint Control836306 -Node: Debugger Execution Control839970 -Node: Viewing And Changing Data843330 -Node: Execution Stack846688 -Node: Debugger Info848201 -Node: Miscellaneous Debugger Commands852195 -Node: Readline Support857379 -Node: Limitations858271 -Node: Debugging Summary860545 -Node: Arbitrary Precision Arithmetic861713 -Node: Computer Arithmetic863200 -Ref: Computer Arithmetic-Footnote-1867587 -Node: Math Definitions867644 -Ref: table-ieee-formats870933 -Ref: Math Definitions-Footnote-1871473 -Node: MPFR features871576 -Node: FP Math Caution873193 -Ref: FP Math Caution-Footnote-1874243 -Node: Inexactness of computations874612 -Node: Inexact representation875560 -Node: Comparing FP Values876915 -Node: Errors accumulate877879 -Node: Getting Accuracy879312 -Node: Try To Round881971 -Node: Setting precision882870 -Ref: table-predefined-precision-strings883552 -Node: Setting the rounding mode885345 -Ref: table-gawk-rounding-modes885709 -Ref: Setting the rounding mode-Footnote-1889163 -Node: Arbitrary Precision Integers889342 -Ref: Arbitrary Precision Integers-Footnote-1892323 -Node: POSIX Floating Point Problems892472 -Ref: POSIX Floating Point Problems-Footnote-1896348 -Node: Floating point summary896386 -Node: Dynamic Extensions898590 -Node: Extension Intro900142 -Node: Plugin License901407 -Node: Extension Mechanism Outline902092 -Ref: figure-load-extension902516 -Ref: figure-load-new-function904001 -Ref: figure-call-new-function905003 -Node: Extension API Description906987 -Node: Extension API Functions Introduction908437 -Node: General Data Types913304 -Ref: General Data Types-Footnote-1918997 -Node: Requesting Values919296 -Ref: table-value-types-returned920033 -Node: Memory Allocation Functions920991 -Ref: Memory Allocation Functions-Footnote-1923738 -Node: Constructor Functions923834 -Node: Registration Functions925592 -Node: Extension Functions926277 -Node: Exit Callback Functions928579 -Node: Extension Version String929827 -Node: Input Parsers930477 -Node: Output Wrappers940291 -Node: Two-way processors944807 -Node: Printing Messages947011 -Ref: Printing Messages-Footnote-1948088 -Node: Updating `ERRNO'948240 -Node: Accessing Parameters948979 -Node: Symbol Table Access950209 -Node: Symbol table by name950723 -Node: Symbol table by cookie952699 -Ref: Symbol table by cookie-Footnote-1956832 -Node: Cached values956895 -Ref: Cached values-Footnote-1960399 -Node: Array Manipulation960490 -Ref: Array Manipulation-Footnote-1961588 -Node: Array Data Types961627 -Ref: Array Data Types-Footnote-1964330 -Node: Array Functions964422 -Node: Flattening Arrays968296 -Node: Creating Arrays975148 -Node: Extension API Variables979879 -Node: Extension Versioning980515 -Node: Extension API Informational Variables982416 -Node: Extension API Boilerplate983502 -Node: Finding Extensions987306 -Node: Extension Example987866 -Node: Internal File Description988596 -Node: Internal File Ops992687 -Ref: Internal File Ops-Footnote-11004119 -Node: Using Internal File Ops1004259 -Ref: Using Internal File Ops-Footnote-11006606 -Node: Extension Samples1006874 -Node: Extension Sample File Functions1008398 -Node: Extension Sample Fnmatch1015966 -Node: Extension Sample Fork1017448 -Node: Extension Sample Inplace1018661 -Node: Extension Sample Ord1020336 -Node: Extension Sample Readdir1021172 -Ref: table-readdir-file-types1022028 -Node: Extension Sample Revout1022827 -Node: Extension Sample Rev2way1023418 -Node: Extension Sample Read write array1024159 -Node: Extension Sample Readfile1026038 -Node: Extension Sample API Tests1027138 -Node: Extension Sample Time1027663 -Node: gawkextlib1028978 -Node: Extension summary1031791 -Node: Extension Exercises1035484 -Node: Language History1036206 -Node: V7/SVR3.11037849 -Node: SVR41040169 -Node: POSIX1041611 -Node: BTL1042997 -Node: POSIX/GNU1043731 -Node: Feature History1049447 -Node: Common Extensions1062538 -Node: Ranges and Locales1063850 -Ref: Ranges and Locales-Footnote-11068467 -Ref: Ranges and Locales-Footnote-21068494 -Ref: Ranges and Locales-Footnote-31068728 -Node: Contributors1068949 -Node: History summary1074374 -Node: Installation1075743 -Node: Gawk Distribution1076694 -Node: Getting1077178 -Node: Extracting1078002 -Node: Distribution contents1079644 -Node: Unix Installation1085361 -Node: Quick Installation1085978 -Node: Additional Configuration Options1088420 -Node: Configuration Philosophy1090158 -Node: Non-Unix Installation1092509 -Node: PC Installation1092967 -Node: PC Binary Installation1094278 -Node: PC Compiling1096126 -Ref: PC Compiling-Footnote-11099125 -Node: PC Testing1099230 -Node: PC Using1100406 -Node: Cygwin1104558 -Node: MSYS1105367 -Node: VMS Installation1105881 -Node: VMS Compilation1106677 -Ref: VMS Compilation-Footnote-11107899 -Node: VMS Dynamic Extensions1107957 -Node: VMS Installation Details1109330 -Node: VMS Running1111582 -Node: VMS GNV1114416 -Node: VMS Old Gawk1115139 -Node: Bugs1115609 -Node: Other Versions1119613 -Node: Installation summary1125840 -Node: Notes1126896 -Node: Compatibility Mode1127761 -Node: Additions1128543 -Node: Accessing The Source1129468 -Node: Adding Code1130904 -Node: New Ports1137082 -Node: Derived Files1141563 -Ref: Derived Files-Footnote-11146644 -Ref: Derived Files-Footnote-21146678 -Ref: Derived Files-Footnote-31147274 -Node: Future Extensions1147388 -Node: Implementation Limitations1147994 -Node: Extension Design1149242 -Node: Old Extension Problems1150396 -Ref: Old Extension Problems-Footnote-11151913 -Node: Extension New Mechanism Goals1151970 -Ref: Extension New Mechanism Goals-Footnote-11155330 -Node: Extension Other Design Decisions1155519 -Node: Extension Future Growth1157625 -Node: Old Extension Mechanism1158461 -Node: Notes summary1160223 -Node: Basic Concepts1161409 -Node: Basic High Level1162090 -Ref: figure-general-flow1162362 -Ref: figure-process-flow1162961 -Ref: Basic High Level-Footnote-11166190 -Node: Basic Data Typing1166375 -Node: Glossary1169703 -Node: Copying1194855 -Node: GNU Free Documentation License1232411 -Node: Index1257547 +Ref: Options-Footnote-1128748 +Node: Other Arguments128773 +Node: Naming Standard Input131435 +Node: Environment Variables132528 +Node: AWKPATH Variable133086 +Ref: AWKPATH Variable-Footnote-1135952 +Ref: AWKPATH Variable-Footnote-2135997 +Node: AWKLIBPATH Variable136257 +Node: Other Environment Variables137016 +Node: Exit Status140468 +Node: Include Files141143 +Node: Loading Shared Libraries144721 +Node: Obsolete146105 +Node: Undocumented146802 +Node: Invoking Summary147069 +Node: Regexp148669 +Node: Regexp Usage150128 +Node: Escape Sequences152161 +Node: Regexp Operators158061 +Ref: Regexp Operators-Footnote-1165579 +Ref: Regexp Operators-Footnote-2165726 +Node: Bracket Expressions165824 +Ref: table-char-classes167846 +Node: GNU Regexp Operators170786 +Node: Case-sensitivity174495 +Ref: Case-sensitivity-Footnote-1177387 +Ref: Case-sensitivity-Footnote-2177622 +Node: Leftmost Longest177730 +Node: Computed Regexps178931 +Node: Regexp Summary182303 +Node: Reading Files183772 +Node: Records185864 +Node: awk split records186586 +Node: gawk split records191444 +Ref: gawk split records-Footnote-1195965 +Node: Fields196002 +Ref: Fields-Footnote-1198966 +Node: Nonconstant Fields199052 +Ref: Nonconstant Fields-Footnote-1201282 +Node: Changing Fields201484 +Node: Field Separators207438 +Node: Default Field Splitting210140 +Node: Regexp Field Splitting211257 +Node: Single Character Fields214584 +Node: Command Line Field Separator215643 +Node: Full Line Fields219069 +Ref: Full Line Fields-Footnote-1219577 +Node: Field Splitting Summary219623 +Ref: Field Splitting Summary-Footnote-1222755 +Node: Constant Size222856 +Node: Splitting By Content227462 +Ref: Splitting By Content-Footnote-1231535 +Node: Multiple Line231575 +Ref: Multiple Line-Footnote-1237431 +Node: Getline237610 +Node: Plain Getline239821 +Node: Getline/Variable241916 +Node: Getline/File243063 +Node: Getline/Variable/File244447 +Ref: Getline/Variable/File-Footnote-1246046 +Node: Getline/Pipe246133 +Node: Getline/Variable/Pipe248819 +Node: Getline/Coprocess249926 +Node: Getline/Variable/Coprocess251178 +Node: Getline Notes251915 +Node: Getline Summary254719 +Ref: table-getline-variants255127 +Node: Read Timeout256039 +Ref: Read Timeout-Footnote-1259866 +Node: Command-line directories259924 +Node: Input Summary260828 +Node: Input Exercises263965 +Node: Printing264698 +Node: Print266420 +Node: Print Examples267913 +Node: Output Separators270692 +Node: OFMT272708 +Node: Printf274066 +Node: Basic Printf274972 +Node: Control Letters276511 +Node: Format Modifiers280502 +Node: Printf Examples286529 +Node: Redirection288993 +Node: Special Files295965 +Node: Special FD296498 +Ref: Special FD-Footnote-1300095 +Node: Special Network300169 +Node: Special Caveats301019 +Node: Close Files And Pipes301815 +Ref: Close Files And Pipes-Footnote-1308976 +Ref: Close Files And Pipes-Footnote-2309124 +Node: Output Summary309274 +Node: Output exercises310271 +Node: Expressions310951 +Node: Values312136 +Node: Constants312812 +Node: Scalar Constants313492 +Ref: Scalar Constants-Footnote-1314351 +Node: Nondecimal-numbers314601 +Node: Regexp Constants317601 +Node: Using Constant Regexps318076 +Node: Variables321148 +Node: Using Variables321803 +Node: Assignment Options323527 +Node: Conversion325402 +Node: Strings And Numbers325926 +Ref: Strings And Numbers-Footnote-1328988 +Node: Locale influences conversions329097 +Ref: table-locale-affects331814 +Node: All Operators332402 +Node: Arithmetic Ops333032 +Node: Concatenation335537 +Ref: Concatenation-Footnote-1338356 +Node: Assignment Ops338462 +Ref: table-assign-ops343445 +Node: Increment Ops344748 +Node: Truth Values and Conditions348186 +Node: Truth Values349269 +Node: Typing and Comparison350318 +Node: Variable Typing351111 +Node: Comparison Operators354763 +Ref: table-relational-ops355173 +Node: POSIX String Comparison358723 +Ref: POSIX String Comparison-Footnote-1359807 +Node: Boolean Ops359945 +Ref: Boolean Ops-Footnote-1364020 +Node: Conditional Exp364111 +Node: Function Calls365838 +Node: Precedence369718 +Node: Locales373387 +Node: Expressions Summary375018 +Node: Patterns and Actions377559 +Node: Pattern Overview378675 +Node: Regexp Patterns380352 +Node: Expression Patterns380895 +Node: Ranges384675 +Node: BEGIN/END387781 +Node: Using BEGIN/END388543 +Ref: Using BEGIN/END-Footnote-1391279 +Node: I/O And BEGIN/END391385 +Node: BEGINFILE/ENDFILE393656 +Node: Empty396587 +Node: Using Shell Variables396904 +Node: Action Overview399187 +Node: Statements401514 +Node: If Statement403362 +Node: While Statement404860 +Node: Do Statement406904 +Node: For Statement408060 +Node: Switch Statement411212 +Node: Break Statement413600 +Node: Continue Statement415641 +Node: Next Statement417466 +Node: Nextfile Statement419856 +Node: Exit Statement422492 +Node: Built-in Variables424896 +Node: User-modified426023 +Ref: User-modified-Footnote-1433712 +Node: Auto-set433774 +Ref: Auto-set-Footnote-1446693 +Ref: Auto-set-Footnote-2446898 +Node: ARGC and ARGV446954 +Node: Pattern Action Summary450858 +Node: Arrays453081 +Node: Array Basics454630 +Node: Array Intro455456 +Ref: figure-array-elements457429 +Node: Reference to Elements459836 +Node: Assigning Elements462286 +Node: Array Example462777 +Node: Scanning an Array464509 +Node: Controlling Scanning467510 +Ref: Controlling Scanning-Footnote-1472683 +Node: Delete472999 +Ref: Delete-Footnote-1475750 +Node: Numeric Array Subscripts475807 +Node: Uninitialized Subscripts477990 +Node: Multidimensional479615 +Node: Multiscanning482728 +Node: Arrays of Arrays484317 +Node: Arrays Summary488980 +Node: Functions491085 +Node: Built-in491958 +Node: Calling Built-in493036 +Node: Numeric Functions495024 +Ref: Numeric Functions-Footnote-1499860 +Ref: Numeric Functions-Footnote-2500217 +Ref: Numeric Functions-Footnote-3500265 +Node: String Functions500534 +Ref: String Functions-Footnote-1523531 +Ref: String Functions-Footnote-2523660 +Ref: String Functions-Footnote-3523908 +Node: Gory Details523995 +Ref: table-sub-escapes525768 +Ref: table-sub-proposed527288 +Ref: table-posix-sub528652 +Ref: table-gensub-escapes530192 +Ref: Gory Details-Footnote-1531368 +Node: I/O Functions531519 +Ref: I/O Functions-Footnote-1538629 +Node: Time Functions538776 +Ref: Time Functions-Footnote-1549240 +Ref: Time Functions-Footnote-2549308 +Ref: Time Functions-Footnote-3549466 +Ref: Time Functions-Footnote-4549577 +Ref: Time Functions-Footnote-5549689 +Ref: Time Functions-Footnote-6549916 +Node: Bitwise Functions550182 +Ref: table-bitwise-ops550744 +Ref: Bitwise Functions-Footnote-1554989 +Node: Type Functions555173 +Node: I18N Functions556315 +Node: User-defined557960 +Node: Definition Syntax558764 +Ref: Definition Syntax-Footnote-1563943 +Node: Function Example564012 +Ref: Function Example-Footnote-1566652 +Node: Function Caveats566674 +Node: Calling A Function567192 +Node: Variable Scope568147 +Node: Pass By Value/Reference571135 +Node: Return Statement574645 +Node: Dynamic Typing577629 +Node: Indirect Calls578558 +Node: Functions Summary588271 +Node: Library Functions590810 +Ref: Library Functions-Footnote-1594428 +Ref: Library Functions-Footnote-2594571 +Node: Library Names594742 +Ref: Library Names-Footnote-1598215 +Ref: Library Names-Footnote-2598435 +Node: General Functions598521 +Node: Strtonum Function599549 +Node: Assert Function602329 +Node: Round Function605655 +Node: Cliff Random Function607196 +Node: Ordinal Functions608212 +Ref: Ordinal Functions-Footnote-1611277 +Ref: Ordinal Functions-Footnote-2611529 +Node: Join Function611740 +Ref: Join Function-Footnote-1613511 +Node: Getlocaltime Function613711 +Node: Readfile Function617447 +Node: Data File Management619286 +Node: Filetrans Function619918 +Node: Rewind Function623987 +Node: File Checking625545 +Ref: File Checking-Footnote-1626677 +Node: Empty Files626878 +Node: Ignoring Assigns628857 +Node: Getopt Function630411 +Ref: Getopt Function-Footnote-1641714 +Node: Passwd Functions641917 +Ref: Passwd Functions-Footnote-1650896 +Node: Group Functions650984 +Ref: Group Functions-Footnote-1658915 +Node: Walking Arrays659128 +Node: Library Functions Summary660731 +Node: Library exercises662119 +Node: Sample Programs663399 +Node: Running Examples664169 +Node: Clones664897 +Node: Cut Program666121 +Node: Egrep Program675979 +Ref: Egrep Program-Footnote-1683566 +Node: Id Program683676 +Node: Split Program687330 +Ref: Split Program-Footnote-1690868 +Node: Tee Program690996 +Node: Uniq Program693783 +Node: Wc Program701204 +Ref: Wc Program-Footnote-1705469 +Node: Miscellaneous Programs705561 +Node: Dupword Program706774 +Node: Alarm Program708805 +Node: Translate Program713609 +Ref: Translate Program-Footnote-1718000 +Ref: Translate Program-Footnote-2718270 +Node: Labels Program718404 +Ref: Labels Program-Footnote-1721765 +Node: Word Sorting721849 +Node: History Sorting725892 +Node: Extract Program727728 +Node: Simple Sed735264 +Node: Igawk Program738326 +Ref: Igawk Program-Footnote-1752630 +Ref: Igawk Program-Footnote-2752831 +Node: Anagram Program752969 +Node: Signature Program756037 +Node: Programs Summary757284 +Node: Programs Exercises758499 +Node: Advanced Features762150 +Node: Nondecimal Data764098 +Node: Array Sorting765675 +Node: Controlling Array Traversal766372 +Node: Array Sorting Functions774652 +Ref: Array Sorting Functions-Footnote-1778559 +Node: Two-way I/O778753 +Ref: Two-way I/O-Footnote-1783697 +Ref: Two-way I/O-Footnote-2783876 +Node: TCP/IP Networking783958 +Node: Profiling786803 +Node: Advanced Features Summary794354 +Node: Internationalization796218 +Node: I18N and L10N797698 +Node: Explaining gettext798384 +Ref: Explaining gettext-Footnote-1803410 +Ref: Explaining gettext-Footnote-2803594 +Node: Programmer i18n803759 +Ref: Programmer i18n-Footnote-1808553 +Node: Translator i18n808602 +Node: String Extraction809396 +Ref: String Extraction-Footnote-1810529 +Node: Printf Ordering810615 +Ref: Printf Ordering-Footnote-1813397 +Node: I18N Portability813461 +Ref: I18N Portability-Footnote-1815910 +Node: I18N Example815973 +Ref: I18N Example-Footnote-1818679 +Node: Gawk I18N818751 +Node: I18N Summary819389 +Node: Debugger820728 +Node: Debugging821750 +Node: Debugging Concepts822191 +Node: Debugging Terms824047 +Node: Awk Debugging826644 +Node: Sample Debugging Session827536 +Node: Debugger Invocation828056 +Node: Finding The Bug829389 +Node: List of Debugger Commands835871 +Node: Breakpoint Control837203 +Node: Debugger Execution Control840867 +Node: Viewing And Changing Data844227 +Node: Execution Stack847585 +Node: Debugger Info849098 +Node: Miscellaneous Debugger Commands853092 +Node: Readline Support858276 +Node: Limitations859168 +Node: Debugging Summary861442 +Node: Arbitrary Precision Arithmetic862610 +Node: Computer Arithmetic864097 +Ref: Computer Arithmetic-Footnote-1868484 +Node: Math Definitions868541 +Ref: table-ieee-formats871830 +Ref: Math Definitions-Footnote-1872370 +Node: MPFR features872473 +Node: FP Math Caution874090 +Ref: FP Math Caution-Footnote-1875140 +Node: Inexactness of computations875509 +Node: Inexact representation876457 +Node: Comparing FP Values877812 +Node: Errors accumulate878776 +Node: Getting Accuracy880209 +Node: Try To Round882868 +Node: Setting precision883767 +Ref: table-predefined-precision-strings884449 +Node: Setting the rounding mode886242 +Ref: table-gawk-rounding-modes886606 +Ref: Setting the rounding mode-Footnote-1890060 +Node: Arbitrary Precision Integers890239 +Ref: Arbitrary Precision Integers-Footnote-1894012 +Node: POSIX Floating Point Problems894161 +Ref: POSIX Floating Point Problems-Footnote-1898037 +Node: Floating point summary898075 +Node: Dynamic Extensions900279 +Node: Extension Intro901831 +Node: Plugin License903096 +Node: Extension Mechanism Outline903781 +Ref: figure-load-extension904205 +Ref: figure-load-new-function905690 +Ref: figure-call-new-function906692 +Node: Extension API Description908676 +Node: Extension API Functions Introduction910126 +Node: General Data Types914993 +Ref: General Data Types-Footnote-1920686 +Node: Requesting Values920985 +Ref: table-value-types-returned921722 +Node: Memory Allocation Functions922680 +Ref: Memory Allocation Functions-Footnote-1925427 +Node: Constructor Functions925523 +Node: Registration Functions927281 +Node: Extension Functions927966 +Node: Exit Callback Functions930268 +Node: Extension Version String931516 +Node: Input Parsers932166 +Node: Output Wrappers941980 +Node: Two-way processors946496 +Node: Printing Messages948700 +Ref: Printing Messages-Footnote-1949777 +Node: Updating `ERRNO'949929 +Node: Accessing Parameters950668 +Node: Symbol Table Access951898 +Node: Symbol table by name952412 +Node: Symbol table by cookie954388 +Ref: Symbol table by cookie-Footnote-1958521 +Node: Cached values958584 +Ref: Cached values-Footnote-1962088 +Node: Array Manipulation962179 +Ref: Array Manipulation-Footnote-1963277 +Node: Array Data Types963316 +Ref: Array Data Types-Footnote-1966019 +Node: Array Functions966111 +Node: Flattening Arrays969985 +Node: Creating Arrays976837 +Node: Extension API Variables981568 +Node: Extension Versioning982204 +Node: Extension API Informational Variables984105 +Node: Extension API Boilerplate985191 +Node: Finding Extensions988995 +Node: Extension Example989555 +Node: Internal File Description990285 +Node: Internal File Ops994376 +Ref: Internal File Ops-Footnote-11005808 +Node: Using Internal File Ops1005948 +Ref: Using Internal File Ops-Footnote-11008295 +Node: Extension Samples1008563 +Node: Extension Sample File Functions1010087 +Node: Extension Sample Fnmatch1017655 +Node: Extension Sample Fork1019137 +Node: Extension Sample Inplace1020350 +Node: Extension Sample Ord1022025 +Node: Extension Sample Readdir1022861 +Ref: table-readdir-file-types1023717 +Node: Extension Sample Revout1024516 +Node: Extension Sample Rev2way1025107 +Node: Extension Sample Read write array1025848 +Node: Extension Sample Readfile1027727 +Node: Extension Sample API Tests1028827 +Node: Extension Sample Time1029352 +Node: gawkextlib1030667 +Node: Extension summary1033480 +Node: Extension Exercises1037173 +Node: Language History1037895 +Node: V7/SVR3.11039538 +Node: SVR41041858 +Node: POSIX1043300 +Node: BTL1044686 +Node: POSIX/GNU1045420 +Node: Feature History1051136 +Node: Common Extensions1064227 +Node: Ranges and Locales1065539 +Ref: Ranges and Locales-Footnote-11070156 +Ref: Ranges and Locales-Footnote-21070183 +Ref: Ranges and Locales-Footnote-31070417 +Node: Contributors1070638 +Node: History summary1076063 +Node: Installation1077432 +Node: Gawk Distribution1078383 +Node: Getting1078867 +Node: Extracting1079691 +Node: Distribution contents1081333 +Node: Unix Installation1087103 +Node: Quick Installation1087720 +Node: Additional Configuration Options1090162 +Node: Configuration Philosophy1091900 +Node: Non-Unix Installation1094251 +Node: PC Installation1094709 +Node: PC Binary Installation1096020 +Node: PC Compiling1097868 +Ref: PC Compiling-Footnote-11100867 +Node: PC Testing1100972 +Node: PC Using1102148 +Node: Cygwin1106300 +Node: MSYS1107109 +Node: VMS Installation1107623 +Node: VMS Compilation1108419 +Ref: VMS Compilation-Footnote-11109641 +Node: VMS Dynamic Extensions1109699 +Node: VMS Installation Details1111072 +Node: VMS Running1113324 +Node: VMS GNV1116158 +Node: VMS Old Gawk1116881 +Node: Bugs1117351 +Node: Other Versions1121355 +Node: Installation summary1127582 +Node: Notes1128638 +Node: Compatibility Mode1129503 +Node: Additions1130285 +Node: Accessing The Source1131210 +Node: Adding Code1132646 +Node: New Ports1138824 +Node: Derived Files1143305 +Ref: Derived Files-Footnote-11148386 +Ref: Derived Files-Footnote-21148420 +Ref: Derived Files-Footnote-31149016 +Node: Future Extensions1149130 +Node: Implementation Limitations1149736 +Node: Extension Design1150984 +Node: Old Extension Problems1152138 +Ref: Old Extension Problems-Footnote-11153655 +Node: Extension New Mechanism Goals1153712 +Ref: Extension New Mechanism Goals-Footnote-11157072 +Node: Extension Other Design Decisions1157261 +Node: Extension Future Growth1159367 +Node: Old Extension Mechanism1160203 +Node: Notes summary1161965 +Node: Basic Concepts1163151 +Node: Basic High Level1163832 +Ref: figure-general-flow1164104 +Ref: figure-process-flow1164703 +Ref: Basic High Level-Footnote-11167932 +Node: Basic Data Typing1168117 +Node: Glossary1171445 +Node: Copying1196597 +Node: GNU Free Documentation License1234153 +Node: Index1259289 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index deda30b7..5f3d9e8e 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3876,10 +3876,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} @@ -4365,11 +4363,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. This variable will -not survive into the next major release. - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -4943,17 +4936,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 @@ -14567,10 +14561,18 @@ next file is opened. 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 @@ -16661,6 +16663,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 @@ -27504,8 +27523,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 @@ -30546,6 +30565,45 @@ 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, i) +@{ + 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 + @node POSIX Floating Point Problems @section Standards Versus Existing Practice @@ -36648,6 +36706,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 @@ -36692,8 +36752,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 @@ -37739,9 +37797,10 @@ mail at the Internet address noted previously. If you find bugs in one of the non-Unix ports of @command{gawk}, please send an electronic mail message to the person who maintains that port. They -are named in the following list, as well as in the @file{README} file in the @command{gawk} -distribution. Information in the @file{README} file should be considered -authoritative if it conflicts with this @value{DOCUMENT}. +are named in the following list, as well as in the @file{README} file +in the @command{gawk} distribution. Information in the @file{README} +file should be considered authoritative if it conflicts with this +@value{DOCUMENT}. The people maintaining the non-Unix ports of @command{gawk} are as follows: @@ -37769,7 +37828,8 @@ John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}. @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 efd9e05b..4b3dafb9 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -3804,10 +3804,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} @@ -4293,11 +4291,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. This variable will -not survive into the next major release. - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -4871,17 +4864,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 @@ -13918,10 +13912,18 @@ next file is opened. 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 @@ -15966,6 +15968,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 @@ -26619,8 +26638,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 @@ -29661,6 +29680,45 @@ 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, i) +@{ + 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 + @node POSIX Floating Point Problems @section Standards Versus Existing Practice @@ -35763,6 +35821,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 @@ -35807,8 +35867,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 @@ -36854,9 +36912,10 @@ mail at the Internet address noted previously. If you find bugs in one of the non-Unix ports of @command{gawk}, please send an electronic mail message to the person who maintains that port. They -are named in the following list, as well as in the @file{README} file in the @command{gawk} -distribution. Information in the @file{README} file should be considered -authoritative if it conflicts with this @value{DOCUMENT}. +are named in the following list, as well as in the @file{README} file +in the @command{gawk} distribution. Information in the @file{README} +file should be considered authoritative if it conflicts with this +@value{DOCUMENT}. The people maintaining the non-Unix ports of @command{gawk} are as follows: @@ -36884,7 +36943,8 @@ John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}. @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 |