diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 31 | ||||
-rw-r--r-- | doc/gawk.info | 1316 | ||||
-rw-r--r-- | doc/gawk.texi | 257 | ||||
-rw-r--r-- | doc/gawktexi.in | 257 | ||||
-rw-r--r-- | doc/texinfo.tex | 150 |
5 files changed, 1080 insertions, 931 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 5420ce97..47756846 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,28 @@ +2015-02-24 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Update to most current version. + * gawktexi.in: Minor edit to match an O'Reilly fix. + Add some FIXMEs to one day use @sup. + +2015-02-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Change 'div' to 'divisor' in some examples. + This future-proofs against a new function in master. + Thanks to Antonio Giovanni Colombo for the report. + +2015-02-20 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: More O'Reilly fixes. I think it's done! + +2015-02-19 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: More O'Reilly fixes. + +2015-02-17 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: A few minor formatting fixes to sync with O'Reilly + version. + 2015-02-13 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: O'Reilly fixes. Through QC1 review. @@ -62,7 +87,7 @@ 2015-01-23 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: O'Reilly fixes. - (Glossary): Many new entries from Antonio Giovanni Columbo. + (Glossary): Many new entries from Antonio Giovanni Colombo. 2015-01-21 Arnold D. Robbins <arnold@skeeve.com> @@ -95,7 +120,7 @@ * gawktexi.in: Add one more paragraph to new foreword. * gawktexi.in: Fix exponentiation in TeX mode. Thanks to - Marco Curreli by way of Antonio Giovanni Columbo. + Marco Curreli by way of Antonio Giovanni Colombo. * texinfo.tex: Updated. @@ -165,7 +190,7 @@ 2014-10-17 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Fix date in docbook attribution for new Foreword; - thanks to Antonio Columbo for the catch. Update latest version + thanks to Antonio Colombo for the catch. Update latest version of gettext. 2014-10-15 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index 2537830e..83a5d818 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -955,7 +955,7 @@ provided in *note Language History::. The language described in this Info file is often referred to as "new `awk'." By analogy, the original version of `awk' is referred to as "old `awk'." - Today, on most systems, when you run the `awk' utility you get some + On most current systems, when you run the `awk' utility you get some version of new `awk'.(1) If your system's standard `awk' is the old one, you will see something like this if you try the test program: @@ -1875,7 +1875,7 @@ file surrounded by double quotes: File: gawk.info, Node: Sample Data Files, Next: Very Simple, Prev: Running gawk, Up: Getting Started -1.2 Data Files for the Examples +1.2 Data files for the Examples =============================== Many of the examples in this Info file take their input from two sample @@ -6527,7 +6527,7 @@ which they may appear: messages at runtime. *Note Printf Ordering::, which describes how and why to use positional specifiers. For now, we ignore them. -`- (Minus)' +`-' (Minus) The minus sign, used before the width modifier (see later on in this list), says to left-justify the argument within its specified width. Normally, the argument is printed right-justified in the @@ -6537,7 +6537,7 @@ which they may appear: prints `foo*'. -`SPACE' +SPACE For numeric conversions, prefix positive values with a space and negative values with a minus sign. @@ -6582,7 +6582,7 @@ which they may appear: programs. For information on appropriate quoting tricks, see *note Quoting::. -`WIDTH' +WIDTH This is a number specifying the desired minimum width of a field. Inserting any number between the `%' sign and the format-control character forces the field to expand to this width. The default @@ -6960,7 +6960,7 @@ option (*note Options::). File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Special FD, Up: Printing -5.8 Special File Names in `gawk' +5.8 Special File names in `gawk' ================================ Besides access to standard input, standard output, and standard error, @@ -7021,7 +7021,7 @@ mentioned here only for completeness. Full discussion is delayed until File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special Files -5.8.3 Special File Name Caveats +5.8.3 Special File name Caveats ------------------------------- Here are some things to bear in mind when using the special file names @@ -9880,12 +9880,12 @@ divisor of any integer, and also identifies prime numbers: # find smallest divisor of num { num = $1 - for (div = 2; div * div <= num; div++) { - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) { + if (num % divisor == 0) break } - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num } @@ -9903,12 +9903,12 @@ Statement::.) # find smallest divisor of num { num = $1 - for (div = 2; ; div++) { - if (num % div == 0) { - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) { + if (num % divisor == 0) { + printf "Smallest divisor of %d is %d\n", num, divisor break } - if (div * div > num) { + if (divisor * divisor > num) { printf "%d is prime\n", num break } @@ -10243,15 +10243,14 @@ description of each variable.) `IGNORECASE #' If `IGNORECASE' is nonzero or non-null, then all string comparisons - and all regular expression matching are case-independent. Thus, - regexp matching with `~' and `!~', as well as the `gensub()', + and all regular expression matching are case-independent. This + applies to regexp matching with `~' and `!~', the `gensub()', `gsub()', `index()', `match()', `patsplit()', `split()', and `sub()' functions, record termination with `RS', and field - splitting with `FS' and `FPAT', all ignore case when doing their - particular regexp operations. However, the value of `IGNORECASE' - does _not_ affect array subscripting and it does not affect field - splitting when using a single-character field separator. *Note - Case-sensitivity::. + splitting with `FS' and `FPAT'. However, the value of + `IGNORECASE' does _not_ affect array subscripting and it does not + affect field splitting when using a single-character field + separator. *Note Case-sensitivity::. `LINT #' When this variable is true (nonzero or non-null), `gawk' behaves @@ -14377,61 +14376,7 @@ names of the two comparison functions: -| rsort: <100.0 95.6 93.4 87.1> Another example where indirect functions calls are useful can be -found in processing arrays. *note Walking Arrays::, presented a simple -function for "walking" an array of arrays. That function simply -printed the name and value of each scalar array element. However, it is -easy to generalize that function, by passing in the name of a function -to call when walking an array. The modified function looks like this: - - function process_array(arr, name, process, do_arrays, i, new_name) - { - for (i in arr) { - new_name = (name "[" i "]") - if (isarray(arr[i])) { - if (do_arrays) - @process(new_name, arr[i]) - process_array(arr[i], new_name, process, do_arrays) - } else - @process(new_name, arr[i]) - } - } - - The arguments are as follows: - -`arr' - The array. - -`name' - The name of the array (a string). - -`process' - The name of the function to call. - -`do_arrays' - If this is true, the function can handle elements that are - subarrays. - - If subarrays are to be processed, that is done before walking them -further. - - When run with the following scaffolding, the function produces the -same results as does the earlier `walk_array()' function: - - BEGIN { - a[1] = 1 - a[2][1] = 21 - a[2][2] = 22 - a[3] = 3 - a[4][1][1] = 411 - a[4][2] = 42 - - process_array(a, "a", "do_print", 0) - } - - function do_print(name, element) - { - printf "%s = %s\n", name, element - } +found in processing arrays. This is described in *note Walking Arrays::. Remember that you must supply a leading `@' in front of an indirect function call. @@ -15299,7 +15244,7 @@ three-character string `"\"'\""': File: gawk.info, Node: Data File Management, Next: Getopt Function, Prev: General Functions, Up: Library Functions -10.3 Data File Management +10.3 Data file Management ========================= This minor node presents functions that are useful for managing @@ -15316,7 +15261,7 @@ command-line data files. File: gawk.info, Node: Filetrans Function, Next: Rewind Function, Up: Data File Management -10.3.1 Noting Data File Boundaries +10.3.1 Noting Data file Boundaries ---------------------------------- The `BEGIN' and `END' rules are each executed exactly once, at the @@ -15454,7 +15399,7 @@ rule finishes!) File: gawk.info, Node: File Checking, Next: Empty Files, Prev: Rewind Function, Up: Data File Management -10.3.3 Checking for Readable Data Files +10.3.3 Checking for Readable Data files --------------------------------------- Normally, if you give `awk' a data file that isn't readable, it stops @@ -15544,7 +15489,7 @@ of the `for' loop uses the `<=' operator, not `<'. File: gawk.info, Node: Ignoring Assigns, Prev: Empty Files, Up: Data File Management -10.3.5 Treating Assignments as File Names +10.3.5 Treating Assignments as File names ----------------------------------------- Occasionally, you might not want `awk' to process command-line variable @@ -16408,6 +16353,61 @@ value. Here is a main program to demonstrate: -| a[4][1][1] = 411 -| a[4][2] = 42 + The function just presented simply prints the name and value of each +scalar array element. However, it is easy to generalize it, by passing +in the name of a function to call when walking an array. The modified +function looks like this: + + function process_array(arr, name, process, do_arrays, i, new_name) + { + for (i in arr) { + new_name = (name "[" i "]") + if (isarray(arr[i])) { + if (do_arrays) + @process(new_name, arr[i]) + process_array(arr[i], new_name, process, do_arrays) + } else + @process(new_name, arr[i]) + } + } + + The arguments are as follows: + +`arr' + The array. + +`name' + The name of the array (a string). + +`process' + The name of the function to call. + +`do_arrays' + If this is true, the function can handle elements that are + subarrays. + + If subarrays are to be processed, that is done before walking them +further. + + When run with the following scaffolding, the function produces the +same results as does the earlier version of `walk_array()': + + BEGIN { + a[1] = 1 + a[2][1] = 21 + a[2][2] = 22 + a[3] = 3 + a[4][1][1] = 411 + a[4][2] = 42 + + process_array(a, "a", "do_print", 0) + } + + function do_print(name, element) + { + printf "%s = %s\n", name, element + } + File: gawk.info, Node: Library Functions Summary, Next: Library Exercises, Prev: Walking Arrays, Up: Library Functions @@ -16442,7 +16442,7 @@ File: gawk.info, Node: Library Functions Summary, Next: Library Exercises, Pr Two sets of routines that parallel the C library versions Traversing arrays of arrays - A simple function to traverse an array of arrays to any depth + Two functions that traverse an array of arrays to any depth @@ -22736,9 +22736,9 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob using the GMP library. This is faster and more space-efficient than using MPFR for the same calculations. - * There are several "dark corners" with respect to floating-point - numbers where `gawk' disagrees with the POSIX standard. It pays - to be aware of them. + * There are several areas with respect to floating-point numbers + where `gawk' disagrees with the POSIX standard. It pays to be + aware of them. * Overall, there is no need to be unduly suspicious about the results from floating-point arithmetic. The lesson to remember is @@ -23331,14 +23331,14 @@ This node presents them all as function prototypes, in the way that extension code would use them: `static inline awk_value_t *' -`make_const_string(const char *string, size_t length, awk_value_t *result)' +`make_const_string(const char *string, size_t length, awk_value_t *result);' This function creates a string value in the `awk_value_t' variable pointed to by `result'. It expects `string' to be a C string constant (or other string data), and automatically creates a _copy_ of the data for storage in `result'. It returns `result'. `static inline awk_value_t *' -`make_malloced_string(const char *string, size_t length, awk_value_t *result)' +`make_malloced_string(const char *string, size_t length, awk_value_t *result);' This function creates a string value in the `awk_value_t' variable pointed to by `result'. It expects `string' to be a `char *' value pointing to data previously obtained from `gawk_malloc()', @@ -23347,13 +23347,13 @@ extension code would use them: for it. It returns `result'. `static inline awk_value_t *' -`make_null_string(awk_value_t *result)' +`make_null_string(awk_value_t *result);' This specialized function creates a null string (the "undefined" value) in the `awk_value_t' variable pointed to by `result'. It returns `result'. `static inline awk_value_t *' -`make_number(double num, awk_value_t *result)' +`make_number(double num, awk_value_t *result);' This function simply creates a numeric value in the `awk_value_t' variable pointed to by `result'. @@ -32738,7 +32738,7 @@ Index (line 6) * differences in awk and gawk, line continuations: Conditional Exp. (line 34) -* differences in awk and gawk, LINT variable: User-modified. (line 88) +* differences in awk and gawk, LINT variable: User-modified. (line 87) * differences in awk and gawk, match() function: String Functions. (line 263) * differences in awk and gawk, print/printf statements: Format Modifiers. @@ -32763,7 +32763,7 @@ Index (line 77) * differences in awk and gawk, SYMTAB variable: Auto-set. (line 283) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. - (line 152) + (line 151) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. (line 66) * directories, command-line: Command-line directories. @@ -33226,7 +33226,7 @@ Index (line 6) * gawk, interval expressions and: Regexp Operators. (line 139) * gawk, line continuation in: Conditional Exp. (line 34) -* gawk, LINT variable in: User-modified. (line 88) +* gawk, LINT variable in: User-modified. (line 87) * gawk, list of contributors to: Contributors. (line 6) * gawk, MS-DOS version of: PC Using. (line 10) * gawk, MS-Windows version of: PC Using. (line 10) @@ -33252,7 +33252,7 @@ Index * gawk, splitting fields and: Constant Size. (line 87) * gawk, string-translation functions: I18N Functions. (line 6) * gawk, SYMTAB array in: Auto-set. (line 283) -* gawk, TEXTDOMAIN variable in: User-modified. (line 152) +* gawk, TEXTDOMAIN variable in: User-modified. (line 151) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) * gawk, versions of, information about, printing: Options. (line 300) @@ -33456,7 +33456,7 @@ Index * internationalization: I18N Functions. (line 6) * internationalization, localization <1>: Internationalization. (line 13) -* internationalization, localization: User-modified. (line 152) +* internationalization, localization: User-modified. (line 151) * internationalization, localization, character classes: Bracket Expressions. (line 101) * internationalization, localization, gawk and: Internationalization. @@ -33566,7 +33566,7 @@ Index * lines, duplicate, removing: History Sorting. (line 6) * lines, matching ranges of: Ranges. (line 6) * lines, skipping between markers: Ranges. (line 43) -* lint checking: User-modified. (line 88) +* lint checking: User-modified. (line 87) * lint checking, array elements: Delete. (line 34) * lint checking, array subscripts: Uninitialized Subscripts. (line 43) @@ -33576,7 +33576,7 @@ Index (line 339) * lint checking, undefined functions: Pass By Value/Reference. (line 85) -* LINT variable: User-modified. (line 88) +* LINT variable: User-modified. (line 87) * Linux <1>: Glossary. (line 753) * Linux <2>: I18N Example. (line 55) * Linux: Manual History. (line 28) @@ -33748,11 +33748,11 @@ Index * obsolete features: Obsolete. (line 6) * octal numbers: Nondecimal-numbers. (line 6) * octal values, enabling interpretation of: Options. (line 211) -* OFMT variable <1>: User-modified. (line 105) +* OFMT variable <1>: User-modified. (line 104) * OFMT variable <2>: Strings And Numbers. (line 57) * OFMT variable: OFMT. (line 15) * OFMT variable, POSIX awk and: OFMT. (line 27) -* OFS variable <1>: User-modified. (line 114) +* OFS variable <1>: User-modified. (line 113) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) * OpenBSD: Glossary. (line 753) @@ -33805,7 +33805,7 @@ Index (line 12) * ord() user-defined function: Ordinal Functions. (line 16) * order of evaluation, concatenation: Concatenation. (line 41) -* ORS variable <1>: User-modified. (line 119) +* ORS variable <1>: User-modified. (line 118) * ORS variable: Output Separators. (line 21) * output field separator, See OFS variable: Changing Fields. (line 64) * output record separator, See ORS variable: Output Separators. @@ -33945,7 +33945,7 @@ Index * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) * POSIXLY_CORRECT environment variable: Options. (line 339) -* PREC variable: User-modified. (line 124) +* PREC variable: User-modified. (line 123) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) * precedence, regexp operators: Regexp Operators. (line 156) @@ -33960,7 +33960,7 @@ Index * print statement, commas, omitting: Print Examples. (line 31) * print statement, I/O operators in: Precedence. (line 71) * print statement, line continuations and: Print Examples. (line 76) -* print statement, OFMT variable and: User-modified. (line 114) +* print statement, OFMT variable and: User-modified. (line 113) * print statement, See Also redirection, of output: Redirection. (line 17) * print statement, sprintf() function and: Round Function. (line 6) @@ -34075,7 +34075,7 @@ Index * readfile() user-defined function: Readfile Function. (line 30) * reading input files: Reading Files. (line 6) * recipe for a programming language: History. (line 6) -* record separators <1>: User-modified. (line 133) +* record separators <1>: User-modified. (line 132) * record separators: awk split records. (line 6) * record separators, changing: awk split records. (line 85) * record separators, regular expressions as: awk split records. @@ -34187,8 +34187,8 @@ Index * round to nearest integer: Numeric Functions. (line 38) * round() user-defined function: Round Function. (line 16) * rounding numbers: Round Function. (line 6) -* ROUNDMODE variable: User-modified. (line 128) -* RS variable <1>: User-modified. (line 133) +* ROUNDMODE variable: User-modified. (line 127) +* RS variable <1>: User-modified. (line 132) * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 53) @@ -34245,12 +34245,12 @@ Index * separators, field, FIELDWIDTHS variable and: User-modified. (line 37) * separators, field, FPAT variable and: User-modified. (line 43) * separators, field, POSIX and: Fields. (line 6) -* separators, for records <1>: User-modified. (line 133) +* separators, for records <1>: User-modified. (line 132) * separators, for records: awk split records. (line 6) * separators, for records, regular expressions as: awk split records. (line 125) * separators, for statements in actions: Action Overview. (line 19) -* separators, subscript: User-modified. (line 146) +* separators, subscript: User-modified. (line 145) * set breakpoint: Breakpoint Control. (line 11) * set debugger command: Viewing And Changing Data. (line 59) @@ -34382,7 +34382,7 @@ Index * split.awk program: Split Program. (line 30) * sprintf <1>: String Functions. (line 384) * sprintf: OFMT. (line 15) -* sprintf() function, OFMT variable and: User-modified. (line 114) +* sprintf() function, OFMT variable and: User-modified. (line 113) * sprintf() function, print/printf statements and: Round Function. (line 6) * sqrt: Numeric Functions. (line 92) @@ -34444,7 +34444,7 @@ Index (line 43) * sub() function, arguments of: String Functions. (line 463) * sub() function, escape processing: Gory Details. (line 6) -* subscript separators: User-modified. (line 146) +* subscript separators: User-modified. (line 145) * subscripts in arrays, multidimensional: Multidimensional. (line 10) * subscripts in arrays, multidimensional, scanning: Multiscanning. (line 11) @@ -34452,7 +34452,7 @@ Index (line 6) * subscripts in arrays, uninitialized variables as: Uninitialized Subscripts. (line 6) -* SUBSEP variable: User-modified. (line 146) +* SUBSEP variable: User-modified. (line 145) * SUBSEP variable, and multidimensional arrays: Multidimensional. (line 16) * substitute in string: String Functions. (line 90) @@ -34491,7 +34491,7 @@ Index * text, printing: Print. (line 22) * text, printing, unduplicated lines of: Uniq Program. (line 6) * TEXTDOMAIN variable <1>: Programmer i18n. (line 8) -* TEXTDOMAIN variable: User-modified. (line 152) +* TEXTDOMAIN variable: User-modified. (line 151) * TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n. (line 60) * TEXTDOMAIN variable, portability and: I18N Portability. (line 20) * textdomain() function (C library): Explaining gettext. (line 28) @@ -34739,553 +34739,553 @@ Ref: Preface-Footnote-251244 Ref: Preface-Footnote-351477 Node: History51619 Node: Names53970 -Ref: Names-Footnote-155063 -Node: This Manual55209 -Ref: This Manual-Footnote-161709 -Node: Conventions61809 -Node: Manual History64146 -Ref: Manual History-Footnote-167139 -Ref: Manual History-Footnote-267180 -Node: How To Contribute67254 -Node: Acknowledgments68383 -Node: Getting Started73249 -Node: Running gawk75688 -Node: One-shot76878 -Node: Read Terminal78142 -Node: Long80173 -Node: Executable Scripts81686 -Ref: Executable Scripts-Footnote-184475 -Node: Comments84578 -Node: Quoting87060 -Node: DOS Quoting92578 -Node: Sample Data Files93253 -Node: Very Simple95848 -Node: Two Rules100747 -Node: More Complex102633 -Node: Statements/Lines105495 -Ref: Statements/Lines-Footnote-1109950 -Node: Other Features110215 -Node: When111151 -Ref: When-Footnote-1112905 -Node: Intro Summary112970 -Node: Invoking Gawk113854 -Node: Command Line115368 -Node: Options116166 -Ref: Options-Footnote-1131961 -Ref: Options-Footnote-2132190 -Node: Other Arguments132215 -Node: Naming Standard Input135163 -Node: Environment Variables136256 -Node: AWKPATH Variable136814 -Ref: AWKPATH Variable-Footnote-1140221 -Ref: AWKPATH Variable-Footnote-2140266 -Node: AWKLIBPATH Variable140526 -Node: Other Environment Variables141782 -Node: Exit Status145300 -Node: Include Files145976 -Node: Loading Shared Libraries149565 -Node: Obsolete150992 -Node: Undocumented151684 -Node: Invoking Summary151951 -Node: Regexp153614 -Node: Regexp Usage155068 -Node: Escape Sequences157105 -Node: Regexp Operators163334 -Ref: Regexp Operators-Footnote-1170744 -Ref: Regexp Operators-Footnote-2170891 -Node: Bracket Expressions170989 -Ref: table-char-classes173004 -Node: Leftmost Longest175946 -Node: Computed Regexps177248 -Node: GNU Regexp Operators180677 -Node: Case-sensitivity184349 -Ref: Case-sensitivity-Footnote-1187234 -Ref: Case-sensitivity-Footnote-2187469 -Node: Regexp Summary187577 -Node: Reading Files189044 -Node: Records191137 -Node: awk split records191870 -Node: gawk split records196799 -Ref: gawk split records-Footnote-1201338 -Node: Fields201375 -Ref: Fields-Footnote-1204153 -Node: Nonconstant Fields204239 -Ref: Nonconstant Fields-Footnote-1206477 -Node: Changing Fields206680 -Node: Field Separators212611 -Node: Default Field Splitting215315 -Node: Regexp Field Splitting216432 -Node: Single Character Fields219782 -Node: Command Line Field Separator220841 -Node: Full Line Fields224058 -Ref: Full Line Fields-Footnote-1225579 -Ref: Full Line Fields-Footnote-2225625 -Node: Field Splitting Summary225726 -Node: Constant Size227800 -Node: Splitting By Content232383 -Ref: Splitting By Content-Footnote-1236348 -Node: Multiple Line236511 -Ref: Multiple Line-Footnote-1242392 -Node: Getline242571 -Node: Plain Getline244778 -Node: Getline/Variable247418 -Node: Getline/File248567 -Node: Getline/Variable/File249952 -Ref: Getline/Variable/File-Footnote-1251555 -Node: Getline/Pipe251642 -Node: Getline/Variable/Pipe254320 -Node: Getline/Coprocess255451 -Node: Getline/Variable/Coprocess256715 -Node: Getline Notes257454 -Node: Getline Summary260248 -Ref: table-getline-variants260660 -Node: Read Timeout261489 -Ref: Read Timeout-Footnote-1265326 -Node: Command-line directories265384 -Node: Input Summary266289 -Node: Input Exercises269674 -Node: Printing270402 -Node: Print272237 -Node: Print Examples273694 -Node: Output Separators276473 -Node: OFMT278491 -Node: Printf279846 -Node: Basic Printf280631 -Node: Control Letters282203 -Node: Format Modifiers286188 -Node: Printf Examples292198 -Node: Redirection294684 -Node: Special FD301522 -Ref: Special FD-Footnote-1304688 -Node: Special Files304762 -Node: Other Inherited Files305379 -Node: Special Network306379 -Node: Special Caveats307241 -Node: Close Files And Pipes308190 -Ref: Close Files And Pipes-Footnote-1315375 -Ref: Close Files And Pipes-Footnote-2315523 -Node: Nonfatal315673 -Node: Output Summary317596 -Node: Output Exercises318817 -Node: Expressions319497 -Node: Values320686 -Node: Constants321363 -Node: Scalar Constants322054 -Ref: Scalar Constants-Footnote-1322916 -Node: Nondecimal-numbers323166 -Node: Regexp Constants326176 -Node: Using Constant Regexps326702 -Node: Variables329865 -Node: Using Variables330522 -Node: Assignment Options332433 -Node: Conversion334308 -Node: Strings And Numbers334832 -Ref: Strings And Numbers-Footnote-1337897 -Node: Locale influences conversions338006 -Ref: table-locale-affects340752 -Node: All Operators341344 -Node: Arithmetic Ops341973 -Node: Concatenation344478 -Ref: Concatenation-Footnote-1347297 -Node: Assignment Ops347404 -Ref: table-assign-ops352383 -Node: Increment Ops353693 -Node: Truth Values and Conditions357124 -Node: Truth Values358207 -Node: Typing and Comparison359256 -Node: Variable Typing360072 -Node: Comparison Operators363739 -Ref: table-relational-ops364149 -Node: POSIX String Comparison367644 -Ref: POSIX String Comparison-Footnote-1368716 -Node: Boolean Ops368855 -Ref: Boolean Ops-Footnote-1373333 -Node: Conditional Exp373424 -Node: Function Calls375162 -Node: Precedence379042 -Node: Locales382702 -Node: Expressions Summary384334 -Node: Patterns and Actions386905 -Node: Pattern Overview388025 -Node: Regexp Patterns389704 -Node: Expression Patterns390247 -Node: Ranges394027 -Node: BEGIN/END397134 -Node: Using BEGIN/END397895 -Ref: Using BEGIN/END-Footnote-1400631 -Node: I/O And BEGIN/END400737 -Node: BEGINFILE/ENDFILE403052 -Node: Empty405949 -Node: Using Shell Variables406266 -Node: Action Overview408539 -Node: Statements410865 -Node: If Statement412713 -Node: While Statement414208 -Node: Do Statement416236 -Node: For Statement417384 -Node: Switch Statement420542 -Node: Break Statement422924 -Node: Continue Statement424965 -Node: Next Statement426792 -Node: Nextfile Statement429173 -Node: Exit Statement431801 -Node: Built-in Variables434212 -Node: User-modified435345 -Ref: User-modified-Footnote-1443048 -Node: Auto-set443110 -Ref: Auto-set-Footnote-1456819 -Ref: Auto-set-Footnote-2457024 -Node: ARGC and ARGV457080 -Node: Pattern Action Summary461298 -Node: Arrays463731 -Node: Array Basics465060 -Node: Array Intro465904 -Ref: figure-array-elements467838 -Ref: Array Intro-Footnote-1470458 -Node: Reference to Elements470586 -Node: Assigning Elements473048 -Node: Array Example473539 -Node: Scanning an Array475298 -Node: Controlling Scanning478318 -Ref: Controlling Scanning-Footnote-1483712 -Node: Numeric Array Subscripts484028 -Node: Uninitialized Subscripts486213 -Node: Delete487830 -Ref: Delete-Footnote-1490579 -Node: Multidimensional490636 -Node: Multiscanning493733 -Node: Arrays of Arrays495322 -Node: Arrays Summary500076 -Node: Functions502167 -Node: Built-in503206 -Node: Calling Built-in504284 -Node: Numeric Functions506279 -Ref: Numeric Functions-Footnote-1511097 -Ref: Numeric Functions-Footnote-2511454 -Ref: Numeric Functions-Footnote-3511502 -Node: String Functions511774 -Ref: String Functions-Footnote-1535275 -Ref: String Functions-Footnote-2535404 -Ref: String Functions-Footnote-3535652 -Node: Gory Details535739 -Ref: table-sub-escapes537520 -Ref: table-sub-proposed539035 -Ref: table-posix-sub540397 -Ref: table-gensub-escapes541934 -Ref: Gory Details-Footnote-1542767 -Node: I/O Functions542918 -Ref: I/O Functions-Footnote-1550154 -Node: Time Functions550301 -Ref: Time Functions-Footnote-1560810 -Ref: Time Functions-Footnote-2560878 -Ref: Time Functions-Footnote-3561036 -Ref: Time Functions-Footnote-4561147 -Ref: Time Functions-Footnote-5561259 -Ref: Time Functions-Footnote-6561486 -Node: Bitwise Functions561752 -Ref: table-bitwise-ops562314 -Ref: Bitwise Functions-Footnote-1566642 -Node: Type Functions566814 -Node: I18N Functions567966 -Node: User-defined569613 -Node: Definition Syntax570418 -Ref: Definition Syntax-Footnote-1576077 -Node: Function Example576148 -Ref: Function Example-Footnote-1579069 -Node: Function Caveats579091 -Node: Calling A Function579609 -Node: Variable Scope580567 -Node: Pass By Value/Reference583560 -Node: Return Statement587057 -Node: Dynamic Typing590036 -Node: Indirect Calls590965 -Ref: Indirect Calls-Footnote-1602271 -Node: Functions Summary602399 -Node: Library Functions605101 -Ref: Library Functions-Footnote-1608709 -Ref: Library Functions-Footnote-2608852 -Node: Library Names609023 -Ref: Library Names-Footnote-1612481 -Ref: Library Names-Footnote-2612704 -Node: General Functions612790 -Node: Strtonum Function613893 -Node: Assert Function616915 -Node: Round Function620239 -Node: Cliff Random Function621780 -Node: Ordinal Functions622796 -Ref: Ordinal Functions-Footnote-1625859 -Ref: Ordinal Functions-Footnote-2626111 -Node: Join Function626322 -Ref: Join Function-Footnote-1628092 -Node: Getlocaltime Function628292 -Node: Readfile Function632036 -Node: Shell Quoting634008 -Node: Data File Management635409 -Node: Filetrans Function636041 -Node: Rewind Function640137 -Node: File Checking641523 -Ref: File Checking-Footnote-1642856 -Node: Empty Files643057 -Node: Ignoring Assigns645036 -Node: Getopt Function646586 -Ref: Getopt Function-Footnote-1658050 -Node: Passwd Functions658250 -Ref: Passwd Functions-Footnote-1667090 -Node: Group Functions667178 -Ref: Group Functions-Footnote-1675075 -Node: Walking Arrays675280 -Node: Library Functions Summary676880 -Node: Library Exercises678284 -Node: Sample Programs679564 -Node: Running Examples680334 -Node: Clones681062 -Node: Cut Program682286 -Node: Egrep Program692006 -Ref: Egrep Program-Footnote-1699509 -Node: Id Program699619 -Node: Split Program703295 -Ref: Split Program-Footnote-1706749 -Node: Tee Program706877 -Node: Uniq Program709666 -Node: Wc Program717085 -Ref: Wc Program-Footnote-1721335 -Node: Miscellaneous Programs721429 -Node: Dupword Program722642 -Node: Alarm Program724673 -Node: Translate Program729478 -Ref: Translate Program-Footnote-1734041 -Node: Labels Program734311 -Ref: Labels Program-Footnote-1737662 -Node: Word Sorting737746 -Node: History Sorting741816 -Node: Extract Program743651 -Node: Simple Sed751175 -Node: Igawk Program754245 -Ref: Igawk Program-Footnote-1768571 -Ref: Igawk Program-Footnote-2768772 -Ref: Igawk Program-Footnote-3768894 -Node: Anagram Program769009 -Node: Signature Program772070 -Node: Programs Summary773317 -Node: Programs Exercises774538 -Ref: Programs Exercises-Footnote-1778669 -Node: Advanced Features778760 -Node: Nondecimal Data780742 -Node: Array Sorting782332 -Node: Controlling Array Traversal783032 -Ref: Controlling Array Traversal-Footnote-1791398 -Node: Array Sorting Functions791516 -Ref: Array Sorting Functions-Footnote-1795402 -Node: Two-way I/O795598 -Ref: Two-way I/O-Footnote-1800543 -Ref: Two-way I/O-Footnote-2800729 -Node: TCP/IP Networking800811 -Node: Profiling803683 -Node: Advanced Features Summary811954 -Node: Internationalization813887 -Node: I18N and L10N815367 -Node: Explaining gettext816053 -Ref: Explaining gettext-Footnote-1821078 -Ref: Explaining gettext-Footnote-2821262 -Node: Programmer i18n821427 -Ref: Programmer i18n-Footnote-1826303 -Node: Translator i18n826352 -Node: String Extraction827146 -Ref: String Extraction-Footnote-1828277 -Node: Printf Ordering828363 -Ref: Printf Ordering-Footnote-1831149 -Node: I18N Portability831213 -Ref: I18N Portability-Footnote-1833669 -Node: I18N Example833732 -Ref: I18N Example-Footnote-1836535 -Node: Gawk I18N836607 -Node: I18N Summary837251 -Node: Debugger838591 -Node: Debugging839613 -Node: Debugging Concepts840054 -Node: Debugging Terms841864 -Node: Awk Debugging844436 -Node: Sample Debugging Session845342 -Node: Debugger Invocation845876 -Node: Finding The Bug847261 -Node: List of Debugger Commands853740 -Node: Breakpoint Control855072 -Node: Debugger Execution Control858749 -Node: Viewing And Changing Data862108 -Node: Execution Stack865484 -Node: Debugger Info867119 -Node: Miscellaneous Debugger Commands871164 -Node: Readline Support876165 -Node: Limitations877059 -Node: Debugging Summary879174 -Node: Arbitrary Precision Arithmetic880348 -Node: Computer Arithmetic881764 -Ref: table-numeric-ranges885363 -Ref: Computer Arithmetic-Footnote-1885887 -Node: Math Definitions885944 -Ref: table-ieee-formats889239 -Ref: Math Definitions-Footnote-1889843 -Node: MPFR features889948 -Node: FP Math Caution891619 -Ref: FP Math Caution-Footnote-1892669 -Node: Inexactness of computations893038 -Node: Inexact representation893997 -Node: Comparing FP Values895355 -Node: Errors accumulate896437 -Node: Getting Accuracy897869 -Node: Try To Round900573 -Node: Setting precision901472 -Ref: table-predefined-precision-strings902156 -Node: Setting the rounding mode903985 -Ref: table-gawk-rounding-modes904349 -Ref: Setting the rounding mode-Footnote-1907801 -Node: Arbitrary Precision Integers907980 -Ref: Arbitrary Precision Integers-Footnote-1912878 -Node: POSIX Floating Point Problems913027 -Ref: POSIX Floating Point Problems-Footnote-1916906 -Node: Floating point summary916944 -Node: Dynamic Extensions919140 -Node: Extension Intro920692 -Node: Plugin License921957 -Node: Extension Mechanism Outline922754 -Ref: figure-load-extension923182 -Ref: figure-register-new-function924662 -Ref: figure-call-new-function925666 -Node: Extension API Description927653 -Node: Extension API Functions Introduction929103 -Node: General Data Types933924 -Ref: General Data Types-Footnote-1939824 -Node: Memory Allocation Functions940123 -Ref: Memory Allocation Functions-Footnote-1942962 -Node: Constructor Functions943061 -Node: Registration Functions944796 -Node: Extension Functions945481 -Node: Exit Callback Functions947778 -Node: Extension Version String949026 -Node: Input Parsers949689 -Node: Output Wrappers959564 -Node: Two-way processors964077 -Node: Printing Messages966340 -Ref: Printing Messages-Footnote-1967416 -Node: Updating `ERRNO'967568 -Node: Requesting Values968308 -Ref: table-value-types-returned969035 -Node: Accessing Parameters969992 -Node: Symbol Table Access971226 -Node: Symbol table by name971740 -Node: Symbol table by cookie973760 -Ref: Symbol table by cookie-Footnote-1977905 -Node: Cached values977968 -Ref: Cached values-Footnote-1981464 -Node: Array Manipulation981555 -Ref: Array Manipulation-Footnote-1982653 -Node: Array Data Types982690 -Ref: Array Data Types-Footnote-1985345 -Node: Array Functions985437 -Node: Flattening Arrays989296 -Node: Creating Arrays996198 -Node: Extension API Variables1000969 -Node: Extension Versioning1001605 -Node: Extension API Informational Variables1003496 -Node: Extension API Boilerplate1004561 -Node: Finding Extensions1008370 -Node: Extension Example1008930 -Node: Internal File Description1009702 -Node: Internal File Ops1013769 -Ref: Internal File Ops-Footnote-11025520 -Node: Using Internal File Ops1025660 -Ref: Using Internal File Ops-Footnote-11028043 -Node: Extension Samples1028316 -Node: Extension Sample File Functions1029844 -Node: Extension Sample Fnmatch1037525 -Node: Extension Sample Fork1039013 -Node: Extension Sample Inplace1040228 -Node: Extension Sample Ord1041904 -Node: Extension Sample Readdir1042740 -Ref: table-readdir-file-types1043617 -Node: Extension Sample Revout1044428 -Node: Extension Sample Rev2way1045017 -Node: Extension Sample Read write array1045757 -Node: Extension Sample Readfile1047697 -Node: Extension Sample Time1048792 -Node: Extension Sample API Tests1050140 -Node: gawkextlib1050631 -Node: Extension summary1053309 -Node: Extension Exercises1056998 -Node: Language History1057720 -Node: V7/SVR3.11059376 -Node: SVR41061529 -Node: POSIX1062963 -Node: BTL1064344 -Node: POSIX/GNU1065075 -Node: Feature History1070911 -Node: Common Extensions1084705 -Node: Ranges and Locales1086077 -Ref: Ranges and Locales-Footnote-11090696 -Ref: Ranges and Locales-Footnote-21090723 -Ref: Ranges and Locales-Footnote-31090958 -Node: Contributors1091179 -Node: History summary1096719 -Node: Installation1098098 -Node: Gawk Distribution1099044 -Node: Getting1099528 -Node: Extracting1100351 -Node: Distribution contents1101988 -Node: Unix Installation1108090 -Node: Quick Installation1108773 -Node: Shell Startup Files1111184 -Node: Additional Configuration Options1112263 -Node: Configuration Philosophy1114067 -Node: Non-Unix Installation1116436 -Node: PC Installation1116894 -Node: PC Binary Installation1118214 -Node: PC Compiling1120062 -Ref: PC Compiling-Footnote-11123083 -Node: PC Testing1123192 -Node: PC Using1124368 -Node: Cygwin1128483 -Node: MSYS1129253 -Node: VMS Installation1129754 -Node: VMS Compilation1130546 -Ref: VMS Compilation-Footnote-11131775 -Node: VMS Dynamic Extensions1131833 -Node: VMS Installation Details1133517 -Node: VMS Running1135768 -Node: VMS GNV1138608 -Node: VMS Old Gawk1139343 -Node: Bugs1139813 -Node: Other Versions1143702 -Node: Installation summary1150136 -Node: Notes1151195 -Node: Compatibility Mode1152060 -Node: Additions1152842 -Node: Accessing The Source1153767 -Node: Adding Code1155202 -Node: New Ports1161359 -Node: Derived Files1165841 -Ref: Derived Files-Footnote-11171316 -Ref: Derived Files-Footnote-21171350 -Ref: Derived Files-Footnote-31171946 -Node: Future Extensions1172060 -Node: Implementation Limitations1172666 -Node: Extension Design1173914 -Node: Old Extension Problems1175068 -Ref: Old Extension Problems-Footnote-11176585 -Node: Extension New Mechanism Goals1176642 -Ref: Extension New Mechanism Goals-Footnote-11180002 -Node: Extension Other Design Decisions1180191 -Node: Extension Future Growth1182299 -Node: Old Extension Mechanism1183135 -Node: Notes summary1184897 -Node: Basic Concepts1186083 -Node: Basic High Level1186764 -Ref: figure-general-flow1187036 -Ref: figure-process-flow1187635 -Ref: Basic High Level-Footnote-11190864 -Node: Basic Data Typing1191049 -Node: Glossary1194377 -Node: Copying1226306 -Node: GNU Free Documentation License1263862 -Node: Index1288998 +Ref: Names-Footnote-155064 +Node: This Manual55210 +Ref: This Manual-Footnote-161710 +Node: Conventions61810 +Node: Manual History64147 +Ref: Manual History-Footnote-167140 +Ref: Manual History-Footnote-267181 +Node: How To Contribute67255 +Node: Acknowledgments68384 +Node: Getting Started73250 +Node: Running gawk75689 +Node: One-shot76879 +Node: Read Terminal78143 +Node: Long80174 +Node: Executable Scripts81687 +Ref: Executable Scripts-Footnote-184476 +Node: Comments84579 +Node: Quoting87061 +Node: DOS Quoting92579 +Node: Sample Data Files93254 +Node: Very Simple95849 +Node: Two Rules100748 +Node: More Complex102634 +Node: Statements/Lines105496 +Ref: Statements/Lines-Footnote-1109951 +Node: Other Features110216 +Node: When111152 +Ref: When-Footnote-1112906 +Node: Intro Summary112971 +Node: Invoking Gawk113855 +Node: Command Line115369 +Node: Options116167 +Ref: Options-Footnote-1131962 +Ref: Options-Footnote-2132191 +Node: Other Arguments132216 +Node: Naming Standard Input135164 +Node: Environment Variables136257 +Node: AWKPATH Variable136815 +Ref: AWKPATH Variable-Footnote-1140222 +Ref: AWKPATH Variable-Footnote-2140267 +Node: AWKLIBPATH Variable140527 +Node: Other Environment Variables141783 +Node: Exit Status145301 +Node: Include Files145977 +Node: Loading Shared Libraries149566 +Node: Obsolete150993 +Node: Undocumented151685 +Node: Invoking Summary151952 +Node: Regexp153615 +Node: Regexp Usage155069 +Node: Escape Sequences157106 +Node: Regexp Operators163335 +Ref: Regexp Operators-Footnote-1170745 +Ref: Regexp Operators-Footnote-2170892 +Node: Bracket Expressions170990 +Ref: table-char-classes173005 +Node: Leftmost Longest175947 +Node: Computed Regexps177249 +Node: GNU Regexp Operators180678 +Node: Case-sensitivity184350 +Ref: Case-sensitivity-Footnote-1187235 +Ref: Case-sensitivity-Footnote-2187470 +Node: Regexp Summary187578 +Node: Reading Files189045 +Node: Records191138 +Node: awk split records191871 +Node: gawk split records196800 +Ref: gawk split records-Footnote-1201339 +Node: Fields201376 +Ref: Fields-Footnote-1204154 +Node: Nonconstant Fields204240 +Ref: Nonconstant Fields-Footnote-1206478 +Node: Changing Fields206681 +Node: Field Separators212612 +Node: Default Field Splitting215316 +Node: Regexp Field Splitting216433 +Node: Single Character Fields219783 +Node: Command Line Field Separator220842 +Node: Full Line Fields224059 +Ref: Full Line Fields-Footnote-1225580 +Ref: Full Line Fields-Footnote-2225626 +Node: Field Splitting Summary225727 +Node: Constant Size227801 +Node: Splitting By Content232384 +Ref: Splitting By Content-Footnote-1236349 +Node: Multiple Line236512 +Ref: Multiple Line-Footnote-1242393 +Node: Getline242572 +Node: Plain Getline244779 +Node: Getline/Variable247419 +Node: Getline/File248568 +Node: Getline/Variable/File249953 +Ref: Getline/Variable/File-Footnote-1251556 +Node: Getline/Pipe251643 +Node: Getline/Variable/Pipe254321 +Node: Getline/Coprocess255452 +Node: Getline/Variable/Coprocess256716 +Node: Getline Notes257455 +Node: Getline Summary260249 +Ref: table-getline-variants260661 +Node: Read Timeout261490 +Ref: Read Timeout-Footnote-1265327 +Node: Command-line directories265385 +Node: Input Summary266290 +Node: Input Exercises269675 +Node: Printing270403 +Node: Print272238 +Node: Print Examples273695 +Node: Output Separators276474 +Node: OFMT278492 +Node: Printf279847 +Node: Basic Printf280632 +Node: Control Letters282204 +Node: Format Modifiers286189 +Node: Printf Examples292195 +Node: Redirection294681 +Node: Special FD301519 +Ref: Special FD-Footnote-1304685 +Node: Special Files304759 +Node: Other Inherited Files305376 +Node: Special Network306376 +Node: Special Caveats307238 +Node: Close Files And Pipes308187 +Ref: Close Files And Pipes-Footnote-1315372 +Ref: Close Files And Pipes-Footnote-2315520 +Node: Nonfatal315670 +Node: Output Summary317593 +Node: Output Exercises318814 +Node: Expressions319494 +Node: Values320683 +Node: Constants321360 +Node: Scalar Constants322051 +Ref: Scalar Constants-Footnote-1322913 +Node: Nondecimal-numbers323163 +Node: Regexp Constants326173 +Node: Using Constant Regexps326699 +Node: Variables329862 +Node: Using Variables330519 +Node: Assignment Options332430 +Node: Conversion334305 +Node: Strings And Numbers334829 +Ref: Strings And Numbers-Footnote-1337894 +Node: Locale influences conversions338003 +Ref: table-locale-affects340749 +Node: All Operators341341 +Node: Arithmetic Ops341970 +Node: Concatenation344475 +Ref: Concatenation-Footnote-1347294 +Node: Assignment Ops347401 +Ref: table-assign-ops352380 +Node: Increment Ops353690 +Node: Truth Values and Conditions357121 +Node: Truth Values358204 +Node: Typing and Comparison359253 +Node: Variable Typing360069 +Node: Comparison Operators363736 +Ref: table-relational-ops364146 +Node: POSIX String Comparison367641 +Ref: POSIX String Comparison-Footnote-1368713 +Node: Boolean Ops368852 +Ref: Boolean Ops-Footnote-1373330 +Node: Conditional Exp373421 +Node: Function Calls375159 +Node: Precedence379039 +Node: Locales382699 +Node: Expressions Summary384331 +Node: Patterns and Actions386902 +Node: Pattern Overview388022 +Node: Regexp Patterns389701 +Node: Expression Patterns390244 +Node: Ranges394024 +Node: BEGIN/END397131 +Node: Using BEGIN/END397892 +Ref: Using BEGIN/END-Footnote-1400628 +Node: I/O And BEGIN/END400734 +Node: BEGINFILE/ENDFILE403049 +Node: Empty405946 +Node: Using Shell Variables406263 +Node: Action Overview408536 +Node: Statements410862 +Node: If Statement412710 +Node: While Statement414205 +Node: Do Statement416233 +Node: For Statement417381 +Node: Switch Statement420539 +Node: Break Statement422921 +Node: Continue Statement425014 +Node: Next Statement426841 +Node: Nextfile Statement429222 +Node: Exit Statement431850 +Node: Built-in Variables434261 +Node: User-modified435394 +Ref: User-modified-Footnote-1443028 +Node: Auto-set443090 +Ref: Auto-set-Footnote-1456799 +Ref: Auto-set-Footnote-2457004 +Node: ARGC and ARGV457060 +Node: Pattern Action Summary461278 +Node: Arrays463711 +Node: Array Basics465040 +Node: Array Intro465884 +Ref: figure-array-elements467818 +Ref: Array Intro-Footnote-1470438 +Node: Reference to Elements470566 +Node: Assigning Elements473028 +Node: Array Example473519 +Node: Scanning an Array475278 +Node: Controlling Scanning478298 +Ref: Controlling Scanning-Footnote-1483692 +Node: Numeric Array Subscripts484008 +Node: Uninitialized Subscripts486193 +Node: Delete487810 +Ref: Delete-Footnote-1490559 +Node: Multidimensional490616 +Node: Multiscanning493713 +Node: Arrays of Arrays495302 +Node: Arrays Summary500056 +Node: Functions502147 +Node: Built-in503186 +Node: Calling Built-in504264 +Node: Numeric Functions506259 +Ref: Numeric Functions-Footnote-1511077 +Ref: Numeric Functions-Footnote-2511434 +Ref: Numeric Functions-Footnote-3511482 +Node: String Functions511754 +Ref: String Functions-Footnote-1535255 +Ref: String Functions-Footnote-2535384 +Ref: String Functions-Footnote-3535632 +Node: Gory Details535719 +Ref: table-sub-escapes537500 +Ref: table-sub-proposed539015 +Ref: table-posix-sub540377 +Ref: table-gensub-escapes541914 +Ref: Gory Details-Footnote-1542747 +Node: I/O Functions542898 +Ref: I/O Functions-Footnote-1550134 +Node: Time Functions550281 +Ref: Time Functions-Footnote-1560790 +Ref: Time Functions-Footnote-2560858 +Ref: Time Functions-Footnote-3561016 +Ref: Time Functions-Footnote-4561127 +Ref: Time Functions-Footnote-5561239 +Ref: Time Functions-Footnote-6561466 +Node: Bitwise Functions561732 +Ref: table-bitwise-ops562294 +Ref: Bitwise Functions-Footnote-1566622 +Node: Type Functions566794 +Node: I18N Functions567946 +Node: User-defined569593 +Node: Definition Syntax570398 +Ref: Definition Syntax-Footnote-1576057 +Node: Function Example576128 +Ref: Function Example-Footnote-1579049 +Node: Function Caveats579071 +Node: Calling A Function579589 +Node: Variable Scope580547 +Node: Pass By Value/Reference583540 +Node: Return Statement587037 +Node: Dynamic Typing590016 +Node: Indirect Calls590945 +Ref: Indirect Calls-Footnote-1600810 +Node: Functions Summary600938 +Node: Library Functions603640 +Ref: Library Functions-Footnote-1607248 +Ref: Library Functions-Footnote-2607391 +Node: Library Names607562 +Ref: Library Names-Footnote-1611020 +Ref: Library Names-Footnote-2611243 +Node: General Functions611329 +Node: Strtonum Function612432 +Node: Assert Function615454 +Node: Round Function618778 +Node: Cliff Random Function620319 +Node: Ordinal Functions621335 +Ref: Ordinal Functions-Footnote-1624398 +Ref: Ordinal Functions-Footnote-2624650 +Node: Join Function624861 +Ref: Join Function-Footnote-1626631 +Node: Getlocaltime Function626831 +Node: Readfile Function630575 +Node: Shell Quoting632547 +Node: Data File Management633948 +Node: Filetrans Function634580 +Node: Rewind Function638676 +Node: File Checking640062 +Ref: File Checking-Footnote-1641395 +Node: Empty Files641596 +Node: Ignoring Assigns643575 +Node: Getopt Function645125 +Ref: Getopt Function-Footnote-1656589 +Node: Passwd Functions656789 +Ref: Passwd Functions-Footnote-1665629 +Node: Group Functions665717 +Ref: Group Functions-Footnote-1673614 +Node: Walking Arrays673819 +Node: Library Functions Summary676825 +Node: Library Exercises678227 +Node: Sample Programs679507 +Node: Running Examples680277 +Node: Clones681005 +Node: Cut Program682229 +Node: Egrep Program691949 +Ref: Egrep Program-Footnote-1699452 +Node: Id Program699562 +Node: Split Program703238 +Ref: Split Program-Footnote-1706692 +Node: Tee Program706820 +Node: Uniq Program709609 +Node: Wc Program717028 +Ref: Wc Program-Footnote-1721278 +Node: Miscellaneous Programs721372 +Node: Dupword Program722585 +Node: Alarm Program724616 +Node: Translate Program729421 +Ref: Translate Program-Footnote-1733984 +Node: Labels Program734254 +Ref: Labels Program-Footnote-1737605 +Node: Word Sorting737689 +Node: History Sorting741759 +Node: Extract Program743594 +Node: Simple Sed751118 +Node: Igawk Program754188 +Ref: Igawk Program-Footnote-1768514 +Ref: Igawk Program-Footnote-2768715 +Ref: Igawk Program-Footnote-3768837 +Node: Anagram Program768952 +Node: Signature Program772013 +Node: Programs Summary773260 +Node: Programs Exercises774481 +Ref: Programs Exercises-Footnote-1778612 +Node: Advanced Features778703 +Node: Nondecimal Data780685 +Node: Array Sorting782275 +Node: Controlling Array Traversal782975 +Ref: Controlling Array Traversal-Footnote-1791341 +Node: Array Sorting Functions791459 +Ref: Array Sorting Functions-Footnote-1795345 +Node: Two-way I/O795541 +Ref: Two-way I/O-Footnote-1800486 +Ref: Two-way I/O-Footnote-2800672 +Node: TCP/IP Networking800754 +Node: Profiling803626 +Node: Advanced Features Summary811897 +Node: Internationalization813830 +Node: I18N and L10N815310 +Node: Explaining gettext815996 +Ref: Explaining gettext-Footnote-1821021 +Ref: Explaining gettext-Footnote-2821205 +Node: Programmer i18n821370 +Ref: Programmer i18n-Footnote-1826246 +Node: Translator i18n826295 +Node: String Extraction827089 +Ref: String Extraction-Footnote-1828220 +Node: Printf Ordering828306 +Ref: Printf Ordering-Footnote-1831092 +Node: I18N Portability831156 +Ref: I18N Portability-Footnote-1833612 +Node: I18N Example833675 +Ref: I18N Example-Footnote-1836478 +Node: Gawk I18N836550 +Node: I18N Summary837194 +Node: Debugger838534 +Node: Debugging839556 +Node: Debugging Concepts839997 +Node: Debugging Terms841807 +Node: Awk Debugging844379 +Node: Sample Debugging Session845285 +Node: Debugger Invocation845819 +Node: Finding The Bug847204 +Node: List of Debugger Commands853683 +Node: Breakpoint Control855015 +Node: Debugger Execution Control858692 +Node: Viewing And Changing Data862051 +Node: Execution Stack865427 +Node: Debugger Info867062 +Node: Miscellaneous Debugger Commands871107 +Node: Readline Support876108 +Node: Limitations877002 +Node: Debugging Summary879117 +Node: Arbitrary Precision Arithmetic880291 +Node: Computer Arithmetic881707 +Ref: table-numeric-ranges885306 +Ref: Computer Arithmetic-Footnote-1885830 +Node: Math Definitions885887 +Ref: table-ieee-formats889182 +Ref: Math Definitions-Footnote-1889786 +Node: MPFR features889891 +Node: FP Math Caution891562 +Ref: FP Math Caution-Footnote-1892612 +Node: Inexactness of computations892981 +Node: Inexact representation893940 +Node: Comparing FP Values895298 +Node: Errors accumulate896380 +Node: Getting Accuracy897812 +Node: Try To Round900516 +Node: Setting precision901415 +Ref: table-predefined-precision-strings902099 +Node: Setting the rounding mode903928 +Ref: table-gawk-rounding-modes904292 +Ref: Setting the rounding mode-Footnote-1907744 +Node: Arbitrary Precision Integers907923 +Ref: Arbitrary Precision Integers-Footnote-1912821 +Node: POSIX Floating Point Problems912970 +Ref: POSIX Floating Point Problems-Footnote-1916849 +Node: Floating point summary916887 +Node: Dynamic Extensions919074 +Node: Extension Intro920626 +Node: Plugin License921891 +Node: Extension Mechanism Outline922688 +Ref: figure-load-extension923116 +Ref: figure-register-new-function924596 +Ref: figure-call-new-function925600 +Node: Extension API Description927587 +Node: Extension API Functions Introduction929037 +Node: General Data Types933858 +Ref: General Data Types-Footnote-1939758 +Node: Memory Allocation Functions940057 +Ref: Memory Allocation Functions-Footnote-1942896 +Node: Constructor Functions942995 +Node: Registration Functions944734 +Node: Extension Functions945419 +Node: Exit Callback Functions947716 +Node: Extension Version String948964 +Node: Input Parsers949627 +Node: Output Wrappers959502 +Node: Two-way processors964015 +Node: Printing Messages966278 +Ref: Printing Messages-Footnote-1967354 +Node: Updating `ERRNO'967506 +Node: Requesting Values968246 +Ref: table-value-types-returned968973 +Node: Accessing Parameters969930 +Node: Symbol Table Access971164 +Node: Symbol table by name971678 +Node: Symbol table by cookie973698 +Ref: Symbol table by cookie-Footnote-1977843 +Node: Cached values977906 +Ref: Cached values-Footnote-1981402 +Node: Array Manipulation981493 +Ref: Array Manipulation-Footnote-1982591 +Node: Array Data Types982628 +Ref: Array Data Types-Footnote-1985283 +Node: Array Functions985375 +Node: Flattening Arrays989234 +Node: Creating Arrays996136 +Node: Extension API Variables1000907 +Node: Extension Versioning1001543 +Node: Extension API Informational Variables1003434 +Node: Extension API Boilerplate1004499 +Node: Finding Extensions1008308 +Node: Extension Example1008868 +Node: Internal File Description1009640 +Node: Internal File Ops1013707 +Ref: Internal File Ops-Footnote-11025458 +Node: Using Internal File Ops1025598 +Ref: Using Internal File Ops-Footnote-11027981 +Node: Extension Samples1028254 +Node: Extension Sample File Functions1029782 +Node: Extension Sample Fnmatch1037463 +Node: Extension Sample Fork1038951 +Node: Extension Sample Inplace1040166 +Node: Extension Sample Ord1041842 +Node: Extension Sample Readdir1042678 +Ref: table-readdir-file-types1043555 +Node: Extension Sample Revout1044366 +Node: Extension Sample Rev2way1044955 +Node: Extension Sample Read write array1045695 +Node: Extension Sample Readfile1047635 +Node: Extension Sample Time1048730 +Node: Extension Sample API Tests1050078 +Node: gawkextlib1050569 +Node: Extension summary1053247 +Node: Extension Exercises1056936 +Node: Language History1057658 +Node: V7/SVR3.11059314 +Node: SVR41061467 +Node: POSIX1062901 +Node: BTL1064282 +Node: POSIX/GNU1065013 +Node: Feature History1070849 +Node: Common Extensions1084643 +Node: Ranges and Locales1086015 +Ref: Ranges and Locales-Footnote-11090634 +Ref: Ranges and Locales-Footnote-21090661 +Ref: Ranges and Locales-Footnote-31090896 +Node: Contributors1091117 +Node: History summary1096657 +Node: Installation1098036 +Node: Gawk Distribution1098982 +Node: Getting1099466 +Node: Extracting1100289 +Node: Distribution contents1101926 +Node: Unix Installation1108028 +Node: Quick Installation1108711 +Node: Shell Startup Files1111122 +Node: Additional Configuration Options1112201 +Node: Configuration Philosophy1114005 +Node: Non-Unix Installation1116374 +Node: PC Installation1116832 +Node: PC Binary Installation1118152 +Node: PC Compiling1120000 +Ref: PC Compiling-Footnote-11123021 +Node: PC Testing1123130 +Node: PC Using1124306 +Node: Cygwin1128421 +Node: MSYS1129191 +Node: VMS Installation1129692 +Node: VMS Compilation1130484 +Ref: VMS Compilation-Footnote-11131713 +Node: VMS Dynamic Extensions1131771 +Node: VMS Installation Details1133455 +Node: VMS Running1135706 +Node: VMS GNV1138546 +Node: VMS Old Gawk1139281 +Node: Bugs1139751 +Node: Other Versions1143640 +Node: Installation summary1150074 +Node: Notes1151133 +Node: Compatibility Mode1151998 +Node: Additions1152780 +Node: Accessing The Source1153705 +Node: Adding Code1155140 +Node: New Ports1161297 +Node: Derived Files1165779 +Ref: Derived Files-Footnote-11171254 +Ref: Derived Files-Footnote-21171288 +Ref: Derived Files-Footnote-31171884 +Node: Future Extensions1171998 +Node: Implementation Limitations1172604 +Node: Extension Design1173852 +Node: Old Extension Problems1175006 +Ref: Old Extension Problems-Footnote-11176523 +Node: Extension New Mechanism Goals1176580 +Ref: Extension New Mechanism Goals-Footnote-11179940 +Node: Extension Other Design Decisions1180129 +Node: Extension Future Growth1182237 +Node: Old Extension Mechanism1183073 +Node: Notes summary1184835 +Node: Basic Concepts1186021 +Node: Basic High Level1186702 +Ref: figure-general-flow1186974 +Ref: figure-process-flow1187573 +Ref: Basic High Level-Footnote-11190802 +Node: Basic Data Typing1190987 +Node: Glossary1194315 +Node: Copying1226244 +Node: GNU Free Documentation License1263800 +Node: Index1288936 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index c1fb6f10..9044c604 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -198,9 +198,9 @@ @ifclear FOR_PRINT @set FN file name -@set FFN File Name +@set FFN File name @set DF data file -@set DDF Data File +@set DDF Data file @set PVERSION version @end ifclear @ifset FOR_PRINT @@ -1521,7 +1521,7 @@ is often referred to as ``new @command{awk}.'' By analogy, the original version of @command{awk} is referred to as ``old @command{awk}.'' -Today, on most systems, when you run the @command{awk} utility +On most current systems, when you run the @command{awk} utility you get some version of new @command{awk}.@footnote{Only Solaris systems still use an old @command{awk} for the default @command{awk} utility. A more modern @command{awk} lives in @@ -1752,15 +1752,39 @@ and how to compile and use it on different non-POSIX systems. It also describes how to report bugs in @command{gawk} and where to get other freely available @command{awk} implementations. -@end itemize @ifset FOR_PRINT -@itemize @value{MINUS} @item @ref{Copying}, presents the license that covers the @command{gawk} source code. +@end ifset + +@ifclear FOR_PRINT +@item +@ref{Notes}, +describes how to disable @command{gawk}'s extensions, as +well as how to contribute new code to @command{gawk}, +and some possible future directions for @command{gawk} development. + +@item +@ref{Basic Concepts}, +provides some very cursory background material for those who +are completely unfamiliar with computer programming. + +The @ref{Glossary}, defines most, if not all, of the significant terms used +throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, +try looking them up here. + +@item +@ref{Copying}, and +@ref{GNU Free Documentation License}, +present the licenses that cover the @command{gawk} source code +and this @value{DOCUMENT}, respectively. +@end ifclear +@end itemize @end itemize +@ifset FOR_PRINT The version of this @value{DOCUMENT} distributed with @command{gawk} contains additional appendices and other end material. To save space, we have omitted them from the @@ -1798,32 +1822,6 @@ Some of the chapters have exercise sections; these have also been omitted from the print edition but are available online. @end ifset -@ifclear FOR_PRINT -@itemize @value{MINUS} -@item -@ref{Notes}, -describes how to disable @command{gawk}'s extensions, as -well as how to contribute new code to @command{gawk}, -and some possible future directions for @command{gawk} development. - -@item -@ref{Basic Concepts}, -provides some very cursory background material for those who -are completely unfamiliar with computer programming. - -The @ref{Glossary}, defines most, if not all, of the significant terms used -throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, -try looking them up here. - -@item -@ref{Copying}, and -@ref{GNU Free Documentation License}, -present the licenses that cover the @command{gawk} source code -and this @value{DOCUMENT}, respectively. -@end itemize -@end ifclear -@end itemize - @c FULLXREF OFF @node Conventions @@ -1865,15 +1863,23 @@ $ @kbd{echo hello on stderr 1>&2} @end example @ifnotinfo -In the text, command names appear in @code{this font}, while code segments +In the text, almost anything related to programming, such as +command names, +variable and function names, and string, numeric and regexp constants +appear in @code{this font}. Code fragments appear in the same font and quoted, @samp{like this}. +Things that are replaced by the user or programmer +appear in @var{this font}. Options look like this: @option{-f}. +@value{FFN}s are indicated like this: @file{/path/to/ourfile}. +@ifclear FOR_PRINT Some things are emphasized @emph{like this}, and if a point needs to be made -strongly, it is done @strong{like this}. The first occurrence of +strongly, it is done @strong{like this}. +@end ifclear +The first occurrence of a new term is usually its @dfn{definition} and appears in the same font as the previous occurrence of ``definition'' in this sentence. -Finally, @value{FN}s are indicated like this: @file{/path/to/ourfile}. @end ifnotinfo Characters that you type at the keyboard look @kbd{like this}. In particular, @@ -9409,12 +9415,12 @@ represent spaces in the output. Here are the possible modifiers, in the order in which they may appear: -@table @code +@table @asis @cindex differences in @command{awk} and @command{gawk}, @code{print}/@code{printf} statements @cindex @code{printf} statement, positional specifiers @c the code{} does NOT start a secondary @cindex positional specifiers, @code{printf} statement -@item @var{N}$ +@item @code{@var{N}$} An integer constant followed by a @samp{$} is a @dfn{positional specifier}. Normally, format specifications are applied to arguments in the order given in the format string. With a positional specifier, the format @@ -9437,7 +9443,7 @@ messages at runtime. which describes how and why to use positional specifiers. For now, we ignore them. -@item - @r{(Minus)} +@item @code{-} (Minus) The minus sign, used before the width modifier (see later on in this list), says to left-justify @@ -9455,13 +9461,13 @@ prints @samp{foo@bullet{}}. For numeric conversions, prefix positive values with a space and negative values with a minus sign. -@item + +@item @code{+} The plus sign, used before the width modifier (see later on in this list), says to always supply a sign for numeric conversions, even if the data to format is positive. The @samp{+} overrides the space modifier. -@item # +@item @code{#} Use an ``alternative form'' for certain control letters. For @samp{%o}, supply a leading zero. For @samp{%x} and @samp{%X}, supply a leading @samp{0x} or @samp{0X} for @@ -9470,14 +9476,14 @@ For @samp{%e}, @samp{%E}, @samp{%f}, and @samp{%F}, the result always contains a decimal point. For @samp{%g} and @samp{%G}, trailing zeros are not removed from the result. -@item 0 +@item @code{0} A leading @samp{0} (zero) acts as a flag indicating that output should be padded with zeros instead of spaces. This applies only to the numeric output formats. This flag only has an effect when the field width is wider than the value to print. -@item ' +@item @code{'} A single quote or apostrophe character is a POSIX extension to ISO C. It indicates that the integer part of a floating-point value, or the entire part of an integer decimal value, should have a thousands-separator @@ -9530,7 +9536,7 @@ prints @samp{foobar}. Preceding the @var{width} with a minus sign causes the output to be padded with spaces on the right, instead of on the left. -@item .@var{prec} +@item @code{.@var{prec}} A period followed by an integer constant specifies the precision to use when printing. The meaning of the precision varies by control letter: @@ -11842,6 +11848,7 @@ has the value four, but it changes the value of @code{foo} to five. In other words, the operator returns the old value of the variable, but with the side effect of incrementing it. +@c FIXME: Use @sup here for superscript The post-increment @samp{foo++} is nearly the same as writing @samp{(foo += 1) - 1}. It is not perfectly equivalent because all numbers in @command{awk} are floating point---in floating point, @samp{foo + 1 - 1} does @@ -14184,12 +14191,12 @@ numbers: # find smallest divisor of num @{ num = $1 - for (div = 2; div * div <= num; div++) @{ - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) @{ + if (num % divisor == 0) break @} - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num @} @@ -14210,12 +14217,12 @@ an @code{if}: # find smallest divisor of num @{ num = $1 - for (div = 2; ; div++) @{ - if (num % div == 0) @{ - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) @{ + if (num % divisor == 0) @{ + printf "Smallest divisor of %d is %d\n", num, divisor break @} - if (div * div > num) @{ + if (divisor * divisor > num) @{ printf "%d is prime\n", num break @} @@ -14657,12 +14664,13 @@ is to simply say @samp{FS = FS}, perhaps with an explanatory comment. @cindex regular expressions, case sensitivity @item IGNORECASE # If @code{IGNORECASE} is nonzero or non-null, then all string comparisons -and all regular expression matching are case-independent. Thus, regexp -matching with @samp{~} and @samp{!~}, as well as the @code{gensub()}, -@code{gsub()}, @code{index()}, @code{match()}, @code{patsplit()}, -@code{split()}, and @code{sub()} -functions, record termination with @code{RS}, and field splitting with -@code{FS} and @code{FPAT}, all ignore case when doing their particular regexp operations. +and all regular expression matching are case-independent. +This applies to +regexp matching with @samp{~} and @samp{!~}, +the @code{gensub()}, @code{gsub()}, @code{index()}, @code{match()}, +@code{patsplit()}, @code{split()}, and @code{sub()} functions, +record termination with @code{RS}, and field splitting with +@code{FS} and @code{FPAT}. However, the value of @code{IGNORECASE} does @emph{not} affect array subscripting and it does not affect field splitting when using a single-character field separator. @@ -18648,6 +18656,7 @@ which is sufficient to represent times through 2038-01-19 03:14:07 UTC. Many systems support a wider range of timestamps, including negative timestamps that represent times before the epoch. +@c FIXME: Use @sup here for superscript @cindex @command{date} utility, GNU @cindex time, retrieving @@ -20423,67 +20432,7 @@ $ @kbd{gawk -f quicksort.awk -f indirectcall.awk class_data2} @end example Another example where indirect functions calls are useful can be found in -processing arrays. @DBREF{Walking Arrays} presented a simple function -for ``walking'' an array of arrays. That function simply printed the -name and value of each scalar array element. However, it is easy to -generalize that function, by passing in the name of a function to call -when walking an array. The modified function looks like this: - -@example -@c file eg/lib/processarray.awk -function process_array(arr, name, process, do_arrays, i, new_name) -@{ - for (i in arr) @{ - new_name = (name "[" i "]") - if (isarray(arr[i])) @{ - if (do_arrays) - @@process(new_name, arr[i]) - process_array(arr[i], new_name, process, do_arrays) - @} else - @@process(new_name, arr[i]) - @} -@} -@c endfile -@end example - -The arguments are as follows: - -@table @code -@item arr -The array. - -@item name -The name of the array (a string). - -@item process -The name of the function to call. - -@item do_arrays -If this is true, the function can handle elements that are subarrays. -@end table - -If subarrays are to be processed, that is done before walking them further. - -When run with the following scaffolding, the function produces the same -results as does the earlier @code{walk_array()} function: - -@example -BEGIN @{ - a[1] = 1 - a[2][1] = 21 - a[2][2] = 22 - a[3] = 3 - a[4][1][1] = 411 - a[4][2] = 42 - - process_array(a, "a", "do_print", 0) -@} - -function do_print(name, element) -@{ - printf "%s = %s\n", name, element -@} -@end example +processing arrays. This is described in @ref{Walking Arrays}. Remember that you must supply a leading @samp{@@} in front of an indirect function call. @@ -23114,6 +23063,66 @@ $ @kbd{gawk -f walk_array.awk} @print{} a[4][2] = 42 @end example +The function just presented simply prints the +name and value of each scalar array element. However, it is easy to +generalize it, by passing in the name of a function to call +when walking an array. The modified function looks like this: + +@example +@c file eg/lib/processarray.awk +function process_array(arr, name, process, do_arrays, i, new_name) +@{ + for (i in arr) @{ + new_name = (name "[" i "]") + if (isarray(arr[i])) @{ + if (do_arrays) + @@process(new_name, arr[i]) + process_array(arr[i], new_name, process, do_arrays) + @} else + @@process(new_name, arr[i]) + @} +@} +@c endfile +@end example + +The arguments are as follows: + +@table @code +@item arr +The array. + +@item name +The name of the array (a string). + +@item process +The name of the function to call. + +@item do_arrays +If this is true, the function can handle elements that are subarrays. +@end table + +If subarrays are to be processed, that is done before walking them further. + +When run with the following scaffolding, the function produces the same +results as does the earlier version of @code{walk_array()}: + +@example +BEGIN @{ + a[1] = 1 + a[2][1] = 21 + a[2][2] = 22 + a[3] = 3 + a[4][1][1] = 411 + a[4][2] = 42 + + process_array(a, "a", "do_print", 0) +@} + +function do_print(name, element) +@{ + printf "%s = %s\n", name, element +@} +@end example @node Library Functions Summary @section Summary @@ -23152,7 +23161,7 @@ An @command{awk} version of the standard C @code{getopt()} function Two sets of routines that parallel the C library versions @item Traversing arrays of arrays -A simple function to traverse an array of arrays to any depth +Two functions that traverse an array of arrays to any depth @end table @c end nested list @@ -30315,6 +30324,7 @@ signed. The possible ranges of values are shown in @ref{table-numeric-ranges}. @end ifnottex @ifdocbook @item Single-precision floating point (approximate) @tab +@c FIXME: Use @sup here for superscript @docbook 1.175494<superscript>-38</superscript> @end docbook @@ -30933,6 +30943,7 @@ the following computes @end docbook the result of which is beyond the limits of ordinary hardware double-precision floating-point values: +@c FIXME: Use @sup here for superscript @example $ @kbd{gawk -M 'BEGIN @{} @@ -31280,7 +31291,7 @@ This is faster and more space-efficient than using MPFR for the same calculations. @item -There are several ``dark corners'' with respect to floating-point +There are several areas with respect to floating-point numbers where @command{gawk} disagrees with the POSIX standard. It pays to be aware of them. @@ -31958,14 +31969,14 @@ the way that extension code would use them: @table @code @item static inline awk_value_t * -@itemx make_const_string(const char *string, size_t length, awk_value_t *result) +@itemx make_const_string(const char *string, size_t length, awk_value_t *result); This function creates a string value in the @code{awk_value_t} variable pointed to by @code{result}. It expects @code{string} to be a C string constant (or other string data), and automatically creates a @emph{copy} of the data for storage in @code{result}. It returns @code{result}. @item static inline awk_value_t * -@itemx make_malloced_string(const char *string, size_t length, awk_value_t *result) +@itemx make_malloced_string(const char *string, size_t length, awk_value_t *result); This function creates a string value in the @code{awk_value_t} variable pointed to by @code{result}. It expects @code{string} to be a @samp{char *} value pointing to data previously obtained from @code{gawk_malloc()}, @code{gawk_calloc()}, or @code{gawk_realloc()}. The idea here @@ -31973,13 +31984,13 @@ is that the data is passed directly to @command{gawk}, which assumes responsibility for it. It returns @code{result}. @item static inline awk_value_t * -@itemx make_null_string(awk_value_t *result) +@itemx make_null_string(awk_value_t *result); This specialized function creates a null string (the ``undefined'' value) in the @code{awk_value_t} variable pointed to by @code{result}. It returns @code{result}. @item static inline awk_value_t * -@itemx make_number(double num, awk_value_t *result) +@itemx make_number(double num, awk_value_t *result); This function simply creates a numeric value in the @code{awk_value_t} variable pointed to by @code{result}. @end table diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 21f579d8..61d5038e 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -193,9 +193,9 @@ @ifclear FOR_PRINT @set FN file name -@set FFN File Name +@set FFN File name @set DF data file -@set DDF Data File +@set DDF Data file @set PVERSION version @end ifclear @ifset FOR_PRINT @@ -1488,7 +1488,7 @@ is often referred to as ``new @command{awk}.'' By analogy, the original version of @command{awk} is referred to as ``old @command{awk}.'' -Today, on most systems, when you run the @command{awk} utility +On most current systems, when you run the @command{awk} utility you get some version of new @command{awk}.@footnote{Only Solaris systems still use an old @command{awk} for the default @command{awk} utility. A more modern @command{awk} lives in @@ -1719,15 +1719,39 @@ and how to compile and use it on different non-POSIX systems. It also describes how to report bugs in @command{gawk} and where to get other freely available @command{awk} implementations. -@end itemize @ifset FOR_PRINT -@itemize @value{MINUS} @item @ref{Copying}, presents the license that covers the @command{gawk} source code. +@end ifset + +@ifclear FOR_PRINT +@item +@ref{Notes}, +describes how to disable @command{gawk}'s extensions, as +well as how to contribute new code to @command{gawk}, +and some possible future directions for @command{gawk} development. + +@item +@ref{Basic Concepts}, +provides some very cursory background material for those who +are completely unfamiliar with computer programming. + +The @ref{Glossary}, defines most, if not all, of the significant terms used +throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, +try looking them up here. + +@item +@ref{Copying}, and +@ref{GNU Free Documentation License}, +present the licenses that cover the @command{gawk} source code +and this @value{DOCUMENT}, respectively. +@end ifclear +@end itemize @end itemize +@ifset FOR_PRINT The version of this @value{DOCUMENT} distributed with @command{gawk} contains additional appendices and other end material. To save space, we have omitted them from the @@ -1765,32 +1789,6 @@ Some of the chapters have exercise sections; these have also been omitted from the print edition but are available online. @end ifset -@ifclear FOR_PRINT -@itemize @value{MINUS} -@item -@ref{Notes}, -describes how to disable @command{gawk}'s extensions, as -well as how to contribute new code to @command{gawk}, -and some possible future directions for @command{gawk} development. - -@item -@ref{Basic Concepts}, -provides some very cursory background material for those who -are completely unfamiliar with computer programming. - -The @ref{Glossary}, defines most, if not all, of the significant terms used -throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, -try looking them up here. - -@item -@ref{Copying}, and -@ref{GNU Free Documentation License}, -present the licenses that cover the @command{gawk} source code -and this @value{DOCUMENT}, respectively. -@end itemize -@end ifclear -@end itemize - @c FULLXREF OFF @node Conventions @@ -1832,15 +1830,23 @@ $ @kbd{echo hello on stderr 1>&2} @end example @ifnotinfo -In the text, command names appear in @code{this font}, while code segments +In the text, almost anything related to programming, such as +command names, +variable and function names, and string, numeric and regexp constants +appear in @code{this font}. Code fragments appear in the same font and quoted, @samp{like this}. +Things that are replaced by the user or programmer +appear in @var{this font}. Options look like this: @option{-f}. +@value{FFN}s are indicated like this: @file{/path/to/ourfile}. +@ifclear FOR_PRINT Some things are emphasized @emph{like this}, and if a point needs to be made -strongly, it is done @strong{like this}. The first occurrence of +strongly, it is done @strong{like this}. +@end ifclear +The first occurrence of a new term is usually its @dfn{definition} and appears in the same font as the previous occurrence of ``definition'' in this sentence. -Finally, @value{FN}s are indicated like this: @file{/path/to/ourfile}. @end ifnotinfo Characters that you type at the keyboard look @kbd{like this}. In particular, @@ -9009,12 +9015,12 @@ represent spaces in the output. Here are the possible modifiers, in the order in which they may appear: -@table @code +@table @asis @cindex differences in @command{awk} and @command{gawk}, @code{print}/@code{printf} statements @cindex @code{printf} statement, positional specifiers @c the code{} does NOT start a secondary @cindex positional specifiers, @code{printf} statement -@item @var{N}$ +@item @code{@var{N}$} An integer constant followed by a @samp{$} is a @dfn{positional specifier}. Normally, format specifications are applied to arguments in the order given in the format string. With a positional specifier, the format @@ -9037,7 +9043,7 @@ messages at runtime. which describes how and why to use positional specifiers. For now, we ignore them. -@item - @r{(Minus)} +@item @code{-} (Minus) The minus sign, used before the width modifier (see later on in this list), says to left-justify @@ -9055,13 +9061,13 @@ prints @samp{foo@bullet{}}. For numeric conversions, prefix positive values with a space and negative values with a minus sign. -@item + +@item @code{+} The plus sign, used before the width modifier (see later on in this list), says to always supply a sign for numeric conversions, even if the data to format is positive. The @samp{+} overrides the space modifier. -@item # +@item @code{#} Use an ``alternative form'' for certain control letters. For @samp{%o}, supply a leading zero. For @samp{%x} and @samp{%X}, supply a leading @samp{0x} or @samp{0X} for @@ -9070,14 +9076,14 @@ For @samp{%e}, @samp{%E}, @samp{%f}, and @samp{%F}, the result always contains a decimal point. For @samp{%g} and @samp{%G}, trailing zeros are not removed from the result. -@item 0 +@item @code{0} A leading @samp{0} (zero) acts as a flag indicating that output should be padded with zeros instead of spaces. This applies only to the numeric output formats. This flag only has an effect when the field width is wider than the value to print. -@item ' +@item @code{'} A single quote or apostrophe character is a POSIX extension to ISO C. It indicates that the integer part of a floating-point value, or the entire part of an integer decimal value, should have a thousands-separator @@ -9130,7 +9136,7 @@ prints @samp{foobar}. Preceding the @var{width} with a minus sign causes the output to be padded with spaces on the right, instead of on the left. -@item .@var{prec} +@item @code{.@var{prec}} A period followed by an integer constant specifies the precision to use when printing. The meaning of the precision varies by control letter: @@ -11228,6 +11234,7 @@ has the value four, but it changes the value of @code{foo} to five. In other words, the operator returns the old value of the variable, but with the side effect of incrementing it. +@c FIXME: Use @sup here for superscript The post-increment @samp{foo++} is nearly the same as writing @samp{(foo += 1) - 1}. It is not perfectly equivalent because all numbers in @command{awk} are floating point---in floating point, @samp{foo + 1 - 1} does @@ -13512,12 +13519,12 @@ numbers: # find smallest divisor of num @{ num = $1 - for (div = 2; div * div <= num; div++) @{ - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) @{ + if (num % divisor == 0) break @} - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num @} @@ -13538,12 +13545,12 @@ an @code{if}: # find smallest divisor of num @{ num = $1 - for (div = 2; ; div++) @{ - if (num % div == 0) @{ - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) @{ + if (num % divisor == 0) @{ + printf "Smallest divisor of %d is %d\n", num, divisor break @} - if (div * div > num) @{ + if (divisor * divisor > num) @{ printf "%d is prime\n", num break @} @@ -13985,12 +13992,13 @@ is to simply say @samp{FS = FS}, perhaps with an explanatory comment. @cindex regular expressions, case sensitivity @item IGNORECASE # If @code{IGNORECASE} is nonzero or non-null, then all string comparisons -and all regular expression matching are case-independent. Thus, regexp -matching with @samp{~} and @samp{!~}, as well as the @code{gensub()}, -@code{gsub()}, @code{index()}, @code{match()}, @code{patsplit()}, -@code{split()}, and @code{sub()} -functions, record termination with @code{RS}, and field splitting with -@code{FS} and @code{FPAT}, all ignore case when doing their particular regexp operations. +and all regular expression matching are case-independent. +This applies to +regexp matching with @samp{~} and @samp{!~}, +the @code{gensub()}, @code{gsub()}, @code{index()}, @code{match()}, +@code{patsplit()}, @code{split()}, and @code{sub()} functions, +record termination with @code{RS}, and field splitting with +@code{FS} and @code{FPAT}. However, the value of @code{IGNORECASE} does @emph{not} affect array subscripting and it does not affect field splitting when using a single-character field separator. @@ -17769,6 +17777,7 @@ which is sufficient to represent times through 2038-01-19 03:14:07 UTC. Many systems support a wider range of timestamps, including negative timestamps that represent times before the epoch. +@c FIXME: Use @sup here for superscript @cindex @command{date} utility, GNU @cindex time, retrieving @@ -19544,67 +19553,7 @@ $ @kbd{gawk -f quicksort.awk -f indirectcall.awk class_data2} @end example Another example where indirect functions calls are useful can be found in -processing arrays. @DBREF{Walking Arrays} presented a simple function -for ``walking'' an array of arrays. That function simply printed the -name and value of each scalar array element. However, it is easy to -generalize that function, by passing in the name of a function to call -when walking an array. The modified function looks like this: - -@example -@c file eg/lib/processarray.awk -function process_array(arr, name, process, do_arrays, i, new_name) -@{ - for (i in arr) @{ - new_name = (name "[" i "]") - if (isarray(arr[i])) @{ - if (do_arrays) - @@process(new_name, arr[i]) - process_array(arr[i], new_name, process, do_arrays) - @} else - @@process(new_name, arr[i]) - @} -@} -@c endfile -@end example - -The arguments are as follows: - -@table @code -@item arr -The array. - -@item name -The name of the array (a string). - -@item process -The name of the function to call. - -@item do_arrays -If this is true, the function can handle elements that are subarrays. -@end table - -If subarrays are to be processed, that is done before walking them further. - -When run with the following scaffolding, the function produces the same -results as does the earlier @code{walk_array()} function: - -@example -BEGIN @{ - a[1] = 1 - a[2][1] = 21 - a[2][2] = 22 - a[3] = 3 - a[4][1][1] = 411 - a[4][2] = 42 - - process_array(a, "a", "do_print", 0) -@} - -function do_print(name, element) -@{ - printf "%s = %s\n", name, element -@} -@end example +processing arrays. This is described in @ref{Walking Arrays}. Remember that you must supply a leading @samp{@@} in front of an indirect function call. @@ -22205,6 +22154,66 @@ $ @kbd{gawk -f walk_array.awk} @print{} a[4][2] = 42 @end example +The function just presented simply prints the +name and value of each scalar array element. However, it is easy to +generalize it, by passing in the name of a function to call +when walking an array. The modified function looks like this: + +@example +@c file eg/lib/processarray.awk +function process_array(arr, name, process, do_arrays, i, new_name) +@{ + for (i in arr) @{ + new_name = (name "[" i "]") + if (isarray(arr[i])) @{ + if (do_arrays) + @@process(new_name, arr[i]) + process_array(arr[i], new_name, process, do_arrays) + @} else + @@process(new_name, arr[i]) + @} +@} +@c endfile +@end example + +The arguments are as follows: + +@table @code +@item arr +The array. + +@item name +The name of the array (a string). + +@item process +The name of the function to call. + +@item do_arrays +If this is true, the function can handle elements that are subarrays. +@end table + +If subarrays are to be processed, that is done before walking them further. + +When run with the following scaffolding, the function produces the same +results as does the earlier version of @code{walk_array()}: + +@example +BEGIN @{ + a[1] = 1 + a[2][1] = 21 + a[2][2] = 22 + a[3] = 3 + a[4][1][1] = 411 + a[4][2] = 42 + + process_array(a, "a", "do_print", 0) +@} + +function do_print(name, element) +@{ + printf "%s = %s\n", name, element +@} +@end example @node Library Functions Summary @section Summary @@ -22243,7 +22252,7 @@ An @command{awk} version of the standard C @code{getopt()} function Two sets of routines that parallel the C library versions @item Traversing arrays of arrays -A simple function to traverse an array of arrays to any depth +Two functions that traverse an array of arrays to any depth @end table @c end nested list @@ -29406,6 +29415,7 @@ signed. The possible ranges of values are shown in @ref{table-numeric-ranges}. @end ifnottex @ifdocbook @item Single-precision floating point (approximate) @tab +@c FIXME: Use @sup here for superscript @docbook 1.175494<superscript>-38</superscript> @end docbook @@ -30024,6 +30034,7 @@ the following computes @end docbook the result of which is beyond the limits of ordinary hardware double-precision floating-point values: +@c FIXME: Use @sup here for superscript @example $ @kbd{gawk -M 'BEGIN @{} @@ -30371,7 +30382,7 @@ This is faster and more space-efficient than using MPFR for the same calculations. @item -There are several ``dark corners'' with respect to floating-point +There are several areas with respect to floating-point numbers where @command{gawk} disagrees with the POSIX standard. It pays to be aware of them. @@ -31049,14 +31060,14 @@ the way that extension code would use them: @table @code @item static inline awk_value_t * -@itemx make_const_string(const char *string, size_t length, awk_value_t *result) +@itemx make_const_string(const char *string, size_t length, awk_value_t *result); This function creates a string value in the @code{awk_value_t} variable pointed to by @code{result}. It expects @code{string} to be a C string constant (or other string data), and automatically creates a @emph{copy} of the data for storage in @code{result}. It returns @code{result}. @item static inline awk_value_t * -@itemx make_malloced_string(const char *string, size_t length, awk_value_t *result) +@itemx make_malloced_string(const char *string, size_t length, awk_value_t *result); This function creates a string value in the @code{awk_value_t} variable pointed to by @code{result}. It expects @code{string} to be a @samp{char *} value pointing to data previously obtained from @code{gawk_malloc()}, @code{gawk_calloc()}, or @code{gawk_realloc()}. The idea here @@ -31064,13 +31075,13 @@ is that the data is passed directly to @command{gawk}, which assumes responsibility for it. It returns @code{result}. @item static inline awk_value_t * -@itemx make_null_string(awk_value_t *result) +@itemx make_null_string(awk_value_t *result); This specialized function creates a null string (the ``undefined'' value) in the @code{awk_value_t} variable pointed to by @code{result}. It returns @code{result}. @item static inline awk_value_t * -@itemx make_number(double num, awk_value_t *result) +@itemx make_number(double num, awk_value_t *result); This function simply creates a numeric value in the @code{awk_value_t} variable pointed to by @code{result}. @end table diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 370d4505..8236d7d2 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,11 +3,12 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2014-12-03.16} +\def\texinfoversion{2015-02-05.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +% Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -4488,7 +4489,6 @@ end % Called from \indexdummies and \atdummies. % \def\commondummies{% - % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for @@ -4565,6 +4565,7 @@ end \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq + \definedummyword\mathopsup \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4578,6 +4579,8 @@ end \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result + \definedummyword\sub + \definedummyword\sup \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. @@ -4652,6 +4655,7 @@ end \definedummyword\samp \definedummyword\strong \definedummyword\tie + \definedummyword\U \definedummyword\uref \definedummyword\url \definedummyword\var @@ -8334,14 +8338,7 @@ end \catcode`\\=\other % % Make the characters 128-255 be printing characters. - {% - \count1=128 - \def\loop{% - \catcode\count1=\other - \advance\count1 by 1 - \ifnum \count1<256 \loop \fi - }% - }% + {\setnonasciicharscatcodenonglobal\other}% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 @@ -8952,6 +8949,7 @@ directory should work if nowhere else does.} \catcode\count255=#1\relax \advance\count255 by 1 \repeat + } % @documentencoding sets the definition of non-ASCII characters @@ -8986,10 +8984,12 @@ directory should work if nowhere else does.} % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active - \utfeightchardefs + % since we already invoked \utfeightchardefs at the top level + % (below), do not re-invoke it, then our check for duplicated + % definitions triggers. Making non-ascii chars active is enough. % \else - \message{Unknown document encoding #1, ignoring.}% + \message{Ignoring unknown document encoding: #1.}% % \fi % utfeight \fi % latnine @@ -8998,10 +8998,11 @@ directory should work if nowhere else does.} \fi % ascii } +% emacs-page % A message to be logged when using a character that isn't available % the default font encoding (OT1). % -\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} +\def\missingcharmsg#1{\message{Character missing, sorry: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} @@ -9037,12 +9038,10 @@ directory should work if nowhere else does.} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} - % - \gdef^^b7{$^.$} + \gdef^^b7{\ifmmode\cdot\else $\cdot$\fi} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} - % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} @@ -9331,6 +9330,11 @@ directory should work if nowhere else does.} \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% + % + \expandafter\ifx\csname uni:#1\endcsname \relax \else + \errmessage{Internal error, already defined: #1}% + \fi + % % define an additional control sequence for this code point. \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp \endgroup} @@ -9370,23 +9374,49 @@ directory should work if nowhere else does.} \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup +% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M +% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) +% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) +% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A +% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B +% +% Many of our renditions are less than wonderful, and all the missing +% characters are available somewhere. Loading the necessary fonts +% awaits user request. We can't truly support Unicode without +% reimplementing everything that's been done in LaTeX for many years, +% plus probably using luatex or xetex, and who knows what else. +% We won't be doing that here in this simple file. But we can try to at +% least make most of the characters not bomb out. +% \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A7}{\S} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AC}{\ifmmode\lnot\else $\lnot$\fi} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B1}{\ifmmode\pm\else $\pm$\fi} + \DeclareUnicodeCharacter{00B2}{$^2$} + \DeclareUnicodeCharacter{00B3}{$^3$} \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B5}{$\mu$} + \DeclareUnicodeCharacter{00B6}{\P} + \DeclareUnicodeCharacter{00B7}{\ifmmode\cdot\else $\cdot$\fi} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00B9}{$^1$} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BC}{$1\over4$} + \DeclareUnicodeCharacter{00BD}{$1\over2$} + \DeclareUnicodeCharacter{00BE}{$3\over4$} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} @@ -9413,6 +9443,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D7}{\ifmmode\times\else $\times$\fi} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} @@ -9446,6 +9477,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F7}{\ifmmode\div\else $\div$\fi} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} @@ -9465,20 +9497,23 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} - \DeclareUnicodeCharacter{0118}{\ogonek{E}} - \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} + \DeclareUnicodeCharacter{010F}{d'} + \DeclareUnicodeCharacter{0110}{\DH} + \DeclareUnicodeCharacter{0111}{\dh} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} @@ -9488,14 +9523,20 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0122}{\cedilla{G}} + \DeclareUnicodeCharacter{0123}{\cedilla{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + \DeclareUnicodeCharacter{012E}{\ogonek{I}} + \DeclareUnicodeCharacter{012F}{\ogonek{i}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} @@ -9503,15 +9544,29 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0136}{\cedilla{K}} + \DeclareUnicodeCharacter{0137}{\cedilla{k}} + \DeclareUnicodeCharacter{0138}{\ifmmode\kappa\else $\kappa$\fi} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} + \DeclareUnicodeCharacter{013B}{\cedilla{L}} + \DeclareUnicodeCharacter{013C}{\cedilla{l}} + \DeclareUnicodeCharacter{013D}{L'}% should kern + \DeclareUnicodeCharacter{013E}{l'}% should kern + \DeclareUnicodeCharacter{013F}{L\U{00B7}} + \DeclareUnicodeCharacter{0140}{l\U{00B7}} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0145}{\cedilla{N}} + \DeclareUnicodeCharacter{0146}{\cedilla{n}} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{0149}{'n} + \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} + \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} @@ -9523,6 +9578,8 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0156}{\cedilla{R}} + \DeclareUnicodeCharacter{0157}{\cedilla{r}} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} @@ -9534,10 +9591,12 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} - \DeclareUnicodeCharacter{0162}{\cedilla{t}} - \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0162}{\cedilla{T}} + \DeclareUnicodeCharacter{0163}{\cedilla{t}} \DeclareUnicodeCharacter{0164}{\v{T}} - + \DeclareUnicodeCharacter{0165}{\v{t}} + \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} @@ -9549,6 +9608,8 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0172}{\ogonek{U}} + \DeclareUnicodeCharacter{0173}{\ogonek{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} @@ -9560,6 +9621,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} + \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} @@ -9765,12 +9827,51 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs - % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } +% Latin1 (ISO-8859-1) character definitions. +\def\nonasciistringdefs{% + \setnonasciicharscatcode\active + \def\defstringchar##1{\def##1{\string##1}}% + \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% + \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% + \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% + \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% + % + \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% + \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% + \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% + \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% + % + \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% + \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% + \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% + \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% + % + \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% + \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% + \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% + \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% + % + \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% + \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% + \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% + \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% + % + \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% + \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% + \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% + \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% +} + + +% define all the unicode characters we know about, for the sake of @U. +\utfeightchardefs + + % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. @@ -10124,6 +10225,7 @@ directory should work if nowhere else does.} % {@catcode`- = @active @gdef@normalturnoffactive{% + @nonasciistringdefs @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @@ -10192,7 +10294,7 @@ directory should work if nowhere else does.} @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@c page-delimiter: "^\\\\message" +@c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" |