From 478eed4ef9ece1b86b2fed7bfe57d62180b12c92 Mon Sep 17 00:00:00 2001 From: thing1 Date: Tue, 2 Jul 2024 11:51:10 +0100 Subject: started type system --- comp/lucas-standen-NEA/code/global/util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'comp/lucas-standen-NEA/code/global/util.h') 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 #include + // 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); -- cgit v1.2.3