Rev 7184 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7184 | Rev 7520 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | extern int atoib(char *s,int b); |
17 | extern int atoib(char *s,int b); |
18 | extern int atoi(char *s); |
18 | extern int atoi(char *s); |
19 | extern char *itoab(unsigned int n,char* s,int b); |
19 | extern char *itoab(unsigned int n,char* s,int b); |
20 | extern char *__itoa(int n,char* s); |
20 | extern char *__itoa(int n,char* s); |
Line -... | Line 21... | ||
- | 21 | ||
21 | 22 | // function using KOS syscalls |
|
22 | extern void* stdcall malloc(dword size); |
23 | extern void* stdcall sysmalloc(dword size); |
23 | extern void stdcall free(void *pointer); |
24 | extern void stdcall sysfree(void *pointer); |
- | 25 | extern void* stdcall sysrealloc(void* pointer,dword size); |
|
- | 26 | extern void* syscalloc (size_t num, size_t size); |
|
- | 27 | ||
- | 28 | // suballocator functions |
|
- | 29 | extern void* wtmalloc(size_t size); |
|
- | 30 | extern void wtfree(void *pointer); |
|
- | 31 | extern void* wtrealloc(void* pointer, size_t size); |
|
- | 32 | extern void* wtcalloc (size_t num, size_t size); |
|
- | 33 | extern int wtmalloc_freelist_check(); |
|
- | 34 | extern int wtmalloc_poiner_check(void *ptr); |
|
- | 35 | ||
- | 36 | #ifdef USESYSALLOC |
|
- | 37 | #define malloc(x) sysmalloc(x) |
|
- | 38 | #define free(x) sysfree(x) |
|
- | 39 | #define realloc(x,y) sysrealloc(x,y) |
|
- | 40 | #define calloc(x,y) syscalloc(x,y) |
|
- | 41 | #else |
|
- | 42 | #define malloc(x) wtmalloc(x) |
|
- | 43 | #define free(x) wtfree(x) |
|
- | 44 | #define realloc(x,y) wtrealloc(x,y) |
|
- | 45 | #define calloc(x,y) wtcalloc(x,y) |
|
- | 46 | #endif |
|
Line 24... | Line 47... | ||
24 | extern void* stdcall realloc(void* pointer,dword size); |
47 | |
25 | 48 | ||
Line 26... | Line 49... | ||
26 | extern int rand (void); |
49 | extern int rand (void); |
27 | extern void srand (unsigned int seed); |
50 | extern void srand (unsigned int seed); |
28 | 51 | ||
29 | double strtod (const char* str, char** endptr); |
52 | double strtod (const char* str, char** endptr); |
30 | long double strtold (const char* str, char** endptr); |
53 | long double strtold (const char* str, char** endptr); |
Line 31... | Line -... | ||
31 | float strtof (const char* str, char** endptr); |
- | |
Line 32... | Line 54... | ||
32 | long int strtol (const char* str, char** endptr, int base); |
54 | float strtof (const char* str, char** endptr); |
33 | #define strtoul(s, ep, b) ((unsigned long int)strtol(s, ep, b)) |
55 | long int strtol (const char* str, char** endptr, int base); |
Line 34... | Line 56... | ||
34 | 56 | #define strtoul(s, ep, b) ((unsigned long int)strtol(s, ep, b)) |