summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/CMakeLists.txt4
-rw-r--r--src/gui/curses/gui-curses-bar-window.c25
-rw-r--r--src/gui/curses/gui-curses-chat.c8
-rw-r--r--src/gui/curses/gui-curses-color.c23
-rw-r--r--src/gui/curses/gui-curses-keyboard.c12
-rw-r--r--src/gui/curses/gui-curses-main.c17
-rw-r--r--src/gui/curses/gui-curses-window.c2
-rw-r--r--src/gui/gtk/CMakeLists.txt2
-rw-r--r--src/gui/gtk/gui-gtk-chat.c2
-rw-r--r--src/gui/gtk/gui-gtk-main.c6
-rw-r--r--src/gui/gtk/gui-gtk-window.c2
-rw-r--r--src/gui/gtk/gui-gtk.h6
-rw-r--r--src/gui/gui-bar-item.c8
-rw-r--r--src/gui/gui-bar.c12
-rw-r--r--src/gui/gui-buffer.c26
-rw-r--r--src/gui/gui-buffer.h18
-rw-r--r--src/gui/gui-chat.c6
-rw-r--r--src/gui/gui-completion.c34
-rw-r--r--src/gui/gui-input.c6
-rw-r--r--src/gui/gui-keyboard.c8
-rw-r--r--src/gui/gui-line.c18
-rw-r--r--src/gui/gui-window.c18
22 files changed, 165 insertions, 98 deletions
diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt
index e6d454610..923013e46 100644
--- a/src/gui/curses/CMakeLists.txt
+++ b/src/gui/curses/CMakeLists.txt
@@ -49,9 +49,9 @@ IF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- IF(HAVE_BACKTRACE)
+ IF(HAVE_BACKTRACE)
LIST(APPEND EXTRA_LIBS "execinfo")
- ENDIF(HAVE_BACKTRACE)
+ ENDIF(HAVE_BACKTRACE)
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
IF(ICONV_LIBRARY)
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index 177a4d72d..a0565d6c7 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -444,8 +444,10 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
GUI_COLOR_BAR_MOVE_CURSOR_CHAR);
}
- /* these values will be overwritten later (by gui_bar_window_print_string)
- if cursor has to move somewhere in bar window */
+ /*
+ * these values will be overwritten later (by gui_bar_window_print_string)
+ * if cursor has to move somewhere in bar window
+ */
bar_window->cursor_x = -1;
bar_window->cursor_y = -1;
@@ -562,12 +564,13 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
diff = length_screen_before_cursor - chars_available;
if (diff > 0)
{
- /* TODO: keep some spaces after end of input
- for example by adding something to diff, like:
- diff += (9 - (diff % 10));
- but then scroll position has to be saved
- (in bar window ?)
- */
+ /*
+ * TODO: keep some spaces after end of input
+ * for example by adding something to diff, like:
+ * diff += (9 - (diff % 10));
+ * but then scroll position has to be saved
+ * (in bar window ?)
+ */
/* compute new start for displaying input */
new_start_input = pos_after_start_input + gui_chat_string_real_pos (pos_after_start_input, diff);
@@ -676,8 +679,10 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
}
- /* move cursor if it was asked in an item content (input_text does that
- to move cursor in user input text) */
+ /*
+ * move cursor if it was asked in an item content (input_text does that
+ * to move cursor in user input text)
+ */
if ((!window || (gui_current_window == window))
&& (bar_window->cursor_x >= 0) && (bar_window->cursor_y >= 0))
{
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index 69d677924..64d905ee3 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -701,7 +701,7 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window,
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_HIGHLIGHT);
}
- }
+ }
/* not enough space to display full prefix? => truncate it! */
if ((CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE)
@@ -1293,8 +1293,10 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase)
void
gui_chat_draw_line (struct t_gui_buffer *buffer, struct t_gui_line *line)
{
- /* This function does nothing in Curses GUI,
- line will be displayed by gui_buffer_draw_chat() */
+ /*
+ * This function does nothing in Curses GUI,
+ * line will be displayed by gui_buffer_draw_chat()
+ */
(void) buffer;
(void) line;
}
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index 887279da0..fdd5993b1 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -187,13 +187,16 @@ void
gui_color_init_pairs ()
{
int i, fg, bg, num_colors;
-
- /* depending on terminal and $TERM value, we can have for example:
- terminal $TERM colors pairs
- urxvt rxvt-unicode 88 256
- urxvt xterm-256color 256 32767
- screen screen 8 64
- screen screen-256color 256 32767
+
+ /*
+ * depending on terminal and $TERM value, we can have for example:
+ *
+ * terminal | $TERM | colors | pairs
+ * ---------+-----------------+--------+------
+ * urxvt | rxvt-unicode | 88 | 256
+ * urxvt | xterm-256color | 256 | 32767
+ * screen | screen | 8 | 64
+ * screen | screen-256color | 256 | 32767
*/
if (has_colors ())
@@ -211,8 +214,10 @@ gui_color_init_pairs ()
/* disable white on white, replaced by black on white */
init_pair (gui_color_last_pair, -1, -1);
- /* white on default bg is default (-1) (for terminals with white/light
- background) */
+ /*
+ * white on default bg is default (-1) (for terminals with white/light
+ * background)
+ */
if (!CONFIG_BOOLEAN(config_look_color_real_white))
init_pair (COLOR_WHITE + 1, -1, -1);
}
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c
index 4b77bca54..38ee9a999 100644
--- a/src/gui/curses/gui-curses-keyboard.c
+++ b/src/gui/curses/gui-curses-keyboard.c
@@ -204,8 +204,10 @@ gui_keyboard_flush ()
int i, key, insert_ok;
char key_str[32], *key_utf, *input_old;
- /* if there's no paste pending, then we use buffer and do actions
- according to keys */
+ /*
+ * if there's no paste pending, then we use buffer and do actions
+ * according to keys
+ */
if (!gui_keyboard_paste_pending)
{
if (gui_keyboard_buffer_size > 0)
@@ -434,8 +436,10 @@ gui_keyboard_read_cb (void *data, int fd)
}
else
{
- /* detect user paste or large amount of text
- if so, ask user what to do */
+ /*
+ * detect user paste or large amount of text
+ * if so, ask user what to do
+ */
if (CONFIG_INTEGER(config_look_paste_max_lines) > 0)
{
paste_lines = gui_keyboard_get_paste_lines ();
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 70dddcdf1..44ba81ec5 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -138,8 +138,10 @@ gui_main_init ()
gui_window_set_title (PACKAGE_NAME " " PACKAGE_VERSION);
}
- /* create bar windows for root bars (they were read from config,
- but no window was created (GUI was not initialized) */
+ /*
+ * create bar windows for root bars (they were read from config,
+ * but no window was created (GUI was not initialized)
+ */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
@@ -190,11 +192,12 @@ gui_main_signal_sigterm ()
void
gui_main_signal_sighup ()
{
- /* SIGHUP signal is received when terminal is closed (exit of WeeChat
- without using /quit command), that's why we set only flag to reload
- config files later (when terminal is closed, config files are NOT
- reloaded, but they are if signal SIGHUP is sent to WeeChat by user)
- */
+ /*
+ * SIGHUP signal is received when terminal is closed (exit of WeeChat
+ * without using /quit command), that's why we set only flag to reload
+ * config files later (when terminal is closed, config files are NOT
+ * reloaded, but they are if signal SIGHUP is sent to WeeChat by user)
+ */
gui_reload_config = 1;
}
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index b5030362e..9489cfe60 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -771,7 +771,7 @@ gui_window_scroll_up (struct t_gui_window *window)
break;
case GUI_BUFFER_NUM_TYPES:
break;
- }
+ }
}
/*
diff --git a/src/gui/gtk/CMakeLists.txt b/src/gui/gtk/CMakeLists.txt
index 348ef2e16..d64ce1e1a 100644
--- a/src/gui/gtk/CMakeLists.txt
+++ b/src/gui/gtk/CMakeLists.txt
@@ -29,7 +29,7 @@ FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
pkg_check_modules(GTK2 gtk+-x11-2.0)
IF(GTK2_FOUND)
- INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} )
+ INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} )
LIST(APPEND EXTRA_LIBS ${GTK2_LIBRARIES})
# ELSE(GTK2_FOUND)
# MESSAGE(FATAL_ERROR "Missing dependency, aborting configuration phase")
diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c
index 363fecede..86d7a8e21 100644
--- a/src/gui/gtk/gui-gtk-chat.c
+++ b/src/gui/gtk/gui-gtk-chat.c
@@ -144,7 +144,7 @@ gui_chat_reset_color_style (struct t_gui_window *window)
void
gui_chat_set_color (struct t_gui_window *window, int fg, int bg)
{
- /* TODO: write this function for Gtk */
+ /* TODO: write this function for Gtk */
/*if (((fg == -1) || (fg == 99))
&& ((bg == -1) || (bg == 99)))
wattron (window->win_chat, COLOR_PAIR(63));
diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c
index b064b3d0b..acffeea95 100644
--- a/src/gui/gtk/gui-gtk-main.c
+++ b/src/gui/gtk/gui-gtk-main.c
@@ -195,8 +195,10 @@ gui_main_init ()
gui_window_set_title (PACKAGE_NAME " " PACKAGE_VERSION);
}
- /* create bar windows for root bars (they were read from config,
- but no window was created (GUI was not initialized) */
+ /*
+ * create bar windows for root bars (they were read from config,
+ * but no window was created (GUI was not initialized)
+ */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c
index c329b1c9f..5c1cf0854 100644
--- a/src/gui/gtk/gui-gtk-window.c
+++ b/src/gui/gtk/gui-gtk-window.c
@@ -490,7 +490,7 @@ gui_window_split_horizontal (struct t_gui_window *window, int percentage)
if ((percentage > 0) && (percentage <= 100))
{
- new_window = gui_window_new (window, window->buffer,
+ new_window = gui_window_new (window, window->buffer,
window->win_x, window->win_y,
window->win_width, height1,
100, percentage);
diff --git a/src/gui/gtk/gui-gtk.h b/src/gui/gtk/gui-gtk.h
index 954b74c77..bf92d2502 100644
--- a/src/gui/gtk/gui-gtk.h
+++ b/src/gui/gtk/gui-gtk.h
@@ -41,8 +41,10 @@ struct t_gui_line;
#define COLOR_YELLOW 6
#define COLOR_WHITE 7
-/* shift ncurses colors for compatibility with colors
- in IRC messages (same as other IRC clients) */
+/*
+ * shift ncurses colors for compatibility with colors
+ * in IRC messages (same as other IRC clients)
+ */
#define WEECHAT_COLOR_BLACK COLOR_BLACK
#define WEECHAT_COLOR_RED COLOR_BLUE
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 20ae9fc5e..afee0d9a6 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -1257,9 +1257,11 @@ gui_bar_item_timer_cb (void *data, int remaining_calls)
local_time) == 0)
return WEECHAT_RC_OK;
- /* we update item only if it changed since last time
- for example if time is only hours:minutes, we'll update
- only when minute changed */
+ /*
+ * we update item only if it changed since last time
+ * for example if time is only hours:minutes, we'll update
+ * only when minute changed
+ */
if (strcmp (new_item_time_text, item_time_text) != 0)
{
snprintf (item_time_text, sizeof (item_time_text),
diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c
index 0b04700a8..536678bf7 100644
--- a/src/gui/gui-bar.c
+++ b/src/gui/gui-bar.c
@@ -430,10 +430,12 @@ gui_bar_check_conditions_for_window (struct t_gui_bar *bar,
}
}
- /* call a modifier that will tell us if bar is displayed or not,
- for example it can be used to display nicklist on some buffers
- only, using a script that implements this modifier and return "1"
- to display bar, "0" to hide it */
+ /*
+ * call a modifier that will tell us if bar is displayed or not,
+ * for example it can be used to display nicklist on some buffers
+ * only, using a script that implements this modifier and return "1"
+ * to display bar, "0" to hide it
+ */
snprintf (str_modifier, sizeof (str_modifier),
"bar_condition_%s", bar->name);
snprintf (str_window, sizeof (str_window),
@@ -609,7 +611,7 @@ gui_bar_draw (struct t_gui_bar *bar)
struct t_gui_bar_window *ptr_bar_win;
if (!CONFIG_BOOLEAN(bar->options[GUI_BAR_OPTION_HIDDEN]))
- {
+ {
if (bar->bar_window)
{
/* root bar */
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index f2df9dbf2..3da7322bc 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -488,8 +488,10 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
/* set notify level */
new_buffer->notify = gui_buffer_notify_get (new_buffer);
- /* check if this buffer should be assigned to a window,
- according to windows layout saved */
+ /*
+ * check if this buffer should be assigned to a window,
+ * according to windows layout saved
+ */
gui_layout_window_check_buffer (new_buffer);
if (first_buffer_creation)
@@ -1003,9 +1005,11 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
}
else if (string_strcasecmp (property, "display") == 0)
{
- /* if it is auto-switch to a buffer, then we don't set read marker,
- otherwise we reset it (if current buffer is not displayed) after
- switch */
+ /*
+ * if it is auto-switch to a buffer, then we don't set read marker,
+ * otherwise we reset it (if current buffer is not displayed) after
+ * switch
+ */
gui_window_switch_to_buffer (gui_current_window, buffer,
(string_strcasecmp (value, "auto") == 0) ?
0 : 1);
@@ -1376,8 +1380,10 @@ gui_buffer_search_by_partial_name (const char *plugin, const char *name)
if (buffer_partial_match[0])
return buffer_partial_match[0];
- /* return buffer partially matching in name
- (may be NULL if no buffer was found) */
+ /*
+ * return buffer partially matching in name
+ * (may be NULL if no buffer was found)
+ */
return buffer_partial_match[1];
}
@@ -1538,8 +1544,10 @@ gui_buffer_close (struct t_gui_buffer *buffer)
if (!weechat_quit)
{
- /* find other buffer to display: previously visited buffer if current
- window is displaying buffer, or buffer # - 1 */
+ /*
+ * find other buffer to display: previously visited buffer if current
+ * window is displaying buffer, or buffer # - 1
+ */
ptr_buffer_visited = NULL;
if (CONFIG_BOOLEAN(config_look_jump_previous_buffer_when_closing)
&& gui_current_window && (gui_current_window->buffer == buffer))
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index 77ded8b52..4ff35726d 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -61,13 +61,17 @@ struct t_gui_buffer
{
struct t_weechat_plugin *plugin; /* plugin which created this buffer */
/* (NULL for a WeeChat buffer) */
- /* when upgrading, plugins are not loaded, so we use next variable
- to store plugin name, then restore plugin pointer when plugin is
- loaded */
+ /*
+ * when upgrading, plugins are not loaded, so we use next variable
+ * to store plugin name, then restore plugin pointer when plugin is
+ * loaded
+ */
char *plugin_name_for_upgrade; /* plugin name when upgrading */
- /* when upgrading, we use this pointer to remember that this buffer
- must merge with another buffer (it's done when all buffers are
- restored) */
+ /*
+ * when upgrading, we use this pointer to remember that this buffer
+ * must merge with another buffer (it's done when all buffers are
+ * restored)
+ */
struct t_gui_buffer *merge_for_upgrade;
int number; /* buffer number (for jump/switch) */
@@ -103,7 +107,7 @@ struct t_gui_buffer
int chat_refresh_needed; /* refresh for chat is needed ? */
/* (1=refresh, 2=erase+refresh) */
- /* nicklist */
+ /* nicklist */
int nicklist; /* = 1 if nicklist is enabled */
int nicklist_case_sensitive; /* nicks are case sensitive ? */
struct t_gui_nick_group *nicklist_root; /* pointer to groups root */
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index 8bafd0458..3a346a52e 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -508,8 +508,10 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date,
{
if (!new_msg[0] && pos[0])
{
- /* modifier returned empty message, then we'll not
- print anything */
+ /*
+ * modifier returned empty message, then we'll not
+ * print anything
+ */
free (new_msg);
return;
}
diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c
index ef29cabc7..dd23cd0f7 100644
--- a/src/gui/gui-completion.c
+++ b/src/gui/gui-completion.c
@@ -65,7 +65,7 @@ gui_completion_buffer_init (struct t_gui_completion *completion,
completion->base_command_arg_index = 0;
completion->base_word = NULL;
completion->base_word_pos = 0;
- completion->position = -1;
+ completion->position = -1;
completion->args = NULL;
completion->direction = 0;
completion->add_space = 1;
@@ -603,7 +603,7 @@ gui_completion_list_add_filename_cb (void *data,
if (strcmp (entry->d_name, ".") == 0 || strcmp (entry->d_name, "..") == 0)
continue;
- snprintf (buf, buf_len, "%s%s%s",
+ snprintf (buf, buf_len, "%s%s%s",
d_name, DIR_SEPARATOR, entry->d_name);
if (stat (buf, &statbuf) == -1)
continue;
@@ -916,8 +916,10 @@ gui_completion_list_add_plugins_commands_cb (void *data,
ptr_plugin = NULL;
if (string_strcasecmp (plugin_name, PLUGIN_CORE) != 0)
{
- /* plugin name is different from "core", then search it in
- plugin list */
+ /*
+ * plugin name is different from "core", then search it in
+ * plugin list
+ */
ptr_plugin = plugin_search (plugin_name);
if (!ptr_plugin)
return WEECHAT_RC_OK;
@@ -1425,8 +1427,10 @@ gui_completion_get_template_for_args (struct t_gui_completion *completion,
{
int matching_template;
- /* if template refers to another command, search this command and use its
- template */
+ /*
+ * if template refers to another command, search this command and use its
+ * template
+ */
if ((HOOK_COMMAND(hook_command, cplt_templates)[0][0] == '%')
&& (HOOK_COMMAND(hook_command, cplt_templates)[0][1] == '%')
&& (HOOK_COMMAND(hook_command, cplt_templates)[0][1]))
@@ -1679,8 +1683,10 @@ gui_completion_find_context (struct t_gui_completion *completion,
}
}
- /* auto completion with nothing as base word is disabled,
- in order to prevent completion when pasting messages with [tab] inside */
+ /*
+ * auto completion with nothing as base word is disabled,
+ * in order to prevent completion when pasting messages with [tab] inside
+ */
if ((completion->context == GUI_COMPLETION_AUTO)
&& ((!completion->base_word) || (!completion->base_word[0])))
{
@@ -1931,8 +1937,10 @@ gui_completion_complete (struct t_gui_completion *completion)
if (CONFIG_BOOLEAN(config_completion_partial_completion_alert))
printf ("\a");
- /* send "partial_completion" signal, to display possible
- completions in bar item */
+ /*
+ * send "partial_completion" signal, to display possible
+ * completions in bar item
+ */
gui_completion_partial_build_list (completion,
common_prefix_size);
hook_signal_send ("partial_completion",
@@ -1956,8 +1964,10 @@ gui_completion_complete (struct t_gui_completion *completion)
ptr_item = ptr_item->next_item;
}
- /* if we was on last completion in list, then recomplete, starting from
- first matching item */
+ /*
+ * if we was on last completion in list, then recomplete, starting from
+ * first matching item
+ */
if (completion->word_found && (completion->position >= 0))
{
free (completion->word_found);
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index dce6be51b..73f933bb4 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -368,8 +368,10 @@ gui_input_complete (struct t_gui_buffer *buffer)
buffer->completion->position_replace) +
utf8_strlen (buffer->completion->word_found);
- /* position is < 0 this means only one word was found to complete,
- so reinit to stop completion */
+ /*
+ * position is < 0 this means only one word was found to complete,
+ * so reinit to stop completion
+ */
if (buffer->completion->position >= 0)
buffer->completion->position = utf8_real_pos (buffer->input_buffer,
buffer->input_buffer_pos);
diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c
index 1bc5c245e..a6f12f4ee 100644
--- a/src/gui/gui-keyboard.c
+++ b/src/gui/gui-keyboard.c
@@ -540,8 +540,10 @@ gui_keyboard_pressed (const char *key_str)
gui_key_combo_buffer[0] = '\0';
- /* if this is first key and not found (even partial) => return 1
- else return 0 (= silently discard sequence of bad keys) */
+ /*
+ * if this is first key and not found (even partial) => return 1
+ * else return 0 (= silently discard sequence of bad keys)
+ */
return first_key;
}
@@ -701,7 +703,7 @@ gui_keyboard_paste_cancel ()
}
/*
- * gui_keyboard_end: end keyboard (free some data)
+ * gui_keyboard_end: end keyboard (free some data)
*/
void
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index ea25cc358..29404fecb 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -363,8 +363,10 @@ gui_line_has_highlight (struct t_gui_line *line)
int rc, i;
char *msg_no_color;
- /* highlights are disabled on this buffer? (special value "-" means that
- buffer does not want any highlight) */
+ /*
+ * highlights are disabled on this buffer? (special value "-" means that
+ * buffer does not want any highlight)
+ */
if (line->data->buffer->highlight_words
&& (strcmp (line->data->buffer->highlight_words, "-") == 0))
return 0;
@@ -376,8 +378,10 @@ gui_line_has_highlight (struct t_gui_line *line)
return 0;
}
- /* check that line matches highlight tags, if any (if no tag is specified,
- then any tag is allowed) */
+ /*
+ * check that line matches highlight tags, if any (if no tag is specified,
+ * then any tag is allowed)
+ */
if (line->data->buffer->highlight_tags_count > 0)
{
if (!gui_line_match_tags (line,
@@ -391,8 +395,10 @@ gui_line_has_highlight (struct t_gui_line *line)
if (!msg_no_color)
return 0;
- /* there is highlight on line if one of global highlight words matches line
- or one of buffer highlight words matches line */
+ /*
+ * there is highlight on line if one of global highlight words matches line
+ * or one of buffer highlight words matches line
+ */
rc = (string_has_highlight (msg_no_color,
CONFIG_STRING(config_look_highlight)) ||
string_has_highlight (msg_no_color,
diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c
index 88b490d64..1c84d9418 100644
--- a/src/gui/gui-window.c
+++ b/src/gui/gui-window.c
@@ -178,8 +178,10 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
ptr_tree->split_pct = width_pct;
}
- /* parent window leaf becomes node and we add 2 leafs below
- (#1 is parent win, #2 is new win) */
+ /*
+ * parent window leaf becomes node and we add 2 leafs below
+ * (#1 is parent win, #2 is new win)
+ */
parent_window->ptr_tree = child1;
child1->parent_node = ptr_tree;
@@ -685,8 +687,10 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
|| (line_date.tm_year != old_line_date.tm_year))
stop = 1;
}
- /* we consider month is 30 days, who will find I'm too
- lazy to code exact date diff ? ;) */
+ /*
+ * we consider month is 30 days, who will notice
+ * I'm too lazy to code exact date diff ? ;)
+ */
else if (diff_date >= number * 60 * 60 * 24 * 30)
stop = 1;
break;
@@ -697,8 +701,10 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
if (line_date.tm_year != old_line_date.tm_year)
stop = 1;
}
- /* we consider year is 365 days, who will find I'm too
- lazy to code exact date diff ? ;) */
+ /*
+ * we consider year is 365 days, who will notice
+ * I'm too lazy to code exact date diff ? ;)
+ */
else if (diff_date >= number * 60 * 60 * 24 * 365)
stop = 1;
break;