OLD | NEW |
| (Empty) |
1 /* 7zTypes.h */ | |
2 | |
3 #ifndef __C_TYPES_H | |
4 #define __C_TYPES_H | |
5 | |
6 #ifndef _7ZIP_BYTE_DEFINED | |
7 #define _7ZIP_BYTE_DEFINED | |
8 typedef unsigned char Byte; | |
9 #endif | |
10 | |
11 #ifndef _7ZIP_UINT16_DEFINED | |
12 #define _7ZIP_UINT16_DEFINED | |
13 typedef unsigned short UInt16; | |
14 #endif | |
15 | |
16 #ifndef _7ZIP_UINT32_DEFINED | |
17 #define _7ZIP_UINT32_DEFINED | |
18 #ifdef _LZMA_UINT32_IS_ULONG | |
19 typedef unsigned long UInt32; | |
20 #else | |
21 typedef unsigned int UInt32; | |
22 #endif | |
23 #endif | |
24 | |
25 #ifndef _7ZIP_INT32_DEFINED | |
26 #define _7ZIP_INT32_DEFINED | |
27 #ifdef _LZMA_INT32_IS_ULONG | |
28 typedef long Int32; | |
29 #else | |
30 typedef int Int32; | |
31 #endif | |
32 #endif | |
33 | |
34 /* #define _SZ_NO_INT_64 */ | |
35 /* define it your compiler doesn't support long long int */ | |
36 | |
37 #ifndef _7ZIP_UINT64_DEFINED | |
38 #define _7ZIP_UINT64_DEFINED | |
39 #ifdef _SZ_NO_INT_64 | |
40 typedef unsigned long UInt64; | |
41 #else | |
42 #if defined(_MSC_VER) || defined(__BORLANDC__) | |
43 typedef unsigned __int64 UInt64; | |
44 #else | |
45 typedef unsigned long long int UInt64; | |
46 #endif | |
47 #endif | |
48 #endif | |
49 | |
50 | |
51 /* #define _SZ_FILE_SIZE_32 */ | |
52 /* You can define _SZ_FILE_SIZE_32, if you don't need support for files larger t
han 4 GB*/ | |
53 | |
54 #ifndef CFileSize | |
55 #ifdef _SZ_FILE_SIZE_32 | |
56 typedef UInt32 CFileSize; | |
57 #else | |
58 typedef UInt64 CFileSize; | |
59 #endif | |
60 #endif | |
61 | |
62 #define SZ_RESULT int | |
63 | |
64 typedef int HRes; | |
65 #define RES_OK (0) | |
66 | |
67 #define SZ_OK (0) | |
68 #define SZE_DATA_ERROR (1) | |
69 #define SZE_CRC_ERROR (3) | |
70 #define SZE_ARCHIVE_ERROR (6) | |
71 | |
72 #define SZE_OUTOFMEMORY (0x8007000EL) | |
73 #define SZE_NOTIMPL (0x80004001L) | |
74 #define SZE_FAIL (0x80004005L) | |
75 #define SZE_INVALIDARG (0x80070057L) | |
76 | |
77 | |
78 #ifndef RINOK | |
79 #define RINOK(x) { HRes __result_ = (x); if(__result_ != 0) return __result_; } | |
80 #endif | |
81 | |
82 typedef int Bool; | |
83 #define True 1 | |
84 #define False 0 | |
85 | |
86 #ifdef _MSC_VER | |
87 #define StdCall __stdcall | |
88 #else | |
89 #define StdCall | |
90 #endif | |
91 | |
92 #if _MSC_VER >= 1300 | |
93 #define MY_FAST_CALL __declspec(noinline) __fastcall | |
94 #elif defined( _MSC_VER) | |
95 #define MY_FAST_CALL __fastcall | |
96 #else | |
97 #define MY_FAST_CALL | |
98 #endif | |
99 | |
100 #endif | |
OLD | NEW |