lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
June 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
1 participants
93 discussions
Start a n
N
ew thread
[geany/geany-plugins] a8fd1d: geanylua: Fix various const string warnings
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 17:44:59 Commit: a8fd1d9faa49582a8640fe6a3318b5b645f12f03
https://github.com/geany/geany-plugins/commit/a8fd1d9faa49582a8640fe6a3318b…
Log Message: ----------- geanylua: Fix various const string warnings This doesn't introduce any feature change nor actual code change but only marks some variables and parameters constant where appropriate. Modified Paths: -------------- geanylua/glspi.h geanylua/glspi_app.c geanylua/glspi_init.c geanylua/glspi_keycmd.h geanylua/glspi_run.c geanylua/glspi_sci.c geanylua/glspi_sci.h geanylua/gsdlg_lua.c Modified: geanylua/glspi.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -95,7 +95,7 @@ #ifdef NEED_FAIL_ARG_TYPE /* Pushes an error message onto Lua stack if script passes a wrong arg type */ -static gint glspi_fail_arg_type(lua_State *L, const gchar *func, gint argnum, gchar *type) +static gint glspi_fail_arg_type(lua_State *L, const gchar *func, gint argnum, const gchar *type) { lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n" " expected type \"%s\" for argument #%d\n"), @@ -109,7 +109,7 @@ static gint glspi_fail_arg_type(lua_State *L, const gchar *func, gint argnum, gc #ifdef NEED_FAIL_ARG_TYPES /* Same as above, but for two overloaded types, eg "string" OR "number" */ static gint glspi_fail_arg_types( - lua_State *L, const gchar *func, gint argnum, gchar *type1, gchar *type2) + lua_State *L, const gchar *func, gint argnum, const gchar *type1, const gchar *type2) { lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n" " expected type \"%s\" or \"%s\" for argument #%d\n"), @@ -123,7 +123,7 @@ static gint glspi_fail_arg_types( #ifdef NEED_FAIL_ELEM_TYPE /*Pushes an error message onto Lua stack if table contains wrong element type*/ static gint glspi_fail_elem_type( - lua_State *L, const gchar *func, gint argnum, gint idx, gchar *type) + lua_State *L, const gchar *func, gint argnum, gint idx, const gchar *type) { lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n" " invalid table in argument #%d:\n" Modified: geanylua/glspi_app.c 9 files changed, 5 insertions(+), 4 deletions(-) =================================================================== @@ -71,7 +71,7 @@ static gint glspi_project(lua_State* L) } } -static gchar *glspi_script_dir = NULL; +static const gchar *glspi_script_dir = NULL; static gint glspi_appinfo(lua_State* L) { @@ -192,7 +192,7 @@ static gint glspi_stat(lua_State* L) if (!lua_isstring(L,1)) { return FAIL_STRING_ARG(1); } fn=lua_tostring(L,1); if (sf(fn,&st)==0) { - gchar *ft=NULL; + const gchar *ft=NULL; switch ( st.st_mode & S_IFMT) { case S_IFBLK:ft="b"; break; case S_IFCHR:ft="c"; break; @@ -347,7 +347,8 @@ static void glspi_init_key_cmd_hash(void) key_cmd_hash=g_hash_table_new(g_str_hash,g_str_equal); for (i=0;key_cmd_hash_entries[i].name; i++) { g_hash_table_insert( - key_cmd_hash,key_cmd_hash_entries[i].name,&key_cmd_hash_entries[i]); + key_cmd_hash,(gpointer) key_cmd_hash_entries[i].name, + &key_cmd_hash_entries[i]); } } @@ -620,7 +621,7 @@ static gint glspi_keygrab(lua_State* L) {NULL,NULL} }; -void glspi_init_app_funcs(lua_State *L, gchar*script_dir) { +void glspi_init_app_funcs(lua_State *L, const gchar*script_dir) { glspi_script_dir = script_dir; luaL_register(L, NULL,glspi_app_funcs); } Modified: geanylua/glspi_init.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -63,7 +63,7 @@ -extern void glspi_run_script(gchar *script_file, gint caller, GKeyFile*proj, gchar *script_dir); +extern void glspi_run_script(const gchar *script_file, gint caller, GKeyFile*proj, const gchar *script_dir); /* Called by Geany, run a script associated with a keybinding. */ @@ -322,7 +322,7 @@ static void assign_accel(GtkWidget*w, char*fn) -static GtkWidget* new_menu(GtkWidget *parent, gchar* script_dir, gchar*title); +static GtkWidget* new_menu(GtkWidget *parent, const gchar* script_dir, const gchar*title); /* GSList "for each" callback to create a menu item for each found script */ static void init_menu(gpointer data, gpointer user_data) @@ -363,7 +363,7 @@ static void init_menu(gpointer data, gpointer user_data) -static GtkWidget* new_menu(GtkWidget *parent, gchar* script_dir, gchar*title) +static GtkWidget* new_menu(GtkWidget *parent, const gchar* script_dir, const gchar*title) { GSList *script_names=utils_get_file_list_full(script_dir, TRUE, TRUE, NULL); if (script_names) { Modified: geanylua/glspi_keycmd.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -11,7 +11,7 @@ typedef struct _KeyCmdHashEntry { - gchar *name; + const gchar *name; guint group; guint key_id; } KeyCmdHashEntry; Modified: geanylua/glspi_run.c 22 files changed, 11 insertions(+), 11 deletions(-) =================================================================== @@ -23,7 +23,7 @@ /* basic dialog box functions */ extern void glspi_init_dlg_funcs(lua_State *L, GsDlgRunHook hook); /* application functions */ -extern void glspi_init_app_funcs(lua_State *L, gchar*script_dir); +extern void glspi_init_app_funcs(lua_State *L, const gchar*script_dir); /* menu functions */ void glspi_init_mnu_funcs(lua_State *L); @@ -53,7 +53,7 @@ static void repaint_scintilla(void) /* Internal yes-or-no question box (not used by scripts) */ -static gboolean glspi_show_question(gchar*title, gchar*question, gboolean default_result) +static gboolean glspi_show_question(const gchar*title, const gchar*question, gboolean default_result) { GtkWidget *dialog, *yes_btn, *no_btn; GtkResponseType dv, rv; @@ -76,7 +76,7 @@ static gboolean glspi_show_question(gchar*title, gchar*question, gboolean defaul } -static gboolean glspi_goto_error(gchar *fn, gint line) +static gboolean glspi_goto_error(const gchar *fn, gint line) { GeanyDocument *doc=document_open_file(fn, FALSE, NULL, NULL); if (doc) { @@ -103,7 +103,7 @@ static gboolean glspi_goto_error(gchar *fn, gint line) give the user an option to automatically open the file and scroll to the offending line. */ -static void glspi_script_error(gchar *script_file, const gchar *msg, gboolean need_name, gint line) +static void glspi_script_error(const gchar *script_file, const gchar *msg, gboolean need_name, gint line) { GtkWidget *dialog; if (need_name) { @@ -336,7 +336,7 @@ static gint glspi_traceback(lua_State *L) The set_*_token functions assign default values for module-level variables */ -static void set_string_token(lua_State *L, gchar*name, gchar*value) +static void set_string_token(lua_State *L, const gchar*name, const gchar*value) { lua_getglobal(L, LUA_MODULE_NAME); if (lua_istable(L, -1)) { @@ -350,7 +350,7 @@ static void set_string_token(lua_State *L, gchar*name, gchar*value) -static void set_numeric_token(lua_State *L, gchar*name, gint value) +static void set_numeric_token(lua_State *L, const gchar*name, gint value) { lua_getglobal(L, LUA_MODULE_NAME); if (lua_istable(L, -1)) { @@ -364,7 +364,7 @@ static void set_numeric_token(lua_State *L, gchar*name, gint value) -static void set_boolean_token(lua_State *L, gchar*name, gboolean value) +static void set_boolean_token(lua_State *L, const gchar*name, gboolean value) { lua_getglobal(L, LUA_MODULE_NAME); if (lua_istable(L, -1)) { @@ -378,7 +378,7 @@ static void set_boolean_token(lua_State *L, gchar*name, gboolean value) -static void set_keyfile_token(lua_State *L, gchar*name, GKeyFile* value) +static void set_keyfile_token(lua_State *L, const gchar*name, GKeyFile* value) { if (!value) {return;} lua_getglobal(L, LUA_MODULE_NAME); @@ -393,7 +393,7 @@ static void set_keyfile_token(lua_State *L, gchar*name, GKeyFile* value) -static void show_error(lua_State *L, gchar *script_file) +static void show_error(lua_State *L, const gchar *script_file) { gint line=-1; gchar *fn = glspi_get_error_info(L, &line); @@ -413,7 +413,7 @@ static void show_error(lua_State *L, gchar *script_file) -static gint glspi_init_module(lua_State *L, gchar *script_file, gint caller, GKeyFile*proj, gchar*script_dir) +static gint glspi_init_module(lua_State *L, const gchar *script_file, gint caller, GKeyFile*proj, const gchar*script_dir) { luaL_openlib(L, LUA_MODULE_NAME, glspi_timer_funcs, 0); glspi_init_sci_funcs(L); @@ -450,7 +450,7 @@ gint luaopen_libgeanylua(lua_State *L) /* Load and run the script */ -void glspi_run_script(gchar *script_file, gint caller, GKeyFile*proj, gchar *script_dir) +void glspi_run_script(const gchar *script_file, gint caller, GKeyFile*proj, const gchar *script_dir) { gint status; lua_State *L = glspi_state_new(); Modified: geanylua/glspi_sci.c 7 files changed, 4 insertions(+), 3 deletions(-) =================================================================== @@ -561,7 +561,8 @@ static void glspi_init_sci_cmd_hash(void) sci_cmd_hash=g_hash_table_new(g_str_hash,g_str_equal); for (i=0; sci_cmd_hash_entries[i].name; i++) { g_hash_table_insert( - sci_cmd_hash,sci_cmd_hash_entries[i].name,&sci_cmd_hash_entries[i]); + sci_cmd_hash, + (gpointer) sci_cmd_hash_entries[i].name,&sci_cmd_hash_entries[i]); } } @@ -596,7 +597,7 @@ static SciCmdHashEntry* lookup_cmd_id(gint cmd) -static gint glspi_fail_not_implemented(lua_State* L, const gchar*funcname, gchar*cmdname) +static gint glspi_fail_not_implemented(lua_State* L, const gchar*funcname, const gchar*cmdname) { lua_pushfstring( L, _( "Error in module \"%s\" at function %s():\n" @@ -607,7 +608,7 @@ static gint glspi_fail_not_implemented(lua_State* L, const gchar*funcname, gchar } -static gint glspi_fail_arg_count(lua_State* L, const gchar*funcname, gchar*cmdname) +static gint glspi_fail_arg_count(lua_State* L, const gchar*funcname, const gchar*cmdname) { lua_pushfstring( L, _( "Error in module \"%s\" at function %s():\n" Modified: geanylua/glspi_sci.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -25,7 +25,7 @@ typedef struct _SciCmdHashEntry { - gchar *name; + const gchar *name; GlspiType result; gint msgid; GlspiType wparam; Modified: geanylua/gsdlg_lua.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -90,7 +90,7 @@ static gint adjust_argnum(lua_State *L, gint argnum) { /* Pushes an error message onto Lua stack if script passes a wrong arg type */ -static gint fail_arg_type(lua_State *L, const gchar *func, gint argnum, gchar *type) +static gint fail_arg_type(lua_State *L, const gchar *func, gint argnum, const gchar *type) { lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n" " expected type \"%s\" for argument #%d\n"), @@ -103,7 +103,7 @@ static gint fail_arg_type(lua_State *L, const gchar *func, gint argnum, gchar *t /*Pushes an error message onto Lua stack if table contains wrong element type*/ static gint gsdl_fail_elem_type( - lua_State *L, const gchar *func, gint argnum, gint idx, gchar *type) + lua_State *L, const gchar *func, gint argnum, gint idx, const gchar *type) { lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n" " invalid table in argument #%d:\n" @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 91b11e: geanygdb: Use proper C prototypes for functions without arguments
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 16:35:48 Commit: 91b11e89795d9738df944a92c20fa107f1b593a6
https://github.com/geany/geany-plugins/commit/91b11e89795d9738df944a92c20fa…
Log Message: ----------- geanygdb: Use proper C prototypes for functions without arguments Modified Paths: -------------- geanygdb/src/gdb-io-break.c geanygdb/src/gdb-io-envir.c geanygdb/src/gdb-io-frame.c geanygdb/src/gdb-io-priv.h geanygdb/src/gdb-io-read.c geanygdb/src/gdb-io-run.c geanygdb/src/gdb-io-stack.c geanygdb/src/gdb-io.h geanygdb/src/gdb-lex.c geanygdb/src/gdb-lex.h geanygdb/src/gdb-ui-envir.c geanygdb/src/gdb-ui-frame.c geanygdb/src/gdb-ui-main.c geanygdb/src/gdb-ui.h geanygdb/src/geanygdb.c Modified: geanygdb/src/gdb-io-break.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -33,7 +33,7 @@ static void -free_breakpoint_list() +free_breakpoint_list(void) { GSList *p; for (p = breakpoint_list; p; p = p->next) Modified: geanygdb/src/gdb-io-envir.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -33,7 +33,7 @@ static void -free_env_info() +free_env_info(void) { g_free(env_info.cwd); g_free(env_info.path); Modified: geanygdb/src/gdb-io-frame.c 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -82,7 +82,7 @@ static void -free_lists() +free_lists(void) { gdbio_free_var_list(locals_list); locals_list = NULL; @@ -98,7 +98,7 @@ } static void -get_arglist() +get_arglist(void) { which_list = ¤t_frame.args; which_index = &args_index; @@ -372,12 +372,12 @@ static gint qlen(GQueue*q) qpush(&obj_list_queue, p); } static void -pop_list() +pop_list(void) { gdbio_free_var_list(qpop(&obj_list_queue)); } static GSList * -top_list() +top_list(void) { return qtop(obj_list_queue); } @@ -390,12 +390,12 @@ static gint qlen(GQueue*q) qpush(&obj_var_queue, p); } static void -pop_var() +pop_var(void) { gdbio_free_var(qpop(&obj_var_queue)); } static GdbVar * -top_var() +top_var(void) { return qtop(obj_var_queue); } @@ -412,12 +412,12 @@ static gint qlen(GQueue*q) qpush(&obj_func_queue, p); } static void -pop_func() +pop_func(void) { qpop(&obj_func_queue); } static GdbObjectFunc -top_func() +top_func(void) { return qtop(obj_func_queue); } @@ -426,7 +426,7 @@ static gint qlen(GQueue*q) static void -done_top() +done_top(void) { pop_var(); pop_list(); Modified: geanygdb/src/gdb-io-priv.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -83,7 +83,7 @@ void gdbio_target_exited(gchar * reason); void gdbio_set_target_pid(GPid pid); -GPid gdbio_get_target_pid(); +GPid gdbio_get_target_pid(void); void gdbio_set_running(gboolean running); /* Modified: geanygdb/src/gdb-io-read.c 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -53,7 +53,7 @@ static void -free_source_list() +free_source_list(void) { free_string_list(&source_files); } @@ -798,7 +798,7 @@ void -gdbio_continue() +gdbio_continue(void) { gdbio_send_cmd("-exec-continue\n"); } @@ -807,14 +807,14 @@ void -gdbio_return() +gdbio_return(void) { gdbio_send_seq_cmd(return_function, "-exec-return\n"); } void -gdbio_finish() +gdbio_finish(void) { gdbio_send_seq_cmd(finish_function, "-exec-finish\n"); } Modified: geanygdb/src/gdb-io-run.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -265,7 +265,7 @@ static void -kill_xterm() +kill_xterm(void) { if (xterm_pid) { @@ -567,7 +567,7 @@ void -gdbio_pause_target() +gdbio_pause_target(void) { if (target_pid) { @@ -650,14 +650,14 @@ } static gboolean -have_console() +have_console(void) { return (gdbio_status == GdbLoaded) || (gdbio_status == GdbStopped) || (gdbio_status == GdbFinished); } void -gdbio_exit() +gdbio_exit(void) { gdbio_kill_target(!have_console()); if (gdbio_pid) @@ -862,7 +862,7 @@ GPid -gdbio_get_target_pid() +gdbio_get_target_pid(void) { return target_pid; } Modified: geanygdb/src/gdb-io-stack.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -40,7 +40,7 @@ static void -free_frame_list() +free_frame_list(void) { GSList *p; for (p = frame_list; p; p = p->next) Modified: geanygdb/src/gdb-io.h 12 files changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -116,16 +116,16 @@ void gdbio_load(const gchar * exe_name); /* Terminate the debugger ( and the target program, if running ) */ -void gdbio_exit(); +void gdbio_exit(void); /* Resume execution after a breakpoint or SIGINT, etc... */ -void gdbio_continue(); +void gdbio_continue(void); /* Complete the current function */ -void gdbio_finish(); +void gdbio_finish(void); /* Return immediately from the current function */ -void gdbio_return(); +void gdbio_return(void); /* Execute the previously loaded program in the debugger. @@ -137,11 +137,11 @@ /* Send SIGINT to target */ -void gdbio_pause_target(); +void gdbio_pause_target(void); /* Send SIGKILL to target */ -void gdbio_kill_target(); +void gdbio_kill_target(gboolean force); /* Send a command to GDB */ Modified: geanygdb/src/gdb-lex.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -75,7 +75,7 @@ #define ID_NTH G_CSET_a_2_z G_CSET_A_2_Z G_CSET_DIGITS "_-" static GScanner * -init_scanner() +init_scanner(void) { GScanner *scanner = g_scanner_new(NULL); scanner->msg_handler = scan_error; @@ -214,7 +214,7 @@ void -gdblx_scanner_done() +gdblx_scanner_done(void) { if (scanner) { Modified: geanygdb/src/gdb-lex.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -74,4 +74,4 @@ The global scanner object is automatically intialized as soon as it is needed, but it must be explicitly destroyed. */ -void gdblx_scanner_done(); +void gdblx_scanner_done(void); Modified: geanygdb/src/gdb-ui-envir.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -179,7 +179,7 @@ void -gdbui_opts_dlg() +gdbui_opts_dlg(void) { GtkWidget *dlg = gtk_dialog_new_with_buttons(_("Preferences"), GTK_WINDOW(gdbui_setup.main_window), @@ -272,7 +272,7 @@ void -gdbui_opts_init() +gdbui_opts_init(void) { gdbui_setup.options.term_cmd = g_strdup("xterm"); gdbui_setup.options.mono_font = g_strdup(MONO_FONT); @@ -285,7 +285,7 @@ void -gdbui_opts_done() +gdbui_opts_done(void) { g_free(gdbui_setup.options.mono_font); gdbui_setup.options.mono_font = NULL; Modified: geanygdb/src/gdb-ui-frame.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -80,12 +80,12 @@ qpush(&obj_name_queue, g_strdup(p)); } static void -pop_name() +pop_name(void) { g_free(qpop(&obj_name_queue)); } static gchar * -top_name() +top_name(void) { return qtop(obj_name_queue); } @@ -135,7 +135,7 @@ #define MORE_INFO GTK_STOCK_ZOOM_IN static GtkWidget * -new_info_btn() +new_info_btn(void) { GtkWidget *rv; rv = gtk_button_new_with_mnemonic(_("_Examine")); Modified: geanygdb/src/gdb-ui-main.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1015,7 +1015,7 @@ void gdbui_create_dview(GtkWidget * parent) #ifdef STANDALONE static void -quit() +quit(void) { gdbio_exit(); g_printerr("\n"); Modified: geanygdb/src/gdb-ui.h 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -48,8 +48,8 @@ typedef void (*GdbUiLineFunc) (const gchar * filename, const gchar * line, const gchar * reason); -typedef LocationInfo *(*GdbUiLocationFunc) (); -typedef void (*GdbUiOptsFunc) (); +typedef LocationInfo *(*GdbUiLocationFunc) (void); +typedef void (*GdbUiOptsFunc) (void); @@ -76,10 +76,10 @@ GtkWidget *gdbui_new_dialog(gchar * title); -void gdbui_opts_init(); -void gdbui_opts_done(); +void gdbui_opts_init(void); +void gdbui_opts_done(void); -void gdbui_opts_dlg(); +void gdbui_opts_dlg(void); void gdbui_stack_dlg(const GSList * frame_list); void gdbui_break_dlg(gboolean is_watch); Modified: geanygdb/src/geanygdb.c 12 files changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -51,7 +51,7 @@ static gchar *config_file; -static void show_compwin() +static void show_compwin(void) { gint page = gtk_notebook_page_num(msgbook, compwin); gtk_notebook_set_current_page(msgbook, page); @@ -122,7 +122,7 @@ static void show_compwin() /* static gchar * -get_current_word() +get_current_word(void) { const gchar *word_chars = NULL; gint pos, linenum, bol, bow, eow; @@ -170,7 +170,7 @@ static gboolean word_check_left(gchar c) } static gchar * -get_current_word() +get_current_word(void) { gchar *txt; GeanyDocument *doc; @@ -231,7 +231,7 @@ static gboolean word_check_left(gchar c) static LocationInfo * -location_query_cb() +location_query_cb(void) { GeanyDocument *doc = document_get_current(); if (!(doc && doc->is_valid)) @@ -258,7 +258,7 @@ static gboolean word_check_left(gchar c) static void -update_settings_cb() +update_settings_cb(void) { GKeyFile *kf = g_key_file_new(); gchar *data; @@ -400,7 +400,7 @@ static gboolean word_check_left(gchar c) void -plugin_cleanup() +plugin_cleanup(void) { gdbio_exit(); update_settings_cb(); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 3944fd: geanygdb: Fix various const string warnings
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 16:35:48 Commit: 3944fdfa3c11b7c4373b7258cc3d13a7b6166a62
https://github.com/geany/geany-plugins/commit/3944fdfa3c11b7c4373b7258cc3d1…
Log Message: ----------- geanygdb: Fix various const string warnings This doesn't introduce any feature change and only one effective code change on a tricky (but not strictly speaking wrong) spot. Modified Paths: -------------- geanygdb/src/gdb-io-break.c geanygdb/src/gdb-io-frame.c geanygdb/src/gdb-io-priv.h geanygdb/src/gdb-io-read.c geanygdb/src/gdb-io-run.c geanygdb/src/gdb-io.h geanygdb/src/gdb-lex.c geanygdb/src/gdb-lex.h geanygdb/src/gdb-ui-envir.c geanygdb/src/gdb-ui-frame.c geanygdb/src/gdb-ui-locn.c geanygdb/src/gdb-ui-main.c geanygdb/src/gdb-ui.h Modified: geanygdb/src/gdb-io-break.c 11 files changed, 9 insertions(+), 2 deletions(-) =================================================================== @@ -64,8 +64,15 @@ #define populate(rec, hash, key) \ - rec->key=gdblx_lookup_string(hash, #key""); \ - if (rec->key) {rec->key=g_strdup(rec->key);} + do \ + { \ + const gchar *populate_key = gdblx_lookup_string(hash, #key""); \ + if (populate_key) \ + { \ + rec->key = g_strdup(populate_key); \ + } \ + } \ + while (0) Modified: geanygdb/src/gdb-io-frame.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -154,7 +154,7 @@ static gchar * -fmt_val(gchar * value) +fmt_val(const gchar * value) { gchar buf[256]; if (!value) @@ -305,7 +305,7 @@ } void -gdbio_show_locals(GdbFrameFunc func, gchar * level) +gdbio_show_locals(GdbFrameFunc func, const gchar * level) { free_lists(); gdbio_locals_func = func; Modified: geanygdb/src/gdb-io-priv.h 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -60,7 +60,7 @@ expands to: gchar *somevar = gdblx_lookup_string ( myhash, "somevar" ); */ -#define HSTR(hash,token) gchar* token = gdblx_lookup_string(hash, #token"") +#define HSTR(hash,token) const gchar* token = gdblx_lookup_string(hash, #token"") #define HTAB(hash,token) GHashTable* token = gdblx_lookup_hash(hash, #token"") #define HLST(hash,token) GSList* token = gdblx_lookup_list(hash, #token"") @@ -76,12 +76,12 @@ -void gdbio_info_func(gchar * fmt, ...); -void gdbio_error_func(gchar * fmt, ...); +void gdbio_info_func(const gchar * fmt, ...); +void gdbio_error_func(const gchar * fmt, ...); void gdbio_do_status(GdbStatus s); -void gdbio_target_exited(gchar * reason); +void gdbio_target_exited(const gchar * reason); void gdbio_set_target_pid(GPid pid); GPid gdbio_get_target_pid(void); void gdbio_set_running(gboolean running); Modified: geanygdb/src/gdb-io-read.c 8 files changed, 5 insertions(+), 3 deletions(-) =================================================================== @@ -297,7 +297,7 @@ static gboolean -do_step_func(GHashTable * h, gchar * reason) +do_step_func(GHashTable * h, const gchar * reason_) { HTAB(h, frame); HSTR(frame, fullname); @@ -306,6 +306,7 @@ { if (gdbio_setup.step_func) { + gchar *reason = g_strdup(reason_); gchar *p; for (p = reason; *p; p++) { @@ -315,6 +316,7 @@ } } gdbio_setup.step_func(fullname, line, reason); + g_free(reason); } else { @@ -384,14 +386,14 @@ static void -watchpoint_trigger(GHashTable * h, GHashTable * wp, gchar * reason) +watchpoint_trigger(GHashTable * h, GHashTable * wp, const gchar * reason) { HTAB(h, value); HSTR(wp, exp); HSTR(wp, number); HSTR(value, new); HSTR(value, old); - gchar *readval = gdblx_lookup_string(value, "value"); + const gchar *readval = gdblx_lookup_string(value, "value"); if (new && old) { gdbio_info_func("%s #%s expression:%s old-value:%s new-value:%s\n", Modified: geanygdb/src/gdb-io-run.c 24 files changed, 12 insertions(+), 12 deletions(-) =================================================================== @@ -36,7 +36,7 @@ GdbIoSetup gdbio_setup; -static gchar *gdbio_args[] = { "gdb", "--interpreter=mi", "-nx", NULL }; +static const gchar *gdbio_args[] = { "gdb", "--interpreter=mi", "-nx", NULL }; static GPid gdbio_pid = 0; static GPid target_pid = 0; @@ -132,7 +132,7 @@ } static gboolean -gerror(gchar * msg, GError ** err) +gerror(const gchar * msg, GError ** err) { if (*err) { @@ -156,7 +156,7 @@ gint -gdbio_atoi(gchar * str) +gdbio_atoi(const gchar * str) { gchar *tail = NULL; gint rv = strtol(str, &tail, 10); @@ -165,7 +165,7 @@ void -gdbio_error_func(gchar * fmt, ...) +gdbio_error_func(const gchar * fmt, ...) { va_list args; gchar *msg; @@ -185,7 +185,7 @@ void -gdbio_info_func(gchar * fmt, ...) +gdbio_info_func(const gchar * fmt, ...) { va_list args; gchar *msg; @@ -277,9 +277,9 @@ static gchar * -start_xterm(gchar * term_cmd) +start_xterm(const gchar * term_cmd) { - gchar *term_args[] = { "xterm", "-title", "Debug terminal", "-e", NULL, NULL, NULL }; + const gchar *term_args[] = { "xterm", "-title", "Debug terminal", "-e", NULL, NULL, NULL }; GError *err = NULL; gint i = 0; gchar *tty_name = NULL; @@ -353,10 +353,10 @@ } term_args[i] = gdbio_setup.tty_helper; term_args[i + 1] = xterm_tty_file; - all = g_strjoinv("\" \"", term_args); + all = g_strjoinv("\" \"", (gchar **) term_args); gdbio_info_func("\"%s\"\n", all); g_free(all); - if (g_spawn_async(NULL, term_args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &xterm_pid, &err)) + if (g_spawn_async(NULL, (gchar **) term_args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &xterm_pid, &err)) { gchar *contents = NULL; gsize len; @@ -535,7 +535,7 @@ void -gdbio_target_exited(gchar * reason) +gdbio_target_exited(const gchar * reason) { gdbio_info_func(_("Target process exited. (pid=%d; %s%s)\n"), target_pid, reason @@ -789,7 +789,7 @@ gchar **gdbio_env = utils_copy_environment(exclude, "LANG", "C", NULL); const gchar *env_lang = g_getenv("LANG"); gdbio_exit(); - if (g_spawn_async_with_pipes(NULL, gdbio_args, gdbio_env, + if (g_spawn_async_with_pipes(NULL, (gchar **) gdbio_args, gdbio_env, GDB_SPAWN_FLAGS, NULL, NULL, &gdbio_pid, &gdbio_in, &gdbio_out, NULL, &err)) { @@ -828,7 +828,7 @@ void -gdbio_exec_target(gchar * terminal_command) +gdbio_exec_target(const gchar * terminal_command) { if (terminal_command) { Modified: geanygdb/src/gdb-io.h 22 files changed, 11 insertions(+), 11 deletions(-) =================================================================== @@ -26,7 +26,7 @@ extern ssize_t getline(char **lineptr, size_t * n, FILE * stream); extern const gchar *basename(const gchar * path); -gint gdbio_atoi(gchar * str); +gint gdbio_atoi(const gchar * str); gint gdbio_wait(gint ms); @@ -63,14 +63,14 @@ typedef struct { - gchar *signal_name; - gchar *signal_meaning; - gchar *addr; - gchar *func; - gchar *file; - gchar *fullname; - gchar *line; - gchar *from; + const gchar *signal_name; + const gchar *signal_meaning; + const gchar *addr; + const gchar *func; + const gchar *file; + const gchar *fullname; + const gchar *line; + const gchar *from; } GdbSignalInfo; @@ -133,7 +133,7 @@ be started first, and the target program will be run in the resulting console. */ -void gdbio_exec_target(gchar * terminal_command); +void gdbio_exec_target(const gchar * terminal_command); /* Send SIGINT to target */ @@ -189,7 +189,7 @@ Passes a GdbFrameInfo pointer and a GSList of GdbVar pointers to func representing the state of the local variables at the specified level. */ -void gdbio_show_locals(GdbFrameFunc func, gchar * level); +void gdbio_show_locals(GdbFrameFunc func, const gchar * level); /* Modified: geanygdb/src/gdb-lex.c 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -79,7 +79,7 @@ { GScanner *scanner = g_scanner_new(NULL); scanner->msg_handler = scan_error; - scanner->config->cset_identifier_nth = ID_NTH; + scanner->config->cset_identifier_nth = (gchar *) ID_NTH; return scanner; } @@ -129,7 +129,7 @@ static GScanner *scanner = NULL; GHashTable * -gdblx_parse_results(gchar * results) +gdblx_parse_results(const gchar * results) { gchar *key = NULL; gboolean equals = FALSE; @@ -310,21 +310,21 @@ static GdbLxValue * -find_value(GHashTable * hash, gchar * key, GdbLxValueType type) +find_value(GHashTable * hash, const gchar * key, GdbLxValueType type) { GdbLxValue *v = hash ? g_hash_table_lookup(hash, key) : NULL; return v && v->type == type ? v : NULL; } -gchar * -gdblx_lookup_string(GHashTable * hash, gchar * key) +const gchar * +gdblx_lookup_string(GHashTable * hash, const gchar * key) { GdbLxValue *v = find_value(hash, key, vt_STRING); return v ? v->string : NULL; } GHashTable * -gdblx_lookup_hash(GHashTable * hash, gchar * key) +gdblx_lookup_hash(GHashTable * hash, const gchar * key) { GdbLxValue *v = find_value(hash, key, vt_HASH); return v ? v->hash : NULL; @@ -332,7 +332,7 @@ GSList * -gdblx_lookup_list(GHashTable * hash, gchar * key) +gdblx_lookup_list(GHashTable * hash, const gchar * key) { GdbLxValue *v = find_value(hash, key, vt_LIST); return v ? v->list : NULL; @@ -341,8 +341,8 @@ /* True if key exists, it's a string, and its value matches 'expected' */ gboolean -gdblx_check_keyval(GHashTable * hash, gchar * key, gchar * expected) +gdblx_check_keyval(GHashTable * hash, const gchar * key, const gchar * expected) { - gchar *value = gdblx_lookup_string(hash, key); + const gchar *value = gdblx_lookup_string(hash, key); return value && g_str_equal(value, expected); } Modified: geanygdb/src/gdb-lex.h 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -47,22 +47,22 @@ -GHashTable *gdblx_parse_results(gchar * resutls); +GHashTable *gdblx_parse_results(const gchar * resutls); /* The gdblx_lookup_* functions below return NULL if their hash is NULL, if the key is not found, or if its value is not of the expected return type. */ -gchar *gdblx_lookup_string(GHashTable * hash, gchar * key); -GHashTable *gdblx_lookup_hash(GHashTable * hash, gchar * key); -GSList *gdblx_lookup_list(GHashTable * hash, gchar * key); +const gchar *gdblx_lookup_string(GHashTable * hash, const gchar * key); +GHashTable *gdblx_lookup_hash(GHashTable * hash, const gchar * key); +GSList *gdblx_lookup_list(GHashTable * hash, const gchar * key); /* Returns TRUE if hash is not NULL, key exists, and key type is vt_STRING, and the key's value matches 'expected'. */ -gboolean gdblx_check_keyval(GHashTable * hash, gchar * key, gchar * expected); +gboolean gdblx_check_keyval(GHashTable * hash, const gchar * key, const gchar * expected); /* Dumps a pretty-printed representation of the hash table to stderr */ Modified: geanygdb/src/gdb-ui-envir.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -27,7 +27,7 @@ static GtkWidget * -newlabel(gchar * s) +newlabel(const gchar * s) { GtkWidget *w = gtk_label_new(s); gtk_misc_set_alignment(GTK_MISC(w), 0.0f, 0.0f); Modified: geanygdb/src/gdb-ui-frame.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -148,7 +148,7 @@ } GtkWidget * -gdbui_new_dialog(gchar * title) +gdbui_new_dialog(const gchar * title) { GtkWidget *dlg = gtk_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(gdbui_setup.main_window)); @@ -160,7 +160,7 @@ static void -monospace(GtkWidget * label, gchar * line, gchar * text) +monospace(GtkWidget * label, const gchar * line, const gchar * text) { gchar *esc = g_markup_escape_text(text, -1); gchar *mu; @@ -197,7 +197,7 @@ static GtkWidget * -make_list(const GSList * list, gchar * title, VarWidgets * vw) +make_list(const GSList * list, const gchar * title, VarWidgets * vw) { GtkTreeIter iter; GtkTreeViewColumn *column; Modified: geanygdb/src/gdb-ui-locn.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -43,7 +43,7 @@ LocationInfo * -gdbui_location_dlg(gchar * title, gboolean is_watch) +gdbui_location_dlg(const gchar * title, gboolean is_watch) { GtkWidget *file_entry = NULL; GtkWidget *line_entry; @@ -163,7 +163,7 @@ rv = g_new0(LocationInfo, 1); if (is_watch) { - gchar *opt = ""; + const gchar *opt = ""; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(opt_r))) { opt = "-r"; Modified: geanygdb/src/gdb-ui-main.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -375,7 +375,7 @@ struct SdebugMenu void -gdbui_set_tip(GtkWidget * w, gchar * tip) +gdbui_set_tip(GtkWidget * w, const gchar * tip) { if (gdbui_setup.options.show_tooltips) { @@ -390,7 +390,7 @@ struct SdebugMenu static const gboolean disable_mnemonics = TRUE; static GtkWidget * -make_btn(const gchar *text, GtkCallback cb, gchar *img, gchar *tip) +make_btn(const gchar *text, GtkCallback cb, const gchar *img, const gchar *tip) { GtkWidget *button; Modified: geanygdb/src/gdb-ui.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -71,10 +71,10 @@ void gdbui_create_menu(GtkWidget * parent); void gdbui_create_dview(GtkWidget * parent); -void gdbui_set_tip(GtkWidget * w, gchar * tip); +void gdbui_set_tip(GtkWidget * w, const gchar * tip); void gdbui_enable(gboolean enabled); -GtkWidget *gdbui_new_dialog(gchar * title); +GtkWidget *gdbui_new_dialog(const gchar * title); void gdbui_opts_init(void); void gdbui_opts_done(void); @@ -85,5 +85,5 @@ void gdbui_break_dlg(gboolean is_watch); void gdbui_env_dlg(const GdbEnvironInfo * env); -LocationInfo *gdbui_location_dlg(gchar * title, gboolean is_watch); +LocationInfo *gdbui_location_dlg(const gchar * title, gboolean is_watch); void gdbui_free_location_info(LocationInfo * li); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 4150b3: geanygdb: Don't use C99 single-line comments
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 16:35:48 Commit: 4150b357e2495c8ff3da319742a1c7b5d6d32579
https://github.com/geany/geany-plugins/commit/4150b357e2495c8ff3da319742a1c…
Log Message: ----------- geanygdb: Don't use C99 single-line comments Modified Paths: -------------- geanygdb/src/gdb-io-envir.c geanygdb/src/gdb-io-frame.c geanygdb/src/gdb-ui-break.c geanygdb/src/gdb-ui-envir.c geanygdb/src/gdb-ui-frame.c geanygdb/src/gdb-ui-main.c geanygdb/src/geanygdb.c Modified: geanygdb/src/gdb-io-envir.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -134,7 +134,7 @@ else { gdbio_info_func(_("Failed to retrieve source search path setting from GDB.")); -// gdblx_dump_table(h); +/* gdblx_dump_table(h);*/ } if (h) g_hash_table_destroy(h); @@ -155,7 +155,7 @@ else { gdbio_info_func(_("Failed to retrieve executable search path setting from GDB.")); -// gdblx_dump_table(h); +/* gdblx_dump_table(h);*/ } if (h) g_hash_table_destroy(h); @@ -177,7 +177,7 @@ else { gdbio_info_func(_("Failed to retrieve working directory setting from GDB.")); -// gdblx_dump_table(h); +/* gdblx_dump_table(h);*/ } if (h) g_hash_table_destroy(h); Modified: geanygdb/src/gdb-io-frame.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -403,7 +403,7 @@ static gint qlen(GQueue*q) -//static GdbObjectFunc gdbio_object_list_func=NULL; +/*static GdbObjectFunc gdbio_object_list_func=NULL;*/ static GQueue *obj_func_queue = NULL; static void @@ -430,7 +430,7 @@ static gint qlen(GQueue*q) { pop_var(); pop_list(); -// pop_name(); +/* pop_name();*/ pop_func(); } Modified: geanygdb/src/gdb-ui-break.c 22 files changed, 11 insertions(+), 11 deletions(-) =================================================================== @@ -388,17 +388,17 @@ enum const gchar *access_type; BkPtDlgData bpd = { NULL, NULL }; gint rowcount = 0; - store = gtk_list_store_new(bcNumCols, G_TYPE_STRING, //bcNumber - G_TYPE_STRING, //bcEnabled - G_TYPE_STRING, //bcWhat - G_TYPE_STRING, //bcFile - G_TYPE_STRING, //bcLine - G_TYPE_STRING, //bcFunc - G_TYPE_STRING, //bcTimes - G_TYPE_STRING, //bcIgnore - G_TYPE_STRING, //bcCond - G_TYPE_STRING, //bcAccess - G_TYPE_POINTER //bcData + store = gtk_list_store_new(bcNumCols, G_TYPE_STRING, /*bcNumber*/ + G_TYPE_STRING, /*bcEnabled*/ + G_TYPE_STRING, /*bcWhat*/ + G_TYPE_STRING, /*bcFile*/ + G_TYPE_STRING, /*bcLine*/ + G_TYPE_STRING, /*bcFunc*/ + G_TYPE_STRING, /*bcTimes*/ + G_TYPE_STRING, /*bcIgnore*/ + G_TYPE_STRING, /*bcCond*/ + G_TYPE_STRING, /*bcAccess*/ + G_TYPE_POINTER /*bcData*/ ); for (p = frame_list; p; p = p->next) { Modified: geanygdb/src/gdb-ui-envir.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -191,8 +191,8 @@ GtkBox *vbox = GTK_BOX(GTK_DIALOG(dlg)->vbox); GtkWidget *hbox; GtkWidget *font_btn = gtk_button_new(); -// GtkWidget*font_btn=gtk_button_new_with_label("Choose..."); -// GtkWidget*font_btn=gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); +/* GtkWidget*font_btn=gtk_button_new_with_label("Choose..."); + GtkWidget*font_btn=gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT);*/ GtkWidget *font_box = gtk_entry_new(); GtkWidget *term_box = gtk_entry_new(); Modified: geanygdb/src/gdb-ui-frame.c 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -130,7 +130,7 @@ } FrameColumn; -//#define MORE_INFO GTK_STOCK_GO_FORWARD +/*#define MORE_INFO GTK_STOCK_GO_FORWARD*/ #define MORE_INFO GTK_STOCK_ZOOM_IN @@ -142,7 +142,7 @@ gtk_button_set_image(GTK_BUTTON(rv), gtk_image_new_from_stock(MORE_INFO, GTK_ICON_SIZE_BUTTON)); #if GTK_CHECK_VERSION(2, 10, 0) - // gtk_button_set_image_position(GTK_BUTTON(rv), GTK_POS_RIGHT); + /*gtk_button_set_image_position(GTK_BUTTON(rv), GTK_POS_RIGHT);*/ #endif return rv; } @@ -301,7 +301,7 @@ -// btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack); +/* btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack);*/ btn = gtk_dialog_add_button(GTK_DIALOG(vw.dlg), GTK_STOCK_GO_BACK, respGoBack); gdbui_set_tip(btn, _("Return to previous dialog.")); gtk_dialog_set_default_response(GTK_DIALOG(vw.dlg), respGoBack); @@ -375,7 +375,7 @@ view = make_list(locals, _("Local variables"), &vw); gtk_box_pack_start(vbox, view, TRUE, TRUE, 0); -// btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack); +/* btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack);*/ btn = gtk_dialog_add_button(GTK_DIALOG(vw.dlg), GTK_STOCK_GO_BACK, respGoBack); gdbui_set_tip(btn, _("Return to stack list dialog.")); Modified: geanygdb/src/gdb-ui-main.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -825,8 +825,8 @@ struct SdebugMenu #define split2 split(main_vbox) -//#define splitw gtk_widget_new(GTK_TYPE_BIN,NULL) -//#define splitw gtk_hseparator_new() +/*#define splitw gtk_widget_new(GTK_TYPE_BIN,NULL)*/ +/*#define splitw gtk_hseparator_new()*/ #define splitw gtk_hbox_new(FALSE,0) @@ -871,8 +871,8 @@ enum static void kb_activate(guint key_id) { - //gtk_notebook_set_current_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), page_number); - //gtk_widget_grab_focus(file_view); + /*gtk_notebook_set_current_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), page_number); + gtk_widget_grab_focus(file_view);*/ switch (key_id) { #define DAENTRY(A,B,C,D) DBKEYACT(A,B,C) @@ -890,7 +890,7 @@ void gdbui_create_menu(GtkWidget * parent) #define DAENTRY(A,B,C,D) MENUENTRY(A,B,C,D); DEBUGACTIONS #undef DAENTRY -// gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (sdm._load), GTK_STOCK_OPEN); +/* gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (sdm._load), GTK_STOCK_OPEN);*/ } void gdbui_create_dview(GtkWidget * parent) Modified: geanygdb/src/geanygdb.c 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -76,17 +76,17 @@ static void show_compwin(void) #define NOTEBOOK GTK_NOTEBOOK(geany->main_widgets->notebook) -//#define DOCS ((document*)(doc_array->data)) +/*#define DOCS ((document*)(doc_array->data))*/ -//static gint -//doc_idx_to_tab_idx(gint idx) -//{ +/*static gint +doc_idx_to_tab_idx(gint idx) +{ // FIXME -// return 0; -// return ( -// (idx>=0) && ((guint)idx<doc_array->len) && DOCS[idx].is_valid -// ) ? gtk_notebook_page_num(NOTEBOOK, GTK_WIDGET(DOCS[idx].sci)):-1; -//} + return 0; + return ( + (idx>=0) && ((guint)idx<doc_array->len) && DOCS[idx].is_valid + ) ? gtk_notebook_page_num(NOTEBOOK, GTK_WIDGET(DOCS[idx].sci)):-1; +}*/ static void @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 2387a1: geanygdb: Move a few prototypes to the appropriate location
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 16:35:48 Commit: 2387a172d74fc5783a07cdf9353a4237302b29eb
https://github.com/geany/geany-plugins/commit/2387a172d74fc5783a07cdf9353a4…
Log Message: ----------- geanygdb: Move a few prototypes to the appropriate location Modified Paths: -------------- geanygdb/src/gdb-io-priv.h geanygdb/src/gdb-io-read.c geanygdb/src/gdb-io-run.c Modified: geanygdb/src/gdb-io-priv.h 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -54,6 +54,8 @@ */ GHashTable *gdbio_get_results(gchar * resp, gchar ** list); +void gdbio_parse_file_list(gint seq, gchar ** list, gchar * resp); + /* Preprocessor sugar for declaring C variables from hash key names, e.g. HSTR(myhash,somevar) Modified: geanygdb/src/gdb-io-read.c 8 files changed, 2 insertions(+), 6 deletions(-) =================================================================== @@ -34,6 +34,8 @@ static GSList *source_files = NULL; static gboolean starting = FALSE; +static void handle_response_line(gchar * str, gchar ** list); + static void @@ -104,9 +106,6 @@ -static void handle_response_line(gchar * str, gchar ** list); - - static void handle_response_lines(gchar ** list) { @@ -227,9 +226,6 @@ -static void handle_response_line(gchar * str, gchar ** list); - - void gdbio_set_starting(gboolean s) { Modified: geanygdb/src/gdb-io-run.c 2 files changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -742,8 +742,6 @@ -void gdbio_parse_file_list(gint seq, gchar ** list, gchar * resp); - static void load_target(const gchar * exe_name) { @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 4a7ad5: geanygdb: Don't use strtoull()
by Colomban Wendling
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sat, 09 Jun 2012 16:35:48 Commit: 4a7ad516a98a9b2cbc8cbc902bc3e034bb81be4a
https://github.com/geany/geany-plugins/commit/4a7ad516a98a9b2cbc8cbc902bc3e…
Log Message: ----------- geanygdb: Don't use strtoull() strtoull() is a C99 function and the result was stored in an int anyway, so use strtoul() instead. Modified Paths: -------------- geanygdb/src/gdb-io-read.c geanygdb/src/gdb-io-stack.c Modified: geanygdb/src/gdb-io-read.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -619,7 +619,7 @@ gint ec = -1; if (exit_code) { - ec = strtoull(exit_code, &tail, 8); + ec = strtoul(exit_code, &tail, 8); if ((!tail) || (*tail)) { ec = -1; Modified: geanygdb/src/gdb-io-stack.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -112,7 +112,7 @@ if (level && args) { gchar *tail; - gint n = strtoull(level, &tail, 10); + gint n = strtoul(level, &tail, 10); GdbFrameInfo *frame = NULL; GSList *p; for (p = frame_list; p; p = p->next) @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] b56fcd: Merge pull request #37 from b4n/fixes/codenav
by Frank Lanitz
09 Jun '12
09 Jun '12
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: Frank Lanitz <frank(a)frank.uvena.de> Date: Sat, 09 Jun 2012 09:01:25 Commit: b56fcd1beabc9a6a575d58c83ef7b9dcdf7f0dec
https://github.com/geany/geany-plugins/commit/b56fcd1beabc9a6a575d58c83ef7b…
Log Message: ----------- Merge pull request #37 from b4n/fixes/codenav A few fixes for the CodeNav plugin Didn't do any detailed check - due to trust ;) Modified Paths: -------------- codenav/src/codenavigation.c codenav/src/codenavigation.h codenav/src/goto_file.c codenav/src/goto_file.h codenav/src/switch_head_impl.c codenav/src/switch_head_impl.h Modified: codenav/src/codenavigation.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -85,10 +85,10 @@ void plugin_init(GeanyData *data) */ GtkWidget *plugin_configure(GtkDialog *dialog) { - log_func(); - GtkWidget *vbox; + log_func(); + vbox = gtk_vbox_new(FALSE, 6); /* Switch header/implementation widget */ Modified: codenav/src/codenavigation.h 5 files changed, 2 insertions(+), 3 deletions(-) =================================================================== @@ -62,11 +62,10 @@ static void log_debug(const gchar* s, ...) va_end(l); } -#define log_func() g_print("[CODENAV FUNC] : %s", __func__) /* NB : this needs the C99 standard, but is only - used when debugging, so no problem :) */ +#define log_func() g_print("[CODENAV FUNC] : %s", G_STRFUNC) #else static void log_debug(const gchar* s, ...) {} -static void log_func() {} +#define log_func() {} #endif /* IDs for keybindings */ Modified: codenav/src/goto_file.c 13 files changed, 8 insertions(+), 5 deletions(-) =================================================================== @@ -45,11 +45,13 @@ * --------------------------------------------------------------------- */ void -goto_file_init() +goto_file_init(void) { + GtkWidget* edit_menu; + log_func(); - GtkWidget* edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); + edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); /* Add the menu item, sensitive only when a document is opened */ menu_item = gtk_menu_item_new_with_mnemonic(_("Goto file")); @@ -75,7 +77,7 @@ * --------------------------------------------------------------------- */ void -goto_file_cleanup() +goto_file_cleanup(void) { log_func(); @@ -89,11 +91,12 @@ static void menu_item_activate(guint key_id) { + GtkWidget *dialog; + log_func(); /* TODO */ - - GtkWidget *dialog = gtk_message_dialog_new( + dialog = gtk_message_dialog_new( GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, Modified: codenav/src/goto_file.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -27,10 +27,10 @@ /* Initialization */ void -goto_file_init(); +goto_file_init(void); /* Cleanup */ void -goto_file_cleanup(); +goto_file_cleanup(void); #endif /* GOTO_FILE_H */ Modified: codenav/src/switch_head_impl.c 18 files changed, 11 insertions(+), 7 deletions(-) =================================================================== @@ -54,7 +54,7 @@ /********************** Functions for the feature *********************/ static void -fill_default_languages_list(); +fill_default_languages_list(void); static void menu_item_activate(guint key_id); @@ -73,11 +73,13 @@ * --------------------------------------------------------------------- */ void -switch_head_impl_init() +switch_head_impl_init(void) { + GtkWidget* edit_menu; + log_func(); - GtkWidget* edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); + edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); /* Add the menu item and make it sensitive only when a document is opened */ menu_item = gtk_menu_item_new_with_mnemonic(_("Switch header/implementation")); @@ -106,7 +108,7 @@ * --------------------------------------------------------------------- */ void -switch_head_impl_cleanup() +switch_head_impl_cleanup(void) { GSList* iter = NULL; @@ -134,7 +136,7 @@ * --------------------------------------------------------------------- */ static void -fill_default_languages_list() +fill_default_languages_list(void) { Language* lang = NULL; @@ -356,9 +358,11 @@ /* Third : if not found, ask the user if he wants to create it or not. */ { + GtkWidget* dialog; + p_str = g_strdup_printf("%s.%s", basename_no_extension, (const gchar*)(p_extensions_to_test->data)); - GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), + dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, @@ -441,7 +445,7 @@ /* ----- Finally, the configuration widget ----- */ GtkWidget* -switch_head_impl_config_widget() +switch_head_impl_config_widget(void) { GtkWidget *frame, *vbox, *tree_view; GtkWidget *hbox_buttons, *add_button, *remove_button; Modified: codenav/src/switch_head_impl.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -27,15 +27,15 @@ /* Initialization */ void -switch_head_impl_init(); +switch_head_impl_init(void); /* Cleanup */ void -switch_head_impl_cleanup(); +switch_head_impl_cleanup(void); /* Configuration widget */ GtkWidget* -switch_head_impl_config_widget(); +switch_head_impl_config_widget(void); /* Write the configuration of the feature */ void @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 097f70: debugger: Fix a typo, `const` keyword repeated twice
by Colomban Wendling
08 Jun '12
08 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Fri, 08 Jun 2012 16:37:19 Commit: 097f70d1b50d21b3470337b7c7fa73ac8f2cc8de
https://github.com/geany/geany-plugins/commit/097f70d1b50d21b3470337b7c7fa7…
Log Message: ----------- debugger: Fix a typo, `const` keyword repeated twice Modified Paths: -------------- debugger/src/breakpoints.c debugger/src/breakpoints.h Modified: debugger/src/breakpoints.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -470,7 +470,7 @@ void breaks_remove_all(void) * file - list of breakpoints * enabled - anble or disable breakpoints */ -void breaks_set_enabled_for_file(const const char *file, gboolean enabled) +void breaks_set_enabled_for_file(const char *file, gboolean enabled) { /* do not process async break manipulation on modules that do not support async interuppt */ Modified: debugger/src/breakpoints.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -39,7 +39,7 @@ void breaks_switch(const char *file, int line); void breaks_set_hits_count(const char *file, int line, int count); void breaks_set_condition(const char *file, int line, const char* condition); -void breaks_set_enabled_for_file(const const char *file, gboolean enabled); +void breaks_set_enabled_for_file(const char *file, gboolean enabled); void breaks_move_to_line(const char* file, int line_from, int line_to); break_state breaks_get_state(const char* file, int line); GList* breaks_get_for_document(const char* file); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] a38f02: debugger: Use proper C prototypes for functions without arguments
by Colomban Wendling
08 Jun '12
08 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Fri, 08 Jun 2012 16:37:19 Commit: a38f02262c8aa6778e621822ac366569d2f2847b
https://github.com/geany/geany-plugins/commit/a38f02262c8aa6778e621822ac366…
Log Message: ----------- debugger: Use proper C prototypes for functions without arguments Modified Paths: -------------- debugger/src/bptree.c debugger/src/bptree.h debugger/src/breakpoint.c debugger/src/breakpoint.h debugger/src/breakpoints.c debugger/src/breakpoints.h debugger/src/cell_renderers/cellrendererbreakicon.c debugger/src/cell_renderers/cellrendererframeicon.c debugger/src/cell_renderers/cellrenderertoggle.c debugger/src/dbm_gdb.c debugger/src/dconfig.c debugger/src/dconfig.h debugger/src/debug.c debugger/src/debug.h debugger/src/debug_module.c debugger/src/debug_module.h debugger/src/dpaned.c debugger/src/dpaned.h debugger/src/envtree.c debugger/src/envtree.h debugger/src/keys.c debugger/src/keys.h debugger/src/markers.c debugger/src/markers.h debugger/src/pixbuf.c debugger/src/pixbuf.h debugger/src/stree.c debugger/src/stree.h debugger/src/tpage.c debugger/src/tpage.h debugger/src/wtree.c debugger/src/wtree.h Modified: debugger/src/bptree.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -709,7 +709,7 @@ gboolean bptree_init(move_to_line_cb cb) * destroy breaks tree and associated data * arguments: */ -void bptree_destroy() +void bptree_destroy(void) { g_hash_table_destroy(files); } @@ -883,7 +883,7 @@ void bptree_remove_breakpoint(breakpoint* bp) * updates all file ENABLED checkboxes base on theit children states * arguments: */ -void bptree_update_file_nodes() +void bptree_update_file_nodes(void) { GtkTreeIter file; if(gtk_tree_model_iter_children(model, &file, NULL)) Modified: debugger/src/bptree.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -20,7 +20,7 @@ */ gboolean bptree_init(move_to_line_cb callback); -void bptree_destroy(); +void bptree_destroy(void); void bptree_add_breakpoint(breakpoint* bp); void bptree_update_breakpoint(breakpoint* bp); void bptree_remove_breakpoint(breakpoint* bp); @@ -29,4 +29,4 @@ void bptree_set_enabled(breakpoint* bp); gchar* bptree_get_condition(breakpoint* bp); void bptree_set_readonly(gboolean readonly); -void bptree_update_file_nodes(); +void bptree_update_file_nodes(void); Modified: debugger/src/breakpoint.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -30,7 +30,7 @@ /* * create new empty breakpoint */ -breakpoint* break_new() +breakpoint* break_new(void) { breakpoint* bp = (breakpoint*)g_malloc(sizeof(breakpoint)); memset(bp, 0 , sizeof(breakpoint)); Modified: debugger/src/breakpoint.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -32,5 +32,5 @@ GtkTreeIter iter; } breakpoint; -breakpoint* break_new(); +breakpoint* break_new(void); breakpoint* break_new_full(const char* file, int line, const char* condition, int enabled, int hitscount); Modified: debugger/src/breakpoints.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -330,7 +330,7 @@ gboolean breaks_init(move_to_line_cb cb) /* * Frees breaks related data. */ -void breaks_destroy() +void breaks_destroy(void) { /* remove all markers */ GList *breaks, *iter; @@ -458,7 +458,7 @@ void breaks_remove_list(GList *list) * Removes all breakpoints. * arguments: */ -void breaks_remove_all() +void breaks_remove_all(void) { g_hash_table_foreach(files, hash_table_foreach_call_function, (gpointer)on_remove); g_hash_table_remove_all(files); @@ -688,7 +688,7 @@ breakpoint* breaks_lookup_breakpoint(const gchar* file, int line) * Gets all breakpoints * arguments: */ -GList* breaks_get_all() +GList* breaks_get_all(void) { GList *breaks = NULL; g_hash_table_foreach(files, hash_table_foreach_add_to_list, &breaks); Modified: debugger/src/breakpoints.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -31,11 +31,11 @@ typedef void (*select_frame_cb)(int frame_number); gboolean breaks_init(move_to_line_cb callback); -void breaks_destroy(); +void breaks_destroy(void); void breaks_add(const char* file, int line, char* condition, int enable, int hitscount); void breaks_remove(const char* file, int line); void breaks_remove_list(GList *list); -void breaks_remove_all(); +void breaks_remove_all(void); void breaks_switch(const char *file, int line); void breaks_set_hits_count(const char *file, int line, int count); void breaks_set_condition(const char *file, int line, const char* condition); @@ -43,5 +43,5 @@ void breaks_move_to_line(const char* file, int line_from, int line_to); break_state breaks_get_state(const char* file, int line); GList* breaks_get_for_document(const char* file); -GList* breaks_get_all(); +GList* breaks_get_all(void); breakpoint* breaks_lookup_breakpoint(const gchar* file, int line); Modified: debugger/src/cell_renderers/cellrendererbreakicon.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -449,7 +449,7 @@ GType cell_renderer_break_icon_get_type(void) /* * creates new renderer */ -GtkCellRenderer* cell_renderer_break_icon_new() +GtkCellRenderer* cell_renderer_break_icon_new(void) { return g_object_new(TYPE_CELL_RENDERER_BREAK_ICON, NULL); } Modified: debugger/src/cell_renderers/cellrendererframeicon.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -349,7 +349,7 @@ GType cell_renderer_frame_icon_get_type(void) /* * creates new renderer */ -GtkCellRenderer* cell_renderer_frame_icon_new() +GtkCellRenderer* cell_renderer_frame_icon_new(void) { return g_object_new(TYPE_CELL_RENDERER_FRAME_ICON, NULL); } Modified: debugger/src/cell_renderers/cellrenderertoggle.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -100,7 +100,7 @@ GType cell_renderer_toggle_get_type(void) /* * creates new renderer */ -GtkCellRenderer* cell_renderer_toggle_new() +GtkCellRenderer* cell_renderer_toggle_new(void) { return g_object_new(TYPE_CELL_RENDERER_TOGGLE, NULL); } Modified: debugger/src/dbm_gdb.c 42 files changed, 21 insertions(+), 21 deletions(-) =================================================================== @@ -122,11 +122,11 @@ enum sr { static int active_frame = 0; /* forward declarations */ -void stop(); +void stop(void); variable* add_watch(gchar* expression); -void update_watches(); -void update_autos(); -void update_files(); +void update_watches(void); +void update_autos(void); +void update_files(void); /* * print message using color, based on message type @@ -200,7 +200,7 @@ static void on_gdb_exit(GPid pid, gint status, gpointer data) /* * reads gdb_out until "(gdb)" prompt met */ -static GList* read_until_prompt() +static GList* read_until_prompt(void) { GList *lines = NULL; @@ -406,7 +406,7 @@ static gboolean on_read_async_output(GIOChannel * src, GIOCondition cond, gpoint * asyncronous gdb output reader * looks for a stopped event, then notifies "debug" module and removes async handler */ -enum dbs debug_get_state(); +enum dbs debug_get_state(void); static gboolean on_read_from_gdb(GIOChannel * src, GIOCondition cond, gpointer data) { gchar *line; @@ -881,7 +881,7 @@ void restart(char* terminal_device) /* * stops GDB */ -void stop() +void stop(void) { exec_sync_command("-gdb-exit", FALSE, NULL); } @@ -889,7 +889,7 @@ void stop() /* * resumes GDB */ -void resume() +void resume(void) { exec_async_command("-exec-continue"); } @@ -897,7 +897,7 @@ void resume() /* * step over */ -void step_over() +void step_over(void) { exec_async_command("-exec-next"); } @@ -905,7 +905,7 @@ void step_over() /* * step into */ -void step_into() +void step_into(void) { exec_async_command("-exec-step"); } @@ -913,7 +913,7 @@ void step_into() /* * step out */ -void step_out() +void step_out(void) { exec_async_command("-exec-finish"); } @@ -1060,7 +1060,7 @@ gboolean remove_break(breakpoint* bp) /* * get active frame */ -int get_active_frame() +int get_active_frame(void) { return active_frame; } @@ -1083,7 +1083,7 @@ void set_active_frame(int frame_number) /* * gets stack */ -GList* get_stack() +GList* get_stack(void) { gchar* record = NULL; result_class rc = exec_sync_command("-stack-list-frames", TRUE, &record); @@ -1374,7 +1374,7 @@ void get_variables (GList *vars) /* * updates files list */ -void update_files() +void update_files(void) { if (files) { @@ -1409,7 +1409,7 @@ void update_files() /* * updates watches list */ -void update_watches() +void update_watches(void) { gchar command[1000]; @@ -1481,7 +1481,7 @@ void update_watches() /* * updates autos list */ -void update_autos() +void update_autos(void) { gchar command[1000]; @@ -1562,7 +1562,7 @@ void update_autos() /* * get autos list */ -GList* get_autos () +GList* get_autos (void) { return g_list_copy(autos); } @@ -1570,7 +1570,7 @@ GList* get_autos () /* * get watches list */ -GList* get_watches () +GList* get_watches (void) { return g_list_copy(watches); } @@ -1578,7 +1578,7 @@ GList* get_watches () /* * get files list */ -GList* get_files () +GList* get_files (void) { return g_list_copy(files); } @@ -1731,7 +1731,7 @@ gchar *evaluate_expression(gchar *expression) /* * request GDB interrupt */ -gboolean request_interrupt() +gboolean request_interrupt(void) { #ifdef DEBUG_OUTPUT char msg[1000]; @@ -1748,7 +1748,7 @@ gboolean request_interrupt() /* * get GDB error messages */ -gchar* error_message() +gchar* error_message(void) { return err_message; } Modified: debugger/src/dconfig.c 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -324,7 +324,7 @@ static gpointer saving_thread_func(gpointer data) /* * set "debug changed" flag to save it on "saving_thread" thread */ -void config_set_debug_changed() +void config_set_debug_changed(void) { if (!debug_config_loading) { @@ -437,7 +437,7 @@ void config_set_panel_defaults(GKeyFile *keyfile) /* * initialize */ -void config_init() +void config_init(void) { /* read config */ gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, geany_data->app->configdir, "plugins", "debugger", NULL); @@ -463,7 +463,7 @@ void config_init() /* * destroy */ -void config_destroy() +void config_destroy(void) { g_cond_signal(cond); /* ??? g_thread_join(saving_thread); */ @@ -484,12 +484,12 @@ void config_destroy() * config parts getters */ /* saving option */ -gboolean config_get_save_to_project() +gboolean config_get_save_to_project(void) { return g_key_file_get_boolean(keyfile_plugin, "saving_settings", "save_to_project", NULL); } /* panel config */ -gboolean config_get_tabbed() +gboolean config_get_tabbed(void) { return g_key_file_get_boolean(keyfile_plugin, "tabbed_mode", "enabled", NULL); } @@ -497,7 +497,7 @@ int* config_get_tabs(gsize *length) { return g_key_file_get_integer_list(keyfile_plugin, "one_panel_mode", "tabs", length, NULL); } -int config_get_selected_tab_index() +int config_get_selected_tab_index(void) { return g_key_file_get_integer(keyfile_plugin, "one_panel_mode", "selected_tab_index", NULL); } @@ -505,7 +505,7 @@ int* config_get_left_tabs(gsize *length) { return g_key_file_get_integer_list(keyfile_plugin, "two_panels_mode", "left_tabs", length, NULL); } -int config_get_left_selected_tab_index() +int config_get_left_selected_tab_index(void) { return g_key_file_get_integer(keyfile_plugin, "two_panels_mode", "left_selected_tab_index", NULL); } @@ -513,7 +513,7 @@ int* config_get_right_tabs(gsize *length) { return g_key_file_get_integer_list(keyfile_plugin, "two_panels_mode", "right_tabs", length, NULL); } -int config_get_right_selected_tab_index() +int config_get_right_selected_tab_index(void) { return g_key_file_get_integer(keyfile_plugin, "two_panels_mode", "right_selected_tab_index", NULL); } @@ -549,7 +549,7 @@ void config_set_debug_store(debug_store store) /* * updates keyfile_project from a current geany project path */ -void config_update_project_keyfile() +void config_update_project_keyfile(void) { if (keyfile_project) { Modified: debugger/src/dconfig.h 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -37,31 +37,31 @@ } debug_store; -void config_init(); -void config_destroy(); +void config_init(void); +void config_destroy(void); void config_set_panel(int config_part, gpointer config_value, ...); -gboolean config_get_save_to_project(); +gboolean config_get_save_to_project(void); -gboolean config_get_tabbed(); +gboolean config_get_tabbed(void); int* config_get_tabs(gsize *length); -int config_get_selected_tab_index(); +int config_get_selected_tab_index(void); int* config_get_left_tabs(gsize *length); -int config_get_left_selected_tab_index(); +int config_get_left_selected_tab_index(void); int* config_get_right_tabs(gsize *length); -int config_get_right_selected_tab_index(); +int config_get_right_selected_tab_index(void); -void config_set_debug_changed(); +void config_set_debug_changed(void); void config_set_debug_store(debug_store store); void config_on_project_open(GObject *obj, GKeyFile *config, gpointer user_data); void config_on_project_close(GObject *obj, gpointer user_data); void config_on_project_save(GObject *obj, GKeyFile *config, gpointer user_data); -void config_update_project_keyfile(); +void config_update_project_keyfile(void); GtkWidget *config_plugin_configure(GtkDialog *dialog); Modified: debugger/src/debug.c 40 files changed, 20 insertions(+), 20 deletions(-) =================================================================== @@ -153,7 +153,7 @@ /* * remove stack margin markers */ - void remove_stack_markers() + void remove_stack_markers(void) { int active_frame_index = active_module->get_active_frame(); @@ -182,7 +182,7 @@ /* * add stack margin markers */ -static void add_stack_markers() +static void add_stack_markers(void) { int active_frame_index = active_module->get_active_frame(); @@ -605,7 +605,7 @@ static void enable_sensitive_widgets(gboolean enable) /* * called from debug module when debugger is being run */ -static void on_debugger_run () +static void on_debugger_run (void) { /* update debug state */ debug_state = DBS_RUNNING; @@ -848,7 +848,7 @@ void on_debugger_message (const gchar* message, const gchar *color) /* * called from debugger module to clear messages tab */ -static void on_debugger_messages_clear () +static void on_debugger_messages_clear (void) { /* clear debug messages window */ GtkTextIter start, end; @@ -928,7 +928,7 @@ static void on_select_frame(int frame_number) * init debug related GUI (watch tree view) * arguments: */ -void debug_init() +void debug_init(void) { /* create watch page */ wtree = wtree_init(on_watch_expanded_callback, @@ -1025,7 +1025,7 @@ void debug_init() /* * called when plugin is being unloaded to remove current instruction marker */ -void debug_destroy() +void debug_destroy(void) { /* close PTY file descriptors */ close(pty_master); @@ -1046,7 +1046,7 @@ void debug_destroy() /* * gets current debug state */ -enum dbs debug_get_state() +enum dbs debug_get_state(void) { return debug_state; } @@ -1054,7 +1054,7 @@ enum dbs debug_get_state() /* * gets current stack frames lisy */ -GList* debug_get_stack() +GList* debug_get_stack(void) { return stack; } @@ -1080,7 +1080,7 @@ int debug_get_module_index(const gchar *modulename) /* * gets GList with all debug modules pointers */ -GList* debug_get_modules() +GList* debug_get_modules(void) { GList *mods = NULL; module_description *desc = modules; @@ -1096,7 +1096,7 @@ GList* debug_get_modules() /* * checks whether currently active debug module supports asyncronous breaks */ -gboolean debug_supports_async_breaks() +gboolean debug_supports_async_breaks(void) { return active_module->features & MF_ASYNC_BREAKS; } @@ -1104,7 +1104,7 @@ gboolean debug_supports_async_breaks() /* * starts or continues debug process */ -void debug_run() +void debug_run(void) { if (DBS_IDLE == debug_state) { @@ -1157,7 +1157,7 @@ void debug_run() /* * restarts debug process */ -void debug_restart() +void debug_restart(void) { if (DBS_STOPPED == debug_state) { @@ -1171,7 +1171,7 @@ void debug_restart() /* * stops debug process */ -void debug_stop() +void debug_stop(void) { if (DBS_STOPPED == debug_state) { @@ -1190,7 +1190,7 @@ void debug_stop() /* * step over */ -void debug_step_over() +void debug_step_over(void) { if (DBS_STOPPED == debug_state) active_module->step_over(); @@ -1199,7 +1199,7 @@ void debug_step_over() /* * step into */ -void debug_step_into() +void debug_step_into(void) { if (DBS_STOPPED == debug_state) active_module->step_into(); @@ -1208,7 +1208,7 @@ void debug_step_into() /* * step out */ -void debug_step_out() +void debug_step_out(void) { if (DBS_STOPPED == debug_state) active_module->step_out(); @@ -1271,7 +1271,7 @@ void debug_request_interrupt(bs_callback cb, gpointer data) /* * gets debug modules error message */ -gchar* debug_error_message() +gchar* debug_error_message(void) { return active_module->error_message(); } @@ -1340,7 +1340,7 @@ gchar* debug_get_calltip_for_expression(gchar* expression) * check whether source for the current instruction * is avaiable */ -gboolean debug_current_instruction_have_sources() +gboolean debug_current_instruction_have_sources(void) { frame *current = (frame*)stack->data; return current->have_source ? strlen(current->file) : 0; @@ -1349,7 +1349,7 @@ gboolean debug_current_instruction_have_sources() /* * opens position according to the current instruction */ -void debug_jump_to_current_instruction() +void debug_jump_to_current_instruction(void) { frame *current = (frame*)stack->data; editor_open_position(current->file, current->line); @@ -1369,7 +1369,7 @@ void debug_on_file_open(GeanyDocument *doc) /* * get active frame index */ -int debug_get_active_frame() +int debug_get_active_frame(void) { return active_module->get_active_frame(); } Modified: debugger/src/debug.h 32 files changed, 16 insertions(+), 16 deletions(-) =================================================================== @@ -25,28 +25,28 @@ /* function type to execute on interrupt */ typedef void (*bs_callback)(gpointer); -void debug_init(); -enum dbs debug_get_state(); -void debug_run(); -void debug_stop(); -void debug_step_over(); -void debug_step_into(); -void debug_step_out(); +void debug_init(void); +enum dbs debug_get_state(void); +void debug_run(void); +void debug_stop(void); +void debug_step_over(void); +void debug_step_into(void); +void debug_step_out(void); void debug_execute_until(const gchar *file, int line); gboolean debug_set_break(breakpoint* bp, break_set_activity bsa); gboolean debug_remove_break(breakpoint* bp); void debug_request_interrupt(bs_callback cb, gpointer data); -gchar* debug_error_message(); -GList* debug_get_modules(); +gchar* debug_error_message(void); +GList* debug_get_modules(void); int debug_get_module_index(const gchar *modulename); -gboolean debug_supports_async_breaks(); -void debug_destroy(); +gboolean debug_supports_async_breaks(void); +void debug_destroy(void); gchar* debug_evaluate_expression(gchar *expression); -gboolean debug_current_instruction_have_sources(); -void debug_jump_to_current_instruction(); +gboolean debug_current_instruction_have_sources(void); +void debug_jump_to_current_instruction(void); void debug_on_file_open(GeanyDocument *doc); gchar* debug_get_calltip_for_expression(gchar* expression); -GList* debug_get_stack(); -void debug_restart(); -int debug_get_active_frame(); +GList* debug_get_stack(void); +void debug_restart(void); +int debug_get_active_frame(void); Modified: debugger/src/debug_module.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -77,7 +77,7 @@ void variable_reset(variable *var) } /* creates new frame */ -frame* frame_new() +frame* frame_new(void) { frame *f = (frame*)malloc(sizeof(frame)); memset((void*)f, 0, sizeof(frame)); Modified: debugger/src/debug_module.h 32 files changed, 16 insertions(+), 16 deletions(-) =================================================================== @@ -30,11 +30,11 @@ enum dbs { /* type to hold callbacks to call from debugger modules */ typedef struct _dbg_callbacks { - void (*set_run) (); + void (*set_run) (void); void (*set_stopped) (int thread_id); void (*set_exited) (int code); void (*send_message) (const gchar* message, const gchar *color); - void (*clear_messages) (); + void (*clear_messages) (void); void (*report_error) (const gchar* message); void (*add_thread) (int thread_id); void (*remove_thread) (int thread_id); @@ -98,26 +98,26 @@ enum dbs { typedef struct _dbg_module { gboolean (*run) (const gchar* target, const gchar* commandline, GList* env, GList *witer, GList *biter, const gchar* terminal_device, dbg_callbacks* callbacks); - void (*restart) (); - void (*stop) (); - void (*resume) (); - void (*step_over) (); - void (*step_into) (); - void (*step_out) (); + void (*restart) (void); + void (*stop) (void); + void (*resume) (void); + void (*step_over) (void); + void (*step_into) (void); + void (*step_out) (void); void (*execute_until)(const gchar *file, int line); gboolean (*set_break) (breakpoint* bp, break_set_activity bsa); gboolean (*remove_break) (breakpoint* bp); - GList* (*get_stack) (); + GList* (*get_stack) (void); void (*set_active_frame)(int frame_number); - int (*get_active_frame)(); + int (*get_active_frame)(void); - GList* (*get_autos) (); - GList* (*get_watches) (); + GList* (*get_autos) (void); + GList* (*get_watches) (void); - GList* (*get_files) (); + GList* (*get_files) (void); GList* (*get_children) (gchar* path); variable* (*add_watch)(gchar* expression); @@ -125,8 +125,8 @@ enum dbs { gchar* (*evaluate_expression)(gchar *expression); - gboolean (*request_interrupt) (); - gchar* (*error_message) (); + gboolean (*request_interrupt) (void); + gchar* (*error_message) (void); module_features features; } dbg_module; @@ -163,5 +163,5 @@ enum dbs { variable* variable_new2(gchar *name, gchar *internal, variable_type vt); void variable_reset(variable *var); -frame* frame_new(); +frame* frame_new(void); void frame_free(frame* f); Modified: debugger/src/dpaned.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -269,7 +269,7 @@ static gboolean on_change_current_page(GtkNotebook *notebook, gpointer arg1, gui /* * create GUI and check config */ -void dpaned_init() +void dpaned_init(void) { /* create paned */ hpaned = gtk_hpaned_new(); @@ -356,7 +356,7 @@ void dpaned_init() /* * free local data, disconnect signals */ -void dpaned_destroy() +void dpaned_destroy(void) { DISCONNECT_PAGE_SIGNALS(); } @@ -364,7 +364,7 @@ void dpaned_destroy() /* * gets widget */ -GtkWidget* dpaned_get_paned() +GtkWidget* dpaned_get_paned(void) { return hpaned; } Modified: debugger/src/dpaned.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -20,7 +20,7 @@ * MA 02110-1301, USA. */ -void dpaned_init(); -void dpaned_destroy(); -GtkWidget* dpaned_get_paned(); +void dpaned_init(void); +void dpaned_destroy(void); +GtkWidget* dpaned_get_paned(void); void dpaned_set_tabbed(gboolean paned); Modified: debugger/src/envtree.c 12 files changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -72,7 +72,7 @@ enum /* * adds empty row to env tree view */ -static void add_empty_row() +static void add_empty_row(void) { if (empty_row) gtk_tree_row_reference_free(empty_row); @@ -93,7 +93,7 @@ static void add_empty_row() /* * delete selected rows from env variables page */ -static void delete_selected_rows() +static void delete_selected_rows(void) { /* path to select after deleting finishes */ GtkTreeRowReference *reference_to_select = NULL; @@ -390,7 +390,7 @@ static void on_name_changed(GtkCellRendererText *renderer, gchar *path, gchar *n /* * create env tree view and return a widget */ -GtkWidget* envtree_init() +GtkWidget* envtree_init(void) { store = gtk_list_store_new ( N_COLUMNS, @@ -438,7 +438,7 @@ GtkWidget* envtree_init() /* * deallocate data */ -void envtree_destroy() +void envtree_destroy(void) { gtk_tree_row_reference_free(empty_row); } @@ -446,7 +446,7 @@ void envtree_destroy() /* * clear tree */ -void envtree_clear() +void envtree_clear(void) { gtk_list_store_clear(store); add_empty_row(); @@ -455,7 +455,7 @@ void envtree_clear() /* * get list of environment variables */ -GList* envpage_get_environment() +GList* envpage_get_environment(void) { GList *env = NULL; Modified: debugger/src/envtree.h 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -19,9 +19,9 @@ * MA 02110-1301, USA. */ -GtkWidget* envtree_init(); -void envtree_destroy(); -void envtree_clear(); +GtkWidget* envtree_init(void); +void envtree_destroy(void); +void envtree_clear(void); void envtree_set_readonly(gboolean readonly); void envtree_add_environment(const gchar *name, const gchar *value); -GList* envpage_get_environment(); +GList* envpage_get_environment(void); Modified: debugger/src/keys.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -61,7 +61,7 @@ /* * init hotkeys */ -gboolean keys_init() +gboolean keys_init(void) { /* keys count */ int count = 0; Modified: debugger/src/keys.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -33,4 +33,4 @@ enum KEYS KEY_CURRENT_INSTRUCTION }; -gboolean keys_init(); +gboolean keys_init(void); Modified: debugger/src/markers.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -94,7 +94,7 @@ void markers_set_for_document(ScintillaObject *sci) /* * inits markers staff */ -void markers_init() +void markers_init(void) { /* set markers in all currently opened documents */ int i; Modified: debugger/src/markers.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -19,7 +19,7 @@ * MA 02110-1301, USA. */ -void markers_init(); +void markers_init(void); void markers_set_for_document(ScintillaObject *sci); void markers_add_breakpoint(breakpoint* bp); void markers_remove_breakpoint(breakpoint* bp); Modified: debugger/src/pixbuf.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -50,7 +50,7 @@ /* * create pixbuffers */ -void pixbufs_init() +void pixbufs_init(void) { break_pixbuf = gdk_pixbuf_new_from_xpm_data(breakpoint_xpm); break_disabled_pixbuf = gdk_pixbuf_new_from_xpm_data(breakpoint_disabled_xpm); @@ -67,7 +67,7 @@ void pixbufs_init() /* * free pixbuffers */ -void pixbufs_destroy() +void pixbufs_destroy(void) { g_object_unref(break_pixbuf); g_object_unref(break_disabled_pixbuf); Modified: debugger/src/pixbuf.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -30,5 +30,5 @@ extern GdkPixbuf *frame_pixbuf; extern GdkPixbuf *frame_current_pixbuf; -void pixbufs_init(); -void pixbufs_destroy(); +void pixbufs_init(void); +void pixbufs_destroy(void); Modified: debugger/src/stree.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -431,7 +431,7 @@ void stree_add(frame *f) /* * clear tree view completely */ -void stree_clear() +void stree_clear(void) { gtk_tree_store_clear(store); g_hash_table_remove_all(threads); @@ -470,7 +470,7 @@ void stree_select_first_frame(gboolean make_active) /* * called on plugin exit to free module data */ -void stree_destroy() +void stree_destroy(void) { if (threads) { @@ -548,7 +548,7 @@ void stree_remove_thread(int thread_id) /* * remove all frames */ -void stree_remove_frames() +void stree_remove_frames(void) { GtkTreeRowReference *reference = (GtkTreeRowReference*)g_hash_table_lookup(threads, (gpointer)active_thread_id); GtkTreeIter thread_iter; Modified: debugger/src/stree.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -20,15 +20,15 @@ */ GtkWidget* stree_init(move_to_line_cb ml, select_frame_cb sf); -void stree_destroy(); +void stree_destroy(void); void stree_add(frame *f); -void stree_clear(); +void stree_clear(void); void stree_add_thread(int thread_id); void stree_remove_thread(int thread_id); void stree_select_first_frame(gboolean make_active); -void stree_remove_frames(); +void stree_remove_frames(void); void stree_set_active_thread_id(int thread_id); Modified: debugger/src/tpage.c 16 files changed, 8 insertions(+), 8 deletions(-) =================================================================== @@ -232,7 +232,7 @@ void tpage_pack_widgets(gboolean tabbed) /* * create widgets */ -static void tpage_create_widgets() +static void tpage_create_widgets(void) { /* target */ target_label = gtk_label_new(_("Target:")); @@ -316,7 +316,7 @@ void tpage_add_environment(const gchar *name, const gchar *value) /* * removes all data (clears widgets) */ -void tpage_clear() +void tpage_clear(void) { /* target */ gtk_entry_set_text(GTK_ENTRY(target_name), ""); @@ -335,7 +335,7 @@ void tpage_clear() /* * get target file names */ -gchar* tpage_get_target() +gchar* tpage_get_target(void) { return g_strdup(gtk_entry_get_text(GTK_ENTRY(target_name))); } @@ -343,7 +343,7 @@ gchar* tpage_get_target() /* * get selected debugger module index */ -int tpage_get_debug_module_index() +int tpage_get_debug_module_index(void) { return gtk_combo_box_get_active(GTK_COMBO_BOX(debugger_cmb)); } @@ -351,7 +351,7 @@ int tpage_get_debug_module_index() /* * get selected debugger name */ -gchar* tpage_get_debugger() +gchar* tpage_get_debugger(void) { return gtk_combo_box_get_active_text(GTK_COMBO_BOX(debugger_cmb)); } @@ -359,7 +359,7 @@ gchar* tpage_get_debugger() /* * get command line */ -gchar* tpage_get_commandline() +gchar* tpage_get_commandline(void) { GtkTextIter start, end; GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(args_textview)); @@ -379,7 +379,7 @@ gchar* tpage_get_commandline() /* * get list of environment variables */ -GList* tpage_get_environment() +GList* tpage_get_environment(void) { return envpage_get_environment(); } @@ -387,7 +387,7 @@ GList* tpage_get_environment() /* * create target page */ -void tpage_init() +void tpage_init(void) { tab_target = gtk_vbox_new(FALSE, 0); tpage_create_widgets(); Modified: debugger/src/tpage.h 14 files changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -19,24 +19,24 @@ * MA 02110-1301, USA. */ -void tpage_init(); +void tpage_init(void); -gchar* tpage_get_target(); +gchar* tpage_get_target(void); void tpage_set_target(const gchar *newvalue); -gchar* tpage_get_debugger(); +gchar* tpage_get_debugger(void); void tpage_set_debugger(const gchar *newvalue); -int tpage_get_debug_module_index(); +int tpage_get_debug_module_index(void); -gchar* tpage_get_commandline(); +gchar* tpage_get_commandline(void); void tpage_set_commandline(const gchar *newvalue); -GList* tpage_get_environment(); +GList* tpage_get_environment(void); void tpage_add_environment(const gchar *name, const gchar *value); void tpage_set_readonly(gboolean readonly); -void tpage_clear(); +void tpage_clear(void); void tpage_pack_widgets(gboolean tabbed); Modified: debugger/src/wtree.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -53,7 +53,7 @@ enum /* * add empty row */ -static void add_empty_row() +static void add_empty_row(void) { if (empty_row) gtk_tree_row_reference_free(empty_row); @@ -96,7 +96,7 @@ static void on_render_name(GtkTreeViewColumn *tree_column, /* * get iterator to an empty row */ -GtkTreeIter wtree_empty_row() +GtkTreeIter wtree_empty_row(void) { GtkTreeIter empty; @@ -112,7 +112,7 @@ GtkTreeIter wtree_empty_row() /* * get an empty row path */ -GtkTreePath* wtree_empty_path() +GtkTreePath* wtree_empty_path(void) { return gtk_tree_row_reference_get_path(empty_row); } @@ -178,7 +178,7 @@ GtkWidget* wtree_init(watch_expanded_callback expanded, /* * get watches list */ -GList *wtree_get_watches() +GList *wtree_get_watches(void) { GList *watches = NULL; gtk_tree_model_foreach(gtk_tree_view_get_model(GTK_TREE_VIEW(tree)), watches_foreach_collect, &watches); @@ -189,7 +189,7 @@ GList *wtree_get_watches() /* * remove all watches from the tree view */ -void wtree_remove_all() +void wtree_remove_all(void) { gtk_tree_store_clear(store); add_empty_row(); Modified: debugger/src/wtree.h 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -24,10 +24,10 @@ GtkWidget* wtree_init(watch_expanded_callback expanded, watch_key_pressed keypressed, watch_expression_changed changed, watch_button_pressed buttonpressed); -GtkTreeIter wtree_empty_row(); -GtkTreePath* wtree_empty_path(); -GList* wtree_get_watches(); -void wtree_remove_all(); +GtkTreeIter wtree_empty_row(void); +GtkTreePath* wtree_empty_path(void); +GList* wtree_get_watches(void); +void wtree_remove_all(void); void wtree_add_watch(gchar *watch); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 86f0d9: debugger: Add header guards
by Colomban Wendling
08 Jun '12
08 Jun '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Fri, 08 Jun 2012 16:37:19 Commit: 86f0d94e71d1d92e419aa66bb70c67c40dc5243b
https://github.com/geany/geany-plugins/commit/86f0d94e71d1d92e419aa66bb70c6…
Log Message: ----------- debugger: Add header guards Modified Paths: -------------- debugger/src/atree.h debugger/src/bptree.h debugger/src/breakpoint.h debugger/src/breakpoints.h debugger/src/btnpanel.h debugger/src/callbacks.h debugger/src/calltip.h debugger/src/dconfig.h debugger/src/debug.h debugger/src/debug_module.h debugger/src/dpaned.h debugger/src/envtree.h debugger/src/gui.h debugger/src/keys.h debugger/src/markers.h debugger/src/pixbuf.h debugger/src/stree.h debugger/src/tabs.h debugger/src/tpage.h debugger/src/utils.h debugger/src/vtree.h debugger/src/watch_model.h debugger/src/wtree.h Modified: debugger/src/atree.h 6 files changed, 5 insertions(+), 1 deletions(-) =================================================================== @@ -18,6 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef ATREE_H +#define ATREE_H + GtkWidget* atree_init(watch_expanded_callback expanded, watch_button_pressed buttonpressed); +#endif /* guard */ Modified: debugger/src/bptree.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef BPTREE_H +#define BPTREE_H + gboolean bptree_init(move_to_line_cb callback); void bptree_destroy(void); void bptree_add_breakpoint(breakpoint* bp); @@ -30,3 +33,5 @@ gchar* bptree_get_condition(breakpoint* bp); void bptree_set_readonly(gboolean readonly); void bptree_update_file_nodes(void); + +#endif /* guard */ Modified: debugger/src/breakpoint.h 7 files changed, 6 insertions(+), 1 deletions(-) =================================================================== @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef BREAKPOINT_H +#define BREAKPOINT_H + /* maximum condition length */ #define CONDITION_MAX_LENGTH 1024 @@ -34,3 +37,5 @@ breakpoint* break_new(void); breakpoint* break_new_full(const char* file, int line, const char* condition, int enabled, int hitscount); + +#endif /* guard */ Modified: debugger/src/breakpoints.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef BREAKPOINTS_H +#define BREAKPOINTS_H + #include "breakpoint.h" typedef enum _break_state { @@ -45,3 +48,5 @@ GList* breaks_get_for_document(const char* file); GList* breaks_get_all(void); breakpoint* breaks_lookup_breakpoint(const gchar* file, int line); + +#endif /* guard */ Modified: debugger/src/btnpanel.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,7 +19,12 @@ * MA 02110-1301, USA. */ +#ifndef BTNPANEL_H +#define BTNPANEL_H + typedef void (*on_toggle)(GtkToggleButton *button, gpointer user_data); GtkWidget* btnpanel_create(on_toggle cb); void btnpanel_set_debug_state(enum dbs state); + +#endif /* guard */ Modified: debugger/src/callbacks.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,8 +19,13 @@ * MA 02110-1301, USA. */ +#ifndef CALLBACKS_H +#define CALLBACKS_H + void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data); void on_document_save(GObject *obj, GeanyDocument *doc, gpointer user_data); void on_document_before_save(GObject *obj, GeanyDocument *doc, gpointer user_data); gboolean on_editor_notify(GObject *object, GeanyEditor *editor, SCNotification *nt, gpointer data); gboolean keys_callback(guint key_id); + +#endif /* guard */ Modified: debugger/src/calltip.h 7 files changed, 6 insertions(+), 1 deletions(-) =================================================================== @@ -18,8 +18,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef CALLTIP_H +#define CALLTIP_H + #define MAX_CALLTIP_LENGTH 140 #define MAX_CALLTIP_HEIGHT 20 GString* get_calltip_line(variable *var, gboolean firstline); + +#endif /* guard */ Modified: debugger/src/dconfig.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef DCOFIG_H +#define DCOFIG_H + #include <stdarg.h> /* panel config parts */ @@ -65,3 +68,5 @@ void config_update_project_keyfile(void); GtkWidget *config_plugin_configure(GtkDialog *dialog); + +#endif /* guard */ Modified: debugger/src/debug.h 6 files changed, 5 insertions(+), 1 deletions(-) =================================================================== @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef DEBUG_H +#define DEBUG_H + #include "debug_module.h" #include "markers.h" @@ -50,3 +53,4 @@ void debug_restart(void); int debug_get_active_frame(void); +#endif /* guard */ Modified: debugger/src/debug_module.h 7 files changed, 6 insertions(+), 1 deletions(-) =================================================================== @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef DEBUG_MODULE_H +#define DEBUG_MODULE_H + /* debug states enumeration */ enum dbs { DBS_IDLE, @@ -165,3 +168,5 @@ enum dbs { frame* frame_new(void); void frame_free(frame* f); + +#endif /* guard */ Modified: debugger/src/dpaned.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -20,7 +20,12 @@ * MA 02110-1301, USA. */ +#ifndef DPANED_H +#define DPANED_H + void dpaned_init(void); void dpaned_destroy(void); GtkWidget* dpaned_get_paned(void); void dpaned_set_tabbed(gboolean paned); + +#endif /* guard */ Modified: debugger/src/envtree.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,9 +19,14 @@ * MA 02110-1301, USA. */ +#ifndef ENVTREE_H +#define ENVTREE_H + GtkWidget* envtree_init(void); void envtree_destroy(void); void envtree_clear(void); void envtree_set_readonly(gboolean readonly); void envtree_add_environment(const gchar *name, const gchar *value); GList* envpage_get_environment(void); + +#endif /* guard */ Modified: debugger/src/gui.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,8 +19,13 @@ * MA 02110-1301, USA. */ +#ifndef GUI_H +#define GUI_H + GtkWidget* create_button(const gchar *icon, const gchar *tooltip); GtkWidget* create_stock_button(const gchar *stockid, const gchar *tooltip); GtkWidget* create_toggle_button(const gchar *stockid, const gchar *tooltip); void set_button_image(GtkWidget *btn, const gchar *icon); + +#endif /* guard */ Modified: debugger/src/keys.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef KEYS_H +#define KEYS_H + /* hotkeys enumeration */ enum KEYS { @@ -34,3 +37,5 @@ enum KEYS }; gboolean keys_init(void); + +#endif /* guard */ Modified: debugger/src/markers.h 7 files changed, 5 insertions(+), 2 deletions(-) =================================================================== @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef MARKERS_H +#define MARKERS_H + void markers_init(void); void markers_set_for_document(ScintillaObject *sci); void markers_add_breakpoint(breakpoint* bp); @@ -29,4 +32,4 @@ void markers_remove_frame(char* file, int line); void markers_remove_all(GeanyDocument *doc); - +#endif /* guard */ Modified: debugger/src/pixbuf.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef PIXBUF_H +#define PIXBUF_H + extern GdkPixbuf *break_pixbuf; extern GdkPixbuf *break_disabled_pixbuf; extern GdkPixbuf *break_condition_pixbuf; @@ -32,3 +35,5 @@ void pixbufs_init(void); void pixbufs_destroy(void); + +#endif /* guard */ Modified: debugger/src/stree.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef STREE_H +#define STREE_H + GtkWidget* stree_init(move_to_line_cb ml, select_frame_cb sf); void stree_destroy(void); @@ -32,3 +35,5 @@ void stree_remove_frames(void); void stree_set_active_thread_id(int thread_id); + +#endif /* guard */ Modified: debugger/src/tabs.h 4 files changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -20,6 +20,9 @@ * MA 02110-1301, USA. */ +#ifndef TABS_H +#define TABS_H + typedef enum _tab_id { TID_TARGET, @@ -43,3 +46,4 @@ tab_id tabs_get_tab_id(GtkWidget* tab); const gchar* tabs_get_label(tab_id id); +#endif /* guard */ Modified: debugger/src/tpage.h 4 files changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef TPAGE_H +#define TPAGE_H + void tpage_init(void); gchar* tpage_get_target(void); @@ -40,3 +43,4 @@ void tpage_pack_widgets(gboolean tabbed); +#endif /* guard */ Modified: debugger/src/utils.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -18,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ + +#ifndef UTILS_H +#define UTILS_H void editor_open_position(const char* file, int line); GString* get_word_at_position(ScintillaObject *sci, int position); + +#endif /* guard */ Modified: debugger/src/vtree.h 8 files changed, 6 insertions(+), 2 deletions(-) =================================================================== @@ -18,6 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - - GtkWidget* vtree_create(watch_render_name on_render_name, watch_expression_changed on_expression_changed); +#ifndef VTREE_H +#define VTREE_H + +GtkWidget* vtree_create(watch_render_name on_render_name, watch_expression_changed on_expression_changed); + +#endif /* guard */ Modified: debugger/src/watch_model.h 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,9 @@ * MA 02110-1301, USA. */ +#ifndef WATCH_MODEL_H +#define WATCH_MODEL_H + /* tree view columns */ enum { @@ -49,3 +52,5 @@ enum void free_variables_list(GList *vars); void variable_set_name_only(GtkTreeStore *store, GtkTreeIter *iter, gchar *name); void expand_stub(GtkTreeView *tree, GtkTreeIter *parent, GList *vars); + +#endif /* guard */ Modified: debugger/src/wtree.h 7 files changed, 5 insertions(+), 2 deletions(-) =================================================================== @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +#ifndef WTREE_H +#define WTREE_H + GtkWidget* wtree_init(watch_expanded_callback expanded, new_watch_dragged dragged, watch_key_pressed keypressed, @@ -30,4 +33,4 @@ GtkWidget* wtree_init(watch_expanded_callback expanded, void wtree_remove_all(void); void wtree_add_watch(gchar *watch); - +#endif /* guard */ @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
10
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
Results per page:
10
25
50
100
200