[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. db20bfeba4c618f380315e1

From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. db20bfeba4c618f380315e18e6433fb6b8e63c26
Date: Tue, 27 Nov 2012 20:40:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  db20bfeba4c618f380315e18e6433fb6b8e63c26 (commit)
      from  a2e0c35036b884486d05cbb4f71fc041dd30b98b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit db20bfeba4c618f380315e18e6433fb6b8e63c26
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Nov 27 22:39:58 2012 +0200

    Change fflush() behavior to match BWK and document.

diff --git a/ChangeLog b/ChangeLog
index caf7736..17f53df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-27         Arnold D. Robbins     <address@hidden>
+       * builtin.c (do_fflush): Make fflush() and fflush("") both
+       flush everything. See the comment in the code.
 2012-11-24         Arnold D. Robbins     <address@hidden>
        Directory cleanup.
diff --git a/NEWS b/NEWS
index 9c98f7a..bc0e147 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ Changes from 4.0.2 to 4.1
    with a minimum of two.
 8. New arrays: SYMTAB, FUNCTAB, and PROCINFO["identifiers"]. See the manual.
+9. fflush() and fflush("") now both flush everything. See the manual.
 Changes from 4.0.1 to 4.0.2
diff --git a/builtin.c b/builtin.c
index 6a2d9d6..f736898 100644
--- a/builtin.c
+++ b/builtin.c
@@ -182,24 +182,40 @@ do_fflush(int nargs)
        int status = 0;
        const char *file;
-       /* fflush() --- flush stdout */
+       /*
+        * November, 2012.
+        * It turns out that circa 2002, when BWK 
+        * added fflush() and fflush("") to his awk, he made both of
+        * them flush everything.  
+        *
+        * Now, with our inside agent getting ready to try to get fflush()
+        * standardized in POSIX, we are going to make our awk consistent
+        * with his.  This should not really affect anyone, as flushing
+        * everything also flushes stdout.
+        *
+        * So. Once upon a time:
+        *      fflush()        --- flush stdout
+        *      fflush("")      --- flush everything
+        * Now, both calls flush everything.
+        */
+       /* fflush() */
        if (nargs == 0) {
-               if (output_fp != stdout)
-                       (void) fflush(output_fp);
-               status = fflush(stdout);
+               status = flush_io();
                return make_number((AWKNUM) status);
        tmp = POP_STRING();
        file = tmp->stptr;
-       /* fflush("") --- flush all */
+       /* fflush("") */
        if (tmp->stlen == 0) {
                status = flush_io();
                return make_number((AWKNUM) status);
+       /* fflush("/some/path") */
        rp = getredirect(tmp->stptr, tmp->stlen);
        status = -1;
        if (rp != NULL) {
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 56a3a6f..21a1c97 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -2,6 +2,9 @@
        * gawk.texi: API chapter. Change command for making shared libs
        to use gcc, not ld. Thanks to Nelson Beebe.
+       (I/O Functions): Document new behavior for fflush().
+       * gawk.1: Update for fflush().
+       * Ditto. And some general cleanup.
 2012-11-24         Arnold D. Robbins     <address@hidden>
diff --git a/doc/ b/doc/
index 9fae7cc..2d003ca 100644
--- a/doc/
+++ b/doc/
@@ -316,10 +316,6 @@ Disable common and GNU extensions.\*(CB
 .in +4n
 .TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR
 Enable \*(FIinterval expressions\*(FR.
-... in regular
-... expression matching (see \fHRegular
-... Expressions\fP below). Useful if
-... \*(FC\-\^\-traditional\*(FR is specified
 .TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR
 Disable the \*(FCsystem()\*(FR function,
 input redirection with \*(FCgetline\*(FR,
@@ -551,7 +547,6 @@ variables, each element being the value of
 that variable.
 \*(CB\*(FCERRNO\fP     T{
-... String describing the error if a
 String error value if a
 redirection or read
@@ -599,11 +594,6 @@ T}
 \*(CB\*(FCLINT\fP      T{
 Provides dynamic control of the \*(FC\-\^\-lint\fP
 option from within an AWK program.
-... When true, \*(GK
-... prints lint warnings.
-... When assigned the string value \*(FC"fatal"\*(FR,
-... lint warnings become fatal errors.
-... Any other true value just prints warnings.
 \*(CD\*(FCNF\fP        T{
 Number of fields in the current input record.
@@ -1298,11 +1288,16 @@ T}
 \*(FCgetline \*(FIv \*(FC< \*(FIfile\*(FR      Set \*(FIv\fP from next record 
of \*(FIfile\*(FR.
 \*(FIcmd \*(FC| getline\*(FR   Pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, 
 \*(FIcmd \*(FC| getline \*(FIv\*(FR    Pipe into \*(FCgetline\*(FR; set 
-\*(CB\*(FIcmd \*(FC|& getline\*(FR     Co-process pipe into \*(FCgetline\*(FR; 
set \*(FC$0\*(FR, \*(FCNF\*(FR.
+.\" \*(CB\*(FIcmd \*(FC|& getline\*(FR Co-process pipe into \*(FCgetline\*(FR; 
set \*(FC$0\*(FR, \*(FCNF\*(FR.
 .in +.2i
 .ti -.2i
+\*(CB\*(FIcmd \*(FC|& getline\*(FR
+Co-process pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR.
+.ti -.2i
 \*(FIcmd \*(FC|& getline \*(FIv\*(FR
 Co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR.
@@ -1320,10 +1315,10 @@ execute any \*(FCEND\fP rule(s).
 Stop processing the current input file.
 The next input record comes from the
-next input file. \*(FCFILENAME\fP \*(CBand
-\*(FCARGIND\fP\*(CD are updated, \*(FCFNR\fP is reset to 1,
-and processing starts over with the first
-pattern in the AWK program. Upon end
+next input file. Update \*(FCFILENAME\fP \*(CBand
+\*(FCARGIND\fP\*(CD, reset \*(FCFNR\fP to 1,
+and start over with the first
+pattern. Upon end
 of input data, execute any \*(FCEND\fP rule(s).
 .in -.2i
 .sp .5
@@ -1332,7 +1327,7 @@ of input data, execute any \*(FCEND\fP rule(s).
 \*(CBUpon an error, \*(FCERRNO\*(FR contains a string describing
 the problem.\*(CX
 .EB "\s+2\f(HBINPUT CONTROL\*(FR\s0"
+.sp .6
 .\" --- Output Control
@@ -1341,9 +1336,9 @@ the problem.\*(CX
 Flush any buffers associated
-with the open output file or pipe \*(FIfile\*(FR.\*(CD
-\*(CBIf no \*(FIfile\fP, then flush standard output.
-If \*(FIfile\fP is null, then flush all open output files and pipes
+with the open output file or pipe \*(FIfile\*(FR.
+If no \*(FIfile\fP, or if
+\*(FIfile\fP is null, then flush all open output files and pipes
 (\*(GK and \*(NK)\*(CD.
 .ti -.2i
@@ -1390,7 +1385,7 @@ Print data down a pipeline to \*(FIcmd\*(FR.
 Print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX
 .in -.2i
 .EB "\s+2\f(HBOUTPUT CONTROL\*(FR\s0"
+.sp .6
 .\" --- Closing Redirections
@@ -1506,8 +1501,8 @@ T}
 The meaning of the \*(FIprec\*(FR varies by control letter:
-  \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR,
-  \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP       T{
+  \*(FC%d\*(FR,\|\*(FC%o\*(FR,\|\*(FC%i\fP,    \0
+  \*(FC%u\*(FR,\|\*(FC%x\*(FR,\|\*(FC%X\fP     T{
 The minimum number of digits to print.
   \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR     T{
@@ -1613,7 +1608,7 @@ l lw(2i).
 \*(FCexp(\*(FIexpr\*(FC)\*(FR  The exponential function (\*(FIe \*(FC^ 
 \*(FCint(\*(FIexpr\*(FC)\*(FR  Truncate to integer.
 \*(FClog(\*(FIexpr\*(FC)\*(FR  The natural logarithm function (base 
-\*(FCrand()\fP A random number between 0 and 1 (0 \(<= \*(FIN\fP < 1).
+\*(FCrand()\fP A random number \*(FIN\fP such that 0 \(<= \*(FIN\fP < 1.
 \*(FCsin(\*(FIexpr\*(FC)\*(FR  The sine of \*(FIexpr\fP, which is in radians.
 \*(FCsqrt(\*(FIexpr\*(FC)\*(FR The square root function.
 \&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR        T{
@@ -1957,9 +1952,6 @@ GCC (the GNU Compiler Collection) works well.
 .in -.2i
 .sp .4
-... Host: \*(\*(FR
-... File: \*(FC/pub/brennan/mawk1.3.3.tar.gz\fP
-... \*(FC\fP
 Host: \*(\*(FR
 File: \*(FC/mawk/mawk.tar.gz\fP
 .in +.2i
diff --git a/doc/gawk.1 b/doc/gawk.1
index 31fcef1..6af5ffe 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -2212,9 +2212,7 @@ Flush any buffers associated with the open output file or 
 .IR file .
 .I file
-is missing, then flush standard output.
-.I file
+is missing or if it
 is the null string,
 then flush all open output files and pipes.
diff --git a/doc/ b/doc/
index 12ca6b4..ca98646 100644
--- a/doc/
+++ b/doc/
@@ -11930,12 +11930,20 @@ parameters are enclosed in square brackets ([ ]):
      1994; it is not part of the POSIX standard and is not available if
      `--posix' has been specified on the command line (*note Options::).
-     `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.
+     `gawk' extends the `fflush()' function, as follows: If there is no
+     argument, or if the argument is the null string (`""'), `gawk'
+     flushes the buffers for _all_ open output files and pipes.  Brian
+     Kernighan's `awk' also works this way.
+          NOTE: Prior to version *FIXME: VERSION*, `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.
+          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
@@ -29116,7 +29124,7 @@ Index
 * --re-interval option:                  Options.             (line 272)
 * --sandbox option:                      Options.             (line 279)
 * --sandbox option, disabling system() function: I/O Functions.
-                                                              (line  85)
+                                                              (line  93)
 * --sandbox option, input redirection with getline: Getline.  (line  19)
 * --sandbox option, output redirection with print, printf: Redirection.
                                                               (line   6)
@@ -29285,7 +29293,7 @@ Index
 * Ada programming language:              Glossary.            (line  20)
 * adding, features to gawk:              Adding Code.         (line   6)
 * adding, fields:                        Changing Fields.     (line  53)
-* advanced features, buffering:          I/O Functions.       (line  98)
+* advanced features, buffering:          I/O Functions.       (line 106)
 * advanced features, close() function:   Close Files And Pipes.
                                                               (line 131)
 * advanced features, constants, values of: Nondecimal-numbers.
@@ -29598,8 +29606,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 138)
+* buffering, interactive vs. noninteractive: I/O Functions.   (line 106)
 * buffers, flushing:                     I/O Functions.       (line  29)
 * buffers, operators for:                GNU Regexp Operators.
                                                               (line  48)
@@ -30628,7 +30636,7 @@ Index
                                                               (line   6)
 * integers:                              General Arithmetic.  (line   6)
 * integers, unsigned:                    General Arithmetic.  (line  15)
-* interacting with other programs:       I/O Functions.       (line  63)
+* interacting with other programs:       I/O Functions.       (line  71)
 * internationalization <1>:              I18N and L10N.       (line   6)
 * internationalization:                  I18N Functions.      (line   6)
 * internationalization, localization <1>: Internationalization.
@@ -31512,7 +31520,7 @@ Index
 * SYMTAB array:                          Auto-set.            (line 254)
 * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops.
                                                               (line 148)
-* system() function:                     I/O Functions.       (line  63)
+* system() function:                     I/O Functions.       (line  71)
 * systime() function (gawk):             Time Functions.      (line  64)
 * t debugger command (alias for tbreak): Breakpoint Control.  (line  90)
 * tbreak debugger command:               Breakpoint Control.  (line  90)
@@ -31578,7 +31586,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  59)
 * troubleshooting, function call syntax: Function Calls.      (line  28)
 * troubleshooting, gawk:                 Compatibility Mode.  (line   6)
 * troubleshooting, gawk, bug reports:    Bugs.                (line   9)
@@ -31597,7 +31605,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  93)
 * troubleshooting, typographical errors, global variables: Options.
                                                               (line 112)
 * true, logical:                         Truth Values.        (line   6)
@@ -31984,292 +31992,292 @@ Ref: table-gensub-escapes503206
 Ref: Gory Details-Footnote-1504413
 Ref: Gory Details-Footnote-2504464
 Node: I/O Functions504615
-Ref: I/O Functions-Footnote-1511270
-Node: Time Functions511417
-Ref: Time Functions-Footnote-1522309
-Ref: Time Functions-Footnote-2522377
-Ref: Time Functions-Footnote-3522535
-Ref: Time Functions-Footnote-4522646
-Ref: Time Functions-Footnote-5522758
-Ref: Time Functions-Footnote-6522985
-Node: Bitwise Functions523251
-Ref: table-bitwise-ops523809
-Ref: Bitwise Functions-Footnote-1528030
-Node: Type Functions528214
-Node: I18N Functions528684
-Node: User-defined530311
-Node: Definition Syntax531115
-Ref: Definition Syntax-Footnote-1536025
-Node: Function Example536094
-Node: Function Caveats538688
-Node: Calling A Function539109
-Node: Variable Scope540224
-Node: Pass By Value/Reference543187
-Node: Return Statement546627
-Node: Dynamic Typing549608
-Node: Indirect Calls550343
-Node: Library Functions560028
-Ref: Library Functions-Footnote-1563027
-Node: Library Names563198
-Ref: Library Names-Footnote-1566669
-Ref: Library Names-Footnote-2566889
-Node: General Functions566975
-Node: Strtonum Function567928
-Node: Assert Function570858
-Node: Round Function574184
-Node: Cliff Random Function575727
-Node: Ordinal Functions576743
-Ref: Ordinal Functions-Footnote-1579813
-Ref: Ordinal Functions-Footnote-2580065
-Node: Join Function580274
-Ref: Join Function-Footnote-1582045
-Node: Getlocaltime Function582245
-Node: Data File Management585960
-Node: Filetrans Function586592
-Node: Rewind Function590731
-Node: File Checking592118
-Node: Empty Files593212
-Node: Ignoring Assigns595442
-Node: Getopt Function596995
-Ref: Getopt Function-Footnote-1608299
-Node: Passwd Functions608502
-Ref: Passwd Functions-Footnote-1617477
-Node: Group Functions617565
-Node: Walking Arrays625649
-Node: Sample Programs627218
-Node: Running Examples627895
-Node: Clones628623
-Node: Cut Program629847
-Node: Egrep Program639692
-Ref: Egrep Program-Footnote-1647465
-Node: Id Program647575
-Node: Split Program651191
-Ref: Split Program-Footnote-1654710
-Node: Tee Program654838
-Node: Uniq Program657641
-Node: Wc Program665070
-Ref: Wc Program-Footnote-1669336
-Ref: Wc Program-Footnote-2669536
-Node: Miscellaneous Programs669628
-Node: Dupword Program670816
-Node: Alarm Program672847
-Node: Translate Program677596
-Ref: Translate Program-Footnote-1681983
-Ref: Translate Program-Footnote-2682211
-Node: Labels Program682345
-Ref: Labels Program-Footnote-1685716
-Node: Word Sorting685800
-Node: History Sorting689684
-Node: Extract Program691523
-Ref: Extract Program-Footnote-1699006
-Node: Simple Sed699134
-Node: Igawk Program702196
-Ref: Igawk Program-Footnote-1717353
-Ref: Igawk Program-Footnote-2717554
-Node: Anagram Program717692
-Node: Signature Program720760
-Node: Internationalization721860
-Node: I18N and L10N723292
-Node: Explaining gettext723978
-Ref: Explaining gettext-Footnote-1729044
-Ref: Explaining gettext-Footnote-2729228
-Node: Programmer i18n729393
-Node: Translator i18n733593
-Node: String Extraction734386
-Ref: String Extraction-Footnote-1735347
-Node: Printf Ordering735433
-Ref: Printf Ordering-Footnote-1738217
-Node: I18N Portability738281
-Ref: I18N Portability-Footnote-1740730
-Node: I18N Example740793
-Ref: I18N Example-Footnote-1743428
-Node: Gawk I18N743500
-Node: Advanced Features744117
-Node: Nondecimal Data745621
-Node: Array Sorting747204
-Node: Controlling Array Traversal747901
-Node: Array Sorting Functions756139
-Ref: Array Sorting Functions-Footnote-1759813
-Ref: Array Sorting Functions-Footnote-2759906
-Node: Two-way I/O760100
-Ref: Two-way I/O-Footnote-1765532
-Node: TCP/IP Networking765602
-Node: Profiling768446
-Node: Debugger775900
-Node: Debugging776868
-Node: Debugging Concepts777301
-Node: Debugging Terms779157
-Node: Awk Debugging781754
-Node: Sample Debugging Session782646
-Node: Debugger Invocation783166
-Node: Finding The Bug784495
-Node: List of Debugger Commands790983
-Node: Breakpoint Control792317
-Node: Debugger Execution Control795981
-Node: Viewing And Changing Data799341
-Node: Execution Stack802697
-Node: Debugger Info804164
-Node: Miscellaneous Debugger Commands808145
-Node: Readline Support813590
-Node: Limitations814421
-Node: Arbitrary Precision Arithmetic816673
-Ref: Arbitrary Precision Arithmetic-Footnote-1818315
-Node: General Arithmetic818463
-Node: Floating Point Issues820183
-Node: String Conversion Precision821064
-Ref: String Conversion Precision-Footnote-1822770
-Node: Unexpected Results822879
-Node: POSIX Floating Point Problems825032
-Ref: POSIX Floating Point Problems-Footnote-1828857
-Node: Integer Programming828895
-Node: Floating-point Programming830648
-Ref: Floating-point Programming-Footnote-1836957
-Node: Floating-point Representation837221
-Node: Floating-point Context838386
-Ref: table-ieee-formats839228
-Node: Rounding Mode840612
-Ref: table-rounding-modes841091
-Ref: Rounding Mode-Footnote-1844095
-Node: Gawk and MPFR844276
-Node: Arbitrary Precision Floats845518
-Ref: Arbitrary Precision Floats-Footnote-1847947
-Node: Setting Precision848258
-Node: Setting Rounding Mode850991
-Ref: table-gawk-rounding-modes851395
-Node: Floating-point Constants852575
-Node: Changing Precision853999
-Ref: Changing Precision-Footnote-1855399
-Node: Exact Arithmetic855573
-Node: Arbitrary Precision Integers858681
-Ref: Arbitrary Precision Integers-Footnote-1861681
-Node: Dynamic Extensions861828
-Node: Extension Intro863214
-Node: Plugin License864422
-Node: Extension Design865096
-Node: Old Extension Problems866167
-Ref: Old Extension Problems-Footnote-1867677
-Node: Extension New Mechanism Goals867734
-Ref: Extension New Mechanism Goals-Footnote-1870446
-Node: Extension Other Design Decisions870632
-Node: Extension Mechanism Outline872744
-Ref: load-extension873769
-Ref: load-new-function875247
-Ref: call-new-function876228
-Node: Extension Future Growth878222
-Node: Extension API Description879040
-Node: Extension API Functions Introduction880368
-Node: General Data Types885068
-Ref: General Data Types-Footnote-1890701
-Node: Requesting Values891000
-Ref: table-value-types-returned891731
-Node: Constructor Functions892685
-Node: Registration Functions895681
-Node: Extension Functions896366
-Node: Exit Callback Functions898185
-Node: Extension Version String899428
-Node: Input Parsers900078
-Node: Output Wrappers908657
-Node: Two-way processors913050
-Node: Printing Messages915172
-Ref: Printing Messages-Footnote-1916249
-Node: Updating `ERRNO'916401
-Node: Accessing Parameters917140
-Node: Symbol Table Access918370
-Node: Symbol table by name918882
-Ref: Symbol table by name-Footnote-1921052
-Node: Symbol table by cookie921132
-Ref: Symbol table by cookie-Footnote-1925261
-Node: Cached values925324
-Ref: Cached values-Footnote-1928767
-Node: Array Manipulation928858
-Ref: Array Manipulation-Footnote-1929956
-Node: Array Data Types929995
-Ref: Array Data Types-Footnote-1932698
-Node: Array Functions932790
-Node: Flattening Arrays936556
-Node: Creating Arrays943389
-Node: Extension API Variables948184
-Node: Extension Versioning948820
-Node: Extension API Informational Variables950721
-Node: Extension API Boilerplate951807
-Node: Finding Extensions955641
-Node: Extension Example956188
-Node: Internal File Description956926
-Node: Internal File Ops960614
-Ref: Internal File Ops-Footnote-1972061
-Node: Using Internal File Ops972201
-Ref: Using Internal File Ops-Footnote-1974554
-Node: Extension Samples974820
-Node: Extension Sample File Functions976263
-Node: Extension Sample Fnmatch984736
-Node: Extension Sample Fork986462
-Node: Extension Sample Ord987676
-Node: Extension Sample Readdir988452
-Node: Extension Sample Revout989956
-Node: Extension Sample Rev2way990549
-Node: Extension Sample Read write array991239
-Node: Extension Sample Readfile993122
-Node: Extension Sample API Tests993877
-Node: Extension Sample Time994402
-Node: gawkextlib995709
-Node: Language History998090
-Node: V7/SVR3.1999612
-Node: SVR41001933
-Node: POSIX1003375
-Node: BTL1004383
-Node: POSIX/GNU1005117
-Node: Common Extensions1010652
-Node: Ranges and Locales1011759
-Ref: Ranges and Locales-Footnote-11016377
-Ref: Ranges and Locales-Footnote-21016404
-Ref: Ranges and Locales-Footnote-31016664
-Node: Contributors1016885
-Node: Installation1021181
-Node: Gawk Distribution1022075
-Node: Getting1022559
-Node: Extracting1023385
-Node: Distribution contents1025077
-Node: Unix Installation1030299
-Node: Quick Installation1030916
-Node: Additional Configuration Options1032878
-Node: Configuration Philosophy1034355
-Node: Non-Unix Installation1036697
-Node: PC Installation1037155
-Node: PC Binary Installation1038454
-Node: PC Compiling1040302
-Node: PC Testing1043246
-Node: PC Using1044422
-Node: Cygwin1048607
-Node: MSYS1049607
-Node: VMS Installation1050121
-Node: VMS Compilation1050724
-Ref: VMS Compilation-Footnote-11051731
-Node: VMS Installation Details1051789
-Node: VMS Running1053424
-Node: VMS Old Gawk1055031
-Node: Bugs1055505
-Node: Other Versions1059357
-Node: Notes1064672
-Node: Compatibility Mode1065331
-Node: Additions1066114
-Node: Accessing The Source1067041
-Node: Adding Code1068644
-Node: New Ports1074686
-Node: Derived Files1078821
-Ref: Derived Files-Footnote-11084129
-Ref: Derived Files-Footnote-21084163
-Ref: Derived Files-Footnote-31084763
-Node: Future Extensions1084861
-Node: Implementation Limitations1085442
-Node: Basic Concepts1086669
-Node: Basic High Level1087350
-Ref: figure-general-flow1087621
-Ref: figure-process-flow1088220
-Ref: Basic High Level-Footnote-11091449
-Node: Basic Data Typing1091634
-Node: Glossary1094989
-Node: Copying1120300
-Node: GNU Free Documentation License1157857
-Node: Index1182994
+Ref: I/O Functions-Footnote-1511639
+Node: Time Functions511786
+Ref: Time Functions-Footnote-1522678
+Ref: Time Functions-Footnote-2522746
+Ref: Time Functions-Footnote-3522904
+Ref: Time Functions-Footnote-4523015
+Ref: Time Functions-Footnote-5523127
+Ref: Time Functions-Footnote-6523354
+Node: Bitwise Functions523620
+Ref: table-bitwise-ops524178
+Ref: Bitwise Functions-Footnote-1528399
+Node: Type Functions528583
+Node: I18N Functions529053
+Node: User-defined530680
+Node: Definition Syntax531484
+Ref: Definition Syntax-Footnote-1536394
+Node: Function Example536463
+Node: Function Caveats539057
+Node: Calling A Function539478
+Node: Variable Scope540593
+Node: Pass By Value/Reference543556
+Node: Return Statement546996
+Node: Dynamic Typing549977
+Node: Indirect Calls550712
+Node: Library Functions560397
+Ref: Library Functions-Footnote-1563396
+Node: Library Names563567
+Ref: Library Names-Footnote-1567038
+Ref: Library Names-Footnote-2567258
+Node: General Functions567344
+Node: Strtonum Function568297
+Node: Assert Function571227
+Node: Round Function574553
+Node: Cliff Random Function576096
+Node: Ordinal Functions577112
+Ref: Ordinal Functions-Footnote-1580182
+Ref: Ordinal Functions-Footnote-2580434
+Node: Join Function580643
+Ref: Join Function-Footnote-1582414
+Node: Getlocaltime Function582614
+Node: Data File Management586329
+Node: Filetrans Function586961
+Node: Rewind Function591100
+Node: File Checking592487
+Node: Empty Files593581
+Node: Ignoring Assigns595811
+Node: Getopt Function597364
+Ref: Getopt Function-Footnote-1608668
+Node: Passwd Functions608871
+Ref: Passwd Functions-Footnote-1617846
+Node: Group Functions617934
+Node: Walking Arrays626018
+Node: Sample Programs627587
+Node: Running Examples628264
+Node: Clones628992
+Node: Cut Program630216
+Node: Egrep Program640061
+Ref: Egrep Program-Footnote-1647834
+Node: Id Program647944
+Node: Split Program651560
+Ref: Split Program-Footnote-1655079
+Node: Tee Program655207
+Node: Uniq Program658010
+Node: Wc Program665439
+Ref: Wc Program-Footnote-1669705
+Ref: Wc Program-Footnote-2669905
+Node: Miscellaneous Programs669997
+Node: Dupword Program671185
+Node: Alarm Program673216
+Node: Translate Program677965
+Ref: Translate Program-Footnote-1682352
+Ref: Translate Program-Footnote-2682580
+Node: Labels Program682714
+Ref: Labels Program-Footnote-1686085
+Node: Word Sorting686169
+Node: History Sorting690053
+Node: Extract Program691892
+Ref: Extract Program-Footnote-1699375
+Node: Simple Sed699503
+Node: Igawk Program702565
+Ref: Igawk Program-Footnote-1717722
+Ref: Igawk Program-Footnote-2717923
+Node: Anagram Program718061
+Node: Signature Program721129
+Node: Internationalization722229
+Node: I18N and L10N723661
+Node: Explaining gettext724347
+Ref: Explaining gettext-Footnote-1729413
+Ref: Explaining gettext-Footnote-2729597
+Node: Programmer i18n729762
+Node: Translator i18n733962
+Node: String Extraction734755
+Ref: String Extraction-Footnote-1735716
+Node: Printf Ordering735802
+Ref: Printf Ordering-Footnote-1738586
+Node: I18N Portability738650
+Ref: I18N Portability-Footnote-1741099
+Node: I18N Example741162
+Ref: I18N Example-Footnote-1743797
+Node: Gawk I18N743869
+Node: Advanced Features744486
+Node: Nondecimal Data745990
+Node: Array Sorting747573
+Node: Controlling Array Traversal748270
+Node: Array Sorting Functions756508
+Ref: Array Sorting Functions-Footnote-1760182
+Ref: Array Sorting Functions-Footnote-2760275
+Node: Two-way I/O760469
+Ref: Two-way I/O-Footnote-1765901
+Node: TCP/IP Networking765971
+Node: Profiling768815
+Node: Debugger776269
+Node: Debugging777237
+Node: Debugging Concepts777670
+Node: Debugging Terms779526
+Node: Awk Debugging782123
+Node: Sample Debugging Session783015
+Node: Debugger Invocation783535
+Node: Finding The Bug784864
+Node: List of Debugger Commands791352
+Node: Breakpoint Control792686
+Node: Debugger Execution Control796350
+Node: Viewing And Changing Data799710
+Node: Execution Stack803066
+Node: Debugger Info804533
+Node: Miscellaneous Debugger Commands808514
+Node: Readline Support813959
+Node: Limitations814790
+Node: Arbitrary Precision Arithmetic817042
+Ref: Arbitrary Precision Arithmetic-Footnote-1818684
+Node: General Arithmetic818832
+Node: Floating Point Issues820552
+Node: String Conversion Precision821433
+Ref: String Conversion Precision-Footnote-1823139
+Node: Unexpected Results823248
+Node: POSIX Floating Point Problems825401
+Ref: POSIX Floating Point Problems-Footnote-1829226
+Node: Integer Programming829264
+Node: Floating-point Programming831017
+Ref: Floating-point Programming-Footnote-1837326
+Node: Floating-point Representation837590
+Node: Floating-point Context838755
+Ref: table-ieee-formats839597
+Node: Rounding Mode840981
+Ref: table-rounding-modes841460
+Ref: Rounding Mode-Footnote-1844464
+Node: Gawk and MPFR844645
+Node: Arbitrary Precision Floats845887
+Ref: Arbitrary Precision Floats-Footnote-1848316
+Node: Setting Precision848627
+Node: Setting Rounding Mode851360
+Ref: table-gawk-rounding-modes851764
+Node: Floating-point Constants852944
+Node: Changing Precision854368
+Ref: Changing Precision-Footnote-1855768
+Node: Exact Arithmetic855942
+Node: Arbitrary Precision Integers859050
+Ref: Arbitrary Precision Integers-Footnote-1862050
+Node: Dynamic Extensions862197
+Node: Extension Intro863583
+Node: Plugin License864791
+Node: Extension Design865465
+Node: Old Extension Problems866536
+Ref: Old Extension Problems-Footnote-1868046
+Node: Extension New Mechanism Goals868103
+Ref: Extension New Mechanism Goals-Footnote-1870815
+Node: Extension Other Design Decisions871001
+Node: Extension Mechanism Outline873113
+Ref: load-extension874138
+Ref: load-new-function875616
+Ref: call-new-function876597
+Node: Extension Future Growth878591
+Node: Extension API Description879409
+Node: Extension API Functions Introduction880737
+Node: General Data Types885437
+Ref: General Data Types-Footnote-1891070
+Node: Requesting Values891369
+Ref: table-value-types-returned892100
+Node: Constructor Functions893054
+Node: Registration Functions896050
+Node: Extension Functions896735
+Node: Exit Callback Functions898554
+Node: Extension Version String899797
+Node: Input Parsers900447
+Node: Output Wrappers909026
+Node: Two-way processors913419
+Node: Printing Messages915541
+Ref: Printing Messages-Footnote-1916618
+Node: Updating `ERRNO'916770
+Node: Accessing Parameters917509
+Node: Symbol Table Access918739
+Node: Symbol table by name919251
+Ref: Symbol table by name-Footnote-1921421
+Node: Symbol table by cookie921501
+Ref: Symbol table by cookie-Footnote-1925630
+Node: Cached values925693
+Ref: Cached values-Footnote-1929136
+Node: Array Manipulation929227
+Ref: Array Manipulation-Footnote-1930325
+Node: Array Data Types930364
+Ref: Array Data Types-Footnote-1933067
+Node: Array Functions933159
+Node: Flattening Arrays936925
+Node: Creating Arrays943758
+Node: Extension API Variables948553
+Node: Extension Versioning949189
+Node: Extension API Informational Variables951090
+Node: Extension API Boilerplate952176
+Node: Finding Extensions956010
+Node: Extension Example956557
+Node: Internal File Description957295
+Node: Internal File Ops960983
+Ref: Internal File Ops-Footnote-1972430
+Node: Using Internal File Ops972570
+Ref: Using Internal File Ops-Footnote-1974923
+Node: Extension Samples975189
+Node: Extension Sample File Functions976632
+Node: Extension Sample Fnmatch985105
+Node: Extension Sample Fork986831
+Node: Extension Sample Ord988045
+Node: Extension Sample Readdir988821
+Node: Extension Sample Revout990325
+Node: Extension Sample Rev2way990918
+Node: Extension Sample Read write array991608
+Node: Extension Sample Readfile993491
+Node: Extension Sample API Tests994246
+Node: Extension Sample Time994771
+Node: gawkextlib996078
+Node: Language History998459
+Node: V7/SVR3.1999981
+Node: SVR41002302
+Node: POSIX1003744
+Node: BTL1004752
+Node: POSIX/GNU1005486
+Node: Common Extensions1011021
+Node: Ranges and Locales1012128
+Ref: Ranges and Locales-Footnote-11016746
+Ref: Ranges and Locales-Footnote-21016773
+Ref: Ranges and Locales-Footnote-31017033
+Node: Contributors1017254
+Node: Installation1021550
+Node: Gawk Distribution1022444
+Node: Getting1022928
+Node: Extracting1023754
+Node: Distribution contents1025446
+Node: Unix Installation1030668
+Node: Quick Installation1031285
+Node: Additional Configuration Options1033247
+Node: Configuration Philosophy1034724
+Node: Non-Unix Installation1037066
+Node: PC Installation1037524
+Node: PC Binary Installation1038823
+Node: PC Compiling1040671
+Node: PC Testing1043615
+Node: PC Using1044791
+Node: Cygwin1048976
+Node: MSYS1049976
+Node: VMS Installation1050490
+Node: VMS Compilation1051093
+Ref: VMS Compilation-Footnote-11052100
+Node: VMS Installation Details1052158
+Node: VMS Running1053793
+Node: VMS Old Gawk1055400
+Node: Bugs1055874
+Node: Other Versions1059726
+Node: Notes1065041
+Node: Compatibility Mode1065700
+Node: Additions1066483
+Node: Accessing The Source1067410
+Node: Adding Code1069013
+Node: New Ports1075055
+Node: Derived Files1079190
+Ref: Derived Files-Footnote-11084498
+Ref: Derived Files-Footnote-21084532
+Ref: Derived Files-Footnote-31085132
+Node: Future Extensions1085230
+Node: Implementation Limitations1085811
+Node: Basic Concepts1087038
+Node: Basic High Level1087719
+Ref: figure-general-flow1087990
+Ref: figure-process-flow1088589
+Ref: Basic High Level-Footnote-11091818
+Node: Basic Data Typing1092003
+Node: Glossary1095358
+Node: Copying1120669
+Node: GNU Free Documentation License1158226
+Node: Index1183363
 End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 6de0f9d..6abc337 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -16013,12 +16013,22 @@ not available if @option{--posix} has been specified 
on the
 command line (@pxref{Options}).
 @cindex @command{gawk}, @code{fflush()} function in
address@hidden extends the @code{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
-(@address@hidden""}}) as the argument. In this case, the buffers for
address@hidden open output files and pipes are flushed.
-Brian Kernighan's @command{awk} also supports these extensions.
address@hidden extends the @code{fflush()} function, as follows: If there
+is no argument, or if the argument is the null string (@address@hidden""}}),
address@hidden flushes the buffers for @emph{all} open output files
+and pipes.  Brian Kernighan's @command{awk} also works this way.
address@hidden NOTE
+Prior to version @strong{FIXME: VERSION}, @command{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 @command{awk}, in the hope that standardizing this
+feature in POSIX would then be easier.
+You can use @samp{fflush("/dev/stdout")} if you wish to flush
+only the standard output.
address@hidden quotation
 @c @cindex automatic warnings
 @c @cindex warnings, automatic


Summary of changes:
 ChangeLog      |    5 +
 NEWS           |    2 +
 builtin.c      |   26 ++-
 doc/ChangeLog  |    3 +
 doc/ |   44 ++---
 doc/gawk.1     |    4 +-
 doc/  |  610 ++++++++++++++++++++++++++++----------------------------
 doc/gawk.texi  |   22 ++-
 8 files changed, 375 insertions(+), 341 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]