summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 6 insertions, 5 deletions
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 <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);