summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b5cd16d..a4ed06c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,25 @@
1#include <stdlib.h>
2#include <stdio.h>
3#include <gui/gui.h>
4#include <MLV/MLV_path.h>
5
1int main(int argc, char **argv) { 6int main(int argc, char **argv) {
2 // TODO! 7 if (argc < 3) {
8 fprintf(stderr, "Not enough argument (2 correct pathfiles required)\n");
9 exit(-1);
10 }
11 if (argc > 3) {
12 fprintf(stderr, "Too much arguments (2 correct pathfiles required)\n");
13 exit(-2);
14 }
15 if (!(MLV_path_is_a_file(argv[1])) || !(MLV_path_is_a_file(argv[2]))) {
16 fprintf(stderr, "One path is incorrect\n");
17 exit(-3);
18 };
19 GUI *gui = gui_init(argv[1], argv[2]);
20 while (mode != EXITING) {
21 gui_handle_event(gui);
22 }
23 gui_free(gui);
3 return 0; 24 return 0;
4} 25}