aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 21:14:34 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 21:14:34 +0100
commit20b1ec5f84f0292845fb8b276300057a4646f17d (patch)
tree5f9099ebecd1b6c1f19efe552fd5f61525a4d37f /main.c
parentStrbuf remove init_1, add strbuf_load. (diff)
downloadcalp-20b1ec5f84f0292845fb8b276300057a4646f17d.tar.gz
calp-20b1ec5f84f0292845fb8b276300057a4646f17d.tar.xz
Made filename attribute of all objects.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
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);
}