summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.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 16:22:34 +0200
commitadc4078b8743a1437d44557dafea8619b1ce0fb1 (patch)
tree6b6d03e5e9231fed33629ca3cf63a15e12593592 /src/pacman/callback.c
parent7865fb9af487f7ca043cab6e90c3aee0863e285b (diff)
downloadpacman-adc4078b8743a1437d44557dafea8619b1ce0fb1.tar.gz
pacman-adc4078b8743a1437d44557dafea8619b1ce0fb1.tar.xz
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/callback.c')
-rw-r--r--src/pacman/callback.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index a6349874..838e336a 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -255,33 +255,33 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
case PM_TRANS_CONV_INSTALL_IGNOREPKG:
if(data2) {
/* TODO we take this route based on data2 being not null? WTF */
- *response = yesno(1, _(":: %s requires installing %s from IgnorePkg/IgnoreGroup. Install anyway?"),
+ *response = yesno(_(":: %s requires installing %s from IgnorePkg/IgnoreGroup. Install anyway?"),
alpm_pkg_get_name(data2),
alpm_pkg_get_name(data1));
} else {
- *response = yesno(1, _(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"),
+ *response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"),
alpm_pkg_get_name(data1));
}
break;
case PM_TRANS_CONV_REMOVE_HOLDPKG:
- *response = yesno(1, _(":: %s is designated as a HoldPkg. Remove anyway?"),
+ *response = yesno(_(":: %s is designated as a HoldPkg. Remove anyway?"),
alpm_pkg_get_name(data1));
break;
case PM_TRANS_CONV_REPLACE_PKG:
- *response = yesno(1, _(":: Replace %s with %s/%s?"),
+ *response = yesno(_(":: Replace %s with %s/%s?"),
alpm_pkg_get_name(data1),
(char *)data3,
alpm_pkg_get_name(data2));
break;
case PM_TRANS_CONV_CONFLICT_PKG:
- *response = yesno(1, _(":: %s conflicts with %s. Remove %s?"),
+ *response = yesno(_(":: %s conflicts with %s. Remove %s?"),
(char *)data1,
(char *)data2,
(char *)data2);
break;
case PM_TRANS_CONV_LOCAL_NEWER:
if(!config->op_s_downloadonly) {
- *response = yesno(1, _(":: %s-%s: local version is newer. Upgrade anyway?"),
+ *response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"),
alpm_pkg_get_name(data1),
alpm_pkg_get_version(data1));
} else {
@@ -289,7 +289,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
}
break;
case PM_TRANS_CONV_CORRUPTED_PKG:
- *response = yesno(1, _(":: File %s is corrupted. Do you want to delete it?"),
+ *response = yesno(_(":: File %s is corrupted. Do you want to delete it?"),
(char *)data1);
break;
}