Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
vswscanf(3) Guardian Native C Library Calls Reference Manual
i Accepts a decimal integer unless:
— The first digit is a 0 (zero), in which case the integer is inter-
preted as an octal number.
— The first two characters are 0x or 0X, in which case the integer is
interpreted as a hexadecimal number.
The corresponding pointer parameter should be an integer pointer.
n Consumes no input. The corresponding pointer parameter is a pointer to
an integer into which is written the number of characters read from the
input string so far by this function. The assignment count returned at the
completion of this function is not incremented.
o Accepts an octal integer; the corresponding pointer parameter should be
an integer pointer.
p Matches an unsigned hexadecimal integer, the same as the %p conver-
sion of the printf() function. The corresponding pointer parameter must
be a pointer to a pointer to void.
s Accepts a string of wide-characters and converts the string to multibyte
characters. The input field ends with a white-space character. If width is
given, the corresponding pointer parameter refers to a character array
and the indicated number of type char values are read. A string of type
char values is written to the array. The array must be large enough to
contain the output string with a terminating null byte appended.
S or ls Accepts a string of wide-characters. The input field ends with a white-
space character. If width is given, the behavior of the conversion is
undefined. The corresponding pointer parameter should be a pointer to
an array of type wchar_t. A string of type wchar_t is written to the
array. The array must be large enough to contain the output string with a
terminating null wide-character appended.
For TNS/E systems only, the behavior of ls is the same as the behavior of
S.
u Accepts an unsigned decimal integer; the corresponding pointer parame-
ter should be an unsigned integer pointer.
x Accepts a hexadecimal integer; the corresponding pointer parameter
should be an integer pointer.
[scanset] Accepts as input the characters included in scanset. scanset explicitly
defines the characters that are accepted in the input string to be those
enclosed within [](square brackets). The corresponding pointer param-
eter should be an array of type char. The leading white space that is
normally skipped over is suppressed. A scanset in the form [ˆscanset] is
an exclusive scanset: the ˆ
(circumflex) is a complement operator and the
characters
in the following scanset are not accepted as input. Conven-
tions used in the construction of scanset are:
— You can represent a range of characters by the construct first-
last. Thus, you can express [0123456789] as [0-9]. The first
value must be lexically less than or equal to the last value, or
else the - (dash) stands for itself. The - (dash) also stands for
7−120 Hewlett-Packard Company 527192-018