Implement the indicator etc.

This commit is contained in:
2014-09-18 20:59:29 +02:00
parent 0a7ff1d638
commit 64fa986cd0
2 changed files with 113 additions and 13 deletions

18
utils.c
View File

@@ -286,6 +286,24 @@ xstrndup (const char *s, size_t n)
(link)->next->prev = (link)->prev; \
BLOCK_END
#define LIST_APPEND_WITH_TAIL(head, tail, link) \
BLOCK_START \
(link)->prev = (tail); \
(link)->next = NULL; \
if ((link)->prev) \
(link)->prev->next = (link); \
else \
(head) = (link); \
(tail) = (link); \
BLOCK_END
#define LIST_UNLINK_WITH_TAIL(head, tail, link) \
BLOCK_START \
if ((tail) == (link)) \
(tail) = (link)->prev; \
LIST_UNLINK ((head), (link)); \
BLOCK_END
// --- Dynamically allocated string array --------------------------------------
struct str_vector