diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2019-07-16 13:47:38 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-07-16 13:47:38 +0200 |
commit | 69a1aa93b81415a082dc4b5cecaad3d0dc0a97a6 (patch) | |
tree | 1faf77f269c5c43498b44309140a01de83cb0182 /src/main.c | |
parent | 0a25815768786155371db7154da84d9cdfc43b3f (diff) |
Basics of MAT exporting
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,7 +1,4 @@ -#include <stdlib.h> -#include <inttypes.h> -#include <stdio.h> -#include <errno.h> +#include "common.h" #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -9,6 +6,7 @@ #include <sys/mman.h> #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); |