diff options
Diffstat (limited to 'util/cbfstool/lzma/C/Common')
-rw-r--r-- | util/cbfstool/lzma/C/Common/Alloc.cpp | 10 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/CRC.cpp | 4 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/CRC.h | 2 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/MyCom.h | 12 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/MyGuidDef.h | 2 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/MyUnknown.h | 6 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/MyWindows.h | 12 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/NewHandler.h | 8 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/StdAfx.h | 2 |
9 files changed, 29 insertions, 29 deletions
diff --git a/util/cbfstool/lzma/C/Common/Alloc.cpp b/util/cbfstool/lzma/C/Common/Alloc.cpp index 6220a84f23..bdba16d1d1 100644 --- a/util/cbfstool/lzma/C/Common/Alloc.cpp +++ b/util/cbfstool/lzma/C/Common/Alloc.cpp @@ -35,7 +35,7 @@ void MyFree(void *address) throw() if (address != 0) fprintf(stderr, "\nFree; count = %10d", --g_allocCount); #endif - + ::free(address); } @@ -62,7 +62,7 @@ void MidFree(void *address) throw() ::VirtualFree(address, 0, MEM_RELEASE); } -static SIZE_T g_LargePageSize = +static SIZE_T g_LargePageSize = #ifdef _WIN64 (1 << 21); #else @@ -92,10 +92,10 @@ void *BigAlloc(size_t size) throw() #ifdef _SZ_ALLOC_DEBUG fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); #endif - + if (size >= (1 << 18)) { - void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), + void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), MEM_COMMIT, PAGE_READWRITE); if (res != 0) return res; @@ -109,7 +109,7 @@ void BigFree(void *address) throw() if (address != 0) fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); #endif - + if (address == 0) return; ::VirtualFree(address, 0, MEM_RELEASE); diff --git a/util/cbfstool/lzma/C/Common/CRC.cpp b/util/cbfstool/lzma/C/Common/CRC.cpp index 35e1a18751..de5d561def 100644 --- a/util/cbfstool/lzma/C/Common/CRC.cpp +++ b/util/cbfstool/lzma/C/Common/CRC.cpp @@ -14,9 +14,9 @@ void CCRC::InitTable() { UInt32 r = i; for (int j = 0; j < 8; j++) - if (r & 1) + if (r & 1) r = (r >> 1) ^ kCRCPoly; - else + else r >>= 1; CCRC::Table[i] = r; } diff --git a/util/cbfstool/lzma/C/Common/CRC.h b/util/cbfstool/lzma/C/Common/CRC.h index 6b4f1b796b..f3279a5ef8 100644 --- a/util/cbfstool/lzma/C/Common/CRC.h +++ b/util/cbfstool/lzma/C/Common/CRC.h @@ -20,7 +20,7 @@ public: void UpdateUInt32(UInt32 v); void UpdateUInt64(UInt64 v); void Update(const void *data, size_t size); - UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; } + UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; } static UInt32 CalculateDigest(const void *data, size_t size) { CCRC crc; diff --git a/util/cbfstool/lzma/C/Common/MyCom.h b/util/cbfstool/lzma/C/Common/MyCom.h index e903493013..b8dbf38999 100644 --- a/util/cbfstool/lzma/C/Common/MyCom.h +++ b/util/cbfstool/lzma/C/Common/MyCom.h @@ -26,11 +26,11 @@ public: // T& operator*() const { return *_p; } T** operator&() { return &_p; } T* operator->() const { return _p; } - T* operator=(T* p) - { + T* operator=(T* p) + { if (p != 0) p->AddRef(); - if (_p) + if (_p) _p->Release(); _p = p; return p; @@ -114,8 +114,8 @@ public: unsigned int Length() const { return ::SysStringLen(m_str); } operator BSTR() const { return m_str; } BSTR* operator&() { return &m_str; } - BSTR MyCopy() const - { + BSTR MyCopy() const + { int byteLen = ::SysStringByteLen(m_str); BSTR res = ::SysAllocStringByteLen(NULL, byteLen); memmove(res, m_str, byteLen); @@ -147,7 +147,7 @@ public: }; #define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \ - (REFGUID iid, void **outObject) { + (REFGUID iid, void **outObject) { #define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \ { *outObject = (void *)(i *)this; AddRef(); return S_OK; } diff --git a/util/cbfstool/lzma/C/Common/MyGuidDef.h b/util/cbfstool/lzma/C/Common/MyGuidDef.h index a7f8118ec9..7de64333cb 100644 --- a/util/cbfstool/lzma/C/Common/MyGuidDef.h +++ b/util/cbfstool/lzma/C/Common/MyGuidDef.h @@ -23,7 +23,7 @@ typedef struct { #ifdef __cplusplus inline bool operator==(REFGUID g1, REFGUID g2) -{ +{ for (int i = 0; i < (int)sizeof(g1); i++) if (((const unsigned char *)&g1)[i] != ((const unsigned char *)&g2)[i]) return false; diff --git a/util/cbfstool/lzma/C/Common/MyUnknown.h b/util/cbfstool/lzma/C/Common/MyUnknown.h index d28d854256..052c284f41 100644 --- a/util/cbfstool/lzma/C/Common/MyUnknown.h +++ b/util/cbfstool/lzma/C/Common/MyUnknown.h @@ -9,7 +9,7 @@ #if (_WIN32_WCE > 300) #include <basetyps.h> #else -#define MIDL_INTERFACE(x) struct +#define MIDL_INTERFACE(x) struct #endif #else #include <basetyps.h> @@ -17,8 +17,8 @@ #include <unknwn.h> -#else +#else #include "MyWindows.h" #endif - + #endif diff --git a/util/cbfstool/lzma/C/Common/MyWindows.h b/util/cbfstool/lzma/C/Common/MyWindows.h index 0212fa77a3..e564c024ad 100644 --- a/util/cbfstool/lzma/C/Common/MyWindows.h +++ b/util/cbfstool/lzma/C/Common/MyWindows.h @@ -85,9 +85,9 @@ typedef LONG SCODE; #define E_INVALIDARG ((HRESULT)0x80070057L) #ifdef _MSC_VER -#define STDMETHODCALLTYPE __stdcall +#define STDMETHODCALLTYPE __stdcall #else -#define STDMETHODCALLTYPE +#define STDMETHODCALLTYPE #endif #define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f @@ -97,7 +97,7 @@ typedef LONG SCODE; #define PURE = 0 -#define MIDL_INTERFACE(x) struct +#define MIDL_INTERFACE(x) struct struct IUnknown { @@ -113,7 +113,7 @@ typedef IUnknown *LPUNKNOWN; #define VARIANT_FALSE ((VARIANT_BOOL)0) enum VARENUM -{ +{ VT_EMPTY = 0, VT_NULL = 1, VT_I2 = 2, @@ -153,7 +153,7 @@ typedef struct tagPROPVARIANT PROPVAR_PAD1 wReserved1; PROPVAR_PAD2 wReserved2; PROPVAR_PAD3 wReserved3; - union + union { CHAR cVal; UCHAR bVal; @@ -191,7 +191,7 @@ MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2); #define CP_OEMCP 1 typedef enum tagSTREAM_SEEK -{ +{ STREAM_SEEK_SET = 0, STREAM_SEEK_CUR = 1, STREAM_SEEK_END = 2 diff --git a/util/cbfstool/lzma/C/Common/NewHandler.h b/util/cbfstool/lzma/C/Common/NewHandler.h index 0619fc69e5..215ba05f10 100644 --- a/util/cbfstool/lzma/C/Common/NewHandler.h +++ b/util/cbfstool/lzma/C/Common/NewHandler.h @@ -6,11 +6,11 @@ class CNewException {}; #ifdef _WIN32 -void +void #ifdef _MSC_VER -__cdecl +__cdecl #endif operator delete(void *p) throw(); -#endif +#endif -#endif +#endif diff --git a/util/cbfstool/lzma/C/Common/StdAfx.h b/util/cbfstool/lzma/C/Common/StdAfx.h index 681ee9356e..b8ba1d5c4c 100644 --- a/util/cbfstool/lzma/C/Common/StdAfx.h +++ b/util/cbfstool/lzma/C/Common/StdAfx.h @@ -6,4 +6,4 @@ // #include "MyWindows.h" #include "NewHandler.h" -#endif +#endif |