7 |
* Licensed under GPLv2, see file LICENSE in this tarball for details. |
* Licensed under GPLv2, see file LICENSE in this tarball for details. |
8 |
*/ |
*/ |
9 |
|
|
10 |
#if __GNUC_PREREQ(4,1) |
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
|
# pragma GCC visibility push(hidden) |
|
|
#endif |
|
11 |
|
|
12 |
/* Provides extern declarations of functions */ |
/* Provides extern declarations of functions */ |
13 |
#define DECLARE_STR_CONV(type, T, UT) \ |
#define DECLARE_STR_CONV(type, T, UT) \ |
22 |
unsigned type xato##UT(const char *str) FAST_FUNC; \ |
unsigned type xato##UT(const char *str) FAST_FUNC; \ |
23 |
type xstrto##T##_range_sfx(const char *str, int b, type l, type u, const struct suffix_mult *sfx) FAST_FUNC; \ |
type xstrto##T##_range_sfx(const char *str, int b, type l, type u, const struct suffix_mult *sfx) FAST_FUNC; \ |
24 |
type xstrto##T##_range(const char *str, int b, type l, type u) FAST_FUNC; \ |
type xstrto##T##_range(const char *str, int b, type l, type u) FAST_FUNC; \ |
25 |
|
type xstrto##T(const char *str, int b) FAST_FUNC; \ |
26 |
type xato##T##_range_sfx(const char *str, type l, type u, const struct suffix_mult *sfx) FAST_FUNC; \ |
type xato##T##_range_sfx(const char *str, type l, type u, const struct suffix_mult *sfx) FAST_FUNC; \ |
27 |
type xato##T##_range(const char *str, type l, type u) FAST_FUNC; \ |
type xato##T##_range(const char *str, type l, type u) FAST_FUNC; \ |
28 |
type xato##T##_sfx(const char *str, const struct suffix_mult *sfx) FAST_FUNC; \ |
type xato##T##_sfx(const char *str, const struct suffix_mult *sfx) FAST_FUNC; \ |
67 |
narrow xstrto##N##_range(const char *str, int b, narrow l, narrow u) \ |
narrow xstrto##N##_range(const char *str, int b, narrow l, narrow u) \ |
68 |
{ return xstrto##W##_range(str, b, l, u); } \ |
{ return xstrto##W##_range(str, b, l, u); } \ |
69 |
static ALWAYS_INLINE \ |
static ALWAYS_INLINE \ |
70 |
|
narrow xstrto##N(const char *str, int b) \ |
71 |
|
{ return xstrto##W(str, b); } \ |
72 |
|
static ALWAYS_INLINE \ |
73 |
narrow xato##N##_range_sfx(const char *str, narrow l, narrow u, const struct suffix_mult *sfx) \ |
narrow xato##N##_range_sfx(const char *str, narrow l, narrow u, const struct suffix_mult *sfx) \ |
74 |
{ return xato##W##_range_sfx(str, l, u, sfx); } \ |
{ return xato##W##_range_sfx(str, l, u, sfx); } \ |
75 |
static ALWAYS_INLINE \ |
static ALWAYS_INLINE \ |
101 |
|
|
102 |
/* Specialized */ |
/* Specialized */ |
103 |
|
|
104 |
int BUG_xatou32_unimplemented(void); |
uint32_t BUG_xatou32_unimplemented(void); |
105 |
static ALWAYS_INLINE uint32_t xatou32(const char *numstr) |
static ALWAYS_INLINE uint32_t xatou32(const char *numstr) |
106 |
{ |
{ |
107 |
if (UINT_MAX == 0xffffffff) |
if (UINT_MAX == 0xffffffff) |
158 |
int bb_strtoi(const char *arg, char **endp, int base) FAST_FUNC; |
int bb_strtoi(const char *arg, char **endp, int base) FAST_FUNC; |
159 |
#endif |
#endif |
160 |
|
|
161 |
int BUG_bb_strtou32_unimplemented(void); |
uint32_t BUG_bb_strtou32_unimplemented(void); |
162 |
static ALWAYS_INLINE |
static ALWAYS_INLINE |
163 |
uint32_t bb_strtou32(const char *arg, char **endp, int base) |
uint32_t bb_strtou32(const char *arg, char **endp, int base) |
164 |
{ |
{ |
173 |
|
|
174 |
double bb_strtod(const char *arg, char **endp) FAST_FUNC; |
double bb_strtod(const char *arg, char **endp) FAST_FUNC; |
175 |
|
|
176 |
#if __GNUC_PREREQ(4,1) |
POP_SAVED_FUNCTION_VISIBILITY |
|
# pragma GCC visibility pop |
|
|
#endif |
|