aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-20 22:13:31 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-20 22:13:31 -0400
commitf269a4a324396423d97da783ad372cdbb275eb65 (patch)
treef0633821169e97ce05356512ebbc3b2448d3260d
parentd84a75e3f81f3ac7bf9cd7d79904dc5418365cf4 (diff)
downloadrunes-f269a4a324396423d97da783ad372cdbb275eb65.tar.gz
runes-f269a4a324396423d97da783ad372cdbb275eb65.zip
allow blank lines and comments
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index 6f34425..0b75c63 100644
--- a/config.c
+++ b/config.c
@@ -122,6 +122,10 @@ static void runes_config_process_config_file(RunesTerm *t, FILE *config_file)
len--;
}
+ if (!len || line[strspn(line, " \t")] == '#') {
+ continue;
+ }
+
kbegin = line + strspn(line, " \t");
kend = kbegin + strcspn(kbegin, " \t=");
vbegin = kend + strspn(kend, " \t");