diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 23:17:08 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 23:17:08 +0100 |
commit | a514490dcbb4aaaca3a5e4fc71ef194fea18b37f (patch) | |
tree | 16b8c4923fafbbe9e6e43e88beff08eb3f0674ae /linked_list.h | |
parent | Add support for NL without preceeding CR. (diff) | |
download | calp-a514490dcbb4aaaca3a5e4fc71ef194fea18b37f.tar.gz calp-a514490dcbb4aaaca3a5e4fc71ef194fea18b37f.tar.xz |
Add llist FIRST & LAST, rewrote code to use them.
Diffstat (limited to '')
-rw-r--r-- | linked_list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linked_list.h b/linked_list.h index 5bf3db15..515fa4af 100644 --- a/linked_list.h +++ b/linked_list.h @@ -22,6 +22,9 @@ typedef struct { int length; } LLIST(TYPE); +#define FIRST(lst) (lst)->head->after +#define LAST(lst) (lst)->tail->before + INIT_F ( LLIST(TYPE) ); FREE_F ( LLIST(TYPE) ); |