diff options
Diffstat (limited to 'include/utility.h')
-rw-r--r-- | include/utility.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/utility.h b/include/utility.h index 2e4330d..f51a646 100644 --- a/include/utility.h +++ b/include/utility.h @@ -33,6 +33,7 @@ /* Functions: */ /* ctl_malloc like malloc(), but will exit on error */ /* ctl_realloc like realloc(), but will exit on erro */ +/* ctl_free like free(), but will return NULL */ /* ctl_die print some message and exit() */ /* ctl_swap swap two elements with given type */ /* */ @@ -43,11 +44,11 @@ typedef enum{ } ErrorType; // int -typedef *int pint; +typedef int* pint; typedef unsigned int uint; typedef uint* puint; typedef const int cint; -typedef *cint pcint; +typedef cint* pcint; typedef const uint cuint; typedef cuint* pcuint; #define Int(X) (( int)(X)) @@ -98,7 +99,8 @@ typedef pcuchar* ppcuchar; #define ppcuChar(X) ((ppcuchar)(X)) pvoid ctl_malloc (size_t size); -pvoid ctl_realloc(pvoid *ptr, size_t size); +pvoid ctl_realloc(pvoid ptr, size_t size); +pvoid ctl_free (pvoid ptr); void ctl_die (ErrorType e); #define ctl_swap(X,Y,Z) do{X zzzztmp=(Y);(Y)=(Z);(Z)=zzzztmp;}while(0) |