Make the barconfig list a TAILQ
This commit is contained in:
parent
24ede1c834
commit
c2c6ca25d5
|
@ -26,7 +26,7 @@ typedef struct Barconfig Barconfig;
|
||||||
extern char *current_configpath;
|
extern char *current_configpath;
|
||||||
extern Config config;
|
extern Config config;
|
||||||
extern SLIST_HEAD(modes_head, Mode) modes;
|
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
|
* Used during the config file lexing/parsing to keep the state of the lexer
|
||||||
|
@ -235,7 +235,7 @@ struct Barconfig {
|
||||||
char *urgent_workspace_bg;
|
char *urgent_workspace_bg;
|
||||||
} colors;
|
} colors;
|
||||||
|
|
||||||
SLIST_ENTRY(Barconfig) configs;
|
TAILQ_ENTRY(Barconfig) configs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
char *current_configpath = NULL;
|
char *current_configpath = NULL;
|
||||||
Config config;
|
Config config;
|
||||||
struct modes_head modes;
|
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
|
* Ungrabs all keys, to be called before re-grabbing the keys because of a
|
||||||
|
|
|
@ -487,7 +487,7 @@ IPC_HANDLER(get_bar_config) {
|
||||||
strncpy(bar_id, (const char*)message, message_size);
|
strncpy(bar_id, (const char*)message, message_size);
|
||||||
LOG("IPC: looking for config for bar ID \"%s\"\n", bar_id);
|
LOG("IPC: looking for config for bar ID \"%s\"\n", bar_id);
|
||||||
Barconfig *current, *config = NULL;
|
Barconfig *current, *config = NULL;
|
||||||
SLIST_FOREACH(current, &barconfigs, configs) {
|
TAILQ_FOREACH(current, &barconfigs, configs) {
|
||||||
if (strcmp(current->id, bar_id) != 0)
|
if (strcmp(current->id, bar_id) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue