From a70382b0e8bed265a1d314d9f6aae8f2dd48d20b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 18:45:54 +0000 Subject: ex-protos moved to the Plugins folder git-svn-id: http://svn.miranda-ng.org/main/trunk@2545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Quotes/src/stdafx.h | 154 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 plugins/Quotes/src/stdafx.h (limited to 'plugins/Quotes/src/stdafx.h') diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h new file mode 100644 index 0000000000..5e72bc0e0b --- /dev/null +++ b/plugins/Quotes/src/stdafx.h @@ -0,0 +1,154 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" +#define MIRANDA_VER 0x0A00 +// #define CHART_IMPLEMENT +#define TEST_IMPORT_EXPORT + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// Miranda headers +#pragma warning(disable: 4996) +#include +#include +#include +#include +#pragma warning(default: 4996) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// boost headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "boost/date_time/c_local_time_adjustor.hpp" + +// stl headers +#include +#include +#include +#include +#include +#include + + +typedef std::wstring tstring; +typedef std::wostringstream tostringstream; +typedef std::wistringstream tistringstream; +typedef std::wofstream tofstream; +typedef std::wifstream tifstream; +typedef std::wostream tostream; +typedef std::wistream tistream; +typedef boost::posix_time::wtime_input_facet ttime_input_facet; +typedef boost::posix_time::wtime_facet ttime_facet; + +inline int quotes_stricmp(LPCTSTR p1,LPCTSTR p2) +{ + return _tcsicmp(p1,p2); +} + +inline std::string quotes_t2a(const TCHAR* t) +{ + std::string s; + char* p = mir_t2a(t); + if(p) + { + s = p; + mir_free(p); + } + return s; +} + +inline tstring quotes_a2t(const char* s) +{ + tstring t; + TCHAR* p = mir_a2t(s); + if(p) + { + t = p; + mir_free(p); + } + return t; +} +namespace detail +{ + template struct safe_string_impl + { + typedef T* PTR; + + safe_string_impl(PTR p) : m_p(p){} + ~safe_string_impl(){TD::dealloc(m_p);} + + PTR m_p; + }; + + template struct MirandaFree + { + static void dealloc(T* p){mir_free(p);} + }; + + template struct OwnerFree + { + static void dealloc(T* p){::free(p);} + }; +} + +template struct mir_safe_string : public detail::safe_string_impl> +{ + mir_safe_string(PTR p) : detail::safe_string_impl>(p){} +}; + +template struct safe_string : public detail::safe_string_impl> +{ + safe_string(PTR p) : detail::safe_string_impl>(p){} +}; + +extern HINSTANCE g_hInstance; + +// #ifdef MIRANDA_VER +// #undef MIRANDA_VER +// #endif + +// TODO: reference additional headers your program requires here -- cgit v1.2.3