summary refs log tree commit diff
path: root/bin/edi/edi.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-22 22:04:41 -0500
committerJune McEnroe <june@causal.agency>2018-11-22 22:04:41 -0500
commit34532a56421ef19a5a5bc5c93068fb26f4c29187 (patch)
tree2b63a1df063087ffa7fbed09a85e9812f4f6f096 /bin/edi/edi.c
parentSimplify edi file reading (diff)
downloadsrc-34532a56421ef19a5a5bc5c93068fb26f4c29187.tar.gz
src-34532a56421ef19a5a5bc5c93068fb26f4c29187.zip
Add fileWrite for edi
Diffstat (limited to '')
-rw-r--r--bin/edi/edi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/edi/edi.c b/bin/edi/edi.c
index 96f9b292..e8024073 100644
--- a/bin/edi/edi.c
+++ b/bin/edi/edi.c
@@ -29,10 +29,12 @@ int main(int argc, char *argv[]) {
 	struct File file = fileAlloc(strdup(argv[1]));
 	fileRead(&file);
 
-	const struct Table *table = &file.log.states[file.log.state].table;
+	const struct Table *table = logTable(&file.log);
 	for (struct Iter it = iter(table, 0); it.ch != WEOF; it = iterNext(it)) {
 		printf("%lc", it.ch);
 	}
 
+	fileWrite(&file);
+
 	fileFree(&file);
 }