summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mmap_SA
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
commit58973a21a30bf95427fd43c456e41e35c386218c (patch)
tree1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/Dbx_mmap_SA
parent55b5cf8a5506f03350e5c80ac86f5717425e4d10 (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')
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.h12
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/encryption.cpp8
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/langpack.cpp6
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp6
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/encryption.c7
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/progress.c5
6 files changed, 9 insertions, 35 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);
}
}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/encryption.c b/plugins/Dbx_mmap_SA/Import_SA/encryption.c
index f261581041..ede73c006a 100644
--- a/plugins/Dbx_mmap_SA/Import_SA/encryption.c
+++ b/plugins/Dbx_mmap_SA/Import_SA/encryption.c
@@ -93,16 +93,11 @@ void InitSecurity()
_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)));
// Unsane: none
/*
-#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
*/
AddMessage(LPGEN("Cryptor loaded: %s [%s] (%s)"), Modules[ModulesCount]->cryptor->Name, buf, Modules[ModulesCount]->dllname);
diff --git a/plugins/Dbx_mmap_SA/Import_SA/progress.c b/plugins/Dbx_mmap_SA/Import_SA/progress.c
index 1417868947..f3f4e9f08a 100644
--- a/plugins/Dbx_mmap_SA/Import_SA/progress.c
+++ b/plugins/Dbx_mmap_SA/Import_SA/progress.c
@@ -92,12 +92,9 @@ void AddMessage( const char* fmt, ... )
}
#endif
- #if defined( _UNICODE )
+
{ TCHAR* str = mir_a2t( msgBuf );
SendMessage( hdlgProgress, PROGM_ADDMESSAGE, 0, ( LPARAM )str );
mir_free( str );
}
- #else
- SendMessage( hdlgProgress, PROGM_ADDMESSAGE, 0, ( LPARAM )msgBuf );
- #endif
}