summaryrefslogtreecommitdiff
path: root/protocols/Yahoo
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
commit41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch)
tree36318f807498cf15b405eda5c451fd37bfe1b675 /protocols/Yahoo
parent97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff)
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r--protocols/Yahoo/src/chat.cpp4
-rw-r--r--protocols/Yahoo/src/icolib.cpp4
-rw-r--r--protocols/Yahoo/src/services.cpp8
-rw-r--r--protocols/Yahoo/src/util.cpp2
-rw-r--r--protocols/Yahoo/src/yahoo.cpp16
5 files changed, 17 insertions, 17 deletions
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp
index 9fcd34270a..c35b1d0432 100644
--- a/protocols/Yahoo/src/chat.cpp
+++ b/protocols/Yahoo/src/chat.cpp
@@ -53,7 +53,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, SIZEOF(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);
@@ -653,7 +653,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, SIZEOF(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/icolib.cpp b/protocols/Yahoo/src/icolib.cpp
index 3e713a2388..69cb3eb97c 100644
--- a/protocols/Yahoo/src/icolib.cpp
+++ b/protocols/Yahoo/src/icolib.cpp
@@ -36,7 +36,7 @@ void CYahooProto::IconsInit( void )
HICON CYahooProto::LoadIconEx( const char* name, bool big )
{
char szSettingName[100];
- mir_snprintf(szSettingName, sizeof(szSettingName), "YAHOO_%s", name);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "YAHOO_%s", name);
return Skin_GetIcon(szSettingName, big);
}
@@ -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, SIZEOF(szSettingName), "YAHOO_%s", name);
Skin_ReleaseIcon(szSettingName, big);
}
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index 108c893eb1..efc52a9484 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -225,7 +225,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, SIZEOF(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(t);
FREE(u);
} else {
- mir_snprintf(tUrl, sizeof(tUrl), url);
+ mir_snprintf(tUrl, SIZEOF(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, SIZEOF(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 lPara
}
char tUrl[ 4096 ];
- mir_snprintf(tUrl, sizeof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
+ mir_snprintf(tUrl, SIZEOF(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 d030ba7c75..68b10aac50 100644
--- a/protocols/Yahoo/src/util.cpp
+++ b/protocols/Yahoo/src/util.cpp
@@ -188,7 +188,7 @@ extern PLUGININFOEX pluginInfo;
void CYahooProto::YAHOO_utils_logversion()
{
char str[256];
- mir_snprintf(str, sizeof(str), "Yahoo v%d.%d.%d.%d", (pluginInfo.version >> 24) & 0xFF, (pluginInfo.version >> 16) & 0xFF,
+ mir_snprintf(str, SIZEOF(str), "Yahoo v%d.%d.%d.%d", (pluginInfo.version >> 24) & 0xFF, (pluginInfo.version >> 16) & 0xFF,
(pluginInfo.version >> 8) & 0xFF, pluginInfo.version & 0xFF);
debugLogA(str);
}
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index 05d56e98c1..44e313320e 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -576,7 +576,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, SIZEOF(z), "[miranda-audible] %s", msg ?msg:"");
ext_got_im((char*)me, (char*)who, 0, z, 0, 0, 1, -1, NULL, 0);
}
@@ -792,14 +792,14 @@ 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, SIZEOF(nick), "%s %s", fname, lname);
else if (lname)
- mir_snprintf(nick, sizeof(nick), "%s", lname);
+ mir_snprintf(nick, SIZEOF(nick), "%s", lname);
else if (fname)
- mir_snprintf(nick, sizeof(nick), "%s", fname);
+ mir_snprintf(nick, SIZEOF(nick), "%s", fname);
if (nick[0] == '\0')
- mir_snprintf(nick, sizeof(nick), "%s", who);
+ mir_snprintf(nick, SIZEOF(nick), "%s", who);
if (fname) SetStringUtf(hContact, "FirstName", fname);
if (lname) SetStringUtf(hContact, "LastName", lname);
@@ -1052,7 +1052,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, SIZEOF(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);
@@ -1546,11 +1546,11 @@ void CYahooProto::ext_login(enum yahoo_status login_mode)
if (host[0] == '\0') {
if (!getString(YAHOO_LOGINSERVER, &dbv)) {
- mir_snprintf(host, sizeof(host), "%s", dbv.pszVal);
+ mir_snprintf(host, SIZEOF(host), "%s", dbv.pszVal);
db_free(&dbv);
}
else {
- mir_snprintf(host, sizeof(host), "%s",
+ mir_snprintf(host, SIZEOF(host), "%s",
getByte("YahooJapan",0) != 0 ? YAHOO_DEFAULT_JAPAN_LOGIN_SERVER :
YAHOO_DEFAULT_LOGIN_SERVER
);