OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / unrar / rartypes.hpp
1 #ifndef _RAR_TYPES_
2 #define _RAR_TYPES_
3
4 typedef unsigned char    byte;   //8 bits
5 typedef unsigned short   ushort; //preferably 16 bits, but can be more
6 typedef unsigned int     uint;   //32 bits or more
7
8 typedef unsigned int     uint32; //32 bits exactly
9 typedef          int     sint32; //signed 32 bits exactly
10 #define PRESENT_INT32
11
12 #if defined(_WIN_32) || defined(__GNUC__) || defined(__sgi) || defined(_AIX) || defined(__sun) || defined(__hpux)
13 typedef wchar_t wchar;
14 #else
15 typedef ushort wchar;
16 #endif
17
18 #define SHORT16(x) (sizeof(ushort)==2 ? (ushort)(x):((x)&0xffff))
19 #define UINT32(x)  (sizeof(uint32)==4 ? (uint32)(x):((x)&0xffffffff))
20
21 #endif