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>
This commit is contained in:
Dan McGee 2007-06-04 12:12:13 -04:00
parent 65662315b6
commit 6949ab9761
2 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -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");