diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2022-05-03 22:53:45 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2022-05-03 22:53:45 +0300 |
commit | d2b7dbb165707778ef960d59c4b2c9798fd4723b (patch) | |
tree | 94d57c77ac33ea271ebe05ea3ab5479078f16a94 | |
parent | 0b77c57f7a3f197b260e546770e6844a6c157b22 (diff) | |
download | gawk-d2b7dbb165707778ef960d59c4b2c9798fd4723b.tar.gz |
Deprecate MPFR.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | doc/ChangeLog | 7 | ||||
-rw-r--r-- | doc/gawk.1 | 16 | ||||
-rw-r--r-- | doc/gawk.info | 1266 | ||||
-rw-r--r-- | doc/gawk.texi | 30 | ||||
-rw-r--r-- | doc/gawktexi.in | 30 | ||||
-rw-r--r-- | main.c | 21 | ||||
-rw-r--r-- | pc/ChangeLog | 4 | ||||
-rw-r--r-- | pc/Makefile.tst | 2 | ||||
-rw-r--r-- | pc/Makefile.tst.prologue | 2 | ||||
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/Makefile.in | 2 |
14 files changed, 769 insertions, 629 deletions
@@ -1,3 +1,8 @@ +2022-05-03 Arnold D. Robbins <arnold@skeeve.com> + + * main.c (deprecate_mpfr): New function. + (parse_args): Call it for -M. + 2022-04-28 Arnold D. Robbins <arnold@skeeve.com> Disallow SYMTAB["x"]["y"]. Reported by Jason C. Kwan. @@ -7,6 +7,13 @@ Changes from 5.1.x to 5.2.0 --------------------------- +*********************************************************************** +* MPFR mode (the -M option) is now DEPRECATED. This feature will be * +* removed in 2024. Using -M produces a warning message unless you * +* set GAWK_NO_MPFR_WARN in the environment. For more information see * +* https://...... * +*********************************************************************** + 1. Numeric scalars now compare in the same way as C for the relational operators. Comparison order for sorting has not changed. This only makes a difference when comparing Infinity and NaN values with diff --git a/doc/ChangeLog b/doc/ChangeLog index 13c793ce..5cddbcf8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2022-05-03 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Document that -M is deprecated. + * gawktexi.in (Options): Ditto. + (MPFR features): Ditto. + (Other Environment Variables): Add GAWK_NO_MPFR_WARN. + 2022-04-29 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Fix a some minor grammar issues. @@ -13,7 +13,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "March 1 2022" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "May 03 2022" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -264,6 +264,15 @@ is not compiled to use the GNU MPFR and GMP libraries. (In such a case, .I gawk issues a warning.) +.sp +.B NOTE: +This feature is +.IR deprecated . +It will be removed from +.I gawk +in 2024 and its use produces a warning messge. Set +.B GAWK_NO_MPFR_WARN +in the environment to silence the warning. .TP .BR \-n ", "\c .B \-\^\-non\-decimal\-data @@ -2306,6 +2315,11 @@ If has been specified, .I gawk issues a warning message to this effect. +.PP +Set +.B GAWK_NO_MPFR_WARN +in the environment to silence the warning about MPFR mode +being deprecated. .SH EXIT STATUS If the .B exit diff --git a/doc/gawk.info b/doc/gawk.info index 5d4bdc92..b605f5f8 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2748,6 +2748,12 @@ The following list describes options mandated by the POSIX standard: no effect if 'gawk' is not compiled to use the GNU MPFR and MP libraries (*note Arbitrary Precision Arithmetic::). + As of version 5.2, the arbitrary precision arithmetic features in + 'gawk' are _deprecated_. They will be removed from 'gawk' in 2024. + If you use this option, 'gawk' generates a warning message. Create + the environment variable 'GAWK_NO_MPFR_WARN' with an arbitrary + value in order to silence the warning. + '-n' '--non-decimal-data' Enable automatic interpretation of octal and hexadecimal values in @@ -3199,6 +3205,10 @@ used by regular users: On systems that do not support the 'usleep()' system call, the value is rounded up to an integral number of seconds. +'GAWK_NO_MPFR_WARN' + Specifies that 'gawk' should not print a deprecation warning when + used with the '-M'/'--bignum' options. + 'GAWK_READ_TIMEOUT' Specifies the time, in milliseconds, for 'gawk' to wait for input before returning with an error. *Note Read Timeout::. @@ -24574,7 +24584,17 @@ File: gawk.info, Node: MPFR features, Next: FP Math Caution, Prev: Math Defin 16.3 Arbitrary-Precision Arithmetic Features in 'gawk' ====================================================== -By default, 'gawk' uses the double-precision floating-point values + WARNING: As of version 5.2, arbitrary precision arithmetic in + 'gawk' is _deprecated_. It will be removed from 'gawk' in 2024. + + MPFR support is deprecated because its inclusion was a mistake. It + has led to endless bug reports, misuse of the feature and public + abuse of the maintainer, for no real increased value. + + If you use this feature, you should start working now to find a + different toolset with which to accomplish your goals.(1) + + By default, 'gawk' uses the double-precision floating-point values supplied by the hardware of the system it runs on. However, if it was compiled to do so, and the '-M' command-line option is supplied, 'gawk' uses the GNU MPFR (http://www.mpfr.org) and GNU MP (https://gmplib.org) @@ -24582,8 +24602,8 @@ uses the GNU MPFR (http://www.mpfr.org) and GNU MP (https://gmplib.org) see if MPFR support is available like so: $ gawk --version - -| GNU Awk 4.1.2, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2) - -| Copyright (C) 1989, 1991-2015 Free Software Foundation. + -| GNU Awk 5.2.0, API: 3.2 (GNU MPFR 4.0.2, GNU MP 6.2.0) + -| Copyright (C) 1989, 1991-2022 Free Software Foundation. ... (You may see different version numbers than what's shown here. That's @@ -24606,6 +24626,11 @@ rounding mode are set globally for every operation to follow. *Note Setting precision:: and *note Setting the rounding mode:: for more information. + ---------- Footnotes ---------- + + (1) Of course, you can always continue to use a version of 'gawk' +that still supports MPFR mode. It simply will be unmaintained. + File: gawk.info, Node: FP Math Caution, Next: Arbitrary Precision Integers, Prev: MPFR features, Up: Arbitrary Precision Arithmetic @@ -35341,7 +35366,7 @@ Index * + (plus sign), += operator <1>: Precedence. (line 94) * , (comma), in range patterns: Ranges. (line 6) * - (hyphen), file names beginning with: Options. (line 63) -* - (hyphen), -- end of options marker: Options. (line 347) +* - (hyphen), -- end of options marker: Options. (line 353) * - (hyphen), in bracket expressions: Bracket Expressions. (line 25) * - (hyphen), -= operator: Assignment Ops. (line 129) * - (hyphen), -- operator: Increment Ops. (line 48) @@ -35377,21 +35402,21 @@ Index * --include option: Options. (line 180) * --lint option: Command Line. (line 20) * --lint option <1>: Options. (line 215) -* --lint-old option: Options. (line 337) +* --lint-old option: Options. (line 343) * --load option: Options. (line 203) -* --no-optimize option: Options. (line 322) -* --non-decimal-data option: Options. (line 248) +* --no-optimize option: Options. (line 328) +* --non-decimal-data option: Options. (line 254) * --non-decimal-data option <1>: Nondecimal Data. (line 6) * --non-decimal-data option, strtonum() function and: Nondecimal Data. (line 35) -* --optimize option: Options. (line 273) -* --posix option: Options. (line 295) -* --posix option, --traditional option and: Options. (line 310) -* --pretty-print option: Options. (line 262) -* --profile option: Options. (line 283) +* --optimize option: Options. (line 279) +* --posix option: Options. (line 301) +* --posix option, --traditional option and: Options. (line 316) +* --pretty-print option: Options. (line 268) +* --profile option: Options. (line 289) * --profile option <1>: Profiling. (line 12) -* --re-interval option: Options. (line 316) -* --sandbox option: Options. (line 327) +* --re-interval option: Options. (line 322) +* --sandbox option: Options. (line 333) * --sandbox option, input redirection with getline: Getline. (line 19) * --sandbox option, output redirection with print, printf: Redirection. (line 6) @@ -35400,9 +35425,9 @@ Index * --source option: Options. (line 120) * --trace option: Options. (line 197) * --traditional option: Options. (line 85) -* --traditional option, --posix option and: Options. (line 310) -* --use-lc-numeric option: Options. (line 257) -* --version option: Options. (line 342) +* --traditional option, --posix option and: Options. (line 316) +* --use-lc-numeric option: Options. (line 263) +* --version option: Options. (line 348) * -b option: Options. (line 72) * -c option: Options. (line 85) * -C option: Options. (line 92) @@ -35410,12 +35435,12 @@ Index * -D option: Options. (line 111) * -e option: Options. (line 120) * -E option: Options. (line 146) -* -e option <1>: Options. (line 383) +* -e option <1>: Options. (line 389) * -f option: Long. (line 12) * -F option: Options. (line 21) * -f option <1>: Options. (line 25) -* -F option, -Ft sets FS to TAB: Options. (line 355) -* -f option, multiple uses: Options. (line 360) +* -F option, -Ft sets FS to TAB: Options. (line 361) +* -f option, multiple uses: Options. (line 366) * -F option, command-line: Command Line Field Separator. (line 6) * -g option: Options. (line 168) @@ -35424,19 +35449,19 @@ Index * -I option: Options. (line 197) * -l option: Options. (line 203) * -l option <1>: Options. (line 215) -* -L option: Options. (line 337) +* -L option: Options. (line 343) * -M option: Options. (line 242) -* -n option: Options. (line 248) -* -N option: Options. (line 257) -* -o option: Options. (line 262) -* -O option: Options. (line 273) -* -p option: Options. (line 283) -* -P option: Options. (line 295) -* -r option: Options. (line 316) -* -s option: Options. (line 322) -* -S option: Options. (line 327) +* -n option: Options. (line 254) +* -N option: Options. (line 263) +* -o option: Options. (line 268) +* -O option: Options. (line 279) +* -p option: Options. (line 289) +* -P option: Options. (line 301) +* -r option: Options. (line 322) +* -s option: Options. (line 328) +* -S option: Options. (line 333) * -v option: Options. (line 36) -* -V option: Options. (line 342) +* -V option: Options. (line 348) * -v option <1>: Assignment Options. (line 12) * -W option: Options. (line 50) * . (period), regexp operator: Regexp Operator Details. @@ -35672,7 +35697,7 @@ Index * arguments, command-line <1>: Auto-set. (line 15) * arguments, command-line <2>: ARGC and ARGV. (line 6) * arguments, processing: Getopt Function. (line 6) -* ARGV array: Options. (line 327) +* ARGV array: Options. (line 333) * ARGV array, indexing into: Other Arguments. (line 21) * arithmetic operators: Arithmetic Ops. (line 6) * array manipulation in extensions: Array Manipulation. (line 6) @@ -35796,7 +35821,7 @@ Index * awk, uses for <1>: Getting Started. (line 12) * awk, uses for <2>: When. (line 6) * awk, invoking: Command Line. (line 6) -* awk, profiling, enabling: Options. (line 283) +* awk, profiling, enabling: Options. (line 289) * awk, implementations, limits: Getline Notes. (line 14) * awk, implementation issues, pipes: Redirection. (line 129) * awk, new vs. old, OFMT variable: Strings And Numbers. (line 56) @@ -36246,7 +36271,7 @@ Index * cosine: Numeric Functions. (line 15) * counting words, lines, characters, and bytes: Wc Program. (line 6) * csh utility: Statements/Lines. (line 45) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 404) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 410) * csh utility, |& operator, comparison with: Two-way I/O. (line 27) * CSV (comma separated values) data, parsing with FPAT: Splitting By Content. (line 20) @@ -36480,7 +36505,7 @@ Index * debugging, example session: Sample Debugging Session. (line 6) * debugging gawk, bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 307) +* decimal point character, locale specific: Options. (line 313) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott: Acknowledgments. (line 60) @@ -36677,7 +36702,7 @@ Index * endpwent() user-defined function: Passwd Functions. (line 210) * English, Steve: Advanced Features. (line 6) * ENVIRON array: Auto-set. (line 59) -* environment variables, POSIXLY_CORRECT: Options. (line 389) +* environment variables, POSIXLY_CORRECT: Options. (line 395) * environment variables, used by gawk: Environment Variables. (line 6) * environment variables, AWKPATH: AWKPATH Variable. (line 6) @@ -36970,7 +36995,7 @@ Index * Free Software Foundation (FSF) <3>: Glossary. (line 403) * FreeBSD: Glossary. (line 747) * FS variable, --field-separator option and: Options. (line 21) -* FS variable, TAB character as: Options. (line 304) +* FS variable, TAB character as: Options. (line 310) * FS variable: Field Separators. (line 15) * FS variable, changing value of: Field Separators. (line 34) * FS variable, containing ^: Regexp Field Splitting. @@ -37045,8 +37070,8 @@ Index * gawk, uses for: Preface. (line 34) * gawk, awk and <1>: This Manual. (line 14) * gawk, newlines in: Statements/Lines. (line 12) -* gawk, extensions, disabling: Options. (line 295) -* gawk, version of, printing information about: Options. (line 342) +* gawk, extensions, disabling: Options. (line 301) +* gawk, version of, printing information about: Options. (line 348) * gawk, ARGIND variable in: Other Arguments. (line 21) * gawk, PROCINFO array in: Other Arguments. (line 21) * gawk, escape sequences: Escape Sequences. (line 120) @@ -37251,13 +37276,13 @@ Index * help debugger command: Miscellaneous Debugger Commands. (line 67) * hexadecimal numbers: Nondecimal-numbers. (line 6) -* hexadecimal values, enabling interpretation of: Options. (line 248) +* hexadecimal values, enabling interpretation of: Options. (line 254) * history expansion, in debugger: Readline Support. (line 6) * histsort.awk program: History Sorting. (line 25) * Hughes, Phil: Acknowledgments. (line 43) * HUP signal, for dynamic profiling: Profiling. (line 217) * hyphen (-), file names beginning with: Options. (line 63) -* hyphen (-), -- end of options marker: Options. (line 347) +* hyphen (-), -- end of options marker: Options. (line 353) * hyphen (-), in bracket expressions: Bracket Expressions. (line 25) * hyphen (-), -= operator: Assignment Ops. (line 129) * hyphen (-), -- operator: Increment Ops. (line 48) @@ -37481,7 +37506,7 @@ Index * lint checking, empty programs: Command Line. (line 16) * lint checking, issuing warnings: Options. (line 215) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 389) + (line 395) * lint checking: User-modified. (line 90) * lint checking, array subscripts: Uninitialized Subscripts. (line 43) @@ -37500,7 +37525,7 @@ Index * local variables, in a function: Variable Scope. (line 6) * local variables, show in debugger: Debugger Info. (line 34) * locale categories: Explaining gettext. (line 81) -* locale decimal point character: Options. (line 307) +* locale decimal point character: Options. (line 313) * locale, definition of: Locales. (line 6) * log: Numeric Functions. (line 28) * log files, timestamps in: Time Functions. (line 6) @@ -37619,7 +37644,7 @@ Index * networks, support for: Special Network. (line 6) * networks, programming: TCP/IP Networking. (line 6) * newlines: Statements/Lines. (line 6) -* newlines <1>: Options. (line 301) +* newlines <1>: Options. (line 307) * newlines, in dynamic regexps: Computed Regexps. (line 60) * newlines, in regexp constants: Computed Regexps. (line 70) * newlines, as record separators: awk split records. (line 12) @@ -37696,7 +37721,7 @@ Index * o debugger command (alias for option): Debugger Info. (line 57) * obsolete features: Obsolete. (line 6) * octal numbers: Nondecimal-numbers. (line 6) -* octal values, enabling interpretation of: Options. (line 248) +* octal values, enabling interpretation of: Options. (line 254) * OFMT variable: OFMT. (line 15) * OFMT variable, POSIX awk and: OFMT. (line 27) * OFMT variable <1>: Strings And Numbers. (line 56) @@ -37827,7 +37852,7 @@ Index * portability, #! (executable scripts): Executable Scripts. (line 29) * portability, ARGV variable: Executable Scripts. (line 55) * portability, backslash continuation and: Statements/Lines. (line 30) -* portability, POSIXLY_CORRECT environment variable: Options. (line 409) +* portability, POSIXLY_CORRECT environment variable: Options. (line 415) * portability: Escape Sequences. (line 103) * portability, backslash in escape sequences: Escape Sequences. (line 108) @@ -37903,8 +37928,8 @@ Index * POSIX awk, date utility and: Time Functions. (line 254) * POSIX awk, function keyword in: Definition Syntax. (line 99) * POSIX awk, changes in awk versions: POSIX. (line 6) -* POSIX mode: Options. (line 295) -* POSIX mode <1>: Options. (line 389) +* POSIX mode: Options. (line 301) +* POSIX mode <1>: Options. (line 395) * POSIX mode <2>: Regexp Operator Details. (line 47) * POSIX mode <3>: Input Summary. (line 69) @@ -37924,7 +37949,7 @@ Index * POSIX mode <12>: POSIX Floating Point Problems. (line 83) * POSIX mode <13>: Feature History. (line 315) -* POSIXLY_CORRECT environment variable: Options. (line 389) +* POSIXLY_CORRECT environment variable: Options. (line 395) * PREC variable: User-modified. (line 126) * precedence, regexp operators: Regexp Operator Details. (line 137) @@ -37936,7 +37961,7 @@ Index * predefined variables, conveying information: Auto-set. (line 6) * pretty printer, interaction with namespaces: Namespace And Features. (line 9) -* pretty printing: Options. (line 260) +* pretty printing: Options. (line 266) * pretty printing <1>: Profiling. (line 228) * pretty printing, profiling, difference with: Profiling. (line 235) * print debugger command: Viewing And Changing Data. @@ -38108,7 +38133,7 @@ Index (line 149) * register loadable extension: Registration Functions. (line 6) -* regular expressions, interval expressions and: Options. (line 316) +* regular expressions, interval expressions and: Options. (line 322) * regular expressions: Regexp. (line 6) * regular expressions, as patterns: Regexp Usage. (line 6) * regular expressions, operators: Regexp Usage. (line 19) @@ -38210,7 +38235,7 @@ Index (line 68) * sample debugging session: Sample Debugging Session. (line 6) -* sandbox mode: Options. (line 327) +* sandbox mode: Options. (line 333) * save debugger options: Debugger Info. (line 85) * scalar or array: Type Functions. (line 11) * scalar values: Basic Data Typing. (line 13) @@ -38570,7 +38595,7 @@ Index * treating files, as single records: gawk split records. (line 104) * troubleshooting, typographical errors, global variables: Options. (line 102) -* troubleshooting, --non-decimal-data option: Options. (line 248) +* troubleshooting, --non-decimal-data option: Options. (line 254) * troubleshooting, backslash before nonspecial character: Escape Sequences. (line 108) * troubleshooting, regexp constants vs. string constants: Computed Regexps. @@ -38758,7 +38783,7 @@ Index (line 13) * while statement, use of regexps in: Regexp Usage. (line 19) * while statement: While Statement. (line 6) -* whitespace, newlines as: Options. (line 301) +* whitespace, newlines as: Options. (line 307) * whitespace, definition of: Fields. (line 6) * whitespace, as field separators: Default Field Splitting. (line 6) @@ -38834,572 +38859,573 @@ Node: Intro Summary118202 Node: Invoking Gawk119086 Node: Command Line120600 Node: Options121398 -Ref: Options-Footnote-1139252 -Ref: Options-Footnote-2139483 -Node: Other Arguments139508 -Node: Naming Standard Input143519 -Node: Environment Variables144729 -Node: AWKPATH Variable145287 -Ref: AWKPATH Variable-Footnote-1148699 -Ref: AWKPATH Variable-Footnote-2148733 -Node: AWKLIBPATH Variable149104 -Ref: AWKLIBPATH Variable-Footnote-1150801 -Node: Other Environment Variables151176 -Node: Exit Status155128 -Node: Include Files155805 -Node: Loading Shared Libraries159495 -Node: Obsolete160923 -Node: Undocumented161615 -Node: Invoking Summary161912 -Node: Regexp164753 -Node: Regexp Usage166207 -Node: Escape Sequences168244 -Node: Regexp Operators174486 -Node: Regexp Operator Details174971 -Ref: Regexp Operator Details-Footnote-1182335 -Node: Interval Expressions182482 -Ref: Interval Expressions-Footnote-1184657 -Node: Bracket Expressions184755 -Ref: table-char-classes187231 -Node: Leftmost Longest190558 -Node: Computed Regexps191861 -Node: GNU Regexp Operators195288 -Node: Case-sensitivity198966 -Ref: Case-sensitivity-Footnote-1201832 -Ref: Case-sensitivity-Footnote-2202067 -Node: Regexp Summary202175 -Node: Reading Files203641 -Node: Records205910 -Node: awk split records206985 -Node: gawk split records211685 -Ref: gawk split records-Footnote-1216759 -Node: Fields216796 -Node: Nonconstant Fields219537 -Ref: Nonconstant Fields-Footnote-1221773 -Node: Changing Fields221977 -Node: Field Separators228008 -Node: Default Field Splitting230706 -Node: Regexp Field Splitting231824 -Node: Single Character Fields235501 -Node: Command Line Field Separator236561 -Node: Full Line Fields239779 -Ref: Full Line Fields-Footnote-1241301 -Ref: Full Line Fields-Footnote-2241347 -Node: Field Splitting Summary241448 -Node: Constant Size243522 -Node: Fixed width data244254 -Node: Skipping intervening247721 -Node: Allowing trailing data248519 -Node: Fields with fixed data249556 -Node: Splitting By Content251074 -Ref: Splitting By Content-Footnote-1254910 -Node: More CSV255073 -Node: FS versus FPAT256688 -Node: Testing field creation257848 -Node: Multiple Line259473 -Node: Getline265750 -Node: Plain Getline268219 -Node: Getline/Variable270792 -Node: Getline/File271943 -Node: Getline/Variable/File273331 -Ref: Getline/Variable/File-Footnote-1274936 -Node: Getline/Pipe275024 -Node: Getline/Variable/Pipe277728 -Node: Getline/Coprocess278863 -Node: Getline/Variable/Coprocess280130 -Node: Getline Notes280872 -Node: Getline Summary283669 -Ref: table-getline-variants284093 -Node: Read Timeout284842 -Ref: Read Timeout-Footnote-1288758 -Node: Retrying Input288816 -Node: Command-line directories290015 -Node: Input Summary290921 -Node: Input Exercises294093 -Node: Printing294527 -Node: Print296361 -Node: Print Examples297818 -Node: Output Separators300598 -Node: OFMT302615 -Node: Printf303971 -Node: Basic Printf304756 -Node: Control Letters306330 -Node: Format Modifiers311492 -Node: Printf Examples317507 -Node: Redirection319993 -Node: Special FD326834 -Ref: Special FD-Footnote-1330002 -Node: Special Files330076 -Node: Other Inherited Files330693 -Node: Special Network331694 -Node: Special Caveats332554 -Node: Close Files And Pipes333503 -Ref: table-close-pipe-return-values340410 -Ref: Close Files And Pipes-Footnote-1341224 -Ref: Close Files And Pipes-Footnote-2341372 -Node: Nonfatal341524 -Node: Output Summary343862 -Node: Output Exercises345084 -Node: Expressions345763 -Node: Values346951 -Node: Constants347629 -Node: Scalar Constants348320 -Ref: Scalar Constants-Footnote-1350830 -Node: Nondecimal-numbers351080 -Node: Regexp Constants354081 -Node: Using Constant Regexps354607 -Node: Standard Regexp Constants355229 -Node: Strong Regexp Constants358417 -Node: Variables362132 -Node: Using Variables362789 -Node: Assignment Options364699 -Node: Conversion367170 -Node: Strings And Numbers367694 -Ref: Strings And Numbers-Footnote-1370757 -Node: Locale influences conversions370866 -Ref: table-locale-affects373624 -Node: All Operators374243 -Node: Arithmetic Ops374872 -Node: Concatenation377588 -Ref: Concatenation-Footnote-1380435 -Node: Assignment Ops380542 -Ref: table-assign-ops385533 -Node: Increment Ops386847 -Node: Truth Values and Conditions390307 -Node: Truth Values391381 -Node: Typing and Comparison392429 -Node: Variable Typing393249 -Ref: Variable Typing-Footnote-1399712 -Ref: Variable Typing-Footnote-2399784 -Node: Comparison Operators399861 -Ref: table-relational-ops400280 -Node: POSIX String Comparison403776 -Ref: POSIX String Comparison-Footnote-1405471 -Ref: POSIX String Comparison-Footnote-2405610 -Node: Boolean Ops405694 -Ref: Boolean Ops-Footnote-1410176 -Node: Conditional Exp410268 -Node: Function Calls412004 -Node: Precedence415881 -Node: Locales419540 -Node: Expressions Summary421172 -Node: Patterns and Actions423745 -Node: Pattern Overview424865 -Node: Regexp Patterns426542 -Node: Expression Patterns427084 -Node: Ranges430865 -Node: BEGIN/END433973 -Node: Using BEGIN/END434734 -Ref: Using BEGIN/END-Footnote-1437488 -Node: I/O And BEGIN/END437594 -Node: BEGINFILE/ENDFILE439907 -Node: Empty443138 -Node: Using Shell Variables443455 -Node: Action Overview445729 -Node: Statements448054 -Node: If Statement449902 -Node: While Statement451397 -Node: Do Statement453425 -Node: For Statement454573 -Node: Switch Statement457828 -Node: Break Statement460269 -Node: Continue Statement462361 -Node: Next Statement464188 -Node: Nextfile Statement466571 -Node: Exit Statement469260 -Node: Built-in Variables471663 -Node: User-modified472796 -Node: Auto-set480563 -Ref: Auto-set-Footnote-1497370 -Ref: Auto-set-Footnote-2497576 -Node: ARGC and ARGV497632 -Node: Pattern Action Summary501845 -Node: Arrays504275 -Node: Array Basics505604 -Node: Array Intro506448 -Ref: figure-array-elements508423 -Ref: Array Intro-Footnote-1511128 -Node: Reference to Elements511256 -Node: Assigning Elements513720 -Node: Array Example514211 -Node: Scanning an Array516165 -Node: Controlling Scanning519187 -Ref: Controlling Scanning-Footnote-1525643 -Node: Numeric Array Subscripts525959 -Node: Uninitialized Subscripts528143 -Node: Delete529762 -Ref: Delete-Footnote-1532514 -Node: Multidimensional532571 -Node: Multiscanning535666 -Node: Arrays of Arrays537257 -Node: Arrays Summary542025 -Node: Functions544118 -Node: Built-in545156 -Node: Calling Built-in546309 -Node: Boolean Functions548305 -Node: Numeric Functions548859 -Ref: Numeric Functions-Footnote-1552886 -Ref: Numeric Functions-Footnote-2553534 -Ref: Numeric Functions-Footnote-3553582 -Node: String Functions553854 -Ref: String Functions-Footnote-1578696 -Ref: String Functions-Footnote-2578824 -Ref: String Functions-Footnote-3579072 -Node: Gory Details579159 -Ref: table-sub-escapes580950 -Ref: table-sub-proposed582470 -Ref: table-posix-sub583834 -Ref: table-gensub-escapes585376 -Ref: Gory Details-Footnote-1586200 -Node: I/O Functions586354 -Ref: table-system-return-values592808 -Ref: I/O Functions-Footnote-1594889 -Ref: I/O Functions-Footnote-2595037 -Node: Time Functions595157 -Ref: Time Functions-Footnote-1605828 -Ref: Time Functions-Footnote-2605896 -Ref: Time Functions-Footnote-3606054 -Ref: Time Functions-Footnote-4606165 -Ref: Time Functions-Footnote-5606277 -Ref: Time Functions-Footnote-6606504 -Node: Bitwise Functions606770 -Ref: table-bitwise-ops607364 -Ref: Bitwise Functions-Footnote-1613428 -Ref: Bitwise Functions-Footnote-2613601 -Node: Type Functions613792 -Node: I18N Functions617212 -Node: User-defined618863 -Node: Definition Syntax619675 -Ref: Definition Syntax-Footnote-1625369 -Node: Function Example625440 -Ref: Function Example-Footnote-1628362 -Node: Function Calling628384 -Node: Calling A Function628972 -Node: Variable Scope629930 -Node: Pass By Value/Reference632924 -Node: Function Caveats635568 -Ref: Function Caveats-Footnote-1637615 -Node: Return Statement637735 -Node: Dynamic Typing640714 -Node: Indirect Calls641644 -Node: Functions Summary652571 -Node: Library Functions655276 -Ref: Library Functions-Footnote-1658883 -Ref: Library Functions-Footnote-2659026 -Node: Library Names659197 -Ref: Library Names-Footnote-1662864 -Ref: Library Names-Footnote-2663087 -Node: General Functions663173 -Node: Strtonum Function664355 -Node: Assert Function667377 -Node: Round Function670703 -Node: Cliff Random Function672243 -Node: Ordinal Functions673259 -Ref: Ordinal Functions-Footnote-1676322 -Ref: Ordinal Functions-Footnote-2676574 -Node: Join Function676784 -Ref: Join Function-Footnote-1678554 -Node: Getlocaltime Function678754 -Node: Readfile Function682496 -Node: Shell Quoting684473 -Node: Isnumeric Function685901 -Node: Data File Management687289 -Node: Filetrans Function687921 -Node: Rewind Function692017 -Node: File Checking693926 -Ref: File Checking-Footnote-1695260 -Node: Empty Files695461 -Node: Ignoring Assigns697440 -Node: Getopt Function698990 -Ref: Getopt Function-Footnote-1714287 -Node: Passwd Functions714487 -Ref: Passwd Functions-Footnote-1723326 -Node: Group Functions723414 -Ref: Group Functions-Footnote-1731312 -Node: Walking Arrays731519 -Node: Library Functions Summary734527 -Node: Library Exercises735933 -Node: Sample Programs736398 -Node: Running Examples737168 -Node: Clones737896 -Node: Cut Program739120 -Node: Egrep Program749260 -Node: Id Program758261 -Node: Split Program768196 -Ref: Split Program-Footnote-1778089 -Node: Tee Program778262 -Node: Uniq Program781052 -Node: Wc Program788640 -Node: Bytes vs. Characters789027 -Node: Using extensions790575 -Node: wc program791329 -Node: Miscellaneous Programs796194 -Node: Dupword Program797407 -Node: Alarm Program799437 -Node: Translate Program804292 -Ref: Translate Program-Footnote-1808857 -Node: Labels Program809127 -Ref: Labels Program-Footnote-1812478 -Node: Word Sorting812562 -Node: History Sorting816634 -Node: Extract Program818859 -Node: Simple Sed826872 -Node: Igawk Program829946 -Ref: Igawk Program-Footnote-1844277 -Ref: Igawk Program-Footnote-2844479 -Ref: Igawk Program-Footnote-3844601 -Node: Anagram Program844716 -Node: Signature Program847778 -Node: Programs Summary849025 -Node: Programs Exercises850239 -Ref: Programs Exercises-Footnote-1854369 -Node: Advanced Features854455 -Node: Nondecimal Data856586 -Node: Boolean Typed Values858184 -Node: Array Sorting860065 -Node: Controlling Array Traversal860770 -Ref: Controlling Array Traversal-Footnote-1869138 -Node: Array Sorting Functions869256 -Ref: Array Sorting Functions-Footnote-1875167 -Node: Two-way I/O875363 -Ref: Two-way I/O-Footnote-1883089 -Ref: Two-way I/O-Footnote-2883276 -Node: TCP/IP Networking883358 -Node: Profiling886434 -Node: Extension Philosophy895743 -Node: Advanced Features Summary897222 -Node: Internationalization899237 -Node: I18N and L10N900911 -Node: Explaining gettext901598 -Ref: Explaining gettext-Footnote-1907490 -Ref: Explaining gettext-Footnote-2907675 -Node: Programmer i18n907840 -Ref: Programmer i18n-Footnote-1912789 -Node: Translator i18n912838 -Node: String Extraction913632 -Ref: String Extraction-Footnote-1914764 -Node: Printf Ordering914850 -Ref: Printf Ordering-Footnote-1917636 -Node: I18N Portability917700 -Ref: I18N Portability-Footnote-1920156 -Node: I18N Example920219 -Ref: I18N Example-Footnote-1923494 -Ref: I18N Example-Footnote-2923567 -Node: Gawk I18N923676 -Node: I18N Summary924298 -Node: Debugger925639 -Node: Debugging926639 -Node: Debugging Concepts927080 -Node: Debugging Terms928889 -Node: Awk Debugging931464 -Ref: Awk Debugging-Footnote-1932409 -Node: Sample Debugging Session932541 -Node: Debugger Invocation933075 -Node: Finding The Bug934461 -Node: List of Debugger Commands940935 -Node: Breakpoint Control942268 -Node: Debugger Execution Control945962 -Node: Viewing And Changing Data949324 -Node: Execution Stack952865 -Node: Debugger Info954502 -Node: Miscellaneous Debugger Commands958573 -Node: Readline Support963635 -Node: Limitations964531 -Node: Debugging Summary967085 -Node: Namespaces968364 -Node: Global Namespace969475 -Node: Qualified Names970873 -Node: Default Namespace971872 -Node: Changing The Namespace972613 -Node: Naming Rules974227 -Node: Internal Name Management976075 -Node: Namespace Example977117 -Node: Namespace And Features979679 -Node: Namespace Summary981114 -Node: Arbitrary Precision Arithmetic982591 -Node: Computer Arithmetic984078 -Ref: table-numeric-ranges987844 -Ref: table-floating-point-ranges988338 -Ref: Computer Arithmetic-Footnote-1988997 -Node: Math Definitions989054 -Ref: table-ieee-formats992030 -Node: MPFR features992598 -Node: FP Math Caution994316 -Ref: FP Math Caution-Footnote-1995388 -Node: Inexactness of computations995757 -Node: Inexact representation996788 -Node: Comparing FP Values998148 -Node: Errors accumulate999389 -Node: Strange values1000845 -Ref: Strange values-Footnote-11003433 -Node: Getting Accuracy1003538 -Node: Try To Round1006248 -Node: Setting precision1007147 -Ref: table-predefined-precision-strings1007844 -Node: Setting the rounding mode1009675 -Ref: table-gawk-rounding-modes1010049 -Ref: Setting the rounding mode-Footnote-11013981 -Node: Arbitrary Precision Integers1014160 -Ref: Arbitrary Precision Integers-Footnote-11017335 -Node: Checking for MPFR1017484 -Node: POSIX Floating Point Problems1018958 -Ref: POSIX Floating Point Problems-Footnote-11023611 -Node: Floating point summary1023649 -Node: Dynamic Extensions1025839 -Node: Extension Intro1027392 -Node: Plugin License1028658 -Node: Extension Mechanism Outline1029455 -Ref: figure-load-extension1029894 -Ref: figure-register-new-function1031460 -Ref: figure-call-new-function1032553 -Node: Extension API Description1034616 -Node: Extension API Functions Introduction1036329 -Ref: table-api-std-headers1038165 -Node: General Data Types1042415 -Ref: General Data Types-Footnote-11051121 -Node: Memory Allocation Functions1051420 -Ref: Memory Allocation Functions-Footnote-11055921 -Node: Constructor Functions1056020 -Node: API Ownership of MPFR and GMP Values1059673 -Node: Registration Functions1061206 -Node: Extension Functions1061906 -Node: Exit Callback Functions1067228 -Node: Extension Version String1068478 -Node: Input Parsers1069141 -Node: Output Wrappers1081862 -Node: Two-way processors1086374 -Node: Printing Messages1088639 -Ref: Printing Messages-Footnote-11089810 -Node: Updating ERRNO1089963 -Node: Requesting Values1090702 -Ref: table-value-types-returned1091439 -Node: Accessing Parameters1092548 -Node: Symbol Table Access1093785 -Node: Symbol table by name1094297 -Ref: Symbol table by name-Footnote-11097322 -Node: Symbol table by cookie1097450 -Ref: Symbol table by cookie-Footnote-11101635 -Node: Cached values1101699 -Ref: Cached values-Footnote-11105235 -Node: Array Manipulation1105388 -Ref: Array Manipulation-Footnote-11106479 -Node: Array Data Types1106516 -Ref: Array Data Types-Footnote-11109174 -Node: Array Functions1109266 -Node: Flattening Arrays1113764 -Node: Creating Arrays1120740 -Node: Redirection API1125507 -Node: Extension API Variables1128340 -Node: Extension Versioning1129051 -Ref: gawk-api-version1129480 -Node: Extension GMP/MPFR Versioning1131212 -Node: Extension API Informational Variables1132840 -Node: Extension API Boilerplate1133913 -Node: Changes from API V11137887 -Node: Finding Extensions1139459 -Node: Extension Example1140018 -Node: Internal File Description1140816 -Node: Internal File Ops1144896 -Ref: Internal File Ops-Footnote-11156246 -Node: Using Internal File Ops1156386 -Ref: Using Internal File Ops-Footnote-11158769 -Node: Extension Samples1159043 -Node: Extension Sample File Functions1160572 -Node: Extension Sample Fnmatch1168221 -Node: Extension Sample Fork1169708 -Node: Extension Sample Inplace1170926 -Node: Extension Sample Ord1174552 -Node: Extension Sample Readdir1175388 -Ref: table-readdir-file-types1176277 -Node: Extension Sample Revout1177345 -Node: Extension Sample Rev2way1177934 -Node: Extension Sample Read write array1178674 -Node: Extension Sample Readfile1181839 -Node: Extension Sample Time1182934 -Node: Extension Sample API Tests1184686 -Node: gawkextlib1185178 -Node: Extension summary1188096 -Node: Extension Exercises1191798 -Node: Language History1193040 -Node: V7/SVR3.11194696 -Node: SVR41196848 -Node: POSIX1198282 -Node: BTL1199663 -Node: POSIX/GNU1200392 -Node: Feature History1206170 -Node: Common Extensions1223345 -Node: Ranges and Locales1224628 -Ref: Ranges and Locales-Footnote-11229244 -Ref: Ranges and Locales-Footnote-21229271 -Ref: Ranges and Locales-Footnote-31229506 -Node: Contributors1229729 -Node: History summary1235726 -Node: Installation1237106 -Node: Gawk Distribution1238050 -Node: Getting1238534 -Node: Extracting1239497 -Node: Distribution contents1241135 -Node: Unix Installation1248196 -Node: Quick Installation1249000 -Node: Compiling with MPFR1251420 -Node: Shell Startup Files1252110 -Node: Additional Configuration Options1253199 -Node: Configuration Philosophy1255514 -Node: Compiling from Git1257910 -Node: Building the Documentation1258465 -Node: Non-Unix Installation1259849 -Node: PC Installation1260309 -Node: PC Binary Installation1261147 -Node: PC Compiling1262020 -Node: PC Using1263137 -Node: Cygwin1266690 -Node: MSYS1267914 -Node: VMS Installation1268516 -Node: VMS Compilation1269235 -Ref: VMS Compilation-Footnote-11270464 -Node: VMS Dynamic Extensions1270522 -Node: VMS Installation Details1272207 -Node: VMS Running1274469 -Node: VMS GNV1278748 -Node: Bugs1279462 -Node: Bug definition1280374 -Node: Bug address1283310 -Node: Usenet1286498 -Node: Performance bugs1287687 -Node: Asking for help1290608 -Node: Maintainers1292575 -Node: Other Versions1293769 -Node: Installation summary1301933 -Node: Notes1303297 -Node: Compatibility Mode1304091 -Node: Additions1304873 -Node: Accessing The Source1305798 -Node: Adding Code1307235 -Node: New Ports1314050 -Node: Derived Files1318425 -Ref: Derived Files-Footnote-11324085 -Ref: Derived Files-Footnote-21324120 -Ref: Derived Files-Footnote-31324718 -Node: Future Extensions1324832 -Node: Implementation Limitations1325490 -Node: Extension Design1326700 -Node: Old Extension Problems1327844 -Ref: Old Extension Problems-Footnote-11329362 -Node: Extension New Mechanism Goals1329419 -Ref: Extension New Mechanism Goals-Footnote-11332783 -Node: Extension Other Design Decisions1332972 -Node: Extension Future Growth1335085 -Node: Notes summary1335691 -Node: Basic Concepts1336849 -Node: Basic High Level1337530 -Ref: figure-general-flow1337812 -Ref: figure-process-flow1338498 -Ref: Basic High Level-Footnote-11341800 -Node: Basic Data Typing1341985 -Node: Glossary1345313 -Node: Copying1377200 -Node: GNU Free Documentation License1414743 -Node: Index1439863 +Ref: Options-Footnote-1139582 +Ref: Options-Footnote-2139813 +Node: Other Arguments139838 +Node: Naming Standard Input143849 +Node: Environment Variables145059 +Node: AWKPATH Variable145617 +Ref: AWKPATH Variable-Footnote-1149029 +Ref: AWKPATH Variable-Footnote-2149063 +Node: AWKLIBPATH Variable149434 +Ref: AWKLIBPATH Variable-Footnote-1151131 +Node: Other Environment Variables151506 +Node: Exit Status155594 +Node: Include Files156271 +Node: Loading Shared Libraries159961 +Node: Obsolete161389 +Node: Undocumented162081 +Node: Invoking Summary162378 +Node: Regexp165219 +Node: Regexp Usage166673 +Node: Escape Sequences168710 +Node: Regexp Operators174952 +Node: Regexp Operator Details175437 +Ref: Regexp Operator Details-Footnote-1182801 +Node: Interval Expressions182948 +Ref: Interval Expressions-Footnote-1185123 +Node: Bracket Expressions185221 +Ref: table-char-classes187697 +Node: Leftmost Longest191024 +Node: Computed Regexps192327 +Node: GNU Regexp Operators195754 +Node: Case-sensitivity199432 +Ref: Case-sensitivity-Footnote-1202298 +Ref: Case-sensitivity-Footnote-2202533 +Node: Regexp Summary202641 +Node: Reading Files204107 +Node: Records206376 +Node: awk split records207451 +Node: gawk split records212151 +Ref: gawk split records-Footnote-1217225 +Node: Fields217262 +Node: Nonconstant Fields220003 +Ref: Nonconstant Fields-Footnote-1222239 +Node: Changing Fields222443 +Node: Field Separators228474 +Node: Default Field Splitting231172 +Node: Regexp Field Splitting232290 +Node: Single Character Fields235967 +Node: Command Line Field Separator237027 +Node: Full Line Fields240245 +Ref: Full Line Fields-Footnote-1241767 +Ref: Full Line Fields-Footnote-2241813 +Node: Field Splitting Summary241914 +Node: Constant Size243988 +Node: Fixed width data244720 +Node: Skipping intervening248187 +Node: Allowing trailing data248985 +Node: Fields with fixed data250022 +Node: Splitting By Content251540 +Ref: Splitting By Content-Footnote-1255376 +Node: More CSV255539 +Node: FS versus FPAT257154 +Node: Testing field creation258314 +Node: Multiple Line259939 +Node: Getline266216 +Node: Plain Getline268685 +Node: Getline/Variable271258 +Node: Getline/File272409 +Node: Getline/Variable/File273797 +Ref: Getline/Variable/File-Footnote-1275402 +Node: Getline/Pipe275490 +Node: Getline/Variable/Pipe278194 +Node: Getline/Coprocess279329 +Node: Getline/Variable/Coprocess280596 +Node: Getline Notes281338 +Node: Getline Summary284135 +Ref: table-getline-variants284559 +Node: Read Timeout285308 +Ref: Read Timeout-Footnote-1289224 +Node: Retrying Input289282 +Node: Command-line directories290481 +Node: Input Summary291387 +Node: Input Exercises294559 +Node: Printing294993 +Node: Print296827 +Node: Print Examples298284 +Node: Output Separators301064 +Node: OFMT303081 +Node: Printf304437 +Node: Basic Printf305222 +Node: Control Letters306796 +Node: Format Modifiers311958 +Node: Printf Examples317973 +Node: Redirection320459 +Node: Special FD327300 +Ref: Special FD-Footnote-1330468 +Node: Special Files330542 +Node: Other Inherited Files331159 +Node: Special Network332160 +Node: Special Caveats333020 +Node: Close Files And Pipes333969 +Ref: table-close-pipe-return-values340876 +Ref: Close Files And Pipes-Footnote-1341690 +Ref: Close Files And Pipes-Footnote-2341838 +Node: Nonfatal341990 +Node: Output Summary344328 +Node: Output Exercises345550 +Node: Expressions346229 +Node: Values347417 +Node: Constants348095 +Node: Scalar Constants348786 +Ref: Scalar Constants-Footnote-1351296 +Node: Nondecimal-numbers351546 +Node: Regexp Constants354547 +Node: Using Constant Regexps355073 +Node: Standard Regexp Constants355695 +Node: Strong Regexp Constants358883 +Node: Variables362598 +Node: Using Variables363255 +Node: Assignment Options365165 +Node: Conversion367636 +Node: Strings And Numbers368160 +Ref: Strings And Numbers-Footnote-1371223 +Node: Locale influences conversions371332 +Ref: table-locale-affects374090 +Node: All Operators374709 +Node: Arithmetic Ops375338 +Node: Concatenation378054 +Ref: Concatenation-Footnote-1380901 +Node: Assignment Ops381008 +Ref: table-assign-ops385999 +Node: Increment Ops387313 +Node: Truth Values and Conditions390773 +Node: Truth Values391847 +Node: Typing and Comparison392895 +Node: Variable Typing393715 +Ref: Variable Typing-Footnote-1400178 +Ref: Variable Typing-Footnote-2400250 +Node: Comparison Operators400327 +Ref: table-relational-ops400746 +Node: POSIX String Comparison404242 +Ref: POSIX String Comparison-Footnote-1405937 +Ref: POSIX String Comparison-Footnote-2406076 +Node: Boolean Ops406160 +Ref: Boolean Ops-Footnote-1410642 +Node: Conditional Exp410734 +Node: Function Calls412470 +Node: Precedence416347 +Node: Locales420006 +Node: Expressions Summary421638 +Node: Patterns and Actions424211 +Node: Pattern Overview425331 +Node: Regexp Patterns427008 +Node: Expression Patterns427550 +Node: Ranges431331 +Node: BEGIN/END434439 +Node: Using BEGIN/END435200 +Ref: Using BEGIN/END-Footnote-1437954 +Node: I/O And BEGIN/END438060 +Node: BEGINFILE/ENDFILE440373 +Node: Empty443604 +Node: Using Shell Variables443921 +Node: Action Overview446195 +Node: Statements448520 +Node: If Statement450368 +Node: While Statement451863 +Node: Do Statement453891 +Node: For Statement455039 +Node: Switch Statement458294 +Node: Break Statement460735 +Node: Continue Statement462827 +Node: Next Statement464654 +Node: Nextfile Statement467037 +Node: Exit Statement469726 +Node: Built-in Variables472129 +Node: User-modified473262 +Node: Auto-set481029 +Ref: Auto-set-Footnote-1497836 +Ref: Auto-set-Footnote-2498042 +Node: ARGC and ARGV498098 +Node: Pattern Action Summary502311 +Node: Arrays504741 +Node: Array Basics506070 +Node: Array Intro506914 +Ref: figure-array-elements508889 +Ref: Array Intro-Footnote-1511594 +Node: Reference to Elements511722 +Node: Assigning Elements514186 +Node: Array Example514677 +Node: Scanning an Array516631 +Node: Controlling Scanning519653 +Ref: Controlling Scanning-Footnote-1526109 +Node: Numeric Array Subscripts526425 +Node: Uninitialized Subscripts528609 +Node: Delete530228 +Ref: Delete-Footnote-1532980 +Node: Multidimensional533037 +Node: Multiscanning536132 +Node: Arrays of Arrays537723 +Node: Arrays Summary542491 +Node: Functions544584 +Node: Built-in545622 +Node: Calling Built-in546775 +Node: Boolean Functions548771 +Node: Numeric Functions549325 +Ref: Numeric Functions-Footnote-1553352 +Ref: Numeric Functions-Footnote-2554000 +Ref: Numeric Functions-Footnote-3554048 +Node: String Functions554320 +Ref: String Functions-Footnote-1579162 +Ref: String Functions-Footnote-2579290 +Ref: String Functions-Footnote-3579538 +Node: Gory Details579625 +Ref: table-sub-escapes581416 +Ref: table-sub-proposed582936 +Ref: table-posix-sub584300 +Ref: table-gensub-escapes585842 +Ref: Gory Details-Footnote-1586666 +Node: I/O Functions586820 +Ref: table-system-return-values593274 +Ref: I/O Functions-Footnote-1595355 +Ref: I/O Functions-Footnote-2595503 +Node: Time Functions595623 +Ref: Time Functions-Footnote-1606294 +Ref: Time Functions-Footnote-2606362 +Ref: Time Functions-Footnote-3606520 +Ref: Time Functions-Footnote-4606631 +Ref: Time Functions-Footnote-5606743 +Ref: Time Functions-Footnote-6606970 +Node: Bitwise Functions607236 +Ref: table-bitwise-ops607830 +Ref: Bitwise Functions-Footnote-1613894 +Ref: Bitwise Functions-Footnote-2614067 +Node: Type Functions614258 +Node: I18N Functions617678 +Node: User-defined619329 +Node: Definition Syntax620141 +Ref: Definition Syntax-Footnote-1625835 +Node: Function Example625906 +Ref: Function Example-Footnote-1628828 +Node: Function Calling628850 +Node: Calling A Function629438 +Node: Variable Scope630396 +Node: Pass By Value/Reference633390 +Node: Function Caveats636034 +Ref: Function Caveats-Footnote-1638081 +Node: Return Statement638201 +Node: Dynamic Typing641180 +Node: Indirect Calls642110 +Node: Functions Summary653037 +Node: Library Functions655742 +Ref: Library Functions-Footnote-1659349 +Ref: Library Functions-Footnote-2659492 +Node: Library Names659663 +Ref: Library Names-Footnote-1663330 +Ref: Library Names-Footnote-2663553 +Node: General Functions663639 +Node: Strtonum Function664821 +Node: Assert Function667843 +Node: Round Function671169 +Node: Cliff Random Function672709 +Node: Ordinal Functions673725 +Ref: Ordinal Functions-Footnote-1676788 +Ref: Ordinal Functions-Footnote-2677040 +Node: Join Function677250 +Ref: Join Function-Footnote-1679020 +Node: Getlocaltime Function679220 +Node: Readfile Function682962 +Node: Shell Quoting684939 +Node: Isnumeric Function686367 +Node: Data File Management687755 +Node: Filetrans Function688387 +Node: Rewind Function692483 +Node: File Checking694392 +Ref: File Checking-Footnote-1695726 +Node: Empty Files695927 +Node: Ignoring Assigns697906 +Node: Getopt Function699456 +Ref: Getopt Function-Footnote-1714753 +Node: Passwd Functions714953 +Ref: Passwd Functions-Footnote-1723792 +Node: Group Functions723880 +Ref: Group Functions-Footnote-1731778 +Node: Walking Arrays731985 +Node: Library Functions Summary734993 +Node: Library Exercises736399 +Node: Sample Programs736864 +Node: Running Examples737634 +Node: Clones738362 +Node: Cut Program739586 +Node: Egrep Program749726 +Node: Id Program758727 +Node: Split Program768662 +Ref: Split Program-Footnote-1778555 +Node: Tee Program778728 +Node: Uniq Program781518 +Node: Wc Program789106 +Node: Bytes vs. Characters789493 +Node: Using extensions791041 +Node: wc program791795 +Node: Miscellaneous Programs796660 +Node: Dupword Program797873 +Node: Alarm Program799903 +Node: Translate Program804758 +Ref: Translate Program-Footnote-1809323 +Node: Labels Program809593 +Ref: Labels Program-Footnote-1812944 +Node: Word Sorting813028 +Node: History Sorting817100 +Node: Extract Program819325 +Node: Simple Sed827338 +Node: Igawk Program830412 +Ref: Igawk Program-Footnote-1844743 +Ref: Igawk Program-Footnote-2844945 +Ref: Igawk Program-Footnote-3845067 +Node: Anagram Program845182 +Node: Signature Program848244 +Node: Programs Summary849491 +Node: Programs Exercises850705 +Ref: Programs Exercises-Footnote-1854835 +Node: Advanced Features854921 +Node: Nondecimal Data857052 +Node: Boolean Typed Values858650 +Node: Array Sorting860531 +Node: Controlling Array Traversal861236 +Ref: Controlling Array Traversal-Footnote-1869604 +Node: Array Sorting Functions869722 +Ref: Array Sorting Functions-Footnote-1875633 +Node: Two-way I/O875829 +Ref: Two-way I/O-Footnote-1883555 +Ref: Two-way I/O-Footnote-2883742 +Node: TCP/IP Networking883824 +Node: Profiling886900 +Node: Extension Philosophy896209 +Node: Advanced Features Summary897688 +Node: Internationalization899703 +Node: I18N and L10N901377 +Node: Explaining gettext902064 +Ref: Explaining gettext-Footnote-1907956 +Ref: Explaining gettext-Footnote-2908141 +Node: Programmer i18n908306 +Ref: Programmer i18n-Footnote-1913255 +Node: Translator i18n913304 +Node: String Extraction914098 +Ref: String Extraction-Footnote-1915230 +Node: Printf Ordering915316 +Ref: Printf Ordering-Footnote-1918102 +Node: I18N Portability918166 +Ref: I18N Portability-Footnote-1920622 +Node: I18N Example920685 +Ref: I18N Example-Footnote-1923960 +Ref: I18N Example-Footnote-2924033 +Node: Gawk I18N924142 +Node: I18N Summary924764 +Node: Debugger926105 +Node: Debugging927105 +Node: Debugging Concepts927546 +Node: Debugging Terms929355 +Node: Awk Debugging931930 +Ref: Awk Debugging-Footnote-1932875 +Node: Sample Debugging Session933007 +Node: Debugger Invocation933541 +Node: Finding The Bug934927 +Node: List of Debugger Commands941401 +Node: Breakpoint Control942734 +Node: Debugger Execution Control946428 +Node: Viewing And Changing Data949790 +Node: Execution Stack953331 +Node: Debugger Info954968 +Node: Miscellaneous Debugger Commands959039 +Node: Readline Support964101 +Node: Limitations964997 +Node: Debugging Summary967551 +Node: Namespaces968830 +Node: Global Namespace969941 +Node: Qualified Names971339 +Node: Default Namespace972338 +Node: Changing The Namespace973079 +Node: Naming Rules974693 +Node: Internal Name Management976541 +Node: Namespace Example977583 +Node: Namespace And Features980145 +Node: Namespace Summary981580 +Node: Arbitrary Precision Arithmetic983057 +Node: Computer Arithmetic984544 +Ref: table-numeric-ranges988310 +Ref: table-floating-point-ranges988804 +Ref: Computer Arithmetic-Footnote-1989463 +Node: Math Definitions989520 +Ref: table-ieee-formats992496 +Node: MPFR features993064 +Ref: MPFR features-Footnote-1995292 +Node: FP Math Caution995426 +Ref: FP Math Caution-Footnote-1996498 +Node: Inexactness of computations996867 +Node: Inexact representation997898 +Node: Comparing FP Values999258 +Node: Errors accumulate1000499 +Node: Strange values1001955 +Ref: Strange values-Footnote-11004543 +Node: Getting Accuracy1004648 +Node: Try To Round1007358 +Node: Setting precision1008257 +Ref: table-predefined-precision-strings1008954 +Node: Setting the rounding mode1010785 +Ref: table-gawk-rounding-modes1011159 +Ref: Setting the rounding mode-Footnote-11015091 +Node: Arbitrary Precision Integers1015270 +Ref: Arbitrary Precision Integers-Footnote-11018445 +Node: Checking for MPFR1018594 +Node: POSIX Floating Point Problems1020068 +Ref: POSIX Floating Point Problems-Footnote-11024721 +Node: Floating point summary1024759 +Node: Dynamic Extensions1026949 +Node: Extension Intro1028502 +Node: Plugin License1029768 +Node: Extension Mechanism Outline1030565 +Ref: figure-load-extension1031004 +Ref: figure-register-new-function1032570 +Ref: figure-call-new-function1033663 +Node: Extension API Description1035726 +Node: Extension API Functions Introduction1037439 +Ref: table-api-std-headers1039275 +Node: General Data Types1043525 +Ref: General Data Types-Footnote-11052231 +Node: Memory Allocation Functions1052530 +Ref: Memory Allocation Functions-Footnote-11057031 +Node: Constructor Functions1057130 +Node: API Ownership of MPFR and GMP Values1060783 +Node: Registration Functions1062316 +Node: Extension Functions1063016 +Node: Exit Callback Functions1068338 +Node: Extension Version String1069588 +Node: Input Parsers1070251 +Node: Output Wrappers1082972 +Node: Two-way processors1087484 +Node: Printing Messages1089749 +Ref: Printing Messages-Footnote-11090920 +Node: Updating ERRNO1091073 +Node: Requesting Values1091812 +Ref: table-value-types-returned1092549 +Node: Accessing Parameters1093658 +Node: Symbol Table Access1094895 +Node: Symbol table by name1095407 +Ref: Symbol table by name-Footnote-11098432 +Node: Symbol table by cookie1098560 +Ref: Symbol table by cookie-Footnote-11102745 +Node: Cached values1102809 +Ref: Cached values-Footnote-11106345 +Node: Array Manipulation1106498 +Ref: Array Manipulation-Footnote-11107589 +Node: Array Data Types1107626 +Ref: Array Data Types-Footnote-11110284 +Node: Array Functions1110376 +Node: Flattening Arrays1114874 +Node: Creating Arrays1121850 +Node: Redirection API1126617 +Node: Extension API Variables1129450 +Node: Extension Versioning1130161 +Ref: gawk-api-version1130590 +Node: Extension GMP/MPFR Versioning1132322 +Node: Extension API Informational Variables1133950 +Node: Extension API Boilerplate1135023 +Node: Changes from API V11138997 +Node: Finding Extensions1140569 +Node: Extension Example1141128 +Node: Internal File Description1141926 +Node: Internal File Ops1146006 +Ref: Internal File Ops-Footnote-11157356 +Node: Using Internal File Ops1157496 +Ref: Using Internal File Ops-Footnote-11159879 +Node: Extension Samples1160153 +Node: Extension Sample File Functions1161682 +Node: Extension Sample Fnmatch1169331 +Node: Extension Sample Fork1170818 +Node: Extension Sample Inplace1172036 +Node: Extension Sample Ord1175662 +Node: Extension Sample Readdir1176498 +Ref: table-readdir-file-types1177387 +Node: Extension Sample Revout1178455 +Node: Extension Sample Rev2way1179044 +Node: Extension Sample Read write array1179784 +Node: Extension Sample Readfile1182949 +Node: Extension Sample Time1184044 +Node: Extension Sample API Tests1185796 +Node: gawkextlib1186288 +Node: Extension summary1189206 +Node: Extension Exercises1192908 +Node: Language History1194150 +Node: V7/SVR3.11195806 +Node: SVR41197958 +Node: POSIX1199392 +Node: BTL1200773 +Node: POSIX/GNU1201502 +Node: Feature History1207280 +Node: Common Extensions1224455 +Node: Ranges and Locales1225738 +Ref: Ranges and Locales-Footnote-11230354 +Ref: Ranges and Locales-Footnote-21230381 +Ref: Ranges and Locales-Footnote-31230616 +Node: Contributors1230839 +Node: History summary1236836 +Node: Installation1238216 +Node: Gawk Distribution1239160 +Node: Getting1239644 +Node: Extracting1240607 +Node: Distribution contents1242245 +Node: Unix Installation1249306 +Node: Quick Installation1250110 +Node: Compiling with MPFR1252530 +Node: Shell Startup Files1253220 +Node: Additional Configuration Options1254309 +Node: Configuration Philosophy1256624 +Node: Compiling from Git1259020 +Node: Building the Documentation1259575 +Node: Non-Unix Installation1260959 +Node: PC Installation1261419 +Node: PC Binary Installation1262257 +Node: PC Compiling1263130 +Node: PC Using1264247 +Node: Cygwin1267800 +Node: MSYS1269024 +Node: VMS Installation1269626 +Node: VMS Compilation1270345 +Ref: VMS Compilation-Footnote-11271574 +Node: VMS Dynamic Extensions1271632 +Node: VMS Installation Details1273317 +Node: VMS Running1275579 +Node: VMS GNV1279858 +Node: Bugs1280572 +Node: Bug definition1281484 +Node: Bug address1284420 +Node: Usenet1287608 +Node: Performance bugs1288797 +Node: Asking for help1291718 +Node: Maintainers1293685 +Node: Other Versions1294879 +Node: Installation summary1303043 +Node: Notes1304407 +Node: Compatibility Mode1305201 +Node: Additions1305983 +Node: Accessing The Source1306908 +Node: Adding Code1308345 +Node: New Ports1315160 +Node: Derived Files1319535 +Ref: Derived Files-Footnote-11325195 +Ref: Derived Files-Footnote-21325230 +Ref: Derived Files-Footnote-31325828 +Node: Future Extensions1325942 +Node: Implementation Limitations1326600 +Node: Extension Design1327810 +Node: Old Extension Problems1328954 +Ref: Old Extension Problems-Footnote-11330472 +Node: Extension New Mechanism Goals1330529 +Ref: Extension New Mechanism Goals-Footnote-11333893 +Node: Extension Other Design Decisions1334082 +Node: Extension Future Growth1336195 +Node: Notes summary1336801 +Node: Basic Concepts1337959 +Node: Basic High Level1338640 +Ref: figure-general-flow1338922 +Ref: figure-process-flow1339608 +Ref: Basic High Level-Footnote-11342910 +Node: Basic Data Typing1343095 +Node: Glossary1346423 +Node: Copying1378310 +Node: GNU Free Documentation License1415853 +Node: Index1440973 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 7da59ad2..2d0e7f16 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4195,6 +4195,13 @@ Select arbitrary-precision arithmetic on numbers. This option has no effect if @command{gawk} is not compiled to use the GNU MPFR and MP libraries (@pxref{Arbitrary Precision Arithmetic}). +As of @value{PVERSION} 5.2, +the arbitrary precision arithmetic features in @command{gawk} +are @emph{deprecated}. They will be removed from @command{gawk} in 2024. +If you use this option, @command{gawk} generates a warning message. +Create the environment variable @env{GAWK_NO_MPFR_WARN} with an arbitrary +value in order to silence the warning. + @item @option{-n} @itemx @option{--non-decimal-data} @cindex @option{-n} option @@ -4821,6 +4828,10 @@ in milliseconds. On systems that do not support the @code{usleep()} system call, the value is rounded up to an integral number of seconds. +@item GAWK_NO_MPFR_WARN +Specifies that @command{gawk} should not print a deprecation +warning when used with the @option{-M}/@option{--bignum} options. + @item GAWK_READ_TIMEOUT Specifies the time, in milliseconds, for @command{gawk} to wait for input before returning with an error. @@ -34151,6 +34162,21 @@ one extra bit of significand. @node MPFR features @section Arbitrary-Precision Arithmetic Features in @command{gawk} +@quotation WARNING +As of @value{PVERSION} 5.2, +arbitrary precision arithmetic in @command{gawk} +is @emph{deprecated}. It will be removed from @command{gawk} in 2024. + +MPFR support is deprecated because its inclusion was a mistake. It has +led to endless bug reports, misuse of the feature and public abuse of the +maintainer, for no real increased value. + +If you use this feature, you should start working now to find a different +toolset with which to accomplish your goals.@footnote{Of course, you can +always continue to use a version of @command{gawk} that still supports +MPFR mode. It simply will be unmaintained.} +@end quotation + By default, @command{gawk} uses the double-precision floating-point values supplied by the hardware of the system it runs on. However, if it was compiled to do so, and the @option{-M} command-line option is supplied, @@ -34161,8 +34187,8 @@ is available like so: @example $ @kbd{gawk --version} -@print{} GNU Awk 4.1.2, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2) -@print{} Copyright (C) 1989, 1991-2015 Free Software Foundation. +@print{} GNU Awk 5.2.0, API: 3.2 (GNU MPFR 4.0.2, GNU MP 6.2.0) +@print{} Copyright (C) 1989, 1991-2022 Free Software Foundation. @dots{} @end example diff --git a/doc/gawktexi.in b/doc/gawktexi.in index c249118b..b862af52 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4105,6 +4105,13 @@ Select arbitrary-precision arithmetic on numbers. This option has no effect if @command{gawk} is not compiled to use the GNU MPFR and MP libraries (@pxref{Arbitrary Precision Arithmetic}). +As of @value{PVERSION} 5.2, +the arbitrary precision arithmetic features in @command{gawk} +are @emph{deprecated}. They will be removed from @command{gawk} in 2024. +If you use this option, @command{gawk} generates a warning message. +Create the environment variable @env{GAWK_NO_MPFR_WARN} with an arbitrary +value in order to silence the warning. + @item @option{-n} @itemx @option{--non-decimal-data} @cindex @option{-n} option @@ -4687,6 +4694,10 @@ in milliseconds. On systems that do not support the @code{usleep()} system call, the value is rounded up to an integral number of seconds. +@item GAWK_NO_MPFR_WARN +Specifies that @command{gawk} should not print a deprecation +warning when used with the @option{-M}/@option{--bignum} options. + @item GAWK_READ_TIMEOUT Specifies the time, in milliseconds, for @command{gawk} to wait for input before returning with an error. @@ -33033,6 +33044,21 @@ one extra bit of significand. @node MPFR features @section Arbitrary-Precision Arithmetic Features in @command{gawk} +@quotation WARNING +As of @value{PVERSION} 5.2, +arbitrary precision arithmetic in @command{gawk} +is @emph{deprecated}. It will be removed from @command{gawk} in 2024. + +MPFR support is deprecated because its inclusion was a mistake. It has +led to endless bug reports, misuse of the feature and public abuse of the +maintainer, for no real increased value. + +If you use this feature, you should start working now to find a different +toolset with which to accomplish your goals.@footnote{Of course, you can +always continue to use a version of @command{gawk} that still supports +MPFR mode. It simply will be unmaintained.} +@end quotation + By default, @command{gawk} uses the double-precision floating-point values supplied by the hardware of the system it runs on. However, if it was compiled to do so, and the @option{-M} command-line option is supplied, @@ -33043,8 +33069,8 @@ is available like so: @example $ @kbd{gawk --version} -@print{} GNU Awk 4.1.2, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2) -@print{} Copyright (C) 1989, 1991-2015 Free Software Foundation. +@print{} GNU Awk 5.2.0, API: 3.2 (GNU MPFR 4.0.2, GNU MP 6.2.0) +@print{} Copyright (C) 1989, 1991-2022 Free Software Foundation. @dots{} @end example @@ -66,6 +66,7 @@ static void catchstackoverflow(int emergency, stackoverflow_context_t scp); #endif static void nostalgia(void) ATTRIBUTE_NORETURN; static void version(void) ATTRIBUTE_NORETURN; +static void deprecate_mpfr(void); static void init_fds(void); static void init_groupset(void); static void save_argv(int, char **); @@ -1686,6 +1687,7 @@ parse_args(int argc, char **argv) #else warning(_("-M ignored: MPFR/GMP support not compiled in")); #endif + deprecate_mpfr(); break; case 'P': @@ -1853,3 +1855,22 @@ set_current_namespace(const char *new_namespace) current_namespace = new_namespace; } + +/* deprecate_mpfr --- print long info about MPFR being deprecated */ + +static void +deprecate_mpfr(void) +{ + static bool first = true; + + if (first) { + first = false; + if (getenv("GAWK_NO_MPFR_WARN") != NULL) + return; + + warning(_("MPFR mode is deprecated!")); + warning(_("It will be removed in the gawk release of 2024.")); + warning(_("For more information, see https://.......")); + warning(_("Use `export GAWK_NO_MPFR_WARN=1' to disable this warning.")); + } +} diff --git a/pc/ChangeLog b/pc/ChangeLog index 8bf18232..b1af1ca2 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2022-05-03 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst.prologue: Add GAWK_NO_MPFR_WARN=1. + 2022-04-28 Arnold D. Robbins <arnold@skeeve.com> * Makefile.tst: Regenerated. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index dc3b6d55..e5ca6d9a 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -60,7 +60,7 @@ SHELL = /bin/sh # Point to gawk -AWK = AWKLIBPATH=../extension $(AWKPROG) +AWK = AWKLIBPATH=../extension GAWK_NO_MPFR_WARN=1 $(AWKPROG) AWKPROG = ../gawk.exe # Point $(LS) to a version of ls.exe that reports true Windows file # index numbers, because this is what the readdir test expects. diff --git a/pc/Makefile.tst.prologue b/pc/Makefile.tst.prologue index b04bb0a5..664c9134 100644 --- a/pc/Makefile.tst.prologue +++ b/pc/Makefile.tst.prologue @@ -60,7 +60,7 @@ SHELL = /bin/sh # Point to gawk -AWK = AWKLIBPATH=../extension $(AWKPROG) +AWK = AWKLIBPATH=../extension GAWK_NO_MPFR_WARN=1 $(AWKPROG) AWKPROG = ../gawk.exe # Point $(LS) to a version of ls.exe that reports true Windows file # index numbers, because this is what the readdir test expects. diff --git a/test/ChangeLog b/test/ChangeLog index c57a0d50..6a5fa600 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2022-05-03 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (AWK): Add GAWK_NO_MPFR_WARN=1 to the list. + 2022-04-28 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (EXTRA_DIST): symtab12, new test. diff --git a/test/Makefile.am b/test/Makefile.am index c7937405..af7f289f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1646,7 +1646,7 @@ VALGRIND = # # And we set AWKLIBPATH to find the extension libraries we built. LOCALES = LANGUAGE= LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} -AWK = $(LOCALES) AWKLIBPATH=../extension/.libs $(VALGRIND) $(AWKPROG) $(GAWK_TEST_ARGS) +AWK = $(LOCALES) AWKLIBPATH=../extension/.libs GAWK_NO_MPFR_WARN=1 $(VALGRIND) $(AWKPROG) $(GAWK_TEST_ARGS) # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid diff --git a/test/Makefile.in b/test/Makefile.in index f1c1423b..3f10d09d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -161,7 +161,7 @@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AWK = $(LOCALES) AWKLIBPATH=../extension/.libs $(VALGRIND) $(AWKPROG) $(GAWK_TEST_ARGS) +AWK = $(LOCALES) AWKLIBPATH=../extension/.libs GAWK_NO_MPFR_WARN=1 $(VALGRIND) $(AWKPROG) $(GAWK_TEST_ARGS) CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ |