Last change
on this file since 28 was
17,
checked in by Sam Hocevar, 18 years ago
|
- absolute shitloads of 64 bit fixes.
|
File size:
740 bytes
|
Line | |
---|
1 | #ifndef MACS__ |
---|
2 | #define MACS__ |
---|
3 | #include "system.h" |
---|
4 | #include <stdio.h> |
---|
5 | #define ERROR(x,st) { if (!(x)) \ |
---|
6 | { printf("Error on line %d of %s : %s\n", \ |
---|
7 | __LINE__,__FILE__,st); exit(1); } } |
---|
8 | |
---|
9 | // These macros should be removed for the non-debugging version |
---|
10 | #ifdef NO_CHECK |
---|
11 | #define CONDITION(x,st) |
---|
12 | #define CHECK(x) |
---|
13 | #else |
---|
14 | #define CONDITION(x,st) ERROR(x,st) |
---|
15 | #define CHECK(x) CONDITION(x,"Check stop"); |
---|
16 | #endif |
---|
17 | |
---|
18 | |
---|
19 | #ifndef min |
---|
20 | #define min(x,y) (x<y ? x:y) |
---|
21 | #endif |
---|
22 | #ifndef max |
---|
23 | #define max(x,y) (x>y ? x:y) |
---|
24 | #endif |
---|
25 | |
---|
26 | //#define uchar unsigned char |
---|
27 | //#define schar signed char |
---|
28 | //#define ushort unsigned short |
---|
29 | //typedef unsigned short int ushort; |
---|
30 | //#define sshort signed short |
---|
31 | //#define ulong unsigned long |
---|
32 | //typedef unsigned long int ulong; |
---|
33 | |
---|
34 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.