home *** CD-ROM | disk | FTP | other *** search
/ Computer Installation Guide - Dragon Clan Series / CD2.iso / Audio / CDDA2WAV / UTI.H < prev   
Encoding:
C/C++ Source or Header  |  1994-06-14  |  1.2 KB  |  63 lines

  1. /***
  2. *uti.h - C common use utility definitions
  3. *
  4. *Purpose:
  5. *   Defines symbols for PASCAL like boolean expressions and other
  6. *   miscellaneous types including portable data types
  7. *   [ANSI/System V]
  8. *
  9. *******************************************************************************/
  10.  
  11. #ifndef TRUE
  12. #define TRUE 1
  13. #define FALSE 0
  14. #endif
  15.  
  16. #ifndef _UTI_DEFINED
  17. #define or ||
  18. #define and &&
  19. #define not !
  20. typedef int bool;
  21. typedef char* string;
  22. typedef unsigned char byte;
  23.  
  24. #if defined (MSDOS) && !defined (__STDC__)
  25. #define __STDC__
  26. #endif
  27.  
  28. #ifndef VOID
  29.  
  30. #define VOID void
  31.  
  32. #ifdef TURBOC
  33. #define FAR far
  34. #define NEAR near
  35. #define PASCAL pascal
  36. #else
  37. #define FAR _far
  38. #define NEAR _near
  39. #define PASCAL _pascal
  40. #endif
  41.  
  42. typedef int BOOL;
  43. typedef unsigned short WORD;
  44. typedef unsigned long DWORD;
  45. typedef long LONG;
  46. typedef unsigned char BYTE;
  47. typedef char *PSTR;
  48.  
  49. #define LOBYTE(w) ((BYTE)(w))
  50. #define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
  51. #define LOWORD(l) ((WORD)(l))
  52. #define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
  53.  
  54. #endif
  55.  
  56. #define EXPORT _far _pascal _export
  57.  
  58. #define LONGPTR(ptr) (LONG)(BYTE FAR *)(ptr)
  59. #define LONGPROC(proc) (LONG)(VOID FAR *)(proc)
  60.  
  61. #define _UTI_DEFINED
  62. #endif
  63.