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

wcstoull(3) Guardian Native C Library Calls Reference Manual
converted:
Character 0123456789ABCDEFGHIJ
abcdefghij
Value 012345678910111213141516171819
The subject string can optionally be preceded by a + (plus sign) or - (minus sign), but cannot
include an integer suffix (such as L). If the subject string is preceded by a - (minus sign), the con-
verted integer value has a negative value cast to unsigned integer. If the value of base is 16, the
characters 0x or 0X may optionally precede the sequence of letters or digits, following the sign,
if present.
The wide-character string is parsed to skip the initial whitespace characters, as determined by the
iswspace() function. Any nonspace character is the start of a potential subject string that may
form an unsigned long long integer in the base specified by the base parameter. The subject
sequence is defined to be the longest initial substring that is of the expected form of unsigned
long long integer. Any character that does not satisfy this expected form begins the final
sequence of unrecognized characters. The wcstoull() function sets the *endptr parameter to
point to this final sequence of unrecognized characters.
The LC_CTYPE category of the locale controls what wide characters are treated as spaces but
does not effect the interpretation of characters as part of the subject string. The characters in the
subject string are always treated as if the locale was the C locale.
RETURN VALUES
The wcstoull() function returns the converted value of the unsigned long long integer if the
expected form is found. If no conversion could be performed, a value of 0 (zero) is returned. If
the converted value is outside the range of representable values, ULLONG_MAX is returned.
If the endptr parameter is not a null pointer, wcstoull() stores a pointer to the final sequence of
unrecognized characters in *endptr, except when the subject sequence is empty or invalid. In
this case, wcstoull() stores the nptr pointer in the *endptr parameter.
Since 0 (zero) and ULLONG_MAX are returned in the event of an error and are also valid
returns if the wcstoull() function is successful, applications should set errno to 0 (zero) before
calling the wcstoull() function, and check errno after return from the wcstoull() function. If
errno is nonzero, an error occurred. Additionally, if 0 (zero) is returned, applications should
check whether the endptr parameter equals the nptr parameter. In this case, there was no valid
subject string.
ERRORS
If any of the following conditions occur, the wcstoull() function sets errno to the value that
corresponds to the condition.
EINVAL The base parameter has a value less than 0 or greater than 36, or the nptr param-
eter is a null pointer.
ERANGE The converted value is outside the range of representable values.
RELATED INFORMATION
Functions: atoi(3), iswalnum(3), scanf(3), strtoul(3), wcstod(3), wcstol(3), wctype(3).
STANDARDS CONFORMANCE
This funciton is an HP extension to the Single UNIX Specification, Version 2.
7176 Hewlett-Packard Company 527192-018