| diff --git a/third_party/unrar/src/arccmt.cpp b/third_party/unrar/src/arccmt.cpp |
| index 11ca76cc0d9e..487e2fc5068a 100644 |
| --- a/third_party/unrar/src/arccmt.cpp |
| +++ b/third_party/unrar/src/arccmt.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| bool Archive::GetComment(Array<wchar> *CmtData) |
| { |
| if (!MainComment) |
| @@ -170,4 +168,4 @@ void Archive::ViewComment() |
| } |
| } |
| |
| -} // namespace third_party_unrar |
| + |
| diff --git a/third_party/unrar/src/archive.cpp b/third_party/unrar/src/archive.cpp |
| index af16f1983293..bb71254d5ff3 100644 |
| --- a/third_party/unrar/src/archive.cpp |
| +++ b/third_party/unrar/src/archive.cpp |
| @@ -2,7 +2,6 @@ |
| |
| #include "arccmt.cpp" |
| |
| -namespace third_party_unrar { |
| |
| Archive::Archive(RAROptions *InitCmd) |
| { |
| @@ -347,5 +346,3 @@ FileHandle Archive::GetTempFileHandle() { |
| return hTempFile; |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/archive.hpp b/third_party/unrar/src/archive.hpp |
| index c2dec52041a9..2084122f39b6 100644 |
| --- a/third_party/unrar/src/archive.hpp |
| +++ b/third_party/unrar/src/archive.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_ARCHIVE_ |
| #define _RAR_ARCHIVE_ |
| |
| -namespace third_party_unrar { |
| - |
| class PPack; |
| class RawRead; |
| class RawWrite; |
| @@ -160,6 +158,5 @@ class Archive:public File |
| wchar FirstVolumeName[NM]; |
| }; |
| |
| -} // namespace third_party_unrar |
| |
| #endif |
| diff --git a/third_party/unrar/src/arcmem.cpp b/third_party/unrar/src/arcmem.cpp |
| index 37ea5155a62a..e916ec3112b4 100644 |
| --- a/third_party/unrar/src/arcmem.cpp |
| +++ b/third_party/unrar/src/arcmem.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| ArcMemory::ArcMemory() |
| { |
| Loaded=false; |
| @@ -67,5 +65,3 @@ bool ArcMemory::Tell(int64 *Pos) |
| *Pos=SeekPos; |
| return true; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/arcmem.hpp b/third_party/unrar/src/arcmem.hpp |
| index b4614d4c3ec7..6fbe7c38dd2f 100644 |
| --- a/third_party/unrar/src/arcmem.hpp |
| +++ b/third_party/unrar/src/arcmem.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_ARCMEM_ |
| #define _RAR_ARCMEM_ |
| |
| -namespace third_party_unrar { |
| - |
| // Memory interface for software fuzzers. |
| |
| class ArcMemory |
| @@ -21,6 +19,4 @@ class ArcMemory |
| bool Tell(int64 *Pos); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/arcread.cpp b/third_party/unrar/src/arcread.cpp |
| index 83cac34699b7..7eec01d7eb0f 100644 |
| --- a/third_party/unrar/src/arcread.cpp |
| +++ b/third_party/unrar/src/arcread.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| size_t Archive::ReadHeader() |
| { |
| // Once we failed to decrypt an encrypted block, there is no reason to |
| @@ -1484,5 +1482,3 @@ bool Archive::ReadSubData(Array<byte> *UnpData,File *DestFile) |
| } |
| return true; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/array.hpp b/third_party/unrar/src/array.hpp |
| index a5fbeec912e1..20d258d5b8cf 100644 |
| --- a/third_party/unrar/src/array.hpp |
| +++ b/third_party/unrar/src/array.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_ARRAY_ |
| #define _RAR_ARRAY_ |
| |
| -namespace third_party_unrar { |
| - |
| extern ErrorHandler ErrHandler; |
| |
| template <class T> class Array |
| @@ -190,6 +188,4 @@ template <class T> void Array<T>::Append(T *Items,size_t Count) |
| memcpy(Buffer+CurSize,Items,Count*sizeof(T)); |
| } |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/blake2s.cpp b/third_party/unrar/src/blake2s.cpp |
| index 802dae42f5f2..317603dac411 100644 |
| --- a/third_party/unrar/src/blake2s.cpp |
| +++ b/third_party/unrar/src/blake2s.cpp |
| @@ -6,18 +6,12 @@ |
| #include "blake2s_sse.cpp" |
| #endif |
| |
| -namespace third_party_unrar { |
| - |
| static void blake2s_init_param( blake2s_state *S, uint32 node_offset, uint32 node_depth); |
| static void blake2s_update( blake2s_state *S, const byte *in, size_t inlen ); |
| static void blake2s_final( blake2s_state *S, byte *digest ); |
| |
| -} |
| - |
| #include "blake2sp.cpp" |
| |
| -namespace third_party_unrar { |
| - |
| static const uint32 blake2s_IV[8] = |
| { |
| 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, |
| @@ -187,4 +181,3 @@ void blake2s_final( blake2s_state *S, byte *digest ) |
| RawPut4( S->h[i], digest + 4 * i ); |
| } |
| |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/blake2s.hpp b/third_party/unrar/src/blake2s.hpp |
| index 4a2e518081c1..7dd71571332c 100644 |
| --- a/third_party/unrar/src/blake2s.hpp |
| +++ b/third_party/unrar/src/blake2s.hpp |
| @@ -2,8 +2,6 @@ |
| #ifndef _RAR_BLAKE2_ |
| #define _RAR_BLAKE2_ |
| |
| -namespace third_party_unrar { |
| - |
| #define BLAKE2_DIGEST_SIZE 32 |
| |
| enum blake2s_constant |
| @@ -99,7 +97,5 @@ void blake2sp_init( blake2sp_state *S ); |
| void blake2sp_update( blake2sp_state *S, const byte *in, size_t inlen ); |
| void blake2sp_final( blake2sp_state *S, byte *digest ); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| |
| diff --git a/third_party/unrar/src/blake2s_sse.cpp b/third_party/unrar/src/blake2s_sse.cpp |
| index 0fa092f413ff..1a02f21066af 100644 |
| --- a/third_party/unrar/src/blake2s_sse.cpp |
| +++ b/third_party/unrar/src/blake2s_sse.cpp |
| @@ -1,7 +1,5 @@ |
| // Based on public domain code written in 2012 by Samuel Neves |
| |
| -namespace third_party_unrar { |
| - |
| extern const byte blake2s_sigma[10][16]; |
| |
| // Initialization vector. |
| @@ -129,5 +127,3 @@ static int blake2s_compress_sse( blake2s_state *S, const byte block[BLAKE2S_BLOC |
| STORE( &S->h[4], _mm_xor_si128( ff1, _mm_xor_si128( row[1], row[3] ) ) ); |
| return 0; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/blake2sp.cpp b/third_party/unrar/src/blake2sp.cpp |
| index ca85a4e8ab21..da645883b5c6 100644 |
| --- a/third_party/unrar/src/blake2sp.cpp |
| +++ b/third_party/unrar/src/blake2sp.cpp |
| @@ -11,8 +11,6 @@ |
| this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
| */ |
| |
| -namespace third_party_unrar { |
| - |
| #define PARALLELISM_DEGREE 8 |
| |
| void blake2sp_init( blake2sp_state *S ) |
| @@ -153,5 +151,3 @@ void blake2sp_final( blake2sp_state *S, byte *digest ) |
| |
| blake2s_final( &S->R, digest ); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/cmddata.cpp b/third_party/unrar/src/cmddata.cpp |
| index 8a6c4f969dae..e0c286df6ed4 100644 |
| --- a/third_party/unrar/src/cmddata.cpp |
| +++ b/third_party/unrar/src/cmddata.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| CommandData::CommandData() |
| { |
| Init(); |
| @@ -1410,5 +1408,3 @@ void CommandData::ReportWrongSwitches(RARFORMAT Format) |
| } |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/cmddata.hpp b/third_party/unrar/src/cmddata.hpp |
| index d42b04676ac9..e12d4fbc87e6 100644 |
| --- a/third_party/unrar/src/cmddata.hpp |
| +++ b/third_party/unrar/src/cmddata.hpp |
| @@ -1,7 +1,6 @@ |
| #ifndef _RAR_CMDDATA_ |
| #define _RAR_CMDDATA_ |
| |
| -namespace third_party_unrar { |
| |
| #define DefaultStoreList L"7z;ace;arj;bz2;cab;gz;jpeg;jpg;lha;lz;lzh;mp3;rar;taz;tgz;xz;z;zip;zipx" |
| |
| @@ -62,6 +61,4 @@ class CommandData:public RAROptions |
| StringList StoreArgs; |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/coder.cpp b/third_party/unrar/src/coder.cpp |
| index 49e630b05f19..9d971a8ad45b 100644 |
| --- a/third_party/unrar/src/coder.cpp |
| +++ b/third_party/unrar/src/coder.cpp |
| @@ -1,4 +1,4 @@ |
| -namespace third_party_unrar { |
| + |
| |
| inline unsigned int RangeCoder::GetChar() |
| { |
| @@ -46,5 +46,3 @@ inline void RangeCoder::Decode() |
| low += range*SubRange.LowCount; |
| range *= SubRange.HighCount-SubRange.LowCount; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/coder.hpp b/third_party/unrar/src/coder.hpp |
| index 4d8fa05793b4..7b36ff218fa0 100644 |
| --- a/third_party/unrar/src/coder.hpp |
| +++ b/third_party/unrar/src/coder.hpp |
| @@ -2,7 +2,6 @@ |
| * Contents: 'Carryless rangecoder' by Dmitry Subbotin * |
| ****************************************************************************/ |
| |
| -namespace third_party_unrar { |
| |
| class RangeCoder |
| { |
| @@ -22,5 +21,3 @@ class RangeCoder |
| |
| Unpack *UnpackRead; |
| }; |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/consio.cpp b/third_party/unrar/src/consio.cpp |
| index 16225375ccd4..39c9014503ae 100644 |
| --- a/third_party/unrar/src/consio.cpp |
| +++ b/third_party/unrar/src/consio.cpp |
| @@ -1,8 +1,6 @@ |
| #include "rar.hpp" |
| #include "log.cpp" |
| |
| -namespace third_party_unrar { |
| - |
| static MESSAGE_TYPE MsgStream=MSG_STDOUT; |
| static RAR_CHARSET RedirectCharset=RCH_DEFAULT; |
| |
| @@ -53,13 +51,13 @@ void InitConsole() |
| |
| void SetConsoleMsgStream(MESSAGE_TYPE MsgStream) |
| { |
| - ::third_party_unrar::MsgStream=MsgStream; |
| + ::MsgStream=MsgStream; |
| } |
| |
| |
| void SetConsoleRedirectCharset(RAR_CHARSET RedirectCharset) |
| { |
| - ::third_party_unrar::RedirectCharset=RedirectCharset; |
| + ::RedirectCharset=RedirectCharset; |
| } |
| |
| |
| @@ -363,5 +361,3 @@ void OutComment(const wchar *Comment,size_t Size) |
| } |
| mprintf(L"\n"); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/consio.hpp b/third_party/unrar/src/consio.hpp |
| index 06eed21854cd..903dc21a4652 100644 |
| --- a/third_party/unrar/src/consio.hpp |
| +++ b/third_party/unrar/src/consio.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_CONSIO_ |
| #define _RAR_CONSIO_ |
| |
| -namespace third_party_unrar { |
| - |
| void InitConsole(); |
| void SetConsoleMsgStream(MESSAGE_TYPE MsgStream); |
| void SetConsoleRedirectCharset(RAR_CHARSET RedirectCharset); |
| @@ -26,6 +24,4 @@ bool GetConsolePassword(UIPASSWORD_TYPE Type,const wchar *FileName,SecPassword * |
| bool getwstr(wchar *str,size_t n); |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/crypt.cpp b/third_party/unrar/src/crypt.cpp |
| index dfa868839e3e..785b5faea53d 100644 |
| --- a/third_party/unrar/src/crypt.cpp |
| +++ b/third_party/unrar/src/crypt.cpp |
| @@ -7,7 +7,6 @@ |
| #include "crypt3.cpp" |
| #include "crypt5.cpp" |
| |
| -namespace third_party_unrar { |
| |
| CryptData::CryptData() |
| { |
| @@ -137,5 +136,3 @@ void GetRnd(byte *RndBuf,size_t BufSize) |
| if (!Success) |
| TimeRandomize(RndBuf,BufSize); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/crypt.hpp b/third_party/unrar/src/crypt.hpp |
| index 33f55b541f88..f6382ef5046a 100644 |
| --- a/third_party/unrar/src/crypt.hpp |
| +++ b/third_party/unrar/src/crypt.hpp |
| @@ -1,7 +1,6 @@ |
| #ifndef _RAR_CRYPT_ |
| #define _RAR_CRYPT_ |
| |
| -namespace third_party_unrar { |
| |
| enum CRYPT_METHOD { |
| CRYPT_NONE,CRYPT_RAR13,CRYPT_RAR15,CRYPT_RAR20,CRYPT_RAR30,CRYPT_RAR50 |
| @@ -99,6 +98,4 @@ void pbkdf2(const byte *pass, size_t pass_len, const byte *salt, |
| |
| void ConvertHashToMAC(HashValue *Value,byte *Key); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/crypt1.cpp b/third_party/unrar/src/crypt1.cpp |
| index ce986beb8882..1426393739e0 100644 |
| --- a/third_party/unrar/src/crypt1.cpp |
| +++ b/third_party/unrar/src/crypt1.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| extern uint CRCTab[256]; |
| |
| void CryptData::SetKey13(const char *Password) |
| @@ -79,5 +77,3 @@ void CryptData::Crypt15(byte *Data,size_t Count) |
| Data++; |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/crypt2.cpp b/third_party/unrar/src/crypt2.cpp |
| index 007f65943453..5fa4a97d4be7 100644 |
| --- a/third_party/unrar/src/crypt2.cpp |
| +++ b/third_party/unrar/src/crypt2.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| #define NROUNDS 32 |
| |
| #define substLong(t) ( (uint)SubstTable20[(uint)t&255] | \ |
| @@ -133,5 +131,3 @@ void CryptData::Swap20(byte *Ch1,byte *Ch2) |
| *Ch1=*Ch2; |
| *Ch2=Ch; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/crypt3.cpp b/third_party/unrar/src/crypt3.cpp |
| index 09c5681e9afe..93467aa3b92d 100644 |
| --- a/third_party/unrar/src/crypt3.cpp |
| +++ b/third_party/unrar/src/crypt3.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| void CryptData::SetKey30(bool Encrypt,SecPassword *Password,const wchar *PwdW,const byte *Salt) |
| { |
| byte AESKey[16],AESInit[16]; |
| @@ -67,5 +65,3 @@ void CryptData::SetKey30(bool Encrypt,SecPassword *Password,const wchar *PwdW,co |
| cleandata(AESKey,sizeof(AESKey)); |
| cleandata(AESInit,sizeof(AESInit)); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/crypt5.cpp b/third_party/unrar/src/crypt5.cpp |
| index 688a3877868f..7562469f3339 100644 |
| --- a/third_party/unrar/src/crypt5.cpp |
| +++ b/third_party/unrar/src/crypt5.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| static void hmac_sha256(const byte *Key,size_t KeyLength,const byte *Data, |
| size_t DataLength,byte *ResDigest, |
| sha256_context *ICtxOpt,bool *SetIOpt, |
| @@ -233,6 +231,3 @@ void TestPBKDF2() // Test PBKDF2 HMAC-SHA256 |
| mprintf(L"\nPBKDF2 test3: %s", memcmp(Key,Res3,32)==0 ? L"OK":L"Failed"); |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| - |
| diff --git a/third_party/unrar/src/errhnd.cpp b/third_party/unrar/src/errhnd.cpp |
| index 55f098961657..acd2d510384d 100644 |
| --- a/third_party/unrar/src/errhnd.cpp |
| +++ b/third_party/unrar/src/errhnd.cpp |
| @@ -7,8 +7,6 @@ |
| |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| void ErrorHandler::Clean() |
| { |
| ExitCode=RARX_SUCCESS; |
| @@ -413,5 +411,3 @@ void ErrorHandler::SetSystemErrorCode(int Code) |
| errno=Code; |
| #endif |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/errhnd.hpp b/third_party/unrar/src/errhnd.hpp |
| index 3dff399b16bb..24f7962159f9 100644 |
| --- a/third_party/unrar/src/errhnd.hpp |
| +++ b/third_party/unrar/src/errhnd.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_ERRHANDLER_ |
| #define _RAR_ERRHANDLER_ |
| |
| -namespace third_party_unrar { |
| - |
| enum RAR_EXIT // RAR exit code. |
| { |
| RARX_SUCCESS = 0, |
| @@ -69,6 +67,5 @@ class ErrorHandler |
| bool MainExit = false; // main() is completed. |
| }; |
| |
| -} // namespace third_party_unrar |
| |
| #endif |
| diff --git a/third_party/unrar/src/extinfo.cpp b/third_party/unrar/src/extinfo.cpp |
| index 020a86d16c24..5cb90a4080f6 100644 |
| --- a/third_party/unrar/src/extinfo.cpp |
| +++ b/third_party/unrar/src/extinfo.cpp |
| @@ -15,7 +15,7 @@ |
| #endif |
| #endif |
| |
| -namespace third_party_unrar { |
| + |
| |
| // RAR2 service header extra records. |
| #ifndef SFX_MODULE |
| @@ -176,5 +176,3 @@ bool ExtractSymlink(CommandData *Cmd,ComprDataIO &DataIO,Archive &Arc,const wcha |
| #endif |
| return false; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/extinfo.hpp b/third_party/unrar/src/extinfo.hpp |
| index 4263b13ac602..2b0005daa21d 100644 |
| --- a/third_party/unrar/src/extinfo.hpp |
| +++ b/third_party/unrar/src/extinfo.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_EXTINFO_ |
| #define _RAR_EXTINFO_ |
| |
| -namespace third_party_unrar { |
| - |
| bool IsRelativeSymlinkSafe(CommandData *Cmd,const wchar *SrcName,const wchar *PrepSrcName,const wchar *TargetName); |
| bool ExtractSymlink(CommandData *Cmd,ComprDataIO &DataIO,Archive &Arc,const wchar *LinkName); |
| #ifdef _UNIX |
| @@ -21,6 +19,5 @@ void SetExtraInfo20(CommandData *Cmd,Archive &Arc,wchar *Name); |
| void SetExtraInfo(CommandData *Cmd,Archive &Arc,wchar *Name); |
| void SetFileHeaderExtra(CommandData *Cmd,Archive &Arc,wchar *Name); |
| |
| -} // namespace third_party_unrar |
| |
| #endif |
| diff --git a/third_party/unrar/src/extract.cpp b/third_party/unrar/src/extract.cpp |
| index d33306d82dc8..6e13c18b6449 100644 |
| --- a/third_party/unrar/src/extract.cpp |
| +++ b/third_party/unrar/src/extract.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| CmdExtract::CmdExtract(CommandData *Cmd) |
| { |
| CmdExtract::Cmd=Cmd; |
| @@ -1191,5 +1189,3 @@ bool CmdExtract::CheckUnpVer(Archive &Arc,const wchar *ArcFileName) |
| } |
| return !WrongVer; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/extract.hpp b/third_party/unrar/src/extract.hpp |
| index 4cae23ee4faf..325928dc0a14 100644 |
| --- a/third_party/unrar/src/extract.hpp |
| +++ b/third_party/unrar/src/extract.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_EXTRACT_ |
| #define _RAR_EXTRACT_ |
| |
| -namespace third_party_unrar { |
| - |
| enum EXTRACT_ARC_CODE {EXTRACT_ARC_NEXT,EXTRACT_ARC_REPEAT}; |
| |
| class CmdExtract |
| @@ -61,6 +59,4 @@ class CmdExtract |
| static void UnstoreFile(ComprDataIO &DataIO,int64 DestUnpSize); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/filcreat.cpp b/third_party/unrar/src/filcreat.cpp |
| index 83dd2f9bd5ca..a64a7d4d7b4e 100644 |
| --- a/third_party/unrar/src/filcreat.cpp |
| +++ b/third_party/unrar/src/filcreat.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| // If NewFile==NULL, we delete created file after user confirmation. |
| // It is useful we we need to overwrite an existing folder or file, |
| // but need user confirmation for that. |
| @@ -163,5 +161,3 @@ bool UpdateExistingShortName(const wchar *Name) |
| return true; |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/filcreat.hpp b/third_party/unrar/src/filcreat.hpp |
| index 94e7202c0532..44f801d4ee06 100644 |
| --- a/third_party/unrar/src/filcreat.hpp |
| +++ b/third_party/unrar/src/filcreat.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_FILECREATE_ |
| #define _RAR_FILECREATE_ |
| |
| -namespace third_party_unrar { |
| - |
| bool FileCreate(RAROptions *Cmd,File *NewFile,wchar *Name,size_t MaxNameSize, |
| bool *UserReject,int64 FileSize=INT64NDF, |
| RarTime *FileTime=NULL,bool WriteOnly=false); |
| @@ -13,6 +11,4 @@ bool GetAutoRenamedName(wchar *Name,size_t MaxNameSize); |
| bool UpdateExistingShortName(const wchar *Name); |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/file.cpp b/third_party/unrar/src/file.cpp |
| index 7dc5b724ca73..d4b7b4a2d91c 100644 |
| --- a/third_party/unrar/src/file.cpp |
| +++ b/third_party/unrar/src/file.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| File::File() |
| { |
| hFile=FILE_BAD_HANDLE; |
| @@ -766,5 +764,3 @@ void File::SetFileHandle(FileHandle hF) { |
| hOpenFile = hF; |
| } |
| #endif // defined(CHROMIUM_UNRAR) |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/file.hpp b/third_party/unrar/src/file.hpp |
| index 4b3b637ad832..a1d42a05b6cc 100644 |
| --- a/third_party/unrar/src/file.hpp |
| +++ b/third_party/unrar/src/file.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_FILE_ |
| #define _RAR_FILE_ |
| |
| -namespace third_party_unrar { |
| - |
| #define FILE_USE_OPEN |
| |
| #ifdef _WIN_ALL |
| @@ -151,6 +149,4 @@ class File |
| } |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/filefn.cpp b/third_party/unrar/src/filefn.cpp |
| index 22c018ef1b03..4eb7b9b2f792 100644 |
| --- a/third_party/unrar/src/filefn.cpp |
| +++ b/third_party/unrar/src/filefn.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| MKDIR_CODE MakeDir(const wchar *Name,bool SetAttr,uint Attr) |
| { |
| #ifdef _WIN_ALL |
| @@ -501,5 +499,12 @@ bool SetFileCompression(const wchar *Name,bool State) |
| } |
| #endif |
| |
| -} // namespace third_party_unrar |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| |
| diff --git a/third_party/unrar/src/filefn.hpp b/third_party/unrar/src/filefn.hpp |
| index 03225b3598e4..1bda9b58eec0 100644 |
| --- a/third_party/unrar/src/filefn.hpp |
| +++ b/third_party/unrar/src/filefn.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_FILEFN_ |
| #define _RAR_FILEFN_ |
| |
| -namespace third_party_unrar { |
| - |
| enum MKDIR_CODE {MKDIR_SUCCESS,MKDIR_ERROR,MKDIR_BADPATH}; |
| |
| MKDIR_CODE MakeDir(const wchar *Name,bool SetAttr,uint Attr); |
| @@ -45,6 +43,8 @@ bool DelDir(const wchar *Name); |
| bool SetFileCompression(const wchar *Name,bool State); |
| #endif |
| |
| -} // namespace third_party_unrar |
| + |
| + |
| + |
| |
| #endif |
| diff --git a/third_party/unrar/src/filestr.cpp b/third_party/unrar/src/filestr.cpp |
| index 7030d33a5b0f..d25cf09b5f4f 100644 |
| --- a/third_party/unrar/src/filestr.cpp |
| +++ b/third_party/unrar/src/filestr.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| bool ReadTextFile( |
| const wchar *Name, |
| StringList *List, |
| @@ -168,5 +166,3 @@ RAR_CHARSET DetectTextEncoding(const byte *Data,size_t DataSize) |
| |
| return RCH_DEFAULT; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/filestr.hpp b/third_party/unrar/src/filestr.hpp |
| index 051483ca4fdb..febd0a2925d5 100644 |
| --- a/third_party/unrar/src/filestr.hpp |
| +++ b/third_party/unrar/src/filestr.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_FILESTR_ |
| #define _RAR_FILESTR_ |
| |
| -namespace third_party_unrar { |
| - |
| bool ReadTextFile( |
| const wchar *Name, |
| StringList *List, |
| @@ -16,6 +14,4 @@ bool ReadTextFile( |
| |
| RAR_CHARSET DetectTextEncoding(const byte *Data,size_t DataSize); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/find.cpp b/third_party/unrar/src/find.cpp |
| index 14c6f1f46696..812af6b3c3c2 100644 |
| --- a/third_party/unrar/src/find.cpp |
| +++ b/third_party/unrar/src/find.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| FindFile::FindFile() |
| { |
| *FindMask=0; |
| @@ -218,4 +216,3 @@ HANDLE FindFile::Win32Find(HANDLE hFind,const wchar *Mask,FindData *fd) |
| } |
| #endif |
| |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/find.hpp b/third_party/unrar/src/find.hpp |
| index f7babc5526d5..250637f8ac9d 100644 |
| --- a/third_party/unrar/src/find.hpp |
| +++ b/third_party/unrar/src/find.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_FINDDATA_ |
| #define _RAR_FINDDATA_ |
| |
| -namespace third_party_unrar { |
| - |
| enum FINDDATA_FLAGS { |
| FDDF_SECONDDIR=1 // Second encounter of same directory in SCAN_GETDIRSTWICE ScanTree mode. |
| }; |
| @@ -48,6 +46,4 @@ class FindFile |
| static bool FastFind(const wchar *FindMask,FindData *fd,bool GetSymLink=false); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/global.hpp b/third_party/unrar/src/global.hpp |
| index 6364c600c744..35c6cf9130c7 100644 |
| --- a/third_party/unrar/src/global.hpp |
| +++ b/third_party/unrar/src/global.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_GLOBAL_ |
| #define _RAR_GLOBAL_ |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef INCLUDEGLOBAL |
| #define EXTVAR |
| #else |
| @@ -11,6 +9,6 @@ namespace third_party_unrar { |
| |
| EXTVAR ErrorHandler ErrHandler; |
| |
| -} // namespace third_party_unrar |
| + |
| |
| #endif |
| diff --git a/third_party/unrar/src/hardlinks.cpp b/third_party/unrar/src/hardlinks.cpp |
| index 6f8da988269a..946a39527932 100644 |
| --- a/third_party/unrar/src/hardlinks.cpp |
| +++ b/third_party/unrar/src/hardlinks.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| bool ExtractHardlink(wchar *NameNew,wchar *NameExisting,size_t NameExistingSize) |
| { |
| SlashToNative(NameExisting,NameExisting,NameExistingSize); // Not needed for RAR 5.1+ archives. |
| @@ -39,4 +37,3 @@ bool ExtractHardlink(wchar *NameNew,wchar *NameExisting,size_t NameExistingSize) |
| #endif |
| } |
| |
| -} |
| diff --git a/third_party/unrar/src/hash.cpp b/third_party/unrar/src/hash.cpp |
| index 470269e5ce15..899b0ed1ab07 100644 |
| --- a/third_party/unrar/src/hash.cpp |
| +++ b/third_party/unrar/src/hash.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| void HashValue::Init(HASH_TYPE Type) |
| { |
| HashValue::Type=Type; |
| @@ -135,5 +133,3 @@ bool DataHash::Cmp(HashValue *CmpValue,byte *Key) |
| ConvertHashToMAC(&Final,Key); |
| return Final==*CmpValue; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/hash.hpp b/third_party/unrar/src/hash.hpp |
| index 5cbddebf4ad0..b7d879f66a28 100644 |
| --- a/third_party/unrar/src/hash.hpp |
| +++ b/third_party/unrar/src/hash.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_DATAHASH_ |
| #define _RAR_DATAHASH_ |
| |
| -namespace third_party_unrar { |
| - |
| enum HASH_TYPE {HASH_NONE,HASH_RAR14,HASH_CRC32,HASH_BLAKE2}; |
| |
| struct HashValue |
| @@ -51,6 +49,4 @@ class DataHash |
| HASH_TYPE Type() {return HashType;} |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/headers.cpp b/third_party/unrar/src/headers.cpp |
| index e30565a164b4..b042dc39327f 100644 |
| --- a/third_party/unrar/src/headers.cpp |
| +++ b/third_party/unrar/src/headers.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| void FileHeader::Reset(size_t SubDataSize) |
| { |
| SubData.Alloc(SubDataSize); |
| @@ -61,5 +59,3 @@ void MainHeader::Reset() |
| RROffset=0; |
| RRMaxSize=0; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/headers.hpp b/third_party/unrar/src/headers.hpp |
| index 3e9347749abc..6af453a9d136 100644 |
| --- a/third_party/unrar/src/headers.hpp |
| +++ b/third_party/unrar/src/headers.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_HEADERS_ |
| #define _RAR_HEADERS_ |
| |
| -namespace third_party_unrar { |
| - |
| #define SIZEOF_MARKHEAD3 7 // Size of RAR 4.x archive mark header. |
| #define SIZEOF_MAINHEAD14 7 // Size of RAR 1.4 main archive header. |
| #define SIZEOF_MAINHEAD3 13 // Size of RAR 4.x main archive header. |
| @@ -352,6 +350,5 @@ struct StreamHeader:SubBlockHeader |
| char StreamName[260]; |
| }; |
| |
| -} // namespace third_party_unrar |
| |
| #endif |
| diff --git a/third_party/unrar/src/list.cpp b/third_party/unrar/src/list.cpp |
| index 3c13e1d3f9ba..3a17b6cbfa9d 100644 |
| --- a/third_party/unrar/src/list.cpp |
| +++ b/third_party/unrar/src/list.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| static void ListFileHeader(Archive &Arc,FileHeader &hd,bool &TitleShown,bool Verbose,bool Technical,bool Bare); |
| static void ListFileAttr(uint A,HOST_SYSTEM_TYPE HostType,wchar *AttrStr,size_t AttrSize); |
| |
| @@ -480,5 +478,3 @@ void ListFileAttr(uint A,HOST_SYSTEM_TYPE HostType,wchar *AttrStr,size_t AttrSiz |
| break; |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/list.hpp b/third_party/unrar/src/list.hpp |
| index f5b52e5304e7..7721ae521db5 100644 |
| --- a/third_party/unrar/src/list.hpp |
| +++ b/third_party/unrar/src/list.hpp |
| @@ -1,10 +1,6 @@ |
| #ifndef _RAR_LIST_ |
| #define _RAR_LIST_ |
| |
| -namespace third_party_unrar { |
| - |
| void ListArchive(CommandData *Cmd); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/log.cpp b/third_party/unrar/src/log.cpp |
| index cea169ab3cb0..8bbe8ee0b54e 100644 |
| --- a/third_party/unrar/src/log.cpp |
| +++ b/third_party/unrar/src/log.cpp |
| @@ -1,6 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| |
| static wchar LogName[NM]; |
| static RAR_CHARSET LogCharset=RCH_DEFAULT; |
| @@ -35,5 +34,4 @@ void Log(const wchar *ArcName,const wchar *fmt,...) |
| } |
| #endif |
| |
| -} // namespace third_party_unrar |
| |
| diff --git a/third_party/unrar/src/log.hpp b/third_party/unrar/src/log.hpp |
| index 814bcef983ff..008ef11a0c76 100644 |
| --- a/third_party/unrar/src/log.hpp |
| +++ b/third_party/unrar/src/log.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_LOG_ |
| #define _RAR_LOG_ |
| |
| -namespace third_party_unrar { |
| - |
| void InitLogOptions(const wchar *LogFileName,RAR_CHARSET CSet); |
| |
| #ifdef SILENT |
| @@ -11,6 +9,4 @@ inline void Log(const wchar *ArcName,const wchar *fmt,...) {} |
| void Log(const wchar *ArcName,const wchar *fmt,...); |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/match.cpp b/third_party/unrar/src/match.cpp |
| index 5ad4eb98ae16..146a3b62a6fd 100644 |
| --- a/third_party/unrar/src/match.cpp |
| +++ b/third_party/unrar/src/match.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| static bool match(const wchar *pattern,const wchar *string,bool ForceCase); |
| static int mwcsicompc(const wchar *Str1,const wchar *Str2,bool ForceCase); |
| static int mwcsnicompc(const wchar *Str1,const wchar *Str2,size_t N,bool ForceCase); |
| @@ -147,5 +145,3 @@ int mwcsnicompc(const wchar *Str1,const wchar *Str2,size_t N,bool ForceCase) |
| return wcsnicomp(Str1,Str2,N); |
| #endif |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/match.hpp b/third_party/unrar/src/match.hpp |
| index 1ce383a20816..65493ff2a992 100644 |
| --- a/third_party/unrar/src/match.hpp |
| +++ b/third_party/unrar/src/match.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_MATCH_ |
| #define _RAR_MATCH_ |
| |
| -namespace third_party_unrar { |
| - |
| enum { |
| MATCH_NAMES, // Paths are ignored. |
| // Compares names only using wildcards. |
| @@ -33,6 +31,4 @@ enum { |
| |
| bool CmpName(const wchar *Wildcard,const wchar *Name,int CmpMode); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/model.cpp b/third_party/unrar/src/model.cpp |
| index de700a9245ee..1ca9f03e9bcc 100644 |
| --- a/third_party/unrar/src/model.cpp |
| +++ b/third_party/unrar/src/model.cpp |
| @@ -5,8 +5,6 @@ |
| * Contents: model description and encoding/decoding routines * |
| ****************************************************************************/ |
| |
| -namespace third_party_unrar { |
| - |
| static const int MAX_O=64; /* maximum allowed model order */ |
| const uint TOP=1 << 24, BOT=1 << 15; |
| |
| @@ -653,5 +651,3 @@ int ModelPPM::DecodeChar() |
| ARI_DEC_NORMALIZE(Coder.code,Coder.low,Coder.range,Coder.UnpackRead); |
| return(Symbol); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/model.hpp b/third_party/unrar/src/model.hpp |
| index 7b45b30c23f4..52abc89b3bb0 100644 |
| --- a/third_party/unrar/src/model.hpp |
| +++ b/third_party/unrar/src/model.hpp |
| @@ -4,8 +4,6 @@ |
| #include "coder.hpp" |
| #include "suballoc.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef ALLOW_MISALIGNED |
| #pragma pack(1) |
| #endif |
| @@ -121,6 +119,4 @@ class ModelPPM : RARPPM_DEF |
| int DecodeChar(); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/options.cpp b/third_party/unrar/src/options.cpp |
| index 7122401e91c1..b53edc668010 100644 |
| --- a/third_party/unrar/src/options.cpp |
| +++ b/third_party/unrar/src/options.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| RAROptions::RAROptions() |
| { |
| Init(); |
| @@ -35,5 +33,3 @@ void RAROptions::Init() |
| QOpenMode=QOPEN_AUTO; |
| #endif |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/options.hpp b/third_party/unrar/src/options.hpp |
| index 0df47388c514..99afd0e2a4db 100644 |
| --- a/third_party/unrar/src/options.hpp |
| +++ b/third_party/unrar/src/options.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_OPTIONS_ |
| #define _RAR_OPTIONS_ |
| |
| -namespace third_party_unrar { |
| - |
| #define DEFAULT_RECOVERY -3 |
| |
| #define DEFAULT_RECVOLUMES -10 |
| @@ -194,7 +192,4 @@ class RAROptions |
| PROCESSDATAPROC ProcessDataProc; |
| #endif |
| }; |
| - |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/pathfn.cpp b/third_party/unrar/src/pathfn.cpp |
| index 6a223dd3da2e..69d648e95871 100644 |
| --- a/third_party/unrar/src/pathfn.cpp |
| +++ b/third_party/unrar/src/pathfn.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| wchar* PointToName(const wchar *Path) |
| { |
| for (int I=(int)wcslen(Path)-1;I>=0;I--) |
| @@ -985,5 +983,3 @@ void MakeNameCompatible(wchar *Name) |
| } |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/pathfn.hpp b/third_party/unrar/src/pathfn.hpp |
| index 857075f1dcbe..f082694646d8 100644 |
| --- a/third_party/unrar/src/pathfn.hpp |
| +++ b/third_party/unrar/src/pathfn.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_PATHFN_ |
| #define _RAR_PATHFN_ |
| |
| -namespace third_party_unrar { |
| - |
| wchar* PointToName(const wchar *Path); |
| wchar* PointToLastChar(const wchar *Path); |
| wchar* ConvertPath(const wchar *SrcPath,wchar *DestPath); |
| @@ -75,6 +73,4 @@ void ConvertToPrecomposed(wchar *Name,size_t NameSize); |
| void MakeNameCompatible(wchar *Name); |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/qopen.cpp b/third_party/unrar/src/qopen.cpp |
| index 312e41570f83..89a83b34c06c 100644 |
| --- a/third_party/unrar/src/qopen.cpp |
| +++ b/third_party/unrar/src/qopen.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| QuickOpen::QuickOpen() |
| { |
| Buf=NULL; |
| @@ -290,5 +288,3 @@ bool QuickOpen::ReadNext() |
| LastReadHeaderPos=QOHeaderPos-Offset; |
| return true; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/qopen.hpp b/third_party/unrar/src/qopen.hpp |
| index 6e075c69682d..d745cea8014e 100644 |
| --- a/third_party/unrar/src/qopen.hpp |
| +++ b/third_party/unrar/src/qopen.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_QOPEN_ |
| #define _RAR_QOPEN_ |
| |
| -namespace third_party_unrar { |
| - |
| struct QuickOpenItem |
| { |
| byte *Header; |
| @@ -60,6 +58,4 @@ class QuickOpen |
| bool Tell(int64 *Pos); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/rawread.cpp b/third_party/unrar/src/rawread.cpp |
| index 964a96ba8d78..d99bac84c75a 100644 |
| --- a/third_party/unrar/src/rawread.cpp |
| +++ b/third_party/unrar/src/rawread.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| RawRead::RawRead() |
| { |
| RawRead::SrcFile=NULL; |
| @@ -197,5 +195,3 @@ uint64 RawGetV(const byte *Data,uint &ReadPos,uint DataSize,bool &Overflow) |
| Overflow=true; |
| return 0; // Out of buffer border. |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/rawread.hpp b/third_party/unrar/src/rawread.hpp |
| index 75813b1d9845..b31989872bc6 100644 |
| --- a/third_party/unrar/src/rawread.hpp |
| +++ b/third_party/unrar/src/rawread.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_RAWREAD_ |
| #define _RAR_RAWREAD_ |
| |
| -namespace third_party_unrar { |
| - |
| class RawRead |
| { |
| private: |
| @@ -40,6 +38,4 @@ class RawRead |
| |
| uint64 RawGetV(const byte *Data,uint &ReadPos,uint DataSize,bool &Overflow); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/rdwrfn.cpp b/third_party/unrar/src/rdwrfn.cpp |
| index 4388bf7e150e..001363090bc3 100644 |
| --- a/third_party/unrar/src/rdwrfn.cpp |
| +++ b/third_party/unrar/src/rdwrfn.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| ComprDataIO::ComprDataIO() |
| { |
| #ifndef RAR_NOCRYPT |
| @@ -320,5 +318,3 @@ void ComprDataIO::SetUnpackToMemory(byte *Addr,uint Size) |
| UnpackToMemoryAddr=Addr; |
| UnpackToMemorySize=Size; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/rdwrfn.hpp b/third_party/unrar/src/rdwrfn.hpp |
| index 5afa0c4bc0d7..070010eaa55e 100644 |
| --- a/third_party/unrar/src/rdwrfn.hpp |
| +++ b/third_party/unrar/src/rdwrfn.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_DATAIO_ |
| #define _RAR_DATAIO_ |
| |
| -namespace third_party_unrar { |
| - |
| class CmdAdd; |
| class Unpack; |
| |
| @@ -98,6 +96,4 @@ class ComprDataIO |
| bool Decryption; |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/recvol.cpp b/third_party/unrar/src/recvol.cpp |
| index 85e36805ccb6..166eef4f7302 100644 |
| --- a/third_party/unrar/src/recvol.cpp |
| +++ b/third_party/unrar/src/recvol.cpp |
| @@ -3,7 +3,7 @@ |
| #include "recvol3.cpp" |
| #include "recvol5.cpp" |
| |
| -namespace third_party_unrar { |
| + |
| |
| bool RecVolumesRestore(RAROptions *Cmd,const wchar *Name,bool Silent) |
| { |
| @@ -109,5 +109,3 @@ void RecVolumesTest(RAROptions *Cmd,Archive *Arc,const wchar *Name) |
| RecVol.Test(Cmd,Name); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/recvol.hpp b/third_party/unrar/src/recvol.hpp |
| index 710df1e7d42a..7f2f1adb967e 100644 |
| --- a/third_party/unrar/src/recvol.hpp |
| +++ b/third_party/unrar/src/recvol.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_RECVOL_ |
| #define _RAR_RECVOL_ |
| |
| -namespace third_party_unrar { |
| - |
| #define REV5_SIGN "Rar!\x1aRev" |
| #define REV5_SIGN_SIZE 8 |
| |
| @@ -86,6 +84,4 @@ class RecVolumes5 |
| bool RecVolumesRestore(RAROptions *Cmd,const wchar *Name,bool Silent); |
| void RecVolumesTest(RAROptions *Cmd,Archive *Arc,const wchar *Name); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/recvol3.cpp b/third_party/unrar/src/recvol3.cpp |
| index 4626ea681b41..1b3b66caa99c 100644 |
| --- a/third_party/unrar/src/recvol3.cpp |
| +++ b/third_party/unrar/src/recvol3.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| // Buffer size for all volumes involved. |
| static const size_t TotalBufferSize=0x4000000; |
| |
| @@ -547,5 +545,3 @@ void RecVolumes3::Test(RAROptions *Cmd,const wchar *Name) |
| NextVolumeName(VolName,ASIZE(VolName),false); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/recvol5.cpp b/third_party/unrar/src/recvol5.cpp |
| index 1965c5d03e7a..fd74c1b91556 100644 |
| --- a/third_party/unrar/src/recvol5.cpp |
| +++ b/third_party/unrar/src/recvol5.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| static const uint MaxVolumes=65535; |
| |
| RecVolumes5::RecVolumes5(bool TestOnly) |
| @@ -521,5 +519,3 @@ void RecVolumes5::Test(RAROptions *Cmd,const wchar *Name) |
| NextVolumeName(VolName,ASIZE(VolName),false); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/resource.cpp b/third_party/unrar/src/resource.cpp |
| index a2aa2f36f262..2eec79c76b4c 100644 |
| --- a/third_party/unrar/src/resource.cpp |
| +++ b/third_party/unrar/src/resource.cpp |
| @@ -1,6 +1,6 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| + |
| |
| #ifndef RARDLL |
| const wchar *St(MSGID StringId) |
| @@ -18,4 +18,3 @@ const wchar *StF(MSGID StringId) |
| } |
| #endif |
| |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/resource.hpp b/third_party/unrar/src/resource.hpp |
| index 696fa36492b9..62c5bf49efad 100644 |
| --- a/third_party/unrar/src/resource.hpp |
| +++ b/third_party/unrar/src/resource.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_RESOURCE_ |
| #define _RAR_RESOURCE_ |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef RARDLL |
| #define St(x) (L"") |
| #define StF(x) (L"") |
| @@ -11,6 +9,5 @@ const wchar *St(MSGID StringId); |
| const wchar *StF(MSGID StringId); |
| #endif |
| |
| -} // namespace third_party_unrar |
| |
| #endif |
| diff --git a/third_party/unrar/src/savepos.hpp b/third_party/unrar/src/savepos.hpp |
| index dc3184574db5..10a0664697af 100644 |
| --- a/third_party/unrar/src/savepos.hpp |
| +++ b/third_party/unrar/src/savepos.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_SAVEPOS_ |
| #define _RAR_SAVEPOS_ |
| |
| -namespace third_party_unrar { |
| - |
| class SaveFilePos |
| { |
| private: |
| @@ -26,6 +24,4 @@ class SaveFilePos |
| } |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/scantree.cpp b/third_party/unrar/src/scantree.cpp |
| index d07956a08515..d7233daf99d7 100644 |
| --- a/third_party/unrar/src/scantree.cpp |
| +++ b/third_party/unrar/src/scantree.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| ScanTree::ScanTree(StringList *FileMasks,RECURSE_MODE Recurse,bool GetLinks,SCAN_DIRS GetDirs) |
| { |
| ScanTree::FileMasks=FileMasks; |
| @@ -489,5 +487,3 @@ void ScanTree::ScanError(bool &Error) |
| ErrHandler.SysErrMsg(); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/scantree.hpp b/third_party/unrar/src/scantree.hpp |
| index 73354ab9429f..40a6d849778a 100644 |
| --- a/third_party/unrar/src/scantree.hpp |
| +++ b/third_party/unrar/src/scantree.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_SCANTREE_ |
| #define _RAR_SCANTREE_ |
| |
| -namespace third_party_unrar { |
| - |
| enum SCAN_DIRS |
| { |
| SCAN_SKIPDIRS, // Skip directories, but recurse for files if recursion mode is enabled. |
| @@ -77,6 +75,4 @@ class ScanTree |
| } |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/secpassword.cpp b/third_party/unrar/src/secpassword.cpp |
| index 2bc5a88de7c9..4865b3fd02e2 100644 |
| --- a/third_party/unrar/src/secpassword.cpp |
| +++ b/third_party/unrar/src/secpassword.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| #if defined(_WIN_ALL) |
| typedef BOOL (WINAPI *CRYPTPROTECTMEMORY)(LPVOID pData,DWORD cbData,DWORD dwFlags); |
| typedef BOOL (WINAPI *CRYPTUNPROTECTMEMORY)(LPVOID pData,DWORD cbData,DWORD dwFlags); |
| @@ -216,5 +214,3 @@ void SecHideData(void *Data,size_t DataSize,bool Encode,bool CrossProcess) |
| for (size_t I=0;I<DataSize;I++) |
| *((byte *)Data+I)^=Key+I+75; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/secpassword.hpp b/third_party/unrar/src/secpassword.hpp |
| index 94e3c1e7c665..375d3887a47c 100644 |
| --- a/third_party/unrar/src/secpassword.hpp |
| +++ b/third_party/unrar/src/secpassword.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_SECURE_PASSWORD_ |
| #define _RAR_SECURE_PASSWORD_ |
| |
| -namespace third_party_unrar { |
| - |
| // Store a password securely (if data encryption is provided by OS) |
| // or obfuscated to make search for password in memory dump less trivial. |
| class SecPassword |
| @@ -34,6 +32,4 @@ class SecPassword |
| void cleandata(void *data,size_t size); |
| void SecHideData(void *Data,size_t DataSize,bool Encode,bool CrossProcess); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/strfn.cpp b/third_party/unrar/src/strfn.cpp |
| index 3697d09930f6..09730b6bff08 100644 |
| --- a/third_party/unrar/src/strfn.cpp |
| +++ b/third_party/unrar/src/strfn.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| const char *NullToEmpty(const char *Str) |
| { |
| return Str==NULL ? "":Str; |
| @@ -470,5 +468,3 @@ void PrintfPrepareFmt(const wchar *Org,wchar *Cvt,size_t MaxSize) |
| Cvt[Dest]=0; |
| } |
| #endif |
| - |
| -} |
| diff --git a/third_party/unrar/src/strfn.hpp b/third_party/unrar/src/strfn.hpp |
| index 05de05a7c6c2..7c8357117f81 100644 |
| --- a/third_party/unrar/src/strfn.hpp |
| +++ b/third_party/unrar/src/strfn.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_STRFN_ |
| #define _RAR_STRFN_ |
| |
| -namespace third_party_unrar { |
| - |
| const char* NullToEmpty(const char *Str); |
| const wchar* NullToEmpty(const wchar *Str); |
| void IntToExt(const char *Src,char *Dest,size_t DestSize); |
| @@ -50,6 +48,4 @@ const wchar* GetCmdParam(const wchar *CmdLine,wchar *Param,size_t MaxSize); |
| void PrintfPrepareFmt(const wchar *Org,wchar *Cvt,size_t MaxSize); |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/strlist.cpp b/third_party/unrar/src/strlist.cpp |
| index aeba029ac49c..50d69c715608 100644 |
| --- a/third_party/unrar/src/strlist.cpp |
| +++ b/third_party/unrar/src/strlist.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| StringList::StringList() |
| { |
| Reset(); |
| @@ -151,5 +149,3 @@ void StringList::RestorePosition() |
| } |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/strlist.hpp b/third_party/unrar/src/strlist.hpp |
| index 55108dd9b10a..16a2cbb033cc 100644 |
| --- a/third_party/unrar/src/strlist.hpp |
| +++ b/third_party/unrar/src/strlist.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_STRLIST_ |
| #define _RAR_STRLIST_ |
| |
| -namespace third_party_unrar { |
| - |
| class StringList |
| { |
| private: |
| @@ -30,6 +28,4 @@ class StringList |
| void RestorePosition(); |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/suballoc.cpp b/third_party/unrar/src/suballoc.cpp |
| index f722d7570318..07d32859ff77 100644 |
| --- a/third_party/unrar/src/suballoc.cpp |
| +++ b/third_party/unrar/src/suballoc.cpp |
| @@ -5,8 +5,6 @@ |
| * Contents: memory allocation routines * |
| ****************************************************************************/ |
| |
| -namespace third_party_unrar { |
| - |
| static const uint UNIT_SIZE=Max(sizeof(RARPPM_CONTEXT),sizeof(RARPPM_MEM_BLK)); |
| static const uint FIXED_UNIT_SIZE=12; |
| |
| @@ -295,5 +293,3 @@ void SubAllocator::FreeUnits(void* ptr,int OldNU) |
| { |
| InsertNode(ptr,Units2Indx[OldNU-1]); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/suballoc.hpp b/third_party/unrar/src/suballoc.hpp |
| index 17af204eb6c1..5989e82e8c09 100644 |
| --- a/third_party/unrar/src/suballoc.hpp |
| +++ b/third_party/unrar/src/suballoc.hpp |
| @@ -7,8 +7,6 @@ |
| #if !defined(_SUBALLOC_H_) |
| #define _SUBALLOC_H_ |
| |
| -namespace third_party_unrar { |
| - |
| #if defined(__GNUC__) && defined(ALLOW_MISALIGNED) |
| #define RARPPM_PACK_ATTR __attribute__ ((packed)) |
| #else |
| @@ -84,6 +82,5 @@ class SubAllocator |
| byte *pText, *UnitsStart,*HeapEnd,*FakeUnitsStart; |
| }; |
| |
| -} // namespace third_party_unrar |
| |
| #endif /* !defined(_SUBALLOC_H_) */ |
| diff --git a/third_party/unrar/src/system.cpp b/third_party/unrar/src/system.cpp |
| index 615de3568f62..ce3deb931d97 100644 |
| --- a/third_party/unrar/src/system.cpp |
| +++ b/third_party/unrar/src/system.cpp |
| @@ -1,12 +1,10 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| static int SleepTime=0; |
| |
| void InitSystemOptions(int SleepTime) |
| { |
| - ::third_party_unrar::SleepTime=SleepTime; |
| + ::SleepTime=SleepTime; |
| } |
| |
| |
| @@ -182,5 +180,3 @@ SSE_VERSION GetSSEVersion() |
| return SSE_NONE; |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/system.hpp b/third_party/unrar/src/system.hpp |
| index 70f1fbd4f3e5..bacc4bd10f5e 100644 |
| --- a/third_party/unrar/src/system.hpp |
| +++ b/third_party/unrar/src/system.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_SYSTEM_ |
| #define _RAR_SYSTEM_ |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef _WIN_ALL |
| #ifndef BELOW_NORMAL_PRIORITY_CLASS |
| #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000 |
| @@ -38,6 +36,4 @@ SSE_VERSION GetSSEVersion(); |
| extern SSE_VERSION _SSE_Version; |
| #endif |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/threadmisc.cpp b/third_party/unrar/src/threadmisc.cpp |
| index 3136031b48ab..9dfd2b9bc301 100644 |
| --- a/third_party/unrar/src/threadmisc.cpp |
| +++ b/third_party/unrar/src/threadmisc.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| // Typically we use the same global thread pool for all RAR modules. |
| static ThreadPool *GlobalPool=NULL; |
| static uint GlobalPoolUseCount=0; |
| @@ -211,4 +209,3 @@ uint GetNumberOfThreads() |
| return NumCPU; |
| } |
| |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/threadpool.cpp b/third_party/unrar/src/threadpool.cpp |
| index b5f2710dbc3a..732dd75375be 100644 |
| --- a/third_party/unrar/src/threadpool.cpp |
| +++ b/third_party/unrar/src/threadpool.cpp |
| @@ -3,8 +3,6 @@ |
| #ifdef RAR_SMP |
| #include "threadmisc.cpp" |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef _WIN_ALL |
| int ThreadPool::ThreadPriority=THREAD_PRIORITY_NORMAL; |
| #endif |
| @@ -213,6 +211,4 @@ void ThreadPool::WaitDone() |
| pthread_mutex_unlock(&AnyActiveMutex); |
| #endif |
| } |
| - |
| -} // namespace third_party_unrar |
| #endif // RAR_SMP |
| diff --git a/third_party/unrar/src/threadpool.hpp b/third_party/unrar/src/threadpool.hpp |
| index bb3b59e247af..dc45ca0ab461 100644 |
| --- a/third_party/unrar/src/threadpool.hpp |
| +++ b/third_party/unrar/src/threadpool.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_THREADPOOL_ |
| #define _RAR_THREADPOOL_ |
| |
| -namespace third_party_unrar { |
| - |
| #ifndef RAR_SMP |
| const uint MaxPoolThreads=1; // For single threaded version. |
| #else |
| @@ -105,7 +103,5 @@ void DestroyThreadPool(ThreadPool *Pool); |
| |
| #endif // RAR_SMP |
| |
| -} // namespace third_party_unrar |
| - |
| #endif // _RAR_THREADPOOL_ |
| |
| diff --git a/third_party/unrar/src/timefn.cpp b/third_party/unrar/src/timefn.cpp |
| index ddaa742e0447..186ac4fd6f86 100644 |
| --- a/third_party/unrar/src/timefn.cpp |
| +++ b/third_party/unrar/src/timefn.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| void RarTime::GetLocal(RarLocalTime *lt) |
| { |
| #ifdef _WIN_ALL |
| @@ -340,5 +338,3 @@ bool IsLeapYear(int Year) |
| { |
| return (Year&3)==0 && (Year%100!=0 || Year%400==0); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/timefn.hpp b/third_party/unrar/src/timefn.hpp |
| index 5d0656d4b81b..5271361644e0 100644 |
| --- a/third_party/unrar/src/timefn.hpp |
| +++ b/third_party/unrar/src/timefn.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_TIMEFN_ |
| #define _RAR_TIMEFN_ |
| |
| -namespace third_party_unrar { |
| - |
| struct RarLocalTime |
| { |
| uint Year; |
| @@ -64,6 +62,4 @@ class RarTime |
| const wchar *GetMonthName(int Month); |
| bool IsLeapYear(int Year); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/ui.hpp b/third_party/unrar/src/ui.hpp |
| index 36c8e1568cf6..a712ae376e1d 100644 |
| --- a/third_party/unrar/src/ui.hpp |
| +++ b/third_party/unrar/src/ui.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_UI_ |
| #define _RAR_UI_ |
| |
| -namespace third_party_unrar { |
| - |
| // UIERROR_ - error message; |
| // UIMSG_ - informational message; |
| // UIWAIT_ - message waiting for user confirmation; |
| @@ -163,6 +161,4 @@ template<class T1,class T2,class T3> void uiMsg(UIMESSAGE_CODE code,T1 a1,T2 a2, |
| Store.Msg(); |
| } |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/uicommon.cpp b/third_party/unrar/src/uicommon.cpp |
| index 30358127ed15..5be551a42c04 100644 |
| --- a/third_party/unrar/src/uicommon.cpp |
| +++ b/third_party/unrar/src/uicommon.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| static bool uiSoundEnabled; |
| |
| void uiInit(bool Sound) |
| @@ -65,5 +63,3 @@ UIASKREP_RESULT uiAskReplaceEx(RAROptions *Cmd,wchar *Name,size_t MaxNameSize,in |
| #endif |
| return Choice; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/uisilent.cpp b/third_party/unrar/src/uisilent.cpp |
| index e4addd12900c..1b5de13df525 100644 |
| --- a/third_party/unrar/src/uisilent.cpp |
| +++ b/third_party/unrar/src/uisilent.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| // Purely user interface function. Gets and returns user input. |
| UIASKREP_RESULT uiAskReplace(wchar *Name,size_t MaxNameSize,int64 FileSize,RarTime *FileTime,uint Flags) |
| { |
| @@ -69,5 +67,3 @@ const wchar *uiGetMonthName(int Month) |
| return L""; |
| } |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/ulinks.cpp b/third_party/unrar/src/ulinks.cpp |
| index 16d2dfe51b44..1656824f66ea 100644 |
| --- a/third_party/unrar/src/ulinks.cpp |
| +++ b/third_party/unrar/src/ulinks.cpp |
| @@ -1,4 +1,4 @@ |
| -namespace third_party_unrar { |
| + |
| |
| static bool UnixSymlink(const char *Target,const wchar *LinkName,RarTime *ftm,RarTime *fta) |
| { |
| @@ -103,5 +103,3 @@ bool ExtractUnixLink50(CommandData *Cmd,const wchar *Name,FileHeader *hd) |
| return false; |
| return UnixSymlink(Target,Name,&hd->mtime,&hd->atime); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack.cpp b/third_party/unrar/src/unpack.cpp |
| index dee442e2d19f..ca3c52ea792b 100644 |
| --- a/third_party/unrar/src/unpack.cpp |
| +++ b/third_party/unrar/src/unpack.cpp |
| @@ -21,8 +21,6 @@ |
| #include "unpack50.cpp" |
| #include "unpack50frag.cpp" |
| |
| -namespace third_party_unrar { |
| - |
| Unpack::Unpack(ComprDataIO *DataIO) |
| :Inp(true),VMCodeInp(true) |
| { |
| @@ -372,5 +370,3 @@ void Unpack::MakeDecodeTables(byte *LengthTable,DecodeTable *Dec,uint Size) |
| } |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack.hpp b/third_party/unrar/src/unpack.hpp |
| index 295d585e4fbe..ec5d688bcdf7 100644 |
| --- a/third_party/unrar/src/unpack.hpp |
| +++ b/third_party/unrar/src/unpack.hpp |
| @@ -1,8 +1,6 @@ |
| #ifndef _RAR_UNPACK_ |
| #define _RAR_UNPACK_ |
| |
| -namespace third_party_unrar { |
| - |
| // Maximum allowed number of compressed bits processed in quick mode. |
| #define MAX_QUICK_DECODE_BITS 10 |
| |
| @@ -406,6 +404,4 @@ class Unpack:PackDef |
| } |
| }; |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/unpack15.cpp b/third_party/unrar/src/unpack15.cpp |
| index 2211f4045556..78b0130d05b6 100644 |
| --- a/third_party/unrar/src/unpack15.cpp |
| +++ b/third_party/unrar/src/unpack15.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| #define STARTL1 2 |
| static unsigned int DecL1[]={0x8000,0xa000,0xc000,0xd000,0xe000,0xea00, |
| 0xee00,0xf000,0xf200,0xf200,0xffff}; |
| @@ -491,5 +489,3 @@ uint Unpack::DecodeNum(uint Num,uint StartPos,uint *DecTab,uint *PosTab) |
| Inp.faddbits(StartPos); |
| return(((Num-(I ? DecTab[I-1]:0))>>(16-StartPos))+PosTab[StartPos]); |
| } |
| - |
| -} |
| diff --git a/third_party/unrar/src/unpack20.cpp b/third_party/unrar/src/unpack20.cpp |
| index 664794e0c2c8..441b7478ca4a 100644 |
| --- a/third_party/unrar/src/unpack20.cpp |
| +++ b/third_party/unrar/src/unpack20.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| void Unpack::CopyString20(uint Length,uint Distance) |
| { |
| LastDist=OldDist[OldDistPtr++]=Distance; |
| @@ -381,5 +379,3 @@ byte Unpack::DecodeAudio(int Delta) |
| } |
| return (byte)Ch; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack30.cpp b/third_party/unrar/src/unpack30.cpp |
| index c2381a22ad87..6a8efa23bcbb 100644 |
| --- a/third_party/unrar/src/unpack30.cpp |
| +++ b/third_party/unrar/src/unpack30.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| // We use it instead of direct PPM.DecodeChar call to be sure that |
| // we reset PPM structures in case of corrupt data. It is important, |
| // because these structures can be invalid after PPM.DecodeChar returned -1. |
| @@ -765,5 +763,3 @@ void Unpack::InitFilters30(bool Solid) |
| delete PrgStack[I]; |
| PrgStack.SoftReset(); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack50.cpp b/third_party/unrar/src/unpack50.cpp |
| index 99c554bf3802..1c96b1d5b1ed 100644 |
| --- a/third_party/unrar/src/unpack50.cpp |
| +++ b/third_party/unrar/src/unpack50.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| void Unpack::Unpack5(bool Solid) |
| { |
| FileExtracted=true; |
| @@ -685,5 +683,3 @@ void Unpack::InitFilters() |
| { |
| Filters.SoftReset(); |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack50frag.cpp b/third_party/unrar/src/unpack50frag.cpp |
| index e45cb51a389c..16d5b1c3d5ef 100644 |
| --- a/third_party/unrar/src/unpack50frag.cpp |
| +++ b/third_party/unrar/src/unpack50frag.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| FragmentedWindow::FragmentedWindow() |
| { |
| memset(Mem,0,sizeof(Mem)); |
| @@ -115,5 +113,3 @@ size_t FragmentedWindow::GetBlockSize(size_t StartPos,size_t RequiredSize) |
| return Min(MemSize[I]-StartPos,RequiredSize); |
| return 0; // Must never be here. |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpack50mt.cpp b/third_party/unrar/src/unpack50mt.cpp |
| index 4ffd65467e2b..e41da79b5ea1 100644 |
| --- a/third_party/unrar/src/unpack50mt.cpp |
| +++ b/third_party/unrar/src/unpack50mt.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| #define UNP_READ_SIZE_MT 0x400000 |
| #define UNP_BLOCKS_PER_THREAD 2 |
| |
| @@ -655,5 +653,3 @@ bool Unpack::UnpackLargeBlock(UnpackThreadData &D) |
| } |
| return true; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unpackinline.cpp b/third_party/unrar/src/unpackinline.cpp |
| index ae306a4471b5..04c3d1f7dc7f 100644 |
| --- a/third_party/unrar/src/unpackinline.cpp |
| +++ b/third_party/unrar/src/unpackinline.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| _forceinline void Unpack::InsertOldDist(uint Distance) |
| { |
| OldDist[3]=OldDist[2]; |
| @@ -147,5 +145,3 @@ _forceinline uint Unpack::SlotToLength(BitInput &Inp,uint Slot) |
| } |
| return Length; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/unrar_wrapper.h b/third_party/unrar/src/unrar_wrapper.h |
| index d7e461b4d7d4..0b92964fa08e 100644 |
| --- a/third_party/unrar/src/unrar_wrapper.h |
| +++ b/third_party/unrar/src/unrar_wrapper.h |
| @@ -9,6 +9,10 @@ |
| |
| namespace third_party_unrar { |
| |
| +using ::Archive; |
| +using ::CmdExtract; |
| +using ::CommandData; |
| + |
| static const int kUnrarEndarcHead = HEAD_ENDARC; |
| static const int kUnrarFileHead = HEAD_FILE; |
| } // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/uowners.cpp b/third_party/unrar/src/uowners.cpp |
| index cdaedd313c89..9f4630858366 100644 |
| --- a/third_party/unrar/src/uowners.cpp |
| +++ b/third_party/unrar/src/uowners.cpp |
| @@ -1,4 +1,4 @@ |
| -namespace third_party_unrar { |
| + |
| |
| void ExtractUnixOwner20(Archive &Arc,const wchar *FileName) |
| { |
| @@ -139,5 +139,3 @@ void SetUnixOwner(Archive &Arc,const wchar *FileName) |
| ErrHandler.SetErrorCode(RARX_CREATE); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/volume.cpp b/third_party/unrar/src/volume.cpp |
| index b389139730da..c175b3b2281b 100644 |
| --- a/third_party/unrar/src/volume.cpp |
| +++ b/third_party/unrar/src/volume.cpp |
| @@ -1,7 +1,5 @@ |
| #include "rar.hpp" |
| |
| -namespace third_party_unrar { |
| - |
| #ifdef RARDLL |
| static bool DllVolChange(RAROptions *Cmd,wchar *NextName,size_t NameSize); |
| static bool DllVolNotify(RAROptions *Cmd,wchar *NextName); |
| @@ -288,5 +286,3 @@ bool DllVolNotify(RAROptions *Cmd,wchar *NextName) |
| #pragma runtime_checks( "s", restore ) |
| #endif |
| #endif |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/volume.hpp b/third_party/unrar/src/volume.hpp |
| index d27d4b33f923..2d6a6d5c1e61 100644 |
| --- a/third_party/unrar/src/volume.hpp |
| +++ b/third_party/unrar/src/volume.hpp |
| @@ -1,14 +1,10 @@ |
| #ifndef _RAR_VOLUME_ |
| #define _RAR_VOLUME_ |
| |
| -namespace third_party_unrar { |
| - |
| void SplitArchive(Archive &Arc,FileHeader *fh,int64 *HeaderPos, |
| ComprDataIO *DataIO); |
| bool MergeArchive(Archive &Arc,ComprDataIO *DataIO,bool ShowFileName, |
| wchar Command); |
| void SetVolWrite(Archive &Dest,int64 VolSize); |
| |
| -} // namespace third_party_unrar |
| - |
| #endif |
| diff --git a/third_party/unrar/src/win32acl.cpp b/third_party/unrar/src/win32acl.cpp |
| index b495628f3dee..6bc865b616f5 100644 |
| --- a/third_party/unrar/src/win32acl.cpp |
| +++ b/third_party/unrar/src/win32acl.cpp |
| @@ -1,5 +1,3 @@ |
| -namespace third_party_unrar { |
| - |
| static void SetACLPrivileges(); |
| |
| static bool ReadSacl=false; |
| @@ -135,5 +133,3 @@ bool SetPrivilege(LPCTSTR PrivName) |
| |
| return Success; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/win32lnk.cpp b/third_party/unrar/src/win32lnk.cpp |
| index 76028b32c5b5..a68ed75a2735 100644 |
| --- a/third_party/unrar/src/win32lnk.cpp |
| +++ b/third_party/unrar/src/win32lnk.cpp |
| @@ -1,7 +1,5 @@ |
| #define SYMLINK_FLAG_RELATIVE 1 |
| |
| -namespace third_party_unrar { |
| - |
| typedef struct _REPARSE_DATA_BUFFER { |
| ULONG ReparseTag; |
| USHORT ReparseDataLength; |
| @@ -174,5 +172,3 @@ bool CreateReparsePoint(CommandData *Cmd,const wchar *Name,FileHeader *hd) |
| SetFileAttr(Name,hd->FileAttr); |
| return true; |
| } |
| - |
| -} // namespace third_party_unrar |
| diff --git a/third_party/unrar/src/win32stm.cpp b/third_party/unrar/src/win32stm.cpp |
| index 985e2f33f06c..9e24c13ec4ae 100644 |
| --- a/third_party/unrar/src/win32stm.cpp |
| +++ b/third_party/unrar/src/win32stm.cpp |
| @@ -1,4 +1,4 @@ |
| -namespace third_party_unrar { |
| + |
| |
| #if !defined(SFX_MODULE) && defined(_WIN_ALL) |
| void ExtractStreams20(Archive &Arc,const wchar *FileName) |
| @@ -145,5 +145,3 @@ void GetStreamNameNTFS(Archive &Arc,wchar *StreamName,size_t MaxSize) |
| UtfToWide(UtfString,StreamName,MaxSize); |
| } |
| } |
| - |
| -} // namespace third_party_unrar |