Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (t - z) vfscanf(3)
• Maximum width—if the conversion specification includes a maximum width and the
field is not terminated by white space or an invalid character, then when that maximum
width is reached in the input stream, the field is terminated.
Conversion Specifications
Each conversion specification in the format parameter has the following syntax:
%[digit$][*][width][sizecode]convcode
• The character % (percent sign) or %digit$.
The vfscanf() function can handle a format string that enables the system to process an
element of the input stream for storage at a specific pointer location. In such a case, the
normal conversion specifier % (percent sign) is replaced by %digit$, where digit is a
decimal number in the range 1 through NL_ARGMAX. Conversion is then applied to
the specified pointer, rather than to the next unused pointer.
This variable ordering feature provides for the definition of format strings in an order
appropriate to specific languages. If this feature is used, it must be specified for all
conversions in format except for conversion specifications that do not have correspond-
ing pointers (that is, conversion specifications with the * [asterisk] assignment suppres-
sion character and %% conversion specifications).
If more than one conversion specification specifies the same value for digit, the results of
the function are undefined.
• The optional assignment suppression character * (asterisk).
• An optional decimal digit string width that specifies the maximum field width.
• An optional sizecode indicating the size of the receiving variable for some values of
convcode. The sizecode can be one of these values:
—Anh followed by a d, i, o, u, x, X,orn conversion code character indicates that
the receiving variable is treated as a short int or unsigned short int.
—Anhh followed by a d, i, o, u, x, X,orn conversion code character indicates that
the receiving variable is treated as a signed char or unsigned char.
—Aj followed by a d, i, o, u, x, X,o
rn conversion code character indicates that
the receiving variable is treated as a intmax_t or uintmax_t.
—Anl followed by a d, i, o, u, x, X,orn conversion code character indicates that
the receiving variable is treated as a long int or unsigned long int.
—Anl followed by an a, A, e, E, f, F, g,orG conversion code character indicates
that the receiving variable is treated as a double.
—Anll followed by a d, i, o, u, x, X,orn conversion code character indicates that
the receiving variable is treated as a long long int or unsigned long long int.
—AnL followed by an a, A, e, E, f, F, g,orG conversion
code character indicates
that the receiving variable is treated as a long double.
—AnL followed by a d, i, o, u, x, X,orn conversion code character indicates that
the receiving variable is treated as a long long or an unsigned long long, which
is a 64-bit integer data type and an HP extension.
527192-018 Hewlett-Packard Company 7−69