blob: ffe9073582c6db80033f0b20d18010b56ba7776a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef _STDLIB_H_
#define _STDLIB_H_
#include <stddef.h>
#include <stdio.h>
/* this is by no means standards-compliant... but who cares? :P */
/* NOT reentrant! */
char* itoa(int val, int base);
#define RAND_MAX ((1U << 31) - 1)
#define MIN(x,y) ((x<y)?x:y)
#define MAX(x,y) ((x>y)?x:y)
unsigned int rand(void);
void srand(unsigned int);
int abs(int);
void *malloc(size_t);
int snprintf(char*, int, const char*, ...);
void assert_fail(const char*, const char*, int);
#define assert(x) if(!(x))assert_fail(__func__, __FILE__, __LINE__);
#endif
|