From 0759816934ba1f223451449f2fefad938217017c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 31 Jul 2017 11:12:15 +0300 Subject: headers code cleaning --- include/m_chat_int.h | 6 ++++-- include/m_crypto.h | 3 ++- include/m_fontservice.h | 6 ++++-- include/m_hotkeys.h | 4 ++-- include/m_icolib.h | 2 -- include/m_langpack.h | 6 ------ include/m_options.h | 4 +++- include/m_skin.h | 2 -- include/m_userinfo.h | 6 ++++-- include/newpluginapi.h | 6 ++++++ plugins/ExternalAPI/m_toptoolbar.h | 6 ++++-- plugins/NewAwaySysMod/NewAwaySys.log | 33 +++++++++++++++++++++++++++++++++ 12 files changed, 62 insertions(+), 22 deletions(-) create mode 100644 plugins/NewAwaySysMod/NewAwaySys.log diff --git a/include/m_chat_int.h b/include/m_chat_int.h index f4195488ed..83d81e3405 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include +#ifndef M_CORE_H__ +#include +#endif + #include #include #include @@ -364,8 +368,6 @@ struct CHAT_MANAGER extern CHAT_MANAGER *pci; #endif -extern int hLangpack; - EXTERN_C MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pData = NULL, int = hLangpack); ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/m_crypto.h b/include/m_crypto.h index 11c75f626f..8a21ae6d06 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -24,7 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_CRYPTO_H__ #define M_CRYPTO_H__ 1 +#ifndef M_CORE_H__ #include +#endif struct MICryptoEngine { @@ -83,7 +85,6 @@ typedef struct tagCRYPTOPROVIDER __forceinline HANDLE Crypto_RegisterEngine(CRYPTO_PROVIDER *pProvider) { - extern int hLangpack; return (HANDLE)CallService(MS_CRYPTO_REGISTER_ENGINE, hLangpack, (LPARAM)pProvider); } diff --git a/include/m_fontservice.h b/include/m_fontservice.h index 022e03e140..f126a49f1f 100644 --- a/include/m_fontservice.h +++ b/include/m_fontservice.h @@ -5,6 +5,10 @@ #ifndef _FONT_SERVICE_API_INC #define _FONT_SERVICE_API_INC +#ifndef M_CORE_H__ +#include +#endif + ////////////////////////////////////////////////////////////////////////// // // FONTS @@ -93,8 +97,6 @@ struct FontIDW }; // register a font -extern int hLangpack; - EXTERN_C MIR_APP_DLL(int) Font_Register(FontID *pFont, int = hLangpack); EXTERN_C MIR_APP_DLL(int) Font_RegisterW(FontIDW *pFont, int = hLangpack); diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index 6dabe8dfac..b5fa93df9f 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -25,7 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_HOTKEYS_H__ #define M_HOTKEYS_H__ 1 +#ifndef M_CORE_H__ #include +#endif #define HKD_UNICODE 0x0001 #define HKF_MIRANDA_LOCAL 0x8000 @@ -41,8 +43,6 @@ struct HOTKEYDESC DWORD dwFlags; }; -extern int hLangpack; - ///////////////////////////////////////////////////////////////////////////////////////// // use this macro to defile hotkey codes like this: // hkd.DefHotkey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_EXT, 'A'); diff --git a/include/m_icolib.h b/include/m_icolib.h index ac12c2e51c..f0b2c31201 100644 --- a/include/m_icolib.h +++ b/include/m_icolib.h @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_ICOLIB_H__ #define M_ICOLIB_H__ 1 -extern int hLangpack; - #ifndef M_CORE_H__ #include #endif diff --git a/include/m_langpack.h b/include/m_langpack.h index 387d1c2bca..d27988cae3 100644 --- a/include/m_langpack.h +++ b/include/m_langpack.h @@ -91,12 +91,6 @@ EXTERN_C MIR_CORE_DLL(int) Langpack_GetDefaultLocale(void); EXTERN_C MIR_CORE_DLL(wchar_t*) Langpack_PcharToTchar(const char *pszStr); -///////////////////////////////////////////////////////////////////////////////////////// -// initializes the plugin-specific translation context v0.10.0+ -// always returns 0 - -EXTERN_C MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang = &hLangpack); - ///////////////////////////////////////////////////////////////////////////////////////// // reloads langpack // wParam = 0 (ignored) diff --git a/include/m_options.h b/include/m_options.h index 20f160c7c8..4e4b4f164f 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -25,7 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_OPTIONS_H__ #define M_OPTIONS_H__ -extern int hLangpack; +#ifndef M_CORE_H__ +#include +#endif /* Opt/Initialise The user opened the options dialog. Modules should do whatever initialisation diff --git a/include/m_skin.h b/include/m_skin.h index e6c8e3ce5a..6d6cea9a6e 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -23,8 +23,6 @@ #ifndef M_SKIN_H__ #define M_SKIN_H__ 1 -extern int hLangpack; - #ifndef M_CORE_H__ #include #endif diff --git a/include/m_userinfo.h b/include/m_userinfo.h index dd623dcadf..9fbd80572a 100644 --- a/include/m_userinfo.h +++ b/include/m_userinfo.h @@ -25,6 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_USERINFO_H__ #define M_USERINFO_H__ 1 +#ifndef M_CORE_H__ +#include +#endif + #include "m_options.h" //show the User Details dialog box @@ -72,8 +76,6 @@ All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam = (LPARAM)hContact #define PSN_PARAMCHANGED 2 #define PSM_FORCECHANGED (WM_USER+100) //force-send a PSN_INFOCHANGED to all pages -extern int hLangpack; - __forceinline INT_PTR UserInfo_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp) { odp->hLangpack = hLangpack; return CallService("UserInfo/AddPage", wParam, (LPARAM)odp); diff --git a/include/newpluginapi.h b/include/newpluginapi.h index a9705a6ae1..0eb71c9f80 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -138,4 +138,10 @@ struct PLUGININFOEX #define ME_SYSTEM_MODULEUNLOAD "Miranda/System/UnloadModule" +///////////////////////////////////////////////////////////////////////////////////////// +// initializes the plugin-specific translation context v0.10.0+ +// always returns 0 + +EXTERN_C MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang = &hLangpack); + #endif // M_NEWPLUGINAPI_H__ diff --git a/plugins/ExternalAPI/m_toptoolbar.h b/plugins/ExternalAPI/m_toptoolbar.h index cd98be6dee..cf0d90c609 100644 --- a/plugins/ExternalAPI/m_toptoolbar.h +++ b/plugins/ExternalAPI/m_toptoolbar.h @@ -1,6 +1,10 @@ #ifndef M_TOPTOOLBAR_H #define M_TOPTOOLBAR_H +#ifndef M_CORE_H__ +#include +#endif + #define TTB_OPTDIR "TopToolBar" //button flags @@ -58,8 +62,6 @@ lparam = hLangpack returns: hTTBButton - handle of added button on success, -1 on failure. */ -extern int hLangpack; - __forceinline HANDLE TopToolbar_AddButton(TTBButton *pButton) { return (HANDLE)CallService("TopToolBar/AddButton", (WPARAM)pButton, hLangpack); } diff --git a/plugins/NewAwaySysMod/NewAwaySys.log b/plugins/NewAwaySysMod/NewAwaySys.log new file mode 100644 index 0000000000..230412aa7c --- /dev/null +++ b/plugins/NewAwaySysMod/NewAwaySys.log @@ -0,0 +1,33 @@ + stdafx.cxx + AwayOpt.cpp + AwaySys.cpp + Client.cpp + ContactList.cpp +src\ContactList.cpp(663): warning C4189: 'Res' : local variable is initialized but not referenced + CString.cpp + GroupCheckbox.cpp + MsgEventAdded.cpp +src\MsgEventAdded.cpp(85): warning C4100: 'DefaultRetVal' : unreferenced formal parameter + MsgTree.cpp +src\MsgTree.cpp(67): warning C4211: nonstandard extension used : redefined extern to static +src\MsgTree.cpp(619): warning C4239: nonstandard extension used : 'argument' : conversion from 'CTreeItem' to 'CTreeItem &' + A non-const reference may only be bound to an lvalue +src\MsgTree.cpp(638): warning C4239: nonstandard extension used : 'argument' : conversion from 'CTreeItem' to 'CTreeItem &' + A non-const reference may only be bound to an lvalue + Notification.cpp +src\Notification.cpp(53): warning C4505: 'ShowContactMenu' : unreferenced local function has been removed + Options.cpp +src\Options.cpp(266): warning C4512: 'sTreeReadEnumData' : assignment operator could not be generated + src\Options.cpp(257) : see declaration of 'sTreeReadEnumData' +src\Options.cpp(645): warning C4512: 'sListReadEnumData' : assignment operator could not be generated + src\Options.cpp(636) : see declaration of 'sListReadEnumData' +src\Options.cpp(763): warning C4189: 'Res' : local variable is initialized but not referenced +src\Options.cpp(792): warning C4189: 'Res' : local variable is initialized but not referenced + Properties.cpp + ReadAwayMsg.cpp + Services.cpp + SetAwayMsg.cpp + Creating library W:\miranda-ng\bin10\Release64\Obj\NewAwaySys\NewAwaySys.lib and object W:\miranda-ng\bin10\Release64\Obj\NewAwaySys\NewAwaySys.exp + Generating code + Finished generating code + NewAwaySys.vcxproj -> W:\miranda-ng\bin10\Release64\Plugins\NewAwaySys.dll -- cgit v1.2.3