From c15f7710deafe1b4fe9411381bd07cd0dbe8da48 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Fri, 23 Nov 2007 22:32:40 +0100 Subject: Unify dump_pkg_full in pacman [-Si, -Qip, -Qi and -Qii] dump_pkg_sync is now a trivial wrapper for dump_pkg_full Some smaller changes: * string_display function added to util.c [prints None in case of empty string] * Filename field added to -Qip * rename License to Licenses * 'Compressed Size' used instead of 'Download Size' for -Qip Signed-off-by: Nagy Gabor [Dan: fix whitespace errors, spacing issues, const modifiers] Signed-off-by: Dan McGee --- src/pacman/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/pacman/util.c') diff --git a/src/pacman/util.c b/src/pacman/util.c index a925be36..89313c83 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -349,6 +349,16 @@ alpm_list_t *strsplit(const char *str, const char splitchar) return(list); } +void string_display(const char *title, const char *string) +{ + printf("%s ", title); + if(string == NULL || string[0] == '\0') { + printf(_("None\n")); + } else { + printf("%s\n", string); + } +} + void list_display(const char *title, const alpm_list_t *list) { const alpm_list_t *i; -- cgit v1.2.3-24-g4f1b