From 69a1aa93b81415a082dc4b5cecaad3d0dc0a97a6 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 16 Jul 2019 13:47:38 +0200 Subject: Basics of MAT exporting --- src/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 0242172..dcb5d06 100644 --- a/src/main.c +++ b/src/main.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "common.h" #include #include #include @@ -9,6 +6,7 @@ #include #include "e2e.h" +#include "export.h" int main(int argc, char **argv) { @@ -45,8 +43,11 @@ int main(int argc, char **argv) goto error_mmap; } - if (e2e_read(&data, input, input + st.st_size)) + if (errno = e2e_read(&data, input, input + st.st_size)) perror("e2e_read"); + else if (errno = export(&data, "testing.mat")) + perror("export"); + e2e_destroy(&data); munmap(input, st.st_size); -- cgit