summaryrefslogtreecommitdiff
path: root/src/custom.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-07-19 15:19:13 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-07-21 17:56:39 +0200
commit1355bad2644230b9760e62333dc4a7b72c5fb1a9 (patch)
treeb60aa2d7bada81b42977e38d5415cf081b0f1ad0 /src/custom.c
parente5dee68dcf318b58a3339250ae63fa5f26cdf790 (diff)
downloadcalcurse-1355bad2644230b9760e62333dc4a7b72c5fb1a9.zip
Declare foreground and background variables global
Removes the need to pass the terminal's default background color round. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/custom.c')
-rw-r--r--src/custom.c12
1 files changed, 6 insertions, 6 deletions
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);