Default arguments for C99 function p99_strtou
This macro is preferable to the atoi
function. First, it is specific to unsigned
and will return values in the correct range. Then, the default arguments make it functionally equivalent but add two features:
- overflow handling
- flexible p00_base, namely octal, decimal or hexadecimal conversion
This macro hides the function
unsinged
p99_strtou (
char const *p00_nptr,
char **p00_eptr,
int p00_base )
- See also
- P99_CALL_DEFARG
- Parameters
-
p00_nptr | is required |
p00_eptr | defaults to 0, meaning that the successfully parsed string is not kept track |
p00_base | is 0, numbers are hex if they start with 0x, octal if they start with 0 and decimal otherwise |
Definition at line 349 of file p99_c99_default.h.