From 1355bad2644230b9760e62333dc4a7b72c5fb1a9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 19 Jul 2011 15:19:13 +0200 Subject: Declare foreground and background variables global Removes the need to pass the terminal's default background color round. Signed-off-by: Lukas Fleischer --- src/custom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/custom.c') diff --git a/src/custom.c b/src/custom.c index 94286b1..3a97462 100644 --- a/src/custom.c +++ b/src/custom.c @@ -113,7 +113,7 @@ conf_parse_int (int *dest, char *val) * differently (number between 1 and 8). */ static void -custom_load_color (char *color, int background) +custom_load_color (char *color) { #define AWAITED_COLORS 2 @@ -255,7 +255,7 @@ custom_remove_attr (WINDOW *win, int attr_num) /* Set a configuration variable. */ static void -custom_set_conf (struct conf *conf, int background, enum conf_var var, char *val) +custom_set_conf (struct conf *conf, enum conf_var var, char *val) { unsigned tmp; @@ -290,7 +290,7 @@ custom_set_conf (struct conf *conf, int background, enum conf_var var, char *val calendar_set_first_day_of_week (SUNDAY); break; case CUSTOM_CONF_COLORTHEME: - custom_load_color (val, background); + custom_load_color (val); break; case CUSTOM_CONF_LAYOUT: wins_set_layout (atoi (val)); @@ -333,7 +333,7 @@ custom_set_conf (struct conf *conf, int background, enum conf_var var, char *val /* Load the user configuration. */ void -custom_load_conf (struct conf *conf, int background) +custom_load_conf (struct conf *conf) { FILE *data_file; char *mesg_line1 = _("Failed to open config file"); @@ -413,10 +413,10 @@ custom_load_conf (struct conf *conf, int background) if (fgets (buf, sizeof buf, data_file) == NULL) break; io_extract_data (e_conf, buf, sizeof buf); - custom_set_conf (conf, background, var, e_conf); + custom_set_conf (conf, var, e_conf); } else - custom_set_conf (conf, background, var, val); + custom_set_conf (conf, var, val); } file_close (data_file, __FILE_POS__); pthread_mutex_unlock (&nbar.mutex); -- cgit v1.2.3-54-g00ecf