diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-17 15:15:03 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-08-17 15:22:33 -0400 |
commit | a099ff189a15965142f1221988f9e28f7840f09d (patch) | |
tree | 5d460f323388edf1da18701b7d9efab01f9d5674 /expac.c | |
parent | 40cd830cdd399ee9aac3a2ec7ab0b3c3c7225972 (diff) | |
download | expac-a099ff189a15965142f1221988f9e28f7840f09d.tar.xz |
add %h formatter for sha256sum
Diffstat (limited to 'expac.c')
-rw-r--r-- | expac.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -37,7 +37,7 @@ #define DEFAULT_DELIM "\n" #define DEFAULT_LISTDELIM " " #define DEFAULT_TIMEFMT "%c" -#define FORMAT_TOKENS "BCDEGLNOPRSabdmnprsuvw%" +#define FORMAT_TOKENS "BCDEGLNOPRSabdhmnprsuvw%" #define FORMAT_TOKENS_LOCAL "ilFw" #define FORMAT_TOKENS_SYNC "fgk" #define ESCAPE_TOKENS "\"\\abefnrtv" @@ -424,6 +424,9 @@ static int print_pkg(alpm_pkg_t *pkg, const char *format) { case 'g': /* base64 gpg sig */ out += printf(fmt, alpm_pkg_get_base64_sig(pkg)); break; + case 'h': /* sha256sum */ + out += printf(fmt, alpm_pkg_get_sha256sum(pkg)); + break; /* times */ case 'b': /* build date */ |