On Tue, Mar 05, 2013 at 02:12:05PM +0000, Jason McIntyre wrote: > On Tue, Mar 05, 2013 at 03:06:34PM +0100, Otto Moerbeek wrote: > > On Tue, Mar 05, 2013 at 03:00:01PM +0100, Jan Stary wrote: > > > > > On Mar 05 13:30:53, j...@kerhand.co.uk wrote: > > > > On Sun, Mar 03, 2013 at 11:40:52AM +0100, Jan Stary wrote: > > > > > The following part of the scanf(3) manpage > > > > > probably needs to be reworded: > > > > > > > > > > The value > > > > > .Dv EOF > > > > > is returned if an input failure occurs before any conversion such > > > > > as an > > > > > end-of-file occurs. > > > > > > > > > > (I won't even attempt it, as I am not sure > > > > > what the behaviour actually is.) > > > > > > > > > > > > > what is wrong with it? > > > > > > Probably just my English comprehension, > > > but "conversion such as end-of-file" bugs me. > > > > How about: > > > > The value EOF is returned if an input failure such as an end-of-file occurs > > before any conversion. > > > > -Otto > > > > better than mine, but better still with commas after "failure" and > "end-of-file". > > jmc
Like this? -Otto Index: scanf.3 =================================================================== RCS file: /cvs/src/lib/libc/stdio/scanf.3,v retrieving revision 1.20 diff -u -p -r1.20 scanf.3 --- scanf.3 18 Jan 2012 14:01:38 -0000 1.20 +++ scanf.3 5 Mar 2013 15:02:52 -0000 @@ -423,8 +423,9 @@ such as an alphabetic character for a conversion. The value .Dv EOF -is returned if an input failure occurs before any conversion such as an -end-of-file occurs. +is returned if an input failure, +such as an end-of-file, +occurs before any conversion. If an error or end-of-file occurs after conversion has begun, the number of conversions which were successfully completed is returned. .Sh SEE ALSO