HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)

f
fwscanf(3C) fwscanf(3C)
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 correspond-
ing 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 standard,
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 con-
verted 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 con-
verted. 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 automati-
cally.
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 automat-
ically.
The conversion specification includes all subsequent wide characters in the format string up to and includ-
ing 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 char-
acter 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 fwprintf()
functions. The corresponding argument must be a pointer to a pointer to void. If the input
item is a value converted earlier during the same program execution, the pointer that
results will compare equal to that value; otherwise the behavior of the %p conversion is
undefined.
n No input is consumed. The corresponding argument must be a pointer to the integer into
which is to be written the number of wide-characters read from the input so far by this call
to the fwscanf() functions. Execution of a %n conversion specification does not incre-
ment the assignment count returned at the completion of execution of the function.
C Same as lc.
S Same as ls.
% Matches a single %; no conversion or assignment occurs. The complete conversion
specification must be %%.
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 483