Default arguments for C99 function p99_strto
This macro is preferable to the atoi
function. The default arguments make it functionally equivalent but add two features:
- overflow and underflow handling
- flexible p00_base, namely octal, decimal or hexadecimal conversion
This macro hides the function
signed p99_strto (
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 291 of file p99_c99_default.h.