[geany/geany-plugins] 517cd1: Merge pull request #38 from b4n/fixes/geanygdb
Dominic Hopf
git-noreply at xxxxx
Sat Jun 9 19:09:26 UTC 2012
Branch: refs/heads/master
Author: Dominic Hopf <dmaphy at googlemail.com>
Committer: Dominic Hopf <dmaphy at googlemail.com>
Date: Sat, 09 Jun 2012 19:09:26
Commit: 517cd106a18bb1f281b3d6c4ecd97274a4a7840c
https://github.com/geany/geany-plugins/commit/517cd106a18bb1f281b3d6c4ecd97274a4a7840c
Log Message:
-----------
Merge pull request #38 from b4n/fixes/geanygdb
Various and small geanygdb fixes
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-break.c
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
geanygdb/src/geanygdb.c
Modified: geanygdb/src/gdb-io-break.c
13 files changed, 10 insertions(+), 3 deletions(-)
===================================================================
@@ -33,7 +33,7 @@
static void
-free_breakpoint_list()
+free_breakpoint_list(void)
{
GSList *p;
for (p = breakpoint_list; p; p = p->next)
@@ -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-envir.c
8 files changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -33,7 +33,7 @@
static void
-free_env_info()
+free_env_info(void)
{
g_free(env_info.cwd);
g_free(env_info.path);
@@ -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
26 files changed, 13 insertions(+), 13 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;
@@ -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;
@@ -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);
}
@@ -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
@@ -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,11 +426,11 @@ static gint qlen(GQueue*q)
static void
-done_top()
+done_top(void)
{
pop_var();
pop_list();
-// pop_name();
+/* pop_name();*/
pop_func();
}
Modified: geanygdb/src/gdb-io-priv.h
12 files changed, 7 insertions(+), 5 deletions(-)
===================================================================
@@ -54,13 +54,15 @@
*/
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)
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,14 +78,14 @@
-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();
+GPid gdbio_get_target_pid(void);
void gdbio_set_running(gboolean running);
/*
Modified: geanygdb/src/gdb-io-read.c
26 files changed, 12 insertions(+), 14 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
@@ -53,7 +55,7 @@
static void
-free_source_list()
+free_source_list(void)
{
free_string_list(&source_files);
}
@@ -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)
{
@@ -297,7 +293,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 +302,7 @@
{
if (gdbio_setup.step_func)
{
+ gchar *reason = g_strdup(reason_);
gchar *p;
for (p = reason; *p; p++)
{
@@ -315,6 +312,7 @@
}
}
gdbio_setup.step_func(fullname, line, reason);
+ g_free(reason);
}
else
{
@@ -384,14 +382,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",
@@ -621,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;
@@ -798,7 +796,7 @@
void
-gdbio_continue()
+gdbio_continue(void)
{
gdbio_send_cmd("-exec-continue\n");
}
@@ -807,14 +805,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
36 files changed, 17 insertions(+), 19 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;
@@ -265,7 +265,7 @@
static void
-kill_xterm()
+kill_xterm(void)
{
if (xterm_pid)
{
@@ -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
@@ -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)
@@ -742,8 +742,6 @@
-void gdbio_parse_file_list(gint seq, gchar ** list, gchar * resp);
-
static void
load_target(const gchar * exe_name)
{
@@ -789,7 +787,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 +826,7 @@
void
-gdbio_exec_target(gchar * terminal_command)
+gdbio_exec_target(const gchar * terminal_command)
{
if (terminal_command)
{
@@ -862,7 +860,7 @@
GPid
-gdbio_get_target_pid()
+gdbio_get_target_pid(void)
{
return target_pid;
}
Modified: geanygdb/src/gdb-io-stack.c
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -40,7 +40,7 @@
static void
-free_frame_list()
+free_frame_list(void)
{
GSList *p;
for (p = frame_list; p; p = p->next)
@@ -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)
Modified: geanygdb/src/gdb-io.h
34 files changed, 17 insertions(+), 17 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;
@@ -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.
@@ -133,15 +133,15 @@
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 */
-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 */
@@ -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
22 files changed, 11 insertions(+), 11 deletions(-)
===================================================================
@@ -75,11 +75,11 @@
#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;
- 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;
@@ -214,7 +214,7 @@
void
-gdblx_scanner_done()
+gdblx_scanner_done(void)
{
if (scanner)
{
@@ -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
12 files changed, 6 insertions(+), 6 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 */
@@ -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-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
12 files changed, 6 insertions(+), 6 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);
@@ -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),
@@ -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();
@@ -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
20 files changed, 10 insertions(+), 10 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);
}
@@ -130,25 +130,25 @@
} FrameColumn;
-//#define MORE_INFO GTK_STOCK_GO_FORWARD
+/*#define MORE_INFO GTK_STOCK_GO_FORWARD*/
#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"));
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;
}
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;
@@ -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-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
16 files changed, 8 insertions(+), 8 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;
@@ -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)
@@ -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
16 files changed, 8 insertions(+), 8 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);
@@ -71,19 +71,19 @@
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 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);
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);
Modified: geanygdb/src/geanygdb.c
30 files changed, 15 insertions(+), 15 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);
@@ -76,17 +76,17 @@ static void show_compwin()
#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
@@ -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).
More information about the Plugins-Commits
mailing list