summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tipper/common.h14
-rw-r--r--tipper/message_pump.cpp4
-rw-r--r--tipper/message_pump.h2
-rw-r--r--tipper/options.cpp3
-rw-r--r--tipper/subst.cpp1
-rw-r--r--tipper/tipper_9.sln34
-rw-r--r--tipper/tipper_9.vcproj11
-rw-r--r--tipper/translations.cpp12
8 files changed, 37 insertions, 44 deletions
diff --git a/tipper/common.h b/tipper/common.h
index 5d8be21..7bdb607 100644
--- a/tipper/common.h
+++ b/tipper/common.h
@@ -30,10 +30,11 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
-#include <process.h>
#include <commctrl.h>
+#include <commdlg.h>
+
#include <stddef.h>
-#include <stdio.h>
+#include <time.h>
#include <win2k.h>
#include <newpluginapi.h>
@@ -58,19 +59,14 @@
#include <m_popup.h>
#include <m_fontservice.h>
#include <m_avatars.h>
+#include <m_icq.h>
+#include <m_imgsrvc.h>
#include "m_updater.h"
#include "m_variables.h"
-
#include "m_notify.h"
-
-#include "m_smr.h"
-
#include "m_metacontacts.h"
-#include <m_icq.h>
-#include <m_imgsrvc.h>
-
#define MODULE "Tipper"
extern HMODULE hInst;
diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp
index ace9229..310a137 100644
--- a/tipper/message_pump.cpp
+++ b/tipper/message_pump.cpp
@@ -8,8 +8,8 @@ HMODULE hUserDll;
BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0;
BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags) = 0;
-//DWORD message_pump_thread_id = 0;
unsigned int message_pump_thread_id = 0;
+
HANDLE hMPEvent;
//DWORD CALLBACK MessagePumpThread(LPVOID param) {
@@ -98,7 +98,7 @@ void InitMessagePump() {
}
hMPEvent = CreateEvent(0, TRUE, 0, 0);
- CloseHandle((HANDLE)_beginthreadex(0, 0, MessagePumpThread, hMPEvent, 0, &message_pump_thread_id));
+ CloseHandle(mir_forkthreadex(MessagePumpThread, hMPEvent, 0, &message_pump_thread_id));
WaitForSingleObject(hMPEvent, INFINITE);
CloseHandle(hMPEvent);
}
diff --git a/tipper/message_pump.h b/tipper/message_pump.h
index 309b5e7..f72d5bc 100644
--- a/tipper/message_pump.h
+++ b/tipper/message_pump.h
@@ -1,8 +1,6 @@
#ifndef _MESSAGE_PUMP_INC
#define _MESSAGE_PUMP_INC
-//extern DWORD message_pump_thread_id;
-extern unsigned int message_pump_thread_id;
void PostMPMessage(UINT msg, WPARAM, LPARAM);
#define MUM_CREATEPOPUP (WM_USER + 0x011)
diff --git a/tipper/options.cpp b/tipper/options.cpp
index f4ad1af..21bc6d6 100644
--- a/tipper/options.cpp
+++ b/tipper/options.cpp
@@ -2,11 +2,8 @@
#include "options.h"
#include "resource.h"
#include "popwin.h"
-#include <commctrl.h>
#include "str_utils.h"
-#include <commdlg.h>
-
Options options;
#define WMU_ENABLE_LIST_BUTTONS (WM_USER + 0x030)
diff --git a/tipper/subst.cpp b/tipper/subst.cpp
index 439c0f7..2980c5c 100644
--- a/tipper/subst.cpp
+++ b/tipper/subst.cpp
@@ -1,6 +1,5 @@
#include "common.h"
#include "subst.h"
-#include <time.h>
#include "str_utils.h"
void StripBBCodesInPlace(TCHAR *text) {
diff --git a/tipper/tipper_9.sln b/tipper/tipper_9.sln
index 6a4b68c..df3470a 100644
--- a/tipper/tipper_9.sln
+++ b/tipper/tipper_9.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tipper", "tipper_9.vcproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tipper", "tipper_9.vcproj", "{2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -15,22 +15,22 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|x64.Build.0 = Release Unicode|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64
- {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|Win32.Build.0 = Debug|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|x64.ActiveCfg = Debug|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|x64.Build.0 = Debug|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|Win32.ActiveCfg = Release|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|Win32.Build.0 = Release|Win32
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|x64.ActiveCfg = Release|x64
+ {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/tipper/tipper_9.vcproj b/tipper/tipper_9.vcproj
index 54b8ae5..0dc9048 100644
--- a/tipper/tipper_9.vcproj
+++ b/tipper/tipper_9.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="tipper"
ProjectGUID="{2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}"
RootNamespace="tipper"
@@ -50,6 +50,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="4"
@@ -129,6 +130,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
@@ -213,6 +215,7 @@
BufferSecurityCheck="false"
FloatingPointModel="2"
RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
@@ -304,6 +307,7 @@
BufferSecurityCheck="false"
FloatingPointModel="2"
RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
@@ -386,6 +390,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="4"
@@ -465,7 +470,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
- BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
@@ -553,6 +558,7 @@
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
@@ -644,6 +650,7 @@
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
DebugInformationFormat="3"
diff --git a/tipper/translations.cpp b/tipper/translations.cpp
index 66f5514..34232b0 100644
--- a/tipper/translations.cpp
+++ b/tipper/translations.cpp
@@ -1,7 +1,5 @@
#include "common.h"
#include "translations.h"
-#include <winsock.h>
-#include <time.h>
#include "str_utils.h"
int num_tfuncs = 0;
@@ -272,12 +270,10 @@ TCHAR *word_to_country(HANDLE hContact, const char *module_name, const char *set
}
TCHAR *dword_to_ip(HANDLE hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
- DWORD ip = DBGetContactSettingDword(hContact, module_name, setting_name, (WORD)0);
- if(ip) {
- in_addr in;
- in.S_un.S_addr = htonl(ip);
- a2t(inet_ntoa(in), buff, bufflen);
- buff[bufflen - 1] = 0;
+ DWORD ip = DBGetContactSettingDword(hContact, module_name, setting_name, 0);
+ if (ip) {
+ unsigned char *ipc = (unsigned char*)&ip;
+ mir_sntprintf(buff, bufflen, _T("%u.%u.%u.%u"), ipc[3], ipc[2], ipc[1], ipc[0]);
return buff;
}
return 0;