summaryrefslogtreecommitdiff
path: root/protocols/MSN
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN')
-rw-r--r--protocols/MSN/msn_global.h2
-rw-r--r--protocols/MSN/msn_libstr.cpp2
-rw-r--r--protocols/MSN/msn_lists.cpp6
-rw-r--r--protocols/MSN/msn_mail.cpp12
-rw-r--r--protocols/MSN/msn_misc.cpp38
5 files changed, 6 insertions, 54 deletions
diff --git a/protocols/MSN/msn_global.h b/protocols/MSN/msn_global.h
index 0edd856495..a791edadd9 100644
--- a/protocols/MSN/msn_global.h
+++ b/protocols/MSN/msn_global.h
@@ -220,7 +220,7 @@ __inline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
char* arrayToHex(BYTE* data, size_t datasz);
-#if defined(_UNICODE) || defined(_WIN64)
+#if defined(_WIN64)
#define MyInterlockedIncrement InterlockedIncrement
diff --git a/protocols/MSN/msn_libstr.cpp b/protocols/MSN/msn_libstr.cpp
index f12c3e25fd..50756b7ccd 100644
--- a/protocols/MSN/msn_libstr.cpp
+++ b/protocols/MSN/msn_libstr.cpp
@@ -195,9 +195,7 @@ static int SingleHexToDecimal(char c)
}
template void UrlDecode(char* str);
-#ifdef _UNICODE
template void UrlDecode(wchar_t* str);
-#endif
template <class chartype> void UrlDecode(chartype* str)
{
diff --git a/protocols/MSN/msn_lists.cpp b/protocols/MSN/msn_lists.cpp
index 2a63bb530c..5325e8190b 100644
--- a/protocols/MSN/msn_lists.cpp
+++ b/protocols/MSN/msn_lists.cpp
@@ -545,13 +545,11 @@ static void SaveSettings(HANDLE hItem, HWND hwndList, CMsnProto* proto)
}
else if (IsHContactInfo(hItem))
{
-#ifdef _UNICODE
+
TCHAR buf[MSN_MAX_EMAIL_LEN];
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
WideCharToMultiByte(CP_ACP, 0, buf, -1, szEmail, sizeof(szEmail), 0, 0);
-#else
- SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)szEmail);
-#endif
+
}
int dwMask = proto->Lists_GetMask(szEmail);
diff --git a/protocols/MSN/msn_mail.cpp b/protocols/MSN/msn_mail.cpp
index e70fbef344..d14e9704c7 100644
--- a/protocols/MSN/msn_mail.cpp
+++ b/protocols/MSN/msn_mail.cpp
@@ -269,19 +269,13 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
wchar_t* mimeFromW = tFileInfo.decode(From);
wchar_t* mimeSubjectW = tFileInfo.decode(Subject);
-#ifdef _UNICODE
+
mir_sntprintf(tBuffer2, SIZEOF(tBuffer2), TranslateT("Subject: %s"), mimeSubjectW);
-#else
- mir_sntprintf(tBuffer2, SIZEOF(tBuffer2), TranslateT("Subject: %S"), mimeSubjectW);
-#endif
-#ifdef _UNICODE
+
TCHAR* msgtxt = _stricmp(From, Fromaddr) ?
TranslateT("Hotmail from %s (%S)") : TranslateT("Hotmail from %s");
-#else
- TCHAR* msgtxt = _strcmpi(From, Fromaddr) ?
- TranslateT("Hotmail from %S (%s)") : TranslateT("Hotmail from %S");
-#endif
+
mir_sntprintf(tBuffer, SIZEOF(tBuffer), msgtxt, mimeFromW, Fromaddr);
mir_free(mimeFromW);
mir_free(mimeSubjectW);
diff --git a/protocols/MSN/msn_misc.cpp b/protocols/MSN/msn_misc.cpp
index 80d9fd46ec..ee3d188350 100644
--- a/protocols/MSN/msn_misc.cpp
+++ b/protocols/MSN/msn_misc.cpp
@@ -22,44 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "msn_proto.h"
#include "version.h"
-#if !defined(_UNICODE) && !defined(_WIN64)
-
-typedef LONG (WINAPI pIncrementFunc)(LONG volatile*);
-static pIncrementFunc MyInterlockedIncrement95;
-static pIncrementFunc MyInterlockedIncrementInit;
-
-pIncrementFunc *MyInterlockedIncrement = MyInterlockedIncrementInit;
-
-static CRITICAL_SECTION csInterlocked95;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// InterlockedIncrement emulation
-
-static LONG WINAPI MyInterlockedIncrement95(LONG volatile* pVal)
-{
- DWORD ret;
- EnterCriticalSection(&csInterlocked95);
- ret=++*pVal;
- LeaveCriticalSection(&csInterlocked95);
- return ret;
-}
-
-//there's a possible hole here if too many people call this at the same time, but that doesn't happen
-static LONG WINAPI MyInterlockedIncrementInit(LONG volatile* pVal)
-{
- DWORD ver = GetVersion();
- if ((ver & 0x80000000) && LOWORD(ver) == 0x0004)
- {
- InitializeCriticalSection(&csInterlocked95);
- MyInterlockedIncrement = MyInterlockedIncrement95;
- }
- else
- MyInterlockedIncrement = (pIncrementFunc*)InterlockedIncrement;
-
- return MyInterlockedIncrement(pVal);
-}
-
-#endif
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaStatusToMSN - status helper functions