summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Clist_nicer/INCLUDE/clist.h8
-rw-r--r--plugins/Clist_nicer/SRC/clc.cpp8
-rw-r--r--plugins/Clist_nicer/SRC/clcitems.cpp19
-rw-r--r--plugins/Clist_nicer/SRC/clcpaint.cpp19
-rw-r--r--plugins/Clist_nicer/SRC/clcutils.cpp6
-rw-r--r--plugins/Clist_nicer/SRC/clistevents.cpp6
-rw-r--r--plugins/Clist_nicer/SRC/clui.cpp21
-rw-r--r--plugins/Clist_nicer/SRC/extBackg.cpp23
-rw-r--r--plugins/Clist_nicer/SRC/init.cpp10
-rw-r--r--plugins/Clist_nicer/skineditor/skinedit.rc18
-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
-rw-r--r--src/modules/fonts/services.cpp4
-rw-r--r--src/modules/icolib/skin2icons.cpp10
-rw-r--r--tools/dbtool/dbtool.h12
-rw-r--r--tools/dbtool/langpack.cpp6
-rw-r--r--tools/dbtool/modulechain.cpp6
20 files changed, 53 insertions, 183 deletions
diff --git a/plugins/Clist_nicer/INCLUDE/clist.h b/plugins/Clist_nicer/INCLUDE/clist.h
index a4d956ba3c..79f0a29ec8 100644
--- a/plugins/Clist_nicer/INCLUDE/clist.h
+++ b/plugins/Clist_nicer/INCLUDE/clist.h
@@ -47,10 +47,4 @@ void SortContacts(void);
#define CLVM_INCLUDED_UNGROUPED 8
#define CLVM_USELASTMSG 16
-#if defined(_UNICODE)
- #define CLVM_MODULE "CLVM_W"
-#else
- #define CLVM_MODULE "CLVM"
-#endif
-
-
+#define CLVM_MODULE "CLVM_W"
diff --git a/plugins/Clist_nicer/SRC/clc.cpp b/plugins/Clist_nicer/SRC/clc.cpp
index 466f6a8e52..e32626a8b6 100644
--- a/plugins/Clist_nicer/SRC/clc.cpp
+++ b/plugins/Clist_nicer/SRC/clc.cpp
@@ -466,9 +466,9 @@ LBL_Def:
if (!FindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
break;
lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HANDLE)wParam, 0), safe_sizeof(contact->szText));
-#if defined(_UNICODE)
+
RTL_DetectAndSet(contact, 0);
-#endif
+
dat->bNeedSort = TRUE;
PostMessage(hwnd, INTM_SORTCLC, 0, 0);
goto LBL_Def;
@@ -554,9 +554,9 @@ LBL_Def:
contact->proto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
CallService(MS_CLIST_INVALIDATEDISPLAYNAME, wParam, 0);
lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HANDLE)wParam, 0), safe_sizeof(contact->szText));
-#if defined(_UNICODE)
+
RTL_DetectAndSet(contact, 0);
-#endif
+
dat->bNeedSort = TRUE;
PostMessage(hwnd, INTM_SORTCLC, 0, 0);
goto LBL_Def;
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp
index 34b3a66405..009a57a36d 100644
--- a/plugins/Clist_nicer/SRC/clcitems.cpp
+++ b/plugins/Clist_nicer/SRC/clcitems.cpp
@@ -76,13 +76,10 @@ struct ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, D
{
struct ClcGroup *p = saveAddGroup( hwnd, dat, szName, flags, groupId, calcTotalMembers);
- #if defined(_UNICODE)
+
if ( p && p->parent )
RTL_DetectGroupName( p->parent->cl.items[ p->parent->cl.count-1] );
- #else
- if ( p && p->parent )
- p->parent->cl.items[ p->parent->cl.count -1]->isRtl = 0;
- #endif
+
return p;
}
@@ -166,9 +163,9 @@ int AddContactToGroup(struct ClcData *dat, struct ClcGroup *group, HANDLE hConta
// notify other plugins to re-supply their extra images (icq for xstatus, mBirthday etc...)
NotifyEventHooks(hExtraImageApplying, (WPARAM)hContact, 0);
}
-#if defined(_UNICODE)
+
RTL_DetectAndSet( p, p->hContact);
-#endif
+
p->avatarLeft = p->extraIconRightBegin = -1;
p->flags |= cfg::getByte(p->hContact, "CList", "Priority", 0) ? CONTACTF_PRIORITY : 0;
@@ -342,7 +339,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto)
if ( !result )
DBFreeVariant( &dbv );
-#if defined(_UNICODE)
+
if(cEntry->bStatusMsgValid != STATUSMSG_NOTFOUND) {
WORD infoTypeC2[12];
int iLen, i
@@ -358,7 +355,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto)
}
}
}
-#endif
+
if(cEntry->hTimeZone == NULL)
TZ_LoadTimeZone(hContact, cEntry, szProto);
return cEntry->bStatusMsgValid;;
@@ -397,7 +394,7 @@ void ReloadExtraInfo(HANDLE hContact)
* autodetect RTL property of the nickname, evaluates the first 10 characters of the nickname only
*/
-#if defined(_UNICODE)
+
void RTL_DetectAndSet(struct ClcContact *contact, HANDLE hContact)
{
WORD infoTypeC2[12];
@@ -447,7 +444,7 @@ void RTL_DetectGroupName(struct ClcContact *group)
}
}
}
-#endif
+
/*
* check for exteneded user information - email, phone numbers, homepage
* set extra icons accordingly
diff --git a/plugins/Clist_nicer/SRC/clcpaint.cpp b/plugins/Clist_nicer/SRC/clcpaint.cpp
index 7d3d799992..ef7cf12932 100644
--- a/plugins/Clist_nicer/SRC/clcpaint.cpp
+++ b/plugins/Clist_nicer/SRC/clcpaint.cpp
@@ -497,7 +497,7 @@ void __inline PaintItem(HDC hdcMem, struct ClcGroup *group, struct ClcContact *c
else
cEntry = cfg::eCache;
-#if defined(_UNICODE)
+
if(dat->bisEmbedded)
goto set_bg_l;
@@ -525,16 +525,7 @@ void __inline PaintItem(HDC hdcMem, struct ClcGroup *group, struct ClcContact *c
bg_indent_l = cfg::dat.bApplyIndentToBg ? indent * dat->groupIndent : 0;
set_bg_l:
-#else
- if(type == CLCIT_GROUP && cfg::dat.bGroupAlign == CLC_GROUPALIGN_RIGHT && !dat->bisEmbedded && API::pfnSetLayout != 0) {
- g_RTL = TRUE;
- bg_indent_r = cfg::dat.bApplyIndentToBg ? indent * dat->groupIndent : 0;
- }
- else {
- g_RTL = FALSE;
- bg_indent_l = cfg::dat.bApplyIndentToBg ? indent * dat->groupIndent : 0;
- }
-#endif
+
g_hottrack = dat->exStyle & CLS_EX_TRACKSELECT && type == CLCIT_CONTACT && dat->iHotTrack == index;
if (g_hottrack == selected)
@@ -1276,11 +1267,9 @@ nodisplay:
if ((dwFlags & CLUI_FRAME_SHOWSTATUSMSG && smsgValid > STATUSMSG_XSTATUSID) || smsgValid == STATUSMSG_XSTATUSNAME)
szText = cEntry->statusMsg;
else
-#if defined(_UNICODE)
+
szText = &statusNames[cstatus - ID_STATUS_OFFLINE][0];
-#else
- szText = statusNames[cstatus - ID_STATUS_OFFLINE];
-#endif
+
if(cEntry->dwCFlags & ECF_RTLSTATUSMSG && cfg::dat.bUseDCMirroring == 3)
dt_2ndrowflags |= (DT_RTLREADING | DT_RIGHT);
diff --git a/plugins/Clist_nicer/SRC/clcutils.cpp b/plugins/Clist_nicer/SRC/clcutils.cpp
index e4aee0fda9..f41b091517 100644
--- a/plugins/Clist_nicer/SRC/clcutils.cpp
+++ b/plugins/Clist_nicer/SRC/clcutils.cpp
@@ -542,7 +542,7 @@ void BeginRenameSelection(HWND hwnd, struct ClcData *dat)
for (i=0; i <= FONTID_LAST; i++)
if (h<dat->fontInfo[i].fontHeight+2) h=dat->fontInfo[i].fontHeight+2;
}
-#if defined(_UNICODE)
+
dat->hwndRenameEdit = CreateWindowEx(0, _T("RichEdit20W"),contact->szText,WS_CHILD|WS_BORDER|ES_MULTILINE|ES_AUTOHSCROLL,x,y,clRect.right-x,h,hwnd,NULL,g_hInst,NULL);
{
if ((contact->type == CLCIT_CONTACT && cfg::eCache[contact->extraCacheEntry].dwCFlags & ECF_RTLNICK) || (contact->type == CLCIT_GROUP && contact->isRtl)) {
@@ -556,9 +556,7 @@ void BeginRenameSelection(HWND hwnd, struct ClcData *dat)
SetWindowText(dat->hwndRenameEdit, contact->szText);
}
}
-#else
- dat->hwndRenameEdit = CreateWindow(_T("EDIT"),contact->szText,WS_CHILD|WS_BORDER|ES_MULTILINE|ES_AUTOHSCROLL,x,y,clRect.right-x,h,hwnd,NULL,g_hInst,NULL);
-#endif
+
//dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, x, y, clRect.right - x, dat->rowHeight, hwnd, NULL, g_hInst, NULL);
OldRenameEditWndProc = (WNDPROC) SetWindowLongPtr(dat->hwndRenameEdit, GWLP_WNDPROC, (LONG_PTR) RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM) (contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
diff --git a/plugins/Clist_nicer/SRC/clistevents.cpp b/plugins/Clist_nicer/SRC/clistevents.cpp
index 953877c27d..93b90c34ce 100644
--- a/plugins/Clist_nicer/SRC/clistevents.cpp
+++ b/plugins/Clist_nicer/SRC/clistevents.cpp
@@ -283,14 +283,12 @@ struct CListEvent* AddEvent(CLISTEVENT *cle)
if (nmi) {
TCHAR szBuffer[128];
TCHAR* szStatus = pcli->pfnGetStatusModeDescription(cfg::getWord(p->cle.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
-#if defined(_UNICODE)
+
TCHAR szwProto[64];
MultiByteToWideChar(CP_ACP, 0, szProto, -1, szwProto, 64);
szwProto[63] = 0;
_snwprintf(szBuffer, SIZEOF(szBuffer), L"%s: %s (%s)", szwProto, szName, szStatus);
-#else
- _snprintf(szBuffer, SIZEOF(szBuffer), "%s: %s (%s)", szProto, szName, szStatus);
-#endif
+
szBuffer[127] = 0;
AppendMenu(cfg::dat.hMenuNotify, MF_BYCOMMAND | MF_STRING, cfg::dat.wNextMenuID, szBuffer);
mii.hbmpItem = HBMMENU_CALLBACK;
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp
index 93fdd989d4..43e459a6c0 100644
--- a/plugins/Clist_nicer/SRC/clui.cpp
+++ b/plugins/Clist_nicer/SRC/clui.cpp
@@ -316,17 +316,12 @@ static int CluiModulesLoaded(WPARAM wParam, LPARAM lParam)
static Update upd = {0};
static const char *szPrefix = "clist_nicer_plus ";
-#if defined(_UNICODE)
+
static char *component = "CList Nicer+ (Unicode)";
static char szCurrentVersion[30];
static char *szVersionUrl = "http://download.miranda.or.at/clist_nicer/0.9/versionW.txt";
static char *szUpdateUrl = "http://download.miranda.or.at/clist_nicer/0.9/clist_nicer_plusW.zip";
-#else
- static char *component = "CList Nicer+";
- static char szCurrentVersion[30];
- static char *szVersionUrl = "http://download.miranda.or.at/clist_nicer/0.9/version.txt";
- static char *szUpdateUrl = "http://download.miranda.or.at/clist_nicer/0.9/clist_nicer_plus.zip";
-#endif
+
// updater plugin support
@@ -2314,11 +2309,9 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
{
char str[64];
DWORD v = pluginInfo.version;
-#if defined(_UNICODE)
+
mir_snprintf(str, sizeof(str), "%s %d.%d.%d.%d (Unicode)", Translate("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v)));
-#else
- mir_snprintf(str, sizeof(str), "%s %d.%d.%d.%d", Translate("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v)));
-#endif
+
SetDlgItemTextA(hwndDlg, IDC_VERSION, str);
mir_snprintf(str, sizeof(str), Translate("Built %s %s"), __DATE__, __TIME__);
SetDlgItemTextA(hwndDlg, IDC_BUILDTIME, str);
@@ -2335,11 +2328,9 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
DestroyWindow(hwndDlg);
return TRUE;
case IDC_SUPPORT:
-#if defined(_UNICODE)
+
CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda-im.org/download/details.php?action=viewfile&id=2365");
-#else
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda-im.org/download/details.php?action=viewfile&id=2189");
-#endif
+
break;
}
break;
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp
index f5af31a2fb..ea9f451651 100644
--- a/plugins/Clist_nicer/SRC/extBackg.cpp
+++ b/plugins/Clist_nicer/SRC/extBackg.cpp
@@ -1210,12 +1210,10 @@ static void BTN_ReadItem(char *itemName, char *file)
GetPrivateProfileStringA(itemName, "Tip", "None", szBuffer, 1000, file);
if(strcmp(szBuffer, "None")) {
-#if defined(_UNICODE)
+
MultiByteToWideChar(cfg::dat.langPackCP, 0, szBuffer, -1, tmpItem.szTip, 256);
tmpItem.szTip[255] = 0;
-#else
- mir_snprintf(tmpItem.szTip, 256, "%s", szBuffer);
-#endif
+
}
else
tmpItem.szTip[0] = 0;
@@ -1267,9 +1265,9 @@ void IMG_LoadItems()
* rewrite the skin loading in TCHAR manner
*/
-#if defined(_UNICODE)
+
WideCharToMultiByte(CP_ACP, 0, tszFileName, MAX_PATH, szFileName, MAX_PATH, 0, 0);
-#endif
+
DBFreeVariant(&dbv);
@@ -1335,13 +1333,10 @@ void LoadPerContactSkins(TCHAR *tszFileName)
StatusItems_t *items = NULL, *this_item;
HANDLE hContact;
int i = 1;
-#if defined(_UNICODE)
- char file[MAX_PATH];
+ char file[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, tszFileName, MAX_PATH, file, MAX_PATH, 0, 0);
file[MAX_PATH - 1] = 0;
-#else
- char *file = tszFileName;
-#endif
+
ReadItem(&default_item, "%Default", file);
ZeroMemory(szSections, 3000);
@@ -1573,11 +1568,9 @@ static void ApplyCLUISkin()
char szFinalName[MAX_PATH];
if (!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
MY_pathToAbsolute(dbv.ptszVal, tszFinalName);
-#if defined(_UNICODE)
+
WideCharToMultiByte(CP_ACP, 0, tszFinalName, MAX_PATH, szFinalName, MAX_PATH, 0, 0);
-#else
- mir_sntprintf(szFinalName, MAX_PATH, _T("%s"), tszFinalName);
-#endif
+
if(cfg::getByte("CLUI", "skin_changed", 0)) {
extbk_import(szFinalName, 0);
SaveCompleteStructToDB();
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp
index 47c1e5c249..11d68d0012 100644
--- a/plugins/Clist_nicer/SRC/init.cpp
+++ b/plugins/Clist_nicer/SRC/init.cpp
@@ -118,7 +118,7 @@ PLUGININFOEX pluginInfo =
{0x8f79b4ee, 0xeb48, 0x4a03, { 0x87, 0x3e, 0x27, 0xbe, 0x6b, 0x7e, 0x9a, 0x25 }} //{8F79B4EE-EB48-4a03-873E-27BE6B7E9A25}
};
-#if defined(_UNICODE)
+
void _DebugTraceW(const wchar_t *fmt, ...)
{
#ifdef _DEBUG
@@ -133,7 +133,7 @@ void _DebugTraceW(const wchar_t *fmt, ...)
OutputDebugStringW(debug);
#endif
}
-#endif
+
void _DebugTraceA(const char *fmt, ...)
{
@@ -324,12 +324,10 @@ extern "C" int __declspec(dllexport) CListInitialise(PLUGINLINK * link)
CallService(MS_DB_GETPROFILEPATH, MAX_PATH, (LPARAM)szProfilePath);
-#if defined(_UNICODE)
+
MultiByteToWideChar(CP_ACP, 0, szProfilePath, MAX_PATH, cfg::dat.tszProfilePath, MAX_PATH);
cfg::dat.tszProfilePath[MAX_PATH - 1] = 0;
-#else
- mir_sntprintf(cfg::dat.tszProfilePath, MAX_PATH, "%s", szProfilePath);
-#endif
+
_tcslwr(cfg::dat.tszProfilePath);
diff --git a/plugins/Clist_nicer/skineditor/skinedit.rc b/plugins/Clist_nicer/skineditor/skinedit.rc
index 25f67d316c..66decd262f 100644
--- a/plugins/Clist_nicer/skineditor/skinedit.rc
+++ b/plugins/Clist_nicer/skineditor/skinedit.rc
@@ -101,7 +101,7 @@ VS_VERSION_INFO VERSIONINFO
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
-#if defined(UNICODE)
+
BEGIN
BLOCK "0c0704b0"
BEGIN
@@ -115,21 +115,7 @@ BEGIN
VALUE "ProductVersion", "0, 0, 0, 2"
END
END
-#else
- BEGIN
- BLOCK "0c0704b0"
- BEGIN
- VALUE "FileDescription", "Skin Editor (ANSI)"
- VALUE "FileVersion", "0, 0, 0, 2"
- VALUE "InternalName", "CLN SkinEdit (ANSI)"
- VALUE "LegalCopyright", "Copyright (C) 2006"
- VALUE "LegalTrademarks", "GPL"
- VALUE "OriginalFilename", "cln_skinedit.dll"
- VALUE "ProductName", "Clist Nicer+ skin editor"
- VALUE "ProductVersion", "0, 0, 0, 2"
- END
- END
-#endif
+
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0xc07, 1200
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
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp
index e53c0f0b43..b19fd59144 100644
--- a/src/modules/fonts/services.cpp
+++ b/src/modules/fonts/services.cpp
@@ -341,7 +341,6 @@ INT_PTR GetFontW(WPARAM wParam, LPARAM lParam)
INT_PTR GetFont(WPARAM wParam, LPARAM lParam)
{
- #if defined( _UNICODE )
TFontID temp;
LOGFONT lftemp;
ConvertFontID((FontID *)wParam, &temp);
@@ -349,9 +348,6 @@ INT_PTR GetFont(WPARAM wParam, LPARAM lParam)
ConvertLOGFONT( &lftemp, ( LOGFONTA* )lParam );
return ret;
}
- #else
- return sttGetFontWorker(( TFontID* )wParam, ( LOGFONT* )lParam );
- #endif
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 89fec8abf0..2e328bbb89 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -581,19 +581,11 @@ HANDLE IcoLib_AddNewIcon( SKINICONDESC* sid )
if ( sid->pszDefaultFile ) {
if ( utf_path ) {
- #ifdef _UNICODE
+
WCHAR fileFull[ MAX_PATH ];
pathToAbsoluteW( sid->pwszDefaultFile, fileFull, NULL );
item->default_file = mir_wstrdup( fileFull );
- #else
- char* file = mir_u2a( sid->pwszDefaultFile );
- char fileFull[ MAX_PATH ];
-
- pathToAbsolute( file, fileFull, NULL );
- SAFE_FREE(( void** )&file );
- item->default_file = mir_strdup( fileFull );
- #endif
}
else {
WCHAR *file = mir_a2u( sid->pszDefaultFile );
diff --git a/tools/dbtool/dbtool.h b/tools/dbtool/dbtool.h
index 7bade33d34..6bc7591392 100644
--- a/tools/dbtool/dbtool.h
+++ b/tools/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>
@@ -117,13 +114,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/tools/dbtool/langpack.cpp b/tools/dbtool/langpack.cpp
index 97d24cadf4..327561def1 100644
--- a/tools/dbtool/langpack.cpp
+++ b/tools/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/tools/dbtool/modulechain.cpp b/tools/dbtool/modulechain.cpp
index 515ec9bfbd..ffa7680dbb 100644
--- a/tools/dbtool/modulechain.cpp
+++ b/tools/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);
}
}