diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-15 11:45:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-15 11:45:06 +0000 |
commit | c10e213eb6ae855de20d0973a2ca04c975756908 (patch) | |
tree | 423583423ff953b37348dadd86ae610df7107554 /plugins/PluginUpdater/src/Common.h | |
parent | e3b5f750733bbbe9cdd5cb8292ca6938ae8b42f8 (diff) |
compilation fix for PU/IM
git-svn-id: http://svn.miranda-ng.org/main/trunk@4954 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Common.h')
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 108 |
1 files changed, 4 insertions, 104 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index ffdb9a0557..1066fb126e 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -48,6 +48,10 @@ Boston, MA 02111-1307, USA. #include "resource.h"
#include "Notifications.h"
+#if MIRANDA_VER < 0x0A00
+#include "compat.h"
+#endif
+
// Enable Visual Style
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
@@ -201,107 +205,3 @@ int SafeCopyFile(const TCHAR *ptszSrc, const TCHAR *ptszDst); int SafeMoveFile(const TCHAR *ptszSrc, const TCHAR *ptszDst);
int SafeDeleteFile(const TCHAR *ptszSrc);
int SafeCreateFilePath(TCHAR *pFolder);
-
-#if MIRANDA_VER < 0x0A00
-
-#define db_free(A) DBFreeVariant(A)
-
-#define db_get_b(A,B,C,D) DBGetContactSettingByte(A,B,C,D)
-#define db_get_dw(A,B,C,D) DBGetContactSettingDword(A,B,C,D)
-#define db_get_s(A,B,C,D) DBGetContactSettingString(A,B,C,D)
-#define db_get_ts(A,B,C,D) DBGetContactSettingTString(A,B,C,D)
-
-#define db_set_b(A,B,C,D) DBWriteContactSettingByte(A,B,C,D)
-#define db_set_dw(A,B,C,D) DBWriteContactSettingDword(A,B,C,D)
-#define db_set_s(A,B,C,D) DBWriteContactSettingString(A,B,C,D)
-#define db_set_ts(A,B,C,D) DBWriteContactSettingTString(A,B,C,D)
-
-template<class T> class mir_ptr
-{
- T *data;
-
-public:
- __inline mir_ptr() : data((T*)mir_calloc(sizeof(T))) {}
- __inline mir_ptr(T *_p) : data(_p) {}
- __inline ~mir_ptr() { mir_free(data); }
- __inline T *operator = (T *_p) { if (data) mir_free(data); data = _p; return data; }
- __inline T *operator->() const { return data; }
- __inline operator T*() const { return data; }
- __inline operator INT_PTR() const { return (INT_PTR)data; }
-};
-
-struct VARST : public ptrT
-{
- __forceinline VARST(const TCHAR *str) :
- ptrT( Utils_ReplaceVarsT(str))
- {}
-};
-
-class _A2T
-{
- TCHAR *buf;
-
-public:
- __forceinline _A2T(const char *s) : buf(mir_a2t(s)) {}
- __forceinline _A2T(const char *s, int cp) : buf(mir_a2t_cp(s, cp)) {}
- ~_A2T() { mir_free(buf); }
-
- __forceinline operator TCHAR*() const
- { return buf;
- }
-};
-
-class _T2A
-{
- char *buf;
-
-public:
- __forceinline _T2A(const TCHAR *s) : buf(mir_t2a(s)) {}
- __forceinline _T2A(const TCHAR *s, int cp) : buf(mir_t2a_cp(s, cp)) {}
- __forceinline ~_T2A() { mir_free(buf); }
-
- __forceinline operator char*() const
- { return buf;
- }
-};
-
-__forceinline INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
-{
- return CallService("Opt/OpenOptions", 0, (LPARAM)ood);
-}
-
-__forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp)
-{
- return CallService("Opt/AddPage", wParam, (LPARAM)odp);
-}
-
-char *rtrim(char *str);
-int CreatePathToFileT(const TCHAR *ptszPath);
-
-#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1) *sizeof(TCHAR)), A)
-
-__forceinline HANDLE Skin_GetIconHandle(const char *szIconName)
-{ return (HANDLE)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)szIconName);
-}
-
-__forceinline HICON Skin_GetIcon(const char *szIconName, int size=0)
-{ return (HICON)CallService(MS_SKIN2_GETICON, size, (LPARAM)szIconName);
-}
-
-__forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
-{ return (HGENMENU)CallService("CList/AddMainMenuItem", 0, (LPARAM)mi);
-}
-
-__forceinline INT_PTR Hotkey_Register(HOTKEYDESC *hk)
-{ return CallService("CoreHotkeys/Register", 0, (LPARAM)hk);
-}
-
-__forceinline INT_PTR CreateDirectoryTreeT(const TCHAR *ptszPath)
-{ return CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)ptszPath);
-}
-
-__forceinline HANDLE Skin_AddIcon(SKINICONDESC *si)
-{ return (HANDLE)CallService("Skin2/Icons/AddIcon", 0, (LPARAM)si);
-}
-
-#endif
\ No newline at end of file |