Prefix humanize_number() with xbps_.
This will avoid clashes if xbps ever works on NetBSD. --HG-- extra : convert_revision : 064b690988ba5cd75de55eacd9f37996a952da17
This commit is contained in:
parent
a928bf02e2
commit
fa793a5044
3 changed files with 3 additions and 3 deletions
|
@ -38,6 +38,6 @@
|
||||||
#define HN_GETSCALE 0x10
|
#define HN_GETSCALE 0x10
|
||||||
#define HN_AUTOSCALE 0x20
|
#define HN_AUTOSCALE 0x20
|
||||||
|
|
||||||
int humanize_number(char *, size_t, int64_t, const char *, int, int);
|
int xbps_humanize_number(char *, size_t, int64_t, const char *, int, int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <xbps_api.h>
|
#include <xbps_api.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
humanize_number(char *buf, size_t len, int64_t bytes,
|
xbps_humanize_number(char *buf, size_t len, int64_t bytes,
|
||||||
const char *suffix, int scale, int flags)
|
const char *suffix, int scale, int flags)
|
||||||
{
|
{
|
||||||
const char *prefixes, *sep;
|
const char *prefixes, *sep;
|
||||||
|
|
|
@ -387,7 +387,7 @@ xbps_show_pkg_info(prop_dictionary_t dict)
|
||||||
obj = prop_dictionary_get(dict, "installed_size");
|
obj = prop_dictionary_get(dict, "installed_size");
|
||||||
if (obj && prop_object_type(obj) == PROP_TYPE_NUMBER) {
|
if (obj && prop_object_type(obj) == PROP_TYPE_NUMBER) {
|
||||||
printf("Installed size: ");
|
printf("Installed size: ");
|
||||||
rv = humanize_number(size, 5,
|
rv = xbps_humanize_number(size, 5,
|
||||||
(int64_t)prop_number_unsigned_integer_value(obj),
|
(int64_t)prop_number_unsigned_integer_value(obj),
|
||||||
"", HN_AUTOSCALE, HN_NOSPACE);
|
"", HN_AUTOSCALE, HN_NOSPACE);
|
||||||
if (rv == -1)
|
if (rv == -1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue