diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-12-04 13:48:01 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-12-20 15:31:16 +0100 |
| commit | 9fe644f0d99375ffd3011d8828f7dbd0fb103af0 (patch) | |
| tree | 71ed89f1c7316dba818bc921d772aaa1fc957dab /link.h | |
| parent | d68d0f39ab7675745e7d177f6774736f7ec58783 (diff) | |
| download | tmus-9fe644f0d99375ffd3011d8828f7dbd0fb103af0.tar.gz tmus-9fe644f0d99375ffd3011d8828f7dbd0fb103af0.zip | |
Added more gui interaction
Diffstat (limited to 'link.h')
| -rw-r--r-- | link.h | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -8,16 +8,23 @@ (type *)( (char *)__mptr - OFFSET(type, link) ); }) #define LIST_HEAD ((struct link) { .prev = NULL, .next = NULL }) +#define LINK_EMPTY ((struct link) { 0 }) struct link { - struct link *prev, *next; + struct link *prev; + struct link *next; }; -int list_len(struct link *list); -struct link* list_back(struct link *list); +/* list_XXX functions operate on the list head */ -void link_push_back(struct link *list, struct link *link); +int list_len(struct link *head); +int list_ffind(struct link *head, struct link *link); +struct link *link_back(struct link *list); void link_prepend(struct link *list, struct link *link); void link_append(struct link *list, struct link *link); void link_pop(struct link *link); + +struct link *link_iter(struct link *link, int n); + +void link_push_back(struct link *list, struct link *link); |
