From e180fa60516c6133cef12d839ce8eaea6adcbfad Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 Feb 2013 16:09:19 +0000 Subject: added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CountryFlags/src/extraimg.cpp | 4 ++-- plugins/CountryFlags/src/flags.h | 30 +++++++---------------- plugins/CountryFlags/src/huffman.cpp | 2 ++ plugins/CountryFlags/src/icons.cpp | 8 +++---- plugins/CountryFlags/src/main.cpp | 19 +++++++-------- plugins/CountryFlags/src/stdafx.cpp | 18 ++++++++++++++ plugins/CountryFlags/src/version.h | 45 +++++++++++------------------------ 7 files changed, 57 insertions(+), 69 deletions(-) create mode 100644 plugins/CountryFlags/src/stdafx.cpp (limited to 'plugins/CountryFlags/src') diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 3883b8bf71..94af170dc3 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -101,7 +101,7 @@ static int ExtraImageApply(WPARAM wParam,LPARAM lParam) #define STATUSICON_REFRESHDELAY 100 /* time for which setting changes are buffered */ // always call in context of main thread -static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber) +static void __fastcall SetStatusIcon(HANDLE hContact,int countryNumber) { HICON hIcon = NULL; @@ -136,7 +136,7 @@ static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber) } // always call in context of main thread -static void FASTCALL UnsetStatusIcon(HANDLE hContact,int countryNumber) +static void __fastcall UnsetStatusIcon(HANDLE hContact,int countryNumber) { StatusIconData sid; sid.cbSize=sizeof(sid); diff --git a/plugins/CountryFlags/src/flags.h b/plugins/CountryFlags/src/flags.h index e5a693cd07..66308023a0 100644 --- a/plugins/CountryFlags/src/flags.h +++ b/plugins/CountryFlags/src/flags.h @@ -19,39 +19,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN + #include -#define NONAMELESSUNION #include /* for ImageList functions */ -#define NOWIN2K + #include -#define MIRANDA_VER 0x0A00 -#include #include -#include -#include #include #include -#include -#include #include #include #include -#include #include #include + #define FLAGS_NOHELPERFUNCTIONS -#include "m_flags.h" -#include "resource.h" +#include -#if defined(_MSC_VER) && !defined(FASTCALL) - #define FASTCALL __fastcall -#else - #define FASTCALL -#endif -#if defined(_DEBUG) - #undef FASTCALL - #define FASTCALL -#endif +#include "resource.h" +#include "version.h" /* huffman.c */ #ifdef HUFFMAN_ENCODE @@ -60,8 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void Huffman_Uncompress(unsigned char *in,unsigned char *out,unsigned int insize,unsigned int outsize); /* icons.c */ -HICON FASTCALL LoadFlagIcon(int countryNumber); -int FASTCALL CountryNumberToIndex(int countryNumber); +HICON __fastcall LoadFlagIcon(int countryNumber); +int __fastcall CountryNumberToIndex(int countryNumber); void InitIcons(void); void UninitIcons(void); diff --git a/plugins/CountryFlags/src/huffman.cpp b/plugins/CountryFlags/src/huffman.cpp index ee8680f558..da02e9f97d 100644 --- a/plugins/CountryFlags/src/huffman.cpp +++ b/plugins/CountryFlags/src/huffman.cpp @@ -60,6 +60,8 @@ * Types used for Huffman coding *************************************************************************/ +#include "flags.h" + typedef struct { unsigned char *BytePtr; unsigned int BitPos; diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 5e2bcae8a7..34324005ad 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -44,7 +44,7 @@ const int BitmapIndexMap[232]={ 974, 975, 976, 977, 994, 995,1141,2691,3811,4101,6101,6722 }; -static int FASTCALL CountryNumberToBitmapIndex(int countryNumber) +static int __fastcall CountryNumberToBitmapIndex(int countryNumber) { /* shared flags by multiple countries */ switch(countryNumber) { @@ -94,7 +94,7 @@ static int FASTCALL CountryNumberToBitmapIndex(int countryNumber) // return value needs to be released using DestroyIcon() // only operates on color icons, which isn't a problem here -static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy) +static HICON __fastcall ResizeIconCentered(HICON hIcon,int cx,int cy) { HICON hResIcon=NULL; HDC hdc = CreateCompatibleDC(NULL); @@ -143,7 +143,7 @@ static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy) /************************* Utils **********************************/ -HICON FASTCALL LoadFlagIcon(int countryNumber) +HICON __fastcall LoadFlagIcon(int countryNumber) { /* create identifier */ char *szCountry = (char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, countryNumber, 0); @@ -155,7 +155,7 @@ HICON FASTCALL LoadFlagIcon(int countryNumber) return Skin_GetIcon(szId); } -int FASTCALL CountryNumberToIndex(int countryNumber) +int __fastcall CountryNumberToIndex(int countryNumber) { int nf=0; for(int i=0; i < nCountriesCount; ++i) { diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp index d418828192..4bd819143a 100644 --- a/plugins/CountryFlags/src/main.cpp +++ b/plugins/CountryFlags/src/main.cpp @@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "flags.h" -#include "version.h" HINSTANCE hInst; int nCountriesCount; @@ -27,16 +26,16 @@ int hLangpack; static PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), - "Country Flags", - PLUGIN_VERSION, - "Service offering misc country utilities as flag icons and a IP-to-Country database.", /* autotranslated */ - "H. Herkenrath", - "hrathh@users.sourceforge.net", - "© 2006-2007 H. Herkenrath", - PLUGIN_WEBSITE, + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, - // {68C36842-3D95-4f4a-AB81-014D6593863B} - {0x68c36842,0x3d95,0x4f4a,{0xab,0x81,0x1,0x4d,0x65,0x93,0x86,0x3b}} + // {68C36842-3D95-4F4A-AB81-014D6593863B} + {0x68c36842, 0x3d95, 0x4f4a, {0xab, 0x81, 0x1, 0x4d, 0x65, 0x93, 0x86, 0x3b}} }; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/plugins/CountryFlags/src/stdafx.cpp b/plugins/CountryFlags/src/stdafx.cpp new file mode 100644 index 0000000000..e1b76ab747 --- /dev/null +++ b/plugins/CountryFlags/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "flags.h" \ No newline at end of file diff --git a/plugins/CountryFlags/src/version.h b/plugins/CountryFlags/src/version.h index 571e48ee3e..722fb5abbc 100644 --- a/plugins/CountryFlags/src/version.h +++ b/plugins/CountryFlags/src/version.h @@ -1,31 +1,14 @@ -/* -Miranda IM Country Flags Plugin -Copyright (C) 2006-2007 H. Herkenrath - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program (Flags-License.txt); if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#define NEEDED_MIRANDA_VERSION PLUGIN_MAKE_VERSION(0,7,0,10) -#define NEEDED_MIRANDA_VERSION_STR "0.7 alpha build #10" -#define PLUGIN_VERSION PLUGIN_MAKE_VERSION(0,1,0,3) -#define FILE_VERSION 0,1,0,3 - -#ifdef _DEBUG - #define FILE_VERSION_STR "0.1.0.4 alpha" -#else - #define FILE_VERSION_STR "0.1.0.3" -#endif - -#define PLUGIN_WEBSITE "http://miranda-ng.org/" +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 1 +#define __RELEASE_NUM 0 +#define __BUILD_NUM 3 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "Country flags" +#define __FILENAME "Flags.dll" +#define __DESCRIPTION "Service offering misc country utilities as flag icons and a IP-to-Country database." +#define __AUTHOR "H. Herkenrath" +#define __AUTHOREMAIL "hrathh@users.sourceforge.net" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2006-2007 H. Herkenrath" -- cgit v1.2.3