summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-04-04 20:42:26 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-04-04 20:42:26 +0300
commiteeb93070be7179894d9e23dd5281cce3ea1e68f6 (patch)
tree7638a547d83eb62f930fc6d400a46922d1838ffe
parent9d66e0505ab05e0dc5c99726044158dbcb89ba55 (diff)
modified: Makefile
modified: utilities.cpp
-rw-r--r--Makefile2
-rw-r--r--utilities.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1226b60..4c39fa5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
all:
- i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -w -mwin32 -mwindows -mdll -march=i686 -msse -O2 -pipe
+ i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -I ../miranda-im/miranda/include -w -mwin32 -mwindows -mdll -march=i686 -msse -O2 -pipe
i686-pc-mingw32-windres -i stopspam.rc -o resources.o
i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s
upx -9 stopspam.dll
diff --git a/utilities.cpp b/utilities.cpp
index c481b85..c3f7c94 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -149,11 +149,17 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){
#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
const int Stricmp(const TCHAR *str, const TCHAR *substr)
{
+ int i;
TCHAR *str_up = NEWTSTR_ALLOCA(str);
TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
CharUpperBuff(str_up, lstrlen(str_up));
CharUpperBuff(substr_up, lstrlen(substr_up));
+
+ i = _tcscmp(str_up, substr_up);
+
+ mir_free(str_up);
+ mir_free(substr_up);
- return _tcscmp(str_up, substr_up);
+ return i;
}