summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.h
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/util.h
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/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 f94f0aed..66a9c4e7 100644
--- a/src/pacman/util.h
+++ b/src/pacman/util.h
@@ -55,7 +55,8 @@ void list_display_linebreak(const char *title, const alpm_list_t *list);
void display_targets(const alpm_list_t *pkgs, int install);
void display_synctargets(const alpm_list_t *syncpkgs);
void display_optdepends(pmpkg_t *pkg);
-int yesno(short preset, char *fmt, ...);
+int yesno(char *fmt, ...);
+int noyes(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)));
int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0)));