diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-30 11:30:57 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-30 11:30:57 +0000 |
commit | db47dabaddfab41eb418eebfecac0ad3c841b8f0 (patch) | |
tree | b6048b38bfd6842dd57480991e52ac8432a73f2d /plugins/AvatarHistory/src/utils.cpp | |
parent | acd44e01e1a9b0e0fb6b526e86d90b0a00d8a18b (diff) |
removed not used headers
git-svn-id: http://svn.miranda-ng.org/main/trunk@4248 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AvatarHistory/src/utils.cpp')
-rw-r--r-- | plugins/AvatarHistory/src/utils.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 69122d6621..a745603a15 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -24,9 +24,6 @@ Avatar History Plugin #include "AvatarHistory.h"
-extern HANDLE hFolder;
-extern TCHAR basedir[];
-
BOOL ProtocolEnabled(const char *proto)
{
if (proto == NULL)
@@ -102,10 +99,7 @@ void ErrorExit(HANDLE hContact,LPTSTR lpszFunction) lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT,
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)lpszFunction) + 40) * sizeof(TCHAR));
- StringCchPrintf((LPTSTR)lpDisplayBuf,
- LocalSize(lpDisplayBuf) / sizeof(TCHAR),
- TEXT("%s failed with error %d: %s"),
- lpszFunction, dw, lpMsgBuf);
+ mir_sntprintf((TCHAR*)lpDisplayBuf, lstrlen((TCHAR*)lpDisplayBuf), _T("%s failed with error %d: %s"), lpszFunction, dw, lpMsgBuf);
ShowDebugPopup(hContact,TEXT("Error"), (LPCTSTR)lpDisplayBuf);
LocalFree(lpMsgBuf);
@@ -184,7 +178,7 @@ TCHAR* GetContactFolder(TCHAR *fn, HANDLE hContact) char *proto = GetContactProto(hContact);
GetProtocolFolder(fn, proto);
- GetUIDFromHContact(hContact, uin, MAX_REGS(uin));
+ GetUIDFromHContact(hContact, uin, SIZEOF(uin));
mir_sntprintf(fn, MAX_PATH, _T("%s\\%s"), fn, uin);
if (!CreateDirectory(fn, NULL))
ErrorExit(hContact,_T("CreateDirectory"));
@@ -219,7 +213,7 @@ void CreateOldStyleShortcut(HANDLE hContact, TCHAR *history_filename) GetOldStyleAvatarName(shortcut, hContact);
- mir_sntprintf(shortcut, MAX_REGS(shortcut), _T("%s.%s.lnk"), shortcut,
+ mir_sntprintf(shortcut, SIZEOF(shortcut), _T("%s.%s.lnk"), shortcut,
GetExtension(history_filename));
if (!CreateShortcut(history_filename, shortcut))
@@ -254,7 +248,7 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash) else
GetProtocolFolder(file, proto);
- mir_sntprintf(search, MAX_REGS(search), _T("%s\\%s.*"), file, hash);
+ mir_sntprintf(search, SIZEOF(search), _T("%s\\%s.*"), file, hash);
WIN32_FIND_DATA finddata;
HANDLE hFind = FindFirstFile(search, &finddata);
@@ -271,7 +265,7 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash) || !lstrcmpi(&finddata.cFileName[len-4], _T(".jpg"))
|| !lstrcmpi(&finddata.cFileName[len-5], _T(".jpeg"))))
{
- mir_sntprintf(file, MAX_REGS(file), _T("%s\\%s"), file, finddata.cFileName);
+ mir_sntprintf(file, SIZEOF(file), _T("%s\\%s"), file, finddata.cFileName);
ret = mir_tstrdup(file);
break;
}
|