Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

swscanf(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.
a or A Accepts a double value converts it to the exponential form [-
]0xh.hhhp+/-d,. There is one digit before the radix character and the
number of digits after it is equal to the precision; when the precision is
missing, 13 digits are produced for double and 28 for long double
(which is sufficient for an exact representation of the value); if the preci-
sion is 0, no radix character appears. The letters abcdef are used for a
conversion and the letters ABCDEF for A conversion. The
A c
onverison
specifier produces a number with X and P instead of x and p. The
exponent always contains at least one digit, and only as many more
digits as necessary to represent the decimal exponent of 2. If the value is
zero, the exponent is zero.
6158 Hewlett-Packard Company 527192-018