diff options
author | David Härdeman <david@hardeman.nu> | 2015-07-18 19:43:49 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2015-07-18 19:43:49 +0200 |
commit | 05c204e675e8f6f497496170b8e69e37ed208450 (patch) | |
tree | 5113537fc64eec34f9d7d36488f6639e38d6e085 /utils.h | |
parent | 17d201747727157b63aaaa956071f10e35ad9942 (diff) |
Save updated keymap in memory
Still need to write it out to disk as well...
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -30,6 +30,15 @@ static inline void list_add(struct list_head *new, struct list_head *list) list->next = new; } +static inline void list_replace(struct list_head *old, struct list_head *new) +{ + old->prev->next = new; + old->next->prev = new; + new->next = old->next; + new->prev = old->prev; + old->next = old->prev = NULL; +} + static inline bool list_empty(struct list_head *list) { return list->next == list; |