summaryrefslogtreecommitdiff
path: root/libbb/xatonum.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-27 14:43:21 +0000
committerDenis Vlasenko2006-11-27 14:43:21 +0000
commitd686a045c8134d3a42fa5cc6b2e09118e08d603f (patch)
tree38f509fc9556f68f758c77b06b480cc33b2725eb /libbb/xatonum.c
parent8a0a83d503a7971895254efa9e79cf15ba1850d4 (diff)
downloadbusybox-d686a045c8134d3a42fa5cc6b2e09118e08d603f.zip
busybox-d686a045c8134d3a42fa5cc6b2e09118e08d603f.tar.gz
safe_strtoXX interface proved to be a bit unconvenient.
Remove it, introduce saner bb_strtoXX. Saved ~350 bytes.
Diffstat (limited to 'libbb/xatonum.c')
-rw-r--r--libbb/xatonum.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/libbb/xatonum.c b/libbb/xatonum.c
index 0d487dd..35607c3 100644
--- a/libbb/xatonum.c
+++ b/libbb/xatonum.c
@@ -19,15 +19,6 @@
#define XSTR_TYPE_MIN LLONG_MIN
#define XSTR_STRTOU strtoull
#include "xatonum_template.c"
-#undef type
-#undef xstrtou
-#undef xstrto
-#undef xatou
-#undef xato
-#undef XSTR_UTYPE_MAX
-#undef XSTR_TYPE_MAX
-#undef XSTR_TYPE_MIN
-#undef XSTR_STRTOU
#if ULONG_MAX != ULLONG_MAX
#define type long
@@ -40,15 +31,6 @@
#define XSTR_TYPE_MIN LONG_MIN
#define XSTR_STRTOU strtoul
#include "xatonum_template.c"
-#undef type
-#undef xstrtou
-#undef xstrto
-#undef xatou
-#undef xato
-#undef XSTR_UTYPE_MAX
-#undef XSTR_TYPE_MAX
-#undef XSTR_TYPE_MIN
-#undef XSTR_STRTOU
#endif
#if UINT_MAX != ULONG_MAX
@@ -72,15 +54,6 @@ extern inline unsigned bb_strtoui(const char *str, char **end, int b)
/* libc has no strtoui, so we need to create/use our own */
#define XSTR_STRTOU bb_strtoui
#include "xatonum_template.c"
-#undef type
-#undef xstrtou
-#undef xstrto
-#undef xatou
-#undef xato
-#undef XSTR_UTYPE_MAX
-#undef XSTR_TYPE_MAX
-#undef XSTR_TYPE_MIN
-#undef XSTR_STRTOU
#endif
/* A few special cases */
@@ -90,11 +63,6 @@ int xatoi_u(const char *numstr)
return xatou_range(numstr, 0, INT_MAX);
}
-uint32_t xatou32(const char *numstr)
-{
- return xatoul_range(numstr, 0, 0xffffffff);
-}
-
uint16_t xatou16(const char *numstr)
{
return xatou_range(numstr, 0, 0xffff);