aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 15:12:56 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 15:12:56 +0100
commit23e4967fd42a6a2bee5c44213be4df61ff546b13 (patch)
tree6347cd19fae83dc6766c587911682b7bffc36d39 /main.c
parentCleanup. (diff)
downloadcalp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.gz
calp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.xz
WIP.
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.c b/main.c
index 3e0d005e..40c0e03f 100644
--- a/main.c
+++ b/main.c
@@ -9,6 +9,11 @@
#include "graphs.h"
#include "err.h"
+#define TYPE content_line
+// #include "hash.inc"
+#include "trie.inc.h"
+#undef TYPE
+
typedef struct {
int argc;
char** argv;
@@ -53,6 +58,15 @@ int main (int argc, char** argv) {
for (size_t j = 0; j < cal->components.length; j++) {
vcomponent* ev = GET(VECT(vcomponent))(&cal->components, j);
+ LLIST(strbuf)* keys = KEYS(TRIE(content_line))(&ev->clines);
+ FOR(LLIST, strbuf, k, keys) {
+ char* mem = k->mem;
+ char buf[10000];
+ buf[0] = '\0';
+ FMT(content_line)(GET(TRIE(content_line))(&ev->clines, mem), buf);
+ printf("%s := %s\n", mem, buf);
+ }
+
if (strcmp(ev->type, "VEVENT") != 0) continue;
printf("%3lu : %3lu | %s | %s\n",