diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 448 |
1 files changed, 228 insertions, 220 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 2fe6ca0c..e23618b0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -11456,7 +11456,7 @@ parameters are enclosed in square brackets ([ ]): `fflush([FILENAME])' Flush any buffered output associated with FILENAME, which is either a file opened for writing or a shell command for - redirecting output to a pipe or coprocess. (c.e.). + redirecting output to a pipe or coprocess. Many utility programs "buffer" their output; i.e., they save information to write to a disk file or the screen in memory until @@ -11469,22 +11469,31 @@ parameters are enclosed in square brackets ([ ]): function--`gawk' also buffers its output and the `fflush()' function forces `gawk' to flush its buffers. - `fflush()' was added to Brian Kernighan's version of `awk' in - 1994; it is not part of the POSIX standard and is not available if - `--posix' has been specified on the command line (*note Options::). + `fflush()' was added to Brian Kernighan's version of `awk' in 1994. + For over two decades, it was not part of the POSIX standard. As + of December, 2012, it was accepted for inclusion into the POSIX + standard. See the Austin Group website + (http://austingroupbugs.net/view.php?id=634). + + POSIX standardizes `fflush()' as follows: If there is no argument, + or if the argument is the null string (`""'), then `awk' flushes + the buffers for _all_ open output files and pipes. + + NOTE: Prior to version 4.0.2, `gawk' would flush only the + standard output if there was no argument, and flush all + output files and pipes if the argument was the null string. + This was changed in order to be compatible with Brian + Kernighan's `awk', in the hope that standardizing this + feature in POSIX would then be easier (which indeed helped). - `gawk' extends the `fflush()' function in two ways. The first is - to allow no argument at all. In this case, the buffer for the - standard output is flushed. The second is to allow the null string - (`""') as the argument. In this case, the buffers for _all_ open - output files and pipes are flushed. Brian Kernighan's `awk' also - supports these extensions. + With `gawk', you can use `fflush("/dev/stdout")' if you wish + to flush only the standard output. `fflush()' returns zero if the buffer is successfully flushed; - otherwise, it returns -1. In the case where all buffers are - flushed, the return value is zero only if all buffers were flushed - successfully. Otherwise, it is -1, and `gawk' warns about the - problem FILENAME. + otherwise, it returns non-zero (`gawk' returns -1). In the case + where all buffers are flushed, the return value is zero only if + all buffers were flushed successfully. Otherwise, it is -1, and + `gawk' warns about the problem FILENAME. `gawk' also issues a warning message if you attempt to flush a file or pipe that was opened for reading (such as with `getline'), @@ -11561,7 +11570,7 @@ Advanced Notes: Controlling Output Buffering with `system()' The `fflush()' function provides explicit control over output buffering for individual files and pipes. However, its use is not portable to -many other `awk' implementations. An alternative method to flush output +many older `awk' implementations. An alternative method to flush output buffers is to call `system()' with a null string as its argument: system("") # flush output @@ -19970,7 +19979,8 @@ in his version of `awk'. Definition Syntax::). * The `fflush()' built-in function for flushing buffered output - (*note I/O Functions::). + (*note I/O Functions::). As of December 2012, this function is + now standardized by POSIX. *Note Common Extensions::, for a full list of the extensions @@ -20148,7 +20158,6 @@ Feature BWK Awk Mawk GNU Awk `nextfile' statement X X X `delete' without subscript X X X `length()' of an array X X -`fflush()' function X X X `BINMODE' variable X X @@ -24803,7 +24812,7 @@ Index * --re-interval option: Options. (line 227) * --sandbox option: Options. (line 239) * --sandbox option, disabling system() function: I/O Functions. - (line 85) + (line 94) * --sandbox option, input redirection with getline: Getline. (line 19) * --sandbox option, output redirection with print, printf: Redirection. (line 6) @@ -24970,7 +24979,7 @@ Index * adding, features to gawk: Adding Code. (line 6) * adding, fields: Changing Fields. (line 53) * adding, functions to gawk: Dynamic Extensions. (line 10) -* advanced features, buffering: I/O Functions. (line 98) +* advanced features, buffering: I/O Functions. (line 107) * advanced features, close() function: Close Files And Pipes. (line 131) * advanced features, constants, values of: Nondecimal-numbers. @@ -25285,8 +25294,8 @@ Index * Buening, Andreas <2>: Contributors. (line 92) * Buening, Andreas: Acknowledgments. (line 60) * buffering, input/output <1>: Two-way I/O. (line 70) -* buffering, input/output: I/O Functions. (line 130) -* buffering, interactive vs. noninteractive: I/O Functions. (line 98) +* buffering, input/output: I/O Functions. (line 139) +* buffering, interactive vs. noninteractive: I/O Functions. (line 107) * buffers, flushing: I/O Functions. (line 29) * buffers, operators for: GNU Regexp Operators. (line 48) @@ -26085,7 +26094,6 @@ Index * gawk, extensions, disabling: Options. (line 202) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) -* gawk, fflush() function in: I/O Functions. (line 44) * gawk, field separators and: User-modified. (line 77) * gawk, FIELDWIDTHS variable in <1>: User-modified. (line 35) * gawk, FIELDWIDTHS variable in: Constant Size. (line 22) @@ -26313,7 +26321,7 @@ Index * int() function: Numeric Functions. (line 23) * integers: Basic Data Typing. (line 21) * integers, unsigned: Basic Data Typing. (line 30) -* interacting with other programs: I/O Functions. (line 63) +* interacting with other programs: I/O Functions. (line 72) * internal constant, INVALID_HANDLE: Internals. (line 160) * internal function, assoc_clear(): Internals. (line 75) * internal function, assoc_lookup(): Internals. (line 79) @@ -27236,7 +27244,7 @@ Index * switch statement: Switch Statement. (line 6) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) -* system() function: I/O Functions. (line 63) +* system() function: I/O Functions. (line 72) * systime() function (gawk): Time Functions. (line 64) * t debugger command (alias for tbreak): Breakpoint Control. (line 89) * tbreak debugger command: Breakpoint Control. (line 89) @@ -27299,7 +27307,7 @@ Index (line 22) * troubleshooting, fatal errors, printf format strings: Format Modifiers. (line 159) -* troubleshooting, fflush() function: I/O Functions. (line 51) +* troubleshooting, fflush() function: I/O Functions. (line 60) * troubleshooting, function call syntax: Function Calls. (line 28) * troubleshooting, gawk: Compatibility Mode. (line 6) * troubleshooting, gawk, bug reports: Bugs. (line 9) @@ -27318,7 +27326,7 @@ Index (line 38) * troubleshooting, string concatenation: Concatenation. (line 27) * troubleshooting, substr() function: String Functions. (line 499) -* troubleshooting, system() function: I/O Functions. (line 85) +* troubleshooting, system() function: I/O Functions. (line 94) * troubleshooting, typographical errors, global variables: Options. (line 98) * true, logical: Truth Values. (line 6) @@ -27708,199 +27716,199 @@ Ref: table-gensub-escapes480558 Ref: Gory Details-Footnote-1481765 Ref: Gory Details-Footnote-2481816 Node: I/O Functions481967 -Ref: I/O Functions-Footnote-1488622 -Node: Time Functions488769 -Ref: Time Functions-Footnote-1499661 -Ref: Time Functions-Footnote-2499729 -Ref: Time Functions-Footnote-3499887 -Ref: Time Functions-Footnote-4499998 -Ref: Time Functions-Footnote-5500110 -Ref: Time Functions-Footnote-6500337 -Node: Bitwise Functions500603 -Ref: table-bitwise-ops501161 -Ref: Bitwise Functions-Footnote-1505321 -Node: Type Functions505505 -Node: I18N Functions505975 -Node: User-defined507602 -Node: Definition Syntax508406 -Ref: Definition Syntax-Footnote-1513316 -Node: Function Example513385 -Node: Function Caveats515979 -Node: Calling A Function516400 -Node: Variable Scope517515 -Node: Pass By Value/Reference519490 -Node: Return Statement522930 -Node: Dynamic Typing525911 -Node: Indirect Calls526646 -Node: Internationalization536331 -Node: I18N and L10N537757 -Node: Explaining gettext538443 -Ref: Explaining gettext-Footnote-1543509 -Ref: Explaining gettext-Footnote-2543693 -Node: Programmer i18n543858 -Node: Translator i18n548058 -Node: String Extraction548851 -Ref: String Extraction-Footnote-1549812 -Node: Printf Ordering549898 -Ref: Printf Ordering-Footnote-1552682 -Node: I18N Portability552746 -Ref: I18N Portability-Footnote-1555195 -Node: I18N Example555258 -Ref: I18N Example-Footnote-1557893 -Node: Gawk I18N557965 -Node: Advanced Features558582 -Node: Nondecimal Data560095 -Node: Array Sorting561678 -Node: Controlling Array Traversal562375 -Node: Array Sorting Functions570612 -Ref: Array Sorting Functions-Footnote-1574286 -Ref: Array Sorting Functions-Footnote-2574379 -Node: Two-way I/O574573 -Ref: Two-way I/O-Footnote-1580005 -Node: TCP/IP Networking580075 -Node: Profiling582919 -Node: Library Functions590393 -Ref: Library Functions-Footnote-1593400 -Node: Library Names593571 -Ref: Library Names-Footnote-1597042 -Ref: Library Names-Footnote-2597262 -Node: General Functions597348 -Node: Strtonum Function598301 -Node: Assert Function601231 -Node: Round Function604557 -Node: Cliff Random Function606100 -Node: Ordinal Functions607116 -Ref: Ordinal Functions-Footnote-1610186 -Ref: Ordinal Functions-Footnote-2610438 -Node: Join Function610647 -Ref: Join Function-Footnote-1612418 -Node: Gettimeofday Function612618 -Node: Data File Management616333 -Node: Filetrans Function616965 -Node: Rewind Function621104 -Node: File Checking622491 -Node: Empty Files623585 -Node: Ignoring Assigns625815 -Node: Getopt Function627368 -Ref: Getopt Function-Footnote-1638672 -Node: Passwd Functions638875 -Ref: Passwd Functions-Footnote-1647850 -Node: Group Functions647938 -Node: Walking Arrays656022 -Node: Sample Programs657591 -Node: Running Examples658256 -Node: Clones658984 -Node: Cut Program660208 -Node: Egrep Program670053 -Ref: Egrep Program-Footnote-1677826 -Node: Id Program677936 -Node: Split Program681552 -Ref: Split Program-Footnote-1685071 -Node: Tee Program685199 -Node: Uniq Program688002 -Node: Wc Program695431 -Ref: Wc Program-Footnote-1699697 -Ref: Wc Program-Footnote-2699897 -Node: Miscellaneous Programs699989 -Node: Dupword Program701177 -Node: Alarm Program703208 -Node: Translate Program707957 -Ref: Translate Program-Footnote-1712344 -Ref: Translate Program-Footnote-2712572 -Node: Labels Program712706 -Ref: Labels Program-Footnote-1716077 -Node: Word Sorting716161 -Node: History Sorting720045 -Node: Extract Program721884 -Ref: Extract Program-Footnote-1729367 -Node: Simple Sed729495 -Node: Igawk Program732557 -Ref: Igawk Program-Footnote-1747714 -Ref: Igawk Program-Footnote-2747915 -Node: Anagram Program748053 -Node: Signature Program751121 -Node: Debugger752221 -Node: Debugging753132 -Node: Debugging Concepts753545 -Node: Debugging Terms755401 -Node: Awk Debugging758024 -Node: Sample dgawk session758916 -Node: dgawk invocation759408 -Node: Finding The Bug760590 -Node: List of Debugger Commands767076 -Node: Breakpoint Control768387 -Node: Dgawk Execution Control772023 -Node: Viewing And Changing Data775374 -Node: Dgawk Stack778711 -Node: Dgawk Info780171 -Node: Miscellaneous Dgawk Commands784119 -Node: Readline Support789547 -Node: Dgawk Limitations790385 -Node: Language History792574 -Node: V7/SVR3.1794086 -Node: SVR4796407 -Node: POSIX797849 -Node: BTL798857 -Node: POSIX/GNU799591 -Node: Common Extensions804742 -Node: Ranges and Locales805849 -Ref: Ranges and Locales-Footnote-1810467 -Ref: Ranges and Locales-Footnote-2810494 -Ref: Ranges and Locales-Footnote-3810754 -Node: Contributors810975 -Node: Installation815237 -Node: Gawk Distribution816131 -Node: Getting816615 -Node: Extracting817441 -Node: Distribution contents819133 -Node: Unix Installation824355 -Node: Quick Installation824972 -Node: Additional Configuration Options826934 -Node: Configuration Philosophy828411 -Node: Non-Unix Installation830753 -Node: PC Installation831211 -Node: PC Binary Installation832510 -Node: PC Compiling834525 -Node: PC Testing837469 -Node: PC Using838645 -Node: Cygwin842830 -Node: MSYS843830 -Node: VMS Installation844344 -Node: VMS Compilation844947 -Ref: VMS Compilation-Footnote-1845954 -Node: VMS Installation Details846012 -Node: VMS Running847647 -Node: VMS Old Gawk849254 -Node: Bugs849728 -Node: Other Versions853580 -Node: Notes858861 -Node: Compatibility Mode859553 -Node: Additions860336 -Node: Accessing The Source861148 -Node: Adding Code862573 -Node: New Ports868540 -Node: Dynamic Extensions872653 -Node: Internals874029 -Node: Plugin License883132 -Node: Sample Library883766 -Node: Internal File Description884452 -Node: Internal File Ops888167 -Ref: Internal File Ops-Footnote-1892948 -Node: Using Internal File Ops893088 -Node: Future Extensions895465 -Node: Basic Concepts897969 -Node: Basic High Level898726 -Ref: Basic High Level-Footnote-1902761 -Node: Basic Data Typing902946 -Node: Floating Point Issues907471 -Node: String Conversion Precision908554 -Ref: String Conversion Precision-Footnote-1910254 -Node: Unexpected Results910363 -Node: POSIX Floating Point Problems912189 -Ref: POSIX Floating Point Problems-Footnote-1915894 -Node: Glossary915932 -Node: Copying941107 -Node: GNU Free Documentation License978664 -Node: Index1003801 +Ref: I/O Functions-Footnote-1489072 +Node: Time Functions489219 +Ref: Time Functions-Footnote-1500111 +Ref: Time Functions-Footnote-2500179 +Ref: Time Functions-Footnote-3500337 +Ref: Time Functions-Footnote-4500448 +Ref: Time Functions-Footnote-5500560 +Ref: Time Functions-Footnote-6500787 +Node: Bitwise Functions501053 +Ref: table-bitwise-ops501611 +Ref: Bitwise Functions-Footnote-1505771 +Node: Type Functions505955 +Node: I18N Functions506425 +Node: User-defined508052 +Node: Definition Syntax508856 +Ref: Definition Syntax-Footnote-1513766 +Node: Function Example513835 +Node: Function Caveats516429 +Node: Calling A Function516850 +Node: Variable Scope517965 +Node: Pass By Value/Reference519940 +Node: Return Statement523380 +Node: Dynamic Typing526361 +Node: Indirect Calls527096 +Node: Internationalization536781 +Node: I18N and L10N538207 +Node: Explaining gettext538893 +Ref: Explaining gettext-Footnote-1543959 +Ref: Explaining gettext-Footnote-2544143 +Node: Programmer i18n544308 +Node: Translator i18n548508 +Node: String Extraction549301 +Ref: String Extraction-Footnote-1550262 +Node: Printf Ordering550348 +Ref: Printf Ordering-Footnote-1553132 +Node: I18N Portability553196 +Ref: I18N Portability-Footnote-1555645 +Node: I18N Example555708 +Ref: I18N Example-Footnote-1558343 +Node: Gawk I18N558415 +Node: Advanced Features559032 +Node: Nondecimal Data560545 +Node: Array Sorting562128 +Node: Controlling Array Traversal562825 +Node: Array Sorting Functions571062 +Ref: Array Sorting Functions-Footnote-1574736 +Ref: Array Sorting Functions-Footnote-2574829 +Node: Two-way I/O575023 +Ref: Two-way I/O-Footnote-1580455 +Node: TCP/IP Networking580525 +Node: Profiling583369 +Node: Library Functions590843 +Ref: Library Functions-Footnote-1593850 +Node: Library Names594021 +Ref: Library Names-Footnote-1597492 +Ref: Library Names-Footnote-2597712 +Node: General Functions597798 +Node: Strtonum Function598751 +Node: Assert Function601681 +Node: Round Function605007 +Node: Cliff Random Function606550 +Node: Ordinal Functions607566 +Ref: Ordinal Functions-Footnote-1610636 +Ref: Ordinal Functions-Footnote-2610888 +Node: Join Function611097 +Ref: Join Function-Footnote-1612868 +Node: Gettimeofday Function613068 +Node: Data File Management616783 +Node: Filetrans Function617415 +Node: Rewind Function621554 +Node: File Checking622941 +Node: Empty Files624035 +Node: Ignoring Assigns626265 +Node: Getopt Function627818 +Ref: Getopt Function-Footnote-1639122 +Node: Passwd Functions639325 +Ref: Passwd Functions-Footnote-1648300 +Node: Group Functions648388 +Node: Walking Arrays656472 +Node: Sample Programs658041 +Node: Running Examples658706 +Node: Clones659434 +Node: Cut Program660658 +Node: Egrep Program670503 +Ref: Egrep Program-Footnote-1678276 +Node: Id Program678386 +Node: Split Program682002 +Ref: Split Program-Footnote-1685521 +Node: Tee Program685649 +Node: Uniq Program688452 +Node: Wc Program695881 +Ref: Wc Program-Footnote-1700147 +Ref: Wc Program-Footnote-2700347 +Node: Miscellaneous Programs700439 +Node: Dupword Program701627 +Node: Alarm Program703658 +Node: Translate Program708407 +Ref: Translate Program-Footnote-1712794 +Ref: Translate Program-Footnote-2713022 +Node: Labels Program713156 +Ref: Labels Program-Footnote-1716527 +Node: Word Sorting716611 +Node: History Sorting720495 +Node: Extract Program722334 +Ref: Extract Program-Footnote-1729817 +Node: Simple Sed729945 +Node: Igawk Program733007 +Ref: Igawk Program-Footnote-1748164 +Ref: Igawk Program-Footnote-2748365 +Node: Anagram Program748503 +Node: Signature Program751571 +Node: Debugger752671 +Node: Debugging753582 +Node: Debugging Concepts753995 +Node: Debugging Terms755851 +Node: Awk Debugging758474 +Node: Sample dgawk session759366 +Node: dgawk invocation759858 +Node: Finding The Bug761040 +Node: List of Debugger Commands767526 +Node: Breakpoint Control768837 +Node: Dgawk Execution Control772473 +Node: Viewing And Changing Data775824 +Node: Dgawk Stack779161 +Node: Dgawk Info780621 +Node: Miscellaneous Dgawk Commands784569 +Node: Readline Support789997 +Node: Dgawk Limitations790835 +Node: Language History793024 +Node: V7/SVR3.1794536 +Node: SVR4796857 +Node: POSIX798299 +Node: BTL799307 +Node: POSIX/GNU800112 +Node: Common Extensions805263 +Node: Ranges and Locales806322 +Ref: Ranges and Locales-Footnote-1810940 +Ref: Ranges and Locales-Footnote-2810967 +Ref: Ranges and Locales-Footnote-3811227 +Node: Contributors811448 +Node: Installation815710 +Node: Gawk Distribution816604 +Node: Getting817088 +Node: Extracting817914 +Node: Distribution contents819606 +Node: Unix Installation824828 +Node: Quick Installation825445 +Node: Additional Configuration Options827407 +Node: Configuration Philosophy828884 +Node: Non-Unix Installation831226 +Node: PC Installation831684 +Node: PC Binary Installation832983 +Node: PC Compiling834998 +Node: PC Testing837942 +Node: PC Using839118 +Node: Cygwin843303 +Node: MSYS844303 +Node: VMS Installation844817 +Node: VMS Compilation845420 +Ref: VMS Compilation-Footnote-1846427 +Node: VMS Installation Details846485 +Node: VMS Running848120 +Node: VMS Old Gawk849727 +Node: Bugs850201 +Node: Other Versions854053 +Node: Notes859334 +Node: Compatibility Mode860026 +Node: Additions860809 +Node: Accessing The Source861621 +Node: Adding Code863046 +Node: New Ports869013 +Node: Dynamic Extensions873126 +Node: Internals874502 +Node: Plugin License883605 +Node: Sample Library884239 +Node: Internal File Description884925 +Node: Internal File Ops888640 +Ref: Internal File Ops-Footnote-1893421 +Node: Using Internal File Ops893561 +Node: Future Extensions895938 +Node: Basic Concepts898442 +Node: Basic High Level899199 +Ref: Basic High Level-Footnote-1903234 +Node: Basic Data Typing903419 +Node: Floating Point Issues907944 +Node: String Conversion Precision909027 +Ref: String Conversion Precision-Footnote-1910727 +Node: Unexpected Results910836 +Node: POSIX Floating Point Problems912662 +Ref: POSIX Floating Point Problems-Footnote-1916367 +Node: Glossary916405 +Node: Copying941580 +Node: GNU Free Documentation License979137 +Node: Index1004274 End Tag Table |