2 Copyright © 2008, The AROS Development Team. All rights reserved.
5 C99 function strtoimax().
10 /*****************************************************************************
23 Convert a string of digits into an integer according to the
24 given base. This function is like strtol() except the fact,
25 that it returns a value of type intmax_t.
28 str - The string which should be converted.
29 endptr - If this is non-NULL, then the address of the first
30 character after the number in the string is stored
32 base - The base for the number.
35 The value of the string. The first character after the number
36 is returned in *endptr, if endptr is non-NULL. If no digits can
37 be converted, *endptr contains str (if non-NULL) and 0 is
45 errno is not set as required by C99 standard
52 ******************************************************************************/
54 /* TODO: Implement errno handling in strtoimax() */
55 #if defined(AROS_HAVE_LONG_LONG)
56 return (intmax_t) strtoll(nptr
, endptr
, base
);
58 return (intmax_t) strtol(nptr
, endptr
, base
);