Make the barconfig list a TAILQ

This commit is contained in:
Michael Stapelberg 2011-10-18 22:11:27 +01:00
parent 24ede1c834
commit c2c6ca25d5
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ typedef struct Barconfig Barconfig;
extern char *current_configpath;
extern Config config;
extern SLIST_HEAD(modes_head, Mode) modes;
extern SLIST_HEAD(barconfig_head, Barconfig) barconfigs;
extern TAILQ_HEAD(barconfig_head, Barconfig) barconfigs;
/**
* Used during the config file lexing/parsing to keep the state of the lexer
@ -235,7 +235,7 @@ struct Barconfig {
char *urgent_workspace_bg;
} colors;
SLIST_ENTRY(Barconfig) configs;
TAILQ_ENTRY(Barconfig) configs;
};
/**

View File

@ -21,7 +21,7 @@
char *current_configpath = NULL;
Config config;
struct modes_head modes;
struct barconfig_head barconfigs;
struct barconfig_head barconfigs = TAILQ_HEAD_INITIALIZER(barconfigs);
/**
* Ungrabs all keys, to be called before re-grabbing the keys because of a

View File

@ -487,7 +487,7 @@ IPC_HANDLER(get_bar_config) {
strncpy(bar_id, (const char*)message, message_size);
LOG("IPC: looking for config for bar ID \"%s\"\n", bar_id);
Barconfig *current, *config = NULL;
SLIST_FOREACH(current, &barconfigs, configs) {
TAILQ_FOREACH(current, &barconfigs, configs) {
if (strcmp(current->id, bar_id) != 0)
continue;