7zTypes.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* 7zTypes.h */
  2. #ifndef __COMMON_TYPES_H
  3. #define __COMMON_TYPES_H
  4. #ifndef UInt32
  5. #ifdef _LZMA_UINT32_IS_ULONG
  6. #define UInt32 unsigned long
  7. #else
  8. #define UInt32 unsigned int
  9. #endif
  10. #endif
  11. #ifndef Byte
  12. #define Byte unsigned char
  13. #endif
  14. #ifndef UInt16
  15. #define UInt16 unsigned short
  16. #endif
  17. /* #define _SZ_NO_INT_64 */
  18. /* define it your compiler doesn't support long long int */
  19. #ifdef _SZ_NO_INT_64
  20. #define UInt64 unsigned long
  21. #else
  22. #ifdef _MSC_VER
  23. #define UInt64 unsigned __int64
  24. #else
  25. #define UInt64 unsigned long long int
  26. #endif
  27. #endif
  28. /* #define _SZ_FILE_SIZE_64 */
  29. /* Use _SZ_FILE_SIZE_64 if you need support for files larger than 4 GB*/
  30. #ifndef CFileSize
  31. #ifdef _SZ_FILE_SIZE_64
  32. #define CFileSize UInt64
  33. #else
  34. #define CFileSize UInt32
  35. #endif
  36. #endif
  37. #define SZ_RESULT int
  38. #define SZ_OK (0)
  39. #define SZE_DATA_ERROR (1)
  40. #define SZE_OUTOFMEMORY (2)
  41. #define SZE_CRC_ERROR (3)
  42. #define SZE_NOTIMPL (4)
  43. #define SZE_FAIL (5)
  44. #define SZE_ARCHIVE_ERROR (6)
  45. #define RINOK(x) { int __result_ = (x); if(__result_ != 0) return __result_; }
  46. #endif