summaryrefslogtreecommitdiff
path: root/src/pacman/remove.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2008-08-20 22:08:11 +0200
committerDan McGee <dan@archlinux.org>2008-08-23 09:22:34 -0500
commitadc4078b8743a1437d44557dafea8619b1ce0fb1 (patch)
tree6b6d03e5e9231fed33629ca3cf63a15e12593592 /src/pacman/remove.c
parent7865fb9af487f7ca043cab6e90c3aee0863e285b (diff)
split yesno() into yesno() and noyes() functions.
The yesno function had a preset argument for specifying the default answer : yes or no. However, in all our calls to yesno, only one used the default "no" answer. Having to specify preset==1 for all the other cases was rather cumbersome. To make this easier, this commit adds a noyes function, with the following behavior : yesno() : default answer is yes noyes() : default answer is no Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r--src/pacman/remove.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index f091fa4d..b70f7035 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -75,10 +75,10 @@ int pacman_remove(alpm_list_t *targets)
}
printf(_(":: group %s:\n"), targ);
list_display(" ", pkgnames);
- int all = yesno(1, _(" Remove whole content?"));
+ int all = yesno(_(" Remove whole content?"));
for(p = pkgnames; p; p = alpm_list_next(p)) {
char *pkgn = alpm_list_getdata(p);
- if(all || yesno(1, _(":: Remove %s from group %s?"), pkgn, targ)) {
+ if(all || yesno(_(":: Remove %s from group %s?"), pkgn, targ)) {
if(alpm_trans_addtarget(pkgn) == -1) {
pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", targ,
alpm_strerrorlast());
@@ -131,7 +131,7 @@ int pacman_remove(alpm_list_t *targets)
printf("\n");
/* get confirmation */
- if(yesno(1, _("Do you want to remove these packages?")) == 0) {
+ if(yesno(_("Do you want to remove these packages?")) == 0) {
retval = 1;
goto cleanup;
}