diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 508927232..7166403e7 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -623,7 +623,6 @@ command_buffer (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } gui_buffer_close (buffer); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); return WEECHAT_RC_OK; } @@ -3330,10 +3329,10 @@ command_window (void *data, struct t_gui_buffer *buffer, number = strtol (argv[2], &error, 10); if (error && !error[0] && (number > 0) && (number < 100)) - gui_window_split_horiz (gui_current_window, number); + gui_window_split_horizontal (gui_current_window, number); } else - gui_window_split_horiz (gui_current_window, 50); + gui_window_split_horizontal (gui_current_window, 50); return WEECHAT_RC_OK; } @@ -3347,10 +3346,10 @@ command_window (void *data, struct t_gui_buffer *buffer, number = strtol (argv[2], &error, 10); if (error && !error[0] && (number > 0) && (number < 100)) - gui_window_split_vertic (gui_current_window, number); + gui_window_split_vertical (gui_current_window, number); } else - gui_window_split_vertic (gui_current_window, 50); + gui_window_split_vertical (gui_current_window, 50); return WEECHAT_RC_OK; } @@ -3874,44 +3873,3 @@ command_startup (int plugins_loaded) } } } - -/* - * command_print_stdout: print list of commands on standard output - */ - -void -command_print_stdout () -{ - struct t_hook *ptr_hook; - - for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook; - ptr_hook = ptr_hook->next_hook) - { - if (!ptr_hook->deleted - && HOOK_COMMAND(ptr_hook, command) - && HOOK_COMMAND(ptr_hook, command)[0] - && !ptr_hook->plugin) - { - string_iconv_fprintf (stdout, "* %s", - HOOK_COMMAND(ptr_hook, command)); - if (HOOK_COMMAND(ptr_hook, args) - && HOOK_COMMAND(ptr_hook, args)[0]) - { - string_iconv_fprintf (stdout, " %s\n\n", - _(HOOK_COMMAND(ptr_hook, args))); - } - else - { - string_iconv_fprintf (stdout, "\n\n"); - } - string_iconv_fprintf (stdout, "%s\n\n", - _(HOOK_COMMAND(ptr_hook, description))); - if (HOOK_COMMAND(ptr_hook, args_description) - && HOOK_COMMAND(ptr_hook, args_description)[0]) - { - string_iconv_fprintf (stdout, "%s\n\n", - _(HOOK_COMMAND(ptr_hook, args_description))); - } - } - } -} diff --git a/src/core/wee-command.h b/src/core/wee-command.h index e15df2019..e83ca7236 100644 --- a/src/core/wee-command.h +++ b/src/core/wee-command.h @@ -26,6 +26,5 @@ extern int command_reload (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol); extern void command_init (); extern void command_startup (int plugins_looaded); -extern void command_print_stdout (); #endif /* wee-command.h */ diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index bb0546c82..539a6887f 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -127,30 +127,6 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name, return new_config_file; } -/* - * config_file_valid_for_plugin: check if a configuration file pointer exists for a plugin - * return 1 if configuration file exists for plugin - * 0 if configuration file is not found for plugin - */ - -int -config_file_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_file *config_file) -{ - struct t_config_file *ptr_config; - - for (ptr_config = config_files; ptr_config; - ptr_config = ptr_config->next_config) - { - if ((ptr_config == config_file) - && (ptr_config->plugin == plugin)) - return 1; - } - - /* configuration file not found */ - return 0; -} - /* * config_file_new_section: create a new section in a config */ @@ -247,37 +223,6 @@ config_file_search_section (struct t_config_file *config_file, return NULL; } -/* - * config_file_section_valid_for_plugin: check if a section pointer exists for a plugin - * return 1 if section exists for plugin - * 0 if section is not found for plugin - */ - -int -config_file_section_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_section *section) -{ - struct t_config_file *ptr_config; - struct t_config_section *ptr_section; - - for (ptr_config = config_files; ptr_config; - ptr_config = ptr_config->next_config) - { - if (ptr_config->plugin == plugin) - { - for (ptr_section = ptr_config->sections; ptr_section; - ptr_section = ptr_section->next_section) - { - if (ptr_section == section) - return 1; - } - } - } - - /* section not found */ - return 0; -} - /* * config_file_option_find_pos: find position for an option in section * (for sorting options) @@ -755,42 +700,6 @@ config_file_search_with_string (const char *option_name, *option = ptr_option; } -/* - * config_file_option_valid_for_plugin: check if an option pointer exists for a plugin - * return 1 if option exists for plugin - * 0 if option is not found for plugin - */ - -int -config_file_option_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_option *option) -{ - struct t_config_file *ptr_config; - struct t_config_section *ptr_section; - struct t_config_option *ptr_option; - - for (ptr_config = config_files; ptr_config; - ptr_config = ptr_config->next_config) - { - if (ptr_config->plugin == plugin) - { - for (ptr_section = ptr_config->sections; ptr_section; - ptr_section = ptr_section->next_section) - { - for (ptr_option = ptr_section->options; ptr_option; - ptr_option = ptr_option->next_option) - { - if (ptr_option == option) - return 1; - } - } - } - } - - /* option not found */ - return 0; -} - /* * config_file_string_boolean_is_valid: return 1 if boolean is valid, otherwise 0 */ @@ -1542,31 +1451,6 @@ config_file_option_set_with_string (const char *option_name, const char *value) return rc; } -/* - * config_file_option_unset_with_string: unset/reset option - * return one of these values: - * WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET - * WEECHAT_CONFIG_OPTION_UNSET_OK_RESET - * WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED - * WEECHAT_CONFIG_OPTION_UNSET_ERROR - */ - -int -config_file_option_unset_with_string (const char *option_name) -{ - struct t_config_option *ptr_option; - int rc; - - rc = WEECHAT_CONFIG_OPTION_UNSET_ERROR; - - config_file_search_with_string (option_name, NULL, NULL, &ptr_option, NULL); - - if (ptr_option) - rc = config_file_option_unset (ptr_option); - - return rc; -} - /* * config_file_option_boolean: return boolean value of an option */ diff --git a/src/core/wee-config-file.h b/src/core/wee-config-file.h index 103abde92..eb35e0c60 100644 --- a/src/core/wee-config-file.h +++ b/src/core/wee-config-file.h @@ -147,8 +147,6 @@ extern struct t_config_file *config_file_new (struct t_weechat_plugin *plugin, int (*callback_reload)(void *data, struct t_config_file *config_file), void *callback_data); -extern int config_file_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_file *config_file); extern struct t_config_section *config_file_new_section (struct t_config_file *config_file, const char *name, int user_can_add_options, @@ -180,8 +178,6 @@ extern struct t_config_section *config_file_new_section (struct t_config_file *c void *callback_delete_option_data); extern struct t_config_section *config_file_search_section (struct t_config_file *config_file, const char *section_name); -extern int config_file_section_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_section *); extern struct t_config_option *config_file_new_option (struct t_config_file *config_file, struct t_config_section *section, const char *name, const char *type, @@ -214,8 +210,6 @@ extern void config_file_search_with_string (const char *option_name, struct t_config_section **section, struct t_config_option **option, char **pos_option_name); -extern int config_file_option_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_config_option *option); extern int config_file_string_to_boolean (const char *text); extern int config_file_option_reset (struct t_config_option *option, int run_callback); @@ -231,7 +225,6 @@ extern void *config_file_option_get_pointer (struct t_config_option *option, extern int config_file_option_is_null (struct t_config_option *option); extern int config_file_option_default_is_null (struct t_config_option *option); extern int config_file_option_set_with_string (const char *option_name, const char *value); -extern int config_file_option_unset_with_string (const char *option_name); extern int config_file_option_boolean (struct t_config_option *option); extern int config_file_option_boolean_default (struct t_config_option *option); extern int config_file_option_integer (struct t_config_option *option); diff --git a/src/core/wee-config.h b/src/core/wee-config.h index ca3715ac8..17314d806 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -172,8 +172,6 @@ extern int config_weechat_debug_set (const char *plugin_name, extern void config_weechat_debug_set_all (); extern int config_weechat_init (); extern int config_weechat_read (); -extern int config_weechat_reload (); extern int config_weechat_write (); -extern void config_weechat_print_stdout (); #endif /* wee-config.h */ diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 6120d8fee..573382c5e 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -31,6 +31,7 @@ #include "wee-infolist.h" #include "wee-log.h" #include "wee-hook.h" +#include "wee-proxy.h" #include "wee-string.h" #include "../gui/gui-bar.h" #include "../gui/gui-bar-item.h" @@ -92,6 +93,8 @@ debug_dump (int crash) config_file_print_log (); + proxy_print_log (); + plugin_print_log (); log_printf (""); diff --git a/src/core/wee-debug.h b/src/core/wee-debug.h index 647a2fe96..c0d01d36c 100644 --- a/src/core/wee-debug.h +++ b/src/core/wee-debug.h @@ -22,7 +22,6 @@ struct t_gui_window_tree; -extern void debug_dump (int crash); extern void debug_sigsegv (); extern void debug_windows_tree (); extern void debug_init (); diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index a149c8be2..39c8fbdc2 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -272,33 +272,6 @@ hook_valid (struct t_hook *hook) return 0; } -/* - * hook_valid_for_plugin: check if a hook pointer exists for a plugin - * return 1 if hook exists for plugin - * 0 if hook is not found for plugin - */ - -int -hook_valid_for_plugin (struct t_weechat_plugin *plugin, struct t_hook *hook) -{ - int type; - struct t_hook *ptr_hook; - - for (type = 0; type < HOOK_NUM_TYPES; type++) - { - for (ptr_hook = weechat_hooks[type]; ptr_hook; - ptr_hook = ptr_hook->next_hook) - { - if (!ptr_hook->deleted && (ptr_hook == hook) - && (ptr_hook->plugin == plugin)) - return 1; - } - } - - /* hook not found */ - return 0; -} - /* * hook_exec_start: code executed before a hook exec */ diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 7b4a387e6..aa2de03a4 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -231,9 +231,6 @@ extern struct t_hook *last_weechat_hook[]; /* hook functions */ extern void hook_init (); -extern int hook_valid (struct t_hook *hook); -extern int hook_valid_for_plugin (struct t_weechat_plugin *plugin, - struct t_hook *hook); extern struct t_hook *hook_command (struct t_weechat_plugin *plugin, const char *command, const char *description, const char *args, const char *args_description, diff --git a/src/core/wee-list.c b/src/core/wee-list.c index da7ed4b82..13429cc53 100644 --- a/src/core/wee-list.c +++ b/src/core/wee-list.c @@ -156,28 +156,6 @@ weelist_add (struct t_weelist *weelist, const char *data, const char *where) return new_item; } -/* - * weelist_dup: duplicate a weelist - */ - -struct t_weelist * -weelist_dup (struct t_weelist *weelist) -{ - struct t_weelist *new_weelist; - struct t_weelist_item *ptr_item; - - new_weelist = weelist_new (); - if (new_weelist) - { - for (ptr_item = weelist->items; ptr_item; - ptr_item = ptr_item->next_item) - { - weelist_add (new_weelist, ptr_item->data, WEECHAT_LIST_POS_END); - } - } - return new_weelist; -} - /* * weelist_search: search data in a list (case sensitive) */ diff --git a/src/core/wee-list.h b/src/core/wee-list.h index fed111d98..5aa0ff8d2 100644 --- a/src/core/wee-list.h +++ b/src/core/wee-list.h @@ -37,7 +37,6 @@ struct t_weelist extern struct t_weelist *weelist_new (); extern struct t_weelist_item *weelist_add (struct t_weelist *weelist, const char *data, const char *where); -extern struct t_weelist *weelist_dup (struct t_weelist *weelist); extern struct t_weelist_item *weelist_search (struct t_weelist *weelist, const char *data); extern struct t_weelist_item *weelist_casesearch (struct t_weelist *weelist, diff --git a/src/core/weechat.h b/src/core/weechat.h index a1ae34217..493e278de 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -106,7 +106,6 @@ extern int weechat_quit; extern char *weechat_home; extern char *weechat_local_charset; -extern void weechat_dump (int crash); extern void weechat_shutdown (int return_code, int crash); #endif /* weechat.h */ diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index d0bc09a40..3bef625ce 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -877,7 +877,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, } else { - if (tree->split_horiz) + if (tree->split_horizontal) { size1 = (height * tree->split_pct) / 100; size2 = height - size1; @@ -961,11 +961,11 @@ gui_window_refresh_windows () } /* - * gui_window_split_horiz: split a window horizontally + * gui_window_split_horizontal: split a window horizontally */ struct t_gui_window * -gui_window_split_horiz (struct t_gui_window *window, int percentage) +gui_window_split_horizontal (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; int height1, height2; @@ -1005,11 +1005,11 @@ gui_window_split_horiz (struct t_gui_window *window, int percentage) } /* - * gui_window_split_vertic: split a window vertically + * gui_window_split_vertical: split a window vertically */ struct t_gui_window * -gui_window_split_vertic (struct t_gui_window *window, int percentage) +gui_window_split_vertical (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; int width1, width2; @@ -1067,8 +1067,8 @@ gui_window_resize (struct t_gui_window *window, int percentage) if (parent) { old_split_pct = parent->split_pct; - if (((parent->split_horiz) && (window->ptr_tree == parent->child2)) - || ((!(parent->split_horiz)) && (window->ptr_tree == parent->child1))) + if (((parent->split_horizontal) && (window->ptr_tree == parent->child2)) + || ((!(parent->split_horizontal)) && (window->ptr_tree == parent->child1))) parent->split_pct = percentage; else parent->split_pct = 100 - percentage; diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index 63414ccff..a14b77379 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -71,8 +71,6 @@ extern int gui_keyboard_read_cb (void *data); /* window functions */ extern void gui_window_redraw_buffer (struct t_gui_buffer *buffer); extern int gui_window_utf_char_valid (const char *utf_char); -extern void gui_window_wprintw (WINDOW *window, const char *data, ...); -extern void gui_window_clear_weechat (WINDOW *window, int num_color); extern void gui_window_clear (WINDOW *window, int bg); extern void gui_window_reset_style (WINDOW *window, int num_color); extern void gui_window_set_color_style (WINDOW *window, int style); diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c index 2f985d6a9..d5fc0c078 100644 --- a/src/gui/gtk/gui-gtk-chat.c +++ b/src/gui/gtk/gui-gtk-chat.c @@ -473,9 +473,11 @@ gui_chat_draw_line (struct t_gui_buffer *buffer, struct t_gui_line *line) struct t_gui_window *ptr_win; unsigned char *message_without_color; GtkTextIter start, end; - - ptr_win = gui_buffer_find_window (buffer); - if (ptr_win) + + (void) buffer; + + //ptr_win = gui_buffer_find_window (buffer); + //if (ptr_win) { message_without_color = gui_color_decode ((unsigned char *)(line->message)); if (message_without_color) diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index 021aa4dbf..1ff046acc 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -418,7 +418,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, } else { - if (tree->split_horiz) + if (tree->split_horizontal) { size1 = (height * tree->split_pct) / 100; size2 = height - size1; @@ -461,11 +461,11 @@ gui_window_refresh_windows () } /* - * gui_window_split_horiz: split a window horizontally + * gui_window_split_horizontal: split a window horizontally */ struct t_gui_window * -gui_window_split_horiz (struct t_gui_window *window, int percentage) +gui_window_split_horizontal (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; int height1, height2; @@ -506,11 +506,11 @@ gui_window_split_horiz (struct t_gui_window *window, int percentage) } /* - * gui_window_split_vertic: split a window vertically + * gui_window_split_vertical: split a window vertically */ struct t_gui_window * -gui_window_split_vertic (struct t_gui_window *window, int percentage) +gui_window_split_vertical (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; int width1, width2; diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index 7bf70cdef..192d99961 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -60,6 +60,9 @@ struct t_gui_bar *gui_temp_bars = NULL; /* bars used when reading config */ struct t_gui_bar *last_gui_temp_bar = NULL; +void gui_bar_free_bar_windows (struct t_gui_bar *bar); + + /* * gui_bar_valid: check if a bar pointer exists * return 1 if bar exists diff --git a/src/gui/gui-bar.h b/src/gui/gui-bar.h index 918d8223b..ab6b37967 100644 --- a/src/gui/gui-bar.h +++ b/src/gui/gui-bar.h @@ -159,16 +159,12 @@ extern struct t_gui_bar *gui_bar_new (const char *name, const char *items); extern void gui_bar_use_temp_bars (); extern void gui_bar_create_default_input (); -extern void gui_bar_create_default_title (); -extern void gui_bar_create_default_status (); -extern void gui_bar_create_default_nicklist (); extern void gui_bar_create_default (); extern void gui_bar_update (const char *name); extern int gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_buffer *buffer, const char *scroll); extern void gui_bar_free (struct t_gui_bar *bar); extern void gui_bar_free_all (); -extern void gui_bar_free_bar_windows (struct t_gui_bar *bar); extern int gui_bar_add_to_infolist (struct t_infolist *infolist, struct t_gui_bar *bar); extern void gui_bar_print_log (); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 400f4cf93..77317d015 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -62,6 +62,9 @@ char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] = { "none", "highlight", "message", "all" }; +void gui_buffer_switch_previous (struct t_gui_window *window); + + /* * gui_buffer_find_pos: find position for buffer in list */ @@ -325,7 +328,6 @@ gui_buffer_new (struct t_weechat_plugin *plugin, new_buffer->input_buffer_length = 0; new_buffer->input_buffer_pos = 0; new_buffer->input_buffer_1st_display = 0; - new_buffer->input_refresh_needed = 1; /* init completion */ new_completion = malloc (sizeof (*new_completion)); @@ -593,17 +595,6 @@ gui_buffer_ask_chat_refresh (struct t_gui_buffer *buffer, int refresh) buffer->chat_refresh_needed = refresh; } -/* - * gui_buffer_ask_input_refresh: set "input_refresh_needed" flag - */ - -void -gui_buffer_ask_input_refresh (struct t_gui_buffer *buffer, int refresh) -{ - if (refresh > buffer->input_refresh_needed) - buffer->input_refresh_needed = refresh; -} - /* * gui_buffer_set_name: set name for a buffer */ @@ -904,7 +895,6 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_input_delete_line (buffer); gui_input_insert_string (buffer, value, 0); gui_input_text_changed_signal (); - gui_buffer_ask_input_refresh (buffer, 1); } else if (string_strcasecmp (property, "input_get_unknown_commands") == 0) { @@ -1087,29 +1077,6 @@ gui_buffer_search_by_number (int number) return NULL; } -/* - * gui_buffer_find_window: find a window displaying buffer - */ - -struct t_gui_window * -gui_buffer_find_window (struct t_gui_buffer *buffer) -{ - struct t_gui_window *ptr_win; - - if (gui_current_window->buffer == buffer) - return gui_current_window; - - for (ptr_win = gui_windows; ptr_win; - ptr_win = ptr_win->next_window) - { - if (ptr_win->buffer == buffer) - return ptr_win; - } - - /* no window found */ - return NULL; -} - /* * gui_buffer_is_scrolled: return 1 if all windows displaying buffer are scrolled * (user doesn't see end of buffer) @@ -1216,7 +1183,24 @@ gui_buffer_close (struct t_gui_buffer *buffer) { if ((buffer == ptr_window->buffer) && ((buffer->next_buffer) || (buffer->prev_buffer))) - gui_buffer_switch_previous (ptr_window); + { + /* switch to previous buffer */ + if (gui_buffers != last_gui_buffer) + { + if (ptr_window->buffer->prev_buffer) + { + gui_window_switch_to_buffer (ptr_window, + ptr_window->buffer->prev_buffer, + 1); + } + else + { + gui_window_switch_to_buffer (ptr_window, + last_gui_buffer, + 1); + } + } + } } } @@ -1283,46 +1267,6 @@ gui_buffer_close (struct t_gui_buffer *buffer) free (buffer); } -/* - * gui_buffer_switch_previous: switch to previous buffer - */ - -void -gui_buffer_switch_previous (struct t_gui_window *window) -{ - if (!gui_ok) - return; - - /* if only one buffer then return */ - if (gui_buffers == last_gui_buffer) - return; - - if (window->buffer->prev_buffer) - gui_window_switch_to_buffer (window, window->buffer->prev_buffer, 1); - else - gui_window_switch_to_buffer (window, last_gui_buffer, 1); -} - -/* - * gui_buffer_switch_next: switch to next buffer - */ - -void -gui_buffer_switch_next (struct t_gui_window *window) -{ - if (!gui_ok) - return; - - /* if only one buffer then return */ - if (gui_buffers == last_gui_buffer) - return; - - if (window->buffer->next_buffer) - gui_window_switch_to_buffer (window, window->buffer->next_buffer, 1); - else - gui_window_switch_to_buffer (window, gui_buffers, 1); -} - /* * gui_buffer_switch_by_number: switch to another buffer with number */ @@ -1749,7 +1693,6 @@ gui_buffer_print_log () log_printf (" input_buffer_length. . : %d", ptr_buffer->input_buffer_length); log_printf (" input_buffer_pos . . . : %d", ptr_buffer->input_buffer_pos); log_printf (" input_buffer_1st_disp. : %d", ptr_buffer->input_buffer_1st_display); - log_printf (" input_refresh_needed . : %d", ptr_buffer->input_refresh_needed); log_printf (" completion . . . . . . : 0x%lx", ptr_buffer->completion); log_printf (" history. . . . . . . . : 0x%lx", ptr_buffer->history); log_printf (" last_history . . . . . : 0x%lx", ptr_buffer->last_history); diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index facff15b0..17a0216f6 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -20,6 +20,7 @@ #ifndef __WEECHAT_GUI_BUFFER_H #define __WEECHAT_GUI_BUFFER_H 1 +struct t_gui_window; struct t_infolist; enum t_gui_buffer_type @@ -136,7 +137,6 @@ struct t_gui_buffer int input_buffer_length; /* number of chars in buffer */ int input_buffer_pos; /* position into buffer */ int input_buffer_1st_display; /* first char displayed on screen */ - int input_refresh_needed; /* refresh for input is needed ? */ /* completion */ struct t_gui_completion *completion; /* completion */ @@ -204,18 +204,8 @@ extern void *gui_buffer_get_pointer (struct t_gui_buffer *buffer, const char *property); extern void gui_buffer_ask_chat_refresh (struct t_gui_buffer *buffer, int refresh); -extern void gui_buffer_ask_nicklist_refresh (struct t_gui_buffer *buffer, - int refresh); -extern void gui_buffer_ask_input_refresh (struct t_gui_buffer *buffer, - int refresh); -extern void gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name); extern void gui_buffer_set_title (struct t_gui_buffer *buffer, const char *new_title); -extern void gui_buffer_set_nicklist (struct t_gui_buffer *buffer, - int nicklist); -extern void gui_buffer_set_nicklist_case_sensitive (struct t_gui_buffer * buffer, - int case_sensitive); -extern void gui_buffer_set_nick (struct t_gui_buffer *buffer, const char *new_nick); extern void gui_buffer_set_highlight_words (struct t_gui_buffer *buffer, const char *new_highlight_words); extern void gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer, @@ -231,13 +221,10 @@ extern struct t_gui_buffer *gui_buffer_search_by_name (const char *plugin, extern struct t_gui_buffer *gui_buffer_search_by_partial_name (const char *plugin, const char *name); extern struct t_gui_buffer *gui_buffer_search_by_number (int number); -extern struct t_gui_window *gui_buffer_find_window (struct t_gui_buffer *buffer); extern int gui_buffer_is_scrolled (struct t_gui_buffer *buffer); extern void gui_buffer_clear (struct t_gui_buffer *buffer); extern void gui_buffer_clear_all (); extern void gui_buffer_close (struct t_gui_buffer *buffer); -extern void gui_buffer_switch_previous (struct t_gui_window *window); -extern void gui_buffer_switch_next (struct t_gui_window *window); extern void gui_buffer_switch_by_number (struct t_gui_window *window, int number); extern void gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number); diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h index 23410d0d8..12ddeb1b7 100644 --- a/src/gui/gui-chat.h +++ b/src/gui/gui-chat.h @@ -85,8 +85,6 @@ extern struct t_gui_line *gui_chat_line_add (struct t_gui_buffer *buffer, const char *tags, const char *prefix, const char *message); -extern void gui_chat_line_add_y (struct t_gui_buffer *buffer, int y, - const char *message); extern void gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, const char *tags, const char *message, ...); diff --git a/src/gui/gui-color.c b/src/gui/gui-color.c index ca83d5062..98e6522b9 100644 --- a/src/gui/gui-color.c +++ b/src/gui/gui-color.c @@ -72,33 +72,6 @@ gui_color_search_config_int (const char *color_name) return -1; } -/* - * gui_color_search_config_str: search a color configuration name with number - * return color configuration name, NULL if not found - */ - -const char * -gui_color_search_config_str (int color_number) -{ - struct t_config_section *ptr_section; - struct t_config_option *ptr_option; - - ptr_section = config_file_search_section (weechat_config_file, - "color"); - if (ptr_section) - { - for (ptr_option = ptr_section->options; ptr_option; - ptr_option = ptr_option->next_option) - { - if (ptr_option->min == color_number) - return ptr_option->name; - } - } - - /* color not found */ - return NULL; -} - /* * gui_color_get_custom: get a custom color with a name (GUI dependent) */ diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h index f4ab3b7cb..508ba7a12 100644 --- a/src/gui/gui-color.h +++ b/src/gui/gui-color.h @@ -125,7 +125,6 @@ extern struct t_gui_color *gui_color[]; /* color functions */ extern int gui_color_search_config_int (const char *color_name); -extern const char *gui_color_search_config_str (int color_number); extern const char *gui_color_get_custom (const char *color_name); extern unsigned char *gui_color_decode (const unsigned char *string); extern void gui_color_free (struct t_gui_color *color); diff --git a/src/gui/gui-history.h b/src/gui/gui-history.h index 9326c1e67..501c201e2 100644 --- a/src/gui/gui-history.h +++ b/src/gui/gui-history.h @@ -33,7 +33,6 @@ extern struct t_gui_history *history_global; extern struct t_gui_history *last_history_global; extern struct t_gui_history *history_global_ptr; -/* history functions (gui-history.c) */ extern void gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string); extern void gui_history_global_add (const char *string); extern void gui_history_global_free (); diff --git a/src/gui/gui-hotlist.h b/src/gui/gui-hotlist.h index 9d30773e1..59387007b 100644 --- a/src/gui/gui-hotlist.h +++ b/src/gui/gui-hotlist.h @@ -47,7 +47,6 @@ extern int gui_add_hotlist; /* hotlist functions */ -extern void gui_hotlist_changed_signal (); extern void gui_hotlist_add (struct t_gui_buffer *buffer, int priority, struct timeval *creation_time, int allow_current_buffer); diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 8e1901b3d..59be19d63 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -233,7 +233,6 @@ gui_input_clipboard_paste () gui_input_clipboard, -1); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -271,7 +270,6 @@ gui_input_return () gui_completion_stop (gui_current_window->buffer->completion, 1); gui_current_window->buffer->ptr_history = NULL; gui_input_optimize_size (gui_current_window->buffer); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); input_data (gui_current_window->buffer, command); free (command); @@ -381,7 +379,6 @@ gui_input_complete (struct t_gui_buffer *buffer) buffer->completion->position++; } } - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -444,7 +441,6 @@ gui_input_search_text () { gui_current_window->buffer->text_search_exact ^= 1; gui_window_search_restart (gui_current_window); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); } gui_input_search_signal (); } @@ -477,7 +473,6 @@ gui_input_delete_previous_char () gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0'; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -509,7 +504,6 @@ gui_input_delete_next_char () gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0'; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -569,7 +563,6 @@ gui_input_delete_previous_word () gui_current_window->buffer->input_buffer_pos -= length_deleted; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -609,7 +602,6 @@ gui_input_delete_next_word () gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0'; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -646,7 +638,6 @@ gui_input_delete_beginning_of_line () gui_current_window->buffer->input_buffer_pos = 0; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -679,7 +670,6 @@ gui_input_delete_end_of_line (const char *args) gui_current_window->buffer->input_buffer_length = utf8_strlen (gui_current_window->buffer->input_buffer); gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -699,7 +689,6 @@ gui_input_delete_line () gui_current_window->buffer->input_buffer_pos = 0; gui_input_optimize_size (gui_current_window->buffer); gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -741,7 +730,6 @@ gui_input_transpose_chars () gui_completion_stop (gui_current_window->buffer->completion, 1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -760,7 +748,6 @@ gui_input_move_beginning_of_line () { gui_current_window->buffer->input_buffer_pos = 0; - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -781,7 +768,6 @@ gui_input_move_end_of_line () gui_current_window->buffer->input_buffer_pos = gui_current_window->buffer->input_buffer_length; - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -800,7 +786,6 @@ gui_input_move_previous_char () { gui_current_window->buffer->input_buffer_pos--; - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -820,7 +805,6 @@ gui_input_move_next_char () { gui_current_window->buffer->input_buffer_pos++; - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -862,7 +846,6 @@ gui_input_move_previous_word () else gui_current_window->buffer->input_buffer_pos = 0; - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -908,7 +891,6 @@ gui_input_move_next_word () utf8_pos (gui_current_window->buffer->input_buffer, utf8_prev_char (gui_current_window->buffer->input_buffer, pos) - gui_current_window->buffer->input_buffer); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_cursor_moved_signal (); } } @@ -968,7 +950,6 @@ gui_input_history_previous () gui_current_window->buffer->input_buffer_1st_display = 0; strcpy (gui_current_window->buffer->input_buffer, gui_current_window->buffer->ptr_history->text); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); } gui_input_text_changed_signal (); } @@ -1018,7 +999,6 @@ gui_input_history_next () strcpy (gui_current_window->buffer->input_buffer, gui_current_window->buffer->ptr_history->text); } - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); } else { @@ -1034,7 +1014,6 @@ gui_input_history_next () gui_current_window->buffer->input_buffer_pos = 0; gui_current_window->buffer->input_buffer_1st_display = 0; gui_input_optimize_size (gui_current_window->buffer); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); } } gui_input_text_changed_signal (); @@ -1079,7 +1058,6 @@ gui_input_history_global_previous () gui_current_window->buffer->input_buffer_1st_display = 0; strcpy (gui_current_window->buffer->input_buffer, history_global_ptr->text); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -1120,7 +1098,6 @@ gui_input_history_global_next () strcpy (gui_current_window->buffer->input_buffer, history_global_ptr->text); } - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); } } @@ -1281,7 +1258,6 @@ gui_input_insert (const char *args) { args2 = string_convert_hex_chars (args); gui_input_insert_string (gui_current_window->buffer, (args2) ? args2 : args, -1); - gui_buffer_ask_input_refresh (gui_current_window->buffer, 1); gui_input_text_changed_signal (); if (args2) free (args2); diff --git a/src/gui/gui-input.h b/src/gui/gui-input.h index 927042b97..554d075c5 100644 --- a/src/gui/gui-input.h +++ b/src/gui/gui-input.h @@ -29,10 +29,7 @@ extern char *gui_input_clipboard; /* input functions */ extern void gui_input_paste_pending_signal (); -extern void gui_input_prompt_changed_signal (); extern void gui_input_text_changed_signal (); -extern void gui_input_search_signal (); -extern void gui_input_optimize_size (struct t_gui_buffer *buffer); extern void gui_input_move (struct t_gui_buffer *buffer, char *target, const char *source, int size); extern int gui_input_insert_string (struct t_gui_buffer *buffer, diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c index 32da8460b..8b4fc4f2b 100644 --- a/src/gui/gui-layout.c +++ b/src/gui/gui-layout.c @@ -375,7 +375,7 @@ gui_layout_window_save_tree (struct t_gui_layout_window *parent_layout, layout_window = gui_layout_window_add (internal_id++, parent_layout, tree->split_pct, - tree->split_horiz, + tree->split_horizontal, NULL, NULL); } @@ -475,13 +475,13 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window) if (layout_window->split_horiz) { - new_window = gui_window_split_horiz (gui_current_window, - layout_window->split_pct); + new_window = gui_window_split_horizontal (gui_current_window, + layout_window->split_pct); } else { - new_window = gui_window_split_vertic (gui_current_window, - layout_window->split_pct); + new_window = gui_window_split_vertical (gui_current_window, + layout_window->split_pct); } if (layout_window->child2) diff --git a/src/gui/gui-nicklist.h b/src/gui/gui-nicklist.h index 9ff9278c0..80fdb04f7 100644 --- a/src/gui/gui-nicklist.h +++ b/src/gui/gui-nicklist.h @@ -76,16 +76,10 @@ extern void gui_nicklist_get_next_item (struct t_gui_buffer *buffer, struct t_gui_nick_group **group, struct t_gui_nick **nick); extern char *gui_nicklist_get_group_start (const char *name); -extern int gui_nicklist_get_max_length (struct t_gui_buffer *buffer, - struct t_gui_nick_group *group); extern void gui_nicklist_compute_visible_count (struct t_gui_buffer *buffer, struct t_gui_nick_group *group); extern int gui_nicklist_add_to_infolist (struct t_infolist *infolist, struct t_gui_buffer *buffer); extern void gui_nicklist_print_log (struct t_gui_nick_group *group, int indent); -/* nicklist functions (GUI dependent) */ - -extern int gui_nicklist_draw (struct t_gui_buffer *buffer, int erase); - #endif /* gui-nicklist.h */ diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 3aa4abe3d..f4d4cc229 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -74,7 +74,7 @@ gui_window_tree_init (struct t_gui_window *window) return 0; gui_windows_tree->parent_node = NULL; gui_windows_tree->split_pct = 0; - gui_windows_tree->split_horiz = 0; + gui_windows_tree->split_horizontal = 0; gui_windows_tree->child1 = NULL; gui_windows_tree->child2 = NULL; gui_windows_tree->window = window; @@ -91,7 +91,7 @@ gui_window_tree_node_to_leaf (struct t_gui_window_tree *node, struct t_gui_window *window) { node->split_pct = 0; - node->split_horiz = 0; + node->split_horizontal = 0; if (node->child1) { free (node->child1); @@ -157,12 +157,12 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer, if (width_pct == 100) { - ptr_tree->split_horiz = 1; + ptr_tree->split_horizontal = 1; ptr_tree->split_pct = height_pct; } else { - ptr_tree->split_horiz = 0; + ptr_tree->split_horizontal = 0; ptr_tree->split_pct = width_pct; } @@ -439,30 +439,6 @@ gui_window_free (struct t_gui_window *window) free (window); } -/* - * gui_window_search_by_buffer: search a window by buffer - * (return first window displaying this buffer) - */ - -struct t_gui_window * -gui_window_search_by_buffer (struct t_gui_buffer *buffer) -{ - struct t_gui_window *ptr_window; - - if (!gui_ok) - return NULL; - - for (ptr_window = gui_windows; ptr_window; - ptr_window = ptr_window->next_window) - { - if (ptr_window->buffer == buffer) - return ptr_window; - } - - /* window not found */ - return NULL; -} - /* * gui_window_switch_previous: switch to previous window */ @@ -756,7 +732,6 @@ gui_window_scroll_previous_highlight (struct t_gui_window *window) window->first_line_displayed = (window->start_line == window->buffer->lines); gui_buffer_ask_chat_refresh (window->buffer, 2); - gui_buffer_ask_input_refresh (window->buffer, 1); return; } ptr_line = ptr_line->prev_line; @@ -790,7 +765,6 @@ gui_window_scroll_next_highlight (struct t_gui_window *window) window->first_line_displayed = (window->start_line == window->buffer->lines); gui_buffer_ask_chat_refresh (window->buffer, 2); - gui_buffer_ask_input_refresh (window->buffer, 1); return; } ptr_line = ptr_line->next_line; @@ -880,7 +854,6 @@ gui_window_search_start (struct t_gui_window *window) window->buffer->text_search_input = strdup (window->buffer->input_buffer); gui_input_delete_line (window->buffer); - gui_buffer_ask_input_refresh (window->buffer, 1); } /* @@ -923,7 +896,6 @@ gui_window_search_stop (struct t_gui_window *window) window->start_line_pos = 0; gui_hotlist_remove_buffer (window->buffer); gui_buffer_ask_chat_refresh (window->buffer, 2); - gui_buffer_ask_input_refresh (window->buffer, 1); } /* diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h index baeb8d53c..222ac33a6 100644 --- a/src/gui/gui-window.h +++ b/src/gui/gui-window.h @@ -87,7 +87,7 @@ struct t_gui_window_tree /* node info */ int split_pct; /* % of split size (child1) */ - int split_horiz; /* 1 if horizontal, 0 if vertical */ + int split_horizontal; /* 1 if horizontal, 0 if vertical */ struct t_gui_window_tree *child1; /* first child, NULL if a leaf */ struct t_gui_window_tree *child2; /* second child, NULL if a leaf */ @@ -123,8 +123,6 @@ extern void gui_window_set_layout_plugin_name (struct t_gui_window *window, extern void gui_window_set_layout_buffer_name (struct t_gui_window *window, const char *buffer_name); extern void gui_window_free (struct t_gui_window *window); -extern struct t_gui_window *gui_window_search_by_buffer (struct t_gui_buffer *buffer); -extern void gui_window_switch_server (struct t_gui_window *window); extern void gui_window_switch_previous (struct t_gui_window *window); extern void gui_window_switch_next (struct t_gui_window *window); extern void gui_window_switch_by_buffer (struct t_gui_window *window, @@ -158,12 +156,11 @@ extern void gui_window_scroll_up (struct t_gui_window *window); extern void gui_window_scroll_down (struct t_gui_window *window); extern void gui_window_scroll_top (struct t_gui_window *window); extern void gui_window_scroll_bottom (struct t_gui_window *window); -extern void gui_window_init_subwindows (struct t_gui_window *window); extern void gui_window_refresh_windows (); -extern struct t_gui_window *gui_window_split_horiz (struct t_gui_window *window, - int percentage); -extern struct t_gui_window *gui_window_split_vertic (struct t_gui_window *window, - int percentage); +extern struct t_gui_window *gui_window_split_horizontal (struct t_gui_window *window, + int percentage); +extern struct t_gui_window *gui_window_split_vertical (struct t_gui_window *window, + int percentage); extern void gui_window_resize (struct t_gui_window *window, int percentage); extern int gui_window_merge (struct t_gui_window *window); extern void gui_window_merge_all (struct t_gui_window *window); diff --git a/src/plugins/irc/irc-bar-item.h b/src/plugins/irc/irc-bar-item.h index 757d66bad..6b79b317f 100644 --- a/src/plugins/irc/irc-bar-item.h +++ b/src/plugins/irc/irc-bar-item.h @@ -22,4 +22,4 @@ extern void irc_bar_item_init (); -#endif /* irc-bar_item.h */ +#endif /* irc-bar-item.h */ diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 8c02fd66c..daf9adced 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -208,51 +208,6 @@ irc_channel_search (struct t_irc_server *server, const char *channel_name) return NULL; } -/* - * irc_channel_search_any: returns pointer on a channel with name - */ - -struct t_irc_channel * -irc_channel_search_any (struct t_irc_server *server, const char *channel_name) -{ - struct t_irc_channel *ptr_channel; - - if (!server || !channel_name) - return NULL; - - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (weechat_strcasecmp (ptr_channel->name, channel_name) == 0) - return ptr_channel; - } - return NULL; -} - -/* - * irc_channel_search_any_without_buffer: returns pointer on a channel with name - * looks only for channels without buffer - */ - -struct t_irc_channel * -irc_channel_search_any_without_buffer (struct t_irc_server *server, - const char *channel_name) -{ - struct t_irc_channel *ptr_channel; - - if (!server || !channel_name) - return NULL; - - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (!ptr_channel->buffer - && (weechat_strcasecmp (ptr_channel->name, channel_name) == 0)) - return ptr_channel; - } - return NULL; -} - /* * irc_channel_is_channel: returns 1 if string is channel */ diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index fed2c653d..c6c36160a 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -81,10 +81,6 @@ extern void irc_channel_free (struct t_irc_server *server, extern void irc_channel_free_all (struct t_irc_server *server); extern struct t_irc_channel *irc_channel_search (struct t_irc_server *server, const char *channel_name); -extern struct t_irc_channel *irc_channel_search_any (struct t_irc_server *server, - const char *channel_name); -extern struct t_irc_channel *irc_channel_search_any_without_buffer (struct t_irc_server *server, - const char *channel_name); extern int irc_channel_is_channel (const char *string); extern void irc_channel_remove_away (struct t_irc_channel *channel); extern void irc_channel_check_away (struct t_irc_server *server, diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index f5bddbf86..f12115958 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -74,8 +74,6 @@ extern struct t_config_option *irc_config_server_default[]; extern void irc_config_server_change_cb (void *data, struct t_config_option *option); -extern void irc_config_server_delete_cb (void *data, - struct t_config_option *option); struct t_config_option *irc_config_server_new_option (struct t_config_file *config_file, struct t_config_section *section, int index_option, diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index e803a51b1..c804a6dcc 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -112,37 +112,6 @@ irc_display_away (struct t_irc_server *server, const char *string1, const char * } } -/* - * irc_display_mode: display IRC message for mode change - */ - -void -irc_display_mode (struct t_gui_buffer *buffer, - const char *channel_name, const char *nick_name, - char set_flag, const char *symbol, const char *nick_host, - const char *message, const char *param) -{ - weechat_printf (buffer, - "%s[%s%s%s/%s%c%s%s] %s%s %s%s%s%s%s", - IRC_COLOR_CHAT_DELIMITERS, - (channel_name) ? - IRC_COLOR_CHAT_CHANNEL : - IRC_COLOR_CHAT_NICK, - (channel_name) ? channel_name : nick_name, - IRC_COLOR_CHAT, - IRC_COLOR_CHAT_CHANNEL, - set_flag, - symbol, - IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT_NICK, - nick_host, - IRC_COLOR_CHAT, - message, - (param) ? " " : "", - (param) ? IRC_COLOR_CHAT_NICK : "", - (param) ? param : ""); -} - /* * irc_display_server: display server description */ diff --git a/src/plugins/irc/irc-display.h b/src/plugins/irc/irc-display.h index 739acbe4b..7f320bf61 100644 --- a/src/plugins/irc/irc-display.h +++ b/src/plugins/irc/irc-display.h @@ -21,17 +21,8 @@ #define __WEECHAT_IRC_DISPLAY_H 1 extern void irc_display_hide_password (char *string, int look_for_nickserv); -extern void irc_display_nick (struct t_gui_buffer *buffer, - struct t_irc_nick *nick, const char *nickname, - int type, int display_around, - const char *force_color, int no_nickmode); extern void irc_display_away (struct t_irc_server *server, const char *string1, const char *string2); -extern void irc_display_mode (struct t_gui_buffer *buffer, - const char *channel_name, const char *nick_name, - char set_flag, const char *symbol, - const char *nick_host, const char *message, - const char *param); extern void irc_display_server (struct t_irc_server *server, int with_detail); #endif /* irc-display.h */ diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index e160bbde7..0a8ed6065 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -62,6 +62,11 @@ char *irc_server_option_default[IRC_SERVER_NUM_OPTIONS] = }; +void irc_server_reconnect (struct t_irc_server *server); +void irc_server_check_away (); +void irc_server_free_data (struct t_irc_server *server); + + /* * irc_server_valid: check if a server pointer exists * return 1 if server exists @@ -672,71 +677,6 @@ irc_server_free_all () irc_server_free (irc_servers); } -/* - * irc_server_new: creates a new server, and initialize it - */ -/* -struct t_irc_server * -irc_server_new (const char *name, int autoconnect, int autoreconnect, - int autoreconnect_delay, const char *proxy, - const char *addresses, int ipv6, int ssl, - const char *password, const char *nicks, - const char *username, const char *realname, - const char *local_hostname, const char *command, - int command_delay, const char *autojoin, int autorejoin) -{ - struct t_irc_server *new_server; - - if (!name || !addresses) - return NULL; - - if (weechat_irc_plugin->debug) - { - weechat_log_printf ("Creating new server (name:%s, proxy:%s, " - "addresses:%s, pwd:%s, nicks:%s, username:%s, " - "realname:%s, local_hostname: %s, command:%s, " - "autojoin:%s, autorejoin:%s)", - name, proxy, addresses, (password) ? password : "", - (nicks) ? nicks : "", (username) ? username : "", - (realname) ? realname : "", - (local_hostname) ? local_hostname : "", - (command) ? command : "", - (autojoin) ? autojoin : "", - (autorejoin) ? "on" : "off"); - } - - new_server = irc_server_alloc (name); - if (new_server) - { - new_server->autoconnect = autoconnect; - new_server->autoreconnect = autoreconnect; - new_server->autoreconnect_delay = autoreconnect_delay; - new_server->proxy = (proxy) ? strdup (proxy) : NULL; - irc_server_set_addresses (new_server, addresses); - new_server->ipv6 = ipv6; - new_server->ssl = ssl; - new_server->password = (password) ? strdup (password) : strdup (""); - irc_server_set_nicks (new_server, - (nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS); - new_server->username = - (username) ? strdup (username) : strdup ("weechat"); - new_server->realname = - (realname) ? strdup (realname) : strdup ("realname"); - new_server->local_hostname = - (local_hostname) ? strdup (local_hostname) : NULL; - new_server->command = - (command) ? strdup (command) : NULL; - new_server->command_delay = command_delay; - new_server->autojoin = - (autojoin) ? strdup (autojoin) : NULL; - new_server->autorejoin = autorejoin; - } - else - return NULL; - - return new_server; -} -*/ /* * irc_server_copy: copy a server * return: pointer to new server, NULL if error diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 739bd02d3..63aeeb140 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -181,22 +181,6 @@ extern void irc_server_set_nick (struct t_irc_server *server, const char *nick); extern struct t_irc_server *irc_server_alloc (const char *name); extern int irc_server_alloc_with_url (const char *irc_url); extern void irc_server_free_all (); -extern struct t_irc_server *irc_server_new (const char *name, int autoconnect, - int autoreconnect, - int autoreconnect_delay, - const char *proxy, - const char *addresses, - int ipv6, - int ssl, - const char *password, - const char *nicks, - const char *username, - const char *realname, - const char *hostname, - const char *command, - int command_delay, - const char *autojoin, - int autorejoin); extern struct t_irc_server *irc_server_copy (struct t_irc_server *server, const char *new_name); extern int irc_server_rename (struct t_irc_server *server, const char *new_name); @@ -221,12 +205,9 @@ extern int irc_server_get_pv_count (struct t_irc_server *server); extern void irc_server_set_away (struct t_irc_server *server, const char *nick, int is_away); extern void irc_server_remove_away (); -extern void irc_server_check_away (); -extern void irc_server_reconnect (struct t_irc_server *server); extern void irc_server_disconnect (struct t_irc_server *server, int reconnect); extern void irc_server_disconnect_all (); extern void irc_server_free (struct t_irc_server *server); -extern void irc_server_free_data (struct t_irc_server *server); extern int irc_server_xfer_send_ready_cb (void *data, const char *signal, const char *type_data, void *signal_data); extern int irc_server_xfer_resume_ready_cb (void *data, const char *signal, diff --git a/src/plugins/logger/logger-buffer.c b/src/plugins/logger/logger-buffer.c index d4388ea46..280ecd1c6 100644 --- a/src/plugins/logger/logger-buffer.c +++ b/src/plugins/logger/logger-buffer.c @@ -186,19 +186,6 @@ logger_buffer_free (struct t_logger_buffer *logger_buffer) logger_buffers = new_logger_buffers; } -/* - * logger_buffer_free_all: remove all buffers from list - */ - -void -logger_buffer_free_all () -{ - while (logger_buffers) - { - logger_buffer_free (logger_buffers); - } -} - /* * logger_buffer_add_to_infolist: add a logger buffer in an infolist * return 1 if ok, 0 if error diff --git a/src/plugins/logger/logger-buffer.h b/src/plugins/logger/logger-buffer.h index 1b3789212..9f5886106 100644 --- a/src/plugins/logger/logger-buffer.h +++ b/src/plugins/logger/logger-buffer.h @@ -42,7 +42,6 @@ extern struct t_logger_buffer *logger_buffer_add (struct t_gui_buffer *, extern struct t_logger_buffer *logger_buffer_search_buffer (struct t_gui_buffer *buffer); extern struct t_logger_buffer *logger_buffer_search_log_filename (const char *log_filename); extern void logger_buffer_free (struct t_logger_buffer *logger_buffer); -extern void logger_buffer_free_all (); extern int logger_buffer_add_to_infolist (struct t_infolist *infolist, struct t_logger_buffer *logger_buffer); diff --git a/src/plugins/plugin-api.h b/src/plugins/plugin-api.h index fddfc22b0..4e4353d02 100644 --- a/src/plugins/plugin-api.h +++ b/src/plugins/plugin-api.h @@ -42,14 +42,7 @@ extern const char *plugin_api_color (const char *color_name); extern void plugin_api_command (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer, const char *command); -/* infos */ -extern const char *plugin_api_info_get (struct t_weechat_plugin *plugin, - const char *info); - -/* infolists */ -extern struct t_infolist *plugin_api_infolist_get (const char *name, - void *pointer, - const char *arguments); +/* infolist */ extern int plugin_api_infolist_next (struct t_infolist *infolist); extern int plugin_api_infolist_prev (struct t_infolist *infolist); extern void plugin_api_infolist_reset_item_cursor (struct t_infolist *infolist); @@ -65,6 +58,7 @@ extern void *plugin_api_infolist_buffer (struct t_infolist *infolist, extern time_t plugin_api_infolist_time (struct t_infolist *infolist, const char *var); extern void plugin_api_infolist_free (struct t_infolist *infolist); + extern void plugin_api_init (); #endif /* plugin-api.h */ diff --git a/src/plugins/plugin-config.h b/src/plugins/plugin-config.h index 02ce3eabe..f529b5410 100644 --- a/src/plugins/plugin-config.h +++ b/src/plugins/plugin-config.h @@ -25,15 +25,12 @@ extern struct t_config_file *plugin_config; extern struct t_config_option *plugin_options; -extern struct t_config_option *plugin_config_search_internal (const char *option_name); extern struct t_config_option *plugin_config_search (const char *plugin_name, const char *option_name); -extern int plugin_config_set_internal (const char *option, const char *value); extern int plugin_config_set (const char *plugin_name, const char *option_name, const char *value); extern void plugin_config_init (); extern int plugin_config_read (); -extern int plugin_config_reload (); extern int plugin_config_write (); extern void plugin_config_end (); diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 5c1ed5ee1..557561d4a 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -62,6 +62,9 @@ int plugin_argc; /* command line arguments (used only */ char **plugin_argv; /* first time loading plugin) */ +void plugin_remove (struct t_weechat_plugin *plugin); + + /* * plugin_valid: check if a plugin pointer exists * return 1 if plugin exists diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h index 8264a2ffe..835790465 100644 --- a/src/plugins/plugin.h +++ b/src/plugins/plugin.h @@ -36,7 +36,6 @@ extern struct t_weechat_plugin *plugin_search (const char *name); extern const char *plugin_get_name (struct t_weechat_plugin *plugin); extern struct t_weechat_plugin *plugin_load (const char *filename); extern void plugin_auto_load (); -extern void plugin_remove (struct t_weechat_plugin *plugin); extern void plugin_unload (struct t_weechat_plugin *plugin); extern void plugin_unload_name (const char *name); extern void plugin_unload_all (); diff --git a/src/plugins/xfer/xfer-file.h b/src/plugins/xfer/xfer-file.h index 20f760d92..9a924fca3 100644 --- a/src/plugins/xfer/xfer-file.h +++ b/src/plugins/xfer/xfer-file.h @@ -20,7 +20,6 @@ #ifndef __WEECHAT_XFER_FILE_H #define __WEECHAT_XFER_FILE_H 1 -extern int xfer_file_resume (struct t_xfer *xfer, const char *filename); extern void xfer_file_find_filename (struct t_xfer *xfer); extern void xfer_file_calculate_speed (struct t_xfer *xfer, int ended); diff --git a/src/plugins/xfer/xfer-network.h b/src/plugins/xfer/xfer-network.h index c517e7ba9..ffb285a44 100644 --- a/src/plugins/xfer/xfer-network.h +++ b/src/plugins/xfer/xfer-network.h @@ -20,7 +20,6 @@ #ifndef __WEECHAT_XFER_NETWORK_H #define __WEECHAT_XFER_NETWORK_H 1 -extern int xfer_network_create_pipe (struct t_xfer *xfer); extern void xfer_network_write_pipe (struct t_xfer *xfer, int status, int error); extern void xfer_network_connect_init (struct t_xfer *xfer);