From 6903c883eb3a7631fc5b344aa30b8cc032142b1d Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 28 Oct 2010 16:44:52 +0000 Subject: [PATCH] Move plugin_set_info prototype and parenthesize arguments for PLUGIN_SET_TRANSLATABLE_INFO (based on patch by Colomban Wendling, thanks). Fix putting pointer symbol before name, not after type. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5341 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 5 +++++ src/plugindata.h | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7ca2db6..74c68222 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,11 @@ Make Python use named styles for color scheme support - use alt.conf color scheme if you want the old colors. Add named style 'function'. + * src/plugindata.h: + Move plugin_set_info prototype and parenthesize arguments for + PLUGIN_SET_TRANSLATABLE_INFO (based on patch by Colomban Wendling, + thanks). + Fix putting pointer symbol before name, not after type. 2010-10-27 Nick Treleaven diff --git a/src/plugindata.h b/src/plugindata.h index a36c6287..2e95a8a3 100644 --- a/src/plugindata.h +++ b/src/plugindata.h @@ -59,6 +59,7 @@ enum { GEANY_ABI_VERSION = 68 }; + /** Defines a function to check the plugin is safe to load. * This performs runtime checks that try to ensure: * - Geany ABI data types are compatible with this plugin. @@ -68,7 +69,6 @@ enum { * want your plugin to require the current Geany version on your machine. * You should update this value when using any new API features. */ #define PLUGIN_VERSION_CHECK(api_required) \ - gint plugin_version_check(gint abi_ver);\ gint plugin_version_check(gint abi_ver) \ { \ if (abi_ver != GEANY_ABI_VERSION) \ @@ -114,8 +114,7 @@ GeanyPlugin; * extra PluginInfo features (such as an icon), so we don't need to break API * compatibility. Alternatively just add a new macro, PLUGIN_SET_INFO_FULL(). -ntrel */ #define PLUGIN_SET_INFO(p_name, p_description, p_version, p_author) \ - void plugin_set_info(PluginInfo* info);\ - void plugin_set_info(PluginInfo* info) \ + void plugin_set_info(PluginInfo *info) \ { \ info->name = (p_name); \ info->description = (p_description); \ @@ -133,15 +132,25 @@ GeanyPlugin; * * @since 0.19 */ #define PLUGIN_SET_TRANSLATABLE_INFO(localedir, package, p_name, p_description, p_version, p_author) \ - void plugin_set_info(PluginInfo* info) \ + void plugin_set_info(PluginInfo *info) \ { \ - main_locale_init(localedir, package); \ + main_locale_init((localedir), (package)); \ info->name = (p_name); \ info->description = (p_description); \ info->version = (p_version); \ info->author = (p_author); \ } + +#ifndef GEANY_PRIVATE + +/* Prototypes for building plugins with -Wmissing-prototypes */ +gint plugin_version_check(gint abi_ver); +void plugin_set_info(PluginInfo *info); + +#endif + + /** @deprecated - use plugin_set_key_group() instead. * @see PLUGIN_KEY_GROUP() macro. */ typedef struct GeanyKeyGroupInfo @@ -307,7 +316,7 @@ struct _ScintillaObject; typedef struct ScintillaFuncs { /** Send Scintilla a message. */ - long int (*scintilla_send_message) (struct _ScintillaObject* sci, unsigned int iMessage, + long int (*scintilla_send_message) (struct _ScintillaObject *sci, unsigned int iMessage, long unsigned int wParam, long int lParam); /** Create a new ScintillaObject widget. */ GtkWidget* (*scintilla_new)(void);