Clarify treatment of intial white space by %% conversion specification.

as per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=435648.
This commit is contained in:
Michael Kerrisk 2008-07-07 14:37:42 +00:00
parent 3f89dd3d82
commit f9d17bc4fb
1 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@
.\" Add ERRORS section. .\" Add ERRORS section.
.\" Document the 'a' and 'm' modifiers for dynamic string allocation. .\" Document the 'a' and 'm' modifiers for dynamic string allocation.
.\" .\"
.TH SCANF 3 2008-06-23 "GNU" "Linux Programmer's Manual" .TH SCANF 3 2008-07-08 "GNU" "Linux Programmer's Manual"
.SH NAME .SH NAME
scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf \- input format conversion scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf \- input format conversion
.SH SYNOPSIS .SH SYNOPSIS
@ -213,7 +213,7 @@ An optional decimal integer which specifies the
.IR "maximum field width" . .IR "maximum field width" .
Reading of characters stops either when this maximum is reached or Reading of characters stops either when this maximum is reached or
when a non-matching character is found, whichever happens first. when a non-matching character is found, whichever happens first.
Most conversions discard initial whitespace characters (the exceptions Most conversions discard initial white space characters (the exceptions
are noted below), are noted below),
and these discarded characters don't count towards the maximum field width. and these discarded characters don't count towards the maximum field width.
String input conversions store a null terminator (\(aq\\0\(aq) String input conversions store a null terminator (\(aq\\0\(aq)
@ -375,8 +375,8 @@ That is,
.B %\&% .B %\&%
in the format string matches a in the format string matches a
single input \(aq%\(aq character. single input \(aq%\(aq character.
No conversion is done, and assignment does not No conversion is done (but initial white space characters are discarded),
occur. and assignment does not occur.
.TP .TP
.B d .B d
Matches an optionally signed decimal integer; Matches an optionally signed decimal integer;