On Wed, Jul 02, 2014 at 11:47:31AM +0800, Edward wrote: > Hi, > > Caught in a slight confusion about the wordings describing stdio(3) scenario > needing fflush(3). The diff shows my understanding, but please do reply if it > is otherwise. > > # cvs diff > cvs server: Diffing . > Index: stdio.3 > =================================================================== > RCS file: /cvs/src/lib/libc/stdio/stdio.3,v > retrieving revision 1.30 > diff -u -p -r1.30 stdio.3 > --- stdio.3 25 Mar 2014 15:23:27 -0000 1.30 > +++ stdio.3 2 Jul 2014 03:00:36 -0000 > @@ -148,7 +148,7 @@ In these cases, > or when a large amount of computation is done after printing > part of a line on an output terminal, it is necessary to > .Xr fflush 3 > -the standard output before going off and computing so that the output > +the standard output before continuing computation so that the output > will appear. > Alternatively, these defaults may be modified via the > .Xr setvbuf 3 > > Regards, > Edward. >
i think the phrase "going off and computing" means use fflush before your code goes elsewhere, to do other things. whatever it means, the wording is kind of tragic, i agree. your diff seeks to tweak bad wording, whereas i prefer to kill it. i'll commit the diff below in the morning (relatively speaking, of course) unless my maibox gets jammed with outrage. jmc Index: stdio.3 =================================================================== RCS file: /cvs/src/lib/libc/stdio/stdio.3,v retrieving revision 1.30 diff -u -r1.30 stdio.3 --- stdio.3 25 Mar 2014 15:23:27 -0000 1.30 +++ stdio.3 2 Jul 2014 22:11:10 -0000 @@ -148,8 +148,7 @@ or when a large amount of computation is done after printing part of a line on an output terminal, it is necessary to .Xr fflush 3 -the standard output before going off and computing so that the output -will appear. +the standard output so that the output will appear. Alternatively, these defaults may be modified via the .Xr setvbuf 3 function.

