stdlib.h
Go to the documentation of this file.00001 #ifndef STDLIB_H
00002 #define STDLIB_H
00003
00004 FILE_LICENCE ( GPL2_OR_LATER );
00005
00006 #include <stdint.h>
00007 #include <assert.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016 extern unsigned long strtoul ( const char *p, char **endp, int base );
00017
00018
00019
00020
00021
00022
00023
00024
00025 extern void * __malloc malloc ( size_t size );
00026 extern void * realloc ( void *old_ptr, size_t new_size );
00027 extern void free ( void *ptr );
00028 extern void * __malloc zalloc ( size_t len );
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 static inline void * __malloc calloc ( size_t nmemb, size_t size ) {
00044 return zalloc ( nmemb * size );
00045 }
00046
00047
00048
00049
00050
00051
00052
00053
00054 extern long int random ( void );
00055 extern void srandom ( unsigned int seed );
00056
00057 static inline int rand ( void ) {
00058 return random();
00059 }
00060
00061 static inline void srand ( unsigned int seed ) {
00062 srandom ( seed );
00063 }
00064
00065
00066
00067
00068
00069
00070
00071
00072 extern int system ( const char *command );
00073 extern __asmcall int main ( void );
00074
00075 #endif