summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.h
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-02-19 00:44:09 +0100
committerDan McGee <dan@archlinux.org>2008-02-25 01:17:49 +0100
commit143135e666f5564240868810f0b8f4bc46ff87b5 (patch)
treed70bb426c06e9ee0dc94481ed5144aedca0bc54c /src/pacman/util.h
parentca1a187131d95604ff2c33df3c1ec80ef4af789b (diff)
downloadpacman-143135e666f5564240868810f0b8f4bc46ff87b5.tar.gz
pacman-143135e666f5564240868810f0b8f4bc46ff87b5.tar.xz
Improve yesno function.
Add a preset paramater to yesno function saying which answer should be the default. Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-June/008470.html This allows us to answer no by default to some questions, like the -Scc one mentioned in the above thread, and implemented by this patch. Another advantage is that we don't have to repeat the [Y/n] in every questions. It's only put once in yesno function. This highly reduces the chances that YES and NO strings are translated, but not some questions, which lead to obvious confusions. Finally, the noconfirm variable only needs to be used in that yesno function. So all other usages of it were removed. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r--src/pacman/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/util.h b/src/pacman/util.h
index 0273512e..f2facbfc 100644
--- a/src/pacman/util.h
+++ b/src/pacman/util.h
@@ -50,7 +50,7 @@ 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);
-int yesno(char *fmt, ...);
+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)));
int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0)));