summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2007-11-23 22:32:40 +0100
committerDan McGee <dan@archlinux.org>2007-12-01 18:58:07 +0100
commitc15f7710deafe1b4fe9411381bd07cd0dbe8da48 (patch)
tree657ef0053d35f7310b1fb26584a9c7780cc5f9e3 /src/pacman/util.c
parentf19820cba8c4da8d6b7c84c694f3d327e94095a4 (diff)
downloadpacman-c15f7710deafe1b4fe9411381bd07cd0dbe8da48.tar.gz
pacman-c15f7710deafe1b4fe9411381bd07cd0dbe8da48.tar.xz
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 <ngaba@bibl.u-szeged.hu> [Dan: fix whitespace errors, spacing issues, const modifiers] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c10
1 files changed, 10 insertions, 0 deletions
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;