home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------------
- File: general.h
- ------------------------------------------------------------------------*/
- #ifndef _GENERAL
- #define _GENERAL
-
- #ifndef ERROR
- #define ERROR -1
- #endif
-
- #ifndef OK
- #define OK 0
- #endif
-
- #ifndef FALSE
- #define FALSE 0
- #endif
-
- #ifndef TRUE
- #define TRUE !FALSE
- #endif
-
- #ifndef min
- #define min(x,y) ((x)>(y)?(y):(x))
- #endif
-
- #ifndef max
- #define max(x,y) ((x)>(y)?(x):(y))
- #endif
-
- typedef long PARAM;
- typedef short SHORT;
- typedef unsigned short USHORT;
- typedef unsigned long ULONG;
- typedef unsigned char UCHAR;
-
- #ifndef NULL
- #define NULL (void *)0
- #endif
-
- #define PFROM2SHORT( x, y ) (PARAM)( ( (long)y << 16 ) + x )
- #define HIUSHORT( y ) (USHORT)( (y >> 16 ) & 0x0000FFFF )
- #define LOUSHORT( x ) (USHORT)( x & 0x0000FFFF )
-
- #define ascii(x) (USHORT)( x & 0x00FF );
-
- #endif