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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/comp/lucas-standen-NEA/code/global/util.h b/comp/lucas-standen-NEA/code/global/util.h
index 8feed88..b10a1f4 100644
--- a/comp/lucas-standen-NEA/code/global/util.h
+++ b/comp/lucas-standen-NEA/code/global/util.h
@@ -5,9 +5,15 @@
#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
+
+//checking functions, return NULL if the data is not of their type, else return the value.
+I64 *isNum(char *str);
+Float *isFloat(char *str);
+Char *isChar(char *str);