aboutsummaryrefslogtreecommitdiff
path: root/graphs.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphs.c')
-rw-r--r--graphs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/graphs.c b/graphs.c
new file mode 100644
index 00000000..931b181b
--- /dev/null
+++ b/graphs.c
@@ -0,0 +1,17 @@
+#include "graphs.h"
+
+#include <stdio.h>
+
+int create_graph (vevent* ev, char* filename) {
+ FILE* f = fopen(filename, "w");
+
+ fputs("digraph {\n rankdir=LR;", f);
+ TRIE_DOT(content_line)(&ev->clines, f);
+ fputs("}", f);
+
+ fclose(f);
+
+ printf("Wrote '%s' to '%s'\n", ev->filename, filename);
+
+ return 0;
+}