File: macs.hpp

package info (click to toggle)
abuse 2.00-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 12,708 kB
  • ctags: 15,389
  • sloc: ansic: 115,852; cpp: 6,792; lisp: 2,066; sh: 1,734; makefile: 1,601; asm: 264
file content (32 lines) | stat: -rw-r--r-- 667 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
#ifndef MACS__
#define MACS__
#include "system.h"
#include <stdio.h>
#define ERROR(x,st) { if (!(x)) \
   { printf("Error on line %d of %s : %s\n", \
     __LINE__,__FILE__,st); exit(1); } }

// These macros should be removed for the non-debugging version
#ifdef NO_CHECK
#define CONDITION(x,st) 
#define CHECK(x) 
#else
#define CONDITION(x,st) ERROR(x,st)
#define CHECK(x) CONDITION(x,"Check stop");
#endif


#ifndef min
#define min(x,y) (x<y ? x:y)
#endif
#ifndef max
#define max(x,y) (x>y ? x:y)
#endif

#define uchar  unsigned char
#define schar  signed char
typedef unsigned short int ushort;
#define sshort signed short
typedef unsigned long int ulong;

#endif