diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-09 00:19:58 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-09 00:19:58 +0100 |
commit | c374807e9d73014ce57eacbbaa56e05460288368 (patch) | |
tree | af9974aa6b03c9e25c9e42c108d9f25277665b41 /linked_list.h | |
parent | Fix minor memmory error. (diff) | |
download | calp-c374807e9d73014ce57eacbbaa56e05460288368.tar.gz calp-c374807e9d73014ce57eacbbaa56e05460288368.tar.xz |
Extend parsing to handle tree's of vcomponents.
Diffstat (limited to 'linked_list.h')
-rw-r--r-- | linked_list.h | 8 |
1 files changed, 7 insertions, 1 deletions
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 ); |