Revision: 2267 http://geany.svn.sourceforge.net/geany/?rev=2267&view=rev Author: eht16 Date: 2008-02-20 03:24:23 -0800 (Wed, 20 Feb 2008)
Log Message: ----------- Apply patch from Daniel Richard G. to fix to fix several compiler warnings, C89 violations and minor code problems (thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/autosave.c trunk/plugins/classbuilder.c trunk/plugins/demoplugin.c trunk/plugins/export.c trunk/plugins/filebrowser.c trunk/plugins/htmlchars.c trunk/plugins/vcdiff.c trunk/src/build.c trunk/src/build.h trunk/src/callbacks.c trunk/src/dialogs.c trunk/src/dialogs.h trunk/src/document.c trunk/src/document.h trunk/src/editor.c trunk/src/editor.h trunk/src/encodings.c trunk/src/encodings.h trunk/src/filetypes.h trunk/src/geanyobject.h trunk/src/highlighting.c trunk/src/highlighting.h trunk/src/keybindings.c trunk/src/keybindings.h trunk/src/keyfile.c trunk/src/keyfile.h trunk/src/main.c trunk/src/main.h trunk/src/msgwindow.c trunk/src/msgwindow.h trunk/src/navqueue.c trunk/src/navqueue.h trunk/src/notebook.c trunk/src/notebook.h trunk/src/plugindata.h trunk/src/plugins.c trunk/src/plugins.h trunk/src/prefix.c trunk/src/prefs.c trunk/src/project.c trunk/src/project.h trunk/src/sciwrappers.c trunk/src/search.c trunk/src/search.h trunk/src/socket.c trunk/src/socket.h trunk/src/symbols.c trunk/src/symbols.h trunk/src/templates.c trunk/src/tools.c trunk/src/tools.h trunk/src/treeviews.c trunk/src/treeviews.h trunk/src/ui_utils.c trunk/src/ui_utils.h trunk/src/utils.c trunk/src/utils.h trunk/src/vte.c trunk/src/vte.h trunk/tagmanager/c.c trunk/tagmanager/docbook.c trunk/tagmanager/haskell.c trunk/tagmanager/include/tm_workspace.h trunk/tagmanager/sort.c trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/ChangeLog 2008-02-20 11:24:23 UTC (rev 2267) @@ -1,3 +1,10 @@ +2008-02-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * plugins/*, src/*, tagmanager/*: + Apply patch from Daniel Richard G. to fix to fix several + compiler warnings, C89 violations and minor code problems (thanks). + + 2008-02-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/vte.c: Apply patch from Jeff Pohlmeyer to mark the VTE also as
Modified: trunk/plugins/autosave.c =================================================================== --- trunk/plugins/autosave.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/autosave.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -79,7 +79,7 @@ }
-void set_timeout() +void set_timeout(void) { if (src_id != G_MAXUINT) g_source_remove(src_id); @@ -195,7 +195,7 @@ }
-void cleanup() +void cleanup(void) { g_source_remove(src_id); g_free(config_file);
Modified: trunk/plugins/classbuilder.c =================================================================== --- trunk/plugins/classbuilder.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/classbuilder.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -803,7 +803,7 @@ }
-void cleanup() +void cleanup(void) { gtk_widget_destroy(plugin_fields->menu_item); }
Modified: trunk/plugins/demoplugin.c =================================================================== --- trunk/plugins/demoplugin.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/demoplugin.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -70,7 +70,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - welcome_text); + "%s", welcome_text); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), _("(From the %s plugin)"), info()->name);
@@ -146,7 +146,7 @@ /* Called by Geany before unloading the plugin. * Here any UI changes should be removed, memory freed and any other finalization done. * Be sure to leave Geany as it was before init(). */ -void cleanup() +void cleanup(void) { // remove the menu item added in init() gtk_widget_destroy(plugin_fields->menu_item);
Modified: trunk/plugins/export.c =================================================================== --- trunk/plugins/export.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/export.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -737,7 +737,7 @@ }
-void cleanup() +void cleanup(void) { gtk_widget_destroy(plugin_fields->menu_item); }
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/filebrowser.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -60,7 +60,7 @@ { FILEVIEW_COLUMN_ICON = 0, FILEVIEW_COLUMN_NAME, - FILEVIEW_N_COLUMNS, + FILEVIEW_N_COLUMNS };
static gboolean show_hidden_files = FALSE; @@ -163,7 +163,7 @@
// adds ".." to the start of the file list -static void add_top_level_entry() +static void add_top_level_entry(void) { GtkTreeIter iter;
@@ -178,7 +178,7 @@ }
-static void clear() +static void clear(void) { gtk_list_store_clear(file_store);
@@ -190,7 +190,7 @@
// recreate the tree model from current_dir. -static void refresh() +static void refresh(void) { gchar *utf8_dir; GSList *list; @@ -217,14 +217,14 @@ }
-static void on_go_home() +static void on_go_home(void) { setptr(current_dir, g_strdup(g_get_home_dir())); refresh(); }
-static gchar *get_default_dir() +static gchar *get_default_dir(void) { const gchar *dir = NULL;
@@ -237,7 +237,7 @@ }
-static void on_current_path() +static void on_current_path(void) { gchar *fname; gchar *dir; @@ -260,7 +260,7 @@ }
-static void on_go_up() +static void on_go_up(void) { // remove the highest directory part (which becomes the basename of current_dir) setptr(current_dir, g_path_get_dirname(current_dir)); @@ -495,7 +495,7 @@ }
-static GtkWidget *create_popup_menu() +static GtkWidget *create_popup_menu(void) { GtkWidget *item, *menu, *image;
@@ -629,7 +629,7 @@ }
-static void prepare_file_view() +static void prepare_file_view(void) { GtkCellRenderer *text_renderer, *icon_renderer; GtkTreeViewColumn *column; @@ -671,7 +671,7 @@ }
-static GtkWidget *make_toolbar() +static GtkWidget *make_toolbar(void) { GtkWidget *wid, *toolbar; GtkTooltips *tooltips = GTK_TOOLTIPS(p_support->lookup_widget( @@ -756,7 +756,7 @@ }
-static void completion_create() +static void completion_create(void) { entry_completion = gtk_entry_completion_new();
@@ -915,7 +915,7 @@ }
-void cleanup() +void cleanup(void) { g_free(config_file); g_free(open_cmd);
Modified: trunk/plugins/htmlchars.c =================================================================== --- trunk/plugins/htmlchars.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/htmlchars.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -61,7 +61,7 @@ static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter);
-static void tools_show_dialog_insert_special_chars() +static void tools_show_dialog_insert_special_chars(void) { if (sc_dialog == NULL) { @@ -79,7 +79,7 @@ gtk_widget_set_name(sc_dialog, "GeanyDialog");
height = GEANY_WINDOW_MINIMAL_HEIGHT; - gtk_window_set_default_size(GTK_WINDOW(sc_dialog), height * 0.8, height); + gtk_window_set_default_size(GTK_WINDOW(sc_dialog), height * 8 / 10, height); gtk_dialog_set_default_response(GTK_DIALOG(sc_dialog), GTK_RESPONSE_CANCEL);
label = gtk_label_new(_("Choose a special character from the list below and double click on it or use the button to insert it at the current cursor position.")); @@ -521,7 +521,7 @@
/* Destroy widgets */ -void cleanup() +void cleanup(void) { gtk_widget_destroy(plugin_fields->menu_item);
Modified: trunk/plugins/vcdiff.c =================================================================== --- trunk/plugins/vcdiff.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/plugins/vcdiff.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -271,11 +271,11 @@ if (force_encoding) { text = p_encoding->convert_to_utf8_from_charset( - std_output, -1, force_encoding, TRUE); + std_output, (gsize)-1, force_encoding, TRUE); } else { - text = p_encoding->convert_to_utf8(std_output, -1, &detect_enc); + text = p_encoding->convert_to_utf8(std_output, (gsize)-1, &detect_enc); } if (text) { @@ -454,7 +454,7 @@ static GtkWidget *menu_vcdiff_dir = NULL; static GtkWidget *menu_vcdiff_project = NULL;
-static void update_menu_items() +static void update_menu_items(void) { document *doc; gboolean have_file; @@ -525,7 +525,7 @@
/* Called by Geany before unloading the plugin. */ -void cleanup() +void cleanup(void) { // remove the menu item added in init() gtk_widget_destroy(plugin_fields->menu_item);
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/build.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -1384,7 +1384,7 @@ }
-static void show_includes_arguments_tex() +static void show_includes_arguments_tex(void) { GtkWidget *dialog, *label, *entries[4], *vbox, *table; gint idx = document_get_cur_idx(); @@ -1551,7 +1551,7 @@ }
-static void show_includes_arguments_gen() +static void show_includes_arguments_gen(void) { GtkWidget *dialog, *label, *entries[3], *vbox; GtkWidget *ft_table = NULL; @@ -1943,7 +1943,7 @@
static void -show_make_custom() +show_make_custom(void) { static GtkWidget *dialog = NULL; // keep dialog for combo history
Modified: trunk/src/build.h =================================================================== --- trunk/src/build.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/build.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -62,9 +62,9 @@
-void build_init(); +void build_init(void);
-void build_finalize(); +void build_finalize(void);
gboolean build_parse_make_dir(const gchar *string, gchar **prefix);
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/callbacks.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -93,7 +93,7 @@ CallbacksData callbacks_data = {-1};
-static gboolean check_no_unsaved() +static gboolean check_no_unsaved(void) { guint i;
@@ -108,7 +108,7 @@ }
-static gboolean account_for_unsaved() +static gboolean account_for_unsaved(void) { gint p;
@@ -139,7 +139,7 @@
// should only be called from on_exit_clicked -static void quit_app() +static void quit_app(void) { guint i;
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/dialogs.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -63,7 +63,7 @@ };
#if ! GEANY_USE_WIN32_DIALOG -static GtkWidget *add_file_open_extra_widget(); +static GtkWidget *add_file_open_extra_widget(void); #endif
@@ -163,7 +163,7 @@
#if ! GEANY_USE_WIN32_DIALOG -static void create_open_file_dialog() +static void create_open_file_dialog(void) { GtkWidget *filetype_combo, *encoding_combo; GtkWidget *viewbtn; @@ -471,7 +471,7 @@
#if ! GEANY_USE_WIN32_DIALOG -static void create_save_file_dialog() +static void create_save_file_dialog(void) { GtkWidget *vbox, *check_open_new_tab, *rename_btn; GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(app->window, "tooltips")); @@ -823,7 +823,7 @@ gint response, GtkWidget *entry) { - gboolean persistent = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo")); + gboolean persistent = (gboolean) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo"));
if (response == GTK_RESPONSE_ACCEPT) {
Modified: trunk/src/dialogs.h =================================================================== --- trunk/src/dialogs.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/dialogs.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -33,22 +33,22 @@ typedef void (*InputCallback)(const gchar *);
-void dialogs_show_open_file(); +void dialogs_show_open_file(void);
-gboolean dialogs_show_save_as(); +gboolean dialogs_show_save_as(void);
gboolean dialogs_show_unsaved_file(gint idx);
-void dialogs_show_open_font(); +void dialogs_show_open_font(void);
-void dialogs_show_word_count(); +void dialogs_show_word_count(void);
void dialogs_show_color(gchar *colour);
GtkWidget *dialogs_show_input(const gchar *title, const gchar *label_text, const gchar *default_text, gboolean persistent, InputCallback input_cb);
-void dialogs_show_goto_line(); +void dialogs_show_goto_line(void);
void dialogs_show_file_properties(gint idx);
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/document.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -354,7 +354,7 @@
/* returns the next free place(i.e. index) in the document list, * or -1 if the current doc_array is full */ -static gint document_get_new_idx() +static gint document_get_new_idx(void) { guint i;
@@ -1294,9 +1294,9 @@ // encoding, it will be converted to doc_list[idx].encoding below and this conversion // also changes the BOM data = (gchar*) g_malloc(len + 3); // 3 chars for BOM - data[0] = 0xef; - data[1] = 0xbb; - data[2] = 0xbf; + data[0] = (gchar) 0xef; + data[1] = (gchar) 0xbb; + data[2] = (gchar) 0xbf; sci_get_text(doc_list[idx].sci, len, data + 3); len += 3; }
Modified: trunk/src/document.h =================================================================== --- trunk/src/document.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/document.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -131,33 +131,28 @@
gint document_find_by_filename(const gchar *filename, gboolean is_tm_filename);
- gint document_find_by_sci(ScintillaObject *sci);
- gint document_get_notebook_page(gint doc_idx);
gint document_get_n_idx(guint page_num);
-gint document_get_cur_idx(); +gint document_get_cur_idx(void);
-document *document_get_current(); +document *document_get_current(void);
+void document_init_doclist(void);
-void document_init_doclist(); +void document_finalize(void);
-void document_finalize();
- void document_set_text_changed(gint idx);
void document_apply_update_prefs(gint idx);
- gboolean document_remove(guint page_num);
- gint document_new_file(const gchar *filename, filetype *ft, const gchar *text);
gint document_clone(gint old_idx, const gchar *utf8_filename); @@ -174,13 +169,10 @@ void document_open_files(const GSList *filenames, gboolean readonly, filetype *ft, const gchar *forced_enc);
- gboolean document_reload_file(gint idx, const gchar *forced_enc);
- gboolean document_save_file(gint idx, gboolean force);
- gboolean document_search_bar_find(gint idx, const gchar *text, gint flags, gboolean inc);
gint document_find_text(gint idx, const gchar *text, gint flags, gboolean search_backwards, @@ -254,14 +246,12 @@
void document_undo_add(gint idx, guint type, gpointer data);
- GdkColor *document_get_status(gint idx);
+void document_delay_colourise(void);
-void document_delay_colourise(); +void document_colourise_new(void);
-void document_colourise_new(); - void document_insert_colour(gint idx, const gchar *colour);
void document_set_use_tabs(gint idx, gboolean use_tabs);
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/editor.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -77,7 +77,7 @@ gpointer user_data) { gint idx = GPOINTER_TO_INT(user_data); - editor_info.click_pos = sci_get_position_from_xy(doc_list[idx].sci, event->x, event->y, FALSE); + editor_info.click_pos = sci_get_position_from_xy(doc_list[idx].sci, (gint)event->x, (gint)event->y, FALSE);
if (event->button == 1) { @@ -1997,7 +1997,7 @@ brace_pos++; if (! utils_isbrace(sci_get_char_at(sci, brace_pos), editor_prefs.brace_match_ltgt)) { - SSM(sci, SCI_BRACEBADLIGHT, -1, 0); + SSM(sci, SCI_BRACEBADLIGHT, (uptr_t)-1, 0); return; } }
Modified: trunk/src/editor.h =================================================================== --- trunk/src/editor.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/editor.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -133,7 +133,7 @@
void editor_scroll_to_line(ScintillaObject *sci, gint line, gfloat percent_of_view);
-void editor_finalize(); +void editor_finalize(void);
/* General editing functions */
Modified: trunk/src/encodings.c =================================================================== --- trunk/src/encodings.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/encodings.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -53,6 +53,9 @@ #endif
+GeanyEncoding encodings[GEANY_ENCODINGS_MAX]; + + #define fill(Order, Group, Idx, Charset, Name) \ encodings[Idx].idx = Idx; \ encodings[Idx].order = Order; \ @@ -479,7 +482,7 @@ gchar *utf8_content; gboolean check_regex = FALSE; gboolean check_locale = FALSE; - guint i; + gint i;
if ((gint)size == -1) { @@ -488,7 +491,7 @@
#ifdef HAVE_REGCOMP // first try to read the encoding from the file content - for (i = 0; i < G_N_ELEMENTS(pregs) && ! check_regex; i++) + for (i = 0; i < (gint) G_N_ELEMENTS(pregs) && ! check_regex; i++) { if ((regex_charset = regex_match(&pregs[i], buffer, size)) != NULL) check_regex = TRUE; @@ -500,7 +503,7 @@
for (i = 0; i < GEANY_ENCODINGS_MAX; i++) { - if (i == (guint) encodings[GEANY_ENCODING_NONE].idx || i == (guint) -1) + if (i == encodings[GEANY_ENCODING_NONE].idx || i == -1) continue;
if (check_regex) @@ -522,7 +525,7 @@ if (charset == NULL) continue;
- geany_debug("Trying to convert %d bytes of data from %s into UTF-8.", (gint) size, charset); + geany_debug("Trying to convert %" G_GSIZE_FORMAT " bytes of data from %s into UTF-8.", size, charset); utf8_content = encodings_convert_to_utf8_from_charset(buffer, size, charset, FALSE);
if (utf8_content != NULL)
Modified: trunk/src/encodings.h =================================================================== --- trunk/src/encodings.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/encodings.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -179,7 +179,7 @@ } GeanyEncodingIndex;
-GeanyEncoding encodings[GEANY_ENCODINGS_MAX]; +extern GeanyEncoding encodings[GEANY_ENCODINGS_MAX];
GeanyEncodingIndex encodings_scan_unicode_bom(const gchar *string, gsize len, guint *bom_len);
Modified: trunk/src/filetypes.h =================================================================== --- trunk/src/filetypes.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/filetypes.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -88,9 +88,9 @@
struct build_actions { - gboolean can_compile:1; - gboolean can_link:1; - gboolean can_exec:1; + gboolean can_compile; + gboolean can_link; + gboolean can_exec; };
struct build_programs @@ -128,10 +128,10 @@ filetype *filetypes_get_from_uid(gint uid);
/* Calls filetypes_init_types() and creates the filetype menu. */ -void filetypes_init(); +void filetypes_init(void);
/* Create the filetype array and fill it with the known filetypes. */ -void filetypes_init_types(); +void filetypes_init_types(void);
/* Detect the filetype for document idx, checking for a shebang, then filename extension. */ filetype *filetypes_detect_from_file(gint idx); @@ -141,17 +141,17 @@ filetype *filetypes_detect_from_filename(const gchar *utf8_filename);
/* frees the array and all related pointers */ -void filetypes_free_types(); +void filetypes_free_types(void);
void filetypes_load_config(gint ft_id);
-void filetypes_save_commands(); +void filetypes_save_commands(void);
void filetypes_select_radio_item(const filetype *ft);
GtkFileFilter *filetypes_create_file_filter(filetype *ft);
-GtkFileFilter *filetypes_create_file_filter_all_source(); +GtkFileFilter *filetypes_create_file_filter_all_source(void);
gchar *filetypes_get_conf_extension(gint filetype_idx);
Modified: trunk/src/geanyobject.h =================================================================== --- trunk/src/geanyobject.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/geanyobject.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -76,7 +76,7 @@ void (*document_activate)(gint idx); void (*project_open)(GKeyFile *keyfile); void (*project_save)(GKeyFile *keyfile); - void (*project_close)(); + void (*project_close)(void); };
GType geany_object_get_type (void);
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/highlighting.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -73,9 +73,9 @@ typedef struct { // can take values 1 or 2 (or 3) - guchar marker:2; - guchar lines:2; - guchar draw_line:3; + guint marker:2; + guint lines:2; + guint draw_line:3; } FoldingStyle;
static struct @@ -582,10 +582,10 @@ static void styleset_c_like_init(GKeyFile *config, GKeyFile *config_home, gint filetype_idx) { - HighlightingStyle uuid = {0x404080, 0xffffff, FALSE, FALSE}; - HighlightingStyle operator = {0x301010, 0xffffff, FALSE, FALSE}; - HighlightingStyle verbatim = {0x301010, 0xffffff, FALSE, FALSE}; - HighlightingStyle regex = {0x105090, 0xffffff, FALSE, FALSE}; + static HighlightingStyle uuid = {0x404080, 0xffffff, FALSE, FALSE}; + static HighlightingStyle operator = {0x301010, 0xffffff, FALSE, FALSE}; + static HighlightingStyle verbatim = {0x301010, 0xffffff, FALSE, FALSE}; + static HighlightingStyle regex = {0x105090, 0xffffff, FALSE, FALSE};
StyleEntry entries[] = {
Modified: trunk/src/highlighting.h =================================================================== --- trunk/src/highlighting.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/highlighting.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -33,8 +33,8 @@ { gint foreground; gint background; - gboolean bold:1; - gboolean italic:1; + gboolean bold; + gboolean italic; } HighlightingStyle;
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/keybindings.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -46,6 +46,8 @@ #include "vte.h"
+KeyBinding *keys[GEANY_MAX_KEYS]; + static const gboolean swap_alt_tab_order = FALSE;
@@ -103,10 +105,10 @@ // common function for keybindings using current word static void cb_func_current_word(guint key_id);
-static void add_menu_accels(); +static void add_menu_accels(void);
-static void init_default_kb() +static void init_default_kb(void) { // init all fields of keys with default values keys[GEANY_KEYS_MENU_NEW] = fill(cb_func_file_action, @@ -331,7 +333,7 @@ }
-static void load_user_kb() +static void load_user_kb(void) { gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "keybindings.conf", NULL); gchar *val; @@ -570,7 +572,7 @@ gtk_widget_set_name(dialog, "GeanyDialog");
height = GEANY_WINDOW_MINIMAL_HEIGHT; - gtk_window_set_default_size(GTK_WINDOW(dialog), height * 0.8, height); + gtk_window_set_default_size(GTK_WINDOW(dialog), height * 8 / 10, height); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL);
label3 = gtk_label_new(_("The following keyboard shortcuts are configurable:"));
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/keybindings.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -185,7 +185,7 @@ } GeanyKeyCommand;
-KeyBinding *keys[GEANY_MAX_KEYS]; +extern KeyBinding *keys[GEANY_MAX_KEYS];
void keybindings_init(void); @@ -197,7 +197,7 @@ /* just write the content of the keys array to the config file */ void keybindings_write_to_file(void);
-void keybindings_show_shortcuts(); +void keybindings_show_shortcuts(void);
/* central keypress event handler, almost all keypress events go to this function */ gboolean keybindings_got_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/keyfile.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -160,8 +160,11 @@ g_key_file_set_string_list(config, "plugins", "active_plugins", (const gchar**)app->active_plugins, g_strv_length(app->active_plugins)); else + { // use an empty dummy array to override maybe exisiting value - g_key_file_set_string_list(config, "plugins", "active_plugins", (const gchar*[1]){ "" }, 1); + const gchar *dummy[] = { "" }; + g_key_file_set_string_list(config, "plugins", "active_plugins", dummy, 1); + } } #endif
@@ -375,7 +378,7 @@ }
-void configuration_save() +void configuration_save(void) { GKeyFile *config = g_key_file_new(); gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL); @@ -744,7 +747,7 @@ /* * Save current session in default configuration file */ -void configuration_save_default_session() +void configuration_save_default_session(void) { gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL); gchar *data; @@ -768,7 +771,7 @@ /* * Only reload the session part of the default configuration */ -void configuration_reload_default_session() +void configuration_reload_default_session(void) { gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL); GKeyFile *config = g_key_file_new(); @@ -782,7 +785,7 @@ }
-gboolean configuration_load() +gboolean configuration_load(void) { gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL); GKeyFile *config = g_key_file_new(); @@ -813,7 +816,7 @@ /* Open session files * Note: notebook page switch handler and adding to recent files list is always disabled * for all files opened within this function */ -gboolean configuration_open_files() +gboolean configuration_open_files(void) { gint i; guint pos; @@ -901,7 +904,7 @@
/* set some settings which are already read from the config file, but need other things, like the * realisation of the main window */ -void configuration_apply_settings() +void configuration_apply_settings(void) { if (scribble_text) { // update the scribble widget, because now it's realized @@ -936,7 +939,7 @@
/* Generate the config files in "data/" from defaults */ -void configuration_generate_data_files() +void configuration_generate_data_files(void) { gchar *cur_dir, *gen_dir;
@@ -997,7 +1000,7 @@ #endif
-void configuration_read_filetype_extensions() +void configuration_read_filetype_extensions(void) { guint i; gsize len = 0; @@ -1034,7 +1037,7 @@ }
-void configuration_read_snippets() +void configuration_read_snippets(void) { gsize i, j, len = 0, len_keys = 0; gchar *sysconfigfile, *userconfigfile;
Modified: trunk/src/keyfile.h =================================================================== --- trunk/src/keyfile.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/keyfile.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -26,31 +26,31 @@ #define GEANY_KEYFILE_H 1
-void configuration_save(); +void configuration_save(void);
-gboolean configuration_load(); +gboolean configuration_load(void);
-gboolean configuration_open_files(); +gboolean configuration_open_files(void);
-void configuration_reload_default_session(); +void configuration_reload_default_session(void);
-void configuration_save_default_session(); +void configuration_save_default_session(void);
void configuration_load_session_files(GKeyFile *config);
void configuration_save_session_files(GKeyFile *config);
-void configuration_read_filetype_extensions(); +void configuration_read_filetype_extensions(void);
-void configuration_read_snippets(); +void configuration_read_snippets(void);
/* set some settings which are already read from the config file, but need other things, like the * realisation of the main window */ -void configuration_apply_settings(); +void configuration_apply_settings(void);
#ifdef GEANY_DEBUG /* Generate the config files in "data/" from defaults */ -void configuration_generate_data_files(); +void configuration_generate_data_files(void); #endif
#endif
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/main.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -419,7 +419,7 @@ }
-static void setup_paths() +static void setup_paths(void) { gchar *data_dir; gchar *doc_dir; @@ -448,7 +448,7 @@ }
-static void locale_init() +static void locale_init(void) { #ifdef ENABLE_NLS gchar *locale_dir = NULL; @@ -615,7 +615,7 @@
// Returns 0 if config dir is OK. -static gint setup_config_dir() +static gint setup_config_dir(void) { gint mkdir_result = 0; gchar *tmp = app->configdir; @@ -705,7 +705,7 @@ }
-static void load_project_file() +static void load_project_file(void) { gchar *locale_filename;
@@ -721,7 +721,7 @@ }
-static void load_settings() +static void load_settings(void) { configuration_load(); // let cmdline options overwrite configuration settings
Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/main.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -49,6 +49,6 @@
gchar *get_argv_filename(const gchar *filename);
-void main_quit(); +void main_quit(void);
#endif
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/msgwindow.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -595,8 +595,11 @@ * *filename must be freed unless it is NULL. */ void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir, gchar **filename, gint *line) { - ParseData data = {string, build_info.dir, NULL, 0, 0, 0}; + ParseData data = {NULL, NULL, NULL, 0, 0, 0};
+ data.string = string; + data.dir = build_info.dir; + *filename = NULL; *line = -1;
Modified: trunk/src/msgwindow.h =================================================================== --- trunk/src/msgwindow.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/msgwindow.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -40,7 +40,7 @@ MSG_COMPILER, MSG_MESSAGE, MSG_SCRATCH, - MSG_VTE, + MSG_VTE } MessageWindowTabNum;
@@ -63,9 +63,9 @@ extern MessageWindow msgwindow;
-void msgwin_init(); +void msgwin_init(void);
-void msgwin_finalize(); +void msgwin_finalize(void);
void msgwin_show_hide(gboolean show);
@@ -87,11 +87,11 @@
void msgwin_menu_add_common_items(GtkMenu *menu);
-gboolean msgwin_goto_compiler_file_line(); +gboolean msgwin_goto_compiler_file_line(void);
void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir, gchar **filename, gint *line);
-gboolean msgwin_goto_messages_file_line(); +gboolean msgwin_goto_messages_file_line(void);
#endif
Modified: trunk/src/navqueue.c =================================================================== --- trunk/src/navqueue.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/navqueue.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -71,7 +71,7 @@ }
-static void adjust_buttons() +static void adjust_buttons(void) { if (g_queue_get_length(navigation_queue) < 2) {
Modified: trunk/src/navqueue.h =================================================================== --- trunk/src/navqueue.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/navqueue.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -27,16 +27,16 @@ #define GEANY_NAVQUEUE_H 1
-void navqueue_init(); +void navqueue_init(void);
-void navqueue_free(); +void navqueue_free(void);
gboolean navqueue_goto_line(gint old_idx, gint new_idx, gint line);
-void navqueue_go_back(); +void navqueue_go_back(void);
-void navqueue_go_forward(); +void navqueue_go_forward(void);
#endif
Modified: trunk/src/notebook.c =================================================================== --- trunk/src/notebook.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/notebook.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -74,7 +74,7 @@ static void notebook_tab_close_clicked_cb(GtkButton *button, gpointer user_data);
-static void setup_tab_dnd(); +static void setup_tab_dnd(void);
static void focus_sci(GtkWidget *widget, gpointer user_data) @@ -280,7 +280,7 @@
// call this after the number of tabs in app->notebook changes. -static void tab_count_changed() +static void tab_count_changed(void) { switch (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook))) {
Modified: trunk/src/notebook.h =================================================================== --- trunk/src/notebook.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/notebook.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -24,7 +24,7 @@ #ifndef GEANY_NOTEBOOK_H #define GEANY_NOTEBOOK_H 1
-void notebook_init(); +void notebook_init(void);
/* Returns page number of notebook page, or -1 on error */ gint notebook_new_tab(gint doc_idx);
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/plugindata.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -72,7 +72,7 @@
/* Sets the plugin name and a brief description of what it is. */ #define PLUGIN_INFO(p_name, p_description, p_version, p_author) \ - PluginInfo *info() \ + PluginInfo *info(void) \ { \ static PluginInfo p_info; \ \ @@ -160,10 +160,10 @@ typedef struct DocumentFuncs { gint (*new_file) (const gchar *filename, struct filetype *ft, const gchar *text); - gint (*get_cur_idx) (); + gint (*get_cur_idx) (void); gint (*get_n_idx) (guint i); gint (*find_by_filename) (const gchar *filename, gboolean is_tm_filename); - struct document* (*get_current) (); + struct document* (*get_current) (void); gboolean (*save_file)(gint idx, gboolean force); gint (*open_file)(const gchar *locale_filename, gboolean readonly, struct filetype *ft, const gchar *forced_enc); @@ -262,7 +262,7 @@ { gboolean (*show_question) (const gchar *text, ...); void (*show_msgbox) (gint type, const gchar *text, ...); - gboolean (*show_save_as) (); + gboolean (*show_save_as) (void); } DialogFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/plugins.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -73,10 +73,10 @@ gulong *signal_ids; // signal IDs to disconnect when unloading gsize signal_ids_len;
- PluginInfo* (*info) (); /* Returns plugin name, description */ + PluginInfo* (*info) (void); /* Returns plugin name, description */ void (*init) (GeanyData *data); /* Called when the plugin is enabled */ void (*configure) (GtkWidget *parent); /* plugin configure dialog, optionally */ - void (*cleanup) (); /* Called when the plugin is disabled or when Geany exits */ + void (*cleanup) (void); /* Called when the plugin is disabled or when Geany exits */ } Plugin;
@@ -240,7 +240,7 @@
static void -geany_data_init() +geany_data_init(void) { geany_data.app = app; geany_data.tools_menu = lookup_widget(app->window, "tools1_menu"); @@ -387,7 +387,7 @@ { Plugin *plugin; GModule *module; - PluginInfo* (*info)(); + PluginInfo* (*info)(void); PluginFields **plugin_fields; GeanyData **p_geany_data;
@@ -554,7 +554,7 @@ #endif
-static void load_plugin_paths() +static void load_plugin_paths(void) { gchar *path;
@@ -650,7 +650,7 @@ static gint plugin_has_menu(Plugin *a, Plugin *b) { - if (((PluginFields)a->fields).menu_item != NULL) + if (a->fields.menu_item != NULL) return 0;
return 1;
Modified: trunk/src/plugins.h =================================================================== --- trunk/src/plugins.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/plugins.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -28,13 +28,13 @@
#ifdef HAVE_PLUGINS
-void plugins_init(); +void plugins_init(void);
-void plugins_free(); +void plugins_free(void);
-void plugins_create_active_list(); +void plugins_create_active_list(void);
-void plugins_update_tools_menu(); +void plugins_update_tools_menu(void);
void plugins_update_document_sensitive(gboolean enabled);
Modified: trunk/src/prefix.c =================================================================== --- trunk/src/prefix.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/prefix.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -287,4 +287,8 @@ return newpath; }
+#else /* ENABLE_BINRELOC */ + +typedef int iso_c_forbids_an_empty_source_file; + #endif /* ENABLE_BINRELOC */
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/prefs.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -87,10 +87,10 @@ { KB_TREE_ACTION, KB_TREE_SHORTCUT, - KB_TREE_INDEX, + KB_TREE_INDEX };
-static void init_kb_tree() +static void init_kb_tree(void) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; @@ -124,7 +124,7 @@ }
-static void init_keybindings() +static void init_keybindings(void) { GtkTreeIter parent, iter; gint i;
Modified: trunk/src/project.c =================================================================== --- trunk/src/project.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/project.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -75,7 +75,7 @@ static gboolean update_config(const PropertyDialogElements *e); static void on_file_save_button_clicked(GtkButton *button, PropertyDialogElements *e); static void on_file_open_button_clicked(GtkButton *button, PropertyDialogElements *e); -static gboolean close_open_project(); +static gboolean close_open_project(void); static gboolean load_config(const gchar *filename); static gboolean write_config(gboolean emit_signal); static void on_name_entry_changed(GtkEditable *editable, PropertyDialogElements *e); @@ -299,7 +299,7 @@
// Called when opening, closing and updating projects. -static void update_ui() +static void update_ui(void) { ui_set_window_title(-1); build_menu_update(-1);
Modified: trunk/src/project.h =================================================================== --- trunk/src/project.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/project.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -54,28 +54,28 @@ extern ProjectPrefs project_prefs;
-void project_new(); +void project_new(void);
-void project_open(); +void project_open(void);
void project_close(gboolean open_default);
-void project_properties(); +void project_properties(void);
gboolean project_load_file(const gchar *locale_file_name);
-gchar *project_get_base_path(); +gchar *project_get_base_path(void);
-gchar *project_get_make_dir(); +gchar *project_get_make_dir(void);
void project_save_prefs(GKeyFile *config);
void project_load_prefs(GKeyFile *config);
-void project_setup_prefs(); +void project_setup_prefs(void);
-void project_apply_prefs(); +void project_apply_prefs(void);
#endif
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/sciwrappers.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -807,7 +807,7 @@
gint sci_target_replace(ScintillaObject *sci, const gchar *text, gboolean regex) { - return SSM(sci, (regex) ? SCI_REPLACETARGETRE : SCI_REPLACETARGET, -1, (sptr_t) text); + return SSM(sci, (regex) ? SCI_REPLACETARGETRE : SCI_REPLACETARGET, (uptr_t) -1, (sptr_t) text); }
Modified: trunk/src/search.c =================================================================== --- trunk/src/search.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/search.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -108,7 +108,7 @@ search_find_in_files(const gchar *search_text, const gchar *dir, const gchar *opts);
-void search_init() +void search_init(void) { widgets.find_dialog = NULL; widgets.replace_dialog = NULL; @@ -120,7 +120,7 @@ #define FREE_WIDGET(wid) \ if (wid && GTK_IS_WIDGET(wid)) gtk_widget_destroy(wid);
-void search_finalize() +void search_finalize(void) { FREE_WIDGET(widgets.find_dialog); FREE_WIDGET(widgets.replace_dialog); @@ -257,7 +257,7 @@ }
-void search_show_find_dialog() +void search_show_find_dialog(void) { gint idx = document_get_cur_idx(); gchar *sel = NULL; @@ -376,7 +376,7 @@ }
-void search_show_replace_dialog() +void search_show_replace_dialog(void) { gint idx = document_get_cur_idx(); gchar *sel = NULL; @@ -1012,7 +1012,7 @@ }
-static GString *get_grep_options() +static GString *get_grep_options(void) { gboolean fgrep = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( lookup_widget(widgets.find_in_files_dialog, "radio_fgrep")));
Modified: trunk/src/search.h =================================================================== --- trunk/src/search.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/search.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -47,13 +47,13 @@ extern SearchPrefs search_prefs;
-void search_init(); +void search_init(void);
-void search_finalize(); +void search_finalize(void);
-void search_show_find_dialog(); +void search_show_find_dialog(void);
-void search_show_replace_dialog(); +void search_show_replace_dialog(void);
void search_show_find_in_files_dialog(const gchar *dir);
Modified: trunk/src/socket.c =================================================================== --- trunk/src/socket.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/socket.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -91,10 +91,13 @@ #endif
+struct socket_info_struct socket_info; + + #ifdef G_OS_WIN32 static gint socket_fd_connect_inet (gushort port); static gint socket_fd_open_inet (gushort port); -static void socket_init_win32(); +static void socket_init_win32 (void); #else static gint socket_fd_connect_unix (const gchar *path); static gint socket_fd_open_unix (const gchar *path); @@ -160,7 +163,7 @@
#ifndef G_OS_WIN32 -static void remove_socket_link_full() +static void remove_socket_link_full(void) { gchar real_path[512]; gsize len; @@ -457,7 +460,7 @@ }
-static void socket_init_win32() +static void socket_init_win32(void) { WSADATA wsadata;
Modified: trunk/src/socket.h =================================================================== --- trunk/src/socket.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/socket.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -26,20 +26,22 @@ #define GEANY_SOCKET_H 1
-struct +struct socket_info_struct { gboolean ignore_socket; gchar *file_name; GIOChannel *read_ioc; gint lock_socket; gint lock_socket_tag; -} socket_info; +};
+extern struct socket_info_struct socket_info; + gint socket_init(gint argc, gchar **argv);
gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpointer data);
-gint socket_finalize(); +gint socket_finalize(void);
#endif
Modified: trunk/src/symbols.c =================================================================== --- trunk/src/symbols.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/symbols.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -83,7 +83,7 @@ static gchar *user_tags_dir;
-static void html_tags_loaded(); +static void html_tags_loaded(void); static void load_user_tags(filetype_id ft_id);
/* tags_ignore is a NULL-terminated array of strings, read from ~/.geany/ignore.tags. @@ -91,7 +91,7 @@ * by the C/C++ parser, see -I command line option of ctags for details. */ gchar **c_tags_ignore = NULL;
-static void load_c_ignore_tags() +static void load_c_ignore_tags(void) { gchar *path = g_strconcat(app->configdir, G_DIR_SEPARATOR_S "ignore.tags", NULL); gchar *content; @@ -158,7 +158,7 @@
// HTML tagfile is just a list of entities for autocompletion (e.g. '&') -static void html_tags_loaded() +static void html_tags_loaded(void) { TagFileInfo *tfi;
@@ -244,7 +244,7 @@ }
-GString *symbols_get_macro_list() +GString *symbols_get_macro_list(void) { guint j, i; const GPtrArray *tags; @@ -319,7 +319,7 @@ }
-const gchar **symbols_get_html_entities() +const gchar **symbols_get_html_entities(void) { if (html_entities == NULL) html_tags_loaded(); // if not yet created, force creation of the array but shouldn't occur @@ -328,7 +328,7 @@ }
-void symbols_finalize() +void symbols_finalize(void) { g_strfreev(html_entities); g_strfreev(c_tags_ignore); @@ -411,7 +411,7 @@ if (tag->type & tag_types) { if (! doc_is_utf8) utf8_name = encodings_convert_to_utf8_from_charset(tag->name, - -1, doc_list[idx].encoding, TRUE); + (gsize)-1, doc_list[idx].encoding, TRUE); else utf8_name = tag->name;
if (utf8_name == NULL) @@ -462,7 +462,7 @@ } tv_iters;
-static void init_tag_iters() +static void init_tag_iters(void) { // init all GtkTreeIters with -1 to make them invalid to avoid crashes when switching between // filetypes(e.g. config file to Python crashes Geany without this) @@ -965,7 +965,7 @@ }
-void symbols_show_load_tags_dialog() +void symbols_show_load_tags_dialog(void) { GtkWidget *dialog; GtkFileFilter *filter; @@ -1037,7 +1037,7 @@ }
-static GHashTable *init_user_tags() +static GHashTable *init_user_tags(void) { GSList *file_list; GHashTable *lang_hash;
Modified: trunk/src/symbols.h =================================================================== --- trunk/src/symbols.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/symbols.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -37,17 +37,17 @@
const GList *symbols_get_tag_list(gint idx, guint tag_types);
-GString *symbols_get_macro_list(); +GString *symbols_get_macro_list(void);
-const gchar **symbols_get_html_entities(); +const gchar **symbols_get_html_entities(void);
-void symbols_finalize(); +void symbols_finalize(void);
gboolean symbols_recreate_tag_list(gint idx, gboolean sort_by_name);
gint symbols_generate_global_tags(gint argc, gchar **argv, gboolean want_preprocess);
-void symbols_show_load_tags_dialog(); +void symbols_show_load_tags_dialog(void);
gboolean symbols_goto_tag(const gchar *name, gboolean definition);
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/templates.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -333,7 +333,7 @@
// template items for the new file menu -static void create_new_menu_items() +static void create_new_menu_items(void) { GtkWidget *template_menu = lookup_widget(app->window, "menu_new_with_template1_menu"); filetype_id ft_id;
Modified: trunk/src/tools.c =================================================================== --- trunk/src/tools.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/tools.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -209,7 +209,7 @@ }
-static void cc_show_dialog_custom_commands() +static void cc_show_dialog_custom_commands(void) { GtkWidget *dialog, *label, *vbox, *button; guint i; @@ -389,7 +389,7 @@ }
-void tools_create_insert_custom_command_menu_items() +void tools_create_insert_custom_command_menu_items(void) { GtkMenu *menu_edit = GTK_MENU(lookup_widget(app->window, "send_selection_to2_menu")); GtkMenu *menu_popup = GTK_MENU(lookup_widget(app->popup_menu, "send_selection_to1_menu")); @@ -509,7 +509,7 @@ }
-void tools_word_count() +void tools_word_count(void) { GtkWidget *dialog, *label, *vbox, *table; gint idx;
Modified: trunk/src/tools.h =================================================================== --- trunk/src/tools.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/tools.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -25,12 +25,12 @@ #ifndef GEANY_TOOLS_H #define GEANY_TOOLS_H 1
-void tools_create_insert_custom_command_menu_items(); +void tools_create_insert_custom_command_menu_items(void);
void tools_execute_custom_command(gint idx, const gchar *command);
-void tools_word_count(); +void tools_word_count(void);
void tools_color_chooser(gchar *color);
Modified: trunk/src/treeviews.c =================================================================== --- trunk/src/treeviews.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/treeviews.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -232,7 +232,7 @@
/* does some preparing things to the open files list widget */ -static void prepare_openfiles() +static void prepare_openfiles(void) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; @@ -356,7 +356,7 @@ }
-static void create_taglist_popup_menu() +static void create_taglist_popup_menu(void) { GtkWidget *item;
@@ -423,7 +423,7 @@ }
-static void create_openfiles_popup_menu() +static void create_openfiles_popup_menu(void) { GtkWidget *item;
Modified: trunk/src/treeviews.h =================================================================== --- trunk/src/treeviews.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/treeviews.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -42,10 +42,10 @@ SYMBOLS_COLUMN_ICON, SYMBOLS_COLUMN_NAME, SYMBOLS_COLUMN_LINE, - SYMBOLS_N_COLUMNS, + SYMBOLS_N_COLUMNS };
-void treeviews_init(); +void treeviews_init(void);
void treeviews_update_tag_list(gint idx, gboolean update);
@@ -53,7 +53,7 @@
void treeviews_openfiles_update(gint idx);
-void treeviews_openfiles_update_all(); +void treeviews_openfiles_update_all(void);
void treeviews_select_openfiles_item(gint idx);
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/ui_utils.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -59,7 +59,7 @@
static gchar *menu_item_get_text(GtkMenuItem *menu_item);
-static void update_recent_menu(); +static void update_recent_menu(void); static void recent_file_loaded(const gchar *utf8_filename); static void recent_file_activate_cb (GtkMenuItem *menuitem, @@ -262,7 +262,7 @@ }
-void ui_set_fullscreen() +void ui_set_fullscreen(void) { if (ui_prefs.fullscreen) { @@ -361,7 +361,7 @@ }
-void ui_update_fold_items() +void ui_update_fold_items(void) { ui_widget_show_hide(lookup_widget(app->window, "menu_fold_all1"), editor_prefs.folding); ui_widget_show_hide(lookup_widget(app->window, "menu_unfold_all1"), editor_prefs.folding); @@ -403,7 +403,7 @@ }
-void ui_create_insert_menu_items() +void ui_create_insert_menu_items(void) { GtkMenu *menu_edit = GTK_MENU(lookup_widget(app->window, "insert_include2_menu")); GtkMenu *menu_popup = GTK_MENU(lookup_widget(app->popup_menu, "insert_include1_menu")); @@ -470,7 +470,7 @@ }
-void ui_create_insert_date_menu_items() +void ui_create_insert_date_menu_items(void) { GtkMenu *menu_edit = GTK_MENU(lookup_widget(app->window, "insert_date1_menu")); GtkMenu *menu_popup = GTK_MENU(lookup_widget(app->popup_menu, "insert_date2_menu")); @@ -542,7 +542,7 @@ }
-static void init_document_widgets() +static void init_document_widgets(void) { /* Cache the document-sensitive widgets so we don't have to keep looking them up * when using ui_document_buttons_update(). */ @@ -594,7 +594,7 @@ }
-void ui_document_buttons_update() +void ui_document_buttons_update(void) { guint i; gboolean enable = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) ? TRUE : FALSE; @@ -621,7 +621,7 @@ }
-void ui_sidebar_show_hide() +void ui_sidebar_show_hide(void) { GtkWidget *widget;
@@ -720,7 +720,7 @@ }
-void ui_update_toolbar_items() +void ui_update_toolbar_items(void) { // show toolbar GtkWidget *widget = lookup_widget(app->window, "menu_show_toolbar1"); @@ -833,7 +833,7 @@ }
-void ui_create_recent_menu() +void ui_create_recent_menu(void) { GtkWidget *tmp; guint i; @@ -973,7 +973,7 @@ }
-static void update_recent_menu() +static void update_recent_menu(void) { GtkWidget *tmp; static GtkMenuToolButton *menu = NULL; @@ -1028,7 +1028,7 @@ }
-void ui_show_markers_margin() +void ui_show_markers_margin(void) { gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
@@ -1040,7 +1040,7 @@ }
-void ui_show_linenumber_margin() +void ui_show_linenumber_margin(void) { gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
@@ -1397,7 +1397,7 @@ }
-void ui_init() +void ui_init(void) { init_document_widgets(); }
Modified: trunk/src/ui_utils.h =================================================================== --- trunk/src/ui_utils.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/ui_utils.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -100,7 +100,7 @@ /* End of 'generic' functions */
-void ui_init(); +void ui_init(void);
void ui_set_statusbar(gboolean log, const gchar *format, ...) G_GNUC_PRINTF (2, 3); @@ -113,7 +113,7 @@
void ui_set_editor_font(const gchar *font_name);
-void ui_set_fullscreen(); +void ui_set_fullscreen(void);
void ui_update_popup_reundo_items(gint idx); @@ -127,27 +127,27 @@
void ui_update_insert_include_item(gint idx, gint item);
-void ui_update_fold_items(); +void ui_update_fold_items(void);
-void ui_create_insert_menu_items(); +void ui_create_insert_menu_items(void);
-void ui_create_insert_date_menu_items(); +void ui_create_insert_date_menu_items(void);
void ui_save_buttons_toggle(gboolean enable);
-void ui_document_buttons_update(); +void ui_document_buttons_update(void);
-void ui_sidebar_show_hide(); +void ui_sidebar_show_hide(void);
void ui_document_show_hide(gint idx);
void ui_update_toolbar_icons(GtkIconSize size);
-void ui_update_toolbar_items(); +void ui_update_toolbar_items(void);
GdkPixbuf *ui_new_pixbuf_from_inline(gint img, gboolean small_img); @@ -155,20 +155,20 @@ GtkWidget *ui_new_image_from_inline(gint img, gboolean small_img);
-void ui_create_recent_menu(); +void ui_create_recent_menu(void);
void ui_add_recent_file(const gchar *utf8_filename);
-void ui_show_markers_margin(); +void ui_show_markers_margin(void);
-void ui_show_linenumber_margin(); +void ui_show_linenumber_margin(void);
void ui_update_tab_status(gint idx);
-typedef gboolean TVMatchCallback(); +typedef gboolean TVMatchCallback(void);
gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb);
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/utils.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -719,7 +719,7 @@ }
-gchar *utils_get_hostname() +gchar *utils_get_hostname(void) { #ifdef G_OS_WIN32 return win32_get_hostname(); @@ -769,7 +769,7 @@ # define DIR_SEP "" #endif
-gint utils_make_settings_dir() +gint utils_make_settings_dir(void) { gint saved_errno = 0; gchar *conf_file = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL); @@ -1118,7 +1118,7 @@ /* Get directory from current file in the notebook. * Returns dir string that should be freed or NULL, depending on whether current file is valid. * Returned string is in UTF-8 encoding */ -gchar *utils_get_current_file_dir_utf8() +gchar *utils_get_current_file_dir_utf8(void) { gint cur_idx = document_get_cur_idx();
@@ -1139,7 +1139,7 @@
/* very simple convenience function */ -void utils_beep() +void utils_beep(void) { if (prefs.beep_on_errors) gdk_beep(); } @@ -1240,7 +1240,7 @@
// Returns: newly allocated string with the current time formatted HH:MM:SS. -gchar *utils_get_current_time_string() +gchar *utils_get_current_time_string(void) { const time_t tp = time(NULL); const struct tm *tmval = localtime(&tp); @@ -1778,7 +1778,7 @@
/* Get project or default startup directory (if set), or NULL. */ -const gchar *utils_get_default_dir_utf8() +const gchar *utils_get_default_dir_utf8(void) { if (app->project && NZV(app->project->base_path)) {
Modified: trunk/src/utils.h =================================================================== --- trunk/src/utils.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/utils.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -82,9 +82,9 @@
gchar utils_brace_opposite(gchar ch);
-gchar *utils_get_hostname(); +gchar *utils_get_hostname(void);
-gint utils_make_settings_dir(); +gint utils_make_settings_dir(void);
gboolean utils_string_replace_all(GString *str, const gchar *needle, const gchar *replace);
@@ -108,18 +108,18 @@
gchar *utils_get_hex_from_color(GdkColor *color);
-const gchar *utils_get_default_dir_utf8(); +const gchar *utils_get_default_dir_utf8(void);
-gchar *utils_get_current_file_dir_utf8(); +gchar *utils_get_current_file_dir_utf8(void);
-void utils_beep(); +void utils_beep(void);
gchar *utils_make_human_readable_str(unsigned long long size, gulong block_size, gulong display_unit);
gint utils_strtod(const gchar *source, gchar **end, gboolean with_route);
-gchar *utils_get_current_time_string(); +gchar *utils_get_current_time_string(void);
GIOChannel *utils_set_up_io_channel(gint fd, GIOCondition cond, gboolean nblock, GIOFunc func, gpointer data);
Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/vte.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -46,6 +46,7 @@
VteInfo vte_info; +VteConfig *vc;
extern gchar **environ; static pid_t pid; @@ -63,7 +64,7 @@ #define VTE_TERMINAL(obj) (GTK_CHECK_CAST((obj), VTE_TYPE_TERMINAL, VteTerminal)) #define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type())
-static void create_vte(); +static void create_vte(void); static void vte_start(GtkWidget *widget); static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data); static gboolean vte_keyrelease(GtkWidget *widget, GdkEventKey *event, gpointer data); @@ -87,7 +88,7 @@ TARGET_TEXT, TARGET_COMPOUND_TEXT, TARGET_STRING, - TARGET_TEXT_PLAIN, + TARGET_TEXT_PLAIN };
static const GtkTargetEntry dnd_targets[] = @@ -140,7 +141,7 @@ }
-static void override_menu_key() +static void override_menu_key(void) { if (gtk_menu_key_accel == NULL) // for restoring the default value g_object_get(G_OBJECT(gtk_settings_get_default()), "gtk-menu-bar-accel", @@ -206,7 +207,7 @@ }
-static void create_vte() +static void create_vte(void) { GtkWidget *vte, *scrollbar, *hbox, *frame;
@@ -532,7 +533,7 @@
/* Taken from Terminal by os-cillation: terminal_screen_get_working_directory, thanks. * Determines the working directory using various OS-specific mechanisms. */ -const gchar* vte_get_working_directory() +const gchar* vte_get_working_directory(void) { gchar buffer[4096 + 1]; gchar *file; @@ -631,7 +632,7 @@ }
-void vte_append_preferences_tab() +void vte_append_preferences_tab(void) { if (vte_info.have_vte) {
Modified: trunk/src/vte.h =================================================================== --- trunk/src/vte.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/src/vte.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -63,7 +63,7 @@ GdkColor *colour_fore; GdkColor *colour_back; } VteConfig; -VteConfig *vc; +extern VteConfig *vc;
void vte_init(void); @@ -78,7 +78,7 @@
void vte_cwd(const gchar *filename, gboolean force);
-void vte_append_preferences_tab(); +void vte_append_preferences_tab(void);
/* void vte_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y,
Modified: trunk/tagmanager/c.c =================================================================== --- trunk/tagmanager/c.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/c.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -434,7 +434,7 @@ */
/* Debugging functions added by Biswa */ -#if DEBUG_C +#if defined(DEBUG_C) && DEBUG_C static char *tokenTypeName[] = { "none", "args", "'}'", "'{'", "','", "'::'", "keyword", "name", "package", "paren-name", "';'", "spec", "*", "[]", "count"
Modified: trunk/tagmanager/docbook.c =================================================================== --- trunk/tagmanager/docbook.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/docbook.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -32,7 +32,7 @@ K_SECT1, K_SECT2, K_SECT3, - K_APPENDIX, + K_APPENDIX } docbookKind;
static kindOption DocBookKinds [] = {
Modified: trunk/tagmanager/haskell.c =================================================================== --- trunk/tagmanager/haskell.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/haskell.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -51,7 +51,7 @@ */
-static void skip_rest_of_line() +static void skip_rest_of_line(void) { int c; do { @@ -71,7 +71,7 @@ return i; }
-static int get_next_char() +static int get_next_char(void) { int c, nxt; c = fileGetc();
Modified: trunk/tagmanager/include/tm_workspace.h =================================================================== --- trunk/tagmanager/include/tm_workspace.h 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/include/tm_workspace.h 2008-02-20 11:24:23 UTC (rev 2267) @@ -56,7 +56,7 @@ a workspace is created. Subsequent calls to the function will return the created workspace. */ -const TMWorkspace *tm_get_workspace(); +const TMWorkspace *tm_get_workspace(void);
/*! Adds a work object (source file or project) to the workspace. \param work_object The work object to add to the project.
Modified: trunk/tagmanager/sort.c =================================================================== --- trunk/tagmanager/sort.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/sort.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -111,7 +111,7 @@ if (fp != NULL) fclose (fp); if (msg == NULL) - error (FATAL | PERROR, cannotSort); + error (FATAL | PERROR, "%s", cannotSort); else error (FATAL, "%s: %s", msg, cannotSort); }
Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2008-02-18 19:51:34 UTC (rev 2266) +++ trunk/tagmanager/tm_workspace.c 2008-02-20 11:24:23 UTC (rev 2267) @@ -29,7 +29,7 @@ static TMWorkspace *theWorkspace = NULL; guint workspace_class_id = 0;
-static gboolean tm_create_workspace() +static gboolean tm_create_workspace(void) { workspace_class_id = tm_work_object_register(tm_workspace_free, tm_workspace_update , tm_workspace_find_object); @@ -709,7 +709,7 @@ return function_tag; } return NULL; -}; +}
const GPtrArray *tm_workspace_get_parents(const gchar *name)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.