summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 17:42:08 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 17:42:08 +0000
commit5975b2d0903bd5df128d55e20cd27d7c13b4e46c (patch)
tree6696492511c591fa8bf3b65a64864245caa3e7c2 /protocols
parent8617d7e00546f892c9084f7c382648b23d8bbb63 (diff)
another portion of "#ifdef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/definitions.h7
-rw-r--r--protocols/GTalkExt/stdafx.h4
-rw-r--r--protocols/MRA/Mra.h3
-rw-r--r--protocols/Quotes/DBUtils.h5
-rw-r--r--protocols/Quotes/QuotesProviderBase.cppbin59044 -> 58852 bytes
-rw-r--r--protocols/Quotes/stdafx.h13
-rw-r--r--protocols/Twitter/Debug.c6
-rw-r--r--protocols/Twitter/StringConv.h11
-rw-r--r--protocols/Twitter/main.cpp6
-rw-r--r--protocols/Twitter/twitter.h7
-rw-r--r--protocols/Twitter/utility.h12
11 files changed, 16 insertions, 58 deletions
diff --git a/protocols/FacebookRM/definitions.h b/protocols/FacebookRM/definitions.h
index 0679c567cf..5a862438d8 100644
--- a/protocols/FacebookRM/definitions.h
+++ b/protocols/FacebookRM/definitions.h
@@ -39,10 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOG_FAILURE 3
#define LOG_CRITICAL 4
-#if defined( _UNICODE )
+
#define NIIF_INTERN_TCHAR NIIF_INTERN_UNICODE // m_clist.h
#define mir_tstrdup mir_wstrdup // m_system.h
-#else
-#define NIIF_INTERN_TCHAR 0
-#define mir_tstrdup mir_strdup
-#endif
+
diff --git a/protocols/GTalkExt/stdafx.h b/protocols/GTalkExt/stdafx.h
index a5e11b980b..d9712d7e9c 100644
--- a/protocols/GTalkExt/stdafx.h
+++ b/protocols/GTalkExt/stdafx.h
@@ -26,10 +26,6 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_WARNINGS
-#if defined( UNICODE ) && !defined( _UNICODE )
- #define _UNICODE
-#endif
-
#include <assert.h>
#include <malloc.h>
#include <time.h>
diff --git a/protocols/MRA/Mra.h b/protocols/MRA/Mra.h
index 3f5a1f1394..e927d76dbc 100644
--- a/protocols/MRA/Mra.h
+++ b/protocols/MRA/Mra.h
@@ -8,9 +8,6 @@
#define _CRT_SECURE_NO_WARNINGS
-#if defined( UNICODE ) && !defined( _UNICODE )
- #define _UNICODE
-#endif
//#define CRTDLL
diff --git a/protocols/Quotes/DBUtils.h b/protocols/Quotes/DBUtils.h
index d154e99075..27e3de5038 100644
--- a/protocols/Quotes/DBUtils.h
+++ b/protocols/Quotes/DBUtils.h
@@ -4,11 +4,8 @@
std::string Quotes_DBGetStringA(HANDLE hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
-#ifdef _UNICODE
+
#define Quotes_DBGetStringT Quotes_DBGetStringW
-#else
-#define Quotes_DBGetStringT Quotes_DBGetStringA
-#endif
bool Quotes_DBWriteDouble(HANDLE hContact,const char* szModule,const char* szSetting,double dValue);
bool Quotes_DBReadDouble(HANDLE hContact,const char* szModule,const char* szSetting,double& rdValue);
diff --git a/protocols/Quotes/QuotesProviderBase.cpp b/protocols/Quotes/QuotesProviderBase.cpp
index c92c748a02..c60909d7fa 100644
--- a/protocols/Quotes/QuotesProviderBase.cpp
+++ b/protocols/Quotes/QuotesProviderBase.cpp
Binary files differ
diff --git a/protocols/Quotes/stdafx.h b/protocols/Quotes/stdafx.h
index 19c85a3303..23cd7c3c4a 100644
--- a/protocols/Quotes/stdafx.h
+++ b/protocols/Quotes/stdafx.h
@@ -74,7 +74,7 @@
#include <fstream>
#include <map>
-#ifdef _UNICODE
+
typedef std::wstring tstring;
typedef std::wostringstream tostringstream;
typedef std::wistringstream tistringstream;
@@ -84,17 +84,6 @@ typedef std::wostream tostream;
typedef std::wistream tistream;
typedef boost::posix_time::wtime_input_facet ttime_input_facet;
typedef boost::posix_time::wtime_facet ttime_facet;
-#else
-typedef std::string tstring;
-typedef std::ostringstream tostringstream;
-typedef std::istringstream tistringstream;
-typedef std::ofstream tofstream;
-typedef std::ifstream tifstream;
-typedef std::ostream tostream;
-typedef std::istream tistream;
-typedef boost::posix_time::time_input_facet ttime_input_facet;
-typedef boost::posix_time::time_facet ttime_facet;
-#endif
inline int quotes_stricmp(LPCTSTR p1,LPCTSTR p2)
{
diff --git a/protocols/Twitter/Debug.c b/protocols/Twitter/Debug.c
index cfc5c7fd4f..947df7a536 100644
--- a/protocols/Twitter/Debug.c
+++ b/protocols/Twitter/Debug.c
@@ -97,13 +97,11 @@ void _TRACE(LPCSTR fmt, ...)
TCHAR buf[DEBUG_TRACE_BUF_SIZE + 3] = _T("");
va_list va;
-#ifndef UNICODE
- char* tfmt = fmt;
-#else
+
wchar_t tfmt[DEBUG_TRACE_FMT_SIZE];
size_t tmp = 0;
mbstowcs_s(&tmp, tfmt, SIZEOF(tfmt), fmt, _TRUNCATE);
-#endif
+
va_start(va, fmt);
len = _vsntprintf_s(buf, SIZEOF(buf), _TRUNCATE, tfmt, va);
diff --git a/protocols/Twitter/StringConv.h b/protocols/Twitter/StringConv.h
index c5266f574d..ec25c15ef7 100644
--- a/protocols/Twitter/StringConv.h
+++ b/protocols/Twitter/StringConv.h
@@ -39,20 +39,13 @@ inline std::wstring UTF8ToWide(const std::string& str) { return MBToWide(str, C
inline std::string ANSIToUTF8(const std::string& str, UINT codePage = CP_ACP) { return WideToUTF8(MBToWide(str, codePage)); }
inline std::string UTF8ToANSI(const std::string& str, UINT codePage = CP_ACP) { return WideToMB(UTF8ToWide(str), codePage); }
-#ifdef _UNICODE
+
#define TCHARToUTF8 WideToUTF8
#define UTF8ToTCHAR UTF8ToWide
#define TCHARToWide
#define WideToTCHAR
#define TCHARToMB WideToMB
#define MBToTCHAR MBToWide
-#else
-#define TCHARToUTF8 ANSIToUTF8
-#define UTF8ToTCHAR UTF8ToANSI
-#define TCHARToWide MBToWide
-#define WideToTCHAR WideToMB
-#define TCHARToMB
-#define MBToTCHAR
-#endif
+
#endif // StringConv_h__
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp
index 077b54a0fa..42ffac5220 100644
--- a/protocols/Twitter/main.cpp
+++ b/protocols/Twitter/main.cpp
@@ -109,11 +109,9 @@ int OnModulesLoaded(WPARAM,LPARAM)
upd.szBetaChangelogURL = "http://twosx.net/mim/twitter/updater/changelog.html";
upd.pbBetaVersionPrefix = reinterpret_cast<BYTE*>("Twitter ");
upd.cpbBetaVersionPrefix = (int)strlen(reinterpret_cast<char*>(upd.pbBetaVersionPrefix));
-#ifdef UNICODE
+
upd.szBetaUpdateURL = "http://twosx.net/mim/twitter/updater/twitter.zip";
-#else
- upd.szBetaUpdateURL = "http://www.teamboxel.com/update/twitter/ansi";
-#endif
+
upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPlugin(
reinterpret_cast<PLUGININFO*>(&pluginInfo),curr_version) );
diff --git a/protocols/Twitter/twitter.h b/protocols/Twitter/twitter.h
index d26c06bdbd..54baa768f7 100644
--- a/protocols/Twitter/twitter.h
+++ b/protocols/Twitter/twitter.h
@@ -30,11 +30,8 @@ using std::vector;
#include "StringConv.h"
#include "stdafx.h"
-#if defined( _UNICODE )
- #define tstring wstring
-#else
- #define tstring string
-#endif
+#define tstring wstring
+
typedef unsigned long long twitter_id;
typedef std::map<std::wstring, std::wstring> OAuthParameters;
diff --git a/protocols/Twitter/utility.h b/protocols/Twitter/utility.h
index c827a6d1ec..cc60ee15c4 100644
--- a/protocols/Twitter/utility.h
+++ b/protocols/Twitter/utility.h
@@ -120,20 +120,16 @@ protected:
inline void mbcs_to_tcs(UINT code_page,const char *mbstr,TCHAR *tstr,int tlen)
{
-#ifdef UNICODE
+
MultiByteToWideChar(code_page,0,mbstr,-1,tstr,tlen);
-#else
- strncpy(tstr,mbstr,tlen);
-#endif
+
}
inline void wcs_to_tcs(UINT code_page,const wchar_t *wstr,TCHAR *tstr,int tlen)
{
-#ifdef UNICODE
+
wcsncpy(tstr,wstr,tlen);
-#else
- WideCharToMultiByte(code_page,0,wstr,-1,tstr,tlen,0,0);
-#endif
+
}
class ScopedLock