summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
commitc370af60855db957c5b200914bf0bde743845528 (patch)
tree0bd2ef127097c9e937c2650e8b202c3f09453323 /protocols/Steam
parent7f082bd5d4865c30b313661b7a02f048b4b137be (diff)
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/api/friend_list.h12
-rw-r--r--protocols/Steam/src/api/login.h4
-rw-r--r--protocols/Steam/src/api/pending.h18
-rw-r--r--protocols/Steam/src/http_request.h2
-rw-r--r--protocols/Steam/src/main.cpp2
-rw-r--r--protocols/Steam/src/steam_avatars.cpp2
-rw-r--r--protocols/Steam/src/steam_contacts.cpp2
-rw-r--r--protocols/Steam/src/steam_dialogs.cpp6
-rw-r--r--protocols/Steam/src/steam_menus.cpp2
-rw-r--r--protocols/Steam/src/steam_proto.cpp8
-rw-r--r--protocols/Steam/src/steam_xstatus.cpp4
11 files changed, 31 insertions, 31 deletions
diff --git a/protocols/Steam/src/api/friend_list.h b/protocols/Steam/src/api/friend_list.h
index 7721f0c921..c16a7d84bf 100644
--- a/protocols/Steam/src/api/friend_list.h
+++ b/protocols/Steam/src/api/friend_list.h
@@ -20,10 +20,10 @@ public:
HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/AddFriendAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
mir_snprintf(data, _countof(data),
@@ -44,10 +44,10 @@ public:
HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/BlockUserAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
mir_snprintf(data, _countof(data),
@@ -68,10 +68,10 @@ public:
HttpRequest(REQUEST_POST, STEAM_WEB_URL "/actions/RemoveFriendAjax")
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[128];
mir_snprintf(data, _countof(data),
diff --git a/protocols/Steam/src/api/login.h b/protocols/Steam/src/api/login.h
index 00392dd34d..331822d260 100644
--- a/protocols/Steam/src/api/login.h
+++ b/protocols/Steam/src/api/login.h
@@ -8,7 +8,7 @@ public:
HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logon/v0001")
{
char data[256];
- mir_snprintf(data, _countof(data), "access_token=%s&ui_mode=web", token);
+ mir_snprintf(data, "access_token=%s&ui_mode=web", token);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded");
@@ -22,7 +22,7 @@ public:
HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logoff/v0001")
{
char data[256];
- mir_snprintf(data, _countof(data), "access_token=%s&umqid=%s", token, umqId);
+ mir_snprintf(data, "access_token=%s&umqid=%s", token, umqId);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded");
diff --git a/protocols/Steam/src/api/pending.h b/protocols/Steam/src/api/pending.h
index 4e971275b4..b07e14f087 100644
--- a/protocols/Steam/src/api/pending.h
+++ b/protocols/Steam/src/api/pending.h
@@ -8,13 +8,13 @@ public:
HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=accept&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, "sessionID=%s&id=%s&perform=accept&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
@@ -29,13 +29,13 @@ public:
HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=ignore&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, "sessionID=%s&id=%s&perform=ignore&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
@@ -50,13 +50,13 @@ public:
HttpRequest(REQUEST_POST, FORMAT, STEAM_WEB_URL "/profiles/%s/home_process", steamId)
{
char login[MAX_PATH];
- mir_snprintf(login, _countof(login), "%s||oauth:%s", steamId, token);
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
char cookie[MAX_PATH];
- mir_snprintf(cookie, _countof(cookie), "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;forceMobile=1", login, sessionId);
char data[MAX_PATH];
- mir_snprintf(data, _countof(data), "sessionID=%s&id=%s&perform=block&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
+ mir_snprintf(data, "sessionID=%s&id=%s&perform=block&action=approvePending&itype=friend&json=1&xml=0", sessionId, who);
SetData(data, strlen(data));
AddHeader("Cookie", cookie);
diff --git a/protocols/Steam/src/http_request.h b/protocols/Steam/src/http_request.h
index 35a6352d42..89e76e8ac2 100644
--- a/protocols/Steam/src/http_request.h
+++ b/protocols/Steam/src/http_request.h
@@ -131,7 +131,7 @@ public:
szUrl = m_url.GetBuffer();
char message[1024];
- mir_snprintf(message, _countof(message), "Send request to %s", szUrl);
+ mir_snprintf(message, "Send request to %s", szUrl);
CallService(MS_NETLIB_LOG, (WPARAM)hConnection, (LPARAM)&message);
NETLIBHTTPREQUEST* response = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hConnection, (LPARAM)this);
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp
index 204bdd56db..4010b9e46f 100644
--- a/protocols/Steam/src/main.cpp
+++ b/protocols/Steam/src/main.cpp
@@ -47,7 +47,7 @@ extern "C" int __declspec(dllexport) Load(void)
Proto_RegisterModule(&pd);
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "gaming");
+ mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
// extra statuses
HookEvent(ME_SKIN2_ICONSCHANGED, OnReloadIcons);
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp
index bd3b14f60e..77382eb5c4 100644
--- a/protocols/Steam/src/steam_avatars.cpp
+++ b/protocols/Steam/src/steam_avatars.cpp
@@ -3,7 +3,7 @@
TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _countof(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 4fee4049ac..3766a81611 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -626,7 +626,7 @@ void CSteamProto::OnAuthRequested(const NETLIBHTTPREQUEST *response, void *arg)
lastName = mir_strdup("");
char reason[MAX_PATH];
- mir_snprintf(reason, _countof(reason), Translate("%s has added you to his or her Friend List"), nickName);
+ mir_snprintf(reason, Translate("%s has added you to his or her Friend List"), nickName);
// blob is: 0(DWORD), hContact(DWORD), nick(ASCIIZ), firstName(ASCIIZ), lastName(ASCIIZ), sid(ASCIIZ), reason(ASCIIZ)
DWORD cbBlob = (DWORD)(sizeof(DWORD)* 2 + mir_strlen(nickName) + mir_strlen(firstName) + mir_strlen(lastName) + mir_strlen(steamId) + mir_strlen(reason) + 5);
diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp
index be88b7c86e..116d0a48bc 100644
--- a/protocols/Steam/src/steam_dialogs.cpp
+++ b/protocols/Steam/src/steam_dialogs.cpp
@@ -10,7 +10,7 @@ CSteamPasswordEditor::CSteamPasswordEditor(CSteamProto *proto)
void CSteamPasswordEditor::OnInitDialog()
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main");
+ mir_snprintf(iconName, "%s_%s", MODULE, "main");
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true));
@@ -48,7 +48,7 @@ CSteamGuardDialog::CSteamGuardDialog(CSteamProto *proto, const char *domain)
void CSteamGuardDialog::OnInitDialog()
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main");
+ mir_snprintf(iconName, "%s_%s", MODULE, "main");
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true));
@@ -95,7 +95,7 @@ CSteamCaptchaDialog::~CSteamCaptchaDialog()
void CSteamCaptchaDialog::OnInitDialog()
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main");
+ mir_snprintf(iconName, "%s_%s", MODULE, "main");
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true));
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index be3282378a..0dd594bf72 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -45,7 +45,7 @@ int CSteamProto::JoinToGameCommand(WPARAM hContact, LPARAM)
{
char url[MAX_PATH];
DWORD gameId = getDword(hContact, "GameID", 0);
- mir_snprintf(url, _countof(url), "steam://rungameid/%lu", gameId);
+ mir_snprintf(url, "steam://rungameid/%lu", gameId);
Utils_OpenUrl(url);
return 0;
}
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 113c5f47b5..5d5fc876f7 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -18,10 +18,10 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) :
GetModuleFileName(g_hInstance, filePath, MAX_PATH);
wchar_t sectionName[100];
- mir_sntprintf(sectionName, _countof(sectionName), _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
+ mir_sntprintf(sectionName, _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
char settingName[100];
- mir_snprintf(settingName, _countof(settingName), "%s_%s", MODULE, "main");
+ mir_snprintf(settingName, "%s_%s", MODULE, "main");
SKINICONDESC sid = { 0 };
sid.flags = SIDF_ALL_TCHAR;
@@ -32,7 +32,7 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) :
sid.iDefaultIndex = -IDI_STEAM;
IcoLib_AddIcon(&sid);
- mir_snprintf(settingName, _countof(settingName), "%s_%s", MODULE, "gaming");
+ mir_snprintf(settingName, "%s_%s", MODULE, "gaming");
sid.description.t = LPGENT("Gaming icon");
sid.iDefaultIndex = -IDI_GAMING;
IcoLib_AddIcon(&sid);
@@ -63,7 +63,7 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) :
// netlib support
TCHAR name[128];
- mir_sntprintf(name, _countof(name), TranslateT("%s connection"), m_tszUserName);
+ mir_sntprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { sizeof(nlu) };
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
diff --git a/protocols/Steam/src/steam_xstatus.cpp b/protocols/Steam/src/steam_xstatus.cpp
index 72a4a0e5b6..7a42c3f4e3 100644
--- a/protocols/Steam/src/steam_xstatus.cpp
+++ b/protocols/Steam/src/steam_xstatus.cpp
@@ -20,7 +20,7 @@ int CSteamProto::GetContactXStatus(MCONTACT hContact)
void SetContactExtraIcon(MCONTACT hContact, int status)
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "gaming");
+ mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
ExtraIcon_SetIcon(hExtraXStatus, hContact, (status > 0) ? IcoLib_GetIconHandle(iconName) : NULL);
}
@@ -96,7 +96,7 @@ HICON CSteamProto::GetXStatusIcon(int status, UINT flags)
return 0;
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "gaming");
+ mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
HICON icon = IcoLib_GetIcon(iconName, (flags & LR_BIGICON) != 0);
return (flags & LR_SHARED) ? icon : CopyIcon(icon);