From 6949ab97613de3622a4c392a3d33080164eec794 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 4 Jun 2007 12:12:13 -0400 Subject: 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 --- src/pacman/conf.h | 4 ++++ src/pacman/pacman.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/pacman') 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"); -- cgit v1.2.3