diff options
Diffstat (limited to 'backends/PalmOS/Src/missing/stdlib.h')
-rw-r--r-- | backends/PalmOS/Src/missing/stdlib.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/backends/PalmOS/Src/missing/stdlib.h b/backends/PalmOS/Src/missing/stdlib.h index 544ee04bf9..3ace362a07 100644 --- a/backends/PalmOS/Src/missing/stdlib.h +++ b/backends/PalmOS/Src/missing/stdlib.h @@ -24,31 +24,19 @@ #define STDLIB_H #include <PalmOS.h> +#include "MemGlue.h" #include "mathlib.h" -//#define memNewChunkFlagNonMovable 0x0200 -#define memNewChunkFlagAllowLarge 0x1000 // this is not in the sdk *g* -#define memHeapFlagReadOnly 0x0001 - -#define NO_HEAP_FOUND -1 - -SysAppInfoPtr SysGetAppInfo(SysAppInfoPtr *uiAppPP, SysAppInfoPtr *actionCodeAppPP) - SYS_TRAP(sysTrapSysGetAppInfo); - - #define atoi StrAToI #define atol StrAToI #define abs(a) ((a) < 0 ? -(a) : (a)) //#define abs fabs -#define malloc(a) calloc(a,1) +#define malloc(a) MemGluePtrNew(a) //#define free MemPtrFree #define strtol(a,b,c) StrAToI(a) -#define qsort(a,b,c,d) +#define qsort(a,b,c,d) SysQSort((a), (b), (c), (CmpFuncPtr)(&d), 0); #define rand() SysRandom(0) -void MemExtInit(); -void MemExtCleanup(); - MemPtr realloc(MemPtr oldP, UInt32 size); MemPtr calloc(UInt32 nelem, UInt32 elsize); Err free(MemPtr memP); |