diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/guile_interface.scm.c | 6 | ||||
-rw-r--r-- | src/linked_list.h | 1 | ||||
-rw-r--r-- | src/linked_list.inc.h | 3 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/vcal.c | 4 | ||||
-rw-r--r-- | src/vcal.h | 2 |
6 files changed, 11 insertions, 7 deletions
diff --git a/src/guile_interface.scm.c b/src/guile_interface.scm.c index a9485b38..9356533d 100644 --- a/src/guile_interface.scm.c +++ b/src/guile_interface.scm.c @@ -89,14 +89,14 @@ SCM_DEFINE (vcomponent_set_attr_x, "%vcomponent-set-attribute!", 3, 0, 0, * Otherwise we know that it's NULL and safe to write a new * SCM value there. */ - if (c->cur->value->key.scm != NULL) { - scm_gc_unprotect_object(c->cur->value->key.scm); + if (c->cval->key.scm != NULL) { + scm_gc_unprotect_object(c->cval->key.scm); } } free(key); - strbuf* target = &c->cur->value->key; + strbuf* target = &c->cval->key; target->scm = new_value; scm_gc_protect_object(target->scm); diff --git a/src/linked_list.h b/src/linked_list.h index ec1e17e0..0d32b988 100644 --- a/src/linked_list.h +++ b/src/linked_list.h @@ -23,6 +23,7 @@ typedef struct { LINK(TYPE)* head; LINK(TYPE)* tail; LINK(TYPE)* cur; + TYPE* cval; int length; } LLIST(TYPE); 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; } @@ -84,7 +84,7 @@ int main (int argc, char** argv) { printf("%s | %s\n", filename, - get_property(ev, "SUMMARY")->cur->value->key.mem); + get_property(ev, "SUMMARY")->cval->key.mem); } } } else if (strcmp(args.argv[0], "-g") == 0) { @@ -164,8 +164,8 @@ char* vcomponent_get_val (vcomponent* comp, const char* key) { content_line* cl = GET(TRIE(content_line))(&comp->clines, key_cpy); free (key_cpy); - if (cl != NULL && cl->cur->value != NULL) { - return cl->cur->value->key.mem; + if (cl != NULL && cl->cval != NULL) { + return cl->cval->key.mem; } return NULL; @@ -48,7 +48,7 @@ */ /* content_set */ -#define CLINE_CUR(c) ((c)->cur->value) +#define CLINE_CUR(c) ((c)->cval) /* strbuf */ #define CLINE_CUR_VAL(c) (& CLINE_CUR(c)->key) |