SSBM Decomp
Loading...
Searching...
No Matches
stdlib.h
Go to the documentation of this file.
1#ifndef _STDLIB_H_
2#define _STDLIB_H_
3
4#include <stddef.h>
5#include <strtoul.h> // IWYU pragma: export
6#include <wchar.h>
7
8#define RAND_MAX 32767
9
10void srand(unsigned int seed);
11int rand(void);
12void exit(int status);
13size_t wcstombs(char* dest, const wchar_t* src, size_t max);
14int atoi(const char* str);
15
16typedef int (*_compare_function)(const void*, const void*);
17void qsort(void*, size_t, size_t, _compare_function);
18
19#ifdef __MWERKS__
20#define abs(x) __abs(x)
21#else
22static inline int abs(int x)
23{
24 int mask = x >> 31;
25 return (x + mask) ^ mask;
26}
27#endif
28
29#endif
size_t wcstombs(char *dest, const wchar_t *src, size_t max)
Widechar to multibyte string conversion, doesn't care about proper conversion though?
Definition mbstring.c:5
void exit(int status)
Definition abort_exit.c:20
void srand(unsigned int seed)
Definition rand.c:11
int rand(void)
Definition rand.c:5
#define abs(x)
Definition ftmariospecialhi.c:70
u32 seed
Definition random.c:3
int(* _compare_function)(const void *, const void *)
Definition stdlib.h:16
int atoi(const char *str)
Definition strtoul.c:210
void qsort(void *, size_t, size_t, _compare_function)
int mask
Definition state.c:130