diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 95 | ||||
-rw-r--r-- | doc/ChangeLog | 32 | ||||
-rw-r--r-- | doc/Makefile.am | 14 | ||||
-rw-r--r-- | doc/Makefile.in | 14 | ||||
-rw-r--r-- | doc/awkcard.in | 3 | ||||
-rw-r--r-- | doc/gawk.1 | 25 | ||||
-rw-r--r-- | doc/gawk.info | 1355 | ||||
-rw-r--r-- | doc/gawk.texi | 120 | ||||
-rw-r--r-- | doc/gawktexi.in | 120 |
9 files changed, 1040 insertions, 738 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 3444a542..b2257736 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -93,6 +93,10 @@ exercises. Remove use of LC_ALL in an example; doesn't seem to be needed anymore. + Unrelated: + + * gawktexi.in: Document that MirBSD is no longer supported. + 2014-08-25 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Exercises are excluded from print edition. @@ -126,6 +130,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. @@ -140,6 +148,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 @@ -150,6 +170,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. @@ -446,7 +471,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> @@ -520,6 +545,11 @@ * gawktexi.in (FN, FFN, DF,DDF, PVERSION, CTL): Remove macros. They have no alternate versions and are just in the way. +2013-08-15 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Document that ENVIRON updates affect the environment. + * gawktexi.in: Ditto. + 2013-06-27 Arnold D. Robbins <arnold@skeeve.com> * texinfo.tex: Update from Karl, fixes a formating problem. diff --git a/doc/Makefile.am b/doc/Makefile.am index 86321bbc..8a0442a7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -26,7 +26,7 @@ info_TEXINFOS = gawk.texi gawkinet.texi -man_MANS = gawk.1 igawk.1 +man_MANS = gawk.1 EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ @@ -50,7 +50,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ bc_notes # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf MAKEINFO = @MAKEINFO@ --no-split --force @@ -75,9 +75,9 @@ AWKCARD = awkcard.ps gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi -postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf gawk.ps: gawk.dvi TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi @@ -91,12 +91,6 @@ gawk.1.ps: gawk.1 gawk.1.pdf: gawk.1.ps ps2pdf gawk.1.ps gawk.1.pdf -igawk.1.ps: igawk.1 - -groff -man $(srcdir)/igawk.1 > igawk.1.ps - -igawk.1.pdf: igawk.1.ps - ps2pdf igawk.1.ps igawk.1.pdf - awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr diff --git a/doc/Makefile.in b/doc/Makefile.in index abaf5601..d89beffd 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -341,7 +341,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi -man_MANS = gawk.1 igawk.1 +man_MANS = gawk.1 EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ api-figure1.eps api-figure1.fig api-figure1.pdf \ @@ -365,7 +365,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" @@ -869,9 +869,9 @@ uninstall-man: uninstall-man1 gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi -postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf gawk.ps: gawk.dvi TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi @@ -885,12 +885,6 @@ gawk.1.ps: gawk.1 gawk.1.pdf: gawk.1.ps ps2pdf gawk.1.ps gawk.1.pdf -igawk.1.ps: igawk.1 - -groff -man $(srcdir)/igawk.1 > igawk.1.ps - -igawk.1.pdf: igawk.1.ps - ps2pdf igawk.1.ps igawk.1.pdf - awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr diff --git a/doc/awkcard.in b/doc/awkcard.in index ca28f0a7..556bdc1e 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1609,6 +1609,9 @@ expand; l lw(2i). \*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR The arctangent of \*(FIy/x\fP in radians. \*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians. +\*(CB\*(FCdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI res\*(FR\*(FC)\*(FR T{ +Return the result of integer division in \*(FIres\*(FR.\*(CD +T} \*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). \*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer. \*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR). @@ -917,11 +917,17 @@ An array containing the values of the current environment. The array is indexed by the environment variables, each element being the value of that variable (e.g., \fBENVIRON["HOME"]\fP might be \fB"/home/arnold"\fR). -Changing this array does not affect the environment seen by programs which +.sp +In POSIX mode, +changing this array does not affect the environment seen by programs which .I gawk spawns via redirection or the .B system() function. +Otherwise, +.I gawk +updates its real environment so that programs it spawns see +the changes. .TP .B ERRNO If a system error occurs either doing a redirection for @@ -2628,6 +2634,23 @@ Return the cosine of .IR expr , which is in radians. .TP +.BI div( num ", " denom ", " result ) +Truncate +.I num +and +.I denom +to integers. Return the quotient of +.I num +divided by +.I denom +in \fIresult\fB["quotient"]\fR +and the remainder in +in \fIresult\fB["remainder"]\fR. +This is a +.I gawk +extension, primarily of value when working with +arbitrarily large integers. +.TP .BI exp( expr ) The exponential function. .TP diff --git a/doc/gawk.info b/doc/gawk.info index 398fbb61..47cbde92 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2585,10 +2585,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' @@ -2977,13 +2975,6 @@ change. The variables are: supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -`GAWK_NO_PP_RUN' - If this variable exists, then when invoked with the - `--pretty-print' option, `gawk' skips running the program. - - CAUTION: This variable will not survive into the next major - release. - `GAWK_STACKSIZE' This specifies the amount by which `gawk' should grow its internal evaluation stack, when needed. @@ -3375,15 +3366,17 @@ sequences apply to both string constants and regexp constants: `\xHH...' The hexadecimal value HH, where HH stands for a sequence of - hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). Like - the same construct in ISO C, the escape sequence continues until - the first nonhexadecimal digit is seen. (c.e.) However, using - more than two hexadecimal digits produces undefined results. (The - `\x' escape sequence is not allowed in POSIX `awk'.) + hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). A + maximum of two digts are allowed after the `\x'. Any further + hexadecimal digits are treated as simple letters or numbers. + (c.e.) - CAUTION: The next major relase of `gawk' will change, such - that a maximum of two hexadecimal digits following the `\x' - will be used. + CAUTION: In ISO C, the escape sequence continues until the + first nonhexadecimal digit is seen. For many years, `gawk' + would continue incorporating hexadecimal digits into the + value until a non-hexadecimal digit or the end of the string + was encountered. However, using more than two hexadecimal + digits produces `\/' A literal slash (necessary for regexp constants only). This @@ -10253,10 +10246,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 @@ -11801,6 +11802,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 @@ -19744,8 +19760,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 @@ -22230,6 +22246,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 @@ -26254,6 +26293,8 @@ the current version of `gawk'. - Ultrix + * Support for MirBSD was removed at `gawk' version 4.2. + File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -27156,7 +27197,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 @@ -27198,11 +27241,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 @@ -31142,20 +31184,20 @@ Index * --include option: Options. (line 159) * --lint option <1>: Options. (line 185) * --lint option: Command Line. (line 20) -* --lint-old option: Options. (line 297) +* --lint-old option: Options. (line 295) * --load option: Options. (line 173) * --non-decimal-data option <1>: Nondecimal Data. (line 6) * --non-decimal-data option: Options. (line 211) * --non-decimal-data option, strtonum() function and: Nondecimal Data. (line 35) -* --optimize option: Options. (line 239) -* --posix option: Options. (line 256) -* --posix option, --traditional option and: Options. (line 275) +* --optimize option: Options. (line 237) +* --posix option: Options. (line 254) +* --posix option, --traditional option and: Options. (line 273) * --pretty-print option: Options. (line 226) * --profile option <1>: Profiling. (line 12) -* --profile option: Options. (line 244) -* --re-interval option: Options. (line 281) -* --sandbox option: Options. (line 288) +* --profile option: Options. (line 242) +* --re-interval option: Options. (line 279) +* --sandbox option: Options. (line 286) * --sandbox option, disabling system() function: I/O Functions. (line 96) * --sandbox option, input redirection with getline: Getline. (line 19) @@ -31163,9 +31205,9 @@ Index (line 6) * --source option: Options. (line 117) * --traditional option: Options. (line 81) -* --traditional option, --posix option and: Options. (line 275) +* --traditional option, --posix option and: Options. (line 273) * --use-lc-numeric option: Options. (line 221) -* --version option: Options. (line 302) +* --version option: Options. (line 300) * --with-whiny-user-strftime configuration option: Additional Configuration Options. (line 35) * -b option: Options. (line 68) @@ -31173,32 +31215,32 @@ Index * -c option: Options. (line 81) * -D option: Options. (line 108) * -d option: Options. (line 93) -* -e option: Options. (line 338) +* -e option: Options. (line 336) * -E option: Options. (line 125) * -e option: Options. (line 117) * -f option: Options. (line 25) * -F option: Options. (line 21) * -f option: Long. (line 12) -* -F option, -Ft sets FS to TAB: Options. (line 310) +* -F option, -Ft sets FS to TAB: Options. (line 308) * -F option, command-line: Command Line Field Separator. (line 6) -* -f option, multiple uses: Options. (line 315) +* -f option, multiple uses: Options. (line 313) * -g option: Options. (line 147) * -h option: Options. (line 154) * -i option: Options. (line 159) -* -L option: Options. (line 297) +* -L option: Options. (line 295) * -l option: Options. (line 173) * -M option: Options. (line 205) * -N option: Options. (line 221) * -n option: Options. (line 211) -* -O option: Options. (line 239) +* -O option: Options. (line 237) * -o option: Options. (line 226) -* -P option: Options. (line 256) -* -p option: Options. (line 244) -* -r option: Options. (line 281) -* -S option: Options. (line 288) +* -P option: Options. (line 254) +* -p option: Options. (line 242) +* -r option: Options. (line 279) +* -S option: Options. (line 286) * -v option: Assignment Options. (line 12) -* -V option: Options. (line 302) +* -V option: Options. (line 300) * -v option: Options. (line 32) * -W option: Options. (line 46) * . (period), regexp operator: Regexp Operators. (line 44) @@ -31260,10 +31302,10 @@ Index (line 8) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) -* \ (backslash), \" escape sequence: Escape Sequences. (line 82) +* \ (backslash), \" escape sequence: Escape Sequences. (line 84) * \ (backslash), \' operator (gawk): GNU Regexp Operators. (line 56) -* \ (backslash), \/ escape sequence: Escape Sequences. (line 73) +* \ (backslash), \/ escape sequence: Escape Sequences. (line 75) * \ (backslash), \< operator (gawk): GNU Regexp Operators. (line 30) * \ (backslash), \> operator (gawk): GNU Regexp Operators. @@ -31303,7 +31345,7 @@ Index * \ (backslash), in bracket expressions: Bracket Expressions. (line 17) * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. - (line 118) + (line 120) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31471,7 +31513,7 @@ Index * awf (amazingly workable formatter) program: Glossary. (line 24) * awk debugging, enabling: Options. (line 108) * awk language, POSIX version: Assignment Ops. (line 137) -* awk profiling, enabling: Options. (line 244) +* awk profiling, enabling: Options. (line 242) * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) @@ -31529,10 +31571,10 @@ Index * awkvars.out file: Options. (line 93) * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) -* backslash (\), \" escape sequence: Escape Sequences. (line 82) +* backslash (\), \" escape sequence: Escape Sequences. (line 84) * backslash (\), \' operator (gawk): GNU Regexp Operators. (line 56) -* backslash (\), \/ escape sequence: Escape Sequences. (line 73) +* backslash (\), \/ escape sequence: Escape Sequences. (line 75) * backslash (\), \< operator (gawk): GNU Regexp Operators. (line 30) * backslash (\), \> operator (gawk): GNU Regexp Operators. @@ -31572,7 +31614,7 @@ Index * backslash (\), in bracket expressions: Bracket Expressions. (line 17) * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. - (line 118) + (line 120) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31677,7 +31719,7 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 122) +* Brian Kernighan's awk <13>: Escape Sequences. (line 124) * Brian Kernighan's awk: When. (line 21) * Brian Kernighan's awk, extensions: BTL. (line 6) * Brian Kernighan's awk, source code: Other Versions. (line 13) @@ -31871,7 +31913,7 @@ Index * cosine: Numeric Functions. (line 15) * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 356) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 354) * csh utility, |& operator, comparison with: Two-way I/O. (line 25) * ctime() user-defined function: Function Example. (line 74) * currency symbols, localization: Explaining gettext. (line 104) @@ -31902,13 +31944,13 @@ Index * dark corner, CONVFMT variable: Strings And Numbers. (line 40) * dark corner, escape sequences: Other Arguments. (line 38) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 140) + (line 142) * dark corner, exit statement: Exit Statement. (line 30) * dark corner, field separators: Field Splitting Summary. (line 46) -* dark corner, FILENAME variable <1>: Auto-set. (line 90) +* dark corner, FILENAME variable <1>: Auto-set. (line 98) * dark corner, FILENAME variable: Getline Notes. (line 19) -* dark corner, FNR/NR variables: Auto-set. (line 308) +* dark corner, FNR/NR variables: Auto-set. (line 316) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) @@ -32056,7 +32098,7 @@ Index * debugger, read commands from a file: Debugger Info. (line 96) * debugging awk programs: Debugger. (line 6) * debugging gawk, bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 272) +* decimal point character, locale specific: Options. (line 270) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott <1>: Bugs. (line 71) @@ -32095,12 +32137,12 @@ Index (line 81) * differences in awk and gawk, command-line directories: Command-line directories. (line 6) -* differences in awk and gawk, ERRNO variable: Auto-set. (line 74) +* differences in awk and gawk, ERRNO variable: Auto-set. (line 82) * differences in awk and gawk, error messages: Special FD. (line 19) * differences in awk and gawk, FIELDWIDTHS variable: User-modified. (line 37) * differences in awk and gawk, FPAT variable: User-modified. (line 43) -* differences in awk and gawk, FUNCTAB variable: Auto-set. (line 115) +* differences in awk and gawk, FUNCTAB variable: Auto-set. (line 123) * differences in awk and gawk, function arguments (gawk): Calling Built-in. (line 16) * differences in awk and gawk, getline command: Getline. (line 19) @@ -32123,7 +32165,7 @@ Index (line 262) * differences in awk and gawk, print/printf statements: Format Modifiers. (line 13) -* differences in awk and gawk, PROCINFO array: Auto-set. (line 129) +* differences in awk and gawk, PROCINFO array: Auto-set. (line 137) * differences in awk and gawk, read timeouts: Read Timeout. (line 6) * differences in awk and gawk, record separators: awk split records. (line 125) @@ -32133,7 +32175,7 @@ Index (line 26) * differences in awk and gawk, RS/RT variables: gawk split records. (line 58) -* differences in awk and gawk, RT variable: Auto-set. (line 264) +* differences in awk and gawk, RT variable: Auto-set. (line 272) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -32141,7 +32183,7 @@ Index * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: gawk split records. (line 77) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 268) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 276) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 151) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -32157,6 +32199,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) @@ -32180,8 +32223,8 @@ Index * dynamically loaded extensions: Dynamic Extensions. (line 6) * e debugger command (alias for enable): Breakpoint Control. (line 73) * EBCDIC: Ordinal Functions. (line 45) -* effective group ID of gawk user: Auto-set. (line 134) -* effective user ID of gawk user: Auto-set. (line 138) +* effective group ID of gawk user: Auto-set. (line 142) +* effective user ID of gawk user: Auto-set. (line 146) * egrep utility <1>: Egrep Program. (line 6) * egrep utility: Bracket Expressions. (line 26) * egrep.awk program: Egrep Program. (line 54) @@ -32236,13 +32279,13 @@ Index (line 11) * EREs (Extended Regular Expressions): Bracket Expressions. (line 26) * ERRNO variable <1>: TCP/IP Networking. (line 54) -* ERRNO variable: Auto-set. (line 74) +* ERRNO variable: Auto-set. (line 82) * ERRNO variable, with BEGINFILE pattern: BEGINFILE/ENDFILE. (line 26) * ERRNO variable, with close() function: Close Files And Pipes. (line 140) * ERRNO variable, with getline command: Getline. (line 19) * error handling: Special FD. (line 19) -* error handling, ERRNO variable and: Auto-set. (line 74) +* error handling, ERRNO variable and: Auto-set. (line 82) * error output: Special FD. (line 6) * escape processing, gsub()/gensub()/sub() functions: Gory Details. (line 6) @@ -32275,10 +32318,10 @@ Index * exit status, of VMS: VMS Running. (line 29) * exit the debugger: Miscellaneous Debugger Commands. (line 99) -* exp: Numeric Functions. (line 18) +* exp: Numeric Functions. (line 33) * expand utility: Very Simple. (line 72) * Expat XML parser library: gawkextlib. (line 31) -* exponent: Numeric Functions. (line 18) +* exponent: Numeric Functions. (line 33) * expressions: Expressions. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * expressions, assignment: Assignment Ops. (line 6) @@ -32296,7 +32339,7 @@ Index (line 6) * extension API version: Extension Versioning. (line 6) -* extension API, version number: Auto-set. (line 231) +* extension API, version number: Auto-set. (line 239) * extension example: Extension Example. (line 6) * extension registration: Registration Functions. (line 6) @@ -32378,7 +32421,7 @@ Index * file names, distinguishing: Auto-set. (line 56) * file names, in compatibility mode: Special Caveats. (line 9) * file names, standard streams in gawk: Special FD. (line 48) -* FILENAME variable <1>: Auto-set. (line 90) +* FILENAME variable <1>: Auto-set. (line 98) * FILENAME variable: Reading Files. (line 6) * FILENAME variable, getline, setting with: Getline Notes. (line 19) * filenames, assignments as: Ignoring Assigns. (line 6) @@ -32446,9 +32489,9 @@ Index * flush buffered output: I/O Functions. (line 28) * fnmatch() extension function: Extension Sample Fnmatch. (line 12) -* FNR variable <1>: Auto-set. (line 99) +* FNR variable <1>: Auto-set. (line 107) * FNR variable: Records. (line 6) -* FNR variable, changing: Auto-set. (line 308) +* FNR variable, changing: Auto-set. (line 316) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -32485,7 +32528,7 @@ Index * FS variable, --field-separator option and: Options. (line 21) * FS variable, as null string: Single Character Fields. (line 20) -* FS variable, as TAB character: Options. (line 268) +* FS variable, as TAB character: Options. (line 266) * FS variable, changing value of: Field Separators. (line 35) * FS variable, running awk programs and: Cut Program. (line 63) * FS variable, setting from command line: Command Line Field Separator. @@ -32498,7 +32541,7 @@ Index * FSF (Free Software Foundation): Manual History. (line 6) * fts() extension function: Extension Sample File Functions. (line 61) -* FUNCTAB array: Auto-set. (line 115) +* FUNCTAB array: Auto-set. (line 123) * function calls: Function Calls. (line 6) * function calls, indirect: Indirect Calls. (line 6) * function calls, indirect, @-notation for: Indirect Calls. (line 47) @@ -32548,7 +32591,7 @@ Index * G-d: Acknowledgments. (line 92) * Garfinkle, Scott: Contributors. (line 34) * gawk program, dynamic profiling: Profiling. (line 179) -* gawk version: Auto-set. (line 206) +* gawk version: Auto-set. (line 214) * gawk, ARGIND variable in: Other Arguments. (line 15) * gawk, awk and <1>: This Manual. (line 14) * gawk, awk and: Preface. (line 21) @@ -32566,13 +32609,13 @@ Index * gawk, distribution: Distribution contents. (line 6) * gawk, ERRNO variable in <1>: TCP/IP Networking. (line 54) -* gawk, ERRNO variable in <2>: Auto-set. (line 74) +* gawk, ERRNO variable in <2>: Auto-set. (line 82) * gawk, ERRNO variable in <3>: BEGINFILE/ENDFILE. (line 26) * gawk, ERRNO variable in <4>: Close Files And Pipes. (line 140) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 130) -* gawk, extensions, disabling: Options. (line 256) +* gawk, escape sequences: Escape Sequences. (line 132) +* gawk, extensions, disabling: Options. (line 254) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) * gawk, field separators and: User-modified. (line 71) @@ -32583,7 +32626,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. @@ -32615,7 +32658,7 @@ Index * gawk, predefined variables and: Built-in Variables. (line 14) * gawk, PROCINFO array in <1>: Two-way I/O. (line 99) * gawk, PROCINFO array in <2>: Time Functions. (line 47) -* gawk, PROCINFO array in: Auto-set. (line 129) +* gawk, PROCINFO array in: Auto-set. (line 137) * gawk, regexp constants and: Using Constant Regexps. (line 28) * gawk, regular expressions, case sensitivity: Case-sensitivity. @@ -32623,18 +32666,18 @@ Index * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) * gawk, regular expressions, precedence: Regexp Operators. (line 161) -* gawk, RT variable in <1>: Auto-set. (line 264) +* gawk, RT variable in <1>: Auto-set. (line 272) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 125) * gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Constant Size. (line 88) * gawk, string-translation functions: I18N Functions. (line 6) -* gawk, SYMTAB array in: Auto-set. (line 268) +* gawk, SYMTAB array in: Auto-set. (line 276) * gawk, TEXTDOMAIN variable in: User-modified. (line 151) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) -* gawk, versions of, information about, printing: Options. (line 302) +* gawk, versions of, information about, printing: Options. (line 300) * gawk, VMS version of: VMS Installation. (line 6) * gawk, word-boundary operator: GNU Regexp Operators. (line 63) @@ -32716,7 +32759,7 @@ Index * Grigera, Juan: Contributors. (line 57) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) -* group ID of gawk user: Auto-set. (line 179) +* group ID of gawk user: Auto-set. (line 187) * groups, information about: Group Functions. (line 6) * gsub <1>: String Functions. (line 139) * gsub: Using Constant Regexps. @@ -32817,7 +32860,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) @@ -32946,7 +32989,7 @@ Index * lint checking, empty programs: Command Line. (line 16) * lint checking, issuing warnings: Options. (line 185) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 341) + (line 339) * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 88) @@ -32962,14 +33005,14 @@ Index * loading, extensions: Options. (line 173) * local variables, in a function: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 81) -* locale decimal point character: Options. (line 272) +* locale decimal point character: Options. (line 270) * locale, definition of: Locales. (line 6) * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. (line 6) -* log: Numeric Functions. (line 30) +* log: Numeric Functions. (line 45) * log files, timestamps in: Time Functions. (line 6) -* logarithm: Numeric Functions. (line 30) +* logarithm: Numeric Functions. (line 45) * logical false/true: Truth Values. (line 6) * logical operators, See Boolean expressions: Boolean Ops. (line 6) * login information: Passwd Functions. (line 16) @@ -33010,8 +33053,8 @@ Index * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) -* mawk utility: Escape Sequences. (line 130) -* maximum precision supported by MPFR library: Auto-set. (line 220) +* mawk utility: Escape Sequences. (line 132) +* maximum precision supported by MPFR library: Auto-set. (line 228) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) * message object files: Explaining gettext. (line 42) @@ -33023,8 +33066,8 @@ Index (line 54) * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) -* metacharacters, escape sequences for: Escape Sequences. (line 136) -* minimum precision supported by MPFR library: Auto-set. (line 223) +* metacharacters, escape sequences for: Escape Sequences. (line 138) +* minimum precision supported by MPFR library: Auto-set. (line 231) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) * monetary information, localization: Explaining gettext. (line 104) @@ -33044,7 +33087,7 @@ Index * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 69) -* newlines <2>: Options. (line 262) +* newlines <2>: Options. (line 260) * newlines: Statements/Lines. (line 6) * newlines, as field separators: Default Field Splitting. (line 6) @@ -33073,7 +33116,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. @@ -33082,9 +33125,9 @@ Index * non-existent array elements: Reference to Elements. (line 23) * not Boolean-logic operator: Boolean Ops. (line 6) -* NR variable <1>: Auto-set. (line 124) +* NR variable <1>: Auto-set. (line 132) * NR variable: Records. (line 6) -* NR variable, changing: Auto-set. (line 308) +* NR variable, changing: Auto-set. (line 316) * null strings <1>: Basic Data Typing. (line 26) * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. @@ -33198,7 +33241,7 @@ Index * p debugger command (alias for print): Viewing And Changing Data. (line 36) * Papadopoulos, Panos: Contributors. (line 128) -* parent process ID of gawk process: Auto-set. (line 188) +* parent process ID of gawk process: Auto-set. (line 196) * parentheses (), in a profile: Profiling. (line 146) * parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) @@ -33240,14 +33283,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 105) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 100) +* portability: Escape Sequences. (line 102) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) * portability, ARGV variable: Executable Scripts. (line 59) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 118) + (line 120) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33265,7 +33308,7 @@ Index * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX awk: Precedence. (line 98) -* portability, POSIXLY_CORRECT environment variable: Options. (line 361) +* portability, POSIXLY_CORRECT environment variable: Options. (line 359) * portability, substr() function: String Functions. (line 511) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 37) @@ -33286,7 +33329,7 @@ Index * POSIX awk, < operator and: Getline/File. (line 26) * POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30) * POSIX awk, backslashes in string constants: Escape Sequences. - (line 118) + (line 120) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) * POSIX awk, bracket expressions and: Bracket Expressions. (line 26) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. @@ -33314,11 +33357,11 @@ Index * POSIX awk, regular expressions and: Regexp Operators. (line 161) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 55) -* POSIX mode: Options. (line 256) +* POSIX mode: Options. (line 254) * POSIX, awk and: Preface. (line 21) * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) -* POSIXLY_CORRECT environment variable: Options. (line 341) +* POSIXLY_CORRECT environment variable: Options. (line 339) * PREC variable: User-modified. (line 123) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) @@ -33365,24 +33408,24 @@ Index * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) * private variables: Library Names. (line 11) -* process group idIDof gawk process: Auto-set. (line 182) -* process ID of gawk process: Auto-set. (line 185) +* process group idIDof gawk process: Auto-set. (line 190) +* process ID of gawk process: Auto-set. (line 193) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array <1>: Passwd Functions. (line 6) * PROCINFO array <2>: Time Functions. (line 47) -* PROCINFO array: Auto-set. (line 129) +* PROCINFO array: Auto-set. (line 137) * PROCINFO array, and communications via ptys: Two-way I/O. (line 99) * PROCINFO array, and group membership: Group Functions. (line 6) * PROCINFO array, and user and group ID numbers: Id Program. (line 15) * PROCINFO array, testing the field splitting: Passwd Functions. (line 154) -* PROCINFO array, uses: Auto-set. (line 241) +* PROCINFO array, uses: Auto-set. (line 249) * PROCINFO, values of sorted_in: Controlling Scanning. (line 26) * profiling awk programs: Profiling. (line 6) * profiling awk programs, dynamically: Profiling. (line 179) -* program identifiers: Auto-set. (line 147) +* program identifiers: Auto-set. (line 155) * program, definition of: Getting Started. (line 21) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 35) @@ -33426,12 +33469,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) @@ -33501,7 +33544,7 @@ Index (line 59) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 70) -* regular expressions, interval expressions and: Options. (line 281) +* regular expressions, interval expressions and: Options. (line 279) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators <1>: Regexp Operators. (line 6) @@ -33541,7 +33584,7 @@ Index * right shift: Bitwise Functions. (line 53) * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 251) +* RLENGTH variable: Auto-set. (line 259) * RLENGTH variable, match() function and: String Functions. (line 227) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 71) @@ -33559,7 +33602,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 127) @@ -33567,9 +33610,9 @@ Index * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 53) -* RSTART variable: Auto-set. (line 257) +* RSTART variable: Auto-set. (line 265) * RSTART variable, match() function and: String Functions. (line 227) -* RT variable <1>: Auto-set. (line 264) +* RT variable <1>: Auto-set. (line 272) * RT variable <2>: Multiple Line. (line 129) * RT variable: awk split records. (line 125) * Rubin, Paul <1>: Contributors. (line 15) @@ -33582,14 +33625,14 @@ Index (line 68) * sample debugging session: Sample Debugging Session. (line 6) -* sandbox mode: Options. (line 288) +* sandbox mode: Options. (line 286) * save debugger options: Debugger Info. (line 84) * scalar or array: Type Functions. (line 11) * scalar values: Basic Data Typing. (line 13) * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew <1>: Contributors. (line 133) -* Schorr, Andrew <2>: Auto-set. (line 291) +* Schorr, Andrew <2>: Auto-set. (line 299) * Schorr, Andrew: Acknowledgments. (line 60) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -33609,7 +33652,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) @@ -33670,14 +33713,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 116) + (line 118) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) -* sidebar, Changing NR and FNR: Auto-set. (line 306) +* sidebar, Changing NR and FNR: Auto-set. (line 314) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 137) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 134) + (line 136) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33710,8 +33753,8 @@ Index * SIGUSR1 signal, for dynamic profiling: Profiling. (line 188) * silent debugger command: Debugger Execution Control. (line 10) -* sin: Numeric Functions. (line 76) -* sine: Numeric Functions. (line 76) +* sin: Numeric Functions. (line 91) +* sine: Numeric Functions. (line 91) * single quote ('): One-shot. (line 15) * single quote (') in gawk command lines: Long. (line 35) * single quote ('), in shell commands: Quoting. (line 48) @@ -33761,10 +33804,10 @@ Index * sprintf() function, OFMT variable and: User-modified. (line 113) * sprintf() function, print/printf statements and: Round Function. (line 6) -* sqrt: Numeric Functions. (line 79) +* sqrt: Numeric Functions. (line 94) * square brackets ([]), regexp operator: Regexp Operators. (line 56) -* square root: Numeric Functions. (line 79) -* srand: Numeric Functions. (line 83) +* square root: Numeric Functions. (line 94) +* srand: Numeric Functions. (line 98) * stack frame: Debugging Terms. (line 10) * Stallman, Richard <1>: Glossary. (line 296) * Stallman, Richard <2>: Contributors. (line 23) @@ -33836,9 +33879,9 @@ Index * substr: String Functions. (line 480) * substring: String Functions. (line 480) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 236) +* supplementary groups of gawk process: Auto-set. (line 244) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 268) +* SYMTAB array: Auto-set. (line 276) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) * system: I/O Functions. (line 74) @@ -33905,7 +33948,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 118) + (line 120) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -33961,7 +34004,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 130) + (line 132) * Unix awk, close() function and: Close Files And Pipes. (line 132) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -34015,10 +34058,10 @@ Index * variables, uninitialized, as array subscripts: Uninitialized Subscripts. (line 6) * variables, user-defined: Variables. (line 6) -* version of gawk: Auto-set. (line 206) -* version of gawk extension API: Auto-set. (line 231) -* version of GNU MP library: Auto-set. (line 217) -* version of GNU MPFR library: Auto-set. (line 213) +* version of gawk: Auto-set. (line 214) +* version of gawk extension API: Auto-set. (line 239) +* version of GNU MP library: Auto-set. (line 225) +* version of GNU MPFR library: Auto-set. (line 221) * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 65) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 9) @@ -34055,7 +34098,7 @@ Index * whitespace, as field separators: Default Field Splitting. (line 6) * whitespace, functions, calling: Calling Built-in. (line 10) -* whitespace, newlines as: Options. (line 262) +* whitespace, newlines as: Options. (line 260) * Williams, Kent: Contributors. (line 34) * Woehlke, Matthew: Contributors. (line 79) * Woods, John: Contributors. (line 27) @@ -34147,518 +34190,518 @@ Node: Intro Summary110424 Node: Invoking Gawk111307 Node: Command Line112822 Node: Options113613 -Ref: Options-Footnote-1129508 -Node: Other Arguments129533 -Node: Naming Standard Input132494 -Node: Environment Variables133587 -Node: AWKPATH Variable134145 -Ref: AWKPATH Variable-Footnote-1136997 -Ref: AWKPATH Variable-Footnote-2137042 -Node: AWKLIBPATH Variable137302 -Node: Other Environment Variables138061 -Node: Exit Status141763 -Node: Include Files142438 -Node: Loading Shared Libraries146016 -Node: Obsolete147443 -Node: Undocumented148140 -Node: Invoking Summary148407 -Node: Regexp150073 -Node: Regexp Usage151532 -Node: Escape Sequences153565 -Node: Regexp Operators159582 -Ref: Regexp Operators-Footnote-1167017 -Ref: Regexp Operators-Footnote-2167164 -Node: Bracket Expressions167262 -Ref: table-char-classes169279 -Node: Leftmost Longest172219 -Node: Computed Regexps173521 -Node: GNU Regexp Operators176918 -Node: Case-sensitivity180624 -Ref: Case-sensitivity-Footnote-1183514 -Ref: Case-sensitivity-Footnote-2183749 -Node: Regexp Summary183857 -Node: Reading Files185326 -Node: Records187420 -Node: awk split records188152 -Node: gawk split records193066 -Ref: gawk split records-Footnote-1197605 -Node: Fields197642 -Ref: Fields-Footnote-1200440 -Node: Nonconstant Fields200526 -Ref: Nonconstant Fields-Footnote-1202756 -Node: Changing Fields202958 -Node: Field Separators208890 -Node: Default Field Splitting211594 -Node: Regexp Field Splitting212711 -Node: Single Character Fields216061 -Node: Command Line Field Separator217120 -Node: Full Line Fields220332 -Ref: Full Line Fields-Footnote-1220840 -Node: Field Splitting Summary220886 -Ref: Field Splitting Summary-Footnote-1224017 -Node: Constant Size224118 -Node: Splitting By Content228724 -Ref: Splitting By Content-Footnote-1232797 -Node: Multiple Line232837 -Ref: Multiple Line-Footnote-1238726 -Node: Getline238905 -Node: Plain Getline241116 -Node: Getline/Variable243756 -Node: Getline/File244903 -Node: Getline/Variable/File246287 -Ref: Getline/Variable/File-Footnote-1247888 -Node: Getline/Pipe247975 -Node: Getline/Variable/Pipe250658 -Node: Getline/Coprocess251789 -Node: Getline/Variable/Coprocess253041 -Node: Getline Notes253780 -Node: Getline Summary256572 -Ref: table-getline-variants256984 -Node: Read Timeout257813 -Ref: Read Timeout-Footnote-1261627 -Node: Command-line directories261685 -Node: Input Summary262589 -Node: Input Exercises265841 -Node: Printing266569 -Node: Print268346 -Node: Print Examples269803 -Node: Output Separators272582 -Node: OFMT274600 -Node: Printf275954 -Node: Basic Printf276739 -Node: Control Letters278310 -Node: Format Modifiers282294 -Node: Printf Examples288301 -Node: Redirection290783 -Node: Special FD297514 -Ref: Special FD-Footnote-1300671 -Node: Special Files300745 -Node: Other Inherited Files301361 -Node: Special Network302361 -Node: Special Caveats303222 -Node: Close Files And Pipes304173 -Ref: Close Files And Pipes-Footnote-1311352 -Ref: Close Files And Pipes-Footnote-2311500 -Node: Output Summary311650 -Node: Output Exercises312646 -Node: Expressions313326 -Node: Values314511 -Node: Constants315187 -Node: Scalar Constants315867 -Ref: Scalar Constants-Footnote-1316726 -Node: Nondecimal-numbers316976 -Node: Regexp Constants319976 -Node: Using Constant Regexps320501 -Node: Variables323639 -Node: Using Variables324294 -Node: Assignment Options326204 -Node: Conversion328079 -Node: Strings And Numbers328603 -Ref: Strings And Numbers-Footnote-1331667 -Node: Locale influences conversions331776 -Ref: table-locale-affects334491 -Node: All Operators335079 -Node: Arithmetic Ops335709 -Node: Concatenation338214 -Ref: Concatenation-Footnote-1341033 -Node: Assignment Ops341139 -Ref: table-assign-ops346122 -Node: Increment Ops347400 -Node: Truth Values and Conditions350838 -Node: Truth Values351921 -Node: Typing and Comparison352970 -Node: Variable Typing353763 -Node: Comparison Operators357415 -Ref: table-relational-ops357825 -Node: POSIX String Comparison361340 -Ref: POSIX String Comparison-Footnote-1362412 -Node: Boolean Ops362550 -Ref: Boolean Ops-Footnote-1367029 -Node: Conditional Exp367120 -Node: Function Calls368847 -Node: Precedence372727 -Node: Locales376395 -Node: Expressions Summary378026 -Node: Patterns and Actions380600 -Node: Pattern Overview381720 -Node: Regexp Patterns383399 -Node: Expression Patterns383942 -Node: Ranges387722 -Node: BEGIN/END390828 -Node: Using BEGIN/END391590 -Ref: Using BEGIN/END-Footnote-1394327 -Node: I/O And BEGIN/END394433 -Node: BEGINFILE/ENDFILE396747 -Node: Empty399648 -Node: Using Shell Variables399965 -Node: Action Overview402241 -Node: Statements404568 -Node: If Statement406416 -Node: While Statement407914 -Node: Do Statement409942 -Node: For Statement411084 -Node: Switch Statement414239 -Node: Break Statement416627 -Node: Continue Statement418668 -Node: Next Statement420493 -Node: Nextfile Statement422873 -Node: Exit Statement425503 -Node: Built-in Variables427906 -Node: User-modified429039 -Ref: User-modified-Footnote-1436719 -Node: Auto-set436781 -Ref: Auto-set-Footnote-1449638 -Ref: Auto-set-Footnote-2449843 -Node: ARGC and ARGV449899 -Node: Pattern Action Summary454103 -Node: Arrays456530 -Node: Array Basics457859 -Node: Array Intro458703 -Ref: figure-array-elements460676 -Ref: Array Intro-Footnote-1463200 -Node: Reference to Elements463328 -Node: Assigning Elements465778 -Node: Array Example466269 -Node: Scanning an Array468027 -Node: Controlling Scanning471043 -Ref: Controlling Scanning-Footnote-1476232 -Node: Numeric Array Subscripts476548 -Node: Uninitialized Subscripts478733 -Node: Delete480350 -Ref: Delete-Footnote-1483094 -Node: Multidimensional483151 -Node: Multiscanning486246 -Node: Arrays of Arrays487835 -Node: Arrays Summary492596 -Node: Functions494701 -Node: Built-in495574 -Node: Calling Built-in496652 -Node: Numeric Functions498640 -Ref: Numeric Functions-Footnote-1502662 -Ref: Numeric Functions-Footnote-2503019 -Ref: Numeric Functions-Footnote-3503067 -Node: String Functions503336 -Ref: String Functions-Footnote-1526800 -Ref: String Functions-Footnote-2526929 -Ref: String Functions-Footnote-3527177 -Node: Gory Details527264 -Ref: table-sub-escapes529045 -Ref: table-sub-proposed530565 -Ref: table-posix-sub531929 -Ref: table-gensub-escapes533469 -Ref: Gory Details-Footnote-1534301 -Node: I/O Functions534452 -Ref: I/O Functions-Footnote-1541553 -Node: Time Functions541700 -Ref: Time Functions-Footnote-1552169 -Ref: Time Functions-Footnote-2552237 -Ref: Time Functions-Footnote-3552395 -Ref: Time Functions-Footnote-4552506 -Ref: Time Functions-Footnote-5552618 -Ref: Time Functions-Footnote-6552845 -Node: Bitwise Functions553111 -Ref: table-bitwise-ops553673 -Ref: Bitwise Functions-Footnote-1557981 -Node: Type Functions558150 -Node: I18N Functions559299 -Node: User-defined560944 -Node: Definition Syntax561748 -Ref: Definition Syntax-Footnote-1567154 -Node: Function Example567223 -Ref: Function Example-Footnote-1570140 -Node: Function Caveats570162 -Node: Calling A Function570680 -Node: Variable Scope571635 -Node: Pass By Value/Reference574623 -Node: Return Statement578133 -Node: Dynamic Typing581117 -Node: Indirect Calls582046 -Ref: Indirect Calls-Footnote-1591767 -Node: Functions Summary591895 -Node: Library Functions594594 -Ref: Library Functions-Footnote-1598212 -Ref: Library Functions-Footnote-2598355 -Node: Library Names598526 -Ref: Library Names-Footnote-1601986 -Ref: Library Names-Footnote-2602206 -Node: General Functions602292 -Node: Strtonum Function603320 -Node: Assert Function606340 -Node: Round Function609664 -Node: Cliff Random Function611205 -Node: Ordinal Functions612221 -Ref: Ordinal Functions-Footnote-1615286 -Ref: Ordinal Functions-Footnote-2615538 -Node: Join Function615749 -Ref: Join Function-Footnote-1617520 -Node: Getlocaltime Function617720 -Node: Readfile Function621461 -Node: Data File Management623409 -Node: Filetrans Function624041 -Node: Rewind Function628100 -Node: File Checking629485 -Ref: File Checking-Footnote-1630813 -Node: Empty Files631014 -Node: Ignoring Assigns632993 -Node: Getopt Function634544 -Ref: Getopt Function-Footnote-1646004 -Node: Passwd Functions646207 -Ref: Passwd Functions-Footnote-1655058 -Node: Group Functions655146 -Ref: Group Functions-Footnote-1663049 -Node: Walking Arrays663262 -Node: Library Functions Summary664865 -Node: Library Exercises666266 -Node: Sample Programs667546 -Node: Running Examples668316 -Node: Clones669044 -Node: Cut Program670268 -Node: Egrep Program679998 -Ref: Egrep Program-Footnote-1687502 -Node: Id Program687612 -Node: Split Program691256 -Ref: Split Program-Footnote-1694702 -Node: Tee Program694830 -Node: Uniq Program697617 -Node: Wc Program705038 -Ref: Wc Program-Footnote-1709286 -Node: Miscellaneous Programs709378 -Node: Dupword Program710591 -Node: Alarm Program712622 -Node: Translate Program717426 -Ref: Translate Program-Footnote-1721999 -Ref: Translate Program-Footnote-2722269 -Node: Labels Program722408 -Ref: Labels Program-Footnote-1725757 -Node: Word Sorting725841 -Node: History Sorting729911 -Node: Extract Program731747 -Node: Simple Sed739279 -Node: Igawk Program742341 -Ref: Igawk Program-Footnote-1756667 -Ref: Igawk Program-Footnote-2756868 -Ref: Igawk Program-Footnote-3756990 -Node: Anagram Program757105 -Node: Signature Program760167 -Node: Programs Summary761414 -Node: Programs Exercises762607 -Ref: Programs Exercises-Footnote-1766738 -Node: Advanced Features766829 -Node: Nondecimal Data768777 -Node: Array Sorting770367 -Node: Controlling Array Traversal771064 -Ref: Controlling Array Traversal-Footnote-1779395 -Node: Array Sorting Functions779513 -Ref: Array Sorting Functions-Footnote-1783405 -Node: Two-way I/O783599 -Ref: Two-way I/O-Footnote-1788543 -Ref: Two-way I/O-Footnote-2788729 -Node: TCP/IP Networking788811 -Node: Profiling791688 -Node: Advanced Features Summary799232 -Node: Internationalization801165 -Node: I18N and L10N802645 -Node: Explaining gettext803331 -Ref: Explaining gettext-Footnote-1808360 -Ref: Explaining gettext-Footnote-2808544 -Node: Programmer i18n808709 -Ref: Programmer i18n-Footnote-1813575 -Node: Translator i18n813624 -Node: String Extraction814418 -Ref: String Extraction-Footnote-1815549 -Node: Printf Ordering815635 -Ref: Printf Ordering-Footnote-1818421 -Node: I18N Portability818485 -Ref: I18N Portability-Footnote-1820934 -Node: I18N Example820997 -Ref: I18N Example-Footnote-1823797 -Node: Gawk I18N823869 -Node: I18N Summary824507 -Node: Debugger825846 -Node: Debugging826868 -Node: Debugging Concepts827309 -Node: Debugging Terms829166 -Node: Awk Debugging831741 -Node: Sample Debugging Session832633 -Node: Debugger Invocation833153 -Node: Finding The Bug834537 -Node: List of Debugger Commands841012 -Node: Breakpoint Control842344 -Node: Debugger Execution Control846036 -Node: Viewing And Changing Data849400 -Node: Execution Stack852765 -Node: Debugger Info854403 -Node: Miscellaneous Debugger Commands858420 -Node: Readline Support863612 -Node: Limitations864504 -Node: Debugging Summary866601 -Node: Arbitrary Precision Arithmetic867769 -Node: Computer Arithmetic869185 -Ref: table-numeric-ranges872786 -Ref: Computer Arithmetic-Footnote-1873645 -Node: Math Definitions873702 -Ref: table-ieee-formats876989 -Ref: Math Definitions-Footnote-1877593 -Node: MPFR features877698 -Node: FP Math Caution879367 -Ref: FP Math Caution-Footnote-1880417 -Node: Inexactness of computations880786 -Node: Inexact representation881734 -Node: Comparing FP Values883089 -Node: Errors accumulate884162 -Node: Getting Accuracy885595 -Node: Try To Round888254 -Node: Setting precision889153 -Ref: table-predefined-precision-strings889837 -Node: Setting the rounding mode891631 -Ref: table-gawk-rounding-modes891995 -Ref: Setting the rounding mode-Footnote-1895449 -Node: Arbitrary Precision Integers895628 -Ref: Arbitrary Precision Integers-Footnote-1898619 -Node: POSIX Floating Point Problems898768 -Ref: POSIX Floating Point Problems-Footnote-1902644 -Node: Floating point summary902682 -Node: Dynamic Extensions904874 -Node: Extension Intro906426 -Node: Plugin License907692 -Node: Extension Mechanism Outline908489 -Ref: figure-load-extension908917 -Ref: figure-register-new-function910397 -Ref: figure-call-new-function911401 -Node: Extension API Description913387 -Node: Extension API Functions Introduction914837 -Node: General Data Types919673 -Ref: General Data Types-Footnote-1925360 -Node: Memory Allocation Functions925659 -Ref: Memory Allocation Functions-Footnote-1928489 -Node: Constructor Functions928585 -Node: Registration Functions930319 -Node: Extension Functions931004 -Node: Exit Callback Functions933300 -Node: Extension Version String934548 -Node: Input Parsers935198 -Node: Output Wrappers945013 -Node: Two-way processors949529 -Node: Printing Messages951733 -Ref: Printing Messages-Footnote-1952810 -Node: Updating `ERRNO'952962 -Node: Requesting Values953702 -Ref: table-value-types-returned954430 -Node: Accessing Parameters955388 -Node: Symbol Table Access956619 -Node: Symbol table by name957133 -Node: Symbol table by cookie959113 -Ref: Symbol table by cookie-Footnote-1963252 -Node: Cached values963315 -Ref: Cached values-Footnote-1966819 -Node: Array Manipulation966910 -Ref: Array Manipulation-Footnote-1968008 -Node: Array Data Types968047 -Ref: Array Data Types-Footnote-1970704 -Node: Array Functions970796 -Node: Flattening Arrays974650 -Node: Creating Arrays981537 -Node: Extension API Variables986304 -Node: Extension Versioning986940 -Node: Extension API Informational Variables988841 -Node: Extension API Boilerplate989929 -Node: Finding Extensions993745 -Node: Extension Example994305 -Node: Internal File Description995077 -Node: Internal File Ops999144 -Ref: Internal File Ops-Footnote-11010802 -Node: Using Internal File Ops1010942 -Ref: Using Internal File Ops-Footnote-11013325 -Node: Extension Samples1013598 -Node: Extension Sample File Functions1015122 -Node: Extension Sample Fnmatch1022724 -Node: Extension Sample Fork1024206 -Node: Extension Sample Inplace1025419 -Node: Extension Sample Ord1027094 -Node: Extension Sample Readdir1027930 -Ref: table-readdir-file-types1028786 -Node: Extension Sample Revout1029597 -Node: Extension Sample Rev2way1030188 -Node: Extension Sample Read write array1030929 -Node: Extension Sample Readfile1032868 -Node: Extension Sample Time1033963 -Node: Extension Sample API Tests1035312 -Node: gawkextlib1035803 -Node: Extension summary1038453 -Node: Extension Exercises1042135 -Node: Language History1042857 -Node: V7/SVR3.11044514 -Node: SVR41046695 -Node: POSIX1048140 -Node: BTL1049529 -Node: POSIX/GNU1050263 -Node: Feature History1055832 -Node: Common Extensions1068923 -Node: Ranges and Locales1070247 -Ref: Ranges and Locales-Footnote-11074886 -Ref: Ranges and Locales-Footnote-21074913 -Ref: Ranges and Locales-Footnote-31075147 -Node: Contributors1075368 -Node: History summary1080908 -Node: Installation1082277 -Node: Gawk Distribution1083233 -Node: Getting1083717 -Node: Extracting1084541 -Node: Distribution contents1086183 -Node: Unix Installation1091900 -Node: Quick Installation1092517 -Node: Additional Configuration Options1094948 -Node: Configuration Philosophy1096688 -Node: Non-Unix Installation1099039 -Node: PC Installation1099497 -Node: PC Binary Installation1100823 -Node: PC Compiling1102671 -Ref: PC Compiling-Footnote-11105692 -Node: PC Testing1105797 -Node: PC Using1106973 -Node: Cygwin1111088 -Node: MSYS1111911 -Node: VMS Installation1112409 -Node: VMS Compilation1113201 -Ref: VMS Compilation-Footnote-11114423 -Node: VMS Dynamic Extensions1114481 -Node: VMS Installation Details1115854 -Node: VMS Running1118106 -Node: VMS GNV1120947 -Node: VMS Old Gawk1121676 -Node: Bugs1122146 -Node: Other Versions1126110 -Node: Installation summary1132323 -Node: Notes1133379 -Node: Compatibility Mode1134244 -Node: Additions1135026 -Node: Accessing The Source1135951 -Node: Adding Code1137387 -Node: New Ports1143559 -Node: Derived Files1148040 -Ref: Derived Files-Footnote-11153515 -Ref: Derived Files-Footnote-21153549 -Ref: Derived Files-Footnote-31154145 -Node: Future Extensions1154259 -Node: Implementation Limitations1154865 -Node: Extension Design1156113 -Node: Old Extension Problems1157267 -Ref: Old Extension Problems-Footnote-11158784 -Node: Extension New Mechanism Goals1158841 -Ref: Extension New Mechanism Goals-Footnote-11162201 -Node: Extension Other Design Decisions1162390 -Node: Extension Future Growth1164498 -Node: Old Extension Mechanism1165334 -Node: Notes summary1167096 -Node: Basic Concepts1168282 -Node: Basic High Level1168963 -Ref: figure-general-flow1169235 -Ref: figure-process-flow1169834 -Ref: Basic High Level-Footnote-11173063 -Node: Basic Data Typing1173248 -Node: Glossary1176576 -Node: Copying1201734 -Node: GNU Free Documentation License1239290 -Node: Index1264426 +Ref: Options-Footnote-1129379 +Node: Other Arguments129404 +Node: Naming Standard Input132365 +Node: Environment Variables133458 +Node: AWKPATH Variable134016 +Ref: AWKPATH Variable-Footnote-1136868 +Ref: AWKPATH Variable-Footnote-2136913 +Node: AWKLIBPATH Variable137173 +Node: Other Environment Variables137932 +Node: Exit Status141405 +Node: Include Files142080 +Node: Loading Shared Libraries145658 +Node: Obsolete147085 +Node: Undocumented147782 +Node: Invoking Summary148049 +Node: Regexp149715 +Node: Regexp Usage151174 +Node: Escape Sequences153207 +Node: Regexp Operators159307 +Ref: Regexp Operators-Footnote-1166742 +Ref: Regexp Operators-Footnote-2166889 +Node: Bracket Expressions166987 +Ref: table-char-classes169004 +Node: Leftmost Longest171944 +Node: Computed Regexps173246 +Node: GNU Regexp Operators176643 +Node: Case-sensitivity180349 +Ref: Case-sensitivity-Footnote-1183239 +Ref: Case-sensitivity-Footnote-2183474 +Node: Regexp Summary183582 +Node: Reading Files185051 +Node: Records187145 +Node: awk split records187877 +Node: gawk split records192791 +Ref: gawk split records-Footnote-1197330 +Node: Fields197367 +Ref: Fields-Footnote-1200165 +Node: Nonconstant Fields200251 +Ref: Nonconstant Fields-Footnote-1202481 +Node: Changing Fields202683 +Node: Field Separators208615 +Node: Default Field Splitting211319 +Node: Regexp Field Splitting212436 +Node: Single Character Fields215786 +Node: Command Line Field Separator216845 +Node: Full Line Fields220057 +Ref: Full Line Fields-Footnote-1220565 +Node: Field Splitting Summary220611 +Ref: Field Splitting Summary-Footnote-1223742 +Node: Constant Size223843 +Node: Splitting By Content228449 +Ref: Splitting By Content-Footnote-1232522 +Node: Multiple Line232562 +Ref: Multiple Line-Footnote-1238451 +Node: Getline238630 +Node: Plain Getline240841 +Node: Getline/Variable243481 +Node: Getline/File244628 +Node: Getline/Variable/File246012 +Ref: Getline/Variable/File-Footnote-1247613 +Node: Getline/Pipe247700 +Node: Getline/Variable/Pipe250383 +Node: Getline/Coprocess251514 +Node: Getline/Variable/Coprocess252766 +Node: Getline Notes253505 +Node: Getline Summary256297 +Ref: table-getline-variants256709 +Node: Read Timeout257538 +Ref: Read Timeout-Footnote-1261352 +Node: Command-line directories261410 +Node: Input Summary262314 +Node: Input Exercises265566 +Node: Printing266294 +Node: Print268071 +Node: Print Examples269528 +Node: Output Separators272307 +Node: OFMT274325 +Node: Printf275679 +Node: Basic Printf276464 +Node: Control Letters278035 +Node: Format Modifiers282019 +Node: Printf Examples288026 +Node: Redirection290508 +Node: Special FD297239 +Ref: Special FD-Footnote-1300396 +Node: Special Files300470 +Node: Other Inherited Files301086 +Node: Special Network302086 +Node: Special Caveats302947 +Node: Close Files And Pipes303898 +Ref: Close Files And Pipes-Footnote-1311077 +Ref: Close Files And Pipes-Footnote-2311225 +Node: Output Summary311375 +Node: Output Exercises312371 +Node: Expressions313051 +Node: Values314236 +Node: Constants314912 +Node: Scalar Constants315592 +Ref: Scalar Constants-Footnote-1316451 +Node: Nondecimal-numbers316701 +Node: Regexp Constants319701 +Node: Using Constant Regexps320226 +Node: Variables323364 +Node: Using Variables324019 +Node: Assignment Options325929 +Node: Conversion327804 +Node: Strings And Numbers328328 +Ref: Strings And Numbers-Footnote-1331392 +Node: Locale influences conversions331501 +Ref: table-locale-affects334216 +Node: All Operators334804 +Node: Arithmetic Ops335434 +Node: Concatenation337939 +Ref: Concatenation-Footnote-1340758 +Node: Assignment Ops340864 +Ref: table-assign-ops345847 +Node: Increment Ops347125 +Node: Truth Values and Conditions350563 +Node: Truth Values351646 +Node: Typing and Comparison352695 +Node: Variable Typing353488 +Node: Comparison Operators357140 +Ref: table-relational-ops357550 +Node: POSIX String Comparison361065 +Ref: POSIX String Comparison-Footnote-1362137 +Node: Boolean Ops362275 +Ref: Boolean Ops-Footnote-1366754 +Node: Conditional Exp366845 +Node: Function Calls368572 +Node: Precedence372452 +Node: Locales376120 +Node: Expressions Summary377751 +Node: Patterns and Actions380325 +Node: Pattern Overview381445 +Node: Regexp Patterns383124 +Node: Expression Patterns383667 +Node: Ranges387447 +Node: BEGIN/END390553 +Node: Using BEGIN/END391315 +Ref: Using BEGIN/END-Footnote-1394052 +Node: I/O And BEGIN/END394158 +Node: BEGINFILE/ENDFILE396472 +Node: Empty399373 +Node: Using Shell Variables399690 +Node: Action Overview401966 +Node: Statements404293 +Node: If Statement406141 +Node: While Statement407639 +Node: Do Statement409667 +Node: For Statement410809 +Node: Switch Statement413964 +Node: Break Statement416352 +Node: Continue Statement418393 +Node: Next Statement420218 +Node: Nextfile Statement422598 +Node: Exit Statement425228 +Node: Built-in Variables427631 +Node: User-modified428764 +Ref: User-modified-Footnote-1436444 +Node: Auto-set436506 +Ref: Auto-set-Footnote-1449700 +Ref: Auto-set-Footnote-2449905 +Node: ARGC and ARGV449961 +Node: Pattern Action Summary454165 +Node: Arrays456592 +Node: Array Basics457921 +Node: Array Intro458765 +Ref: figure-array-elements460738 +Ref: Array Intro-Footnote-1463262 +Node: Reference to Elements463390 +Node: Assigning Elements465840 +Node: Array Example466331 +Node: Scanning an Array468089 +Node: Controlling Scanning471105 +Ref: Controlling Scanning-Footnote-1476294 +Node: Numeric Array Subscripts476610 +Node: Uninitialized Subscripts478795 +Node: Delete480412 +Ref: Delete-Footnote-1483156 +Node: Multidimensional483213 +Node: Multiscanning486308 +Node: Arrays of Arrays487897 +Node: Arrays Summary492658 +Node: Functions494763 +Node: Built-in495636 +Node: Calling Built-in496714 +Node: Numeric Functions498702 +Ref: Numeric Functions-Footnote-1503526 +Ref: Numeric Functions-Footnote-2503883 +Ref: Numeric Functions-Footnote-3503931 +Node: String Functions504200 +Ref: String Functions-Footnote-1527664 +Ref: String Functions-Footnote-2527793 +Ref: String Functions-Footnote-3528041 +Node: Gory Details528128 +Ref: table-sub-escapes529909 +Ref: table-sub-proposed531429 +Ref: table-posix-sub532793 +Ref: table-gensub-escapes534333 +Ref: Gory Details-Footnote-1535165 +Node: I/O Functions535316 +Ref: I/O Functions-Footnote-1542417 +Node: Time Functions542564 +Ref: Time Functions-Footnote-1553033 +Ref: Time Functions-Footnote-2553101 +Ref: Time Functions-Footnote-3553259 +Ref: Time Functions-Footnote-4553370 +Ref: Time Functions-Footnote-5553482 +Ref: Time Functions-Footnote-6553709 +Node: Bitwise Functions553975 +Ref: table-bitwise-ops554537 +Ref: Bitwise Functions-Footnote-1558845 +Node: Type Functions559014 +Node: I18N Functions560163 +Node: User-defined561808 +Node: Definition Syntax562612 +Ref: Definition Syntax-Footnote-1568018 +Node: Function Example568087 +Ref: Function Example-Footnote-1571004 +Node: Function Caveats571026 +Node: Calling A Function571544 +Node: Variable Scope572499 +Node: Pass By Value/Reference575487 +Node: Return Statement578997 +Node: Dynamic Typing581981 +Node: Indirect Calls582910 +Ref: Indirect Calls-Footnote-1592631 +Node: Functions Summary592759 +Node: Library Functions595458 +Ref: Library Functions-Footnote-1599076 +Ref: Library Functions-Footnote-2599219 +Node: Library Names599390 +Ref: Library Names-Footnote-1602850 +Ref: Library Names-Footnote-2603070 +Node: General Functions603156 +Node: Strtonum Function604184 +Node: Assert Function607204 +Node: Round Function610528 +Node: Cliff Random Function612069 +Node: Ordinal Functions613085 +Ref: Ordinal Functions-Footnote-1616150 +Ref: Ordinal Functions-Footnote-2616402 +Node: Join Function616613 +Ref: Join Function-Footnote-1618384 +Node: Getlocaltime Function618584 +Node: Readfile Function622325 +Node: Data File Management624273 +Node: Filetrans Function624905 +Node: Rewind Function628964 +Node: File Checking630349 +Ref: File Checking-Footnote-1631677 +Node: Empty Files631878 +Node: Ignoring Assigns633857 +Node: Getopt Function635408 +Ref: Getopt Function-Footnote-1646868 +Node: Passwd Functions647071 +Ref: Passwd Functions-Footnote-1655922 +Node: Group Functions656010 +Ref: Group Functions-Footnote-1663913 +Node: Walking Arrays664126 +Node: Library Functions Summary665729 +Node: Library Exercises667130 +Node: Sample Programs668410 +Node: Running Examples669180 +Node: Clones669908 +Node: Cut Program671132 +Node: Egrep Program680862 +Ref: Egrep Program-Footnote-1688366 +Node: Id Program688476 +Node: Split Program692120 +Ref: Split Program-Footnote-1695566 +Node: Tee Program695694 +Node: Uniq Program698481 +Node: Wc Program705902 +Ref: Wc Program-Footnote-1710150 +Node: Miscellaneous Programs710242 +Node: Dupword Program711455 +Node: Alarm Program713486 +Node: Translate Program718290 +Ref: Translate Program-Footnote-1722863 +Ref: Translate Program-Footnote-2723133 +Node: Labels Program723272 +Ref: Labels Program-Footnote-1726621 +Node: Word Sorting726705 +Node: History Sorting730775 +Node: Extract Program732611 +Node: Simple Sed740143 +Node: Igawk Program743205 +Ref: Igawk Program-Footnote-1757531 +Ref: Igawk Program-Footnote-2757732 +Ref: Igawk Program-Footnote-3757854 +Node: Anagram Program757969 +Node: Signature Program761031 +Node: Programs Summary762278 +Node: Programs Exercises763471 +Ref: Programs Exercises-Footnote-1767602 +Node: Advanced Features767693 +Node: Nondecimal Data769641 +Node: Array Sorting771231 +Node: Controlling Array Traversal771928 +Ref: Controlling Array Traversal-Footnote-1780259 +Node: Array Sorting Functions780377 +Ref: Array Sorting Functions-Footnote-1784269 +Node: Two-way I/O784463 +Ref: Two-way I/O-Footnote-1789407 +Ref: Two-way I/O-Footnote-2789593 +Node: TCP/IP Networking789675 +Node: Profiling792552 +Node: Advanced Features Summary800105 +Node: Internationalization802038 +Node: I18N and L10N803518 +Node: Explaining gettext804204 +Ref: Explaining gettext-Footnote-1809233 +Ref: Explaining gettext-Footnote-2809417 +Node: Programmer i18n809582 +Ref: Programmer i18n-Footnote-1814448 +Node: Translator i18n814497 +Node: String Extraction815291 +Ref: String Extraction-Footnote-1816422 +Node: Printf Ordering816508 +Ref: Printf Ordering-Footnote-1819294 +Node: I18N Portability819358 +Ref: I18N Portability-Footnote-1821807 +Node: I18N Example821870 +Ref: I18N Example-Footnote-1824670 +Node: Gawk I18N824742 +Node: I18N Summary825380 +Node: Debugger826719 +Node: Debugging827741 +Node: Debugging Concepts828182 +Node: Debugging Terms830039 +Node: Awk Debugging832614 +Node: Sample Debugging Session833506 +Node: Debugger Invocation834026 +Node: Finding The Bug835410 +Node: List of Debugger Commands841885 +Node: Breakpoint Control843217 +Node: Debugger Execution Control846909 +Node: Viewing And Changing Data850273 +Node: Execution Stack853638 +Node: Debugger Info855276 +Node: Miscellaneous Debugger Commands859293 +Node: Readline Support864485 +Node: Limitations865377 +Node: Debugging Summary867474 +Node: Arbitrary Precision Arithmetic868642 +Node: Computer Arithmetic870058 +Ref: table-numeric-ranges873659 +Ref: Computer Arithmetic-Footnote-1874518 +Node: Math Definitions874575 +Ref: table-ieee-formats877862 +Ref: Math Definitions-Footnote-1878466 +Node: MPFR features878571 +Node: FP Math Caution880240 +Ref: FP Math Caution-Footnote-1881290 +Node: Inexactness of computations881659 +Node: Inexact representation882607 +Node: Comparing FP Values883962 +Node: Errors accumulate885035 +Node: Getting Accuracy886468 +Node: Try To Round889127 +Node: Setting precision890026 +Ref: table-predefined-precision-strings890710 +Node: Setting the rounding mode892504 +Ref: table-gawk-rounding-modes892868 +Ref: Setting the rounding mode-Footnote-1896322 +Node: Arbitrary Precision Integers896501 +Ref: Arbitrary Precision Integers-Footnote-1900284 +Node: POSIX Floating Point Problems900433 +Ref: POSIX Floating Point Problems-Footnote-1904309 +Node: Floating point summary904347 +Node: Dynamic Extensions906539 +Node: Extension Intro908091 +Node: Plugin License909357 +Node: Extension Mechanism Outline910154 +Ref: figure-load-extension910582 +Ref: figure-register-new-function912062 +Ref: figure-call-new-function913066 +Node: Extension API Description915052 +Node: Extension API Functions Introduction916502 +Node: General Data Types921338 +Ref: General Data Types-Footnote-1927025 +Node: Memory Allocation Functions927324 +Ref: Memory Allocation Functions-Footnote-1930154 +Node: Constructor Functions930250 +Node: Registration Functions931984 +Node: Extension Functions932669 +Node: Exit Callback Functions934965 +Node: Extension Version String936213 +Node: Input Parsers936863 +Node: Output Wrappers946678 +Node: Two-way processors951194 +Node: Printing Messages953398 +Ref: Printing Messages-Footnote-1954475 +Node: Updating `ERRNO'954627 +Node: Requesting Values955367 +Ref: table-value-types-returned956095 +Node: Accessing Parameters957053 +Node: Symbol Table Access958284 +Node: Symbol table by name958798 +Node: Symbol table by cookie960778 +Ref: Symbol table by cookie-Footnote-1964917 +Node: Cached values964980 +Ref: Cached values-Footnote-1968484 +Node: Array Manipulation968575 +Ref: Array Manipulation-Footnote-1969673 +Node: Array Data Types969712 +Ref: Array Data Types-Footnote-1972369 +Node: Array Functions972461 +Node: Flattening Arrays976315 +Node: Creating Arrays983202 +Node: Extension API Variables987969 +Node: Extension Versioning988605 +Node: Extension API Informational Variables990506 +Node: Extension API Boilerplate991594 +Node: Finding Extensions995410 +Node: Extension Example995970 +Node: Internal File Description996742 +Node: Internal File Ops1000809 +Ref: Internal File Ops-Footnote-11012467 +Node: Using Internal File Ops1012607 +Ref: Using Internal File Ops-Footnote-11014990 +Node: Extension Samples1015263 +Node: Extension Sample File Functions1016787 +Node: Extension Sample Fnmatch1024389 +Node: Extension Sample Fork1025871 +Node: Extension Sample Inplace1027084 +Node: Extension Sample Ord1028759 +Node: Extension Sample Readdir1029595 +Ref: table-readdir-file-types1030451 +Node: Extension Sample Revout1031262 +Node: Extension Sample Rev2way1031853 +Node: Extension Sample Read write array1032594 +Node: Extension Sample Readfile1034533 +Node: Extension Sample Time1035628 +Node: Extension Sample API Tests1036977 +Node: gawkextlib1037468 +Node: Extension summary1040118 +Node: Extension Exercises1043800 +Node: Language History1044522 +Node: V7/SVR3.11046179 +Node: SVR41048360 +Node: POSIX1049805 +Node: BTL1051194 +Node: POSIX/GNU1051928 +Node: Feature History1057557 +Node: Common Extensions1070648 +Node: Ranges and Locales1071972 +Ref: Ranges and Locales-Footnote-11076611 +Ref: Ranges and Locales-Footnote-21076638 +Ref: Ranges and Locales-Footnote-31076872 +Node: Contributors1077093 +Node: History summary1082633 +Node: Installation1084002 +Node: Gawk Distribution1084958 +Node: Getting1085442 +Node: Extracting1086266 +Node: Distribution contents1087908 +Node: Unix Installation1093678 +Node: Quick Installation1094295 +Node: Additional Configuration Options1096726 +Node: Configuration Philosophy1098466 +Node: Non-Unix Installation1100817 +Node: PC Installation1101275 +Node: PC Binary Installation1102601 +Node: PC Compiling1104449 +Ref: PC Compiling-Footnote-11107470 +Node: PC Testing1107575 +Node: PC Using1108751 +Node: Cygwin1112866 +Node: MSYS1113689 +Node: VMS Installation1114187 +Node: VMS Compilation1114979 +Ref: VMS Compilation-Footnote-11116201 +Node: VMS Dynamic Extensions1116259 +Node: VMS Installation Details1117632 +Node: VMS Running1119884 +Node: VMS GNV1122725 +Node: VMS Old Gawk1123454 +Node: Bugs1123924 +Node: Other Versions1127888 +Node: Installation summary1134101 +Node: Notes1135157 +Node: Compatibility Mode1136022 +Node: Additions1136804 +Node: Accessing The Source1137729 +Node: Adding Code1139165 +Node: New Ports1145337 +Node: Derived Files1149818 +Ref: Derived Files-Footnote-11155293 +Ref: Derived Files-Footnote-21155327 +Ref: Derived Files-Footnote-31155923 +Node: Future Extensions1156037 +Node: Implementation Limitations1156643 +Node: Extension Design1157891 +Node: Old Extension Problems1159045 +Ref: Old Extension Problems-Footnote-11160562 +Node: Extension New Mechanism Goals1160619 +Ref: Extension New Mechanism Goals-Footnote-11163979 +Node: Extension Other Design Decisions1164168 +Node: Extension Future Growth1166276 +Node: Old Extension Mechanism1167112 +Node: Notes summary1168874 +Node: Basic Concepts1170060 +Node: Basic High Level1170741 +Ref: figure-general-flow1171013 +Ref: figure-process-flow1171612 +Ref: Basic High Level-Footnote-11174841 +Node: Basic Data Typing1175026 +Node: Glossary1178354 +Node: Copying1203512 +Node: GNU Free Documentation License1241068 +Node: Index1266204 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 8040e06e..ac34949a 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3938,10 +3938,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} @@ -4435,14 +4433,6 @@ two regexp matchers that @command{gawk} uses internally. (There aren't supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -@item GAWK_NO_PP_RUN -If this variable exists, then when invoked with the @option{--pretty-print} -option, @command{gawk} skips running the program. - -@quotation CAUTION -This variable will not survive into the next major release. -@end quotation - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -5023,17 +5013,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 @@ -14717,10 +14708,18 @@ opens the next file. An associative array containing the values of the environment. The array indices are the environment variable names; the elements are the values of the particular environment variables. For example, -@code{ENVIRON["HOME"]} might be @code{"/home/arnold"}. Changing this array -does not affect the environment passed on to any programs that -@command{awk} may spawn via redirection or the @code{system()} function. -(In a future version of @command{gawk}, it may do so.) +@code{ENVIRON["HOME"]} might be @code{/home/arnold}. + +For POSIX @command{awk}, changing this array does not affect the +environment passed on to any programs that @command{awk} may spawn via +redirection or the @code{system()} function. + +However, beginning with version 4.2, if not in POSIX +compatibility mode, @command{gawk} does update its own environment when +@code{ENVIRON} is changed, thus changing the environment seen by programs +that it creates. You should therefore be especially careful if you +modify @code{ENVIRON["PATH"]"}, which is the search path for finding +executable programs. Some operating systems may not have environment variables. On such systems, the @code{ENVIRON} array is empty (except for @@ -16827,6 +16826,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 @@ -27736,8 +27752,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 @@ -30802,6 +30818,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 @@ -35624,6 +35679,10 @@ for @command{gawk} @value{PVERSION} 4.1: Ultrix @end itemize +@item +@c FIXME: Verify the version here. +Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. + @end itemize @c XXX ADD MORE STUFF HERE @@ -36907,6 +36966,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 @@ -36951,8 +37012,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 @@ -38027,7 +38086,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 3b2214df..2ce4bb87 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -3849,10 +3849,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} @@ -4346,14 +4344,6 @@ two regexp matchers that @command{gawk} uses internally. (There aren't supposed to be differences, but occasionally theory and practice don't coordinate with each other.) -@item GAWK_NO_PP_RUN -If this variable exists, then when invoked with the @option{--pretty-print} -option, @command{gawk} skips running the program. - -@quotation CAUTION -This variable will not survive into the next major release. -@end quotation - @item GAWK_STACKSIZE This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. @@ -4934,17 +4924,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 @@ -14050,10 +14041,18 @@ opens the next file. An associative array containing the values of the environment. The array indices are the environment variable names; the elements are the values of the particular environment variables. For example, -@code{ENVIRON["HOME"]} might be @code{"/home/arnold"}. Changing this array -does not affect the environment passed on to any programs that -@command{awk} may spawn via redirection or the @code{system()} function. -(In a future version of @command{gawk}, it may do so.) +@code{ENVIRON["HOME"]} might be @code{/home/arnold}. + +For POSIX @command{awk}, changing this array does not affect the +environment passed on to any programs that @command{awk} may spawn via +redirection or the @code{system()} function. + +However, beginning with version 4.2, if not in POSIX +compatibility mode, @command{gawk} does update its own environment when +@code{ENVIRON} is changed, thus changing the environment seen by programs +that it creates. You should therefore be especially careful if you +modify @code{ENVIRON["PATH"]"}, which is the search path for finding +executable programs. Some operating systems may not have environment variables. On such systems, the @code{ENVIRON} array is empty (except for @@ -16114,6 +16113,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 @@ -26833,8 +26849,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 @@ -29899,6 +29915,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 @@ -34721,6 +34776,10 @@ for @command{gawk} @value{PVERSION} 4.1: Ultrix @end itemize +@item +@c FIXME: Verify the version here. +Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. + @end itemize @c XXX ADD MORE STUFF HERE @@ -36004,6 +36063,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 @@ -36048,8 +36109,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 @@ -37124,7 +37183,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 |