7zTypes.h 1.2 KB

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