diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-07 20:17:50 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-08-07 20:17:50 -0400 |
commit | 919fa1c88bcfc2db16410afb084b338540e91c4f (patch) | |
tree | edb8e4d525ad734f56fb2609aebf8a25786300c5 | |
parent | fb8bdc687264eccbff3801145871a4a34099f0e6 (diff) | |
download | expac-919fa1c88bcfc2db16410afb084b338540e91c4f.tar.xz |
use proper suffixes for package sizes
-rw-r--r-- | expac.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -28,7 +28,7 @@ #include <alpm.h> #include <ctype.h> #include <getopt.h> -#include <limits.h> +/* #include <limits.h> */ #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -42,6 +42,10 @@ #define FORMAT_TOKENS_SYNC "fk" #define ESCAPE_TOKENS "\"\\abefnrtv" +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + static char const digits[] = "0123456789"; static char const printf_flags[] = "'-+ #0I"; @@ -435,10 +439,10 @@ static int print_pkg(pmpkg_t *pkg, const char *format) { /* sizes */ case 'k': /* download size */ - out += printf("%.2f K", (float)alpm_pkg_get_size(pkg) / 1024.0); + out += printf("%.2f KiB", (float)alpm_pkg_get_size(pkg) / 1024.0); break; case 'm': /* install size */ - out += printf("%.2f K", (float)alpm_pkg_get_isize(pkg) / 1024.0); + out += printf("%.2f KiB", (float)alpm_pkg_get_isize(pkg) / 1024.0); break; /* lists */ |