From f8840b16acaa5cb11a4440ea62a96731a24f4d6e Mon Sep 17 00:00:00 2001
From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>
Date: Tue, 31 Mar 2009 05:16:22 +0000
Subject: x64 port
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@448 4f64403b-2f21-0410-a795-97e2b3489a10
---
yapp/popup_history_dlg.cpp | 2 +-
yapp/popups2.cpp | 4 +-
yapp/popups2_9.vcproj | 208 ++++++++++++++++++++++-----------------------
yapp/popwin.cpp | 16 ++--
yapp/services.cpp | 2 +-
yapp/str_utils.cpp | 4 +-
6 files changed, 118 insertions(+), 118 deletions(-)
(limited to 'yapp')
diff --git a/yapp/popup_history_dlg.cpp b/yapp/popup_history_dlg.cpp
index 2ab979b..b5673c7 100644
--- a/yapp/popup_history_dlg.cpp
+++ b/yapp/popup_history_dlg.cpp
@@ -496,7 +496,7 @@ void CopyPopupDataToClipboard(HWND hList, int selection)
if (found)
{
EmptyClipboard();
- int len = _tcslen(buffer);
+ int len = (int)_tcslen(buffer);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, (len + 2) * sizeof(TCHAR));
clipboard = (TCHAR *) GlobalLock(hData);
diff --git a/yapp/popups2.cpp b/yapp/popups2.cpp
index 8f12292..80c057a 100644
--- a/yapp/popups2.cpp
+++ b/yapp/popups2.cpp
@@ -137,7 +137,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
update.szComponentName = pluginInfo.shortName;
update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
+ update.cpbVersion = (int)strlen((char *)update.pbVersion);
update.szBetaChangelogURL = "https://server.scottellis.com.au/wsvn/mim_plugs/yapp/?op=log&rev=0&sc=0&isdir=1";
update.szUpdateURL = UPDATER_AUTOREGISTER;
@@ -150,7 +150,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_yapp.html";
update.pbBetaVersionPrefix = (BYTE *)"YAPP version ";
- update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+ update.cpbBetaVersionPrefix = (int)strlen((char *)update.pbBetaVersionPrefix);
CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
}
diff --git a/yapp/popups2_9.vcproj b/yapp/popups2_9.vcproj
index e8ab620..ed177cf 100644
--- a/yapp/popups2_9.vcproj
+++ b/yapp/popups2_9.vcproj
@@ -96,9 +96,9 @@
/>
@@ -116,22 +116,17 @@
/>
@@ -281,11 +281,13 @@
/>
@@ -368,12 +369,11 @@
/>
@@ -534,17 +526,21 @@
/>
custom_col) SetTextColor(ps.hdc, pd->colorText);
else SetTextColor(ps.hdc, colTime);
if(hFontTime) SelectObject(hdc, (HGDIOBJ)hFontTime);
- DrawText(ps.hdc, pwd->tbuff, _tcslen(pwd->tbuff), &avr, DT_VCENTER | DT_CENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->tbuff, (int)_tcslen(pwd->tbuff), &avr, DT_VCENTER | DT_CENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
avr.top = avr.bottom + options.av_padding;
}
@@ -457,12 +457,12 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
case PT_LEFT:
ttr.left = textxmin; ttr.right = ttr.left + pwd->time_width;
textxmin += pwd->time_width + options.padding;
- DrawText(ps.hdc, pwd->tbuff, _tcslen(pwd->tbuff), &ttr, DT_VCENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->tbuff, (int)_tcslen(pwd->tbuff), &ttr, DT_VCENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
break;
case PT_RIGHT:
ttr.right = textxmax; ttr.left = ttr.right - pwd->time_width;
textxmax -= pwd->time_width + options.padding;
- DrawText(ps.hdc, pwd->tbuff, _tcslen(pwd->tbuff), &ttr, DT_VCENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->tbuff, (int)_tcslen(pwd->tbuff), &ttr, DT_VCENTER | DT_LEFT | DT_SINGLELINE | DT_NOPREFIX);
break;
default:
break;
@@ -478,7 +478,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if(pwd->custom_col) SetTextColor(ps.hdc, pd->colorText);
else SetTextColor(ps.hdc, colFirstLine);
- DrawTextW(ps.hdc, pd->pwzTitle, wcslen(pd->pwzTitle), &tr, DT_VCENTER | DT_LEFT | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
+ DrawTextW(ps.hdc, pd->pwzTitle, (int)wcslen(pd->pwzTitle), &tr, DT_VCENTER | DT_LEFT | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
// title underline
RECT tur;
@@ -489,7 +489,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
FillRect(ps.hdc, &tur, pwd->underlineBrush);
// second line(s)
- int len_second = wcslen(pd->pwzText);
+ int len_second = (int)wcslen(pd->pwzText);
if(len_second) {
if(hFontSecondLine) SelectObject(ps.hdc, (HGDIOBJ)hFontSecondLine);
if(!pwd->custom_col)
@@ -593,14 +593,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if(options.time_layout != PT_NONE) {
SIZE size_t;
if(hFontTime) SelectObject(hdc, (HGDIOBJ)hFontTime);
- GetTextExtentPoint32(hdc, pwd->tbuff, _tcslen(pwd->tbuff), &size_t);
+ GetTextExtentPoint32(hdc, pwd->tbuff, (int)_tcslen(pwd->tbuff), &size_t);
pwd->time_height = size_t.cy;
pwd->time_width = size_t.cx;
}
// titlebar height
if(hFontFirstLine) SelectObject(hdc, (HGDIOBJ)hFontFirstLine);
- GetTextExtentPoint32W(hdc, pd->pwzTitle, wcslen(pd->pwzTitle), &size);
+ GetTextExtentPoint32W(hdc, pd->pwzTitle, (int)wcslen(pd->pwzTitle), &size);
pwd->tb_height = size.cy;
if(options.time_layout == PT_LEFT || options.time_layout == PT_RIGHT) {
if(pwd->tb_height < pwd->time_height) pwd->tb_height = pwd->time_height;
@@ -624,7 +624,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
}
// text height
- int len_second = wcslen(pd->pwzText);
+ int len_second = (int)wcslen(pd->pwzText);
if(len_second) {
RECT r;
r.left = r.top = 0;
diff --git a/yapp/services.cpp b/yapp/services.cpp
index 1864728..0278e2f 100644
--- a/yapp/services.cpp
+++ b/yapp/services.cpp
@@ -16,7 +16,7 @@ void StripBBCodesInPlace(wchar_t *text) {
return;
int read = 0, write = 0;
- int len = wcslen(text);
+ int len = (int)wcslen(text);
while(read <= len) { // copy terminating null too
while(read <= len && text[read] != L'[') {
diff --git a/yapp/str_utils.cpp b/yapp/str_utils.cpp
index d9e3575..c2636ac 100644
--- a/yapp/str_utils.cpp
+++ b/yapp/str_utils.cpp
@@ -203,7 +203,7 @@ char *t2u(const TCHAR *ts) {
}
void trimW(wchar_t *str) {
- int len = wcslen(str), pos;
+ int len = (int)wcslen(str), pos;
// trim whitespace (e.g. from OTR detection)
for(pos = len - 1; pos >= 0; pos--) {
if(str[pos] == L' ' || str[pos] == L'\t' || str[pos] == L'\r' || str[pos] == L'\n') str[pos] = 0;
@@ -216,7 +216,7 @@ void trimW(wchar_t *str) {
}
void trimA(char *str) {
- int len = strlen(str), pos;
+ int len = (int)strlen(str), pos;
// trim whitespace (e.g. from OTR detection)
for(pos = len - 1; pos >= 0; pos--) {
if(str[pos] == ' ' || str[pos] == '\t' || str[pos] == '\r' || str[pos] == '\n') str[pos] = 0;
--
cgit v1.2.3