source: abuse/branches/pd/imlib/include/macs.hpp @ 608

Last change on this file since 608 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
File size: 658 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#define sshort signed short
30#define ulong  unsigned long
31
32#endif
Note: See TracBrowser for help on using the repository browser.