summaryrefslogtreecommitdiff
path: root/protocols/Yahoo
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r--protocols/Yahoo/src/avatar.cpp8
-rw-r--r--protocols/Yahoo/src/chat.cpp18
-rw-r--r--protocols/Yahoo/src/file_transfer.cpp4
-rw-r--r--protocols/Yahoo/src/icolib.cpp8
-rw-r--r--protocols/Yahoo/src/im.cpp2
-rw-r--r--protocols/Yahoo/src/options.cpp10
-rw-r--r--protocols/Yahoo/src/proto.cpp6
-rw-r--r--protocols/Yahoo/src/search.cpp2
-rw-r--r--protocols/Yahoo/src/services.cpp12
-rw-r--r--protocols/Yahoo/src/util.cpp4
-rw-r--r--protocols/Yahoo/src/yahoo.cpp22
11 files changed, 48 insertions, 48 deletions
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp
index 35af086732..002764f165 100644
--- a/protocols/Yahoo/src/avatar.cpp
+++ b/protocols/Yahoo/src/avatar.cpp
@@ -126,8 +126,8 @@ void CYahooProto::SendAvatar(const TCHAR *szFile)
sf->filesize = statbuf.st_size;
wchar_t tszFilename[MAX_PATH];
- wcsncpy(tszFilename, szFile, SIZEOF(tszFilename) - 1);
- GetShortPathNameW(szFile, tszFilename, SIZEOF(tszFilename));
+ wcsncpy(tszFilename, szFile, _countof(tszFilename) - 1);
+ GetShortPathNameW(szFile, tszFilename, _countof(tszFilename));
char szFilename[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, tszFilename, -1, szFilename, MAX_PATH, 0, 0);
sf->filename = strdup(szFilename);
@@ -468,7 +468,7 @@ void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int
// Need to delete the Avatar File!!
TCHAR szFile[MAX_PATH];
- GetAvatarFileName(hContact, szFile, SIZEOF(szFile) - 1, 0);
+ GetAvatarFileName(hContact, szFile, _countof(szFile) - 1, 0);
DeleteFile(szFile);
// Reset the avatar and cleanup.
@@ -651,7 +651,7 @@ INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
if (getDword(pai->hContact, "PictCK", 0) == 0)
return GAIR_NOAVATAR;
- GetAvatarFileName(pai->hContact, pai->filename, SIZEOF(pai->filename), getByte(pai->hContact, "AvatarType", 0));
+ GetAvatarFileName(pai->hContact, pai->filename, _countof(pai->filename), getByte(pai->hContact, "AvatarType", 0));
pai->format = PA_FORMAT_PNG;
debugLogA("[YAHOO_GETAVATARINFO] filename: %s", pai->filename);
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp
index f29c2b99cb..f1a576055f 100644
--- a/protocols/Yahoo/src/chat.cpp
+++ b/protocols/Yahoo/src/chat.cpp
@@ -54,7 +54,7 @@ void CALLBACK ConferenceRequestCB(PVOID dwParam);
void ext_yahoo_got_conf_invite(int id, const char *me, const char *who, const char *room, const char *msg, YList *members)
{
char z[1024];
- mir_snprintf(z, SIZEOF(z), Translate("[miranda] Got conference invite to room: %s with msg: %s"), room ? room : "", msg ? msg : "");
+ mir_snprintf(z, _countof(z), Translate("[miranda] Got conference invite to room: %s with msg: %s"), room ? room : "", msg ? msg : "");
LOG(("[ext_yahoo_got_conf_invite] %s", z));
CYahooProto* ppro = getProtoById(id);
@@ -91,7 +91,7 @@ void ext_yahoo_conf_userdecline(int id, const char *me, const char *who, const c
TCHAR info[1024];
TCHAR *whot = mir_utf8decodeT(who);
TCHAR *msgt = mir_utf8decodeT(msg);
- mir_sntprintf(info, SIZEOF(info), TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : _T(""));
+ mir_sntprintf(info, _countof(info), TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : _T(""));
GETPROTOBYID(id)->ChatEvent(room, who, GC_EVENT_INFORMATION, info);
mir_free(msgt);
mir_free(whot);
@@ -342,7 +342,7 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
{ TranslateT("&Invite user..."), 10, MENU_ITEM, FALSE },
{ TranslateT("&Leave chat session"), 20, MENU_ITEM, FALSE }
};
- gcmi->nItems = SIZEOF(Items);
+ gcmi->nItems = _countof(Items);
gcmi->Item = (gc_item*)Items;
}
else if (gcmi->Type == MENU_ON_NICKLIST) {
@@ -355,7 +355,7 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
{ _T(""), 100, MENU_SEPARATOR, FALSE },
{ TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE }
};
- gcmi->nItems = SIZEOF(Items);
+ gcmi->nItems = _countof(Items);
gcmi->Item = (gc_item*)Items;
}
else {
@@ -364,7 +364,7 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
{ TranslateT("User &history"), 20, MENU_ITEM, FALSE }
};
- gcmi->nItems = SIZEOF(Items);
+ gcmi->nItems = _countof(Items);
gcmi->Item = (gc_item*)Items;
}
mir_free(id);
@@ -501,7 +501,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDC_ADDSCR:
if (param->ppro->m_bLoggedIn) {
TCHAR sn[64];
- GetDlgItemText(hwndDlg, IDC_EDITSCR, sn, SIZEOF(sn));
+ GetDlgItemText(hwndDlg, IDC_EDITSCR, sn, _countof(sn));
CLCINFOITEM cii = { 0 };
cii.cbSize = sizeof(cii);
@@ -516,7 +516,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDOK:
{
TCHAR msg[1024];
- GetDlgItemText(hwndDlg, IDC_MSG, msg, SIZEOF(msg));
+ GetDlgItemText(hwndDlg, IDC_MSG, msg, _countof(msg));
HWND hwndList = GetDlgItem(hwndDlg, IDC_CCLIST);
YList *who = NULL;
@@ -589,7 +589,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDCANCEL:
if (cm) {
TCHAR msg[1024];
- GetDlgItemText(hwndDlg, IDC_MSG2, msg, SIZEOF(msg));
+ GetDlgItemText(hwndDlg, IDC_MSG2, msg, _countof(msg));
yahoo_conference_decline(param->ppro->m_id, NULL, cm->members, param->room, T2Utf(msg));
param->ppro->m_chatrooms.remove((CYahooProto::ChatRoom*)&param->room);
@@ -612,7 +612,7 @@ static void CALLBACK ConferenceRequestCB(PVOID pParam)
INT_PTR __cdecl CYahooProto::CreateConference(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
char room[128];
- mir_snprintf(room, SIZEOF(room), "%s-%u", m_yahoo_id, time(NULL));
+ mir_snprintf(room, _countof(room), "%s-%u", m_yahoo_id, time(NULL));
InviteChatParam* param = new InviteChatParam(room, this);
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL,
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp
index fc6a6ae290..91083d9568 100644
--- a/protocols/Yahoo/src/file_transfer.cpp
+++ b/protocols/Yahoo/src/file_transfer.cpp
@@ -299,7 +299,7 @@ static void dl_file(int id, INT_PTR fd, int error, const char *filename, unsigne
*
* Don't rely on workingDir to be right, since it's not used to check if file exists.
*/
- mir_sntprintf(filefull, SIZEOF(filefull), _T("%s\\%s"), sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile);
+ mir_sntprintf(filefull, _countof(filefull), _T("%s\\%s"), sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile);
FREE(sf->pfts.tszCurrentFile);
sf->pfts.tszCurrentFile = _tcsdup(filefull);
@@ -545,7 +545,7 @@ void CYahooProto::ext_got_files(const char *me, const char *who, const char *ft_
char z[1024];
struct yahoo_file_info *fi = (struct yahoo_file_info *) f->data;
- mir_snprintf(z, SIZEOF(z), "%s (%lu)\r\n", fi->filename, fi->filesize);
+ mir_snprintf(z, _countof(z), "%s (%lu)\r\n", fi->filename, fi->filesize);
mir_strcat(fn, z);
fc++;
}
diff --git a/protocols/Yahoo/src/icolib.cpp b/protocols/Yahoo/src/icolib.cpp
index 85ec6ec28e..74aca39d1a 100644
--- a/protocols/Yahoo/src/icolib.cpp
+++ b/protocols/Yahoo/src/icolib.cpp
@@ -30,19 +30,19 @@ static IconItem iconList[] =
void CYahooProto::IconsInit(void)
{
- Icon_Register(hInstance, "Protocols/YAHOO", iconList, SIZEOF(iconList), "YAHOO");
+ Icon_Register(hInstance, "Protocols/YAHOO", iconList, _countof(iconList), "YAHOO");
}
HICON CYahooProto::LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "YAHOO_%s", name);
+ mir_snprintf(szSettingName, _countof(szSettingName), "YAHOO_%s", name);
return IcoLib_GetIcon(szSettingName, big);
}
HANDLE CYahooProto::GetIconHandle(int iconId)
{
- for (unsigned i = 0; i < SIZEOF(iconList); i++)
+ for (unsigned i = 0; i < _countof(iconList); i++)
if (iconList[i].defIconID == iconId)
return iconList[i].hIcolib;
@@ -52,6 +52,6 @@ HANDLE CYahooProto::GetIconHandle(int iconId)
void CYahooProto::ReleaseIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "YAHOO_%s", name);
+ mir_snprintf(szSettingName, _countof(szSettingName), "YAHOO_%s", name);
IcoLib_Release(szSettingName, big);
}
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 5192666321..db6ead3956 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -40,7 +40,7 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons
if (stat == 2) {
char z[1024];
- mir_snprintf(z, SIZEOF(z), "Error sending message to %s", who);
+ mir_snprintf(z, _countof(z), "Error sending message to %s", who);
LOG((z));
ShowError(TranslateT("Yahoo Error"), _A2T(z));
return;
diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp
index f8eeab9976..085c488add 100644
--- a/protocols/Yahoo/src/options.cpp
+++ b/protocols/Yahoo/src/options.cpp
@@ -97,7 +97,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
bool reconnectRequired = false;
char str[128];
- GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, _countof(str));
if (ppro->getString(YAHOO_LOGINID, &dbv)) {
reconnectRequired = true;
}
@@ -108,7 +108,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
}
ppro->setString(YAHOO_LOGINID, str);
- GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, _countof(str));
if (ppro->getString(YAHOO_PASSWORD, &dbv)) {
reconnectRequired = true;
}
@@ -119,7 +119,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
}
ppro->setString(YAHOO_PASSWORD, str);
- GetDlgItemTextA(hwndDlg, IDC_NICK, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_NICK, str, _countof(str));
if (str[0] == '\0') {
@@ -213,7 +213,7 @@ YAHOO_DEFAULT_JAPAN_LOGIN_SERVER :
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
bool reconnectRequired = false;
char str[128];
- GetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, str, _countof(str));
DBVARIANT dbv;
if (ppro->getString(YAHOO_LOGINSERVER, &dbv)) {
@@ -303,7 +303,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wP
MessageBox(hwndDlg, TranslateT("You need to be connected to Yahoo to add to Ignore List."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION);
else {
char id[128];
- int i = GetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, id, SIZEOF(id));
+ int i = GetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, id, _countof(id));
if (i < 3) {
MessageBox(hwndDlg, TranslateT("Please enter a valid buddy name to ignore."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index 0ebea61427..0689e010b3 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -68,7 +68,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM)
HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CYahooProto::OnPrebuildContactMenu);
TCHAR tModuleDescr[100];
- mir_sntprintf(tModuleDescr, SIZEOF(tModuleDescr), TranslateT("%s plugin connections"), m_tszUserName);
+ mir_sntprintf(tModuleDescr, _countof(tModuleDescr), TranslateT("%s plugin connections"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
@@ -707,7 +707,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
char str[128];
bool reconnectRequired = false;
- GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, _countof(str));
if (ppro->getString(YAHOO_LOGINID, &dbv)) {
reconnectRequired = true;
@@ -719,7 +719,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
ppro->setString(YAHOO_LOGINID, str);
- GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, _countof(str));
if (ppro->getString(YAHOO_PASSWORD, &dbv)) {
reconnectRequired = true;
diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp
index b0ab4bae82..0e05230c5c 100644
--- a/protocols/Yahoo/src/search.cpp
+++ b/protocols/Yahoo/src/search.cpp
@@ -159,7 +159,7 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND)
HWND hwndDlg = (HWND)pHWND;
TCHAR searchid[128];
- GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, SIZEOF(searchid));
+ GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, _countof(searchid));
if (mir_tstrlen(searchid) == 0) {
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index 5900aea998..0155d8a3c6 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -146,7 +146,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam
CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
/* Get String from dialog */
- GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, SIZEOF(str));
+ GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, _countof(str));
/* Save it for later use */
ppro->setString(YAHOO_CUSTSTATDB, str);
@@ -173,7 +173,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam
BOOL toSet;
- toSet = GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, SIZEOF(str)) != 0;
+ toSet = GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, _countof(str)) != 0;
EnableWindow(GetDlgItem(hwndDlg, IDOK), toSet);
}
@@ -224,7 +224,7 @@ void CYahooProto::OpenURL(const char *url, int autoLogin)
y = yahoo_urlencode(yahoo_get_cookie(m_id, "y"));
t = yahoo_urlencode(yahoo_get_cookie(m_id, "t"));
u = yahoo_urlencode(url);
- mir_snprintf(tUrl, SIZEOF(tUrl),
+ mir_snprintf(tUrl, _countof(tUrl),
"http://msg.edit.yahoo.com/config/reset_cookies?&.y=Y=%s&.t=T=%s&.ver=2&.done=http%%3a//us.rd.yahoo.com/messenger/client/%%3f%s",
y, t, u);
@@ -233,7 +233,7 @@ void CYahooProto::OpenURL(const char *url, int autoLogin)
FREE(u);
}
else {
- mir_snprintf(tUrl, SIZEOF(tUrl), url);
+ mir_snprintf(tUrl, _countof(tUrl), url);
}
debugLogA("[YahooOpenURL] url: %s Final URL: %s", url, tUrl);
@@ -259,7 +259,7 @@ INT_PTR __cdecl CYahooProto::OnShowProfileCommand(WPARAM wParam, LPARAM lParam)
if (getString(wParam, YAHOO_LOGINID, &dbv))
return 0;
- mir_snprintf(tUrl, SIZEOF(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
+ mir_snprintf(tUrl, _countof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
db_free(&dbv);
OpenURL(tUrl, 0);
@@ -285,7 +285,7 @@ INT_PTR __cdecl CYahooProto::OnShowMyProfileCommand(WPARAM wParam, LPARAM lParam
}
char tUrl[4096];
- mir_snprintf(tUrl, SIZEOF(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
+ mir_snprintf(tUrl, _countof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
db_free(&dbv);
OpenURL(tUrl, 0);
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp
index 098eae59e7..7a04f48e61 100644
--- a/protocols/Yahoo/src/util.cpp
+++ b/protocols/Yahoo/src/util.cpp
@@ -112,8 +112,8 @@ int CYahooProto::ShowPopup(const TCHAR* nickname, const TCHAR* msg, const char *
POPUPDATAT ppd = { 0 };
ppd.PluginWindowProc = PopupWindowProc;
- mir_tstrncpy(ppd.lptzContactName, nickname, SIZEOF(ppd.lptzContactName));
- mir_tstrncpy(ppd.lptzText, msg, SIZEOF(ppd.lptzText));
+ mir_tstrncpy(ppd.lptzContactName, nickname, _countof(ppd.lptzContactName));
+ mir_tstrncpy(ppd.lptzText, msg, _countof(ppd.lptzText));
if (szURL != NULL) {
ppd.lchIcon = LoadIconEx(!mir_strcmpi(szURL, "http://mail.yahoo.com") ? "mail" : "calendar");
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index 7e98c01909..1975b778be 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -519,7 +519,7 @@ void CYahooProto::ext_got_audible(const char *me, const char *who, const char *a
}
char z[1028];
- mir_snprintf(z, SIZEOF(z), "[miranda-audible] %s", msg ? msg : "");
+ mir_snprintf(z, _countof(z), "[miranda-audible] %s", msg ? msg : "");
ext_got_im((char*)me, (char*)who, 0, z, 0, 0, 1, -1, NULL, 0);
}
@@ -733,7 +733,7 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha
nick[0] = '\0';
if (lname && fname)
- mir_snprintf(nick, SIZEOF(nick), "%s %s", fname, lname);
+ mir_snprintf(nick, _countof(nick), "%s %s", fname, lname);
else if (lname)
strncpy_s(nick, lname, _TRUNCATE);
else if (fname)
@@ -924,15 +924,15 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt)
TCHAR z[MAX_SECONDLINE], title[MAX_CONTACTNAME];
if (from == NULL) {
- mir_sntprintf(title, SIZEOF(title), _T("%s: %s"), m_tszUserName, TranslateT("New Mail"));
- mir_sntprintf(z, SIZEOF(z), TranslateT("You have %i unread messages"), cnt);
+ mir_sntprintf(title, _countof(title), _T("%s: %s"), m_tszUserName, TranslateT("New Mail"));
+ mir_sntprintf(z, _countof(z), TranslateT("You have %i unread messages"), cnt);
}
else {
- mir_sntprintf(title, SIZEOF(title), TranslateT("New Mail (%i messages)"), cnt);
+ mir_sntprintf(title, _countof(title), TranslateT("New Mail (%i messages)"), cnt);
ptrT tszFrom(mir_utf8decodeT(from));
ptrT tszSubj(mir_utf8decodeT(subj));
- mir_sntprintf(z, SIZEOF(z), TranslateT("From: %s\nSubject: %s"), (TCHAR*)tszFrom, (TCHAR*)tszSubj);
+ mir_sntprintf(z, _countof(z), TranslateT("From: %s\nSubject: %s"), (TCHAR*)tszFrom, (TCHAR*)tszSubj);
}
if (!ShowPopup(title, z, "http://mail.yahoo.com"))
@@ -984,7 +984,7 @@ void ext_yahoo_got_cookies(int id)
//wsprintfA(z, "Cookie: %s; C=%s; Y=%s; T=%s", Bcookie, yahoo_get_cookie(id, "c"), yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
//wsprintfA(z, "Cookie: %s; Y=%s", Bcookie, yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
- mir_snprintf(z, SIZEOF(z), "Cookie: Y=%s; T=%s", yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
+ mir_snprintf(z, _countof(z), "Cookie: Y=%s; T=%s", yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
LOG(("Our Cookie: '%s'", z));
CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hnuMain, (LPARAM)z);*/
@@ -993,7 +993,7 @@ void ext_yahoo_got_cookies(int id)
char z[1024];
// need to add Cookie header to our requests or we get booted w/ "Bad Cookie" message.
- mir_snprintf(z, SIZEOF(z), "Cookie: Y=%s; T=%s; C=%s", yahoo_get_cookie(id, "y"),
+ mir_snprintf(z, _countof(z), "Cookie: Y=%s; T=%s; C=%s", yahoo_get_cookie(id, "y"),
yahoo_get_cookie(id, "t"), yahoo_get_cookie(id, "c"));
LOG(("Our Cookie: '%s'", z));
CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hNetlibUser, (LPARAM)z);
@@ -1235,7 +1235,7 @@ void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const c
if (nlhr.requestType == REQUEST_POST) {
httpHeaders[nlhr.headersCount].szName = "Content-Length";
- mir_snprintf(z, SIZEOF(z), "%d", content_length);
+ mir_snprintf(z, _countof(z), "%d", content_length);
httpHeaders[nlhr.headersCount].szValue = z;
nlhr.headersCount++;
@@ -1378,7 +1378,7 @@ char * CYahooProto::ext_send_https_request(struct yahoo_data *yd, const char *ho
char z[4096], *result = NULL;
int i;
- mir_snprintf(z, SIZEOF(z), "https://%s%s", host, path);
+ mir_snprintf(z, _countof(z), "https://%s%s", host, path);
nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_HTTP11 | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT; /* Use HTTP/1.1 and don't dump the requests to the log */
@@ -1451,7 +1451,7 @@ void CYahooProto::ext_login(enum yahoo_status login_mode)
NETLIBHTTPREQUEST nlhr = { 0 }, *nlhrReply;
char z[4096];
- mir_snprintf(z, SIZEOF(z), "http://%s%s", getByte("YahooJapan", 0) != 0 ? "cs1.msg.vip.ogk.yahoo.co.jp" : "vcs.msg.yahoo.com", "/capacity");
+ mir_snprintf(z, _countof(z), "http://%s%s", getByte("YahooJapan", 0) != 0 ? "cs1.msg.vip.ogk.yahoo.co.jp" : "vcs.msg.yahoo.com", "/capacity");
nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_HTTP11;