From 437767c0ca37ab06d0f2c2ff2831c7ebe1c3e61f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 10 Feb 2014 17:42:53 +0100 Subject: api: add integer return code for functions hook_{signal|hsignal}_send --- src/gui/curses/gui-curses-chat.c | 4 ++-- src/gui/curses/gui-curses-key.c | 6 +++--- src/gui/curses/gui-curses-main.c | 10 +++++----- src/gui/curses/gui-curses-window.c | 32 ++++++++++++++++---------------- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'src/gui/curses') diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 43a37a208..464518bd2 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1784,8 +1784,8 @@ gui_chat_draw_formatted_buffer (struct t_gui_window *window) if ((window->scroll->scrolling != old_scrolling) || (window->scroll->lines_after != old_lines_after)) { - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); } /* cursor is below end line of chat window? */ diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c index 431cee936..fe8b6b7a8 100644 --- a/src/gui/curses/gui-curses-key.c +++ b/src/gui/curses/gui-curses-key.c @@ -408,8 +408,8 @@ gui_key_flush (int paste) if (key_str[0]) { - hook_signal_send ("key_pressed", - WEECHAT_HOOK_SIGNAL_STRING, key_str); + (void) hook_signal_send ("key_pressed", + WEECHAT_HOOK_SIGNAL_STRING, key_str); if (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) input_old = (gui_current_window->buffer->input_buffer) ? @@ -518,7 +518,7 @@ gui_key_read_cb (void *data, int fd) { /* no data on stdin, terminal lost */ log_printf (_("Terminal lost, exiting WeeChat...")); - hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); + (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); weechat_quit = 1; return WEECHAT_RC_OK; } diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index f5940aa69..92801af54 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -255,7 +255,7 @@ gui_main_signal_sigquit () { log_printf (_("Signal %s received, exiting WeeChat..."), "SIGQUIT"); - hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); + (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); weechat_quit = 1; } @@ -268,7 +268,7 @@ gui_main_signal_sigterm () { log_printf (_("Signal %s received, exiting WeeChat..."), "SIGTERM"); - hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); + (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); weechat_quit = 1; } @@ -287,7 +287,7 @@ gui_main_signal_sighup () */ gui_reload_config = 1; - hook_signal_send ("signal_sighup", WEECHAT_HOOK_SIGNAL_STRING, NULL); + (void) hook_signal_send ("signal_sighup", WEECHAT_HOOK_SIGNAL_STRING, NULL); } /* @@ -481,8 +481,8 @@ gui_main_loop () if (gui_signal_sigwinch_received) { - hook_signal_send ("signal_sigwinch", - WEECHAT_HOOK_SIGNAL_STRING, NULL); + (void) hook_signal_send ("signal_sigwinch", + WEECHAT_HOOK_SIGNAL_STRING, NULL); gui_signal_sigwinch_received = 0; } diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index f4444bf79..da1ed2bf3 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1313,8 +1313,8 @@ gui_window_switch_to_buffer (struct t_gui_window *window, if (old_buffer != buffer) { - hook_signal_send ("buffer_switch", - WEECHAT_HOOK_SIGNAL_POINTER, buffer); + (void) hook_signal_send ("buffer_switch", + WEECHAT_HOOK_SIGNAL_POINTER, buffer); } } @@ -1351,8 +1351,8 @@ gui_window_switch (struct t_gui_window *window) gui_input_move_to_buffer (old_window->buffer, window->buffer); - hook_signal_send ("window_switch", - WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window); + (void) hook_signal_send ("window_switch", + WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window); } /* @@ -1394,8 +1394,8 @@ gui_window_page_up (struct t_gui_window *window) snprintf (scroll, sizeof (scroll), "-%d", num_lines + 1); gui_window_scroll (window, scroll); - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); } break; case GUI_BUFFER_NUM_TYPES: @@ -1451,8 +1451,8 @@ gui_window_page_down (struct t_gui_window *window) snprintf (scroll, sizeof (scroll), "+%d", num_lines + 1); gui_window_scroll (window, scroll); - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); break; case GUI_BUFFER_NUM_TYPES: break; @@ -1491,8 +1491,8 @@ gui_window_scroll_up (struct t_gui_window *window) snprintf (scroll, sizeof (scroll), "-%d", CONFIG_INTEGER(config_look_scroll_amount)); gui_window_scroll (window, scroll); - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); } break; case GUI_BUFFER_NUM_TYPES: @@ -1542,8 +1542,8 @@ gui_window_scroll_down (struct t_gui_window *window) snprintf (scroll, sizeof (scroll), "+%d", CONFIG_INTEGER(config_look_scroll_amount)); gui_window_scroll (window, scroll); - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); break; case GUI_BUFFER_NUM_TYPES: break; @@ -1575,8 +1575,8 @@ gui_window_scroll_top (struct t_gui_window *window) { window->scroll->start_line = NULL; gui_buffer_ask_chat_refresh (window->buffer, 2); - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); } break; case GUI_BUFFER_NUM_TYPES: @@ -1615,8 +1615,8 @@ gui_window_scroll_bottom (struct t_gui_window *window) { gui_buffer_ask_chat_refresh (window->buffer, 2); } - hook_signal_send ("window_scrolled", - WEECHAT_HOOK_SIGNAL_POINTER, window); + (void) hook_signal_send ("window_scrolled", + WEECHAT_HOOK_SIGNAL_POINTER, window); break; case GUI_BUFFER_NUM_TYPES: break; -- cgit v1.2.3