summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-04 12:12:13 -0400
committerDan McGee <dan@archlinux.org>2007-06-04 23:10:49 -0400
commit6949ab97613de3622a4c392a3d33080164eec794 (patch)
tree78ea244d0a0ba38edc04fa8ca7757df767e1d6eb
parent65662315b6d180f7066f6578c55a9feec7250114 (diff)
Move three config options out of the backend
Move chomp, usecolor, and showsize out of the backend and into the pacman frontend as they are pacman-specific options and not related to the behavior of libalpm. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/conf.h4
-rw-r--r--src/pacman/pacman.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 4fff0abb..8c55a2fc 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -54,6 +54,10 @@ typedef struct __config_t {
pmtransflag_t flags;
unsigned short noask;
unsigned int ask;
+ /* conf file options */
+ unsigned short chomp; /* I Love Candy! */
+ unsigned short usecolor; /* enable colorful output */
+ unsigned short showsize; /* show individual package sizes */
} config_t;
config_t *config_new(void);
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index e53eb2f8..19ffc759 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -535,13 +535,13 @@ static int _parseconfig(const char *file, const char *givensection)
alpm_option_set_usesyslog(1);
printf(_("config: usesyslog"));
} else if(strcmp(key, "ILoveCandy") == 0 || strcmp(upperkey, "ILOVECANDY") == 0) {
- alpm_option_set_chomp(1);
+ config->chomp = 1;
printf(_("config: chomp"));
} else if(strcmp(key, "UseColor") == 0 || strcmp(upperkey, "USECOLOR") == 0) {
- alpm_option_set_usecolor(1);
+ config->usecolor = 1;
printf(_("config: usecolor"));
} else if(strcmp(key, "ShowSize") == 0 || strcmp(upperkey, "SHOWSIZE") == 0) {
- alpm_option_set_showsize(1);
+ config->showsize= 1;
printf(_("config: showsize"));
} else {
printf("PM_ERR_CONF_BAD_SYNTAX");