summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-21 19:23:52 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-21 19:35:35 +0200
commitb56245cf5b52cecb922761cd1dc46489883b5d82 (patch)
treec2c97507a85736c631d3ba4ac95dd91691c0e56e /common.c
parentb3a80630aa87ed6463288a1ae80f3d7b53b97c0a (diff)
downloadxK-b56245cf5b52cecb922761cd1dc46489883b5d82.tar.gz
xK-b56245cf5b52cecb922761cd1dc46489883b5d82.tar.xz
xK-b56245cf5b52cecb922761cd1dc46489883b5d82.zip
degesch: implement /buffer move
Diffstat (limited to 'common.c')
-rw-r--r--common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common.c b/common.c
index fab0205..3d40816 100644
--- a/common.c
+++ b/common.c
@@ -49,6 +49,15 @@
// --- To be moved to liberty --------------------------------------------------
+#define LIST_INSERT_WITH_TAIL(head, tail, link, following) \
+ BLOCK_START \
+ if (following) \
+ LIST_APPEND_WITH_TAIL ((head), (following)->prev, (link)); \
+ else \
+ LIST_APPEND_WITH_TAIL ((head), (tail), (link)); \
+ (link)->next = (following); \
+ BLOCK_END
+
static void
split_str (const char *s, char delimiter, struct str_vector *out)
{