From c992cb2fdc11f1cac4bc5cbce26e8e2bb3b57da0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jun 2012 16:50:14 +0000 Subject: - microkernel addded; - version bumped to 0.92.2 git-svn-id: http://svn.miranda-ng.org/main/trunk@641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/msn_chat.cpp | 2 +- protocols/MSN/msn_global.h | 12 +++--------- protocols/MSN/msn_libstr.cpp | 45 -------------------------------------------- protocols/MSN/msn_mail.cpp | 2 +- 4 files changed, 5 insertions(+), 56 deletions(-) (limited to 'protocols/MSN') diff --git a/protocols/MSN/msn_chat.cpp b/protocols/MSN/msn_chat.cpp index 490f1d453c..eb3411d4ce 100644 --- a/protocols/MSN/msn_chat.cpp +++ b/protocols/MSN/msn_chat.cpp @@ -345,7 +345,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) ThreadData* thread = MSN_GetThreadByChatId(gch->pDest->ptszID); if (thread) { - rtrim(gch->ptszText); // remove the ending linebreak + trtrim(gch->ptszText); // remove the ending linebreak TCHAR* pszMsg = UnEscapeChatTags(NEWTSTR_ALLOCA(gch->ptszText)); thread->sendMessage('N', NULL, NETID_MSN, UTF8(pszMsg), 0); diff --git a/protocols/MSN/msn_global.h b/protocols/MSN/msn_global.h index 306244f896..2b2ef91a70 100644 --- a/protocols/MSN/msn_global.h +++ b/protocols/MSN/msn_global.h @@ -212,12 +212,6 @@ void overrideStr(TCHAR*& dest, const TCHAR* src, bool unicode, const TCHAR* de void replaceStr(char*& dest, const char* src); void replaceStr(wchar_t*& dest, const wchar_t* src); -char* __fastcall ltrimp(char* str); -char* __fastcall rtrim(char* string); -wchar_t* __fastcall rtrim(wchar_t* string); - -__inline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); }; - char* arrayToHex(BYTE* data, size_t datasz); inline unsigned short _htons(unsigned short s) @@ -260,7 +254,7 @@ struct STRLIST : public LIST for (int i=0; i < count; i++) mir_free(items[i]); - li.List_Destroy((SortedList*)this); + List_Destroy((SortedList*)this); } int insertn(const char* p) { return insert(mir_strdup(p)); } @@ -268,13 +262,13 @@ struct STRLIST : public LIST int remove(int idx) { mir_free(items[idx]); - return li.List_Remove((SortedList*)this, idx); + return List_Remove((SortedList*)this, idx); } int remove(const char* p) { int idx; - return li.List_GetIndex((SortedList*)this, (char*)p, &idx) == 1 ? remove(idx) : -1; + return List_GetIndex((SortedList*)this, (char*)p, &idx) == 1 ? remove(idx) : -1; } }; diff --git a/protocols/MSN/msn_libstr.cpp b/protocols/MSN/msn_libstr.cpp index 50756b7ccd..9cb83bbb63 100644 --- a/protocols/MSN/msn_libstr.cpp +++ b/protocols/MSN/msn_libstr.cpp @@ -57,51 +57,6 @@ void overrideStr(TCHAR*& dest, const TCHAR* src, bool unicode, const TCHAR* def) dest = mir_tstrdup(def); } -char* __fastcall ltrimp(char* str) -{ - if (str == NULL) return NULL; - char* p = str; - - for (;;) - { - switch (*p) - { - case ' ': case '\t': case '\n': case '\r': - ++p; break; - default: - return p; - } - } -} - -char* __fastcall rtrim(char *string) -{ - char* p = string + strlen(string) - 1; - - while (p >= string) - { - if (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\r') - break; - - *p-- = 0; - } - return string; -} - -wchar_t* __fastcall rtrim(wchar_t* string) -{ - wchar_t* p = string + wcslen(string) - 1; - - while (p >= string) - { - if (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\r') - break; - - *p-- = 0; - } - return string; -} - char* arrayToHex(BYTE* data, size_t datasz) { char* res = (char*)mir_alloc(2 * datasz + 1); diff --git a/protocols/MSN/msn_mail.cpp b/protocols/MSN/msn_mail.cpp index 52d3fcb12b..57996b65ac 100644 --- a/protocols/MSN/msn_mail.cpp +++ b/protocols/MSN/msn_mail.cpp @@ -416,7 +416,7 @@ void CMsnProto::displayEmailCount(HANDLE hContact) } while (ch && !_istdigit(ch[1])); if (ch) *ch = 0; - rtrim(name); + trtrim(name); TCHAR szNick[128]; mir_sntprintf(szNick, SIZEOF(szNick), -- cgit v1.2.3