From 83ea643d8dc9b6f53706ba30bc4b53338f4f7994 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 16 Nov 2006 02:27:24 +0000 Subject: svlogd: new applet. +9k. Still too big, but it was 12k yesterday. --- libbb/xatol.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbb') diff --git a/libbb/xatol.c b/libbb/xatol.c index 74a3b9917..cce8ad3eb 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); -- cgit v1.2.3