00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __STDLIB_H__
00017 #define __STDLIB_H__
00018
00019 #include <pspkernel.h>
00020 #include <stddef.h>
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026
00027
00028 #ifndef NULL
00029 #define NULL (void *)0
00030 #endif
00031
00032
00033
00034 #define EXIT_SUCCESS 0
00035 #define EXIT_FAILURE 1
00036
00037
00038
00039 #define MB_CUR_MAX 1
00040
00041
00042 #ifndef __DIV_T_DEFINED
00043 #define __DIV_T_DEFINED
00044 typedef struct {
00045 int quot;
00046 int rem;
00047 } div_t;
00048 #endif // __DIV_T_DEFINED
00049
00050
00051
00052 #ifndef __LDIV_T_DEFINED
00053 #define __LDIV_T_DEFINED
00054 typedef struct {
00055 long quot;
00056 long rem;
00057 } ldiv_t;
00058 #endif // __LDIV_T_DEFINED
00059
00060
00061 #ifndef __STRICT_ANSI__
00062 #ifndef __LLDIV_T_DEFINED
00063 #define __LLDIV_T_DEFINED
00064 typedef struct {
00065 long long quot;
00066 long long rem;
00067 } lldiv_t;
00068 #endif // __LLDIV_T_DEFINED
00069 #endif // __STRICT_ANSI__
00070
00071
00072 #define RAND_MAX 2147483647
00073
00074
00075
00076 void abort(void) __attribute__ ((noreturn));
00077 int abs(int);
00078 int atexit(void (*)(void));
00079 double atof(const char *);
00080 void exit(int);
00081
00082
00083
00084
00085 void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
00086 div_t div(int, int);
00087 char *getenv(const char *);
00088 long labs(long);
00089 ldiv_t ldiv(long, long);
00090 #ifndef __STRICT_ANSI__
00091 long long llabs(long long);
00092 lldiv_t lldiv(long long, long long);
00093 #endif
00094 int rand(void);
00095 int setenv(const char *, const char *, int);
00096 void srand(unsigned int);
00097 double strtod(const char *, char **);
00098 long strtol(const char *, char **, int);
00099 unsigned long strtoul(const char *, char **, int);
00100 static __inline__ int atoi(const char * x) { return strtol(x, NULL, 10); }
00101 static __inline__ long atol(const char * x) { return strtol(x, NULL, 10); }
00102
00103
00104 void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
00105
00106
00107
00108 int mblen(const char *, size_t);
00109 size_t mbstowcs(wchar_t *, const char *, size_t);
00110 int mbtowc(wchar_t *, const char *, size_t);
00111 size_t wcstombs(char *, const wchar_t *, size_t);
00112 int wctomb(char *, wchar_t);
00113
00114
00115 char *_itoa(int, char *, int);
00116 char *_ltoa(long, char *, int);
00117 #ifndef __STRICT_ANSI__
00118 char *_lltoa(long long, char *, int);
00119 #endif
00120
00121
00122 int system (const char * string);
00123
00124 #ifdef __cplusplus
00125 }
00126
00127
00128 #define _CPP_CSTDLIB 1
00129
00130 #endif
00131
00132
00133 #endif // __STDLIB_H__