JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
* rocks.c (init_buckets): oops, we weren't allocating big enough arrays.
[vor.git] / common.h
1 #ifndef VOR_COMMON_H
2 #define VOR_COMMON_H
3
4 #ifndef NULL
5 #define NULL 0
6 #endif
7
8 #ifndef true
9 #define true 1
10 #endif
11
12 #ifndef false
13 #define false 0
14 #endif
15
16 #ifndef max
17 #define max(a, b) ((a) > (b) ? (a) : (b))
18 #endif
19
20 #ifndef min
21 #define min(a, b) ((a) < (b) ? (a) : (b))
22 #endif
23
24 #ifndef abs
25 #define abs(a) ((a)<=0 ? -(a) : (a))
26 #endif
27
28 #define CONDERROR(a) if((a)) {initerror = strdup(SDL_GetError());return 1;}
29 #define NULLERROR(a) CONDERROR((a) == NULL)
30
31 #endif // VOR_COMMON_H