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

Guardian Native C Library Calls (t - z) wcstoimax(3)
RETURN VALUES
The wcstoimax() function returns the converted value of intmax_t if the expected form is found.
If no conversion could be performed, a value of 0 (zero) is returned. If the converted value is out-
side the range of representable values, LONG_MAX or LONG_MIN is returned (according to
the sign of the value).
If the endptr parameter is not a null pointer, wcstoimax() stores a pointer to the final sequence of
unrecognized characters in *endptr except when the subject sequence is empty or invalid. In this
case, wcstoimax() stores the nptr pointer in the *endptr parameter.
Since 0 (zero), LONG_MIN, and LONG_MAX are returned in the event of an error and are also
valid returns if the wcstoimax() function is successful, applications should set errno to 0 (zero)
before calling the wcstoimax() function, and check errno after return from the wcstoimax()
function. If errno is nonzero, an error occurred. Additionally, if 0 (zero) is returned, applica-
tions should check if 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 wcstoimax() function sets errno to the correspond-
ing value.
[EINVAL] The base parameter has a value less than 0 or greater than 36.
The nptr parameter is a null pointer.
[ERANGE] The converted value is outside the range of representable values.
RELATED INFORMATION
Functions: atoi(3), strtol(3), scanf(3), wcstod(3), iswalnum(3).
527192-018 Hewlett-Packard Company 7161