home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / SNIPTYPE.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  938b  |  38 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  SNIPTYPE.H - Include file for SNIPPETS data types and commonly used macros
  5. */
  6.  
  7. #ifndef SNIPTYPE__H
  8. #define SNIPTYPE__H
  9.  
  10. #include <stdlib.h>                             /* For free()           */
  11. #include <string.h>                             /* For NULL & strlen()  */
  12.  
  13. typedef enum {Error_ = -1, Success_, False_ = 0, True_} Boolean_T;
  14.  
  15. #if !defined(WIN32) && !defined(_WIN32) && !defined(__NT__) \
  16.       && !defined(_WINDOWS)
  17.  #if !defined(OS2)
  18.   typedef unsigned char  BYTE;
  19.   typedef unsigned long  DWORD;
  20.  #endif
  21.  typedef unsigned short WORD;
  22. #else
  23.  #define WIN32_LEAN_AND_MEAN
  24.  #define NOGDI
  25.  #define NOSERVICE
  26.  #undef INC_OLE1
  27.  #undef INC_OLE2
  28.  #include <windows.h>
  29.  #define HUGE
  30. #endif
  31.  
  32. #define NUL '\0'
  33. #define LAST_CHAR(s) (((char *)s)[strlen(s) - 1])
  34. #define TOBOOL(x) (!(!(x)))
  35. #define FREE(p) (free(p),(p)=NULL)
  36.  
  37. #endif /* SNIPTYPE__H */
  38.