home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / nyisam / general.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-10  |  907 b   |  48 lines

  1. /*------------------------------------------------------------------------
  2.  File: general.h
  3.  ------------------------------------------------------------------------*/
  4. #ifndef _GENERAL
  5. #define _GENERAL
  6.  
  7. #ifndef ERROR
  8. #define ERROR    -1
  9. #endif
  10.  
  11. #ifndef OK
  12. #define OK        0
  13. #endif
  14.  
  15. #ifndef FALSE
  16. #define FALSE    0
  17. #endif
  18.  
  19. #ifndef TRUE
  20. #define TRUE    !FALSE
  21. #endif
  22.  
  23. #ifndef min
  24. #define min(x,y)  ((x)>(y)?(y):(x))
  25. #endif
  26.  
  27. #ifndef max
  28. #define max(x,y) ((x)>(y)?(x):(y))
  29. #endif
  30.  
  31. typedef long PARAM;
  32. typedef short SHORT;
  33. typedef unsigned short USHORT;
  34. typedef unsigned long ULONG;
  35. typedef unsigned char UCHAR;
  36.  
  37. #ifndef NULL
  38. #define NULL (void *)0
  39. #endif
  40.  
  41. #define PFROM2SHORT( x, y )  (PARAM)( ( (long)y << 16 ) + x )
  42. #define HIUSHORT( y ) (USHORT)( (y >> 16 ) & 0x0000FFFF )
  43. #define LOUSHORT( x ) (USHORT)( x & 0x0000FFFF )
  44.  
  45. #define ascii(x) (USHORT)( x & 0x00FF );
  46.  
  47. #endif
  48.