From 20b1ec5f84f0292845fb8b276300057a4646f17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 26 Feb 2019 21:14:34 +0100 Subject: Made filename attribute of all objects. --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3e0d005e..6cfeab75 100644 --- a/main.c +++ b/main.c @@ -48,7 +48,8 @@ int main (int argc, char** argv) { vcomponent* cal = GET(VECT(vcomponent))(&root.components, i); assert(strcmp(cal->type, "VCALENDAR") == 0); - char* filename = cal->filename; + char* filename = vcomponent_get_val(cal, "X-HH-FILENAME"); + /* This loop over all VEVENT's in the current VCALENDAR */ for (size_t j = 0; j < cal->components.length; j++) { vcomponent* ev = GET(VECT(vcomponent))(&cal->components, j); @@ -73,7 +74,7 @@ int main (int argc, char** argv) { char target[0xFF]; target[0] = '\0'; strcat(target, "/tmp/dot/"); - strcat(target, ev->filename); + strcat(target, vcomponent_get_val(ev, "X-HH-FILENAME")); strcat(target, ".dot"); // create_graph(ev, target); } -- cgit v1.2.3