Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

vwscanf(3) OSS Library Calls Reference Manual
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 stream 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 stream 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
itself whenever it is the first or last character in scanset.
You can include the ] (right bracket) as an element of scanset if
it is the first character of scanset. In this case, it is not inter-
preted as the bracket that closes scanset.Ifscanset is an
exclusive scanset, the ] is preceded by the ˆ (circumflex) to make
the ] an element of scanset. The corresponding pointer parame-
ter must point to a character array large enough to contain the
output string with a terminating 0 (zero) appended. The 0 (zero)
7154 Hewlett-Packard Company 527187-017