From c374807e9d73014ce57eacbbaa56e05460288368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 9 Feb 2019 00:19:58 +0100 Subject: Extend parsing to handle tree's of vcomponents. --- linked_list.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'linked_list.h') diff --git a/linked_list.h b/linked_list.h index 5f9e2711..4199ba57 100644 --- a/linked_list.h +++ b/linked_list.h @@ -6,6 +6,8 @@ #define LLIST(T) TEMPL(llist, T) #define LINK(T) TEMPL(llist_link, T) +#define UNLINK(T) TEMPL(unlink, T) + #endif /* LINKED_LIST_H */ #ifdef TYPE @@ -38,7 +40,11 @@ INIT_F ( LINK(TYPE) ); INIT_F ( LINK(TYPE), TYPE* val ); FREE_F ( LINK(TYPE) ); -int PUSH(LLIST(TYPE)) ( LLIST(TYPE)* lst, TYPE* val); +int UNLINK(LINK(TYPE)) ( LINK(TYPE)* ); + +int PUSH(LLIST(TYPE)) ( LLIST(TYPE)*, TYPE* ); +TYPE* PEEK(LLIST(TYPE)) ( LLIST(TYPE)* ); +TYPE* POP(LLIST(TYPE)) ( LLIST(TYPE)* ); int DEEP_COPY(LLIST(TYPE)) ( LLIST(TYPE)* dest, LLIST(TYPE)* src ); -- cgit v1.2.3