summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/Windows/Error.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-04-09 21:45:54 +1000
committer Vas Crabb <vas@vastheman.com>2016-04-09 21:52:08 +1000
commite925c494fe30adafb615c075f5eb692dd2b2effa (patch)
treeeed0b7ccadb049ed2dc8a72282c0235c4e94b6ae /3rdparty/lzma/CPP/Windows/Error.cpp
parentb13e02f9751424dfc9ce6070676e2e318087a991 (diff)
Update LZMA SDK to 15.14
Diffstat (limited to '3rdparty/lzma/CPP/Windows/Error.cpp')
-rw-r--r--3rdparty/lzma/CPP/Windows/Error.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/3rdparty/lzma/CPP/Windows/Error.cpp b/3rdparty/lzma/CPP/Windows/Error.cpp
deleted file mode 100644
index c02e3b9e59a..00000000000
--- a/3rdparty/lzma/CPP/Windows/Error.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Windows/Error.h
-
-#include "StdAfx.h"
-
-#include "Windows/Error.h"
-#ifndef _UNICODE
-#include "Common/StringConvert.h"
-#endif
-
-#ifndef _UNICODE
-extern bool g_IsNT;
-#endif
-
-namespace NWindows {
-namespace NError {
-
-static bool MyFormatMessage(DWORD errorCode, UString &message)
-{
- LPVOID msgBuf;
- #ifndef _UNICODE
- if (!g_IsNT)
- {
- if (::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, errorCode, 0, (LPTSTR) &msgBuf, 0, NULL) == 0)
- return false;
- message = GetUnicodeString((LPCTSTR)msgBuf);
- }
- else
- #endif
- {
- if (::FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, errorCode, 0, (LPWSTR) &msgBuf, 0, NULL) == 0)
- return false;
- message = (LPCWSTR)msgBuf;
- }
- ::LocalFree(msgBuf);
- return true;
-}
-
-UString MyFormatMessageW(DWORD errorCode)
-{
- UString message;
- if (!MyFormatMessage(errorCode, message))
- {
- wchar_t s[16];
- for (int i = 0; i < 8; i++)
- {
- int t = errorCode & 0xF;
- errorCode >>= 4;
- s[7 - i] = (wchar_t)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
- }
- s[8] = '\0';
- message = (UString)L"Error #" + s;
- }
- return message;
-}
-
-}}