diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
commit | 353c79463614e291eb37e629e8b0d1cb9c58d8e8 (patch) | |
tree | c4a3a921bf8f0411933485d8c7fde446b1b8d305 /utilities.cpp | |
parent | 4f8f8d3b1691decd02ba93ca7799c46cff1c4f9b (diff) |
code cleanup
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/utilities.cpp b/utilities.cpp index 3ab2e28..ebe8751 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -90,55 +90,3 @@ char *date() d[9]=tmp[5]; return d; } - - -void HistoryLog(HANDLE hContact, char *data, int event_type, int flags) -{ - DBEVENTINFO Event = {0}; - Event.cbSize = sizeof(Event); - Event.szModule = szReplacerModuleName; - Event.eventType = event_type; - Event.flags = flags, DBEF_UTF; - Event.timestamp = (DWORD)time(NULL); - Event.cbBlob = strlen(data)+1; - Event.pBlob = (PBYTE)_strdup(data); - CallService(MS_DB_EVENT_ADD, (WPARAM)(HANDLE)hContact,(LPARAM)&Event); -} - -static int ControlAddStringUtf(HWND ctrl, DWORD msg, const TCHAR *szString) -{ - int item = -1; - item = SendMessage(ctrl, msg, 0, (LPARAM)szString); - return item; -} - -int ComboBoxAddStringUtf(HWND hCombo, const TCHAR *szString, DWORD data) -{ - int item = ControlAddStringUtf(hCombo, CB_ADDSTRING, szString); - SendMessage(hCombo, CB_SETITEMDATA, item, data); - - return item; -} - - - - -#define NEWTSTR_MALLOC(A) (A==NULL)?NULL:strcpy((char*)mir_alloc(sizeof(char)*(strlen(A)+1)),A)
-
-const bool StriStr(const char *str, const char *substr)
-{
- bool i = false;
- char *str_up = NEWTSTR_MALLOC(str);
- char *substr_up = NEWTSTR_MALLOC(substr);
-
- CharUpperBuffA(str_up, strlen(str_up));
- CharUpperBuffA(substr_up, strlen(substr_up));
-
- if(strstr (str_up, substr_up))
- i = true;
-
- mir_free(str_up);
- mir_free(substr_up);
-
- return i;
-}
|