aboutsummaryrefslogtreecommitdiff
path: root/include/globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/globals.h')
-rw-r--r--include/globals.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/globals.h b/include/globals.h
new file mode 100644
index 0000000..8420f76
--- /dev/null
+++ b/include/globals.h
@@ -0,0 +1,20 @@
+#ifndef GLOBALS_H
+#define GLOBALS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAX_LINE_LENGTH 1024
+
+#define Calloc(type, n) (type *)calloc((n), sizeof(type))
+#define Malloc(type, n) (type *)malloc((n)*sizeof(type))
+#define Memset(var, type, n) memset(var, 0, (n)*sizeof(type))
+
+#ifndef MIN_MAX_DEFINE
+#define MIN_MAX_DEFINE
+#define maximum(a, b) (a) > (b) ? (a) : (b)
+#define minimum(a, b) (a) < (b) ? (a) : (b)
+#endif
+
+#endif