changeset 1011:6cb9e7142574

Remove files du no longer needs.
author Rob Landley <rob@landley.net>
date Sun, 18 Aug 2013 04:12:51 -0500
parents b3c89d37143b
children bd1225873eb4
files lib/lib.h lib/pending.c
diffstat 2 files changed, 0 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/lib/lib.h	Sun Aug 18 04:11:50 2013 -0500
+++ b/lib/lib.h	Sun Aug 18 04:12:51 2013 -0500
@@ -193,9 +193,6 @@
 int read_password(char * buff, int buflen, char* mesg);
 int update_password(char *filename, char* username, char* encrypted);
 
-// du helper functions
-char* make_human_readable(unsigned long long size, unsigned long unit);
-
 // cut helper functions
 unsigned long get_int_value(const char *numstr, unsigned lowrange, unsigned highrange);
 
--- a/lib/pending.c	Sun Aug 18 04:11:50 2013 -0500
+++ b/lib/pending.c	Sun Aug 18 04:12:51 2013 -0500
@@ -36,32 +36,6 @@
   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.
  */