summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-16 02:27:24 +0000
committerDenis Vlasenko2006-11-16 02:27:24 +0000
commit83ea643d8dc9b6f53706ba30bc4b53338f4f7994 (patch)
tree3a5f790604219213666cbf5cccd747c02528912c /libbb
parent3672fe9e9141c0684cae1e72e84cb2704f2a8702 (diff)
downloadbusybox-83ea643d8dc9b6f53706ba30bc4b53338f4f7994.zip
busybox-83ea643d8dc9b6f53706ba30bc4b53338f4f7994.tar.gz
svlogd: new applet. +9k. Still too big, but it was 12k yesterday.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xatol.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/xatol.c b/libbb/xatol.c
index 74a3b99..cce8ad3 100644
--- a/libbb/xatol.c
+++ b/libbb/xatol.c
@@ -195,6 +195,16 @@ long xatol(const char *numstr)
/* Others */
+unsigned xatou_range(const char *numstr, unsigned lower, unsigned upper)
+{
+ return xstrtoul_range_sfx(numstr, 10, lower, upper, NULL);
+}
+
+unsigned xatou_sfx(const char *numstr, const struct suffix_mult *suffixes)
+{
+ return xstrtoul_range_sfx(numstr, 10, 0, UINT_MAX, suffixes);
+}
+
unsigned xatou(const char *numstr)
{
return xatoul_range(numstr, 0, UINT_MAX);