diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2021-11-22 14:40:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-22 14:40:59 +0800 |
| commit | 45123e1b968d1883fed9b8526157ce2c4bffc4a7 (patch) | |
| tree | d20c80fbd4f5a5d1d3972669625972cea6b3684d /libpsn00b/include/stdlib.h | |
| parent | 538f28cfbbbb8163ab8a96de77d6887123856c81 (diff) | |
| parent | 9b00e5f7ff163a8fc6f341dbf237d90c61dadddc (diff) | |
| download | psn00bsdk-45123e1b968d1883fed9b8526157ce2c4bffc4a7.tar.gz | |
Merge pull request #43 from spicyjpeg/cmake
Even more CMake fixes, submodules, pads example
Diffstat (limited to 'libpsn00b/include/stdlib.h')
| -rw-r--r-- | libpsn00b/include/stdlib.h | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/libpsn00b/include/stdlib.h b/libpsn00b/include/stdlib.h index 474eba6..de3ab47 100644 --- a/libpsn00b/include/stdlib.h +++ b/libpsn00b/include/stdlib.h @@ -19,34 +19,16 @@ extern long atol(char *s); extern char atob(char *s); // Is this right? */ -// Random number functions (not yet implemented) - -/* -int rand(); -void srand(unsigned int seed); -*/ - // Quick sort (not yet implemented) //void qsort(void *base , int nel , int width , int (*cmp)(const void *,const void *)); -// Memory allocation functions (not yet implemented, avoid using BIOS as they are reportedly buggy) - -/* -#warning "malloc() family of functions NEEDS MORE TESTING" - -void *malloc(int size); -void free(void *buf); -void *calloc(int number, int size); -void *realloc(void *buf , int n); -*/ - #ifdef __cplusplus extern "C" { #endif extern int __argc; -extern char __argv[]; +extern const char **__argv; int rand(); void srand(unsigned long seed); @@ -64,6 +46,14 @@ long atol(const char *s); double strtod(const char *nptr, char **endptr); float strtof(const char *nptr, char **endptr); +// Memory allocation functions +unsigned int *GetBSSend(); +void InitHeap(unsigned int *addr, int size); +int SetHeapSize(int size); +void *malloc(int size); +void *calloc(int number, int size); +void free(void *ptr); + #ifdef __cplusplus } #endif |
