P99
|
Extensions of the strto
and wcsto
families of functions.
More...
Macros | |
#define | p99_strto(...) P99_CALL_DEFARG(p99_strto, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strto More... | |
#define | p99_strtoc(...) P99_CALL_DEFARG(p99_strtoc, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoc More... | |
#define | p99_strtoh(...) P99_CALL_DEFARG(p99_strtoh, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoh More... | |
#define | p99_strtohh(...) P99_CALL_DEFARG(p99_strtohh, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtohh More... | |
#define | p99_strtoi16(...) P99_CALL_DEFARG(p99_strtoi16, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoi16 More... | |
#define | p99_strtoi32(...) P99_CALL_DEFARG(p99_strtoi32, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoi32 More... | |
#define | p99_strtoi64(...) P99_CALL_DEFARG(p99_strtoi64, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoi64 More... | |
#define | p99_strtoi8(...) P99_CALL_DEFARG(p99_strtoi8, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtoi8 More... | |
#define | p99_strtot(...) P99_CALL_DEFARG(p99_strtot, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtot More... | |
#define | p99_strtou(...) P99_CALL_DEFARG(p99_strtou, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtou More... | |
#define | p99_strtou16(...) P99_CALL_DEFARG(p99_strtou16, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtou16 More... | |
#define | p99_strtou32(...) P99_CALL_DEFARG(p99_strtou32, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtou32 More... | |
#define | p99_strtou64(...) P99_CALL_DEFARG(p99_strtou64, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtou64 More... | |
#define | p99_strtou8(...) P99_CALL_DEFARG(p99_strtou8, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtou8 More... | |
#define | p99_strtouh(...) P99_CALL_DEFARG(p99_strtouh, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtouh More... | |
#define | p99_strtouhh(...) P99_CALL_DEFARG(p99_strtouhh, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtouhh More... | |
#define | p99_strtouz(...) P99_CALL_DEFARG(p99_strtouz, 3, __VA_ARGS__) |
Default arguments for C99 function p99_strtouz More... | |
#define | strto p99_strto |
#define | strtoc p99_strtoc |
#define | strtod(...) P99_CALL_DEFARG(strtod, 2, __VA_ARGS__) |
Default arguments for C99 function strtod More... | |
#define | strtof(...) P99_CALL_DEFARG(strtof, 2, __VA_ARGS__) |
Default arguments for C99 function strtof More... | |
#define | strtoh p99_strtoh |
#define | strtohh p99_strtohh |
#define | strtoi16 p99_strtoi16 |
#define | strtoi32 p99_strtoi32 |
#define | strtoi64 p99_strtoi64 |
#define | strtoi8 p99_strtoi8 |
#define | strtoimax(...) P99_CALL_DEFARG(strtoimax, 3, __VA_ARGS__) |
Default arguments for C99 function strtoimax More... | |
#define | strtoj p99_strtoj |
#define | strtol(...) P99_CALL_DEFARG(strtol, 3, __VA_ARGS__) |
Default arguments for C99 function strtol More... | |
#define | strtold(...) P99_CALL_DEFARG(strtold, 2, __VA_ARGS__) |
Default arguments for C99 function strtold More... | |
#define | strtoll(...) P99_CALL_DEFARG(strtoll, 3, __VA_ARGS__) |
Default arguments for C99 function strtoll More... | |
#define | strtot p99_strtot |
#define | strtou p99_strtou |
#define | strtou16 p99_strtou16 |
#define | strtou32 p99_strtou32 |
#define | strtou64 p99_strtou64 |
#define | strtou8 p99_strtou8 |
#define | strtouh p99_strtouh |
#define | strtouhh p99_strtouhh |
#define | strtouj p99_strtouj |
#define | strtoul(...) P99_CALL_DEFARG(strtoul, 3, __VA_ARGS__) |
Default arguments for C99 function strtoul More... | |
#define | strtoull(...) P99_CALL_DEFARG(strtoull, 3, __VA_ARGS__) |
Default arguments for C99 function strtoull More... | |
#define | strtoumax(...) P99_CALL_DEFARG(strtoumax, 3, __VA_ARGS__) |
Default arguments for C99 function strtoumax More... | |
#define | strtouz p99_strtouz |
#define | wcstod(...) P99_CALL_DEFARG(wcstod, 2, __VA_ARGS__) |
Default arguments for C99 function wcstod More... | |
#define | wcstof(...) P99_CALL_DEFARG(wcstof, 2, __VA_ARGS__) |
Default arguments for C99 function wcstof More... | |
#define | wcstoimax(...) P99_CALL_DEFARG(wcstoimax, 3, __VA_ARGS__) |
Default arguments for C99 function wcstoimax More... | |
#define | wcstol(...) P99_CALL_DEFARG(wcstol, 3, __VA_ARGS__) |
Default arguments for C99 function wcstol More... | |
#define | wcstold(...) P99_CALL_DEFARG(wcstold, 2, __VA_ARGS__) |
Default arguments for C99 function wcstold More... | |
#define | wcstoll(...) P99_CALL_DEFARG(wcstoll, 3, __VA_ARGS__) |
Default arguments for C99 function wcstoll More... | |
#define | wcstoul(...) P99_CALL_DEFARG(wcstoul, 3, __VA_ARGS__) |
Default arguments for C99 function wcstoul More... | |
#define | wcstoull(...) P99_CALL_DEFARG(wcstoull, 3, __VA_ARGS__) |
Default arguments for C99 function wcstoull More... | |
#define | wcstoumax(...) P99_CALL_DEFARG(wcstoumax, 3, __VA_ARGS__) |
Default arguments for C99 function wcstoumax More... | |
Extensions of the strto
and wcsto
families of functions.
This generally adds default behavior and type safety to these standard C99 functions. The standard defines them only for the types long
(strtol), long
long
(strtoll), intmax_t
(strtoimax) and their unsigned variants. This here adds support for the other standard integer types and typedef
. This provides
In addition, to provide default arguments for the standard functions, these have names starting with p99_str
... and macros that expand to these starting with str
..., instead. The later might be reserved or provided in later version of the C standard. If we receive knowledge of such new interfaces we will bracket the definitions given here with appropriate defines.
We provide interfaces for the standard types char
(strtoc), signed
(strtohh) and unsigned
char
(strtouhh), signed
(strtoh) and unsigned
short
(strtouh), and signed
(strto) and unsigned
int
(strtou). For the standard typedefs we provide strtouz for size_t
and strtot for ptrdiff_t
. Here the endings of the names are taken in analogy from the printf
formats.
The type specific upper an lower bounds for all these are the MIN
and MAX
values of the corresponding types.
For the types {u}int_least
[N]_t with N = 8, 16, 32 or 64 we provide functions and macros strto{u|i}[N] that have the bounds INT[N]_MIN, INT[N]_MAX and UINT[N]_MAX, respectively. So e.g for strtou16 the bound is not the bound of the type uint_least16_t
(which might be much wider than 16 bit) but the value UINT16_MAX
, i.e 216-1.