adf_defs.h
上传用户:hy_wanghao
上传日期:2007-01-08
资源大小:279k
文件大小:1k
源码类别:

Shell编程

开发平台:

Visual C++

  1. /*
  2.  *  ADF Library. (C) 1997-1999 Laurent Clevy
  3.  *
  4.  *  adf_defs.h
  5.  *
  6.  * 
  7.  */
  8. #ifndef _ADF_DEFS_H
  9. #define _ADF_DEFS_H 1
  10. #define ADFLIB_VERSION "0.7.9a"
  11. #define ADFLIB_DATE "5 sept., 1999"
  12. #define SECTNUM long
  13. #define RETCODE long
  14. #define TRUE    1
  15. #define FALSE   0
  16. #define ULONG   unsigned long
  17. #define USHORT  unsigned short
  18. #define UCHAR   unsigned char
  19. #define BOOL    int
  20. /* defines max and min */
  21. #ifndef max
  22. #define max(a,b)        (a)>(b) ? (a) : (b)
  23. #endif
  24. #ifndef min
  25. #define min(a,b)        (a)<(b) ? (a) : (b)
  26. #endif
  27. /* (*byte) to (*short) and (*byte) to (*long) conversion */
  28. #define Short(p) ((p)[0]<<8 | (p)[1])
  29. #define Long(p) (Short(p)<<16 | Short(p+2))
  30. /* swap short and swap long macros for little endian machines */
  31. #define swapShort(p) ((p)[0]<<8 | (p)[1])
  32. #define swapLong(p) (swapShort(p)<<16 | swapShort(p+2))
  33. #endif /* _ADF_DEFS_H */
  34. /*##########################################################################*/