[geany/geany] 6f87aa: Normalize use of header guards and extern "C" guards
Matthew Brush
git-noreply at xxxxx
Wed May 21 19:18:26 UTC 2014
Branch: refs/heads/master
Author: Matthew Brush <matt at geany.org>
Committer: Matthew Brush <matt at geany.org>
Date: Wed, 21 May 2014 19:18:26 UTC
Commit: 6f87aac118fac7730fd981d11b41c8438e2f4649
https://github.com/geany/geany/commit/6f87aac118fac7730fd981d11b41c8438e2f4649
Log Message:
-----------
Normalize use of header guards and extern "C" guards
* Always define GEANY_FOO_H to 1 in the header guards
* Always put a G_BEGIN_DECLS/G_END_DECLS guard in every header for
consistency, even private ones where it doesn't matter.
* Always include either <glib.h>, <gtk/gtk.h> or some other header
that will provide G_BEGIN_DECLS before using it. In a lot of headers
that use glib.h and gtk/gtk.h stuff anyway, this resolves an implicit
dependency they had on them being included before that header.
* Always put a comment at the #endif part of the guard so it's
easier to see what it applies to.
* Always use an underscore between the header guard identifier's words
even though the filename doesn't have one.
Modified Paths:
--------------
src/about.h
src/build.h
src/callbacks.h
src/dialogs.h
src/document.h
src/documentprivate.h
src/editor.h
src/encodings.h
src/filetypes.h
src/filetypesprivate.h
src/geany.h
src/geanyentryaction.h
src/geanymenubuttonaction.h
src/geanyobject.h
src/geanywraplabel.h
src/gtkcompat.h
src/highlighting.h
src/highlightingmappings.h
src/keybindings.h
src/keyfile.h
src/log.h
src/main.h
src/msgwindow.h
src/navqueue.h
src/notebook.h
src/plugindata.h
src/pluginprivate.h
src/plugins.h
src/pluginutils.h
src/prefix.h
src/prefs.h
src/printing.h
src/project.h
src/projectprivate.h
src/sciwrappers.h
src/search.h
src/sidebar.h
src/socket.h
src/stash.h
src/support.h
src/symbols.h
src/templates.h
src/toolbar.h
src/tools.h
src/ui_utils.h
src/utils.h
src/vte.h
src/win32.h
Modified: src/about.h
11 lines changed, 8 insertions(+), 3 deletions(-)
===================================================================
@@ -20,10 +20,15 @@
*/
-#ifndef GEANY_ABOUT_DIALOG_H
-#define GEANY_ABOUT_DIALOG_H
+#ifndef GEANY_ABOUT_H
+#define GEANY_ABOUT_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
void about_dialog_show(void);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_ABOUT_H */
Modified: src/build.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -24,6 +24,8 @@
#ifndef GEANY_BUILD_H
#define GEANY_BUILD_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
/* Forward-declared to avoid including their headers here */
@@ -210,4 +212,4 @@ gchar **build_get_regex(GeanyBuildGroup grp, struct GeanyFiletype *ft, guint *fr
G_END_DECLS
-#endif
+#endif /* GEANY_BUILD_H */
Modified: src/callbacks.h
8 lines changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -19,9 +19,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifndef GEANY_CALLBACKS_H
+#define GEANY_CALLBACKS_H 1
+#include <glib.h>
#include "geany.h" /* necessary for interface.c */
+G_BEGIN_DECLS
G_MODULE_EXPORT gboolean
on_exit_clicked (GtkWidget *widget, gpointer gdata);
@@ -678,3 +682,7 @@ on_detect_type_from_file_activate (GtkMenuItem *menuitem,
G_MODULE_EXPORT void
on_detect_width_from_file_activate (GtkMenuItem *menuitem,
gpointer user_data);
+
+G_END_DECLS
+
+#endif /* GEANY_CALLBACKS_H */
Modified: src/dialogs.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -28,6 +28,10 @@
#ifndef GEANY_DIALOGS_H
#define GEANY_DIALOGS_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -75,4 +79,6 @@ void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRI
void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_DIALOGS_H */
Modified: src/document.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -29,6 +29,8 @@
#ifndef GEANY_DOCUMENT_H
#define GEANY_DOCUMENT_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
#include "Scintilla.h"
@@ -301,4 +303,4 @@ GeanyDocument *document_clone(GeanyDocument *old_doc);
G_END_DECLS
-#endif
+#endif /* GEANY_DOCUMENT_H */
Modified: src/documentprivate.h
9 lines changed, 7 insertions(+), 2 deletions(-)
===================================================================
@@ -21,8 +21,11 @@
#ifndef GEANY_DOCUMENT_PRIVATE_H
-#define GEANY_DOCUMENT_PRIVATE_H
+#define GEANY_DOCUMENT_PRIVATE_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
/* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's
* undo management */
@@ -86,4 +89,6 @@ typedef struct GeanyDocumentPrivate
}
GeanyDocumentPrivate;
-#endif
+G_END_DECLS
+
+#endif /* GEANY_DOCUMENT_PRIVATE_H */
Modified: src/editor.h
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,7 @@
#ifndef GEANY_EDITOR_H
#define GEANY_EDITOR_H 1
+#include <glib.h>
#include "Scintilla.h"
#include "ScintillaWidget.h"
@@ -325,4 +326,4 @@ void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet);
G_END_DECLS
-#endif
+#endif /* GEANY_EDITOR_H */
Modified: src/encodings.h
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -34,7 +34,9 @@
/* Stolen from anjuta */
#ifndef GEANY_ENCODINGS_H
-#define GEANY_ENCODINGS_H
+#define GEANY_ENCODINGS_H 1
+
+#include <glib.h>
G_BEGIN_DECLS
@@ -199,4 +201,4 @@ GeanyEncodingIndex encodings_get_idx_from_charset(const gchar *charset);
G_END_DECLS
-#endif
+#endif /* GEANY_ENCODINGS_H */
Modified: src/filetypes.h
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,7 @@
#ifndef GEANY_FILETYPES_H
#define GEANY_FILETYPES_H 1
+#include <glib.h>
#include "Scintilla.h"
#include "ScintillaWidget.h"
@@ -206,4 +207,4 @@ gboolean filetype_get_comment_open_close(const GeanyFiletype *ft, gboolean singl
G_END_DECLS
-#endif
+#endif /* GEANY_FILETYPES_H */
Modified: src/filetypesprivate.h
9 lines changed, 7 insertions(+), 2 deletions(-)
===================================================================
@@ -21,11 +21,14 @@
#ifndef GEANY_FILETYPES_PRIVATE_H
-#define GEANY_FILETYPES_PRIVATE_H
+#define GEANY_FILETYPES_PRIVATE_H 1
+#include <glib.h>
#include "filetypes.h"
#include "build.h"
+G_BEGIN_DECLS
+
/* Private GeanyFiletype fields */
typedef struct GeanyFiletypePrivate
{
@@ -53,4 +56,6 @@ typedef struct GeanyFiletypePrivate
}
GeanyFiletypePrivate;
-#endif
+G_END_DECLS
+
+#endif /* GEANY_FILETYPES_PRIVATE_H */
Modified: src/geany.h
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -23,7 +23,7 @@
* externs and function prototypes are implemented in main.c. */
#ifndef GEANY_H
-#define GEANY_H
+#define GEANY_H 1
#include <gtk/gtk.h>
@@ -93,4 +93,4 @@ void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
G_END_DECLS
-#endif
+#endif /* GEANY_H */
Modified: src/geanyentryaction.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -21,7 +21,9 @@
#ifndef GEANY_ENTRY_ACTION_H
-#define GEANY_ENTRY_ACTION_H
+#define GEANY_ENTRY_ACTION_H 1
+
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: src/geanymenubuttonaction.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -21,7 +21,9 @@
#ifndef GEANY_MENU_BUTTON_ACTION_H
-#define GEANY_MENU_BUTTON_ACTION_H
+#define GEANY_MENU_BUTTON_ACTION_H 1
+
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: src/geanyobject.h
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -20,8 +20,8 @@
*/
-#ifndef GEANYOBJECT_H
-#define GEANYOBJECT_H
+#ifndef GEANY_OBJECT_H
+#define GEANY_OBJECT_H 1
#include <glib-object.h>
@@ -111,4 +111,4 @@ GObject* geany_object_new (void);
G_END_DECLS
-#endif /* GEANYOBJECT_H */
+#endif /* GEANY_OBJECT_H */
Modified: src/geanywraplabel.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -20,7 +20,9 @@
*/
#ifndef GEANY_WRAP_LABEL_H
-#define GEANY_WRAP_LABEL_H
+#define GEANY_WRAP_LABEL_H 1
+
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: src/gtkcompat.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -21,7 +21,7 @@
/* Compatibility macros to support older GTK+ versions */
#ifndef GTK_COMPAT_H
-#define GTK_COMPAT_H
+#define GTK_COMPAT_H 1
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
Modified: src/highlighting.h
7 lines changed, 4 insertions(+), 3 deletions(-)
===================================================================
@@ -23,11 +23,12 @@
#ifndef GEANY_HIGHLIGHTING_H
#define GEANY_HIGHLIGHTING_H 1
-G_BEGIN_DECLS
-
+#include <glib.h>
#include "Scintilla.h"
#include "ScintillaWidget.h"
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including filetypes.h here */
struct GeanyFiletype;
@@ -59,4 +60,4 @@ void highlighting_show_color_scheme_dialog(void);
G_END_DECLS
-#endif
+#endif /* GEANY_HIGHLIGHTING_H */
Modified: src/highlightingmappings.h
9 lines changed, 6 insertions(+), 3 deletions(-)
===================================================================
@@ -21,11 +21,13 @@
*/
-#ifndef GEANY_HIGHLIGHTINGMAPPINGS_H
-#define GEANY_HIGHLIGHTINGMAPPINGS_H 1
+#ifndef GEANY_HIGHLIGHTING_MAPPINGS_H
+#define GEANY_HIGHLIGHTING_MAPPINGS_H 1
+#include <glib.h>
#include "Scintilla.h"
+G_BEGIN_DECLS
/* contains all filtypes informations in the form of:
* - highlighting_lexer_LANG: the SCI lexer
@@ -1560,5 +1562,6 @@ static const HLKeyword highlighting_keywords_YAML[] =
};
#define highlighting_properties_YAML EMPTY_PROPERTIES
+G_END_DECLS
-#endif /* guard */
+#endif /* GEANY_HIGHLIGHTING_MAPPINGS_H */
Modified: src/keybindings.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -22,6 +22,8 @@
#ifndef GEANY_KEYBINDINGS_H
#define GEANY_KEYBINDINGS_H 1
+#include <gtk/gtk.h>
+
G_BEGIN_DECLS
/** Function pointer type used for keybinding callbacks. */
@@ -276,4 +278,4 @@ void keybindings_dialog_show_prefs_scroll(const gchar *name);
G_END_DECLS
-#endif
+#endif /* GEANY_KEYBINDINGS_H */
Modified: src/keyfile.h
7 lines changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,9 @@
#ifndef GEANY_KEYFILE_H
#define GEANY_KEYFILE_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
extern GPtrArray *pref_groups;
@@ -55,4 +58,6 @@ void configuration_save_session_files(GKeyFile *config);
* realisation of the main window */
void configuration_apply_settings(void);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_KEYFILE_H */
Modified: src/log.h
10 lines changed, 8 insertions(+), 2 deletions(-)
===================================================================
@@ -21,7 +21,11 @@
#ifndef GEANY_LOG_H
-#define GEANY_LOG_H
+#define GEANY_LOG_H 1
+
+#include <glib.h>
+
+G_BEGIN_DECLS
void log_handlers_init(void);
@@ -29,4 +33,6 @@ void log_finalize(void);
void log_show_debug_messages_dialog(void);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_LOG_H */
Modified: src/main.h
10 lines changed, 8 insertions(+), 2 deletions(-)
===================================================================
@@ -21,7 +21,11 @@
#ifndef GEANY_MAIN_H
-#define GEANY_MAIN_H
+#define GEANY_MAIN_H 1
+
+#include <glib.h>
+
+G_BEGIN_DECLS
typedef struct
{
@@ -68,4 +72,6 @@ gboolean main_is_realized(void);
void main_load_project_from_command_line(const gchar *locale_filename, gboolean use_session);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_MAIN_H */
Modified: src/msgwindow.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -22,6 +22,8 @@
#ifndef GEANY_MSGWINDOW_H
#define GEANY_MSGWINDOW_H 1
+#include <gtk/gtk.h>
+
G_BEGIN_DECLS
/**
@@ -104,4 +106,4 @@ gboolean msgwin_goto_messages_file_line(gboolean focus_editor);
G_END_DECLS
-#endif
+#endif /* GEANY_MSGWINDOW_H */
Modified: src/navqueue.h
7 lines changed, 5 insertions(+), 2 deletions(-)
===================================================================
@@ -29,6 +29,9 @@
#ifndef GEANY_NAVQUEUE_H
#define GEANY_NAVQUEUE_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
void navqueue_init(void);
@@ -36,12 +39,12 @@ void navqueue_free(void);
void navqueue_remove_file(const gchar *filename);
-
gboolean navqueue_goto_line(GeanyDocument *old_doc, GeanyDocument *new_doc, gint line);
void navqueue_go_back(void);
void navqueue_go_forward(void);
+G_END_DECLS
-#endif
+#endif /* GEANY_NAVQUEUE_H */
Modified: src/notebook.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -22,6 +22,10 @@
#ifndef GEANY_NOTEBOOK_H
#define GEANY_NOTEBOOK_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -43,4 +47,6 @@ void notebook_switch_tablastused(void);
* document yet). */
gboolean notebook_switch_in_progress(void);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_NOTEBOOK_H */
Modified: src/plugindata.h
19 lines changed, 10 insertions(+), 9 deletions(-)
===================================================================
@@ -29,8 +29,15 @@
* when making changes (see 'Keeping the plugin ABI stable' in the HACKING file). */
-#ifndef GEANY_PLUGINDATA_H
-#define GEANY_PLUGINDATA_H
+#ifndef GEANY_PLUGIN_DATA_H
+#define GEANY_PLUGIN_DATA_H 1
+
+#include <glib.h>
+#include "build.h" /* GeanyBuildGroup, GeanyBuildSource, GeanyBuildCmdEntries enums */
+#include "document.h" /* GeanyDocument */
+#include "editor.h" /* GeanyEditor, GeanyIndentType */
+#include "filetypes.h" /* GeanyFiletype */
+#include "gtkcompat.h"
G_BEGIN_DECLS
@@ -39,12 +46,6 @@ G_BEGIN_DECLS
#undef GEANY
#define GEANY(symbol_name) geany->symbol_name
-#include "build.h" /* GeanyBuildGroup, GeanyBuildSource, GeanyBuildCmdEntries enums */
-#include "document.h" /* GeanyDocument */
-#include "editor.h" /* GeanyEditor, GeanyIndentType */
-#include "filetypes.h" /* GeanyFiletype */
-#include "gtkcompat.h"
-
/** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to.
@@ -754,4 +755,4 @@ BuildFuncs;
G_END_DECLS
-#endif
+#endif /* GEANY_PLUGIN_DATA_H */
Modified: src/pluginprivate.h
9 lines changed, 6 insertions(+), 3 deletions(-)
===================================================================
@@ -20,13 +20,15 @@
*/
-#ifndef GEANY_PLUGINPRIVATE_H
-#define GEANY_PLUGINPRIVATE_H
+#ifndef GEANY_PLUGIN_PRIVATE_H
+#define GEANY_PLUGIN_PRIVATE_H 1
+#include <gtk/gtk.h>
#include "plugindata.h"
#include "ui_utils.h" /* GeanyAutoSeparator */
#include "keybindings.h" /* GeanyKeyGroup */
+G_BEGIN_DECLS
typedef struct SignalConnection
{
@@ -63,5 +65,6 @@ typedef GeanyPluginPrivate Plugin; /* shorter alias */
void plugin_watch_object(Plugin *plugin, gpointer object);
+G_END_DECLS
-#endif /* GEANY_PLUGINPRIVATE_H */
+#endif /* GEANY_PLUGIN_PRIVATE_H */
Modified: src/plugins.h
12 lines changed, 9 insertions(+), 3 deletions(-)
===================================================================
@@ -21,10 +21,14 @@
#ifndef GEANY_PLUGINS_H
-#define GEANY_PLUGINS_H
+#define GEANY_PLUGINS_H 1
#ifdef HAVE_PLUGINS
+#include <glib.h>
+
+G_BEGIN_DECLS
+
extern GList *active_plugin_list;
@@ -36,6 +40,8 @@ void plugins_load_active(void);
gboolean plugins_have_preferences(void);
-#endif
+G_END_DECLS
+
+#endif /* HAVE_PLUGINS */
-#endif
+#endif /* GEANY_PLUGINS_H */
Modified: src/pluginutils.h
10 lines changed, 7 insertions(+), 3 deletions(-)
===================================================================
@@ -20,13 +20,15 @@
*/
-#ifndef GEANY_PLUGINUTILS_H
-#define GEANY_PLUGINUTILS_H
+#ifndef GEANY_PLUGIN_UTILS_H
+#define GEANY_PLUGIN_UTILS_H 1
#ifdef HAVE_PLUGINS
+#include <gtk/gtk.h>
#include "keybindings.h" /* GeanyKeyGroupCallback */
+G_BEGIN_DECLS
/* avoid including plugindata.h otherwise this redefines the GEANY() macro */
struct GeanyPlugin;
@@ -56,5 +58,7 @@ void plugin_show_configure(struct GeanyPlugin *plugin);
void plugin_builder_connect_signals(struct GeanyPlugin *plugin,
GtkBuilder *builder, gpointer user_data);
+G_END_DECLS
+
#endif /* HAVE_PLUGINS */
-#endif /* GEANY_PLUGINUTILS_H */
+#endif /* GEANY_PLUGIN_UTILS_H */
Modified: src/prefix.h
7 lines changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -15,7 +15,7 @@
*/
#ifndef GEANY_PREFIX_H
-#define GEANY_PREFIX_H
+#define GEANY_PREFIX_H 1
/*
@@ -24,6 +24,10 @@
*/
#ifdef ENABLE_BINRELOC
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* WARNING, BEFORE YOU MODIFY PREFIX.C:
*
@@ -90,6 +94,7 @@ char *br_locate (void *symbol);
char *br_locate_prefix (void *symbol);
char *br_prepend_prefix (void *symbol, char *path);
+G_END_DECLS
#endif /* ENABLE_BINRELOC */
Modified: src/prefs.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -22,6 +22,8 @@
#ifndef GEANY_PREFS_H
#define GEANY_PREFS_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
/** General Preferences dialog settings. */
@@ -62,4 +64,4 @@ void prefs_kb_search_name(const gchar *search);
G_END_DECLS
-#endif
+#endif /* GEANY_PREFS_H */
Modified: src/printing.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,10 @@
#ifndef GEANY_PRINTING_H
#define GEANY_PRINTING_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -45,4 +49,6 @@ void printing_page_setup_gtk(void);
void printing_print_doc(struct GeanyDocument *doc);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_PRINTING_H */
Modified: src/project.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,8 @@
#ifndef GEANY_PROJECT_H
#define GEANY_PROJECT_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
#define GEANY_PROJECT_EXT "geany"
@@ -92,4 +94,4 @@ void project_apply_prefs(void);
G_END_DECLS
-#endif
+#endif /* GEANY_PROJECT_H */
Modified: src/projectprivate.h
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -23,8 +23,11 @@
#ifndef GEANY_PROJECTPRIVATE_H
#define GEANY_PROJECTPRIVATE_H 1
+#include <glib.h>
#include "project.h"
+G_BEGIN_DECLS
+
typedef struct GeanyProjectPrivate
{
struct GeanyIndentPrefs *indentation;
@@ -38,5 +41,6 @@ typedef struct GeanyProjectPrivate
}
GeanyProjectPrivate;
+G_END_DECLS
-#endif
+#endif /* GEANY_PROJECT_H */
Modified: src/sciwrappers.h
10 lines changed, 7 insertions(+), 3 deletions(-)
===================================================================
@@ -19,12 +19,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GEANY_SCIWRAPPERS_H
-#define GEANY_SCIWRAPPERS_H 1
+#ifndef GEANY_SCI_WRAPPERS_H
+#define GEANY_SCI_WRAPPERS_H 1
+#include <gtk/gtk.h>
#include "Scintilla.h"
#include "ScintillaWidget.h"
+G_BEGIN_DECLS
gchar* sci_get_string (ScintillaObject *sci, guint msg, gulong wParam);
@@ -189,4 +191,6 @@ gint sci_text_width (ScintillaObject *sci, gint styleNumber, const gchar *
void sci_move_selected_lines_down (ScintillaObject *sci);
void sci_move_selected_lines_up (ScintillaObject *sci);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_SCI_WRAPPERS_H */
Modified: src/search.h
12 lines changed, 6 insertions(+), 6 deletions(-)
===================================================================
@@ -28,10 +28,14 @@
#ifndef GEANY_SEARCH_H
#define GEANY_SEARCH_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
-/* Forward-declared to avoid including document.h here */
+/* Forward-declared to avoid including their headers here */
struct GeanyDocument;
+struct _ScintillaObject;
+struct Sci_TextToFind;
/* the flags given in the search dialog for "find next", also used by the search bar */
typedef struct GeanySearchData
@@ -99,10 +103,6 @@ void search_show_find_in_files_dialog(const gchar *dir);
void search_show_find_in_files_dialog_full(const gchar *text, const gchar *dir);
-
-struct _ScintillaObject;
-struct Sci_TextToFind;
-
void geany_match_info_free(GeanyMatchInfo *info);
gint search_find_prev(struct _ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_);
@@ -126,4 +126,4 @@ guint search_replace_range(struct _ScintillaObject *sci, struct Sci_TextToFind *
G_END_DECLS
-#endif
+#endif /* GEANY_SEARCH_H */
Modified: src/sidebar.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -24,6 +24,10 @@
#ifndef GEANY_SIDEBAR_H
#define GEANY_SIDEBAR_H 1
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -68,4 +72,6 @@ void sidebar_focus_openfiles_tab(void);
void sidebar_focus_symbols_tab(void);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_SIDEBAR_H */
Modified: src/socket.h
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,9 @@
#ifndef GEANY_SOCKET_H
#define GEANY_SOCKET_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
struct socket_info_struct
{
@@ -41,5 +44,6 @@ gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpoint
gint socket_finalize(void);
+G_END_DECLS
-#endif
+#endif /* GEANY_SOCKET_H */
Modified: src/stash.h
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -20,7 +20,9 @@
*/
#ifndef GEANY_STASH_H
-#define GEANY_STASH_H
+#define GEANY_STASH_H 1
+
+#include <gtk/gtk.h>
G_BEGIN_DECLS
@@ -101,4 +103,4 @@ void stash_tree_update(GtkTreeView *tree);
G_END_DECLS
-#endif
+#endif /* GEANY_STASH_H */
Modified: src/support.h
5 lines changed, 5 insertions(+), 0 deletions(-)
===================================================================
@@ -25,6 +25,9 @@
* @see GLib's @c gi18n-lib.h.
**/
+#ifndef GEANY_SUPPORT_H
+#define GEANY_SUPPORT_H 1
+
#include <glib.h>
G_BEGIN_DECLS
@@ -42,3 +45,5 @@ G_BEGIN_DECLS
#endif
G_END_DECLS
+
+#endif /* GEANY_SUPPORT_H */
Modified: src/symbols.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,10 @@
#ifndef GEANY_SYMBOLS_H
#define GEANY_SYMBOLS_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -66,4 +70,6 @@ gint symbols_get_current_function(struct GeanyDocument *doc, const gchar **tagna
gint symbols_get_current_scope(struct GeanyDocument *doc, const gchar **tagname);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_SYMBOLS_H */
Modified: src/templates.h
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -28,6 +28,8 @@
#ifndef GEANY_TEMPLATES_H
#define GEANY_TEMPLATES_H 1
+#include <glib.h>
+
G_BEGIN_DECLS
/* Forward-declared to avoid including their headers here */
@@ -89,4 +91,4 @@ void templates_free_templates(void);
G_END_DECLS
-#endif
+#endif /* GEANY_TEMPLATES_H */
Modified: src/toolbar.h
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -20,7 +20,9 @@
*/
#ifndef GEANY_TOOLBAR_H
-#define GEANY_TOOLBAR_H
+#define GEANY_TOOLBAR_H 1
+
+#include <gtk/gtk.h>
G_BEGIN_DECLS
@@ -63,4 +65,4 @@ void toolbar_configure(GtkWindow *parent);
G_END_DECLS
-#endif
+#endif /* GEANY_TOOLBAR_H */
Modified: src/tools.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -23,6 +23,10 @@
#ifndef GEANY_TOOLS_H
#define GEANY_TOOLS_H 1
+#include <glib.h>
+
+G_BEGIN_DECLS
+
/* Forward-declared to avoid including document.h here */
struct GeanyDocument;
@@ -34,4 +38,6 @@ void tools_word_count(void);
void tools_color_chooser(const gchar *color);
-#endif
+G_END_DECLS
+
+#endif /* GEANY_TOOLS_H */
Modified: src/ui_utils.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -352,4 +352,4 @@ gboolean ui_encodings_combo_box_set_active_encoding(GtkComboBox *combo, gint enc
G_END_DECLS
-#endif
+#endif /* GEANY_UI_UTILS_H */
Modified: src/utils.h
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -27,10 +27,10 @@
#ifndef GEANY_UTILS_H
#define GEANY_UTILS_H 1
-G_BEGIN_DECLS
-
+#include <glib.h>
#include <time.h>
+G_BEGIN_DECLS
/** Returns @c TRUE if @a ptr is @c NULL or @c *ptr is @c FALSE. */
#define EMPTY(ptr) \
@@ -288,4 +288,4 @@ gchar *utils_parse_and_format_build_date(const gchar *input);
G_END_DECLS
-#endif
+#endif /* GEANY_UTILS_H */
Modified: src/vte.h
9 lines changed, 7 insertions(+), 2 deletions(-)
===================================================================
@@ -25,6 +25,9 @@
#ifdef HAVE_VTE
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
typedef struct
{
@@ -81,6 +84,8 @@ void vte_send_selection_to_vte(void);
void vte_select_all(void);
-#endif
+G_END_DECLS
+
+#endif /* HAVE_VTE */
-#endif
+#endif /* GEANY_VTE_H */
Modified: src/win32.h
11 lines changed, 10 insertions(+), 1 deletions(-)
===================================================================
@@ -19,9 +19,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifndef GEANY_WIN32_H
+#define GEANY_WIN32_H 1
#ifdef G_OS_WIN32
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
void win32_show_pref_file_dialog(GtkEntry *item);
@@ -63,4 +68,8 @@ gchar *win32_get_installation_dir(void);
gchar *win32_expand_environment_variables(const gchar *str);
-#endif
+G_END_DECLS
+
+#endif /* G_OS_WIN32 */
+
+#endif /* GEANY_WIN32_H */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list