libxbps::xbps_humanize_number(): use common values and hide implementation details from API.

So now its prototype is the following:

int xbps_humanize_number(char *buf, int64_t bytes)

It is a wrapper around NetBSD's humanize_number(3) which uses 6 digits for max
length, HN_AUTOSCALE and HN_NOSPACE|HN_DECIMAL. All users have been updated.
This commit is contained in:
Juan RP
2011-01-18 23:10:07 +01:00
parent e2b55c90be
commit 992e8c6a14
5 changed files with 42 additions and 42 deletions

View File

@@ -217,15 +217,7 @@ const char *xbps_fetch_error_string(void);
/*@}*/
/* From lib/humanize_number.c */
#define HN_DECIMAL 0x01
#define HN_NOSPACE 0x02
#define HN_B 0x04
#define HN_DIVISOR_1000 0x08
#define HN_GETSCALE 0x10
#define HN_AUTOSCALE 0x20
int xbps_humanize_number(char *, size_t, int64_t, const char *, int, int);
int xbps_humanize_number(char *, int64_t);
/**
* @ingroup dircreate