summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0978f89..c1c3371 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,6 +4,9 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/stat.h>
#include "main.h"
#include "tux.h"
@@ -170,6 +173,15 @@ char *getString(int n)
return strdup(str);
}
+void accessExistFile(const char *s)
+{
+ if( access(s, F_OK) != 0 )
+ {
+ fprintf(stderr, "File %s not fount !\nProgram shutdown !\n", s);
+ exit(-1);
+ }
+}
+
int main(int argc, char *argv[])
{
srand( (unsigned) time(NULL) );