From 7b22939c20afa4f4a08c13a25d71f2720f0b6a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 3 Feb 2019 21:35:13 +0100 Subject: Loads of memmory fixes, among other. --- vcal.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vcal.h') diff --git a/vcal.h b/vcal.h index 32564cb2..350871b7 100644 --- a/vcal.h +++ b/vcal.h @@ -14,8 +14,8 @@ typedef struct { typedef struct { strbuf key; - strbuf val; + strbuf val; strbuf* aux_values; int value_count; @@ -33,10 +33,11 @@ int CONSTRUCTOR_DECL(content_line, int keylen, int vallen); typedef struct s_vevent { char* filename; + struct s_vcalendar* calendar; TRIE(content_line) clines; } vevent; -int CONSTRUCTOR_DECL(vevent); +int CONSTRUCTOR_DECL(vevent, char* filename); int FREE_DECL(content_line); int content_line_copy (content_line* dest, content_line* src); @@ -47,7 +48,7 @@ int add_content_line (vevent* ev, content_line* c); int free_vevent(vevent* ev); -typedef struct { +typedef struct s_vcalendar { size_t n_events; size_t alloc; vevent** events; @@ -62,4 +63,7 @@ int free_vcalendar (vcalendar* cal); */ int push_event(vcalendar* cal, vevent* ev); +extern content_line** clines; +extern int cline_ptr; + #endif /* VCAL_H */ -- cgit v1.2.3