aboutsummaryrefslogtreecommitdiff
path: root/c/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/common.cpp')
-rw-r--r--c/common.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/c/common.cpp b/c/common.cpp
index c7ea873..02feecf 100644
--- a/c/common.cpp
+++ b/c/common.cpp
@@ -1,27 +1,7 @@
-#include <stdexcept>
-#include <memory>
#include <windows.h>
-#include <SWI-Prolog.h>
#include "common.h"
-/* Convert normal string to TSTR using given codepage. */
-std::basic_string<TCHAR> TsmFromSz(const char *sz, int iCp)
-{
-#ifdef UNICODE
- int cbMultiByte, cchWideChar;
-
- cbMultiByte = strlen(sz)+1;
- cchWideChar = MultiByteToWideChar(iCp, 0, sz, cbMultiByte, NULL, 0);
- std::wstring wsm(cchWideChar, 0);
- if (!MultiByteToWideChar(iCp, 0, sz, cbMultiByte, wsm.data(), cchWideChar))
- throw Win32Error(GetLastError());
- return wsm;
-#else
- return std::string(sz);
-#endif
-}
-
Win32Error::Win32Error(DWORD dwErr)
{
m_dwErr = dwErr;