diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-30 08:56:42 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-30 08:56:42 +0000 |
commit | 0eb671f7d30f51c6a0f30ed99a4ec123479f3239 (patch) | |
tree | d25307d8656683075cbdac8e9d1c0c89e890b85d /protocols | |
parent | b5d6b5793620a170d2630c37230e34c88c24ecda (diff) |
VKontakte: cosmrtic
git-svn-id: http://svn.miranda-ng.org/main/trunk@11168 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 16 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 3 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_history.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_search.cpp | 4 |
6 files changed, 16 insertions, 15 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index ab404f82c9..91df3a9a3f 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -89,7 +89,7 @@ bool CVkProto::CheckMid(int guid) LPCSTR findHeader(NETLIBHTTPREQUEST *pReq, LPCSTR szField)
{
- for (int i=0; i < pReq->headersCount; i++)
+ for (int i = 0; i < pReq->headersCount; i++)
if (!_stricmp(pReq->headers[i].szName, szField))
return pReq->headers[i].szValue;
@@ -174,7 +174,7 @@ void CVkProto::OnReceiveSmth(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) {
JSONROOT pRoot;
JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
- debugLogA("CVkProto::OnReceiveSmth %s", json_as_string(pResponse));
+ debugLog(L"CVkProto::OnReceiveSmth %s", json_as_string(pResponse));
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -328,7 +328,7 @@ AsyncHttpRequest::AsyncHttpRequest(CVkProto *ppro, int iRequestType, LPCSTR _url AsyncHttpRequest::~AsyncHttpRequest()
{
- for (int i=0; i < headersCount; i++) {
+ for (int i = 0; i < headersCount; i++) {
mir_free(headers[i].szName);
mir_free(headers[i].szValue);
}
@@ -338,7 +338,7 @@ AsyncHttpRequest::~AsyncHttpRequest() void AsyncHttpRequest::AddHeader(LPCSTR szName, LPCSTR szValue)
{
- headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount+1));
+ headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount + 1));
headers[headersCount].szName = mir_strdup(szName);
headers[headersCount].szValue = mir_strdup(szValue);
headersCount++;
@@ -346,7 +346,7 @@ void AsyncHttpRequest::AddHeader(LPCSTR szName, LPCSTR szValue) void AsyncHttpRequest::Redirect(NETLIBHTTPREQUEST *nhr)
{
- for (int i=0; i < nhr->headersCount; i++) {
+ for (int i = 0; i < nhr->headersCount; i++) {
LPCSTR szValue = nhr->headers[i].szValue;
if (!_stricmp(nhr->headers[i].szName, "Location"))
m_szUrl = szValue;
@@ -356,7 +356,7 @@ void AsyncHttpRequest::Redirect(NETLIBHTTPREQUEST *nhr) void CVkProto::GrabCookies(NETLIBHTTPREQUEST *nhr)
{
debugLogA("CVkProto::GrabCookies");
- for (int i=0; i < nhr->headersCount; i++) {
+ for (int i = 0; i < nhr->headersCount; i++) {
if (_stricmp(nhr->headers[i].szName, "Set-cookie"))
continue;
@@ -538,8 +538,8 @@ void CVkProto::SetMirVer(MCONTACT hContact, int platform) bool tlstrstr(TCHAR* _s1, TCHAR* _s2)
{
TCHAR s1[1024], s2[1024];
- mir_sntprintf(s1, SIZEOF(s1), _T("%s"), _s1);
- mir_sntprintf(s2, SIZEOF(s2), _T("%s"), _s2);
+ mir_sntprintf(s1, SIZEOF(s1), L"%s", _s1);
+ mir_sntprintf(s2, SIZEOF(s2), L"%s", _s2);
CharLowerBuff(s1, SIZEOF(s1));
CharLowerBuff(s2, SIZEOF(s2));
return _tcsstr(s1, s2) != NULL;
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index c9de3f893d..8f6dfa96ec 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -131,7 +131,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeT(pszDest);
- pszDest[ tPathLen++ ] = '\\';
+ pszDest[tPathLen++] = '\\';
const TCHAR* szFileType = L".jpg";
ptrT szUrl(getTStringA(hContact, "AvatarUrl"));
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index cf12dc18b8..79762394ca 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -48,7 +48,8 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) c->m_tszTopic = mir_tstrdup((tszTitle != NULL) ? tszTitle : _T(""));
}
- CMString sid; sid.Format(_T("%S_%d"), m_szModuleName, id);
+ CMString sid;
+ sid.Format(L"%S_%d", m_szModuleName, id);
c->m_tszId = mir_tstrdup(sid);
GCSESSION gcw = { sizeof(gcw) };
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp index 1d77774198..6a0eece936 100644 --- a/protocols/VKontakte/src/vk_history.cpp +++ b/protocols/VKontakte/src/vk_history.cpp @@ -102,7 +102,7 @@ void CVkProto::GetServerHistoryLastNDay(MCONTACT hContact, int NDay) if (!IsOnline())
return;
- UINT iTime = time(0) - 60 * 60 * 24 * NDay;
+ UINT iTime = time(NULL) - 60 * 60 * 24 * NDay;
HANDLE hDBEvent = db_event_first(hContact);
while (hDBEvent) {
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 1475bf0782..a134baddb1 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -310,7 +310,7 @@ void CVkProto::InitPopups(void) POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
- mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, SIZEOF(desc), L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -320,7 +320,7 @@ void CVkProto::InitPopups(void) ppc.iSeconds = 60;
m_hPopupClassError = Popup_RegisterClass(&ppc);
- mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Notification"));
+ mir_sntprintf(desc, SIZEOF(desc), L"%s %s", m_tszUserName, TranslateT("Notification"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notification");
ppc.ptszDescription = desc;
ppc.pszName = name;
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index 2acfaedd1e..bb700eb18a 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -75,8 +75,8 @@ void __cdecl CVkProto::SearchThread(void* p) PROTOSEARCHBYNAME *pParam = (PROTOSEARCHBYNAME *)p;
TCHAR arg[200]; - mir_sntprintf(arg, SIZEOF(arg), _T("%s %s %s"), pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
- debugLog(_T("CVkProto::SearchThread %s"), arg);
+ mir_sntprintf(arg, SIZEOF(arg), L"%s %s %s", pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
+ debugLog(L"CVkProto::SearchThread %s", arg);
if (!IsOnline())
return;
|