aboutsummaryrefslogtreecommitdiff
path: root/lib/pending.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-08-18 04:12:51 -0500
committerRob Landley <rob@landley.net>2013-08-18 04:12:51 -0500
commit100fb2399417316fb6d5818fbc4e3a843d189bf3 (patch)
tree8d886c3d043c88fb760cb56e23f33f9110f1dcb7 /lib/pending.c
parent880d4a96523c94d84bee1f066de5cf03756877a3 (diff)
downloadtoybox-100fb2399417316fb6d5818fbc4e3a843d189bf3.tar.gz
Remove files du no longer needs.
Diffstat (limited to 'lib/pending.c')
-rw-r--r--lib/pending.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/pending.c b/lib/pending.c
index 79b9c91c..9c92f2ce 100644
--- a/lib/pending.c
+++ b/lib/pending.c
@@ -36,32 +36,6 @@ done:
closedir(dp);
}
-char* make_human_readable(unsigned long long size, unsigned long unit)
-{
- unsigned int frac = 0;
- if(unit) {
- size = (size/(unit)) + (size%(unit)?1:0);
- return xmsprintf("%llu", size);
- }
- else {
- static char units[] = {'\0', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'};
- int index = 0;
- while(size >= 1024) {
- frac = size%1024;
- size /= 1024;
- index++;
- }
- frac = (frac/102) + ((frac%102)?1:0);
- if(frac >= 10) {
- size += 1;
- frac = 0;
- }
- if(frac) return xmsprintf("%llu.%u%c", size, frac, units[index]);
- else return xmsprintf("%llu%c", size, units[index]);
- }
- return NULL; //not reached
-}
-
/*
* used to get the interger value.
*/