diff options
-rw-r--r-- | commonheaders.h | 2 | ||||
-rw-r--r-- | messages.cpp | 8 | ||||
-rw-r--r-- | replacer.suo | bin | 55296 -> 55296 bytes | |||
-rw-r--r-- | replacer.vcproj | 1 | ||||
-rw-r--r-- | utilities.h | 9 |
5 files changed, 19 insertions, 1 deletions
diff --git a/commonheaders.h b/commonheaders.h index 64b44da..9401e97 100644 --- a/commonheaders.h +++ b/commonheaders.h @@ -38,6 +38,8 @@ using std::wstring; #include <fstream> using std::wfstream; using std::fstream; +#include <algorithm> + #include <newpluginapi.h> #include <m_database.h> diff --git a/messages.cpp b/messages.cpp index 7b2424e..369354c 100644 --- a/messages.cpp +++ b/messages.cpp @@ -61,6 +61,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) TCHAR *tmp = mir_a2t(msg); wstring str = tmp; mir_free(tmp); + wstring str_low = str; + for(unsigned int i = 0; i< str_low.length(); i++) + { + str_low[i] = _totlower(str_low[i]); + } int i = 0; char setting[32]; @@ -104,7 +109,8 @@ int SendMsgSvc(WPARAM w, LPARAM l) { p1 = 0; wstring::size_type end = 0; - while((p1 = str.find(buf), p1) != wstring::npos) + CharLowerBuff(buf, _tcslen(buf)); + while((p1 = str_low.find(buf), p1) != wstring::npos) { if(p1 < end) break; diff --git a/replacer.suo b/replacer.suo Binary files differindex 2a185f9..470e6b5 100644 --- a/replacer.suo +++ b/replacer.suo diff --git a/replacer.vcproj b/replacer.vcproj index 68c8254..69c9864 100644 --- a/replacer.vcproj +++ b/replacer.vcproj @@ -257,6 +257,7 @@ AdditionalIncludeDirectories=""X:\install\git\miranda\miranda-im\miranda\include";X:\install\git\miranda\mim_plugs;../../include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_UNICODE"
StringPooling="true"
+ ExceptionHandling="1"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
diff --git a/utilities.h b/utilities.h index eaeb646..b7f0a7d 100644 --- a/utilities.h +++ b/utilities.h @@ -22,4 +22,13 @@ void HistoryLog(HANDLE hContact, char *data, int event_type, int flags); int ComboBoxAddStringUtf(HWND hCombo, const TCHAR *szString, DWORD data); const bool StriStr(const char *str, const char *substr); +class iwchar_traits : public std::char_traits<wchar_t> {
+public:
+ static bool eq(wchar_t, wchar_t);
+ static bool lt(wchar_t, wchar_t);
+ static int compare(const wchar_t *, const wchar_t *, size_t n);
+ static const char * find(const wchar_t *, size_t n, wchar_t);
+};
+ + #endif |