diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-14 21:27:35 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-14 21:27:35 +0200 |
commit | 6f16c4f468e6f3a6769509e1e70ff2dc4873e8d2 (patch) | |
tree | ff3e3cb737950b798cf2668f75cb81269ffaa6e7 | |
parent | 99e184df5e808dd4de24b3e41c724bf9b00b9bb4 (diff) | |
parent | fe85aef5cc3e31450c6850c996aa348a68c42ca7 (diff) | |
download | egawk-6f16c4f468e6f3a6769509e1e70ff2dc4873e8d2.tar.gz egawk-6f16c4f468e6f3a6769509e1e70ff2dc4873e8d2.tar.bz2 egawk-6f16c4f468e6f3a6769509e1e70ff2dc4873e8d2.zip |
Merge branch 'gawk-4.2-stable'
-rwxr-xr-x | ChangeLog | 6 | ||||
-rw-r--r-- | builtin.c | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 9 | ||||
-rw-r--r-- | doc/gawk.info | 1173 | ||||
-rw-r--r-- | doc/gawk.texi | 57 | ||||
-rw-r--r-- | doc/gawktexi.in | 54 | ||||
-rw-r--r-- | mpfr.c | 4 |
7 files changed, 688 insertions, 619 deletions
@@ -3,6 +3,12 @@ * builtin.c (do_typeof): Fix memory leak when populating the optional array, and make sure to call the astore method. +2019-01-14 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (do_intdiv): Add unref of subscripts. + * mpfr.c (do_mpfr_intdiv): Ditto. + Thanks to Andy Schorr for noticing. + 2019-01-09 Andrew J. Schorr <aschorr@telemetry-investments.com> * awkgram.y (tokentab): Indicate that typeof may take 2 arguments. @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2018 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2019 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -4048,11 +4048,13 @@ do_intdiv(int nargs) lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = make_number((AWKNUM) quotient); + unref(sub); sub = make_string("remainder", 9); lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = make_number((AWKNUM) remainder); + unref(sub); DEREF(denominator); DEREF(numerator); diff --git a/doc/ChangeLog b/doc/ChangeLog index ef83d893..878e3982 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2019-01-14 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: More work on the indexing. + Document that `-f -' works to read source code from stdin. + +2019-01-13 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Work on the indexing. + 2019-01-11 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (I18N Example): $LC_MESSAGES is involved here diff --git a/doc/gawk.info b/doc/gawk.info index 6ecfd8a1..b55ef0bb 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2947,7 +2947,9 @@ Here, 'awk' first reads 'file1', then it reads the output of SOME_COMMAND, and finally it reads 'file2'. You may also use '"-"' to name standard input when reading files with -'getline' (*note Getline/File::). +'getline' (*note Getline/File::). And, you can even use '"-"' with the +'-f' option to read program source code from standard input (*note +Options::). In addition, 'gawk' allows you to specify the special file name '/dev/stdin', both on the command line and with 'getline'. Some other @@ -33549,7 +33551,7 @@ Index * - (hyphen), -- operator <1>: Precedence. (line 45) * - (hyphen), -= operator: Assignment Ops. (line 129) * - (hyphen), -= operator <1>: Precedence. (line 94) -* - (hyphen), filenames beginning with: Options. (line 64) +* - (hyphen), file names beginning with: Options. (line 64) * - (hyphen), in bracket expressions: Bracket Expressions. (line 25) * --assign option: Options. (line 36) * --bignum option: Options. (line 229) @@ -33866,6 +33868,10 @@ Index (line 6) * array scanning order, controlling: Controlling Scanning. (line 14) +* array subscripts, null strings as: Uninitialized Subscripts. + (line 43) +* array subscripts, numbers as: Numeric Array Subscripts. + (line 6) * array, number of elements: String Functions. (line 201) * arrays: Arrays. (line 6) * arrays of arrays: Arrays of Arrays. (line 6) @@ -33924,7 +33930,7 @@ Index * assignment operators: Assignment Ops. (line 6) * assignment operators, evaluation order: Assignment Ops. (line 110) * assignment operators, lvalues/rvalues: Assignment Ops. (line 31) -* assignments as filenames: Ignoring Assigns. (line 6) +* assignments as file names: Ignoring Assigns. (line 6) * associative arrays: Array Intro. (line 48) * asterisk (*), * operator, as multiplication operator: Precedence. (line 54) @@ -34673,9 +34679,13 @@ Index (line 26) * differences in awk and gawk, retrying input: Retrying Input. (line 6) -* differences in awk and gawk, RS/RT variables: gawk split records. +* differences in awk and gawk, RS/RT variables: awk split records. + (line 131) +* differences in awk and gawk, RS/RT variables <1>: gawk split records. (line 58) -* differences in awk and gawk, RS/RT variables <1>: Auto-set. (line 348) +* differences in awk and gawk, RS/RT variables <2>: Multiple Line. + (line 130) +* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 348) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -34903,6 +34913,8 @@ Index * field numbers: Nonconstant Fields. (line 6) * field operator $: Fields. (line 19) * field operators, dollar sign as: Fields. (line 19) +* field separator, backslash (\) as: Command Line Field Separator. + (line 24) * field separator, in multiline records: Multiple Line. (line 41) * field separator, on command line: Command Line Field Separator. (line 6) @@ -34918,6 +34930,8 @@ Index (line 6) * field separators, See Also OFS: Changing Fields. (line 64) * field separators, spaces as: Cut Program. (line 103) +* field separators, whitespace as: Default Field Splitting. + (line 6) * fields: Reading Files. (line 14) * fields <1>: Fields. (line 6) * fields <2>: Basic High Level. (line 62) @@ -34936,13 +34950,13 @@ Index * FIELDWIDTHS variable <1>: User-modified. (line 37) * file descriptors: Special FD. (line 6) * file inclusion, @include directive: Include Files. (line 8) +* file names, assignments as: Ignoring Assigns. (line 6) * file names, distinguishing: Auto-set. (line 55) * file names, in compatibility mode: Special Caveats. (line 9) * file names, standard streams in gawk: Special FD. (line 48) * FILENAME variable: Reading Files. (line 6) * FILENAME variable <1>: Auto-set. (line 108) * FILENAME variable, getline, setting with: Getline Notes. (line 19) -* filenames, assignments as: Ignoring Assigns. (line 6) * files, .gmo: Explaining gettext. (line 42) * files, .gmo, specifying directory of: Explaining gettext. (line 54) * files, .gmo, specifying directory of <1>: Programmer i18n. (line 48) @@ -35002,9 +35016,9 @@ Index * flag variables: Boolean Ops. (line 69) * flag variables <1>: Tee Program. (line 20) * floating-point, numbers: Computer Arithmetic. (line 49) -* floating-point, numbers, arbitrary precision: Arbitrary Precision Arithmetic. +* floating-point, numbers, arbitrary-precision: Arbitrary Precision Arithmetic. (line 6) -* floating-point, numbers, arbitrary-precision: Computer Arithmetic. +* floating-point, numbers, arbitrary-precision <1>: Computer Arithmetic. (line 61) * floating-point, numbers, double-precision: Computer Arithmetic. (line 61) @@ -35054,11 +35068,11 @@ 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 291) * FS variable, changing value of: Field Separators. (line 34) * FS variable, running awk programs and: Cut Program. (line 63) * FS variable, setting from command line: Command Line Field Separator. (line 6) +* FS variable, TAB character as: Options. (line 291) * FS, containing ^: Regexp Field Splitting. (line 59) * FS, in multiline records: Multiple Line. (line 41) @@ -35195,8 +35209,9 @@ Index (line 6) * gawk, regular expressions, precedence: Regexp Operators. (line 161) * gawk, RT variable in: awk split records. (line 131) -* gawk, RT variable in <1>: Multiple Line. (line 130) -* gawk, RT variable in <2>: Auto-set. (line 348) +* gawk, RT variable in <1>: gawk split records. (line 58) +* gawk, RT variable in <2>: Multiple Line. (line 130) +* gawk, RT variable in <3>: Auto-set. (line 348) * gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Testing field creation. @@ -35333,7 +35348,7 @@ Index * hyphen (-), -- operator <1>: Precedence. (line 45) * hyphen (-), -= operator: Assignment Ops. (line 129) * hyphen (-), -= operator <1>: Precedence. (line 94) -* hyphen (-), filenames beginning with: Options. (line 64) +* hyphen (-), file names beginning with: Options. (line 64) * hyphen (-), in bracket expressions: Bracket Expressions. (line 25) * i debugger command (alias for info): Debugger Info. (line 13) * id utility: Id Program. (line 6) @@ -35448,7 +35463,7 @@ Index * Java implementation of awk: Other Versions. (line 121) * Java programming language: Glossary. (line 466) * jawk: Other Versions. (line 121) -* Jedi knights: Undocumented. (line 6) +* jedi knights: Undocumented. (line 6) * Johansen, Chris: Signature Program. (line 25) * join() user-defined function: Join Function. (line 18) * Kahrs, Ju"rgen: Acknowledgments. (line 60) @@ -35467,7 +35482,7 @@ Index * Kernighan, Brian <9>: Basic Data Typing. (line 54) * Kernighan, Brian <10>: Glossary. (line 204) * kill command, dynamic profiling: Profiling. (line 188) -* Knights, jedi: Undocumented. (line 6) +* knights, jedi: Undocumented. (line 6) * Kwok, Conrad: Contributors. (line 35) * l debugger command (alias for list): Miscellaneous Debugger Commands. (line 73) @@ -35584,12 +35599,11 @@ Index * mailing labels, printing: Labels Program. (line 6) * mailing list, GNITS: Acknowledgments. (line 52) * Malmberg, John: Acknowledgments. (line 60) -* Malmberg, John <1>: Maintainers. (line 14) -* Malmberg, John E.: Contributors. (line 140) +* Malmberg, John <1>: Contributors. (line 140) +* Malmberg, John <2>: Maintainers. (line 14) * mark parity: Ordinal Functions. (line 45) * marked string extraction (internationalization): String Extraction. (line 6) -* marked strings, extracting: String Extraction. (line 6) * Marx, Groucho: Increment Ops. (line 60) * match: String Functions. (line 211) * match regexp in string: String Functions. (line 211) @@ -35718,13 +35732,13 @@ Index (line 21) * null strings, deleting array elements and: Delete. (line 27) * null strings, matching: String Functions. (line 542) -* number as string of bits: Bitwise Functions. (line 109) * number of array elements: String Functions. (line 201) * number sign (#), #! (executable scripts): Executable Scripts. (line 6) * number sign (#), commenting: Comments. (line 6) * numbers, as array subscripts: Numeric Array Subscripts. (line 6) +* numbers, as string of bits: Bitwise Functions. (line 109) * numbers, as values of characters: Ordinal Functions. (line 6) * numbers, Cliff random: Cliff Random Function. (line 6) @@ -35777,8 +35791,8 @@ Index * operators, input/output <6>: Precedence. (line 64) * operators, input/output <7>: Precedence. (line 64) * operators, logical, See Boolean expressions: Boolean Ops. (line 6) -* operators, precedence: Increment Ops. (line 60) -* operators, precedence <1>: Precedence. (line 6) +* operators, precedence: Precedence. (line 6) +* operators, precedence of: Increment Ops. (line 60) * operators, relational, See operators, comparison: Typing and Comparison. (line 9) * operators, short-circuit: Boolean Ops. (line 59) @@ -35833,13 +35847,16 @@ Index * patsplit: String Functions. (line 297) * patterns: Patterns and Actions. (line 6) +* patterns, Boolean expressions as: Expression Patterns. (line 39) * patterns, comparison expressions as: Expression Patterns. (line 14) * patterns, counts, in a profile: Profiling. (line 118) * patterns, default: Very Simple. (line 35) * patterns, empty: Empty. (line 6) -* patterns, expressions as: Regexp Patterns. (line 6) +* patterns, expressions as: Expression Patterns. (line 6) * patterns, ranges in: Ranges. (line 6) * patterns, regexp constants as: Expression Patterns. (line 34) +* patterns, regular expressions as: Regexp Usage. (line 6) +* patterns, regular expressions as <1>: Regexp Patterns. (line 6) * patterns, types of: Pattern Overview. (line 15) * pawk (profiling version of Brian Kernighan's awk): Other Versions. (line 78) @@ -36040,6 +36057,7 @@ Index * programming languages, Ada: Glossary. (line 11) * programming languages, data-driven vs. procedural: Getting Started. (line 12) +* programming languages, Go: Other Versions. (line 113) * programming languages, Java: Glossary. (line 466) * programming, basic steps: Basic High Level. (line 18) * programming, concepts: Basic Concepts. (line 6) @@ -36059,9 +36077,9 @@ Index * quit debugger command: Miscellaneous Debugger Commands. (line 100) * QUIT signal (MS-Windows): Profiling. (line 214) -* quoting in gawk command lines: Long. (line 26) -* quoting in gawk command lines, tricks for: Quoting. (line 91) * quoting, for small awk programs: Comments. (line 27) +* quoting, in gawk command lines: Long. (line 26) +* quoting, in gawk command lines, tricks for: Quoting. (line 91) * r debugger command (alias for run): Debugger Execution Control. (line 62) * Rakitzis, Byron: History Sorting. (line 25) @@ -36094,6 +36112,7 @@ Index * record separators: awk split records. (line 6) * record separators <1>: User-modified. (line 136) * record separators, changing: awk split records. (line 85) +* record separators, newlines as: awk split records. (line 12) * record separators, regular expressions as: awk split records. (line 131) * record separators, with multiline records: Multiple Line. (line 10) @@ -36125,9 +36144,9 @@ Index * register extension: Registration Functions. (line 6) * regular expressions: Regexp. (line 6) -* regular expressions as field separators: Field Separators. (line 50) * regular expressions, anchors in: Regexp Operators. (line 22) -* regular expressions, as field separators: Regexp Field Splitting. +* regular expressions, as field separators: Field Separators. (line 50) +* regular expressions, as field separators <1>: Regexp Field Splitting. (line 6) * regular expressions, as patterns: Regexp Usage. (line 6) * regular expressions, as patterns <1>: Regexp Patterns. (line 6) @@ -36215,8 +36234,9 @@ Index * RSTART variable: Auto-set. (line 341) * RSTART variable, match() function and: String Functions. (line 228) * RT variable: awk split records. (line 131) -* RT variable <1>: Multiple Line. (line 130) -* RT variable <2>: Auto-set. (line 348) +* RT variable <1>: gawk split records. (line 58) +* RT variable <2>: Multiple Line. (line 130) +* RT variable <3>: Auto-set. (line 348) * Rubin, Paul: History. (line 30) * Rubin, Paul <1>: Contributors. (line 16) * rule, definition of: Getting Started. (line 21) @@ -36367,6 +36387,7 @@ Index * single quote ('), in shell commands: Quoting. (line 48) * single quote ('), vs. apostrophe: Comments. (line 27) * single quote ('), with double quotes: Quoting. (line 73) +* single records, treating files as: gawk split records. (line 92) * single-character fields: Single Character Fields. (line 6) * single-precision: Computer Arithmetic. (line 61) @@ -36410,7 +36431,6 @@ Index * split.awk program: Split Program. (line 30) * sprintf: OFMT. (line 15) * sprintf <1>: String Functions. (line 389) -* sprintf() function, OFMT variable and: User-modified. (line 116) * sprintf() function, print/printf statements and: Round Function. (line 6) * sqrt: Numeric Functions. (line 78) @@ -36641,6 +36661,8 @@ Index * users, information about, retrieving: Passwd Functions. (line 16) * USR1 signal, for dynamic profiling: Profiling. (line 188) * values, numeric: Basic Data Typing. (line 13) +* values, regexp: Strong Regexp Constants. + (line 24) * values, string: Basic Data Typing. (line 13) * variable assignments and input files: Other Arguments. (line 26) * variable type: Type Functions. (line 14) @@ -36663,8 +36685,8 @@ Index * variables, initializing: Using Variables. (line 23) * variables, local to a function: Variable Scope. (line 6) * variables, predefined: Built-in Variables. (line 6) -* variables, predefined -v option, setting with: Options. (line 45) -* variables, predefined conveying information: Auto-set. (line 6) +* variables, predefined, -v option, setting with: Options. (line 45) +* variables, predefined, conveying information: Auto-set. (line 6) * variables, private: Library Names. (line 11) * variables, setting: Options. (line 36) * variables, shadowing: Definition Syntax. (line 77) @@ -36706,7 +36728,6 @@ Index * wc.awk program: Wc Program. (line 46) * Weinberger, Peter: History. (line 17) * Weinberger, Peter <1>: Contributors. (line 12) -* where debugger command: Execution Stack. (line 13) * where debugger command (alias for backtrace): Execution Stack. (line 13) * while statement: While Statement. (line 6) @@ -36788,550 +36809,550 @@ Ref: Options-Footnote-1136351 Ref: Options-Footnote-2136582 Node: Other Arguments136607 Node: Naming Standard Input139554 -Node: Environment Variables140647 -Node: AWKPATH Variable141205 -Ref: AWKPATH Variable-Footnote-1144617 -Ref: AWKPATH Variable-Footnote-2144651 -Node: AWKLIBPATH Variable144912 -Node: Other Environment Variables146570 -Node: Exit Status150391 -Node: Include Files151068 -Node: Loading Shared Libraries154758 -Node: Obsolete156186 -Node: Undocumented156878 -Node: Invoking Summary157175 -Node: Regexp158835 -Node: Regexp Usage160289 -Node: Escape Sequences162326 -Node: Regexp Operators168558 -Ref: Regexp Operators-Footnote-1175974 -Ref: Regexp Operators-Footnote-2176121 -Node: Bracket Expressions176219 -Ref: table-char-classes178695 -Node: Leftmost Longest182021 -Node: Computed Regexps183324 -Node: GNU Regexp Operators186751 -Node: Case-sensitivity190430 -Ref: Case-sensitivity-Footnote-1193317 -Ref: Case-sensitivity-Footnote-2193552 -Node: Regexp Summary193660 -Node: Reading Files195126 -Node: Records197395 -Node: awk split records198470 -Node: gawk split records203745 -Ref: gawk split records-Footnote-1208331 -Node: Fields208368 -Node: Nonconstant Fields211109 -Ref: Nonconstant Fields-Footnote-1213345 -Node: Changing Fields213549 -Node: Field Separators219580 -Node: Default Field Splitting222278 -Node: Regexp Field Splitting223396 -Node: Single Character Fields226749 -Node: Command Line Field Separator227809 -Node: Full Line Fields231027 -Ref: Full Line Fields-Footnote-1232549 -Ref: Full Line Fields-Footnote-2232595 -Node: Field Splitting Summary232696 -Node: Constant Size234770 -Node: Fixed width data235502 -Node: Skipping intervening238969 -Node: Allowing trailing data239767 -Node: Fields with fixed data240804 -Node: Splitting By Content242322 -Ref: Splitting By Content-Footnote-1245972 -Node: Testing field creation246135 -Node: Multiple Line247760 -Ref: Multiple Line-Footnote-1253644 -Node: Getline253823 -Node: Plain Getline256292 -Node: Getline/Variable258933 -Node: Getline/File260084 -Node: Getline/Variable/File261472 -Ref: Getline/Variable/File-Footnote-1263077 -Node: Getline/Pipe263165 -Node: Getline/Variable/Pipe265872 -Node: Getline/Coprocess267007 -Node: Getline/Variable/Coprocess268274 -Node: Getline Notes269016 -Node: Getline Summary271813 -Ref: table-getline-variants272237 -Node: Read Timeout272985 -Ref: Read Timeout-Footnote-1276891 -Node: Retrying Input276949 -Node: Command-line directories278148 -Node: Input Summary279054 -Node: Input Exercises282226 -Node: Printing282954 -Node: Print284788 -Node: Print Examples286245 -Node: Output Separators289025 -Node: OFMT291042 -Node: Printf292398 -Node: Basic Printf293183 -Node: Control Letters294757 -Node: Format Modifiers299919 -Node: Printf Examples305934 -Node: Redirection308420 -Node: Special FD315261 -Ref: Special FD-Footnote-1318429 -Node: Special Files318503 -Node: Other Inherited Files319120 -Node: Special Network320121 -Node: Special Caveats320981 -Node: Close Files And Pipes321930 -Ref: table-close-pipe-return-values328837 -Ref: Close Files And Pipes-Footnote-1329650 -Ref: Close Files And Pipes-Footnote-2329798 -Node: Nonfatal329950 -Node: Output Summary332288 -Node: Output Exercises333510 -Node: Expressions334189 -Node: Values335377 -Node: Constants336055 -Node: Scalar Constants336746 -Ref: Scalar Constants-Footnote-1339271 -Node: Nondecimal-numbers339521 -Node: Regexp Constants342522 -Node: Using Constant Regexps343048 -Node: Standard Regexp Constants343670 -Node: Strong Regexp Constants346858 -Node: Variables349816 -Node: Using Variables350473 -Node: Assignment Options352383 -Node: Conversion354850 -Node: Strings And Numbers355374 -Ref: Strings And Numbers-Footnote-1358437 -Node: Locale influences conversions358546 -Ref: table-locale-affects361304 -Node: All Operators361922 -Node: Arithmetic Ops362551 -Node: Concatenation365057 -Ref: Concatenation-Footnote-1367904 -Node: Assignment Ops368011 -Ref: table-assign-ops373002 -Node: Increment Ops374315 -Node: Truth Values and Conditions377775 -Node: Truth Values378849 -Node: Typing and Comparison379897 -Node: Variable Typing380717 -Ref: Variable Typing-Footnote-1387180 -Ref: Variable Typing-Footnote-2387252 -Node: Comparison Operators387329 -Ref: table-relational-ops387748 -Node: POSIX String Comparison391243 -Ref: POSIX String Comparison-Footnote-1392938 -Ref: POSIX String Comparison-Footnote-2393077 -Node: Boolean Ops393161 -Ref: Boolean Ops-Footnote-1397643 -Node: Conditional Exp397735 -Node: Function Calls399471 -Node: Precedence403348 -Node: Locales407007 -Node: Expressions Summary408639 -Node: Patterns and Actions411212 -Node: Pattern Overview412332 -Node: Regexp Patterns414009 -Node: Expression Patterns414551 -Node: Ranges418332 -Node: BEGIN/END421440 -Node: Using BEGIN/END422201 -Ref: Using BEGIN/END-Footnote-1424937 -Node: I/O And BEGIN/END425043 -Node: BEGINFILE/ENDFILE427357 -Node: Empty430270 -Node: Using Shell Variables430587 -Node: Action Overview432861 -Node: Statements435186 -Node: If Statement437034 -Node: While Statement438529 -Node: Do Statement440557 -Node: For Statement441705 -Node: Switch Statement444876 -Node: Break Statement447262 -Node: Continue Statement449354 -Node: Next Statement451181 -Node: Nextfile Statement453564 -Node: Exit Statement456216 -Node: Built-in Variables458619 -Node: User-modified459752 -Node: Auto-set467519 -Ref: Auto-set-Footnote-1484326 -Ref: Auto-set-Footnote-2484532 -Node: ARGC and ARGV484588 -Node: Pattern Action Summary488801 -Node: Arrays491231 -Node: Array Basics492560 -Node: Array Intro493404 -Ref: figure-array-elements495379 -Ref: Array Intro-Footnote-1498083 -Node: Reference to Elements498211 -Node: Assigning Elements500675 -Node: Array Example501166 -Node: Scanning an Array502925 -Node: Controlling Scanning505947 -Ref: Controlling Scanning-Footnote-1511346 -Node: Numeric Array Subscripts511662 -Node: Uninitialized Subscripts513846 -Node: Delete515465 -Ref: Delete-Footnote-1518217 -Node: Multidimensional518274 -Node: Multiscanning521369 -Node: Arrays of Arrays522960 -Node: Arrays Summary527728 -Node: Functions529821 -Node: Built-in530859 -Node: Calling Built-in531940 -Node: Numeric Functions533936 -Ref: Numeric Functions-Footnote-1537964 -Ref: Numeric Functions-Footnote-2538321 -Ref: Numeric Functions-Footnote-3538369 -Node: String Functions538641 -Ref: String Functions-Footnote-1562499 -Ref: String Functions-Footnote-2562627 -Ref: String Functions-Footnote-3562875 -Node: Gory Details562962 -Ref: table-sub-escapes564753 -Ref: table-sub-proposed566272 -Ref: table-posix-sub567635 -Ref: table-gensub-escapes569176 -Ref: Gory Details-Footnote-1569999 -Node: I/O Functions570153 -Ref: table-system-return-values576621 -Ref: I/O Functions-Footnote-1578701 -Ref: I/O Functions-Footnote-2578849 -Node: Time Functions578969 -Ref: Time Functions-Footnote-1589640 -Ref: Time Functions-Footnote-2589708 -Ref: Time Functions-Footnote-3589866 -Ref: Time Functions-Footnote-4589977 -Ref: Time Functions-Footnote-5590089 -Ref: Time Functions-Footnote-6590316 -Node: Bitwise Functions590582 -Ref: table-bitwise-ops591176 -Ref: Bitwise Functions-Footnote-1597239 -Ref: Bitwise Functions-Footnote-2597412 -Node: Type Functions597603 -Node: I18N Functions600354 -Node: User-defined602005 -Node: Definition Syntax602810 -Ref: Definition Syntax-Footnote-1608497 -Node: Function Example608568 -Ref: Function Example-Footnote-1611490 -Node: Function Caveats611512 -Node: Calling A Function612030 -Node: Variable Scope612988 -Node: Pass By Value/Reference615982 -Node: Return Statement619481 -Node: Dynamic Typing622460 -Node: Indirect Calls623390 -Ref: Indirect Calls-Footnote-1633642 -Node: Functions Summary633770 -Node: Library Functions636475 -Ref: Library Functions-Footnote-1640082 -Ref: Library Functions-Footnote-2640225 -Node: Library Names640396 -Ref: Library Names-Footnote-1644063 -Ref: Library Names-Footnote-2644286 -Node: General Functions644372 -Node: Strtonum Function645475 -Node: Assert Function648497 -Node: Round Function651823 -Node: Cliff Random Function653363 -Node: Ordinal Functions654379 -Ref: Ordinal Functions-Footnote-1657442 -Ref: Ordinal Functions-Footnote-2657694 -Node: Join Function657904 -Ref: Join Function-Footnote-1659674 -Node: Getlocaltime Function659874 -Node: Readfile Function663616 -Node: Shell Quoting665593 -Node: Data File Management666994 -Node: Filetrans Function667626 -Node: Rewind Function671722 -Node: File Checking673632 -Ref: File Checking-Footnote-1674966 -Node: Empty Files675167 -Node: Ignoring Assigns677146 -Node: Getopt Function678696 -Ref: Getopt Function-Footnote-1690165 -Node: Passwd Functions690365 -Ref: Passwd Functions-Footnote-1699204 -Node: Group Functions699292 -Ref: Group Functions-Footnote-1707190 -Node: Walking Arrays707397 -Node: Library Functions Summary710405 -Node: Library Exercises711811 -Node: Sample Programs712276 -Node: Running Examples713046 -Node: Clones713774 -Node: Cut Program714998 -Node: Egrep Program724927 -Ref: Egrep Program-Footnote-1732439 -Node: Id Program732549 -Node: Split Program736229 -Ref: Split Program-Footnote-1739687 -Node: Tee Program739816 -Node: Uniq Program742606 -Node: Wc Program750227 -Ref: Wc Program-Footnote-1754482 -Node: Miscellaneous Programs754576 -Node: Dupword Program755789 -Node: Alarm Program757819 -Node: Translate Program762674 -Ref: Translate Program-Footnote-1767239 -Node: Labels Program767509 -Ref: Labels Program-Footnote-1770860 -Node: Word Sorting770944 -Node: History Sorting775016 -Node: Extract Program776851 -Node: Simple Sed784905 -Node: Igawk Program787979 -Ref: Igawk Program-Footnote-1802310 -Ref: Igawk Program-Footnote-2802512 -Ref: Igawk Program-Footnote-3802634 -Node: Anagram Program802749 -Node: Signature Program805811 -Node: Programs Summary807058 -Node: Programs Exercises808272 -Ref: Programs Exercises-Footnote-1812401 -Node: Advanced Features812492 -Node: Nondecimal Data814482 -Node: Array Sorting816073 -Node: Controlling Array Traversal816773 -Ref: Controlling Array Traversal-Footnote-1825141 -Node: Array Sorting Functions825259 -Ref: Array Sorting Functions-Footnote-1830350 -Node: Two-way I/O830546 -Ref: Two-way I/O-Footnote-1838267 -Ref: Two-way I/O-Footnote-2838454 -Node: TCP/IP Networking838536 -Node: Profiling841654 -Node: Advanced Features Summary850672 -Node: Internationalization852516 -Node: I18N and L10N853996 -Node: Explaining gettext854683 -Ref: Explaining gettext-Footnote-1860575 -Ref: Explaining gettext-Footnote-2860760 -Node: Programmer i18n860925 -Ref: Programmer i18n-Footnote-1865874 -Node: Translator i18n865923 -Node: String Extraction866717 -Ref: String Extraction-Footnote-1867849 -Node: Printf Ordering867935 -Ref: Printf Ordering-Footnote-1870721 -Node: I18N Portability870785 -Ref: I18N Portability-Footnote-1873241 -Node: I18N Example873304 -Ref: I18N Example-Footnote-1876579 -Ref: I18N Example-Footnote-2876652 -Node: Gawk I18N876761 -Node: I18N Summary877406 -Node: Debugger878747 -Node: Debugging879747 -Node: Debugging Concepts880188 -Node: Debugging Terms881997 -Node: Awk Debugging884572 -Ref: Awk Debugging-Footnote-1885517 -Node: Sample Debugging Session885649 -Node: Debugger Invocation886183 -Node: Finding The Bug887569 -Node: List of Debugger Commands894043 -Node: Breakpoint Control895376 -Node: Debugger Execution Control899070 -Node: Viewing And Changing Data902432 -Node: Execution Stack905806 -Node: Debugger Info907443 -Node: Miscellaneous Debugger Commands911514 -Node: Readline Support916576 -Node: Limitations917472 -Node: Debugging Summary919581 -Node: Namespaces920860 -Node: Global Namespace921678 -Node: Qualified Names923076 -Node: Default Namespace924075 -Node: Changing The Namespace924816 -Node: Naming Rules926430 -Node: Internal Name Management928278 -Node: Namespace Example929320 -Node: Namespace And Features931882 -Node: Namespace Summary933317 -Node: Arbitrary Precision Arithmetic934794 -Node: Computer Arithmetic936281 -Ref: table-numeric-ranges940047 -Ref: table-floating-point-ranges940540 -Ref: Computer Arithmetic-Footnote-1941198 -Node: Math Definitions941255 -Ref: table-ieee-formats944571 -Ref: Math Definitions-Footnote-1945174 -Node: MPFR features945279 -Node: FP Math Caution946997 -Ref: FP Math Caution-Footnote-1948069 -Node: Inexactness of computations948438 -Node: Inexact representation949398 -Node: Comparing FP Values950758 -Node: Errors accumulate951999 -Node: Getting Accuracy953432 -Node: Try To Round956142 -Node: Setting precision957041 -Ref: table-predefined-precision-strings957738 -Node: Setting the rounding mode959568 -Ref: table-gawk-rounding-modes959942 -Ref: Setting the rounding mode-Footnote-1963873 -Node: Arbitrary Precision Integers964052 -Ref: Arbitrary Precision Integers-Footnote-1967227 -Node: Checking for MPFR967376 -Node: POSIX Floating Point Problems968850 -Ref: POSIX Floating Point Problems-Footnote-1973135 -Node: Floating point summary973173 -Node: Dynamic Extensions975363 -Node: Extension Intro976916 -Node: Plugin License978182 -Node: Extension Mechanism Outline978979 -Ref: figure-load-extension979418 -Ref: figure-register-new-function980983 -Ref: figure-call-new-function982075 -Node: Extension API Description984137 -Node: Extension API Functions Introduction985779 -Ref: table-api-std-headers987615 -Node: General Data Types991480 -Ref: General Data Types-Footnote-1999841 -Node: Memory Allocation Functions1000140 -Ref: Memory Allocation Functions-Footnote-11004350 -Node: Constructor Functions1004449 -Node: Registration Functions1008035 -Node: Extension Functions1008720 -Node: Exit Callback Functions1014042 -Node: Extension Version String1015292 -Node: Input Parsers1015955 -Node: Output Wrappers1028676 -Node: Two-way processors1033188 -Node: Printing Messages1035453 -Ref: Printing Messages-Footnote-11036624 -Node: Updating ERRNO1036777 -Node: Requesting Values1037516 -Ref: table-value-types-returned1038253 -Node: Accessing Parameters1039189 -Node: Symbol Table Access1040424 -Node: Symbol table by name1040936 -Ref: Symbol table by name-Footnote-11043960 -Node: Symbol table by cookie1044088 -Ref: Symbol table by cookie-Footnote-11048273 -Node: Cached values1048337 -Ref: Cached values-Footnote-11051873 -Node: Array Manipulation1052026 -Ref: Array Manipulation-Footnote-11053117 -Node: Array Data Types1053154 -Ref: Array Data Types-Footnote-11055812 -Node: Array Functions1055904 -Node: Flattening Arrays1060402 -Node: Creating Arrays1067378 -Node: Redirection API1072145 -Node: Extension API Variables1074978 -Node: Extension Versioning1075689 -Ref: gawk-api-version1076118 -Node: Extension GMP/MPFR Versioning1077849 -Node: Extension API Informational Variables1079477 -Node: Extension API Boilerplate1080550 -Node: Changes from API V11084524 -Node: Finding Extensions1086096 -Node: Extension Example1086655 -Node: Internal File Description1087453 -Node: Internal File Ops1091533 -Ref: Internal File Ops-Footnote-11102883 -Node: Using Internal File Ops1103023 -Ref: Using Internal File Ops-Footnote-11105406 -Node: Extension Samples1105680 -Node: Extension Sample File Functions1107209 -Node: Extension Sample Fnmatch1114858 -Node: Extension Sample Fork1116345 -Node: Extension Sample Inplace1117563 -Node: Extension Sample Ord1120867 -Node: Extension Sample Readdir1121703 -Ref: table-readdir-file-types1122592 -Node: Extension Sample Revout1123397 -Node: Extension Sample Rev2way1123986 -Node: Extension Sample Read write array1124726 -Node: Extension Sample Readfile1126668 -Node: Extension Sample Time1127763 -Node: Extension Sample API Tests1129111 -Node: gawkextlib1129603 -Node: Extension summary1132521 -Node: Extension Exercises1136223 -Node: Language History1137465 -Node: V7/SVR3.11139121 -Node: SVR41141273 -Node: POSIX1142707 -Node: BTL1144087 -Node: POSIX/GNU1144816 -Node: Feature History1150594 -Node: Common Extensions1166640 -Node: Ranges and Locales1167923 -Ref: Ranges and Locales-Footnote-11172539 -Ref: Ranges and Locales-Footnote-21172566 -Ref: Ranges and Locales-Footnote-31172801 -Node: Contributors1173022 -Node: History summary1178967 -Node: Installation1180347 -Node: Gawk Distribution1181291 -Node: Getting1181775 -Node: Extracting1182738 -Node: Distribution contents1184376 -Node: Unix Installation1190856 -Node: Quick Installation1191538 -Node: Shell Startup Files1193952 -Node: Additional Configuration Options1195041 -Node: Configuration Philosophy1197206 -Node: Non-Unix Installation1199575 -Node: PC Installation1200035 -Node: PC Binary Installation1200873 -Node: PC Compiling1201308 -Node: PC Using1202425 -Node: Cygwin1205978 -Node: MSYS1207077 -Node: VMS Installation1207578 -Node: VMS Compilation1208369 -Ref: VMS Compilation-Footnote-11209598 -Node: VMS Dynamic Extensions1209656 -Node: VMS Installation Details1211341 -Node: VMS Running1213594 -Node: VMS GNV1217873 -Node: VMS Old Gawk1218608 -Node: Bugs1219079 -Node: Bug address1219742 -Node: Usenet1222724 -Node: Maintainers1223728 -Node: Other Versions1224989 -Node: Installation summary1231903 -Node: Notes1233105 -Node: Compatibility Mode1233899 -Node: Additions1234681 -Node: Accessing The Source1235606 -Node: Adding Code1237043 -Node: New Ports1243262 -Node: Derived Files1247750 -Ref: Derived Files-Footnote-11253396 -Ref: Derived Files-Footnote-21253431 -Ref: Derived Files-Footnote-31254029 -Node: Future Extensions1254143 -Node: Implementation Limitations1254801 -Node: Extension Design1255984 -Node: Old Extension Problems1257128 -Ref: Old Extension Problems-Footnote-11258646 -Node: Extension New Mechanism Goals1258703 -Ref: Extension New Mechanism Goals-Footnote-11262067 -Node: Extension Other Design Decisions1262256 -Node: Extension Future Growth1264369 -Node: Notes summary1265205 -Node: Basic Concepts1266380 -Node: Basic High Level1267061 -Ref: figure-general-flow1267343 -Ref: figure-process-flow1268028 -Ref: Basic High Level-Footnote-11271329 -Node: Basic Data Typing1271514 -Node: Glossary1274842 -Node: Copying1306680 -Node: GNU Free Documentation License1344223 -Node: Index1369343 +Node: Environment Variables140764 +Node: AWKPATH Variable141322 +Ref: AWKPATH Variable-Footnote-1144734 +Ref: AWKPATH Variable-Footnote-2144768 +Node: AWKLIBPATH Variable145029 +Node: Other Environment Variables146687 +Node: Exit Status150508 +Node: Include Files151185 +Node: Loading Shared Libraries154875 +Node: Obsolete156303 +Node: Undocumented156995 +Node: Invoking Summary157292 +Node: Regexp158952 +Node: Regexp Usage160406 +Node: Escape Sequences162443 +Node: Regexp Operators168675 +Ref: Regexp Operators-Footnote-1176091 +Ref: Regexp Operators-Footnote-2176238 +Node: Bracket Expressions176336 +Ref: table-char-classes178812 +Node: Leftmost Longest182138 +Node: Computed Regexps183441 +Node: GNU Regexp Operators186868 +Node: Case-sensitivity190547 +Ref: Case-sensitivity-Footnote-1193434 +Ref: Case-sensitivity-Footnote-2193669 +Node: Regexp Summary193777 +Node: Reading Files195243 +Node: Records197512 +Node: awk split records198587 +Node: gawk split records203862 +Ref: gawk split records-Footnote-1208448 +Node: Fields208485 +Node: Nonconstant Fields211226 +Ref: Nonconstant Fields-Footnote-1213462 +Node: Changing Fields213666 +Node: Field Separators219697 +Node: Default Field Splitting222395 +Node: Regexp Field Splitting223513 +Node: Single Character Fields226866 +Node: Command Line Field Separator227926 +Node: Full Line Fields231144 +Ref: Full Line Fields-Footnote-1232666 +Ref: Full Line Fields-Footnote-2232712 +Node: Field Splitting Summary232813 +Node: Constant Size234887 +Node: Fixed width data235619 +Node: Skipping intervening239086 +Node: Allowing trailing data239884 +Node: Fields with fixed data240921 +Node: Splitting By Content242439 +Ref: Splitting By Content-Footnote-1246089 +Node: Testing field creation246252 +Node: Multiple Line247877 +Ref: Multiple Line-Footnote-1253761 +Node: Getline253940 +Node: Plain Getline256409 +Node: Getline/Variable259050 +Node: Getline/File260201 +Node: Getline/Variable/File261589 +Ref: Getline/Variable/File-Footnote-1263194 +Node: Getline/Pipe263282 +Node: Getline/Variable/Pipe265989 +Node: Getline/Coprocess267124 +Node: Getline/Variable/Coprocess268391 +Node: Getline Notes269133 +Node: Getline Summary271930 +Ref: table-getline-variants272354 +Node: Read Timeout273102 +Ref: Read Timeout-Footnote-1277008 +Node: Retrying Input277066 +Node: Command-line directories278265 +Node: Input Summary279171 +Node: Input Exercises282343 +Node: Printing283071 +Node: Print284905 +Node: Print Examples286362 +Node: Output Separators289142 +Node: OFMT291159 +Node: Printf292515 +Node: Basic Printf293300 +Node: Control Letters294874 +Node: Format Modifiers300036 +Node: Printf Examples306051 +Node: Redirection308537 +Node: Special FD315378 +Ref: Special FD-Footnote-1318546 +Node: Special Files318620 +Node: Other Inherited Files319237 +Node: Special Network320238 +Node: Special Caveats321098 +Node: Close Files And Pipes322047 +Ref: table-close-pipe-return-values328954 +Ref: Close Files And Pipes-Footnote-1329767 +Ref: Close Files And Pipes-Footnote-2329915 +Node: Nonfatal330067 +Node: Output Summary332405 +Node: Output Exercises333627 +Node: Expressions334306 +Node: Values335494 +Node: Constants336172 +Node: Scalar Constants336863 +Ref: Scalar Constants-Footnote-1339388 +Node: Nondecimal-numbers339638 +Node: Regexp Constants342639 +Node: Using Constant Regexps343165 +Node: Standard Regexp Constants343787 +Node: Strong Regexp Constants346975 +Node: Variables349933 +Node: Using Variables350590 +Node: Assignment Options352500 +Node: Conversion354967 +Node: Strings And Numbers355491 +Ref: Strings And Numbers-Footnote-1358554 +Node: Locale influences conversions358663 +Ref: table-locale-affects361421 +Node: All Operators362039 +Node: Arithmetic Ops362668 +Node: Concatenation365174 +Ref: Concatenation-Footnote-1368021 +Node: Assignment Ops368128 +Ref: table-assign-ops373119 +Node: Increment Ops374432 +Node: Truth Values and Conditions377892 +Node: Truth Values378966 +Node: Typing and Comparison380014 +Node: Variable Typing380834 +Ref: Variable Typing-Footnote-1387297 +Ref: Variable Typing-Footnote-2387369 +Node: Comparison Operators387446 +Ref: table-relational-ops387865 +Node: POSIX String Comparison391360 +Ref: POSIX String Comparison-Footnote-1393055 +Ref: POSIX String Comparison-Footnote-2393194 +Node: Boolean Ops393278 +Ref: Boolean Ops-Footnote-1397760 +Node: Conditional Exp397852 +Node: Function Calls399588 +Node: Precedence403465 +Node: Locales407124 +Node: Expressions Summary408756 +Node: Patterns and Actions411329 +Node: Pattern Overview412449 +Node: Regexp Patterns414126 +Node: Expression Patterns414668 +Node: Ranges418449 +Node: BEGIN/END421557 +Node: Using BEGIN/END422318 +Ref: Using BEGIN/END-Footnote-1425054 +Node: I/O And BEGIN/END425160 +Node: BEGINFILE/ENDFILE427474 +Node: Empty430387 +Node: Using Shell Variables430704 +Node: Action Overview432978 +Node: Statements435303 +Node: If Statement437151 +Node: While Statement438646 +Node: Do Statement440674 +Node: For Statement441822 +Node: Switch Statement444993 +Node: Break Statement447379 +Node: Continue Statement449471 +Node: Next Statement451298 +Node: Nextfile Statement453681 +Node: Exit Statement456333 +Node: Built-in Variables458736 +Node: User-modified459869 +Node: Auto-set467636 +Ref: Auto-set-Footnote-1484443 +Ref: Auto-set-Footnote-2484649 +Node: ARGC and ARGV484705 +Node: Pattern Action Summary488918 +Node: Arrays491348 +Node: Array Basics492677 +Node: Array Intro493521 +Ref: figure-array-elements495496 +Ref: Array Intro-Footnote-1498200 +Node: Reference to Elements498328 +Node: Assigning Elements500792 +Node: Array Example501283 +Node: Scanning an Array503042 +Node: Controlling Scanning506064 +Ref: Controlling Scanning-Footnote-1511463 +Node: Numeric Array Subscripts511779 +Node: Uninitialized Subscripts513963 +Node: Delete515582 +Ref: Delete-Footnote-1518334 +Node: Multidimensional518391 +Node: Multiscanning521486 +Node: Arrays of Arrays523077 +Node: Arrays Summary527845 +Node: Functions529938 +Node: Built-in530976 +Node: Calling Built-in532057 +Node: Numeric Functions534053 +Ref: Numeric Functions-Footnote-1538081 +Ref: Numeric Functions-Footnote-2538438 +Ref: Numeric Functions-Footnote-3538486 +Node: String Functions538758 +Ref: String Functions-Footnote-1562616 +Ref: String Functions-Footnote-2562744 +Ref: String Functions-Footnote-3562992 +Node: Gory Details563079 +Ref: table-sub-escapes564870 +Ref: table-sub-proposed566389 +Ref: table-posix-sub567752 +Ref: table-gensub-escapes569293 +Ref: Gory Details-Footnote-1570116 +Node: I/O Functions570270 +Ref: table-system-return-values576738 +Ref: I/O Functions-Footnote-1578818 +Ref: I/O Functions-Footnote-2578966 +Node: Time Functions579086 +Ref: Time Functions-Footnote-1589757 +Ref: Time Functions-Footnote-2589825 +Ref: Time Functions-Footnote-3589983 +Ref: Time Functions-Footnote-4590094 +Ref: Time Functions-Footnote-5590206 +Ref: Time Functions-Footnote-6590433 +Node: Bitwise Functions590699 +Ref: table-bitwise-ops591293 +Ref: Bitwise Functions-Footnote-1597356 +Ref: Bitwise Functions-Footnote-2597529 +Node: Type Functions597720 +Node: I18N Functions600471 +Node: User-defined602122 +Node: Definition Syntax602927 +Ref: Definition Syntax-Footnote-1608614 +Node: Function Example608685 +Ref: Function Example-Footnote-1611607 +Node: Function Caveats611629 +Node: Calling A Function612147 +Node: Variable Scope613105 +Node: Pass By Value/Reference616099 +Node: Return Statement619598 +Node: Dynamic Typing622577 +Node: Indirect Calls623507 +Ref: Indirect Calls-Footnote-1633759 +Node: Functions Summary633887 +Node: Library Functions636592 +Ref: Library Functions-Footnote-1640199 +Ref: Library Functions-Footnote-2640342 +Node: Library Names640513 +Ref: Library Names-Footnote-1644180 +Ref: Library Names-Footnote-2644403 +Node: General Functions644489 +Node: Strtonum Function645592 +Node: Assert Function648614 +Node: Round Function651940 +Node: Cliff Random Function653480 +Node: Ordinal Functions654496 +Ref: Ordinal Functions-Footnote-1657559 +Ref: Ordinal Functions-Footnote-2657811 +Node: Join Function658021 +Ref: Join Function-Footnote-1659791 +Node: Getlocaltime Function659991 +Node: Readfile Function663733 +Node: Shell Quoting665710 +Node: Data File Management667111 +Node: Filetrans Function667743 +Node: Rewind Function671839 +Node: File Checking673749 +Ref: File Checking-Footnote-1675083 +Node: Empty Files675284 +Node: Ignoring Assigns677263 +Node: Getopt Function678813 +Ref: Getopt Function-Footnote-1690282 +Node: Passwd Functions690482 +Ref: Passwd Functions-Footnote-1699321 +Node: Group Functions699409 +Ref: Group Functions-Footnote-1707307 +Node: Walking Arrays707514 +Node: Library Functions Summary710522 +Node: Library Exercises711928 +Node: Sample Programs712393 +Node: Running Examples713163 +Node: Clones713891 +Node: Cut Program715115 +Node: Egrep Program725044 +Ref: Egrep Program-Footnote-1732556 +Node: Id Program732666 +Node: Split Program736346 +Ref: Split Program-Footnote-1739804 +Node: Tee Program739933 +Node: Uniq Program742723 +Node: Wc Program750344 +Ref: Wc Program-Footnote-1754599 +Node: Miscellaneous Programs754693 +Node: Dupword Program755906 +Node: Alarm Program757936 +Node: Translate Program762791 +Ref: Translate Program-Footnote-1767356 +Node: Labels Program767626 +Ref: Labels Program-Footnote-1770977 +Node: Word Sorting771061 +Node: History Sorting775133 +Node: Extract Program776968 +Node: Simple Sed785022 +Node: Igawk Program788096 +Ref: Igawk Program-Footnote-1802427 +Ref: Igawk Program-Footnote-2802629 +Ref: Igawk Program-Footnote-3802751 +Node: Anagram Program802866 +Node: Signature Program805928 +Node: Programs Summary807175 +Node: Programs Exercises808389 +Ref: Programs Exercises-Footnote-1812518 +Node: Advanced Features812609 +Node: Nondecimal Data814599 +Node: Array Sorting816190 +Node: Controlling Array Traversal816890 +Ref: Controlling Array Traversal-Footnote-1825258 +Node: Array Sorting Functions825376 +Ref: Array Sorting Functions-Footnote-1830467 +Node: Two-way I/O830663 +Ref: Two-way I/O-Footnote-1838384 +Ref: Two-way I/O-Footnote-2838571 +Node: TCP/IP Networking838653 +Node: Profiling841771 +Node: Advanced Features Summary850789 +Node: Internationalization852633 +Node: I18N and L10N854113 +Node: Explaining gettext854800 +Ref: Explaining gettext-Footnote-1860692 +Ref: Explaining gettext-Footnote-2860877 +Node: Programmer i18n861042 +Ref: Programmer i18n-Footnote-1865991 +Node: Translator i18n866040 +Node: String Extraction866834 +Ref: String Extraction-Footnote-1867966 +Node: Printf Ordering868052 +Ref: Printf Ordering-Footnote-1870838 +Node: I18N Portability870902 +Ref: I18N Portability-Footnote-1873358 +Node: I18N Example873421 +Ref: I18N Example-Footnote-1876696 +Ref: I18N Example-Footnote-2876769 +Node: Gawk I18N876878 +Node: I18N Summary877523 +Node: Debugger878864 +Node: Debugging879864 +Node: Debugging Concepts880305 +Node: Debugging Terms882114 +Node: Awk Debugging884689 +Ref: Awk Debugging-Footnote-1885634 +Node: Sample Debugging Session885766 +Node: Debugger Invocation886300 +Node: Finding The Bug887686 +Node: List of Debugger Commands894160 +Node: Breakpoint Control895493 +Node: Debugger Execution Control899187 +Node: Viewing And Changing Data902549 +Node: Execution Stack905923 +Node: Debugger Info907560 +Node: Miscellaneous Debugger Commands911631 +Node: Readline Support916693 +Node: Limitations917589 +Node: Debugging Summary919698 +Node: Namespaces920977 +Node: Global Namespace921795 +Node: Qualified Names923193 +Node: Default Namespace924192 +Node: Changing The Namespace924933 +Node: Naming Rules926547 +Node: Internal Name Management928395 +Node: Namespace Example929437 +Node: Namespace And Features931999 +Node: Namespace Summary933434 +Node: Arbitrary Precision Arithmetic934911 +Node: Computer Arithmetic936398 +Ref: table-numeric-ranges940164 +Ref: table-floating-point-ranges940657 +Ref: Computer Arithmetic-Footnote-1941315 +Node: Math Definitions941372 +Ref: table-ieee-formats944688 +Ref: Math Definitions-Footnote-1945291 +Node: MPFR features945396 +Node: FP Math Caution947114 +Ref: FP Math Caution-Footnote-1948186 +Node: Inexactness of computations948555 +Node: Inexact representation949515 +Node: Comparing FP Values950875 +Node: Errors accumulate952116 +Node: Getting Accuracy953549 +Node: Try To Round956259 +Node: Setting precision957158 +Ref: table-predefined-precision-strings957855 +Node: Setting the rounding mode959685 +Ref: table-gawk-rounding-modes960059 +Ref: Setting the rounding mode-Footnote-1963990 +Node: Arbitrary Precision Integers964169 +Ref: Arbitrary Precision Integers-Footnote-1967344 +Node: Checking for MPFR967493 +Node: POSIX Floating Point Problems968967 +Ref: POSIX Floating Point Problems-Footnote-1973252 +Node: Floating point summary973290 +Node: Dynamic Extensions975480 +Node: Extension Intro977033 +Node: Plugin License978299 +Node: Extension Mechanism Outline979096 +Ref: figure-load-extension979535 +Ref: figure-register-new-function981100 +Ref: figure-call-new-function982192 +Node: Extension API Description984254 +Node: Extension API Functions Introduction985896 +Ref: table-api-std-headers987732 +Node: General Data Types991597 +Ref: General Data Types-Footnote-1999958 +Node: Memory Allocation Functions1000257 +Ref: Memory Allocation Functions-Footnote-11004467 +Node: Constructor Functions1004566 +Node: Registration Functions1008152 +Node: Extension Functions1008837 +Node: Exit Callback Functions1014159 +Node: Extension Version String1015409 +Node: Input Parsers1016072 +Node: Output Wrappers1028793 +Node: Two-way processors1033305 +Node: Printing Messages1035570 +Ref: Printing Messages-Footnote-11036741 +Node: Updating ERRNO1036894 +Node: Requesting Values1037633 +Ref: table-value-types-returned1038370 +Node: Accessing Parameters1039306 +Node: Symbol Table Access1040541 +Node: Symbol table by name1041053 +Ref: Symbol table by name-Footnote-11044077 +Node: Symbol table by cookie1044205 +Ref: Symbol table by cookie-Footnote-11048390 +Node: Cached values1048454 +Ref: Cached values-Footnote-11051990 +Node: Array Manipulation1052143 +Ref: Array Manipulation-Footnote-11053234 +Node: Array Data Types1053271 +Ref: Array Data Types-Footnote-11055929 +Node: Array Functions1056021 +Node: Flattening Arrays1060519 +Node: Creating Arrays1067495 +Node: Redirection API1072262 +Node: Extension API Variables1075095 +Node: Extension Versioning1075806 +Ref: gawk-api-version1076235 +Node: Extension GMP/MPFR Versioning1077966 +Node: Extension API Informational Variables1079594 +Node: Extension API Boilerplate1080667 +Node: Changes from API V11084641 +Node: Finding Extensions1086213 +Node: Extension Example1086772 +Node: Internal File Description1087570 +Node: Internal File Ops1091650 +Ref: Internal File Ops-Footnote-11103000 +Node: Using Internal File Ops1103140 +Ref: Using Internal File Ops-Footnote-11105523 +Node: Extension Samples1105797 +Node: Extension Sample File Functions1107326 +Node: Extension Sample Fnmatch1114975 +Node: Extension Sample Fork1116462 +Node: Extension Sample Inplace1117680 +Node: Extension Sample Ord1120984 +Node: Extension Sample Readdir1121820 +Ref: table-readdir-file-types1122709 +Node: Extension Sample Revout1123514 +Node: Extension Sample Rev2way1124103 +Node: Extension Sample Read write array1124843 +Node: Extension Sample Readfile1126785 +Node: Extension Sample Time1127880 +Node: Extension Sample API Tests1129228 +Node: gawkextlib1129720 +Node: Extension summary1132638 +Node: Extension Exercises1136340 +Node: Language History1137582 +Node: V7/SVR3.11139238 +Node: SVR41141390 +Node: POSIX1142824 +Node: BTL1144204 +Node: POSIX/GNU1144933 +Node: Feature History1150711 +Node: Common Extensions1166757 +Node: Ranges and Locales1168040 +Ref: Ranges and Locales-Footnote-11172656 +Ref: Ranges and Locales-Footnote-21172683 +Ref: Ranges and Locales-Footnote-31172918 +Node: Contributors1173139 +Node: History summary1179084 +Node: Installation1180464 +Node: Gawk Distribution1181408 +Node: Getting1181892 +Node: Extracting1182855 +Node: Distribution contents1184493 +Node: Unix Installation1190973 +Node: Quick Installation1191655 +Node: Shell Startup Files1194069 +Node: Additional Configuration Options1195158 +Node: Configuration Philosophy1197323 +Node: Non-Unix Installation1199692 +Node: PC Installation1200152 +Node: PC Binary Installation1200990 +Node: PC Compiling1201425 +Node: PC Using1202542 +Node: Cygwin1206095 +Node: MSYS1207194 +Node: VMS Installation1207695 +Node: VMS Compilation1208486 +Ref: VMS Compilation-Footnote-11209715 +Node: VMS Dynamic Extensions1209773 +Node: VMS Installation Details1211458 +Node: VMS Running1213711 +Node: VMS GNV1217990 +Node: VMS Old Gawk1218725 +Node: Bugs1219196 +Node: Bug address1219859 +Node: Usenet1222841 +Node: Maintainers1223845 +Node: Other Versions1225106 +Node: Installation summary1232020 +Node: Notes1233222 +Node: Compatibility Mode1234016 +Node: Additions1234798 +Node: Accessing The Source1235723 +Node: Adding Code1237160 +Node: New Ports1243379 +Node: Derived Files1247867 +Ref: Derived Files-Footnote-11253513 +Ref: Derived Files-Footnote-21253548 +Ref: Derived Files-Footnote-31254146 +Node: Future Extensions1254260 +Node: Implementation Limitations1254918 +Node: Extension Design1256101 +Node: Old Extension Problems1257245 +Ref: Old Extension Problems-Footnote-11258763 +Node: Extension New Mechanism Goals1258820 +Ref: Extension New Mechanism Goals-Footnote-11262184 +Node: Extension Other Design Decisions1262373 +Node: Extension Future Growth1264486 +Node: Notes summary1265322 +Node: Basic Concepts1266497 +Node: Basic High Level1267178 +Ref: figure-general-flow1267460 +Ref: figure-process-flow1268145 +Ref: Basic High Level-Footnote-11271446 +Node: Basic Data Typing1271631 +Node: Glossary1274959 +Node: Copying1306797 +Node: GNU Free Documentation License1344340 +Node: Index1369460 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 5dd04337..58b3ddc7 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -2591,7 +2591,7 @@ does the same thing as this one: awk 'BEGIN @{ print "Don\47t Panic!" @}' @end example -@cindex quoting in @command{gawk} command lines +@cindex quoting, in @command{gawk} command lines @noindent This was explained earlier (@pxref{Read Terminal}). @@ -2947,7 +2947,7 @@ as the value of @code{FS}, and the first @value{FN} as the text of the program! This results in syntax errors at best, and confusing behavior at worst. @end itemize -@cindex quoting in @command{gawk} command lines, tricks for +@cindex quoting, in @command{gawk} command lines, tricks for Mixing single and double quotes is difficult. You have to resort to shell quoting tricks, like this: @@ -3858,7 +3858,7 @@ more than once, setting another variable each time, like this: @samp{awk @w{-v foo=1} @w{-v bar=2} @dots{}}. @cindex predefined variables, @code{-v} option@comma{} setting with -@cindex variables, predefined @code{-v} option@comma{} setting with +@cindex variables, predefined, @code{-v} option@comma{} setting with @quotation CAUTION Using @option{-v} to set the values of the built-in variables may lead to surprising results. @command{awk} will reset the @@ -3884,8 +3884,8 @@ are not treated as options even if they begin with @samp{-}. This interpretation of @option{--} follows the POSIX argument parsing conventions. -@cindex @code{-} (hyphen), filenames beginning with -@cindex hyphen (@code{-}), filenames beginning with +@cindex @code{-} (hyphen), file names beginning with +@cindex hyphen (@code{-}), file names beginning with This is useful if you have @value{FN}s that start with @samp{-}, or in shell scripts, if you have @value{FN}s that will be specified by the user that could start with @samp{-}. @@ -4228,7 +4228,7 @@ Newlines are not allowed after @samp{?} or @samp{:} (@pxref{Conditional Exp}). -@cindex @code{FS} variable, as TAB character +@cindex @code{FS} variable, TAB character as @item Specifying @samp{-Ft} on the command line does not set the value of @code{FS} to be a single TAB character @@ -4483,6 +4483,8 @@ the output of @var{some_command}, and finally it reads You may also use @code{"-"} to name standard input when reading files with @code{getline} (@pxref{Getline/File}). +And, you can even use @code{"-"} with the @option{-f} option +to read program source code from standard input (@pxref{Options}). In addition, @command{gawk} allows you to specify the special @value{FN} @file{/dev/stdin}, both on the command line and @@ -4952,8 +4954,8 @@ in case some option becomes obsolete in a future version of @command{gawk}. @cindex features, undocumented @cindex Skywalker, Luke @cindex Kenobi, Obi-Wan -@cindex Jedi knights -@cindex Knights, jedi +@cindex jedi knights +@cindex knights, jedi @quotation @i{Use the Source, Luke!} @author Obi-Wan @@ -5133,6 +5135,7 @@ regular expressions work, we present more complicated instances. @node Regexp Usage @section How to Use Regular Expressions +@cindex patterns, regular expressions as @cindex regular expressions, as patterns A regular expression can be used as a pattern by enclosing it in slashes. Then the regular expression is tested against the @@ -6529,6 +6532,7 @@ This is why records are, by default, single lines. To use a different character for the record separator, simply assign that character to the predefined variable @code{RS}. +@cindex record separators, newlines as @cindex newlines, as record separators @cindex @code{RS} variable Like any other variable, @@ -6687,6 +6691,7 @@ affected. @cindex records, terminating @cindex terminating records @cindex differences in @command{awk} and @command{gawk}, record separators +@cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables @cindex regular expressions, as record separators @cindex record separators, regular expressions as @cindex separators, for records, regular expressions as @@ -6762,6 +6767,8 @@ that happens to contain newline characters. It is thus best to avoid anchor metacharacters in the value of @code{RS}. @end quotation +@cindex @command{gawk}, @code{RT} variable in +@cindex @code{RT} variable @cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables The use of @code{RS} as a regular expression and the @code{RT} variable are @command{gawk} extensions; they are not available in @@ -6813,6 +6820,7 @@ character as a record separator. However, this is a special case: @cindex records, treating files as @cindex treating files, as single records +@cindex single records, treating files as @xref{Readfile Function} for an interesting way to read whole files. If you are using @command{gawk}, see @ref{Extension Sample Readfile} for another option. @@ -6864,6 +6872,7 @@ character as a record separator. However, this is a special case: @cindex records, treating files as @cindex treating files, as single records +@cindex single records, treating files as @xref{Readfile Function} for an interesting way to read whole files. If you are using @command{gawk}, see @ref{Extension Sample Readfile} for another option. @@ -7307,7 +7316,7 @@ this @command{awk} program extracts and prints the string @samp{@bullet{}29@bullet{}Oak@bullet{}St.}. @cindex field separators, choice of -@cindex regular expressions as field separators +@cindex regular expressions, as field separators @cindex field separators, regular expressions as Sometimes the input data contains separator characters that don't separate fields the way you thought they would. For instance, the @@ -7331,6 +7340,7 @@ can massage it first with a separate @command{awk} program.) @node Default Field Splitting @subsection Whitespace Normally Separates Fields +@cindex field separators, whitespace as @cindex whitespace, as field separators Fields are normally separated by whitespace sequences (spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not @@ -7525,6 +7535,7 @@ awk -F\\\\ '@dots{}' files @dots{} @end example @noindent +@cindex field separator, backslash (@code{\}) as @cindex @code{\} (backslash), as field separator @cindex backslash (@code{\}), as field separator Because @samp{\} is used for quoting in the shell, @command{awk} sees @@ -8352,6 +8363,7 @@ POSIX standard.) @cindex @command{gawk}, @code{RT} variable in @cindex @code{RT} variable +@cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables If not in compatibility mode (@pxref{Options}), @command{gawk} sets @code{RT} to the input text that matched the value specified by @code{RS}. But if the input file ended without any text that matches @code{RS}, @@ -11425,6 +11437,7 @@ it would be nice to have regexp constants that are @dfn{strongly typed}; in other words, that denote a regexp useful for matching, and not an expression. +@cindex values, regexp @command{gawk} provides this feature. A strongly typed regexp constant looks almost like a regular regexp constant, except that it is preceded by an @samp{@@} sign: @@ -12501,7 +12514,7 @@ like @samp{@var{lvalue}++}, but instead of adding, it subtracts.) @end docbook @cindex precedence -@cindex operators, precedence +@cindex operators, precedence of @cindex portability, operators @cindex evaluation order @cindex Marx, Groucho @@ -12553,7 +12566,7 @@ You should avoid such things in your own programs. @cindex precedence -@cindex operators, precedence +@cindex operators, precedence of @cindex portability, operators @cindex evaluation order @cindex Marx, Groucho @@ -13886,7 +13899,7 @@ The empty pattern matches every input record. @node Regexp Patterns @subsection Regular Expressions as Patterns -@cindex patterns, expressions as +@cindex patterns, regular expressions as @cindex regular expressions, as patterns Regular expressions are one of the first kinds of patterns presented @@ -13904,6 +13917,7 @@ END @{ print buzzwords, "buzzwords seen" @} @node Expression Patterns @subsection Expressions as Patterns @cindex expressions, as patterns +@cindex patterns, expressions as Any @command{awk} expression is valid as an @command{awk} pattern. The pattern matches if the expression's value is nonzero (if a @@ -13957,6 +13971,7 @@ appears in the current input record. Thus, as a pattern, @code{/li/} matches any record containing @samp{li}. @cindex Boolean expressions, as patterns +@cindex patterns, Boolean expressions as Boolean expressions are also commonly used as patterns. Whether the pattern matches an input record depends on whether its subexpressions match. @@ -15441,7 +15456,6 @@ Its default value is @code{"%.6g"}. Earlier versions of @command{awk} used @code{OFMT} to specify the format for converting numbers to strings in general expressions; this is now done by @code{CONVFMT}. -@cindex @code{sprintf()} function, @code{OFMT} variable and @cindex @code{print} statement, @code{OFMT} variable and @cindex @code{OFS} variable @cindex separators, field @@ -15515,7 +15529,7 @@ The default value of @code{TEXTDOMAIN} is @code{"messages"}. @subsection Built-in Variables That Convey Information @cindex predefined variables, conveying information -@cindex variables, predefined conveying information +@cindex variables, predefined, conveying information The following is an alphabetical list of variables that @command{awk} sets automatically on certain occasions in order to provide information to your program. @@ -17121,6 +17135,7 @@ sorting arrays; see @ref{Array Sorting Functions}. @section Using Numbers to Subscript Arrays @cindex numbers, as array subscripts +@cindex array subscripts, numbers as @cindex arrays, numeric subscripts @cindex subscripts in arrays, numbers as @cindex @code{CONVFMT} variable, array subscripts and @@ -17234,6 +17249,7 @@ Here, the @samp{++} forces @code{lines} to be numeric, thus making the ``old value'' numeric zero. This is then converted to @code{"0"} as the array subscript. +@cindex array subscripts, null strings as @cindex null strings, as array subscripts @cindex dark corner, array subscripts @cindex lint checking, array subscripts @@ -20174,7 +20190,7 @@ $ @kbd{gawk -f testbits.awk} @cindex strings, converting @cindex numbers, converting @cindex converting, numbers to strings -@cindex number as string of bits +@cindex numbers, as string of bits The @code{bits2str()} function turns a binary number into a string. Initializing @code{mask} to one creates a binary value where the rightmost bit @@ -23031,8 +23047,8 @@ not @samp{<}. @node Ignoring Assigns @subsection Treating Assignments as @value{FFN}s -@cindex assignments as filenames -@cindex filenames, assignments as +@cindex assignments as file names +@cindex file names, assignments as Occasionally, you might not want @command{awk} to process command-line variable assignments (@pxref{Assignment Options}). @@ -29837,7 +29853,6 @@ is covered. @node String Extraction @subsection Extracting Marked Strings @cindex strings, extracting -@cindex marked strings@comma{} extracting @cindex @option{--gen-pot} option @cindex command-line options, string extraction @cindex string extraction (internationalization) @@ -31186,7 +31201,6 @@ functions that called the one you are in. The commands for doing this are: @cindex debugger commands, @code{where} (@code{backtrace}) @cindex @code{backtrace} debugger command @cindex @code{bt} debugger command (alias for @code{backtrace}) -@cindex @code{where} debugger command @cindex @code{where} debugger command (alias for @code{backtrace}) @cindex call stack, display in debugger @cindex traceback, display in debugger @@ -32163,7 +32177,7 @@ version of @command{gawk}. @cindex arbitrary precision @cindex multiple precision @cindex infinite precision -@cindex floating-point, numbers@comma{} arbitrary precision +@cindex floating-point, numbers@comma{} arbitrary-precision This @value{CHAPTER} introduces some basic concepts relating to how computers do arithmetic and defines some important terms. @@ -39862,7 +39876,7 @@ The development of the extension API first released with Arnold Robbins and Andrew Schorr, with notable contributions from the rest of the development team. -@cindex Malmberg, John E. +@cindex Malmberg, John @item John Malmberg contributed significant improvements to the OpenVMS port and the related documentation. @@ -41435,6 +41449,7 @@ makes this implementation available. You can view the files one at a time from @cindex @command{goawk} @cindex Go implementation of @command{awk} @cindex source code, @command{goawk} +@cindex programming languages, Go @item @command{goawk} This is an @command{awk} interpreter written in the @uref{https://golang.org/, Go programming language}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index b562fb56..de713811 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -2558,7 +2558,7 @@ does the same thing as this one: awk 'BEGIN @{ print "Don\47t Panic!" @}' @end example -@cindex quoting in @command{gawk} command lines +@cindex quoting, in @command{gawk} command lines @noindent This was explained earlier (@pxref{Read Terminal}). @@ -2857,7 +2857,7 @@ as the value of @code{FS}, and the first @value{FN} as the text of the program! This results in syntax errors at best, and confusing behavior at worst. @end itemize -@cindex quoting in @command{gawk} command lines, tricks for +@cindex quoting, in @command{gawk} command lines, tricks for Mixing single and double quotes is difficult. You have to resort to shell quoting tricks, like this: @@ -3768,7 +3768,7 @@ more than once, setting another variable each time, like this: @samp{awk @w{-v foo=1} @w{-v bar=2} @dots{}}. @cindex predefined variables, @code{-v} option@comma{} setting with -@cindex variables, predefined @code{-v} option@comma{} setting with +@cindex variables, predefined, @code{-v} option@comma{} setting with @quotation CAUTION Using @option{-v} to set the values of the built-in variables may lead to surprising results. @command{awk} will reset the @@ -3794,8 +3794,8 @@ are not treated as options even if they begin with @samp{-}. This interpretation of @option{--} follows the POSIX argument parsing conventions. -@cindex @code{-} (hyphen), filenames beginning with -@cindex hyphen (@code{-}), filenames beginning with +@cindex @code{-} (hyphen), file names beginning with +@cindex hyphen (@code{-}), file names beginning with This is useful if you have @value{FN}s that start with @samp{-}, or in shell scripts, if you have @value{FN}s that will be specified by the user that could start with @samp{-}. @@ -4138,7 +4138,7 @@ Newlines are not allowed after @samp{?} or @samp{:} (@pxref{Conditional Exp}). -@cindex @code{FS} variable, as TAB character +@cindex @code{FS} variable, TAB character as @item Specifying @samp{-Ft} on the command line does not set the value of @code{FS} to be a single TAB character @@ -4393,6 +4393,8 @@ the output of @var{some_command}, and finally it reads You may also use @code{"-"} to name standard input when reading files with @code{getline} (@pxref{Getline/File}). +And, you can even use @code{"-"} with the @option{-f} option +to read program source code from standard input (@pxref{Options}). In addition, @command{gawk} allows you to specify the special @value{FN} @file{/dev/stdin}, both on the command line and @@ -4862,8 +4864,8 @@ in case some option becomes obsolete in a future version of @command{gawk}. @cindex features, undocumented @cindex Skywalker, Luke @cindex Kenobi, Obi-Wan -@cindex Jedi knights -@cindex Knights, jedi +@cindex jedi knights +@cindex knights, jedi @quotation @i{Use the Source, Luke!} @author Obi-Wan @@ -5043,6 +5045,7 @@ regular expressions work, we present more complicated instances. @node Regexp Usage @section How to Use Regular Expressions +@cindex patterns, regular expressions as @cindex regular expressions, as patterns A regular expression can be used as a pattern by enclosing it in slashes. Then the regular expression is tested against the @@ -6312,6 +6315,7 @@ This is why records are, by default, single lines. To use a different character for the record separator, simply assign that character to the predefined variable @code{RS}. +@cindex record separators, newlines as @cindex newlines, as record separators @cindex @code{RS} variable Like any other variable, @@ -6470,6 +6474,7 @@ affected. @cindex records, terminating @cindex terminating records @cindex differences in @command{awk} and @command{gawk}, record separators +@cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables @cindex regular expressions, as record separators @cindex record separators, regular expressions as @cindex separators, for records, regular expressions as @@ -6545,6 +6550,8 @@ that happens to contain newline characters. It is thus best to avoid anchor metacharacters in the value of @code{RS}. @end quotation +@cindex @command{gawk}, @code{RT} variable in +@cindex @code{RT} variable @cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables The use of @code{RS} as a regular expression and the @code{RT} variable are @command{gawk} extensions; they are not available in @@ -6591,6 +6598,7 @@ character as a record separator. However, this is a special case: @cindex records, treating files as @cindex treating files, as single records +@cindex single records, treating files as @xref{Readfile Function} for an interesting way to read whole files. If you are using @command{gawk}, see @ref{Extension Sample Readfile} for another option. @@ -7002,7 +7010,7 @@ this @command{awk} program extracts and prints the string @samp{@bullet{}29@bullet{}Oak@bullet{}St.}. @cindex field separators, choice of -@cindex regular expressions as field separators +@cindex regular expressions, as field separators @cindex field separators, regular expressions as Sometimes the input data contains separator characters that don't separate fields the way you thought they would. For instance, the @@ -7026,6 +7034,7 @@ can massage it first with a separate @command{awk} program.) @node Default Field Splitting @subsection Whitespace Normally Separates Fields +@cindex field separators, whitespace as @cindex whitespace, as field separators Fields are normally separated by whitespace sequences (spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not @@ -7220,6 +7229,7 @@ awk -F\\\\ '@dots{}' files @dots{} @end example @noindent +@cindex field separator, backslash (@code{\}) as @cindex @code{\} (backslash), as field separator @cindex backslash (@code{\}), as field separator Because @samp{\} is used for quoting in the shell, @command{awk} sees @@ -7951,6 +7961,7 @@ POSIX standard.) @cindex @command{gawk}, @code{RT} variable in @cindex @code{RT} variable +@cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables If not in compatibility mode (@pxref{Options}), @command{gawk} sets @code{RT} to the input text that matched the value specified by @code{RS}. But if the input file ended without any text that matches @code{RS}, @@ -10882,6 +10893,7 @@ it would be nice to have regexp constants that are @dfn{strongly typed}; in other words, that denote a regexp useful for matching, and not an expression. +@cindex values, regexp @command{gawk} provides this feature. A strongly typed regexp constant looks almost like a regular regexp constant, except that it is preceded by an @samp{@@} sign: @@ -11872,7 +11884,7 @@ like @samp{@var{lvalue}++}, but instead of adding, it subtracts.) @sidebar Operator Evaluation Order @cindex precedence -@cindex operators, precedence +@cindex operators, precedence of @cindex portability, operators @cindex evaluation order @cindex Marx, Groucho @@ -13204,7 +13216,7 @@ The empty pattern matches every input record. @node Regexp Patterns @subsection Regular Expressions as Patterns -@cindex patterns, expressions as +@cindex patterns, regular expressions as @cindex regular expressions, as patterns Regular expressions are one of the first kinds of patterns presented @@ -13222,6 +13234,7 @@ END @{ print buzzwords, "buzzwords seen" @} @node Expression Patterns @subsection Expressions as Patterns @cindex expressions, as patterns +@cindex patterns, expressions as Any @command{awk} expression is valid as an @command{awk} pattern. The pattern matches if the expression's value is nonzero (if a @@ -13275,6 +13288,7 @@ appears in the current input record. Thus, as a pattern, @code{/li/} matches any record containing @samp{li}. @cindex Boolean expressions, as patterns +@cindex patterns, Boolean expressions as Boolean expressions are also commonly used as patterns. Whether the pattern matches an input record depends on whether its subexpressions match. @@ -14759,7 +14773,6 @@ Its default value is @code{"%.6g"}. Earlier versions of @command{awk} used @code{OFMT} to specify the format for converting numbers to strings in general expressions; this is now done by @code{CONVFMT}. -@cindex @code{sprintf()} function, @code{OFMT} variable and @cindex @code{print} statement, @code{OFMT} variable and @cindex @code{OFS} variable @cindex separators, field @@ -14833,7 +14846,7 @@ The default value of @code{TEXTDOMAIN} is @code{"messages"}. @subsection Built-in Variables That Convey Information @cindex predefined variables, conveying information -@cindex variables, predefined conveying information +@cindex variables, predefined, conveying information The following is an alphabetical list of variables that @command{awk} sets automatically on certain occasions in order to provide information to your program. @@ -16393,6 +16406,7 @@ sorting arrays; see @ref{Array Sorting Functions}. @section Using Numbers to Subscript Arrays @cindex numbers, as array subscripts +@cindex array subscripts, numbers as @cindex arrays, numeric subscripts @cindex subscripts in arrays, numbers as @cindex @code{CONVFMT} variable, array subscripts and @@ -16506,6 +16520,7 @@ Here, the @samp{++} forces @code{lines} to be numeric, thus making the ``old value'' numeric zero. This is then converted to @code{"0"} as the array subscript. +@cindex array subscripts, null strings as @cindex null strings, as array subscripts @cindex dark corner, array subscripts @cindex lint checking, array subscripts @@ -19285,7 +19300,7 @@ $ @kbd{gawk -f testbits.awk} @cindex strings, converting @cindex numbers, converting @cindex converting, numbers to strings -@cindex number as string of bits +@cindex numbers, as string of bits The @code{bits2str()} function turns a binary number into a string. Initializing @code{mask} to one creates a binary value where the rightmost bit @@ -22044,8 +22059,8 @@ not @samp{<}. @node Ignoring Assigns @subsection Treating Assignments as @value{FFN}s -@cindex assignments as filenames -@cindex filenames, assignments as +@cindex assignments as file names +@cindex file names, assignments as Occasionally, you might not want @command{awk} to process command-line variable assignments (@pxref{Assignment Options}). @@ -28850,7 +28865,6 @@ is covered. @node String Extraction @subsection Extracting Marked Strings @cindex strings, extracting -@cindex marked strings@comma{} extracting @cindex @option{--gen-pot} option @cindex command-line options, string extraction @cindex string extraction (internationalization) @@ -30199,7 +30213,6 @@ functions that called the one you are in. The commands for doing this are: @cindex debugger commands, @code{where} (@code{backtrace}) @cindex @code{backtrace} debugger command @cindex @code{bt} debugger command (alias for @code{backtrace}) -@cindex @code{where} debugger command @cindex @code{where} debugger command (alias for @code{backtrace}) @cindex call stack, display in debugger @cindex traceback, display in debugger @@ -31176,7 +31189,7 @@ version of @command{gawk}. @cindex arbitrary precision @cindex multiple precision @cindex infinite precision -@cindex floating-point, numbers@comma{} arbitrary precision +@cindex floating-point, numbers@comma{} arbitrary-precision This @value{CHAPTER} introduces some basic concepts relating to how computers do arithmetic and defines some important terms. @@ -38836,7 +38849,7 @@ The development of the extension API first released with Arnold Robbins and Andrew Schorr, with notable contributions from the rest of the development team. -@cindex Malmberg, John E. +@cindex Malmberg, John @item John Malmberg contributed significant improvements to the OpenVMS port and the related documentation. @@ -40409,6 +40422,7 @@ makes this implementation available. You can view the files one at a time from @cindex @command{goawk} @cindex Go implementation of @command{awk} @cindex source code, @command{goawk} +@cindex programming languages, Go @item @command{goawk} This is an @command{awk} interpreter written in the @uref{https://golang.org/, Go programming language}. @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2015, 2017, 2018, + * Copyright (C) 2012, 2013, 2015, 2017, 2018, 2019, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -1265,11 +1265,13 @@ do_mpfr_intdiv(int nargs) lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = quotient; + unref(sub); sub = make_string("remainder", 9); lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = remainder; + unref(sub); return make_number((AWKNUM) 0.0); } |