summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-09 16:04:24 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-10 08:15:38 +0000
commit4677d362982a38c6e2aabb667e33aaa7f921f018 (patch)
treefe3b676288f05a87cdbb53a170e815427e3d9380 /src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp
parent22ec6aa53e44069c03c7baf94881949c7a4facff (diff)
Update source tree with version 9.38.beta of LZMA SDK.
- Remove unused files. - Split in .pri files. - Add HEADERS section. - Adjust lib7z_facade. Change-Id: I31e7bafbfe1a9346364bd58c391601955f98ad3a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp')
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp125
1 files changed, 0 insertions, 125 deletions
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp b/src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp
deleted file mode 100644
index c54a3d098..000000000
--- a/src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// MainAr.cpp
-
-#include "StdAfx.h"
-
-#include "Common/MyException.h"
-#include "Common/StdOutStream.h"
-
-#include "Windows/Error.h"
-#include "Windows/NtCheck.h"
-
-#include "../Common/ArchiveCommandLine.h"
-#include "../Common/ExitCode.h"
-
-#include "ConsoleClose.h"
-
-using namespace NWindows;
-
-CStdOutStream *g_StdStream = 0;
-
-extern int Main2(
- #ifndef _WIN32
- int numArgs, const char *args[]
- #endif
-);
-
-static const char *kExceptionErrorMessage = "\n\nError:\n";
-static const char *kUserBreak = "\nBreak signaled\n";
-static const char *kMemoryExceptionMessage = "\n\nERROR: Can't allocate required memory!\n";
-static const char *kUnknownExceptionMessage = "\n\nUnknown Error\n";
-static const char *kInternalExceptionMessage = "\n\nInternal Error #";
-
-#define NT_CHECK_FAIL_ACTION (*g_StdStream) << "Unsupported Windows version"; return NExitCode::kFatalError;
-
-int MY_CDECL main
-(
- #ifndef _WIN32
- int numArgs, const char *args[]
- #endif
-)
-{
- g_StdStream = &g_StdOut;
-
- NT_CHECK
-
- NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
- int res = 0;
- try
- {
- res = Main2(
- #ifndef _WIN32
- numArgs, args
- #endif
- );
- }
- catch(const CNewException &)
- {
- (*g_StdStream) << kMemoryExceptionMessage;
- return (NExitCode::kMemoryError);
- }
- catch(const NConsoleClose::CCtrlBreakException &)
- {
- (*g_StdStream) << endl << kUserBreak;
- return (NExitCode::kUserBreak);
- }
- catch(const CArchiveCommandLineException &e)
- {
- (*g_StdStream) << kExceptionErrorMessage << e << endl;
- return (NExitCode::kUserError);
- }
- catch(const CSystemException &systemError)
- {
- if (systemError.ErrorCode == E_OUTOFMEMORY)
- {
- (*g_StdStream) << kMemoryExceptionMessage;
- return (NExitCode::kMemoryError);
- }
- if (systemError.ErrorCode == E_ABORT)
- {
- (*g_StdStream) << endl << kUserBreak;
- return (NExitCode::kUserBreak);
- }
- UString message;
- NError::MyFormatMessage(systemError.ErrorCode, message);
- (*g_StdStream) << endl << endl << "System error:" << endl << message << endl;
- return (NExitCode::kFatalError);
- }
- catch(NExitCode::EEnum &exitCode)
- {
- (*g_StdStream) << kInternalExceptionMessage << exitCode << endl;
- return (exitCode);
- }
- /*
- catch(const NExitCode::CMultipleErrors &multipleErrors)
- {
- (*g_StdStream) << endl << multipleErrors.NumErrors << " errors" << endl;
- return (NExitCode::kFatalError);
- }
- */
- catch(const UString &s)
- {
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
- return (NExitCode::kFatalError);
- }
- catch(const AString &s)
- {
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
- return (NExitCode::kFatalError);
- }
- catch(const char *s)
- {
- (*g_StdStream) << kExceptionErrorMessage << s << endl;
- return (NExitCode::kFatalError);
- }
- catch(int t)
- {
- (*g_StdStream) << kInternalExceptionMessage << t << endl;
- return (NExitCode::kFatalError);
- }
- catch(...)
- {
- (*g_StdStream) << kUnknownExceptionMessage;
- return (NExitCode::kFatalError);
- }
- return res;
-}