aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-07-11 23:09:27 +0200
committerFederico Angelilli <code@fedang.net>2024-07-11 23:09:27 +0200
commit32aa49a2299ea2bf95b72631dfafac7090c3c6e9 (patch)
treeaabbce5a27059f293fc34e5fd3239fcf0b496623 /src/config.c
parent60739263729e36f99b4c9279447c622acd3bd04c (diff)
Print color
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c
index 93b4f53..1488a55 100644
--- a/src/config.c
+++ b/src/config.c
@@ -101,10 +101,6 @@ static bool config_read_bool(const char *value, bool *result)
static bool config_read_color(const char *value, color_t *result)
{
- if (!strcmp(value, "rgb")) {
- log_panic("TODO");
- }
-
if (value[0] == '#') {
char *end;
unsigned long n = strtoul(value + 1, &end, 16);
@@ -212,7 +208,9 @@ static bool config_entry(config_t *config, int line, const char *section, const
case CONFIG_COLOR:
if (config_read_color(value, (color_t *)result)) {
- log_debug("Config '%s' set to '%s'", key, value);
+ char *color = color_to_string((color_t *)result);
+ log_debug("Config '%s' set to '%s'", key, color);
+ free(color);
return true;
}
break;