Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/util.h
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2008-07-25 02:02:36 +0200
committerDan McGee <dan@archlinux.org>2008-07-24 22:16:29 -0500
commitdfae7bdd52476673424f8020befef166cf95f3fc (patch)
treedfa54d7df22f17f29d27673cf416a81b46bf9acb /src/pacman/util.h
parente6fb229534332396363f69bdb46081f45271bc53 (diff)
src/pacman : rework the display_targets function.
We had a lot of duplicated code here. The code handling the showsize option needed to be there three times : 1) for install part of -S 2) for remove part of -S (conflict removal) 3) for -R This patch introduce a new display_targets(pkglist, install) function which can handle the 3 cases above. We pass install == 1 for case 1), and install == 0 for case 2) and 3). Now we can finally get the benefit of an old patch which handled the ShowSize option consistently in the 3 cases above, without an awful lot of duplicated code : http://www.archlinux.org/pipermail/pacman-dev/2008-January/011029.html Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r--src/pacman/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/util.h b/src/pacman/util.h
index 722e4ab6..2ddc1b52 100644
--- a/src/pacman/util.h
+++ b/src/pacman/util.h
@@ -51,7 +51,8 @@ char *strreplace(const char *str, const char *needle, const char *replace);
alpm_list_t *strsplit(const char *str, const char splitchar);
void string_display(const char *title, const char *string);
void list_display(const char *title, const alpm_list_t *list);
-void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local);
+void display_targets(const alpm_list_t *pkgs, int install);
+void display_synctargets(const alpm_list_t *syncpkgs);
int yesno(short preset, char *fmt, ...);
int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3)));
int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) __attribute__((format(printf,3,4)));