diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-31 00:11:05 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-31 00:11:05 +0100 |
commit | ae630ed595330f102685bbbb96c01a8c24b8923a (patch) | |
tree | ee1162df4a3c2a181b9d48e5281c7f33e18eaeb5 /src/linked_list.inc.h | |
parent | Cal name now set to basename of path. (diff) | |
download | calp-ae630ed595330f102685bbbb96c01a8c24b8923a.tar.gz calp-ae630ed595330f102685bbbb96c01a8c24b8923a.tar.xz |
Add cval field to LLIST.
Diffstat (limited to '')
-rw-r--r-- | src/linked_list.inc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linked_list.inc.h b/src/linked_list.inc.h index 81974a9c..3984e485 100644 --- a/src/linked_list.inc.h +++ b/src/linked_list.inc.h @@ -11,6 +11,7 @@ INIT_F ( LLIST(TYPE) ) { head->after = tail; tail->before = head; self->cur = head; + self->cval = head->value; return 0; } @@ -69,6 +70,7 @@ int PUSH(LLIST(TYPE)) ( LLIST(TYPE)* lst, TYPE* val) { // TODO do I want to change that? lst->cur = link; + lst->cval = link->value; return 0; } @@ -157,6 +159,7 @@ int RESET(LLIST(TYPE)) ( LLIST(TYPE)* llist ) { } llist->cur = llist->head; + llist->cval = llist->head->value; return 0; } |