summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/code/global/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'comp/lucas-standen-NEA/code/global/util.h')
-rw-r--r--comp/lucas-standen-NEA/code/global/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/comp/lucas-standen-NEA/code/global/util.h b/comp/lucas-standen-NEA/code/global/util.h
new file mode 100644
index 0000000..8feed88
--- /dev/null
+++ b/comp/lucas-standen-NEA/code/global/util.h
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <error.h>
+
+// functions for user
+void Die(); // brings down the program
+void *CheckedMalloc(long size); // malloc checked with autofree
+void *CheckedRealloc(void *out, long size); // realloc checked with autofree
+int CheckedFree(void *ptr); // frees a pointer if it is in the array MEMptrs
+void CheckedFreeALL(); // frees all pointers in the array MEMptrs