summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-02 15:36:18 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-02 15:36:18 -0300
commit038ed342f22a2af01633fe92378a9a3a1cdad9d1 (patch)
tree7cd3b76a57bbbb13e4c5e0196250f8b542cf8a43 /main.c
parent1495140bb229d17f6da7ce868b74abd33a933709 (diff)
downloadeeshow-038ed342f22a2af01633fe92378a9a3a1cdad9d1.tar.gz
eeshow-038ed342f22a2af01633fe92378a9a3a1cdad9d1.tar.bz2
eeshow-038ed342f22a2af01633fe92378a9a3a1cdad9d1.zip
eeshow/: split file_read into open/read/close
This is to allow for a better implementation of "related" in the future.
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index b38761a..8b947de 100644
--- a/main.c
+++ b/main.c
@@ -109,9 +109,13 @@ int main(int argc, char *const *argv)
}
if (cat) {
+ struct file file;
+
if (argc != optind)
usage(*argv);
- file_read(cat, file_cat, NULL);
+ file_open(&file, cat, NULL);
+ file_read(&file, file_cat, NULL);
+ file_close(&file);
return 0;
}