summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-02-12 17:39:34 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-02-12 17:39:34 +0000
commitaba6e1257d4ef85e8641ee0f35428ea53a217b03 (patch)
treecc1e920d8aead9f1d43d665484d8b442a4fe0993 /src
parent6d01968259a92cc1a62cb313742b22b5c1178788 (diff)
downloadweechat-aba6e1257d4ef85e8641ee0f35428ea53a217b03.zip
Added "call" option to /key command, added new key function "insert" to insert text on command line (task #6468)
Diffstat (limited to 'src')
-rw-r--r--src/common/backtrace.c2
-rw-r--r--src/common/command.c95
-rw-r--r--src/common/completion.c8
-rw-r--r--src/common/util.c2
-rw-r--r--src/common/weechat.c2
-rw-r--r--src/common/weeconfig.c12
-rw-r--r--src/gui/curses/gui-curses-infobar.c4
-rw-r--r--src/gui/curses/gui-curses-keyboard.c49
-rw-r--r--src/gui/curses/gui-curses-status.c2
-rw-r--r--src/gui/gtk/gui-gtk-infobar.c4
-rw-r--r--src/gui/gtk/gui-gtk-status.c2
-rw-r--r--src/gui/gui-action.c259
-rw-r--r--src/gui/gui-common.c41
-rw-r--r--src/gui/gui-keyboard.c45
-rw-r--r--src/gui/gui-keyboard.h8
-rw-r--r--src/gui/gui.h101
-rw-r--r--src/irc/irc-recv.c86
-rw-r--r--src/irc/irc-send.c76
-rw-r--r--src/plugins/aspell/weechat-aspell.c6
-rw-r--r--src/plugins/charset/weechat-charset.c8
-rw-r--r--src/plugins/plugins-interface.c14
-rw-r--r--src/plugins/plugins.c2
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c78
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c70
-rw-r--r--src/plugins/scripts/python/weechat-python.c71
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c75
-rw-r--r--src/plugins/scripts/weechat-script.c2
27 files changed, 680 insertions, 444 deletions
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index 72feb4f64..140f7f87c 100644
--- a/src/common/backtrace.c
+++ b/src/common/backtrace.c
@@ -136,7 +136,7 @@ weechat_backtrace_addr2line (int number, void *address, char *symbol)
number, function_name);
pclose (output);
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) number;
(void) address;
(void) symbol;
diff --git a/src/common/command.c b/src/common/command.c
index f6352847a..07bf7efea 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -119,14 +119,15 @@ t_weechat_command weechat_commands[] =
"*|%n *|action|ctcp|dcc|pv|%I *|%c *|%s",
0, 4, 0, weechat_cmd_ignore, NULL },
{ "key", N_("bind/unbind keys"),
- N_("[key [function/command]] [unbind key] [functions] [reset -yes]"),
+ N_("[key [function/command]] [unbind key] [functions] [call function [\"args\"]] [reset -yes]"),
N_(" key: display or bind this key to an internal function or a command "
"(beginning by \"/\")\n"
" unbind: unbind a key\n"
"functions: list internal functions for key bindings\n"
+ " call: call a function by name (with optional arguments)\n"
" reset: restore bindings to the default values and delete ALL "
"personal bindings (use carefully!)"),
- "unbind|functions|reset %k", 0, MAX_ARGS, 0, NULL, weechat_cmd_key },
+ "unbind|functions|call|reset %k", 0, MAX_ARGS, 0, NULL, weechat_cmd_key },
/* { "panel", N_("manage panels"),
N_("[list | add type position size | resize # size | close # | move #1 #2]"),
N_(" list: list open panels (no parameter implies this list)\n"
@@ -856,7 +857,7 @@ weechat_cmd_alias (t_irc_server *server, t_irc_channel *channel,
char *pos;
t_weechat_alias *ptr_alias;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -1641,7 +1642,7 @@ weechat_cmd_debug (t_irc_server *server, t_irc_channel *channel,
{
t_irc_server *ptr_server;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -1748,7 +1749,7 @@ weechat_cmd_help (t_irc_server *server, t_irc_channel *channel,
t_plugin_handler *ptr_handler;
#endif
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -2071,11 +2072,14 @@ weechat_cmd_key_display (t_gui_key *key, int new_key)
}
else
gui_printf (NULL, " %20s", (expanded_name) ? expanded_name : key->key);
- gui_printf (NULL, "%s => %s%s\n",
+ gui_printf (NULL, "%s => %s%s%s%s%s\n",
GUI_COLOR(COLOR_WIN_CHAT_DARK),
GUI_COLOR(COLOR_WIN_CHAT),
(key->function) ?
- gui_keyboard_function_search_by_ptr (key->function) : key->command);
+ gui_keyboard_function_search_by_ptr (key->function) : key->command,
+ (key->args) ? " \"" : "",
+ (key->args) ? key->args : "",
+ (key->args) ? "\"" : "");
if (expanded_name)
free (expanded_name);
}
@@ -2088,13 +2092,14 @@ int
weechat_cmd_key (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- char *pos, *internal_code;
- int i;
+ t_gui_window *window;
+ t_gui_buffer *buffer;
+ char *pos, *pos_args, *args_tmp, *internal_code;
+ int i, length;
t_gui_key *ptr_key;
+ void (*ptr_function)(t_gui_window *, char *);
- /* make gcc happy */
- (void) server;
- (void) channel;
+ irc_find_context (server, channel, &window, &buffer);
if (arguments)
{
@@ -2143,6 +2148,50 @@ weechat_cmd_key (t_irc_server *server, t_irc_channel *channel,
i++;
}
}
+ else if (ascii_strncasecmp (arguments, "call ", 5) == 0)
+ {
+ arguments += 5;
+ while (arguments[0] == ' ')
+ arguments++;
+ pos = strchr (arguments, ' ');
+ if (pos)
+ pos[0] = '\0';
+ ptr_function = gui_keyboard_function_search_by_name (arguments);
+ if (pos)
+ pos[0] = ' ';
+ if (ptr_function)
+ {
+ pos_args = pos;
+ args_tmp = NULL;
+ if (pos_args)
+ {
+ pos_args++;
+ while (pos_args[0] == ' ')
+ pos_args++;
+ if (pos_args[0] == '"')
+ {
+ length = strlen (pos_args);
+ if ((length > 1) && (pos_args[length - 1] == '"'))
+ args_tmp = strndup (pos_args + 1, length - 2);
+ else
+ args_tmp = strdup (pos_args);
+ }
+ else
+ args_tmp = strdup (pos_args);
+ }
+ (void)(*ptr_function)(window, args_tmp);
+ if (args_tmp)
+ free (args_tmp);
+ }
+ else
+ {
+ irc_display_prefix (NULL, NULL, PREFIX_ERROR);
+ gui_printf (NULL,
+ _("%s unknown key function \"%s\"\n"),
+ WEECHAT_ERROR, arguments);
+ return -1;
+ }
+ }
else if (ascii_strncasecmp (arguments, "reset", 5) == 0)
{
arguments += 5;
@@ -2159,7 +2208,7 @@ weechat_cmd_key (t_irc_server *server, t_irc_channel *channel,
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
gui_printf (NULL,
- _("%s \"-yes\" argument is required for keys reset (securuty reason)\n"),
+ _("%s \"-yes\" argument is required for keys reset (security reason)\n"),
WEECHAT_ERROR);
return -1;
}
@@ -2260,7 +2309,7 @@ weechat_cmd_panel (t_irc_server *server, t_irc_channel *channel,
{
t_gui_panel *ptr_panel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -2456,7 +2505,7 @@ weechat_cmd_plugin_list (char *name, int full)
gui_printf (NULL, _(" (no plugin)\n"));
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) name;
(void) full;
#endif
@@ -2471,7 +2520,7 @@ weechat_cmd_plugin (t_irc_server *server, t_irc_channel *channel,
int argc, char **argv)
{
#ifdef PLUGINS
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -2526,7 +2575,7 @@ weechat_cmd_plugin (t_irc_server *server, t_irc_channel *channel,
_("Command \"%s\" is not available, WeeChat was built "
"without plugins support.\n"),
"plugin");
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
(void) argc;
@@ -2544,7 +2593,7 @@ int
weechat_cmd_save (t_irc_server *server, t_irc_channel *channel,
int argc, char **argv)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -2954,7 +3003,7 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
void *ptr_option_value;
int last_section, last_option, number_found;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -3272,7 +3321,7 @@ weechat_cmd_setp (t_irc_server *server, t_irc_channel *channel,
t_plugin_option *ptr_option;
int number_found;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -3409,7 +3458,7 @@ weechat_cmd_setp (t_irc_server *server, t_irc_channel *channel,
}
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
(void) arguments;
@@ -3435,7 +3484,7 @@ weechat_cmd_unalias (t_irc_server *server, t_irc_channel *channel,
t_weelist *ptr_weelist;
t_weechat_alias *ptr_alias;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -3544,7 +3593,7 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
char *filename;
char *exec_args[7] = { NULL, "-a", "--dir", NULL, "--session", NULL, NULL };
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
(void) argc;
diff --git a/src/common/completion.c b/src/common/completion.c
index 96ff443d5..46ccdb7f8 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -396,7 +396,7 @@ completion_list_add_plugin_cmd (t_completion *completion)
}
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) completion;
#endif
}
@@ -586,7 +586,7 @@ completion_list_add_plugin_option (t_completion *completion)
completion_list_add (completion, ptr_option->name);
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) completion;
#endif
}
@@ -618,7 +618,7 @@ completion_list_add_plugin (t_completion *completion)
completion_list_add (completion, ptr_plugin->name);
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) completion;
#endif
}
@@ -776,7 +776,7 @@ completion_list_add_plugin_option_value (t_completion *completion)
pos[0] = ' ';
}
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) completion;
#endif
}
diff --git a/src/common/util.c b/src/common/util.c
index 2db285cf7..657f40380 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -270,7 +270,7 @@ weechat_iconv (int from_utf8, char *from_code, char *to_code, char *string)
else
outbuf = strdup (string);
#else
- /* make gcc happy */
+ /* make C compiler happy */
(void) from_code;
(void) to_code;
outbuf = strdup (string);
diff --git a/src/common/weechat.c b/src/common/weechat.c
index 3df0d197f..828c2baa0 100644
--- a/src/common/weechat.c
+++ b/src/common/weechat.c
@@ -854,5 +854,5 @@ main (int argc, char *argv[])
gui_main_end (); /* shut down WeeChat GUI */
weechat_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */
- return EXIT_SUCCESS; /* make gcc happy (never executed) */
+ return EXIT_SUCCESS; /* make C compiler happy */
}
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c
index 0672a6c89..32cf532f4 100644
--- a/src/common/weeconfig.c
+++ b/src/common/weeconfig.c
@@ -2225,9 +2225,11 @@ config_create_default ()
{
function_name = gui_keyboard_function_search_by_ptr (ptr_key->function);
if (function_name)
- weechat_iconv_fprintf (file, "%s = \"%s\"\n",
+ weechat_iconv_fprintf (file, "%s = \"%s%s%s\"\n",
(expanded_name) ? expanded_name : ptr_key->key,
- function_name);
+ function_name,
+ (ptr_key->args) ? " " : "",
+ (ptr_key->args) ? ptr_key->args : "");
}
else
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
@@ -2441,9 +2443,11 @@ config_write (char *config_name)
{
function_name = gui_keyboard_function_search_by_ptr (ptr_key->function);
if (function_name)
- weechat_iconv_fprintf (file, "%s = \"%s\"\n",
+ weechat_iconv_fprintf (file, "%s = \"%s%s%s\"\n",
(expanded_name) ? expanded_name : ptr_key->key,
- function_name);
+ function_name,
+ (ptr_key->args) ? " " : "",
+ (ptr_key->args) ? ptr_key->args : "");
}
else
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
diff --git a/src/gui/curses/gui-curses-infobar.c b/src/gui/curses/gui-curses-infobar.c
index af1d634b0..00a8fe2ad 100644
--- a/src/gui/curses/gui-curses-infobar.c
+++ b/src/gui/curses/gui-curses-infobar.c
@@ -46,7 +46,7 @@ gui_infobar_draw_time (t_gui_buffer *buffer)
time_t time_seconds;
struct tm *local_time;
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
@@ -84,7 +84,7 @@ gui_infobar_draw (t_gui_buffer *buffer, int erase)
struct tm *local_time;
char text_time[1024 + 1], *buf;
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c
index fa7210f18..891941b9e 100644
--- a/src/gui/curses/gui-curses-keyboard.c
+++ b/src/gui/curses/gui-curses-keyboard.c
@@ -33,10 +33,6 @@
#include "../../common/util.h"
#include "gui-curses.h"
-#ifdef PLUGINS
-#include "../../plugins/plugins.h"
-#endif
-
/*
* gui_keyboard_default_bindings: create default key bindings
@@ -149,12 +145,7 @@ void
gui_keyboard_grab_end ()
{
char *expanded_key;
- char *buffer_before_key;
-#ifdef PLUGINS
- char *expanded_key2;
- int length;
-#endif
-
+
/* get expanded name (for example: ^U => ctrl-u) */
expanded_key = gui_keyboard_get_expanded_name (gui_key_buffer);
@@ -162,27 +153,9 @@ gui_keyboard_grab_end ()
{
if (gui_current_window->buffer->has_input)
{
- buffer_before_key =
- (gui_current_window->buffer->input_buffer) ?
- strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_insert_string_input (gui_current_window, expanded_key, -1);
- gui_current_window->buffer->input_buffer_pos += utf8_strlen (expanded_key);
- gui_input_draw (gui_current_window->buffer, 1);
gui_current_window->buffer->completion.position = -1;
-#ifdef PLUGINS
- length = strlen (expanded_key) + 1 + 1;
- expanded_key2 = (char *) malloc (length);
- if (expanded_key2)
- {
- snprintf (expanded_key2, length, "*%s", expanded_key);
- (void) plugin_keyboard_handler_exec (expanded_key2,
- buffer_before_key,
- gui_current_window->buffer->input_buffer);
- free (expanded_key2);
- }
-#endif
- if (buffer_before_key)
- free (buffer_before_key);
+ gui_input_draw (gui_current_window->buffer, 0);
}
free (expanded_key);
}
@@ -202,10 +175,6 @@ gui_keyboard_read ()
{
int key, i, insert_ok;
char key_str[32], *key_utf;
- char *buffer_before_key;
-#ifdef PLUGINS
- char key_str2[33];
-#endif
i = 0;
/* do not loop too much here (for example when big paste was made),
@@ -311,21 +280,9 @@ gui_keyboard_read ()
switch (gui_current_window->buffer->type)
{
case BUFFER_TYPE_STANDARD:
- buffer_before_key =
- (gui_current_window->buffer->input_buffer) ?
- strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_insert_string_input (gui_current_window, key_str, -1);
- gui_current_window->buffer->input_buffer_pos += utf8_strlen (key_str);
- gui_input_draw (gui_current_window->buffer, 0);
gui_current_window->buffer->completion.position = -1;
-#ifdef PLUGINS
- snprintf (key_str2, sizeof (key_str2), "*%s", key_str);
- (void) plugin_keyboard_handler_exec (key_str2,
- buffer_before_key,
- gui_current_window->buffer->input_buffer);
-#endif
- if (buffer_before_key)
- free (buffer_before_key);
+ gui_input_draw (gui_current_window->buffer, 0);
break;
case BUFFER_TYPE_DCC:
gui_exec_action_dcc (gui_current_window, key_str);
diff --git a/src/gui/curses/gui-curses-status.c b/src/gui/curses/gui-curses-status.c
index 57fa3da5c..32160cac3 100644
--- a/src/gui/curses/gui-curses-status.c
+++ b/src/gui/curses/gui-curses-status.c
@@ -48,7 +48,7 @@ gui_status_draw (t_gui_buffer *buffer, int erase)
int x, server_pos, server_total;
int display_name, names_count;
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
diff --git a/src/gui/gtk/gui-gtk-infobar.c b/src/gui/gtk/gui-gtk-infobar.c
index 044bceb41..65b8613c8 100644
--- a/src/gui/gtk/gui-gtk-infobar.c
+++ b/src/gui/gtk/gui-gtk-infobar.c
@@ -45,7 +45,7 @@ gui_infobar_draw_time (t_gui_buffer *buffer)
time_t time_seconds;
struct tm *local_time;*/
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
@@ -67,7 +67,7 @@ gui_infobar_draw (t_gui_buffer *buffer, int erase)
struct tm *local_time;
char text_time[1024 + 1];*/
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
diff --git a/src/gui/gtk/gui-gtk-status.c b/src/gui/gtk/gui-gtk-status.c
index 6a5283aa9..1af828c0e 100644
--- a/src/gui/gtk/gui-gtk-status.c
+++ b/src/gui/gtk/gui-gtk-status.c
@@ -47,7 +47,7 @@ gui_status_draw (t_gui_buffer *buffer, int erase)
int i, first_mode, x, server_pos, server_total;
int display_name, names_count;*/
- /* make gcc happy */
+ /* make C compiler happy */
(void) buffer;
if (!gui_ok)
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c
index d119e08ff..2d008cb71 100644
--- a/src/gui/gui-action.c
+++ b/src/gui/gui-action.c
@@ -70,14 +70,16 @@ gui_action_clipboard_copy (char *buffer, int size)
*/
void
-gui_action_clipboard_paste (t_gui_window *window)
+gui_action_clipboard_paste (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input && gui_input_clipboard)
{
gui_insert_string_input (window, gui_input_clipboard, -1);
- window->buffer->input_buffer_pos += utf8_strlen (gui_input_clipboard);
- gui_input_draw (window->buffer, 0);
window->buffer->completion.position = -1;
+ gui_input_draw (window->buffer, 0);
}
}
@@ -86,9 +88,12 @@ gui_action_clipboard_paste (t_gui_window *window)
*/
void
-gui_action_return (t_gui_window *window)
+gui_action_return (t_gui_window *window, char *args)
{
char *command;
+
+ /* make C compiler happy */
+ (void) args;
if (window->buffer->has_input)
{
@@ -123,8 +128,11 @@ gui_action_return (t_gui_window *window)
*/
void
-gui_action_tab (t_gui_window *window)
+gui_action_tab (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
completion_search (&(window->buffer->completion), 1,
@@ -141,8 +149,11 @@ gui_action_tab (t_gui_window *window)
*/
void
-gui_action_tab_previous (t_gui_window *window)
+gui_action_tab_previous (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
completion_search (&(window->buffer->completion), -1,
@@ -159,11 +170,14 @@ gui_action_tab_previous (t_gui_window *window)
*/
void
-gui_action_backspace (t_gui_window *window)
+gui_action_backspace (t_gui_window *window, char *args)
{
char *pos, *pos_last;
int char_size, size_to_move;
-
+
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos > 0)
@@ -191,10 +205,13 @@ gui_action_backspace (t_gui_window *window)
*/
void
-gui_action_delete (t_gui_window *window)
+gui_action_delete (t_gui_window *window, char *args)
{
char *pos, *pos_next;
int char_size, size_to_move;
+
+ /* make C compiler happy */
+ (void) args;
if (window->buffer->has_input)
{
@@ -223,11 +240,14 @@ gui_action_delete (t_gui_window *window)
*/
void
-gui_action_delete_previous_word (t_gui_window *window)
+gui_action_delete_previous_word (t_gui_window *window, char *args)
{
int length_deleted, size_deleted;
char *start, *string;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos > 0)
@@ -283,11 +303,14 @@ gui_action_delete_previous_word (t_gui_window *window)
*/
void
-gui_action_delete_next_word (t_gui_window *window)
+gui_action_delete_next_word (t_gui_window *window, char *args)
{
int size_deleted, length_deleted;
char *start, *string;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
start = utf8_add_offset (window->buffer->input_buffer,
@@ -322,10 +345,13 @@ gui_action_delete_next_word (t_gui_window *window)
*/
void
-gui_action_delete_begin_of_line (t_gui_window *window)
+gui_action_delete_begin_of_line (t_gui_window *window, char *args)
{
int length_deleted, size_deleted, pos_start;
char *start;
+
+ /* make C compiler happy */
+ (void) args;
if (window->buffer->has_input)
{
@@ -358,10 +384,13 @@ gui_action_delete_begin_of_line (t_gui_window *window)
*/
void
-gui_action_delete_end_of_line (t_gui_window *window)
+gui_action_delete_end_of_line (t_gui_window *window, char *args)
{
char *start;
int size_deleted, length_deleted, pos_start;
+
+ /* make C compiler happy */
+ (void) args;
if (window->buffer->has_input)
{
@@ -386,8 +415,11 @@ gui_action_delete_end_of_line (t_gui_window *window)
*/
void
-gui_action_delete_line (t_gui_window *window)
+gui_action_delete_line (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
window->buffer->input_buffer[0] = '\0';
@@ -406,8 +438,11 @@ gui_action_delete_line (t_gui_window *window)
*/
void
-gui_action_transpose_chars (t_gui_window *window)
+gui_action_transpose_chars (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
char *start, *prev_char, saved_char[5];
int size_prev_char, size_start_char;
int pos_prev_char, pos_start;
@@ -452,8 +487,11 @@ gui_action_transpose_chars (t_gui_window *window)
*/
void
-gui_action_home (t_gui_window *window)
+gui_action_home (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos > 0)
@@ -469,8 +507,11 @@ gui_action_home (t_gui_window *window)
*/
void
-gui_action_end (t_gui_window *window)
+gui_action_end (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos <
@@ -488,8 +529,11 @@ gui_action_end (t_gui_window *window)
*/
void
-gui_action_left (t_gui_window *window)
+gui_action_left (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos > 0)
@@ -505,10 +549,13 @@ gui_action_left (t_gui_window *window)
*/
void
-gui_action_previous_word (t_gui_window *window)
+gui_action_previous_word (t_gui_window *window, char *args)
{
char *pos;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos > 0)
@@ -545,8 +592,11 @@ gui_action_previous_word (t_gui_window *window)
*/
void
-gui_action_right (t_gui_window *window)
+gui_action_right (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos <
@@ -563,10 +613,13 @@ gui_action_right (t_gui_window *window)
*/
void
-gui_action_next_word (t_gui_window *window)
+gui_action_next_word (t_gui_window *window, char *args)
{
char *pos;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (window->buffer->input_buffer_pos <
@@ -607,8 +660,11 @@ gui_action_next_word (t_gui_window *window)
*/
void
-gui_action_up (t_gui_window *window)
+gui_action_up (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_DCC)
{
if (dcc_list)
@@ -685,8 +741,11 @@ gui_action_up (t_gui_window *window)
*/
void
-gui_action_up_global (t_gui_window *window)
+gui_action_up_global (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (history_global_ptr)
@@ -720,8 +779,11 @@ gui_action_up_global (t_gui_window *window)
*/
void
-gui_action_down (t_gui_window *window)
+gui_action_down (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_DCC)
{
if (dcc_list)
@@ -789,8 +851,11 @@ gui_action_down (t_gui_window *window)
*/
void
-gui_action_down_global (t_gui_window *window)
+gui_action_down_global (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
{
if (history_global_ptr)
@@ -828,8 +893,11 @@ gui_action_down_global (t_gui_window *window)
*/
void
-gui_action_page_up (t_gui_window *window)
+gui_action_page_up (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_page_up (window);
}
@@ -838,8 +906,11 @@ gui_action_page_up (t_gui_window *window)
*/
void
-gui_action_page_down (t_gui_window *window)
+gui_action_page_down (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_page_down (window);
}
@@ -848,8 +919,11 @@ gui_action_page_down (t_gui_window *window)
*/
void
-gui_action_scroll_up (t_gui_window *window)
+gui_action_scroll_up (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_up (window);
}
@@ -858,8 +932,11 @@ gui_action_scroll_up (t_gui_window *window)
*/
void
-gui_action_scroll_down (t_gui_window *window)
+gui_action_scroll_down (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_down (window);
}
@@ -868,8 +945,11 @@ gui_action_scroll_down (t_gui_window *window)
*/
void
-gui_action_scroll_top (t_gui_window *window)
+gui_action_scroll_top (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_top (window);
}
@@ -878,8 +958,11 @@ gui_action_scroll_top (t_gui_window *window)
*/
void
-gui_action_scroll_bottom (t_gui_window *window)
+gui_action_scroll_bottom (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_bottom (window);
}
@@ -888,8 +971,11 @@ gui_action_scroll_bottom (t_gui_window *window)
*/
void
-gui_action_scroll_topic_left (t_gui_window *window)
+gui_action_scroll_topic_left (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_topic_left (window);
}
@@ -898,8 +984,11 @@ gui_action_scroll_topic_left (t_gui_window *window)
*/
void
-gui_action_scroll_topic_right (t_gui_window *window)
+gui_action_scroll_topic_right (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_scroll_topic_right (window);
}
@@ -908,8 +997,11 @@ gui_action_scroll_topic_right (t_gui_window *window)
*/
void
-gui_action_nick_beginning (t_gui_window *window)
+gui_action_nick_beginning (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_nick_beginning (window);
}
@@ -918,8 +1010,11 @@ gui_action_nick_beginning (t_gui_window *window)
*/
void
-gui_action_nick_end (t_gui_window *window)
+gui_action_nick_end (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_nick_end (window);
}
@@ -928,8 +1023,11 @@ gui_action_nick_end (t_gui_window *window)
*/
void
-gui_action_nick_page_up (t_gui_window *window)
+gui_action_nick_page_up (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_nick_page_up (window);
}
@@ -938,8 +1036,11 @@ gui_action_nick_page_up (t_gui_window *window)
*/
void
-gui_action_nick_page_down (t_gui_window *window)
+gui_action_nick_page_down (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_nick_page_down (window);
}
@@ -948,8 +1049,11 @@ gui_action_nick_page_down (t_gui_window *window)
*/
void
-gui_action_jump_smart (t_gui_window *window)
+gui_action_jump_smart (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (hotlist)
{
if (!hotlist_initial_buffer)
@@ -973,8 +1077,11 @@ gui_action_jump_smart (t_gui_window *window)
*/
void
-gui_action_jump_dcc (t_gui_window *window)
+gui_action_jump_dcc (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_DCC)
{
if (gui_buffer_before_dcc)
@@ -996,8 +1103,11 @@ gui_action_jump_dcc (t_gui_window *window)
*/
void
-gui_action_jump_raw_data (t_gui_window *window)
+gui_action_jump_raw_data (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_RAW_DATA)
{
if (gui_buffer_before_raw_data)
@@ -1019,8 +1129,11 @@ gui_action_jump_raw_data (t_gui_window *window)
*/
void
-gui_action_jump_last_buffer (t_gui_window *window)
+gui_action_jump_last_buffer (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (last_gui_buffer)
gui_buffer_switch_by_number (window, last_gui_buffer->number);
}
@@ -1030,8 +1143,11 @@ gui_action_jump_last_buffer (t_gui_window *window)
*/
void
-gui_action_jump_server (t_gui_window *window)
+gui_action_jump_server (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (SERVER(window->buffer))
{
if (SERVER(window->buffer)->buffer !=
@@ -1049,11 +1165,14 @@ gui_action_jump_server (t_gui_window *window)
*/
void
-gui_action_jump_next_server (t_gui_window *window)
+gui_action_jump_next_server (t_gui_window *window, char *args)
{
t_irc_server *ptr_server;
t_gui_buffer *ptr_buffer;
+ /* make C compiler happy */
+ (void) args;
+
if (SERVER(window->buffer))
{
ptr_server = SERVER(window->buffer)->next_server;
@@ -1092,8 +1211,11 @@ gui_action_jump_next_server (t_gui_window *window)
*/
void
-gui_action_switch_server (t_gui_window *window)
+gui_action_switch_server (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_window_switch_server (window);
}
@@ -1102,10 +1224,13 @@ gui_action_switch_server (t_gui_window *window)
*/
void
-gui_action_scroll_previous_highlight (t_gui_window *window)
+gui_action_scroll_previous_highlight (t_gui_window *window, char *args)
{
t_gui_line *ptr_line;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_STANDARD)
{
if (window->buffer->lines)
@@ -1135,10 +1260,13 @@ gui_action_scroll_previous_highlight (t_gui_window *window)
*/
void
-gui_action_scroll_next_highlight (t_gui_window *window)
+gui_action_scroll_next_highlight (t_gui_window *window, char *args)
{
t_gui_line *ptr_line;
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->type == BUFFER_TYPE_STANDARD)
{
if (window->buffer->lines)
@@ -1168,8 +1296,11 @@ gui_action_scroll_next_highlight (t_gui_window *window)
*/
void
-gui_action_scroll_unread (t_gui_window *window)
+gui_action_scroll_unread (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (cfg_look_read_marker &&
cfg_look_read_marker[0] &&
(window->buffer->type == BUFFER_TYPE_STANDARD) &&
@@ -1190,8 +1321,11 @@ gui_action_scroll_unread (t_gui_window *window)
*/
void
-gui_action_hotlist_clear (t_gui_window *window)
+gui_action_hotlist_clear (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (hotlist)
{
hotlist_free_all ();
@@ -1205,8 +1339,11 @@ gui_action_hotlist_clear (t_gui_window *window)
*/
void
-gui_action_infobar_clear (t_gui_window *window)
+gui_action_infobar_clear (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
gui_infobar_remove ();
gui_infobar_draw (window->buffer, 1);
}
@@ -1216,10 +1353,11 @@ gui_action_infobar_clear (t_gui_window *window)
*/
void
-gui_action_refresh_screen (t_gui_window *window)
+gui_action_refresh_screen (t_gui_window *window, char *args)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) window;
+ (void) args;
gui_window_refresh_screen (1);
}
@@ -1229,8 +1367,25 @@ gui_action_refresh_screen (t_gui_window *window)
*/
void
-gui_action_grab_key (t_gui_window *window)
+gui_action_grab_key (t_gui_window *window, char *args)
{
+ /* make C compiler happy */
+ (void) args;
+
if (window->buffer->has_input)
gui_keyboard_init_grab ();
}
+
+/*
+ * gui_action_insert_string: insert a string in command line
+ */
+
+void
+gui_action_insert_string (t_gui_window *window, char *args)
+{
+ if (args)
+ {
+ gui_insert_string_input (window, args, -1);
+ gui_input_draw (window->buffer, 0);
+ }
+}
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 5b050565f..5708d7ba9 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -44,6 +44,10 @@
#include "../common/util.h"
#include "../irc/irc.h"
+#ifdef PLUGINS
+#include "../plugins/plugins.h"
+#endif
+
int gui_init_ok = 0; /* = 1 if GUI is initialized */
int gui_ok = 0; /* = 1 if GUI is ok */
@@ -603,9 +607,10 @@ gui_input_complete (t_gui_window *window)
window->buffer->input_buffer_pos)] != ' ')
gui_insert_string_input (window, " ",
window->buffer->input_buffer_pos);
+ else
+ window->buffer->input_buffer_pos++;
if (window->buffer->completion.position >= 0)
window->buffer->completion.position++;
- window->buffer->input_buffer_pos++;
}
}
else
@@ -619,16 +624,18 @@ gui_input_complete (t_gui_window *window)
cfg_look_nick_completor, strlen (cfg_look_nick_completor)) != 0)
gui_insert_string_input (window, cfg_look_nick_completor,
window->buffer->input_buffer_pos);
+ else
+ window->buffer->input_buffer_pos += utf8_strlen (cfg_look_nick_completor);
if (window->buffer->completion.position >= 0)
window->buffer->completion.position += strlen (cfg_look_nick_completor);
- window->buffer->input_buffer_pos += utf8_strlen (cfg_look_nick_completor);
if (window->buffer->input_buffer[utf8_real_pos (window->buffer->input_buffer,
window->buffer->input_buffer_pos)] != ' ')
gui_insert_string_input (window, " ",
window->buffer->input_buffer_pos);
+ else
+ window->buffer->input_buffer_pos++;
if (window->buffer->completion.position >= 0)
window->buffer->completion.position++;
- window->buffer->input_buffer_pos++;
}
}
gui_input_draw (window->buffer, 0);
@@ -795,10 +802,19 @@ int
gui_insert_string_input (t_gui_window *window, char *string, int pos)
{
int i, pos_start, size, length;
- char *ptr_start;
+ char *ptr_start, *string2;
+#ifdef PLUGINS
+ char *buffer_before_insert;
+#endif
if (window->buffer->has_input)
{
+#ifdef PLUGINS
+ buffer_before_insert =
+ (window->buffer->input_buffer) ?
+ strdup (window->buffer->input_buffer) : strdup ("");
+#endif
+
if (pos == -1)
pos = window->buffer->input_buffer_pos;
@@ -828,6 +844,23 @@ gui_insert_string_input (t_gui_window *window, char *string, int pos)
{
window->buffer->input_buffer_color_mask[pos_start + i] = ' ';
}
+
+ window->buffer->input_buffer_pos += length;
+
+#ifdef PLUGINS
+ string2 = (char *) malloc (size + 2);
+ if (string2)
+ {
+ snprintf (string2, size + 2, "*%s", string);
+ (void) plugin_keyboard_handler_exec (string2,
+ buffer_before_insert,
+ window->buffer->input_buffer);
+ free (string2);
+ }
+ if (buffer_before_insert)
+ free (buffer_before_insert);
+#endif
+
return length;
}
return 0;
diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c
index 7ebc5561c..db6f238ac 100644
--- a/src/gui/gui-keyboard.c
+++ b/src/gui/gui-keyboard.c
@@ -143,6 +143,8 @@ t_gui_key_function gui_key_functions[] =
N_("refresh screen") },
{ "grab_key", gui_action_grab_key,
N_("grab a key") },
+ { "insert", gui_action_insert_string,
+ N_("insert a string in command line") },
{ NULL, NULL, NULL }
};
@@ -322,10 +324,11 @@ gui_keyboard_insert_sorted (t_gui_key *key)
*/
t_gui_key *
-gui_keyboard_new (char *key, char *command, void *function)
+gui_keyboard_new (char *key, char *command, t_gui_key_func *function, char *args)
{
t_gui_key *new_key;
char *internal_code;
+ int length;
if ((new_key = (t_gui_key *) malloc (sizeof (t_gui_key))))
{
@@ -335,6 +338,21 @@ gui_keyboard_new (char *key, char *command, void *function)
free (internal_code);
new_key->command = (command) ? strdup (command) : NULL;
new_key->function = function;
+ if (args)
+ {
+ if (args[0] == '"')
+ {
+ length = strlen (args);
+ if ((length > 1) && (args[length - 1] == '"'))
+ new_key->args = strndup (args + 1, length - 2);
+ else
+ new_key->args = strdup (args);
+ }
+ else
+ new_key->args = strdup (args);
+ }
+ else
+ new_key->args = NULL;
gui_keyboard_insert_sorted (new_key);
}
else
@@ -403,7 +421,7 @@ gui_keyboard_search_part (char *key)
* gui_keyboard_function_search_by_name: search a function by name
*/
-void *
+t_gui_key_func *
gui_keyboard_function_search_by_name (char *name)
{
int i;
@@ -425,7 +443,7 @@ gui_keyboard_function_search_by_name (char *name)
*/
char *
-gui_keyboard_function_search_by_ptr (void *function)
+gui_keyboard_function_search_by_ptr (t_gui_key_func *function)
{
int i;
@@ -448,8 +466,9 @@ gui_keyboard_function_search_by_ptr (void *function)
t_gui_key *
gui_keyboard_bind (char *key, char *command)
{
- t_gui_key_function *ptr_function;
+ t_gui_key_func *ptr_function;
t_gui_key *new_key;
+ char *ptr_args;
if (!key || !command)
{
@@ -459,9 +478,20 @@ gui_keyboard_bind (char *key, char *command)
}
ptr_function = NULL;
+ ptr_args = NULL;
if (command[0] != '/')
{
+ ptr_args = strchr (command, ' ');
+ if (ptr_args)
+ ptr_args[0] = '\0';
ptr_function = gui_keyboard_function_search_by_name (command);
+ if (ptr_args)
+ {
+ ptr_args[0] = ' ';
+ ptr_args++;
+ while (ptr_args[0] == ' ')
+ ptr_args++;
+ }
if (!ptr_function)
{
weechat_log_printf (_("%s unable to bind key \"%s\" (invalid function name: \"%s\")\n"),
@@ -474,7 +504,8 @@ gui_keyboard_bind (char *key, char *command)
new_key = gui_keyboard_new (key,
(ptr_function) ? NULL : command,
- ptr_function);
+ ptr_function,
+ ptr_args);
if (!new_key)
{
weechat_log_printf (_("%s not enough memory for key binding\n"),
@@ -547,7 +578,7 @@ gui_keyboard_pressed (char *key_str)
CHANNEL(gui_current_window->buffer),
ptr_key->command, 0);
else
- (void)(ptr_key->function)(gui_current_window);
+ (void)(ptr_key->function)(gui_current_window, ptr_key->args);
#ifdef PLUGINS
(void) plugin_keyboard_handler_exec (
(ptr_key->command) ?
@@ -580,6 +611,8 @@ gui_keyboard_free (t_gui_key *key)
free (key->key);
if (key->command)
free (key->command);
+ if (key->args)
+ free (key->args);
/* remove key from keys list */
if (key->prev_key)
diff --git a/src/gui/gui-keyboard.h b/src/gui/gui-keyboard.h
index 6cc0da570..064641981 100644
--- a/src/gui/gui-keyboard.h
+++ b/src/gui/gui-keyboard.h
@@ -26,14 +26,16 @@
/* key structures */
+typedef void (t_gui_key_func)(t_gui_window *, char *);
+
typedef struct t_gui_key t_gui_key;
struct t_gui_key
{
char *key; /* key combo (ex: a, ^W, ^W^C, meta-a) */
char *command; /* associated command (may be NULL) */
- void (*function)(t_gui_window *);
- /* associated function (if cmd is NULL) */
+ t_gui_key_func *function; /* associated function (if cmd is NULL) */
+ char *args; /* args for function (if cmd is NULL) */
t_gui_key *prev_key; /* link to previous key */
t_gui_key *next_key; /* link to next key */
};
@@ -43,7 +45,7 @@ typedef struct t_gui_key_function t_gui_key_function;
struct t_gui_key_function
{
char *function_name; /* name of function */
- void (*function)(); /* associated function */
+ t_gui_key_func *function; /* associated function */
char *description; /* description of function */
};
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 918464d02..dacc950bd 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -108,54 +108,55 @@ extern void gui_panel_print_log ();
/* action */
extern void gui_action_clipboard_copy (char *, int);
-extern void gui_action_clipboard_paste (t_gui_window *);
-extern void gui_action_return (t_gui_window *);
-extern void gui_action_tab (t_gui_window *);
-extern void gui_action_tab_previous (t_gui_window *);
-extern void gui_action_backspace (t_gui_window *);
-extern void gui_action_delete (t_gui_window *);
-extern void gui_action_delete_previous_word (t_gui_window *);
-extern void gui_action_delete_next_word (t_gui_window *);
-extern void gui_action_delete_begin_of_line (t_gui_window *);
-extern void gui_action_delete_end_of_line (t_gui_window *);
-extern void gui_action_delete_line (t_gui_window *);
-extern void gui_action_transpose_chars (t_gui_window *);
-extern void gui_action_home (t_gui_window *);
-extern void gui_action_end (t_gui_window *);
-extern void gui_action_left (t_gui_window *);
-extern void gui_action_previous_word (t_gui_window *);
-extern void gui_action_right (t_gui_window *);
-extern void gui_action_next_word (t_gui_window *);
-extern void gui_action_up (t_gui_window *);
-extern void gui_action_up_global (t_gui_window *);
-extern void gui_action_down (t_gui_window *);
-extern void gui_action_down_global (t_gui_window *);
-extern void gui_action_page_up (t_gui_window *);
-extern void gui_action_page_down (t_gui_window *);
-extern void gui_action_scroll_up (t_gui_window *);
-extern void gui_action_scroll_down (t_gui_window *);
-extern void gui_action_scroll_top (t_gui_window *);
-extern void gui_action_scroll_bottom (t_gui_window *);
-extern void gui_action_scroll_topic_left (t_gui_window *);
-extern void gui_action_scroll_topic_right (t_gui_window *);
-extern void gui_action_nick_beginning (t_gui_window *);
-extern void gui_action_nick_end (t_gui_window *);
-extern void gui_action_nick_page_up (t_gui_window *);
-extern void gui_action_nick_page_down (t_gui_window *);
-extern void gui_action_jump_smart (t_gui_window *);
-extern void gui_action_jump_dcc (t_gui_window *);
-extern void gui_action_jump_raw_data (t_gui_window *);
-extern void gui_action_jump_last_buffer (t_gui_window *);
-extern void gui_action_jump_server (t_gui_window *);
-extern void gui_action_jump_next_server (t_gui_window *);
-extern void gui_action_switch_server (t_gui_window *);
-extern void gui_action_scroll_previous_highlight (t_gui_window *);
-extern void gui_action_scroll_next_highlight (t_gui_window *);
-extern void gui_action_scroll_unread (t_gui_window *);
-extern void gui_action_hotlist_clear (t_gui_window *);
-extern void gui_action_infobar_clear (t_gui_window *);
-extern void gui_action_refresh_screen ();
-extern void gui_action_grab_key (t_gui_window *);
+extern void gui_action_clipboard_paste (t_gui_window *, char *);
+extern void gui_action_return (t_gui_window *, char *);
+extern void gui_action_tab (t_gui_window *, char *);
+extern void gui_action_tab_previous (t_gui_window *, char *);
+extern void gui_action_backspace (t_gui_window *, char *);
+extern void gui_action_delete (t_gui_window *, char *);
+extern void gui_action_delete_previous_word (t_gui_window *, char *);
+extern void gui_action_delete_next_word (t_gui_window *, char *);
+extern void gui_action_delete_begin_of_line (t_gui_window *, char *);
+extern void gui_action_delete_end_of_line (t_gui_window *, char *);
+extern void gui_action_delete_line (t_gui_window *, char *);
+extern void gui_action_transpose_chars (t_gui_window *, char *);
+extern void gui_action_home (t_gui_window *, char *);
+extern void gui_action_end (t_gui_window *, char *);
+extern void gui_action_left (t_gui_window *, char *);
+extern void gui_action_previous_word (t_gui_window *, char *);
+extern void gui_action_right (t_gui_window *, char *);
+extern void gui_action_next_word (t_gui_window *, char *);
+extern void gui_action_up (t_gui_window *, char *);
+extern void gui_action_up_global (t_gui_window *, char *);
+extern void gui_action_down (t_gui_window *, char *);
+extern void gui_action_down_global (t_gui_window *, char *);
+extern void gui_action_page_up (t_gui_window *, char *);
+extern void gui_action_page_down (t_gui_window *, char *);
+extern void gui_action_scroll_up (t_gui_window *, char *);
+extern void gui_action_scroll_down (t_gui_window *, char *);
+extern void gui_action_scroll_top (t_gui_window *, char *);
+extern void gui_action_scroll_bottom (t_gui_window *, char *);
+extern void gui_action_scroll_topic_left (t_gui_window *, char *);
+extern void gui_action_scroll_topic_right (t_gui_window *, char *);
+extern void gui_action_nick_beginning (t_gui_window *, char *);
+extern void gui_action_nick_end (t_gui_window *, char *);
+extern void gui_action_nick_page_up (t_gui_window *, char *);
+extern void gui_action_nick_page_down (t_gui_window *, char *);
+extern void gui_action_jump_smart (t_gui_window *, char *);
+extern void gui_action_jump_dcc (t_gui_window *, char *);
+extern void gui_action_jump_raw_data (t_gui_window *, char *);
+extern void gui_action_jump_last_buffer (t_gui_window *, char *);
+extern void gui_action_jump_server (t_gui_window *, char *);
+extern void gui_action_jump_next_server (t_gui_window *, char *);
+extern void gui_action_switch_server (t_gui_window *, char *);
+extern void gui_action_scroll_previous_highlight (t_gui_window *, char *);
+extern void gui_action_scroll_next_highlight (t_gui_window *, char *);
+extern void gui_action_scroll_unread (t_gui_window *, char *);
+extern void gui_action_hotlist_clear (t_gui_window *, char *);
+extern void gui_action_infobar_clear (t_gui_window *, char *);
+extern void gui_action_refresh_screen (t_gui_window *, char *);
+extern void gui_action_grab_key (t_gui_window *, char *);
+extern void gui_action_insert_string (t_gui_window *, char *);
/* key */
extern void gui_keyboard_init ();
@@ -163,8 +164,8 @@ extern void gui_keyboard_init_grab ();
extern char *gui_keyboard_get_internal_code (char *);
extern char *gui_keyboard_get_expanded_name (char *);
extern t_gui_key *gui_keyboard_search (char *);
-extern void *gui_keyboard_function_search_by_name (char *);
-extern char *gui_keyboard_function_search_by_ptr (void *);
+extern t_gui_key_func *gui_keyboard_function_search_by_name (char *);
+extern char *gui_keyboard_function_search_by_ptr (t_gui_key_func *);
extern t_gui_key *gui_keyboard_bind (char *, char *);
extern int gui_keyboard_unbind (char *);
extern int gui_keyboard_pressed (char *);
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index a3b8153b5..401da46fd 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -323,7 +323,7 @@ irc_cmd_recv_error (t_irc_server *server, char *host, char *nick, char *argument
t_gui_buffer *ptr_buffer;
t_irc_channel *ptr_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -1176,7 +1176,7 @@ irc_cmd_recv_ping (t_irc_server *server, char *host, char *nick, char *arguments
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
pos = strrchr (arguments, ' ');
@@ -1196,7 +1196,7 @@ irc_cmd_recv_pong (t_irc_server *server, char *host, char *nick, char *arguments
struct timeval tv;
int old_lag;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
(void) arguments;
@@ -2130,7 +2130,7 @@ irc_cmd_recv_server_mode_reason (t_irc_server *server, char *host,
{
char *ptr_msg;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2170,7 +2170,7 @@ irc_cmd_recv_server_mode_reason (t_irc_server *server, char *host,
int
irc_cmd_recv_server_msg (t_irc_server *server, char *host, char *nick, char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2204,7 +2204,7 @@ irc_cmd_recv_server_reply (t_irc_server *server, char *host, char *nick, char *a
char *pos, *pos2;
int first;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -2454,7 +2454,7 @@ irc_cmd_recv_221 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_mode;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -2504,7 +2504,7 @@ irc_cmd_recv_301 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_gui_buffer *ptr_buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -2562,7 +2562,7 @@ irc_cmd_recv_302 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_host, *ptr_next;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2620,7 +2620,7 @@ irc_cmd_recv_303 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *ptr_next;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2668,7 +2668,7 @@ irc_cmd_recv_305 (t_irc_server *server, char *host, char *nick, char *arguments)
{
t_gui_window *ptr_window;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2705,7 +2705,7 @@ irc_cmd_recv_306 (t_irc_server *server, char *host, char *nick, char *arguments)
{
t_gui_window *ptr_window;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2745,7 +2745,7 @@ irc_cmd_recv_whois_nick_msg (t_irc_server *server, char *host, char *nick, char
{
char *pos_nick, *pos_msg;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2789,7 +2789,7 @@ irc_cmd_recv_310 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2822,7 +2822,7 @@ irc_cmd_recv_311 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_user, *pos_host, *pos_realname;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2891,7 +2891,7 @@ irc_cmd_recv_312 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_server, *pos_serverinfo;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -2948,7 +2948,7 @@ irc_cmd_recv_314 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_user, *pos_host, *pos_realname;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3021,7 +3021,7 @@ irc_cmd_recv_315 (t_irc_server *server, char *host, char *nick, char *arguments)
char *pos;
t_irc_channel *ptr_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3076,7 +3076,7 @@ irc_cmd_recv_317 (t_irc_server *server, char *host, char *nick, char *arguments)
int idle_time, day, hour, min, sec;
time_t datetime;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3161,7 +3161,7 @@ irc_cmd_recv_319 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_channel, *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3242,7 +3242,7 @@ irc_cmd_recv_321 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3274,7 +3274,7 @@ irc_cmd_recv_322 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3316,7 +3316,7 @@ irc_cmd_recv_323 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3349,7 +3349,7 @@ irc_cmd_recv_324 (t_irc_server *server, char *host, char *nick, char *arguments)
char *pos_channel, *pos_modes, *pos;
t_irc_channel *ptr_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3417,7 +3417,7 @@ irc_cmd_recv_329 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
time_t datetime;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3485,7 +3485,7 @@ irc_cmd_recv_331 (t_irc_server *server, char *host, char *nick, char *arguments)
char *pos_channel, *pos;
t_irc_channel *ptr_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) nick;
@@ -3545,7 +3545,7 @@ irc_cmd_recv_332 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_gui_buffer *ptr_buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3611,7 +3611,7 @@ irc_cmd_recv_333 (t_irc_server *server, char *host, char *nick, char *arguments)
t_gui_buffer *ptr_buffer;
time_t datetime;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3690,7 +3690,7 @@ irc_cmd_recv_338 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_host, *pos_message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3746,7 +3746,7 @@ irc_cmd_recv_341 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3810,7 +3810,7 @@ irc_cmd_recv_344 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_channel, *pos_host;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3851,7 +3851,7 @@ irc_cmd_recv_345 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -3901,7 +3901,7 @@ irc_cmd_recv_348 (t_irc_server *server, char *host, char *nick, char *arguments)
t_gui_buffer *buffer;
time_t datetime;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
/* look for channel */
@@ -4016,7 +4016,7 @@ irc_cmd_recv_349 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_gui_buffer *buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
pos_channel = strchr (arguments, ' ');
@@ -4077,7 +4077,7 @@ irc_cmd_recv_351 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos, *pos2;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -4122,7 +4122,7 @@ irc_cmd_recv_352 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_irc_nick *ptr_nick;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
pos_channel = strchr (arguments, ' ');
@@ -4247,7 +4247,7 @@ irc_cmd_recv_353 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_gui_buffer *ptr_buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -4421,7 +4421,7 @@ irc_cmd_recv_366 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_nick *ptr_nick;
int num_nicks, num_op, num_halfop, num_voice, num_normal;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
pos = strchr (arguments, ' ');
@@ -4530,7 +4530,7 @@ irc_cmd_recv_367 (t_irc_server *server, char *host, char *nick, char *arguments)
t_gui_buffer *buffer;
time_t datetime;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
/* look for channel */
@@ -4652,7 +4652,7 @@ irc_cmd_recv_368 (t_irc_server *server, char *host, char *nick, char *arguments)
t_irc_channel *ptr_channel;
t_gui_buffer *buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) nick;
pos_channel = strchr (arguments, ' ');
@@ -4713,7 +4713,7 @@ irc_cmd_recv_378 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos, *pos2;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
@@ -4830,7 +4830,7 @@ irc_cmd_recv_438 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos, *pos2;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) host;
(void) nick;
@@ -4869,7 +4869,7 @@ irc_cmd_recv_671 (t_irc_server *server, char *host, char *nick, char *arguments)
{
char *pos_nick, *pos_message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) host;
(void) nick;
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 41dfcb024..60fbf09c9 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -83,7 +83,7 @@ int
irc_cmd_send_admin (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -148,7 +148,7 @@ irc_cmd_send_ame (t_irc_server *server, t_irc_channel *channel,
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -183,7 +183,7 @@ irc_cmd_send_amsg (t_irc_server *server, t_irc_channel *channel,
t_irc_nick *ptr_nick;
char *string;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -328,7 +328,7 @@ irc_cmd_send_away (t_irc_server *server, t_irc_channel *channel,
irc_find_context (server, channel, NULL, &buffer);
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
gui_add_hotlist = 0;
@@ -459,7 +459,7 @@ irc_cmd_send_ctcp (t_irc_server *server, t_irc_channel *channel,
char *pos_type, *pos_args, *pos;
struct timeval tv;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
pos_type = strchr (arguments, ' ');
@@ -733,7 +733,7 @@ int
irc_cmd_send_die (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
(void) arguments;
@@ -782,7 +782,7 @@ int
irc_cmd_send_info (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -830,7 +830,7 @@ int
irc_cmd_send_ison (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "ISON %s", arguments);
@@ -845,7 +845,7 @@ int
irc_cmd_send_join (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (string_is_channel (arguments))
@@ -988,7 +988,7 @@ irc_cmd_send_kill (t_irc_server *server, t_irc_channel *channel,
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
pos = strchr (arguments, ' ');
@@ -1014,7 +1014,7 @@ int
irc_cmd_send_links (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -1034,7 +1034,7 @@ irc_cmd_send_list (t_irc_server *server, t_irc_channel *channel,
{
char buffer[512];
int ret;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (server->cmd_list_regexp)
@@ -1080,7 +1080,7 @@ int
irc_cmd_send_lusers (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -1122,7 +1122,7 @@ int
irc_cmd_send_mode (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "MODE %s", arguments);
@@ -1168,7 +1168,7 @@ int
irc_cmd_send_motd (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -1415,7 +1415,7 @@ irc_cmd_send_nick (t_irc_server *server, t_irc_channel *channel,
{
t_irc_server *ptr_server;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (!server)
@@ -1453,7 +1453,7 @@ irc_cmd_send_notice (t_irc_server *server, t_irc_channel *channel,
{
char *pos, *string;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
pos = strchr (arguments, ' ');
@@ -1528,7 +1528,7 @@ int
irc_cmd_send_oper (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "OPER %s", arguments);
@@ -1626,7 +1626,7 @@ int
irc_cmd_send_ping (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "PING %s", arguments);
@@ -1641,7 +1641,7 @@ int
irc_cmd_send_pong (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "PONG %s", arguments);
@@ -1760,7 +1760,7 @@ irc_cmd_send_quit (t_irc_server *server, t_irc_channel *channel,
{
t_irc_server *ptr_server;
- /* make gcc happy */
+ /* make C compiler happy */
(void) server;
(void) channel;
@@ -1781,7 +1781,7 @@ int
irc_cmd_send_quote (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "%s", arguments);
@@ -1796,7 +1796,7 @@ int
irc_cmd_send_rehash (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
(void) arguments;
@@ -1812,7 +1812,7 @@ int
irc_cmd_send_restart (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
(void) arguments;
@@ -1828,7 +1828,7 @@ int
irc_cmd_send_service (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "SERVICE %s", arguments);
@@ -1843,7 +1843,7 @@ int
irc_cmd_send_servlist (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -1863,7 +1863,7 @@ irc_cmd_send_squery (t_irc_server *server, t_irc_channel *channel,
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
pos = strchr (arguments, ' ');
@@ -1891,7 +1891,7 @@ int
irc_cmd_send_squit (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "SQUIT %s", arguments);
@@ -1906,7 +1906,7 @@ int
irc_cmd_send_stats (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -1925,7 +1925,7 @@ int
irc_cmd_send_summon (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "SUMMON %s", arguments);
@@ -1940,7 +1940,7 @@ int
irc_cmd_send_time (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -2020,7 +2020,7 @@ int
irc_cmd_send_trace (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -2115,7 +2115,7 @@ int
irc_cmd_send_userhost (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "USERHOST %s", arguments);
@@ -2130,7 +2130,7 @@ int
irc_cmd_send_users (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -2215,7 +2215,7 @@ int
irc_cmd_send_wallops (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "WALLOPS :%s", arguments);
@@ -2230,7 +2230,7 @@ int
irc_cmd_send_who (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
if (arguments)
@@ -2248,7 +2248,7 @@ int
irc_cmd_send_whois (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "WHOIS %s", arguments);
@@ -2263,7 +2263,7 @@ int
irc_cmd_send_whowas (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) channel;
server_sendf (server, "WHOWAS %s", arguments);
diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c
index 6d0874d9a..9cda527e2 100644
--- a/src/plugins/aspell/weechat-aspell.c
+++ b/src/plugins/aspell/weechat-aspell.c
@@ -996,7 +996,7 @@ weechat_aspell_speller_command (t_weechat_plugin *p,
char **args;
int c, r;
- /* make gcc happy */
+ /* make C compiler happy */
(void) p;
(void) handler_args;
(void) handler_pointer;
@@ -1227,7 +1227,7 @@ weechat_aspell_keyb_check (t_weechat_plugin *p, int argc, char **argv,
char *input, *ptr_input, *pos_space, *clword;
int count, offset;
- /* make gcc happy */
+ /* make C compiler happy */
(void) p;
(void) handler_args;
(void) handler_pointer;
@@ -1381,7 +1381,7 @@ void weechat_plugin_end (t_weechat_plugin *p)
aspell_speller_t *s, *t;
aspell_config_t *c, *d;
- /* make gcc happy */
+ /* make C compiler happy */
(void) p;
weechat_aspell_options_save ();
diff --git a/src/plugins/charset/weechat-charset.c b/src/plugins/charset/weechat-charset.c
index 763ea20c5..ed85e3175 100644
--- a/src/plugins/charset/weechat-charset.c
+++ b/src/plugins/charset/weechat-charset.c
@@ -276,7 +276,7 @@ weechat_charset_irc_in (t_weechat_plugin *plugin, int argc, char **argv,
char *nick, *command, *channel, *charset, *ptr_args;
char *output;
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) handler_args;
(void) handler_pointer;
@@ -324,7 +324,7 @@ weechat_charset_irc_out (t_weechat_plugin *plugin, int argc, char **argv,
char *nick, *command, *channel, *charset, *ptr_args;
char *output;
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) handler_args;
(void) handler_pointer;
@@ -457,7 +457,7 @@ weechat_charset_cmd (t_weechat_plugin *plugin,
if (cmd_argc < 3)
return PLUGIN_RC_KO;
- /* make gcc happy */
+ /* make C compiler happy */
(void) handler_args;
(void) handler_pointer;
@@ -609,7 +609,7 @@ weechat_plugin_init (t_weechat_plugin *plugin)
void
weechat_plugin_end (t_weechat_plugin *plugin)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (weechat_charset_terminal)
diff --git a/src/plugins/plugins-interface.c b/src/plugins/plugins-interface.c
index f96c0e66e..d496557c3 100644
--- a/src/plugins/plugins-interface.c
+++ b/src/plugins/plugins-interface.c
@@ -52,7 +52,7 @@ int
weechat_ascii_strcasecmp (t_weechat_plugin *plugin,
char *string1, char *string2)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
return ascii_strcasecmp (string1, string2);
@@ -67,7 +67,7 @@ int
weechat_ascii_strncasecmp (t_weechat_plugin *plugin,
char *string1, char *string2, int max)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
return ascii_strncasecmp (string1, string2, max);
@@ -82,7 +82,7 @@ weechat_explode_string (t_weechat_plugin *plugin, char *string,
char *separators, int num_items_max,
int *num_items)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (!plugin || !string || !separators || !num_items)
@@ -98,7 +98,7 @@ weechat_explode_string (t_weechat_plugin *plugin, char *string,
void
weechat_free_exploded_string (t_weechat_plugin *plugin, char **exploded_string)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
free_exploded_string (exploded_string);
@@ -114,7 +114,7 @@ weechat_plugin_mkdir_home (t_weechat_plugin *plugin, char *directory)
char *dir_name;
int dir_length;
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (!directory)
@@ -753,7 +753,7 @@ weechat_plugin_get_config (t_weechat_plugin *plugin, char *option)
char option_name[256];
void *ptr_option_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
@@ -810,7 +810,7 @@ weechat_plugin_set_config (t_weechat_plugin *plugin, char *option, char *value)
t_irc_server *ptr_server;
t_config_option *ptr_option;
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (!option || !value)
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c
index d63bbf256..812ba9d35 100644
--- a/src/plugins/plugins.c
+++ b/src/plugins/plugins.c
@@ -1258,7 +1258,7 @@ plugin_auto_load_file (t_weechat_plugin *plugin, char *filename)
{
char *pos;
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (cfg_plugins_extension && cfg_plugins_extension[0])
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 085ecb99e..5dd9a5059 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -151,7 +151,7 @@ weechat_lua_timer_handler (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) argv;
int *r;
@@ -257,7 +257,7 @@ weechat_lua_register (lua_State *L)
const char *name, *version, *shutdown_func, *description, *charset;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_current_script = NULL;
@@ -345,7 +345,7 @@ weechat_lua_set_charset (lua_State *L)
const char *charset;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -390,7 +390,7 @@ weechat_lua_print (lua_State *L)
const char *message, *channel_name, *server_name;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -449,7 +449,7 @@ weechat_lua_print_server (lua_State *L)
const char *message;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -492,7 +492,7 @@ weechat_lua_print_infobar (lua_State *L)
const char *message;
int delay, n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -536,7 +536,7 @@ weechat_lua_remove_infobar (lua_State *L)
{
int n, how_many;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -571,7 +571,7 @@ weechat_lua_log (lua_State *L)
const char *message, *channel_name, *server_name;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -630,7 +630,7 @@ weechat_lua_command (lua_State *L)
const char *command, *channel_name, *server_name;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -689,7 +689,7 @@ weechat_lua_add_message_handler (lua_State *L)
const char *irc_command, *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -742,7 +742,7 @@ weechat_lua_add_command_handler (lua_State *L)
const char *completion_template;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -814,7 +814,7 @@ weechat_lua_add_timer_handler (lua_State *L)
const char *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -866,7 +866,7 @@ weechat_lua_add_keyboard_handler (lua_State *L)
const char *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -916,7 +916,7 @@ weechat_lua_add_event_handler (lua_State *L)
const char *event, *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -968,7 +968,7 @@ weechat_lua_remove_handler (lua_State *L)
const char *command, *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1014,7 +1014,7 @@ weechat_lua_remove_timer_handler (lua_State *L)
const char *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1058,7 +1058,7 @@ weechat_lua_remove_keyboard_handler (lua_State *L)
const char *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1102,7 +1102,7 @@ weechat_lua_remove_event_handler (lua_State *L)
const char *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1146,7 +1146,7 @@ weechat_lua_add_modifier (lua_State *L)
const char *type, *command, *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1200,7 +1200,7 @@ weechat_lua_remove_modifier (lua_State *L)
const char *type, *command, *function;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1250,7 +1250,7 @@ weechat_lua_get_info (lua_State *L)
char *info;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1306,7 +1306,7 @@ weechat_lua_get_dcc_info (lua_State *L)
struct in_addr in;
int i;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1421,7 +1421,7 @@ weechat_lua_get_config (lua_State *L)
char *return_value;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1467,7 +1467,7 @@ weechat_lua_set_config (lua_State *L)
const char *option, *value;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1515,7 +1515,7 @@ weechat_lua_get_plugin_config (lua_State *L)
char *return_value;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1563,7 +1563,7 @@ weechat_lua_set_plugin_config (lua_State *L)
const char *option, *value;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1612,7 +1612,7 @@ weechat_lua_get_server_info (lua_State *L)
t_plugin_server_info *server_info, *ptr_server;
char timebuffer[64];
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1759,7 +1759,7 @@ weechat_lua_get_channel_info (lua_State *L)
const char *server;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1843,7 +1843,7 @@ weechat_lua_get_nick_info (lua_State *L)
const char *server, *channel;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1914,7 +1914,7 @@ weechat_lua_get_irc_color (lua_State *L)
const char *color;
int n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -1956,7 +1956,7 @@ weechat_lua_get_window_info (lua_State *L)
t_plugin_window_info *window_info, *ptr_window;
int i;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -2027,7 +2027,7 @@ weechat_lua_get_buffer_info (lua_State *L)
{
t_plugin_buffer_info *buffer_info, *ptr_buffer;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -2099,7 +2099,7 @@ weechat_lua_get_buffer_data (lua_State *L)
char timebuffer[64];
int i, n;
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
if (!lua_current_script)
@@ -2181,7 +2181,7 @@ weechat_lua_get_buffer_data (lua_State *L)
static int
weechat_lua_constant_plugin_rc_ok (lua_State *L)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_OK);
@@ -2191,7 +2191,7 @@ weechat_lua_constant_plugin_rc_ok (lua_State *L)
static int
weechat_lua_constant_plugin_rc_ko (lua_State *L)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_KO);
@@ -2201,7 +2201,7 @@ weechat_lua_constant_plugin_rc_ko (lua_State *L)
static int
weechat_lua_constant_plugin_rc_ok_ignore_weechat (lua_State *L)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_OK_IGNORE_WEECHAT);
@@ -2211,7 +2211,7 @@ weechat_lua_constant_plugin_rc_ok_ignore_weechat (lua_State *L)
static int
weechat_lua_constant_plugin_rc_ok_ignore_plugins (lua_State *L)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_OK_IGNORE_PLUGINS);
@@ -2221,7 +2221,7 @@ weechat_lua_constant_plugin_rc_ok_ignore_plugins (lua_State *L)
static int
weechat_lua_constant_plugin_rc_ok_ignore_all (lua_State *L)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_OK_IGNORE_ALL);
@@ -2464,7 +2464,7 @@ weechat_lua_cmd (t_weechat_plugin *plugin,
t_plugin_handler *ptr_handler;
t_plugin_modifier *ptr_modifier;
- /* make gcc happy */
+ /* make C compiler happy */
(void) handler_args;
(void) handler_pointer;
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index 2593ab309..8ee96d9c8 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -273,7 +273,7 @@ weechat_perl_timer_handler (t_weechat_plugin *plugin,
{
int *r, ret;
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) argv;
@@ -375,7 +375,7 @@ static XS (XS_weechat_register)
char *name, *version, *shutdown_func, *description, *charset;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) items;
(void) cv;
@@ -436,7 +436,7 @@ static XS (XS_weechat_set_charset)
{
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -471,7 +471,7 @@ static XS (XS_weechat_print)
char *message, *channel_name, *server_name;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -518,7 +518,7 @@ static XS (XS_weechat_print_server)
char *message;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -553,7 +553,7 @@ static XS (XS_weechat_print_infobar)
{
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -587,7 +587,7 @@ static XS (XS_weechat_remove_infobar)
{
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -613,7 +613,7 @@ static XS (XS_weechat_log)
char *message, *channel_name, *server_name;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -660,7 +660,7 @@ static XS (XS_weechat_command)
char *channel_name, *server_name;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -705,7 +705,7 @@ static XS (XS_weechat_add_message_handler)
char *irc_command, *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -745,7 +745,7 @@ static XS (XS_weechat_add_command_handler)
char *completion_template;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -795,7 +795,7 @@ static XS (XS_weechat_add_timer_handler)
char *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -834,7 +834,7 @@ static XS (XS_weechat_add_keyboard_handler)
char *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -873,7 +873,7 @@ static XS (XS_weechat_add_event_handler)
char *event, *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -912,7 +912,7 @@ static XS (XS_weechat_remove_handler)
char *command, *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -949,7 +949,7 @@ static XS (XS_weechat_remove_timer_handler)
char *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -985,7 +985,7 @@ static XS (XS_weechat_remove_keyboard_handler)
char *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1021,7 +1021,7 @@ static XS (XS_weechat_remove_event_handler)
char *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1057,7 +1057,7 @@ static XS (XS_weechat_add_modifier)
char *type, *command, *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1097,7 +1097,7 @@ static XS (XS_weechat_remove_modifier)
char *type, *command, *function;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1135,7 +1135,7 @@ static XS (XS_weechat_get_info)
char *arg, *info, *server_name;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1187,7 +1187,7 @@ static XS (XS_weechat_get_dcc_info)
HV *dcc_hash_member;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
(void) items;
@@ -1248,7 +1248,7 @@ static XS (XS_weechat_get_config)
char *option, *return_value;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1294,7 +1294,7 @@ static XS (XS_weechat_set_config)
char *option, *value;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1334,7 +1334,7 @@ static XS (XS_weechat_get_plugin_config)
char *option, *return_value;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1382,7 +1382,7 @@ static XS (XS_weechat_set_plugin_config)
char *option, *value;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1426,7 +1426,7 @@ static XS (XS_weechat_get_server_info)
HV *server_hash, *server_hash_member;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
(void) items;
@@ -1503,7 +1503,7 @@ static XS (XS_weechat_get_channel_info)
HV *channel_hash, *channel_hash_member;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1569,7 +1569,7 @@ static XS (XS_weechat_get_nick_info)
HV *nick_hash;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1631,7 +1631,7 @@ static XS (XS_weechat_input_color)
int color, start, length;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1669,7 +1669,7 @@ static XS (XS_weechat_get_irc_color)
char *color;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
if (!perl_current_script)
@@ -1712,7 +1712,7 @@ static XS (XS_weechat_get_window_info)
HV *window_hash_member;
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
(void) items;
@@ -1760,7 +1760,7 @@ static XS (XS_weechat_get_buffer_info)
char conv[8];
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
(void) items;
@@ -1822,7 +1822,7 @@ static XS (XS_weechat_get_buffer_data)
dXSARGS;
- /* make gcc happy */
+ /* make C compiler happy */
(void) cv;
(void) items;
@@ -2162,7 +2162,7 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
if (cmd_argc < 3)
return PLUGIN_RC_KO;
- /* make gcc happy */
+ /* make C compiler happy */
(void) handler_args;
(void) handler_pointer;
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index 4c204c51a..027971edd 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -193,7 +193,7 @@ weechat_python_timer_handler (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) argv;
int *r;
@@ -298,7 +298,7 @@ weechat_python_register (PyObject *self, PyObject *args)
{
char *name, *version, *shutdown_func, *description, *charset;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
python_current_script = NULL;
@@ -358,7 +358,7 @@ weechat_python_set_charset (PyObject *self, PyObject *args)
{
char *charset;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -398,7 +398,7 @@ weechat_python_print (PyObject *self, PyObject *args)
{
char *message, *channel_name, *server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -437,7 +437,7 @@ weechat_python_print_server (PyObject *self, PyObject *args)
{
char *message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -473,7 +473,7 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
int delay;
char *message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -509,7 +509,7 @@ weechat_python_remove_infobar (PyObject *self, PyObject *args)
{
int how_many;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -544,7 +544,7 @@ weechat_python_log (PyObject *self, PyObject *args)
{
char *message, *channel_name, *server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -583,7 +583,7 @@ weechat_python_command (PyObject *self, PyObject *args)
{
char *command, *channel_name, *server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -622,7 +622,7 @@ weechat_python_add_message_handler (PyObject *self, PyObject *args)
{
char *irc_command, *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -663,7 +663,7 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args)
char *command, *function, *description, *arguments, *arguments_description;
char *completion_template;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -715,7 +715,7 @@ weechat_python_add_timer_handler (PyObject *self, PyObject *args)
int interval;
char *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -755,7 +755,7 @@ weechat_python_add_keyboard_handler (PyObject *self, PyObject *args)
{
char *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -794,7 +794,7 @@ weechat_python_add_event_handler (PyObject *self, PyObject *args)
{
char *event, *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -834,7 +834,7 @@ weechat_python_remove_handler (PyObject *self, PyObject *args)
{
char *command, *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -871,7 +871,7 @@ weechat_python_remove_timer_handler (PyObject *self, PyObject *args)
{
char *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -907,7 +907,7 @@ weechat_python_remove_keyboard_handler (PyObject *self, PyObject *args)
{
char *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -943,7 +943,7 @@ weechat_python_remove_event_handler (PyObject *self, PyObject *args)
{
char *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -979,7 +979,7 @@ weechat_python_add_modifier (PyObject *self, PyObject *args)
{
char *type, *command, *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1020,7 +1020,7 @@ weechat_python_remove_modifier (PyObject *self, PyObject *args)
{
char *type, *command, *function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1059,7 +1059,7 @@ weechat_python_get_info (PyObject *self, PyObject *args)
char *arg, *server_name, *info;
PyObject *object;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1109,7 +1109,7 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
char timebuffer2[64];
struct in_addr in;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
(void) args;
@@ -1199,7 +1199,7 @@ weechat_python_get_config (PyObject *self, PyObject *args)
char *option, *return_value;
PyObject *python_return_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1246,7 +1246,7 @@ weechat_python_set_config (PyObject *self, PyObject *args)
{
char *option, *value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1287,7 +1287,7 @@ weechat_python_get_plugin_config (PyObject *self, PyObject *args)
char *option, *return_value;
PyObject *python_return_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1336,7 +1336,7 @@ weechat_python_set_plugin_config (PyObject *self, PyObject *args)
{
char *option, *value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1380,7 +1380,7 @@ weechat_python_get_server_info (PyObject *self, PyObject *args)
PyObject *server_hash, *server_hash_member;
char timebuffer[64];
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
(void) args;
@@ -1485,7 +1485,7 @@ weechat_python_get_channel_info (PyObject *self, PyObject *args)
PyObject *channel_hash, *channel_hash_member;
char *server;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1558,7 +1558,7 @@ weechat_python_get_nick_info (PyObject *self, PyObject *args)
PyObject *nick_hash, *nick_hash_member;
char *server, *channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1623,7 +1623,7 @@ weechat_python_get_irc_color (PyObject *self, PyObject *args)
{
char *color;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
if (!python_current_script)
@@ -1660,7 +1660,7 @@ weechat_python_get_window_info (PyObject *self, PyObject *args)
t_plugin_window_info *window_info, *ptr_window;
PyObject *window_list, *window_list_member;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
(void) args;
@@ -1724,7 +1724,7 @@ weechat_python_get_buffer_info (PyObject *self, PyObject *args)
t_plugin_buffer_info *buffer_info, *ptr_buffer;
PyObject *buffer_hash, *buffer_hash_member;
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
(void) args;
@@ -1790,7 +1790,7 @@ weechat_python_get_buffer_data (PyObject *self, PyObject *args)
char *server, *channel;
char timebuffer[64];
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
(void) args;
@@ -1898,7 +1898,8 @@ static PyObject *
weechat_python_output (PyObject *self, PyObject *args)
{
char *msg, *m, *p;
- /* make gcc happy */
+
+ /* make C compiler happy */
(void) self;
msg = NULL;
@@ -2181,7 +2182,7 @@ weechat_python_cmd (t_weechat_plugin *plugin,
t_plugin_handler *ptr_handler;
t_plugin_modifier *ptr_modifier;
- /* make gcc happy */
+ /* make C compiler happy */
(void) handler_args;
(void) handler_pointer;
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index d275ec5a1..9ac4a237b 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -118,7 +118,7 @@ weechat_ruby_exec (t_weechat_plugin *plugin,
VALUE rc, err;
int ruby_error, *ret_i;
void *ret_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
ruby_current_script = script;
@@ -232,7 +232,7 @@ weechat_ruby_timer_handler (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) argc;
(void) argv;
int *r;
@@ -338,7 +338,7 @@ weechat_ruby_register (int argc, VALUE *argv, VALUE class)
VALUE name, version, shutdown_func, description, charset;
char *c_name, *c_version, *c_shutdown_func, *c_description, *c_charset;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
ruby_current_script = NULL;
@@ -420,7 +420,7 @@ weechat_ruby_set_charset (VALUE class, VALUE charset)
{
char *c_charset;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -462,7 +462,7 @@ weechat_ruby_print (int argc, VALUE *argv, VALUE class)
VALUE message, channel_name, server_name;
char *c_message, *c_channel_name, *c_server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -521,7 +521,7 @@ weechat_ruby_print_server (VALUE class, VALUE message)
{
char *c_message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -560,7 +560,7 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
int c_delay;
char *c_message;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -603,7 +603,7 @@ weechat_ruby_remove_infobar (int argc, VALUE *argv, VALUE class)
VALUE how_many;
int c_how_many;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -641,7 +641,7 @@ weechat_ruby_log (int argc, VALUE *argv, VALUE class)
VALUE message, channel_name, server_name;
char *c_message, *c_channel_name, *c_server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -701,7 +701,7 @@ weechat_ruby_command (int argc, VALUE *argv, VALUE class)
VALUE command, channel_name, server_name;
char *c_command, *c_channel_name, *c_server_name;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -760,7 +760,7 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
{
char *c_message, *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -809,7 +809,7 @@ weechat_ruby_add_command_handler (int argc, VALUE *argv, VALUE class)
char *c_command, *c_function, *c_description, *c_arguments, *c_arguments_description;
char *c_completion_template;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -897,7 +897,7 @@ weechat_ruby_add_timer_handler (VALUE class, VALUE interval, VALUE function)
int c_interval;
char *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -943,7 +943,7 @@ weechat_ruby_add_keyboard_handler (VALUE class, VALUE function)
{
char *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -986,7 +986,7 @@ weechat_ruby_add_event_handler (VALUE class, VALUE event, VALUE function)
{
char *c_event, *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1032,7 +1032,7 @@ weechat_ruby_remove_handler (VALUE class, VALUE command, VALUE function)
{
char *c_command, *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1075,7 +1075,7 @@ weechat_ruby_remove_timer_handler (VALUE class, VALUE function)
{
char *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1115,7 +1115,7 @@ weechat_ruby_remove_keyboard_handler (VALUE class, VALUE function)
{
char *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1155,7 +1155,7 @@ weechat_ruby_remove_event_handler (VALUE class, VALUE function)
{
char *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1195,7 +1195,7 @@ weechat_ruby_add_modifier (VALUE class, VALUE type, VALUE message, VALUE functio
{
char *c_type, *c_message, *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1244,7 +1244,7 @@ weechat_ruby_remove_modifier (VALUE class, VALUE type, VALUE command, VALUE func
{
char *c_type, *c_command, *c_function;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1291,7 +1291,7 @@ weechat_ruby_get_info (int argc, VALUE *argv, VALUE class)
char *c_arg, *c_server_name, *info;
VALUE arg, server_name, return_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1354,7 +1354,7 @@ weechat_ruby_get_dcc_info (VALUE class)
char timebuffer2[64];
struct in_addr in;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1438,7 +1438,7 @@ weechat_ruby_get_config (VALUE class, VALUE option)
char *c_option, *return_value;
VALUE ruby_return_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1486,7 +1486,7 @@ weechat_ruby_set_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1533,7 +1533,7 @@ weechat_ruby_get_plugin_config (VALUE class, VALUE option)
char *c_option, *return_value;
VALUE ruby_return_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1583,7 +1583,7 @@ weechat_ruby_set_plugin_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1633,7 +1633,7 @@ weechat_ruby_get_server_info (VALUE class)
VALUE server_hash, server_hash_member;
char timebuffer[64];
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1732,7 +1732,7 @@ weechat_ruby_get_channel_info (VALUE class, VALUE server)
VALUE channel_hash, channel_hash_member;
char *c_server;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1805,7 +1805,7 @@ weechat_ruby_get_nick_info (VALUE class, VALUE server, VALUE channel)
VALUE nick_hash, nick_hash_member;
char *c_server, *c_channel;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1873,7 +1873,7 @@ weechat_ruby_get_irc_color (VALUE class, VALUE color)
{
char *c_color;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1911,7 +1911,7 @@ weechat_ruby_get_window_info (VALUE class)
t_plugin_window_info *window_info, *ptr_window;
VALUE window_list, window_list_member;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -1971,7 +1971,7 @@ weechat_ruby_get_buffer_info (VALUE class)
t_plugin_buffer_info *buffer_info, *ptr_buffer;
VALUE buffer_hash, buffer_hash_member;
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -2031,7 +2031,7 @@ weechat_ruby_get_buffer_data (int argc, VALUE *argv, VALUE class)
char *c_server, *c_channel;
char timebuffer[64];
- /* make gcc happy */
+ /* make C compiler happy */
(void) class;
if (!ruby_current_script)
@@ -2102,7 +2102,8 @@ static VALUE
weechat_ruby_output(VALUE self, VALUE str)
{
char *msg, *p, *m;
- /* make gcc happy */
+
+ /* make C compiler happy */
(void) self;
msg = strdup(STR2CSTR(str));
@@ -2143,7 +2144,7 @@ weechat_ruby_output(VALUE self, VALUE str)
static VALUE
weechat_ruby_output_flush(VALUE self)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) self;
return Qnil;
@@ -2341,7 +2342,7 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
t_plugin_handler *ptr_handler;
t_plugin_modifier *ptr_modifier;
- /* make gcc happy */
+ /* make C compiler happy */
(void) handler_args;
(void) handler_pointer;
diff --git a/src/plugins/scripts/weechat-script.c b/src/plugins/scripts/weechat-script.c
index 54c76c4ed..58392581b 100644
--- a/src/plugins/scripts/weechat-script.c
+++ b/src/plugins/scripts/weechat-script.c
@@ -653,7 +653,7 @@ weechat_script_set_charset (t_weechat_plugin *plugin,
t_plugin_script *script,
char *charset)
{
- /* make gcc happy */
+ /* make C compiler happy */
(void) plugin;
if (script->charset)