diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 20 | ||||
-rw-r--r-- | doc/gawk.info | 920 | ||||
-rw-r--r-- | doc/gawk.texi | 45 | ||||
-rw-r--r-- | doc/gawktexi.in | 45 |
4 files changed, 555 insertions, 475 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index f69e401d..0500b6c9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,23 @@ +2014-08-06 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Misc minor additions. + +2014-08-03 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: For sprintf %c document that if value is a valid + wide character, gawk uses the low 8 bits of the value. + + Unrelated: + + * gawktexi.in: Fix doc for API get_record - errcode needs to + be greater than zero. + +2014-07-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Numeric Functions): For `div()', clarify + truncation is towards zero. Thanks to Michal Jaegermann + for pointing out the need to clarify this. + 2014-07-10 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Numeric Functions): Document new `div()' function. diff --git a/doc/gawk.info b/doc/gawk.info index e7854caf..076a2f34 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -6275,7 +6275,9 @@ width. Here is a list of the format-control letters: valid wide character and then to print the multibyte encoding of that character. Similarly, when printing a numeric value, `gawk' allows the value to be within the numeric range of - values that can be held in a wide character. + values that can be held in a wide character. If the + conversion to multibyte encoding fails, `gawk' uses the low + eight bits of the value as the character to print. Other `awk' versions generally restrict themselves to printing the first byte of a string or to numeric values within the @@ -11682,14 +11684,15 @@ brackets ([ ]): `div(NUMERATOR, DENOMINATOR, RESULT)' Perform integer division, similar to the standard C function of the - same name. First, truncate `numerator' and `denominator' to - integers. Clear the `result' array, and then set - `result["quotient"]' to the result of `numerator / denominator', - truncated to an integer, and set `result["remainder"]' to the - result of `numerator % denominator', truncated to an integer. - This function is primarily intended for use with arbitrary length - integers; it avoids creating MPFR arbitrary precision - floating-point values (*note Arbitrary Precision Integers::). + same name. First, truncate `numerator' and `denominator' towards + zero, creating integer values. Clear the `result' array, and then + set `result["quotient"]' to the result of `numerator / + denominator', truncated towards zero to an integer, and set + `result["remainder"]' to the result of `numerator % denominator', + truncated towards zero to an integer. This function is primarily + intended for use with arbitrary length integers; it avoids + creating MPFR arbitrary precision floating-point values (*note + Arbitrary Precision Integers::). This function is a `gawk' extension. It is not available in compatibility mode (*note Options::). @@ -15031,7 +15034,9 @@ presented in *note Filetrans Function::, to either update `ARGIND' on your own or modify this code as appropriate. The `rewind()' function also relies on the `nextfile' keyword (*note -Nextfile Statement::). +Nextfile Statement::). Because of this, you should not call it from an +`ENDFILE' rule. (This isn't necessary anyway, since as soon as an +`ENDFILE' rule finishes `gawk' goes to the next file!) File: gawk.info, Node: File Checking, Next: Empty Files, Prev: Rewind Function, Up: Data File Management @@ -23197,10 +23202,10 @@ need to test for a `NULL' value. `gawk' sets `*errcode' to zero, so there is no need to set it unless an error occurs. If an error does occur, the function should return `EOF' and set -`*errcode' to a non-zero value. In that case, if `*errcode' does not -equal -1, `gawk' automatically updates the `ERRNO' variable based on -the value of `*errcode'. (In general, setting `*errcode = errno' -should do the right thing.) +`*errcode' to a value greater than zero. In that case, if `*errcode' +does not equal zero, `gawk' automatically updates the `ERRNO' variable +based on the value of `*errcode'. (In general, setting `*errcode = +errno' should do the right thing.) As an alternative to supplying a function that returns an input record, you may instead supply a function that simply reads bytes, and @@ -26140,6 +26145,11 @@ the current version of `gawk'. - GCC for VAX and Alpha has not been tested for a while. + * Support for the following obsolete systems was removed from the + code and the documentation for `gawk' version 4.1: + + - Ultrix + File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -32163,10 +32173,10 @@ Index * exit status, of VMS: VMS Running. (line 29) * exit the debugger: Miscellaneous Debugger Commands. (line 99) -* exp: Numeric Functions. (line 32) +* exp: Numeric Functions. (line 33) * expand utility: Very Simple. (line 69) * Expat XML parser library: gawkextlib. (line 35) -* exponent: Numeric Functions. (line 32) +* exponent: Numeric Functions. (line 33) * expressions: Expressions. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * expressions, assignment: Assignment Ops. (line 6) @@ -32702,7 +32712,7 @@ Index * installation, VMS: VMS Installation. (line 6) * installing gawk: Installation. (line 6) * instruction tracing, in debugger: Debugger Info. (line 89) -* int: Numeric Functions. (line 37) +* int: Numeric Functions. (line 38) * INT signal (MS-Windows): Profiling. (line 214) * integer array indices: Numeric Array Subscripts. (line 31) @@ -32851,9 +32861,9 @@ Index * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. (line 6) -* log: Numeric Functions. (line 44) +* log: Numeric Functions. (line 45) * log files, timestamps in: Time Functions. (line 6) -* logarithm: Numeric Functions. (line 44) +* logarithm: Numeric Functions. (line 45) * logical false/true: Truth Values. (line 6) * logical operators, See Boolean expressions: Boolean Ops. (line 6) * login information: Passwd Functions. (line 16) @@ -33310,12 +33320,12 @@ Index * Rakitzis, Byron: History Sorting. (line 25) * Ramey, Chet <1>: General Data Types. (line 6) * Ramey, Chet: Acknowledgments. (line 60) -* rand: Numeric Functions. (line 48) +* rand: Numeric Functions. (line 49) * random numbers, Cliff: Cliff Random Function. (line 6) * random numbers, rand()/srand() functions: Numeric Functions. - (line 48) -* random numbers, seed of: Numeric Functions. (line 78) + (line 49) +* random numbers, seed of: Numeric Functions. (line 79) * range expressions (regexps): Bracket Expressions. (line 6) * range patterns: Ranges. (line 6) * range patterns, line continuation and: Ranges. (line 65) @@ -33443,7 +33453,7 @@ Index * Robbins, Miriam <2>: Getline/Pipe. (line 39) * Robbins, Miriam: Acknowledgments. (line 82) * Rommel, Kai Uwe: Contributors. (line 42) -* round to nearest integer: Numeric Functions. (line 37) +* 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) @@ -33493,7 +33503,7 @@ Index * sed utility <2>: Simple Sed. (line 6) * sed utility: Field Splitting Summary. (line 46) -* seeding random number generator: Numeric Functions. (line 78) +* seeding random number generator: Numeric Functions. (line 79) * semicolon (;), AWKPATH variable and: PC Using. (line 10) * semicolon (;), separating statements in actions <1>: Statements. (line 10) @@ -33595,8 +33605,8 @@ Index * SIGUSR1 signal, for dynamic profiling: Profiling. (line 188) * silent debugger command: Debugger Execution Control. (line 10) -* sin: Numeric Functions. (line 89) -* sine: Numeric Functions. (line 89) +* sin: Numeric Functions. (line 90) +* sine: Numeric Functions. (line 90) * single quote ('): One-shot. (line 15) * single quote (') in gawk command lines: Long. (line 33) * single quote ('), in shell commands: Quoting. (line 48) @@ -33646,10 +33656,10 @@ Index * sprintf() function, OFMT variable and: User-modified. (line 114) * sprintf() function, print/printf statements and: Round Function. (line 6) -* sqrt: Numeric Functions. (line 92) +* sqrt: Numeric Functions. (line 93) * square brackets ([]), regexp operator: Regexp Operators. (line 56) -* square root: Numeric Functions. (line 92) -* srand: Numeric Functions. (line 96) +* square root: Numeric Functions. (line 93) +* srand: Numeric Functions. (line 97) * stack frame: Debugging Terms. (line 10) * Stallman, Richard <1>: Glossary. (line 296) * Stallman, Richard <2>: Contributors. (line 23) @@ -34112,431 +34122,431 @@ Node: OFMT271658 Node: Printf273016 Node: Basic Printf273922 Node: Control Letters275461 -Node: Format Modifiers279313 -Node: Printf Examples285340 -Node: Redirection287804 -Node: Special Files294776 -Node: Special FD295307 -Ref: Special FD-Footnote-1298931 -Node: Special Network299005 -Node: Special Caveats299855 -Node: Close Files And Pipes300651 -Ref: Close Files And Pipes-Footnote-1307812 -Ref: Close Files And Pipes-Footnote-2307960 -Node: Output Summary308110 -Node: Output exercises309107 -Node: Expressions309787 -Node: Values310972 -Node: Constants311648 -Node: Scalar Constants312328 -Ref: Scalar Constants-Footnote-1313187 -Node: Nondecimal-numbers313437 -Node: Regexp Constants316437 -Node: Using Constant Regexps316912 -Node: Variables319982 -Node: Using Variables320637 -Node: Assignment Options322361 -Node: Conversion324236 -Node: Strings And Numbers324760 -Ref: Strings And Numbers-Footnote-1327822 -Node: Locale influences conversions327931 -Ref: table-locale-affects330648 -Node: All Operators331236 -Node: Arithmetic Ops331866 -Node: Concatenation334371 -Ref: Concatenation-Footnote-1337167 -Node: Assignment Ops337287 -Ref: table-assign-ops342270 -Node: Increment Ops343587 -Node: Truth Values and Conditions347025 -Node: Truth Values348108 -Node: Typing and Comparison349157 -Node: Variable Typing349950 -Ref: Variable Typing-Footnote-1353850 -Node: Comparison Operators353972 -Ref: table-relational-ops354382 -Node: POSIX String Comparison357932 -Ref: POSIX String Comparison-Footnote-1359016 -Node: Boolean Ops359154 -Ref: Boolean Ops-Footnote-1363224 -Node: Conditional Exp363315 -Node: Function Calls365042 -Node: Precedence368922 -Node: Locales372591 -Node: Expressions Summary374222 -Node: Patterns and Actions376763 -Node: Pattern Overview377879 -Node: Regexp Patterns379556 -Node: Expression Patterns380099 -Node: Ranges383880 -Node: BEGIN/END386986 -Node: Using BEGIN/END387748 -Ref: Using BEGIN/END-Footnote-1390484 -Node: I/O And BEGIN/END390590 -Node: BEGINFILE/ENDFILE392875 -Node: Empty395806 -Node: Using Shell Variables396123 -Node: Action Overview398406 -Node: Statements400733 -Node: If Statement402581 -Node: While Statement404079 -Node: Do Statement406123 -Node: For Statement407279 -Node: Switch Statement410431 -Node: Break Statement412534 -Node: Continue Statement414589 -Node: Next Statement416382 -Node: Nextfile Statement418772 -Node: Exit Statement421427 -Node: Built-in Variables423831 -Node: User-modified424958 -Ref: User-modified-Footnote-1432647 -Node: Auto-set432709 -Ref: Auto-set-Footnote-1445628 -Ref: Auto-set-Footnote-2445833 -Node: ARGC and ARGV445889 -Node: Pattern Action Summary449743 -Node: Arrays451966 -Node: Array Basics453515 -Node: Array Intro454341 -Ref: figure-array-elements456314 -Node: Reference to Elements458721 -Node: Assigning Elements460994 -Node: Array Example461485 -Node: Scanning an Array463217 -Node: Controlling Scanning466232 -Ref: Controlling Scanning-Footnote-1471405 -Node: Delete471721 -Ref: Delete-Footnote-1474486 -Node: Numeric Array Subscripts474543 -Node: Uninitialized Subscripts476726 -Node: Multidimensional478351 -Node: Multiscanning481444 -Node: Arrays of Arrays483033 -Node: Arrays Summary487696 -Node: Functions489801 -Node: Built-in490674 -Node: Calling Built-in491752 -Node: Numeric Functions493740 -Ref: Numeric Functions-Footnote-1498318 -Ref: Numeric Functions-Footnote-2498675 -Ref: Numeric Functions-Footnote-3498723 -Node: String Functions498992 -Ref: String Functions-Footnote-1522003 -Ref: String Functions-Footnote-2522132 -Ref: String Functions-Footnote-3522380 -Node: Gory Details522467 -Ref: table-sub-escapes524136 -Ref: table-sub-posix-92525490 -Ref: table-sub-proposed526841 -Ref: table-posix-sub528195 -Ref: table-gensub-escapes529740 -Ref: Gory Details-Footnote-1530916 -Ref: Gory Details-Footnote-2530967 -Node: I/O Functions531118 -Ref: I/O Functions-Footnote-1538241 -Node: Time Functions538388 -Ref: Time Functions-Footnote-1548852 -Ref: Time Functions-Footnote-2548920 -Ref: Time Functions-Footnote-3549078 -Ref: Time Functions-Footnote-4549189 -Ref: Time Functions-Footnote-5549301 -Ref: Time Functions-Footnote-6549528 -Node: Bitwise Functions549794 -Ref: table-bitwise-ops550356 -Ref: Bitwise Functions-Footnote-1554601 -Node: Type Functions554785 -Node: I18N Functions555927 -Node: User-defined557572 -Node: Definition Syntax558376 -Ref: Definition Syntax-Footnote-1563555 -Node: Function Example563624 -Ref: Function Example-Footnote-1566268 -Node: Function Caveats566290 -Node: Calling A Function566808 -Node: Variable Scope567763 -Node: Pass By Value/Reference570751 -Node: Return Statement574259 -Node: Dynamic Typing577243 -Node: Indirect Calls578172 -Node: Functions Summary587885 -Node: Library Functions590424 -Ref: Library Functions-Footnote-1594042 -Ref: Library Functions-Footnote-2594185 -Node: Library Names594356 -Ref: Library Names-Footnote-1597829 -Ref: Library Names-Footnote-2598049 -Node: General Functions598135 -Node: Strtonum Function599163 -Node: Assert Function601943 -Node: Round Function605269 -Node: Cliff Random Function606810 -Node: Ordinal Functions607826 -Ref: Ordinal Functions-Footnote-1610903 -Ref: Ordinal Functions-Footnote-2611155 -Node: Join Function611366 -Ref: Join Function-Footnote-1613137 -Node: Getlocaltime Function613337 -Node: Readfile Function617073 -Node: Data File Management618912 -Node: Filetrans Function619544 -Node: Rewind Function623613 -Node: File Checking625000 -Ref: File Checking-Footnote-1626132 -Node: Empty Files626333 -Node: Ignoring Assigns628312 -Node: Getopt Function629866 -Ref: Getopt Function-Footnote-1641169 -Node: Passwd Functions641372 -Ref: Passwd Functions-Footnote-1650351 -Node: Group Functions650439 -Ref: Group Functions-Footnote-1658380 -Node: Walking Arrays658593 -Node: Library Functions Summary660196 -Node: Library exercises661584 -Node: Sample Programs662864 -Node: Running Examples663634 -Node: Clones664362 -Node: Cut Program665586 -Node: Egrep Program675454 -Ref: Egrep Program-Footnote-1683425 -Node: Id Program683535 -Node: Split Program687199 -Ref: Split Program-Footnote-1690737 -Node: Tee Program690865 -Node: Uniq Program693672 -Node: Wc Program701102 -Ref: Wc Program-Footnote-1705367 -Node: Miscellaneous Programs705459 -Node: Dupword Program706672 -Node: Alarm Program708703 -Node: Translate Program713517 -Ref: Translate Program-Footnote-1717908 -Ref: Translate Program-Footnote-2718178 -Node: Labels Program718312 -Ref: Labels Program-Footnote-1721683 -Node: Word Sorting721767 -Node: History Sorting725810 -Node: Extract Program727646 -Node: Simple Sed735182 -Node: Igawk Program738244 -Ref: Igawk Program-Footnote-1752555 -Ref: Igawk Program-Footnote-2752756 -Node: Anagram Program752894 -Node: Signature Program755962 -Node: Programs Summary757209 -Node: Programs Exercises758424 -Node: Advanced Features762075 -Node: Nondecimal Data764023 -Node: Array Sorting765600 -Node: Controlling Array Traversal766297 -Node: Array Sorting Functions774577 -Ref: Array Sorting Functions-Footnote-1778484 -Node: Two-way I/O778678 -Ref: Two-way I/O-Footnote-1784194 -Node: TCP/IP Networking784276 -Node: Profiling787120 -Node: Advanced Features Summary794671 -Node: Internationalization796535 -Node: I18N and L10N798015 -Node: Explaining gettext798701 -Ref: Explaining gettext-Footnote-1803841 -Ref: Explaining gettext-Footnote-2804025 -Node: Programmer i18n804190 -Node: Translator i18n808415 -Node: String Extraction809209 -Ref: String Extraction-Footnote-1810170 -Node: Printf Ordering810256 -Ref: Printf Ordering-Footnote-1813038 -Node: I18N Portability813102 -Ref: I18N Portability-Footnote-1815551 -Node: I18N Example815614 -Ref: I18N Example-Footnote-1818336 -Node: Gawk I18N818408 -Node: I18N Summary819046 -Node: Debugger820385 -Node: Debugging821407 -Node: Debugging Concepts821848 -Node: Debugging Terms823704 -Node: Awk Debugging826301 -Node: Sample Debugging Session827193 -Node: Debugger Invocation827713 -Node: Finding The Bug829046 -Node: List of Debugger Commands835528 -Node: Breakpoint Control836860 -Node: Debugger Execution Control840524 -Node: Viewing And Changing Data843884 -Node: Execution Stack847242 -Node: Debugger Info848755 -Node: Miscellaneous Debugger Commands852749 -Node: Readline Support857933 -Node: Limitations858825 -Node: Debugging Summary861099 -Node: Arbitrary Precision Arithmetic862263 -Node: Computer Arithmetic863592 -Ref: Computer Arithmetic-Footnote-1867979 -Node: Math Definitions868036 -Ref: table-ieee-formats870920 -Node: MPFR features871424 -Node: FP Math Caution873066 -Ref: FP Math Caution-Footnote-1874107 -Node: Inexactness of computations874476 -Node: Inexact representation875424 -Node: Comparing FP Values876779 -Node: Errors accumulate877743 -Node: Getting Accuracy879176 -Node: Try To Round881835 -Node: Setting precision882734 -Ref: table-predefined-precision-strings883416 -Node: Setting the rounding mode885209 -Ref: table-gawk-rounding-modes885573 -Ref: Setting the rounding mode-Footnote-1889027 -Node: Arbitrary Precision Integers889206 -Ref: Arbitrary Precision Integers-Footnote-1893001 -Node: POSIX Floating Point Problems893150 -Ref: POSIX Floating Point Problems-Footnote-1897026 -Node: Floating point summary897064 -Node: Dynamic Extensions899281 -Node: Extension Intro900833 -Node: Plugin License902098 -Node: Extension Mechanism Outline902783 -Ref: figure-load-extension903207 -Ref: figure-load-new-function904692 -Ref: figure-call-new-function905694 -Node: Extension API Description907678 -Node: Extension API Functions Introduction909128 -Node: General Data Types913993 -Ref: General Data Types-Footnote-1919686 -Node: Requesting Values919985 -Ref: table-value-types-returned920722 -Node: Memory Allocation Functions921680 -Ref: Memory Allocation Functions-Footnote-1924427 -Node: Constructor Functions924523 -Node: Registration Functions926281 -Node: Extension Functions926966 -Node: Exit Callback Functions929268 -Node: Extension Version String930517 -Node: Input Parsers931167 -Node: Output Wrappers940970 -Node: Two-way processors945486 -Node: Printing Messages947690 -Ref: Printing Messages-Footnote-1948767 -Node: Updating `ERRNO'948919 -Node: Accessing Parameters949658 -Node: Symbol Table Access950888 -Node: Symbol table by name951402 -Node: Symbol table by cookie953378 -Ref: Symbol table by cookie-Footnote-1957511 -Node: Cached values957574 -Ref: Cached values-Footnote-1961078 -Node: Array Manipulation961169 -Ref: Array Manipulation-Footnote-1962267 -Node: Array Data Types962306 -Ref: Array Data Types-Footnote-1965009 -Node: Array Functions965101 -Node: Flattening Arrays968975 -Node: Creating Arrays975827 -Node: Extension API Variables980558 -Node: Extension Versioning981194 -Node: Extension API Informational Variables983095 -Node: Extension API Boilerplate984181 -Node: Finding Extensions987985 -Node: Extension Example988545 -Node: Internal File Description989275 -Node: Internal File Ops993366 -Ref: Internal File Ops-Footnote-11004798 -Node: Using Internal File Ops1004938 -Ref: Using Internal File Ops-Footnote-11007285 -Node: Extension Samples1007553 -Node: Extension Sample File Functions1009077 -Node: Extension Sample Fnmatch1016645 -Node: Extension Sample Fork1018127 -Node: Extension Sample Inplace1019340 -Node: Extension Sample Ord1021015 -Node: Extension Sample Readdir1021851 -Ref: table-readdir-file-types1022707 -Node: Extension Sample Revout1023506 -Node: Extension Sample Rev2way1024097 -Node: Extension Sample Read write array1024838 -Node: Extension Sample Readfile1026717 -Node: Extension Sample API Tests1027817 -Node: Extension Sample Time1028342 -Node: gawkextlib1029657 -Node: Extension summary1032470 -Node: Extension Exercises1036163 -Node: Language History1036885 -Node: V7/SVR3.11038528 -Node: SVR41040848 -Node: POSIX1042290 -Node: BTL1043676 -Node: POSIX/GNU1044410 -Node: Feature History1050009 -Node: Common Extensions1063139 -Node: Ranges and Locales1064451 -Ref: Ranges and Locales-Footnote-11069068 -Ref: Ranges and Locales-Footnote-21069095 -Ref: Ranges and Locales-Footnote-31069329 -Node: Contributors1069550 -Node: History summary1074975 -Node: Installation1076344 -Node: Gawk Distribution1077295 -Node: Getting1077779 -Node: Extracting1078603 -Node: Distribution contents1080245 -Node: Unix Installation1086015 -Node: Quick Installation1086632 -Node: Additional Configuration Options1089074 -Node: Configuration Philosophy1090812 -Node: Non-Unix Installation1093163 -Node: PC Installation1093621 -Node: PC Binary Installation1094932 -Node: PC Compiling1096780 -Ref: PC Compiling-Footnote-11099779 -Node: PC Testing1099884 -Node: PC Using1101060 -Node: Cygwin1105218 -Node: MSYS1106027 -Node: VMS Installation1106541 -Node: VMS Compilation1107337 -Ref: VMS Compilation-Footnote-11108559 -Node: VMS Dynamic Extensions1108617 -Node: VMS Installation Details1109990 -Node: VMS Running1112242 -Node: VMS GNV1115076 -Node: VMS Old Gawk1115799 -Node: Bugs1116269 -Node: Other Versions1120273 -Node: Installation summary1126528 -Node: Notes1127584 -Node: Compatibility Mode1128449 -Node: Additions1129231 -Node: Accessing The Source1130156 -Node: Adding Code1131592 -Node: New Ports1137770 -Node: Derived Files1142251 -Ref: Derived Files-Footnote-11147332 -Ref: Derived Files-Footnote-21147366 -Ref: Derived Files-Footnote-31147962 -Node: Future Extensions1148076 -Node: Implementation Limitations1148682 -Node: Extension Design1149930 -Node: Old Extension Problems1151084 -Ref: Old Extension Problems-Footnote-11152601 -Node: Extension New Mechanism Goals1152658 -Ref: Extension New Mechanism Goals-Footnote-11156018 -Node: Extension Other Design Decisions1156207 -Node: Extension Future Growth1158313 -Node: Old Extension Mechanism1159149 -Node: Notes summary1160911 -Node: Basic Concepts1162097 -Node: Basic High Level1162778 -Ref: figure-general-flow1163050 -Ref: figure-process-flow1163649 -Ref: Basic High Level-Footnote-11166878 -Node: Basic Data Typing1167063 -Node: Glossary1170391 -Node: Copying1195543 -Node: GNU Free Documentation License1233099 -Node: Index1258235 +Node: Format Modifiers279452 +Node: Printf Examples285479 +Node: Redirection287943 +Node: Special Files294915 +Node: Special FD295446 +Ref: Special FD-Footnote-1299070 +Node: Special Network299144 +Node: Special Caveats299994 +Node: Close Files And Pipes300790 +Ref: Close Files And Pipes-Footnote-1307951 +Ref: Close Files And Pipes-Footnote-2308099 +Node: Output Summary308249 +Node: Output exercises309246 +Node: Expressions309926 +Node: Values311111 +Node: Constants311787 +Node: Scalar Constants312467 +Ref: Scalar Constants-Footnote-1313326 +Node: Nondecimal-numbers313576 +Node: Regexp Constants316576 +Node: Using Constant Regexps317051 +Node: Variables320121 +Node: Using Variables320776 +Node: Assignment Options322500 +Node: Conversion324375 +Node: Strings And Numbers324899 +Ref: Strings And Numbers-Footnote-1327961 +Node: Locale influences conversions328070 +Ref: table-locale-affects330787 +Node: All Operators331375 +Node: Arithmetic Ops332005 +Node: Concatenation334510 +Ref: Concatenation-Footnote-1337306 +Node: Assignment Ops337426 +Ref: table-assign-ops342409 +Node: Increment Ops343726 +Node: Truth Values and Conditions347164 +Node: Truth Values348247 +Node: Typing and Comparison349296 +Node: Variable Typing350089 +Ref: Variable Typing-Footnote-1353989 +Node: Comparison Operators354111 +Ref: table-relational-ops354521 +Node: POSIX String Comparison358071 +Ref: POSIX String Comparison-Footnote-1359155 +Node: Boolean Ops359293 +Ref: Boolean Ops-Footnote-1363363 +Node: Conditional Exp363454 +Node: Function Calls365181 +Node: Precedence369061 +Node: Locales372730 +Node: Expressions Summary374361 +Node: Patterns and Actions376902 +Node: Pattern Overview378018 +Node: Regexp Patterns379695 +Node: Expression Patterns380238 +Node: Ranges384019 +Node: BEGIN/END387125 +Node: Using BEGIN/END387887 +Ref: Using BEGIN/END-Footnote-1390623 +Node: I/O And BEGIN/END390729 +Node: BEGINFILE/ENDFILE393014 +Node: Empty395945 +Node: Using Shell Variables396262 +Node: Action Overview398545 +Node: Statements400872 +Node: If Statement402720 +Node: While Statement404218 +Node: Do Statement406262 +Node: For Statement407418 +Node: Switch Statement410570 +Node: Break Statement412673 +Node: Continue Statement414728 +Node: Next Statement416521 +Node: Nextfile Statement418911 +Node: Exit Statement421566 +Node: Built-in Variables423970 +Node: User-modified425097 +Ref: User-modified-Footnote-1432786 +Node: Auto-set432848 +Ref: Auto-set-Footnote-1445767 +Ref: Auto-set-Footnote-2445972 +Node: ARGC and ARGV446028 +Node: Pattern Action Summary449882 +Node: Arrays452105 +Node: Array Basics453654 +Node: Array Intro454480 +Ref: figure-array-elements456453 +Node: Reference to Elements458860 +Node: Assigning Elements461133 +Node: Array Example461624 +Node: Scanning an Array463356 +Node: Controlling Scanning466371 +Ref: Controlling Scanning-Footnote-1471544 +Node: Delete471860 +Ref: Delete-Footnote-1474625 +Node: Numeric Array Subscripts474682 +Node: Uninitialized Subscripts476865 +Node: Multidimensional478490 +Node: Multiscanning481583 +Node: Arrays of Arrays483172 +Node: Arrays Summary487835 +Node: Functions489940 +Node: Built-in490813 +Node: Calling Built-in491891 +Node: Numeric Functions493879 +Ref: Numeric Functions-Footnote-1498515 +Ref: Numeric Functions-Footnote-2498872 +Ref: Numeric Functions-Footnote-3498920 +Node: String Functions499189 +Ref: String Functions-Footnote-1522200 +Ref: String Functions-Footnote-2522329 +Ref: String Functions-Footnote-3522577 +Node: Gory Details522664 +Ref: table-sub-escapes524333 +Ref: table-sub-posix-92525687 +Ref: table-sub-proposed527038 +Ref: table-posix-sub528392 +Ref: table-gensub-escapes529937 +Ref: Gory Details-Footnote-1531113 +Ref: Gory Details-Footnote-2531164 +Node: I/O Functions531315 +Ref: I/O Functions-Footnote-1538438 +Node: Time Functions538585 +Ref: Time Functions-Footnote-1549049 +Ref: Time Functions-Footnote-2549117 +Ref: Time Functions-Footnote-3549275 +Ref: Time Functions-Footnote-4549386 +Ref: Time Functions-Footnote-5549498 +Ref: Time Functions-Footnote-6549725 +Node: Bitwise Functions549991 +Ref: table-bitwise-ops550553 +Ref: Bitwise Functions-Footnote-1554798 +Node: Type Functions554982 +Node: I18N Functions556124 +Node: User-defined557769 +Node: Definition Syntax558573 +Ref: Definition Syntax-Footnote-1563752 +Node: Function Example563821 +Ref: Function Example-Footnote-1566465 +Node: Function Caveats566487 +Node: Calling A Function567005 +Node: Variable Scope567960 +Node: Pass By Value/Reference570948 +Node: Return Statement574456 +Node: Dynamic Typing577440 +Node: Indirect Calls578369 +Node: Functions Summary588082 +Node: Library Functions590621 +Ref: Library Functions-Footnote-1594239 +Ref: Library Functions-Footnote-2594382 +Node: Library Names594553 +Ref: Library Names-Footnote-1598026 +Ref: Library Names-Footnote-2598246 +Node: General Functions598332 +Node: Strtonum Function599360 +Node: Assert Function602140 +Node: Round Function605466 +Node: Cliff Random Function607007 +Node: Ordinal Functions608023 +Ref: Ordinal Functions-Footnote-1611100 +Ref: Ordinal Functions-Footnote-2611352 +Node: Join Function611563 +Ref: Join Function-Footnote-1613334 +Node: Getlocaltime Function613534 +Node: Readfile Function617270 +Node: Data File Management619109 +Node: Filetrans Function619741 +Node: Rewind Function623810 +Node: File Checking625368 +Ref: File Checking-Footnote-1626500 +Node: Empty Files626701 +Node: Ignoring Assigns628680 +Node: Getopt Function630234 +Ref: Getopt Function-Footnote-1641537 +Node: Passwd Functions641740 +Ref: Passwd Functions-Footnote-1650719 +Node: Group Functions650807 +Ref: Group Functions-Footnote-1658748 +Node: Walking Arrays658961 +Node: Library Functions Summary660564 +Node: Library exercises661952 +Node: Sample Programs663232 +Node: Running Examples664002 +Node: Clones664730 +Node: Cut Program665954 +Node: Egrep Program675822 +Ref: Egrep Program-Footnote-1683793 +Node: Id Program683903 +Node: Split Program687567 +Ref: Split Program-Footnote-1691105 +Node: Tee Program691233 +Node: Uniq Program694040 +Node: Wc Program701470 +Ref: Wc Program-Footnote-1705735 +Node: Miscellaneous Programs705827 +Node: Dupword Program707040 +Node: Alarm Program709071 +Node: Translate Program713885 +Ref: Translate Program-Footnote-1718276 +Ref: Translate Program-Footnote-2718546 +Node: Labels Program718680 +Ref: Labels Program-Footnote-1722051 +Node: Word Sorting722135 +Node: History Sorting726178 +Node: Extract Program728014 +Node: Simple Sed735550 +Node: Igawk Program738612 +Ref: Igawk Program-Footnote-1752923 +Ref: Igawk Program-Footnote-2753124 +Node: Anagram Program753262 +Node: Signature Program756330 +Node: Programs Summary757577 +Node: Programs Exercises758792 +Node: Advanced Features762443 +Node: Nondecimal Data764391 +Node: Array Sorting765968 +Node: Controlling Array Traversal766665 +Node: Array Sorting Functions774945 +Ref: Array Sorting Functions-Footnote-1778852 +Node: Two-way I/O779046 +Ref: Two-way I/O-Footnote-1784562 +Node: TCP/IP Networking784644 +Node: Profiling787488 +Node: Advanced Features Summary795039 +Node: Internationalization796903 +Node: I18N and L10N798383 +Node: Explaining gettext799069 +Ref: Explaining gettext-Footnote-1804209 +Ref: Explaining gettext-Footnote-2804393 +Node: Programmer i18n804558 +Node: Translator i18n808783 +Node: String Extraction809577 +Ref: String Extraction-Footnote-1810538 +Node: Printf Ordering810624 +Ref: Printf Ordering-Footnote-1813406 +Node: I18N Portability813470 +Ref: I18N Portability-Footnote-1815919 +Node: I18N Example815982 +Ref: I18N Example-Footnote-1818704 +Node: Gawk I18N818776 +Node: I18N Summary819414 +Node: Debugger820753 +Node: Debugging821775 +Node: Debugging Concepts822216 +Node: Debugging Terms824072 +Node: Awk Debugging826669 +Node: Sample Debugging Session827561 +Node: Debugger Invocation828081 +Node: Finding The Bug829414 +Node: List of Debugger Commands835896 +Node: Breakpoint Control837228 +Node: Debugger Execution Control840892 +Node: Viewing And Changing Data844252 +Node: Execution Stack847610 +Node: Debugger Info849123 +Node: Miscellaneous Debugger Commands853117 +Node: Readline Support858301 +Node: Limitations859193 +Node: Debugging Summary861467 +Node: Arbitrary Precision Arithmetic862631 +Node: Computer Arithmetic863960 +Ref: Computer Arithmetic-Footnote-1868347 +Node: Math Definitions868404 +Ref: table-ieee-formats871288 +Node: MPFR features871792 +Node: FP Math Caution873434 +Ref: FP Math Caution-Footnote-1874475 +Node: Inexactness of computations874844 +Node: Inexact representation875792 +Node: Comparing FP Values877147 +Node: Errors accumulate878111 +Node: Getting Accuracy879544 +Node: Try To Round882203 +Node: Setting precision883102 +Ref: table-predefined-precision-strings883784 +Node: Setting the rounding mode885577 +Ref: table-gawk-rounding-modes885941 +Ref: Setting the rounding mode-Footnote-1889395 +Node: Arbitrary Precision Integers889574 +Ref: Arbitrary Precision Integers-Footnote-1893369 +Node: POSIX Floating Point Problems893518 +Ref: POSIX Floating Point Problems-Footnote-1897394 +Node: Floating point summary897432 +Node: Dynamic Extensions899649 +Node: Extension Intro901201 +Node: Plugin License902466 +Node: Extension Mechanism Outline903151 +Ref: figure-load-extension903575 +Ref: figure-load-new-function905060 +Ref: figure-call-new-function906062 +Node: Extension API Description908046 +Node: Extension API Functions Introduction909496 +Node: General Data Types914361 +Ref: General Data Types-Footnote-1920054 +Node: Requesting Values920353 +Ref: table-value-types-returned921090 +Node: Memory Allocation Functions922048 +Ref: Memory Allocation Functions-Footnote-1924795 +Node: Constructor Functions924891 +Node: Registration Functions926649 +Node: Extension Functions927334 +Node: Exit Callback Functions929636 +Node: Extension Version String930885 +Node: Input Parsers931535 +Node: Output Wrappers941349 +Node: Two-way processors945865 +Node: Printing Messages948069 +Ref: Printing Messages-Footnote-1949146 +Node: Updating `ERRNO'949298 +Node: Accessing Parameters950037 +Node: Symbol Table Access951267 +Node: Symbol table by name951781 +Node: Symbol table by cookie953757 +Ref: Symbol table by cookie-Footnote-1957890 +Node: Cached values957953 +Ref: Cached values-Footnote-1961457 +Node: Array Manipulation961548 +Ref: Array Manipulation-Footnote-1962646 +Node: Array Data Types962685 +Ref: Array Data Types-Footnote-1965388 +Node: Array Functions965480 +Node: Flattening Arrays969354 +Node: Creating Arrays976206 +Node: Extension API Variables980937 +Node: Extension Versioning981573 +Node: Extension API Informational Variables983474 +Node: Extension API Boilerplate984560 +Node: Finding Extensions988364 +Node: Extension Example988924 +Node: Internal File Description989654 +Node: Internal File Ops993745 +Ref: Internal File Ops-Footnote-11005177 +Node: Using Internal File Ops1005317 +Ref: Using Internal File Ops-Footnote-11007664 +Node: Extension Samples1007932 +Node: Extension Sample File Functions1009456 +Node: Extension Sample Fnmatch1017024 +Node: Extension Sample Fork1018506 +Node: Extension Sample Inplace1019719 +Node: Extension Sample Ord1021394 +Node: Extension Sample Readdir1022230 +Ref: table-readdir-file-types1023086 +Node: Extension Sample Revout1023885 +Node: Extension Sample Rev2way1024476 +Node: Extension Sample Read write array1025217 +Node: Extension Sample Readfile1027096 +Node: Extension Sample API Tests1028196 +Node: Extension Sample Time1028721 +Node: gawkextlib1030036 +Node: Extension summary1032849 +Node: Extension Exercises1036542 +Node: Language History1037264 +Node: V7/SVR3.11038907 +Node: SVR41041227 +Node: POSIX1042669 +Node: BTL1044055 +Node: POSIX/GNU1044789 +Node: Feature History1050532 +Node: Common Extensions1063662 +Node: Ranges and Locales1064974 +Ref: Ranges and Locales-Footnote-11069591 +Ref: Ranges and Locales-Footnote-21069618 +Ref: Ranges and Locales-Footnote-31069852 +Node: Contributors1070073 +Node: History summary1075498 +Node: Installation1076867 +Node: Gawk Distribution1077818 +Node: Getting1078302 +Node: Extracting1079126 +Node: Distribution contents1080768 +Node: Unix Installation1086538 +Node: Quick Installation1087155 +Node: Additional Configuration Options1089597 +Node: Configuration Philosophy1091335 +Node: Non-Unix Installation1093686 +Node: PC Installation1094144 +Node: PC Binary Installation1095455 +Node: PC Compiling1097303 +Ref: PC Compiling-Footnote-11100302 +Node: PC Testing1100407 +Node: PC Using1101583 +Node: Cygwin1105741 +Node: MSYS1106550 +Node: VMS Installation1107064 +Node: VMS Compilation1107860 +Ref: VMS Compilation-Footnote-11109082 +Node: VMS Dynamic Extensions1109140 +Node: VMS Installation Details1110513 +Node: VMS Running1112765 +Node: VMS GNV1115599 +Node: VMS Old Gawk1116322 +Node: Bugs1116792 +Node: Other Versions1120796 +Node: Installation summary1127051 +Node: Notes1128107 +Node: Compatibility Mode1128972 +Node: Additions1129754 +Node: Accessing The Source1130679 +Node: Adding Code1132115 +Node: New Ports1138293 +Node: Derived Files1142774 +Ref: Derived Files-Footnote-11147855 +Ref: Derived Files-Footnote-21147889 +Ref: Derived Files-Footnote-31148485 +Node: Future Extensions1148599 +Node: Implementation Limitations1149205 +Node: Extension Design1150453 +Node: Old Extension Problems1151607 +Ref: Old Extension Problems-Footnote-11153124 +Node: Extension New Mechanism Goals1153181 +Ref: Extension New Mechanism Goals-Footnote-11156541 +Node: Extension Other Design Decisions1156730 +Node: Extension Future Growth1158836 +Node: Old Extension Mechanism1159672 +Node: Notes summary1161434 +Node: Basic Concepts1162620 +Node: Basic High Level1163301 +Ref: figure-general-flow1163573 +Ref: figure-process-flow1164172 +Ref: Basic High Level-Footnote-11167401 +Node: Basic Data Typing1167586 +Node: Glossary1170914 +Node: Copying1196066 +Node: GNU Free Documentation License1233622 +Node: Index1258758 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index d6db2018..f2b455b4 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -1731,6 +1731,16 @@ another key, at the same time. For example, a @kbd{Ctrl-d} is typed by first pressing and holding the @kbd{CONTROL} key, next pressing the @kbd{d} key and finally releasing both keys. +@ifset FOR_PRINT +@quotation NOTE +Notes of interest look like this. +@end quotation + +@quotation CAUTION +Cautionary or warning notes look like this. +@end quotation +@end ifset + @c fakenode --- for prepinfo @unnumberedsubsec Dark Corners @cindex Kernighan, Brian @@ -9022,6 +9032,8 @@ and then to print the multibyte encoding of that character. Similarly, when printing a numeric value, @command{gawk} allows the value to be within the numeric range of values that can be held in a wide character. +If the conversion to multibyte encoding fails, @command{gawk} +uses the low eight bits of the value as the character to print. Other @command{awk} versions generally restrict themselves to printing the first byte of a string or to numeric values within the range of @@ -16619,13 +16631,14 @@ Return the cosine of @var{x}, with @var{x} in radians. @cindex div Perform integer division, similar to the standard C function of the same name. First, truncate @code{numerator} and @code{denominator} -to integers. Clear the @code{result} array, and then set -@code{result["quotient"]} to the result of @samp{numerator / denominator}, -truncated to an integer, and set @code{result["remainder"]} to the result -of @samp{numerator % denominator}, truncated to an integer. -This function is primarily intended for use with arbitrary length -integers; it avoids creating MPFR arbitrary precision floating-point -values (@pxref{Arbitrary Precision Integers}). +towards zero, creating integer values. Clear the @code{result} +array, and then set @code{result["quotient"]} to the result of +@samp{numerator / denominator}, truncated towards zero to an integer, +and set @code{result["remainder"]} to the result of @samp{numerator % +denominator}, truncated towards zero to an integer. This function is +primarily intended for use with arbitrary length integers; it avoids +creating MPFR arbitrary precision floating-point values (@pxref{Arbitrary +Precision Integers}). This function is a @code{gawk} extension. It is not available in compatibility mode (@pxref{Options}). @@ -21325,7 +21338,9 @@ to either update @code{ARGIND} on your own or modify this code as appropriate. The @code{rewind()} function also relies on the @code{nextfile} keyword -(@pxref{Nextfile Statement}). +(@pxref{Nextfile Statement}). Because of this, you should not call it +from an @code{ENDFILE} rule. (This isn't necessary anyway, since as soon +as an @code{ENDFILE} rule finishes @command{gawk} goes to the next file!) @node File Checking @subsection Checking for Readable @value{DDF}s @@ -31871,8 +31886,8 @@ need to test for a @code{NULL} value. @command{gawk} sets @code{*errcode} to zero, so there is no need to set it unless an error occurs. If an error does occur, the function should return @code{EOF} and set -@code{*errcode} to a non-zero value. In that case, if @code{*errcode} -does not equal @minus{}1, @command{gawk} automatically updates +@code{*errcode} to a value greater than zero. In that case, if @code{*errcode} +does not equal zero, @command{gawk} automatically updates the @code{ERRNO} variable based on the value of @code{*errcode}. (In general, setting @samp{*errcode = errno} should do the right thing.) @@ -35377,6 +35392,16 @@ GCC for VAX and Alpha has not been tested for a while. @end itemize +@item +Support for the following obsolete systems was removed from the code +and the documentation for @command{gawk} @value{PVERSION} 4.1: + +@c nested table +@itemize @value{MINUS} +@item +Ultrix +@end itemize + @end itemize @c XXX ADD MORE STUFF HERE diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 2d749e48..bb94aa1f 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -1698,6 +1698,16 @@ another key, at the same time. For example, a @kbd{Ctrl-d} is typed by first pressing and holding the @kbd{CONTROL} key, next pressing the @kbd{d} key and finally releasing both keys. +@ifset FOR_PRINT +@quotation NOTE +Notes of interest look like this. +@end quotation + +@quotation CAUTION +Cautionary or warning notes look like this. +@end quotation +@end ifset + @c fakenode --- for prepinfo @unnumberedsubsec Dark Corners @cindex Kernighan, Brian @@ -8641,6 +8651,8 @@ and then to print the multibyte encoding of that character. Similarly, when printing a numeric value, @command{gawk} allows the value to be within the numeric range of values that can be held in a wide character. +If the conversion to multibyte encoding fails, @command{gawk} +uses the low eight bits of the value as the character to print. Other @command{awk} versions generally restrict themselves to printing the first byte of a string or to numeric values within the range of @@ -15924,13 +15936,14 @@ Return the cosine of @var{x}, with @var{x} in radians. @cindex div Perform integer division, similar to the standard C function of the same name. First, truncate @code{numerator} and @code{denominator} -to integers. Clear the @code{result} array, and then set -@code{result["quotient"]} to the result of @samp{numerator / denominator}, -truncated to an integer, and set @code{result["remainder"]} to the result -of @samp{numerator % denominator}, truncated to an integer. -This function is primarily intended for use with arbitrary length -integers; it avoids creating MPFR arbitrary precision floating-point -values (@pxref{Arbitrary Precision Integers}). +towards zero, creating integer values. Clear the @code{result} +array, and then set @code{result["quotient"]} to the result of +@samp{numerator / denominator}, truncated towards zero to an integer, +and set @code{result["remainder"]} to the result of @samp{numerator % +denominator}, truncated towards zero to an integer. This function is +primarily intended for use with arbitrary length integers; it avoids +creating MPFR arbitrary precision floating-point values (@pxref{Arbitrary +Precision Integers}). This function is a @code{gawk} extension. It is not available in compatibility mode (@pxref{Options}). @@ -20440,7 +20453,9 @@ to either update @code{ARGIND} on your own or modify this code as appropriate. The @code{rewind()} function also relies on the @code{nextfile} keyword -(@pxref{Nextfile Statement}). +(@pxref{Nextfile Statement}). Because of this, you should not call it +from an @code{ENDFILE} rule. (This isn't necessary anyway, since as soon +as an @code{ENDFILE} rule finishes @command{gawk} goes to the next file!) @node File Checking @subsection Checking for Readable @value{DDF}s @@ -30986,8 +31001,8 @@ need to test for a @code{NULL} value. @command{gawk} sets @code{*errcode} to zero, so there is no need to set it unless an error occurs. If an error does occur, the function should return @code{EOF} and set -@code{*errcode} to a non-zero value. In that case, if @code{*errcode} -does not equal @minus{}1, @command{gawk} automatically updates +@code{*errcode} to a value greater than zero. In that case, if @code{*errcode} +does not equal zero, @command{gawk} automatically updates the @code{ERRNO} variable based on the value of @code{*errcode}. (In general, setting @samp{*errcode = errno} should do the right thing.) @@ -34492,6 +34507,16 @@ GCC for VAX and Alpha has not been tested for a while. @end itemize +@item +Support for the following obsolete systems was removed from the code +and the documentation for @command{gawk} @value{PVERSION} 4.1: + +@c nested table +@itemize @value{MINUS} +@item +Ultrix +@end itemize + @end itemize @c XXX ADD MORE STUFF HERE |