Implement variables in configfile.

This implements ticket #42.

Syntax is "set $key value". All further instances of $key will be
replaced with value before parsing each line of the configfile.
This commit is contained in:
Michael Stapelberg
2009-06-01 16:19:06 +02:00
parent 170ba60191
commit e689be983b
2 changed files with 63 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#ifndef _CONFIG_H
#define _CONFIG_H
#include "queue.h"
typedef struct Config Config;
extern Config config;
@ -24,6 +26,13 @@ struct Colortriple {
uint32_t text;
};
struct Variable {
char *key;
char *value;
SLIST_ENTRY(Variable) variables;
};
struct Config {
const char *terminal;
const char *font;