fwscanf.3c (2010 09)
f
fwscanf(3C) fwscanf(3C)
i Matches an optionally signed integer, whose format is the same as expected for the sub-
ject sequence of wcstol() with 0 for the base argument. In the absence of a size
modifier, the corresponding argument must be a pointer to int.
o Matches an optionally signed octal integer, whose format is the same as expected for the
subject sequence of wcstoul() with the value 8 for the base argument. In the absence
of a size modifier, the corresponding argument must be a pointer to unsigned int.
u Matches an optionally signed decimal integer, whose format is the same as expected for
the subject sequence of wcstoul() with the value 10 for the base argument. In the
absence of a size modifier, the corresponding argument must be a pointer to unsigned int.
x Matches an optionally signed hexadecimal integer, whose format is the same as expected
for the subject sequence of wcstoul() with the value 16 for the base argument. In the
absence of a size modifier, the corresponding argument must be a pointer to unsigned int.
a,e,f,g Matches an optionally signed floating-point number, whose format is the same as
expected for the subject sequence of wcstod(). In the absence of a size modifier, the
corresponding argument must be a pointer to float.
If the
fwprintf() family of functions generates character string representations for infinity and NaN
(a 7858 symbolic entity encoded in floating-point format) to support the ANSI/IEEE Std 754:1985 stan-
dard, the fwscanf() family of functions will recognize them as input.
s Matches a sequence of non white-space wide-characters. If no
l (ell) qualifier is present,
characters from the input field are converted as if by repeated calls to the
wcrtomb()
function, with the conversion state described by an mbstate_t object initialized to zero
before the first wide-character is converted. The corresponding argument must be a
pointer to a character array large enough to accept the sequence and the terminating null
character, which will be added automatically.
Otherwise, the corresponding argument must be a pointer to an array of
wchar_t large enough to accept
the sequence and the terminating null wide-character, which will be added automatically.
[ Matches a non-empty sequence of wide-characters from a set of expected wide-characters
(the scanset). If no
l (ell) qualifier is present, wide-characters from the input field are
converted as if by repeated calls to the wcrtomb() function, with the conversion state
described by an mbstate_t object initialized to zero before the first wide-character is
converted. The corresponding argument must be a pointer to a character array large
enough to accept the sequence and the terminating null character, which will be added
automatically.
If an
l (ell) qualifier is present, the corresponding argument must be a pointer to an array of
wchar_t
large enough to accept the sequence and the terminating null wide-character, which will be added
automatically.
The conversion specification includes all subsequent wide characters in the format string up to and
including the matching right square bracket (
]). The wide-characters between the square brackets (the
scanlist) comprise the scanset, unless the wide-character after the left square bracket is a circumflex ( ˆ),
in which case the scanset contains all wide-characters that do not appear in the scanlist between the
circumflex and the right square bracket. If the conversion specification begins with
[] or [ˆ], the right
square bracket is included in the scanlist and the next right square bracket is the matching right square
bracket that ends the conversion specification; otherwise the first right square bracket is the one that
ends the conversion specification. If a - is in the scanlist and is not the first wide-character, nor the
second where the first wide-character is a ˆ, nor the last wide-character, the behavior is implementation-
dependent.
c Matches a sequence of wide-characters of the number specified by the field width (1 if no
field width is present in the conversion specification). If no
l (ell) qualifier is present,
wide-characters from the input field are converted as if by repeated calls to the
wcrtomb() function, with the conversion state described by an mbstate_t object ini-
tialized to zero before the first wide-character is converted. The corresponding argument
must be a pointer to a character array large enough to accept the sequence. No null
character is added. Otherwise, the corresponding argument must be a pointer to an
array of wchar_t large enough to accept the sequence. No null wide-character is added.
p Matches an implementation-dependent set of sequences, which must be the same as the
set of sequences that is produced by the %p conversion of the corresponding
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3