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