summaryrefslogtreecommitdiff
path: root/plugins/helpers/gen_helpers.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-08-05 13:20:54 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-08-05 13:20:54 +0000
commit58072b25fc6f1439e1a2752cde6fc94e780972c2 (patch)
treec441fea24a3ef4717921834c79a08213c41f0d7e /plugins/helpers/gen_helpers.cpp
parent1d9e3c88c6a4930241d82812c299a31b739c1aa6 (diff)
removed not used functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@5591 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/helpers/gen_helpers.cpp')
-rw-r--r--plugins/helpers/gen_helpers.cpp92
1 files changed, 6 insertions, 86 deletions
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp
index ba88fec81d..ce19a5bd51 100644
--- a/plugins/helpers/gen_helpers.cpp
+++ b/plugins/helpers/gen_helpers.cpp
@@ -19,15 +19,6 @@
#include "commonheaders.h"
#include "gen_helpers.h"
-char *Hlp_GetProtocolNameA(const char *proto) {
-
- char protoname[256];
- if ((!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname)))
- return NULL;
-
- return mir_strdup(protoname);
-}
-
TCHAR *Hlp_GetProtocolName(const char *proto) {
char protoname[256];
@@ -38,19 +29,6 @@ TCHAR *Hlp_GetProtocolName(const char *proto) {
}
-char *Hlp_GetDlgItemTextA(HWND hwndDlg, int nIDDlgItem) {
-
- int len = SendDlgItemMessageA(hwndDlg, nIDDlgItem, WM_GETTEXTLENGTH, 0, 0);
- if (len < 0)
- return NULL;
-
- char *res = ( char* )mir_alloc((len+1));
- ZeroMemory(res, (len+1));
- GetDlgItemTextA(hwndDlg, nIDDlgItem, res, len+1);
-
- return res;
-}
-
TCHAR *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) {
int len = SendDlgItemMessage(hwndDlg, nIDDlgItem, WM_GETTEXTLENGTH, 0, 0);
@@ -64,19 +42,6 @@ TCHAR *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) {
return res;
}
-char *Hlp_GetWindowTextA(HWND hwndDlg)
-{
- int len = SendMessageA(hwndDlg, WM_GETTEXTLENGTH, 0, 0);
- if (len < 0)
- return NULL;
-
- char *res = ( char* )mir_alloc((len+1));
- ZeroMemory(res, (len+1));
- GetWindowTextA(hwndDlg, res, len+1);
-
- return res;
-}
-
TCHAR *Hlp_GetWindowText(HWND hwndDlg)
{
int len = SendMessage(hwndDlg, WM_GETTEXTLENGTH, 0, 0);
@@ -95,7 +60,8 @@ TCHAR *Hlp_GetWindowText(HWND hwndDlg)
**/
// Logging
-static int WriteToDebugLogA(const char *szMsg) {
+static int WriteToDebugLogA(const char *szMsg)
+{
int res = 0;
if (ServiceExists(MS_NETLIB_LOG))
@@ -127,52 +93,8 @@ int AddDebugLogMessageA(const char* fmt, ...)
return res;
}
-int AddDebugLogMessage(const TCHAR* fmt, ...) {
-
- int res;
- TCHAR tszText[MAX_DEBUG], tszFinal[MAX_DEBUG];
- char *szFinal;
- va_list va;
-
- va_start(va,fmt);
- mir_vsntprintf(tszText, SIZEOF(tszText), fmt, va);
- va_end(va);
-#ifdef MODULENAME
- mir_sntprintf(tszFinal, SIZEOF(tszFinal), _T("%s: %s"), MODULENAME, tszText);
-#else
- _tcsncpy(tszFinal, tszText, SIZEOF(tszFinal));
-#endif
-
-
- szFinal = mir_t2a(tszFinal);
-
- res = WriteToDebugLogA(szFinal);
- mir_free(szFinal);
-
- return res;
-}
-
-int AddErrorLogMessageA(const char* fmt, ...) {
-
- int res;
- char szText[MAX_DEBUG], szFinal[MAX_DEBUG];
- va_list va;
-
- va_start(va,fmt);
- mir_vsnprintf(szText, sizeof(szText), fmt, va);
- va_end(va);
-#ifdef MODULENAME
- mir_snprintf(szFinal, sizeof(szFinal), "%s: %s", MODULENAME, szText);
-#else
- strncpy(szFinal, szText, SIZEOF(szFinal));
-#endif
- res = WriteToDebugLogA(szFinal);
- MessageBoxA(NULL, szFinal, "Error", MB_OK|MB_ICONERROR);
-
- return res;
-}
-
-int AddErrorLogMessage(const TCHAR* fmt, ...) {
+int AddDebugLogMessage(const TCHAR* fmt, ...)
+{
int res;
TCHAR tszText[MAX_DEBUG], tszFinal[MAX_DEBUG];
@@ -192,20 +114,18 @@ int AddErrorLogMessage(const TCHAR* fmt, ...) {
szFinal = mir_t2a(tszFinal);
res = WriteToDebugLogA(szFinal);
- MessageBoxA(NULL, szFinal, "Error", MB_OK|MB_ICONERROR);
mir_free(szFinal);
return res;
}
-
-//
int ttoi(TCHAR *string)
{
return ( string == NULL) ? 0 : _ttoi( string );
}
-TCHAR *itot(int num) {
+TCHAR *itot(int num)
+{
char tRes[32];