diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
commit | 58973a21a30bf95427fd43c456e41e35c386218c (patch) | |
tree | 1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/Dbx_mmap_SA/Dbtool | |
parent | 55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mmap_SA/Dbtool')
-rw-r--r-- | plugins/Dbx_mmap_SA/Dbtool/dbtool.h | 12 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/Dbtool/encryption.cpp | 8 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/Dbtool/langpack.cpp | 6 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp | 6 |
4 files changed, 7 insertions, 25 deletions
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.h b/plugins/Dbx_mmap_SA/Dbtool/dbtool.h index 7cd3caf67b..63b6b4ccf1 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/dbtool.h +++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.h @@ -19,9 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if defined( UNICODE ) && !defined( _UNICODE )
- #define _UNICODE
-#endif
#include <tchar.h>
@@ -116,13 +113,8 @@ __inline LPSTR Translate(LPSTR source) { return ( LPSTR )LangPackTranslateString( source, 0 );
}
-#if defined( _UNICODE )
- #define TranslateT(s) (TCHAR*)LangPackTranslateString((LPCSTR)_T(s),1)
- #define TranslateTS(s) (TCHAR*)LangPackTranslateString((LPCSTR)s,1)
-#else
- #define TranslateT(s) LangPackTranslateString(s,0)
- #define TranslateTS(s) LangPackTranslateString(s,0)
-#endif
+#define TranslateT(s) (TCHAR*)LangPackTranslateString((LPCSTR)_T(s),1)
+#define TranslateTS(s) (TCHAR*)LangPackTranslateString((LPCSTR)s,1)
char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2);
char* Utf8EncodeUcs2(const wchar_t* src);
diff --git a/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp b/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp index cab515864c..3d00d70880 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp +++ b/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp @@ -88,15 +88,11 @@ void InitSecurity() Modules[ModulesCount]->hLib = hLib;
_snprintf(buf,SIZEOF(buf),"%d.%d.%d.%d", HIBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), HIBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)));
-#ifdef _UNICODE
+
mbstowcs(Name, Modules[ModulesCount]->cryptor->Name, 100);
mbstowcs(Version, buf, 100);
mbstowcs(DllName, Modules[ModulesCount]->dllname, 100);
-#else
- strcpy(Name, Modules[ModulesCount]->cryptor->Name);
- strcpy(Version, buf);
- strcpy(DllName, Modules[ModulesCount]->dllname);
-#endif
+
AddToStatus(STATUS_MESSAGE,TranslateT("Cryptor loaded: %s [%s] (%s)"), Name, Version, DllName);
ModulesCount++;
diff --git a/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp index d76cea33e0..7f2627cd11 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp +++ b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp @@ -317,11 +317,7 @@ char *LangPackTranslateString(const char *szEnglish, const int W) return W ? (char *)entry->wlocal : entry->local;
}
-#if defined( _UNICODE )
- #define FLAGS 1
-#else
- #define FLAGS 0
-#endif
+#define FLAGS 1
static void TranslateWindow( HWND hwnd )
{
diff --git a/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp b/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp index a93f1720e6..2b91059176 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp +++ b/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp @@ -98,13 +98,11 @@ int WorkModuleChain(int firstTime) }
if (n) {
TCHAR *pszModuleName;
-#ifdef UNICODE
+
TCHAR szModuleName[257];
MultiByteToWideChar(CP_ACP, 0, modChain[iCurrentModName].name, -1, szModuleName, sizeof(szModuleName) / sizeof(TCHAR));
pszModuleName = szModuleName;
-#else
- pszModuleName = modChain[iCurrentModName].name;
-#endif
+
AddToStatus(STATUS_WARNING,TranslateT("Module name '%s' is not unique: %d duplicates found)"), pszModuleName, n);
}
}
|