1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 10:43:13 +02:00

core, plugins: fix typos in comments on functions, use imperative

This commit is contained in:
Sébastien Helleu
2026-03-23 20:45:36 +01:00
parent d34eb40187
commit f53e7fb9ef
342 changed files with 6669 additions and 6729 deletions
+3 -3
View File
@@ -167,7 +167,7 @@ char *weechat_args_debug[][2] = {
/*
* Displays WeeChat copyright on standard output.
* Display WeeChat copyright on standard output.
*/
void
@@ -217,7 +217,7 @@ args_display_list_args (char *args[][2])
}
/*
* Displays WeeChat help on standard output.
* Display WeeChat help on standard output.
*/
void
@@ -251,7 +251,7 @@ args_display_help (void)
}
/*
* Parses command line arguments.
* Parse command line arguments.
*
* Arguments argc and argv come from main() function.
*/
+26 -27
View File
@@ -35,10 +35,9 @@
/*
* Compares two arraylist entries (default comparator).
* It just compares pointers.
* Compare two arraylist entries (default comparator: compare pointers only).
*
* Returns:
* Return:
* -1: pointer1 < pointer2
* 0: pointer1 == pointer2
* 1: pointer1 > pointer2
@@ -60,9 +59,9 @@ arraylist_cmp_default_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Creates a new arraylist.
* Create a new arraylist.
*
* Returns pointer to arraylist, NULL if error.
* Return pointer to arraylist, NULL if error.
*/
struct t_arraylist *
@@ -114,7 +113,7 @@ arraylist_new (int initial_size,
}
/*
* Returns the size of an arraylist (number of elements).
* Return the size of an arraylist (number of elements).
*/
int
@@ -127,7 +126,7 @@ arraylist_size (struct t_arraylist *arraylist)
}
/*
* Returns the pointer to an arraylist element, by index.
* Return the pointer to an arraylist element, by index.
*/
void *
@@ -140,11 +139,11 @@ arraylist_get (struct t_arraylist *arraylist, int index)
}
/*
* Adjusts the allocated size of arraylist to add one element (if needed),
* Adjust the allocated size of arraylist to add one element (if needed),
* so that the list has enough allocated data to store (current_size + 1)
* elements.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -180,11 +179,11 @@ arraylist_grow (struct t_arraylist *arraylist)
}
/*
* Adjusts the allocated size of arraylist to remove one element (if needed),
* Adjust the allocated size of arraylist to remove one element (if needed),
* so that the list has enough allocated data to store (current size - 1)
* elements.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -230,7 +229,7 @@ arraylist_shrink (struct t_arraylist *arraylist)
}
/*
* Performs a binary search in the arraylist to find an element
* Perform a binary search in the arraylist to find an element
* (this function must be called only if the arraylist is sorted).
*
* If "index" is not NULL, it is set with the index of element found (or -1 if
@@ -239,7 +238,7 @@ arraylist_shrink (struct t_arraylist *arraylist)
* If "index_insert" is not NULL, it is set with the index that must be used to
* insert the element in the arraylist (to keep arraylist sorted).
*
* Returns pointer to element found, NULL if not found.
* Return pointer to element found, NULL if not found.
*/
void *
@@ -398,7 +397,7 @@ end:
}
/*
* Performs a standard search in the arraylist to find an element
* Perform a standard search in the arraylist to find an element
* (this function must be called only if the arraylist is NOT sorted).
*
* If "index" is not NULL, it is set with the index of element found (or -1 if
@@ -407,7 +406,7 @@ end:
* If "index_insert" is not NULL, it is set to -1 (elements are always added
* at the end of list when it is not sorted).
*
* Returns pointer to element found, NULL if not found.
* Return pointer to element found, NULL if not found.
*/
void *
@@ -442,7 +441,7 @@ end:
}
/*
* Searches an element in the arraylist.
* Search an element in the arraylist.
*
* If "index" is not NULL, it is set with the index of element found (or -1 if
* element was not found).
@@ -450,7 +449,7 @@ end:
* If "index_insert" is not NULL, it is set with the index that must be used to
* insert the element in the arraylist (to keep arraylist sorted).
*
* Returns pointer to element found, NULL if not found.
* Return pointer to element found, NULL if not found.
*/
void *
@@ -478,7 +477,7 @@ arraylist_search (struct t_arraylist *arraylist, void *pointer,
}
/*
* Inserts an element at a given index (and shifts next elements by one
* Insert an element at a given index (and shifts next elements by one
* position), or at automatic index if the arraylist is sorted.
*
* If the index is negative and that the arraylist is not sorted, the element
@@ -487,7 +486,7 @@ arraylist_search (struct t_arraylist *arraylist, void *pointer,
* If the arraylist is sorted, the argument "index" is ignored (the element
* will be inserted at appropriate position, to keep arraylist sorted).
*
* Returns the index of the new element (>= 0) or -1 if error.
* Return the index of the new element (>= 0) or -1 if error.
*/
int
@@ -559,10 +558,10 @@ arraylist_insert (struct t_arraylist *arraylist, int index, void *pointer)
}
/*
* Adds an element at the end of arraylist (or in the middle if the arraylist
* Add an element at the end of arraylist (or in the middle if the arraylist
* is sorted).
*
* Returns the index of the new element (>= 0) or -1 if error.
* Return the index of the new element (>= 0) or -1 if error.
*/
int
@@ -575,9 +574,9 @@ arraylist_add (struct t_arraylist *arraylist, void *pointer)
}
/*
* Removes one element from the arraylist.
* Remove one element from the arraylist.
*
* Returns the index removed or -1 if error.
* Return the index removed or -1 if error.
*/
int
@@ -614,9 +613,9 @@ arraylist_remove (struct t_arraylist *arraylist, int index)
}
/*
* Removes all elements in the arraylist.
* Remove all elements in the arraylist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -669,7 +668,7 @@ arraylist_clear (struct t_arraylist *arraylist)
}
/*
* Frees an arraylist.
* Free an arraylist.
*/
void
@@ -694,7 +693,7 @@ arraylist_free (struct t_arraylist *arraylist)
}
/*
* Prints an arraylist in WeeChat log file (usually for crash dump).
* Print an arraylist in WeeChat log file (usually for crash dump).
*/
void
+3 -3
View File
@@ -49,7 +49,7 @@
/*
* Displays a backtrace line on standard error output and in WeeChat log.
* Display a backtrace line on standard error output and in WeeChat log.
*/
void
@@ -65,7 +65,7 @@ weechat_backtrace_printf (const char *message, ...)
}
/*
* Displays function name and line with a backtrace address.
* Display function name and line with a backtrace address.
*/
void
@@ -147,7 +147,7 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol)
}
/*
* Displays backtrace (function called when a SIGSEGV is received).
* Display backtrace (function called when a SIGSEGV is received).
*/
void
+8 -8
View File
@@ -60,7 +60,7 @@ calc_list_free_cb (void *data, struct t_arraylist *arraylist, void *pointer)
}
/*
* Returns the precedence of an operator:
* Return the precedence of an operator:
* - '*' and '/': 2
* - '+' and '-': 1
* - any other: 0
@@ -91,7 +91,7 @@ calc_operator_precedence (const char *oper)
}
/*
* Pops an integer value from the stack of values.
* Pop an integer value from the stack of values.
*/
double
@@ -117,7 +117,7 @@ calc_pop_value (struct t_arraylist *list_values)
}
/*
* Calculates result of an operation using an operator and two values.
* Calculate result of an operation using an operator and two values.
*/
double
@@ -151,7 +151,7 @@ calc_operation (const char *oper, double value1, double value2)
}
/*
* Calculates result of an operation using the operator on the operators stack
* Calculate result of an operation using the operator on the operators stack
* and the two values on the values stack.
*
* The result is pushed on values stack.
@@ -187,7 +187,7 @@ calc_operation_stacks (struct t_arraylist *list_values,
}
/*
* Sanitizes a decimal number: removes any thousands separator and replaces
* Sanitize a decimal number: remove any thousands separator and replace
* the decimal separator by a dot.
*
* The string is updated in-place, the result has always a length shorter or
@@ -203,7 +203,7 @@ calc_operation_stacks (struct t_arraylist *list_values,
* 1,234,567.89 --> 1234567.89
* -2.345,67 --> -2345.67
*
* Returns:
* Return:
* 1: the number has decimal part
* 0: the number has no decimal part
*/
@@ -279,7 +279,7 @@ calc_sanitize_decimal_number (char *string)
}
/*
* Formats the result as a decimal number (locale independent): remove any
* Format the result as a decimal number (locale independent): remove any
* extra "0" at the and the decimal point if needed.
*/
@@ -314,7 +314,7 @@ calc_format_result (double value, char *result, int max_size)
}
/*
* Calculates an expression, which can contain:
* Calculate an expression, which can contain:
* - integer and decimal numbers (ie 2 or 2.5)
* - operators:
* +: addition
+70 -71
View File
@@ -101,7 +101,7 @@ void command_set_display_option (struct t_config_option *option,
/*
* Callback for command "/allbuf": executes a command on all buffers.
* Callback for command "/allbuf": execute a command on all buffers.
*/
COMMAND_CALLBACK(allbuf)
@@ -158,7 +158,7 @@ COMMAND_CALLBACK(allbuf)
COMMAND_EMPTY(away)
/*
* Displays a list of bars.
* Display a list of bars.
*/
void
@@ -234,7 +234,7 @@ command_bar_list (int full)
}
/*
* Callback for command "/bar": manages bars.
* Callback for command "/bar": manage bars.
*/
COMMAND_CALLBACK(bar)
@@ -599,11 +599,11 @@ COMMAND_CALLBACK(bar)
}
/*
* Checks if the buffer number is valid (in range 1 to GUI_BUFFER_NUMBER_MAX).
* Check if the buffer number is valid (in range 1 to GUI_BUFFER_NUMBER_MAX).
*
* If the number is not valid, a warning is displayed.
*
* Returns:
* Return:
* 1: buffer number is valid
* 0: buffer number is invalid
*/
@@ -628,7 +628,7 @@ command_buffer_check_number (long number)
}
/*
* Displays a local variable for a buffer.
* Display a local variable for a buffer.
*/
void
@@ -659,7 +659,7 @@ command_buffer_display_localvar (void *data,
}
/*
* Callback for command "/buffer": manages buffers.
* Callback for command "/buffer": manage buffers.
*/
COMMAND_CALLBACK(buffer)
@@ -1646,7 +1646,7 @@ COMMAND_CALLBACK(buffer)
}
/*
* Callback for command "/color": defines custom colors and displays palette of
* Callback for command "/color": define custom colors and displays palette of
* colors.
*/
@@ -1845,7 +1845,7 @@ COMMAND_CALLBACK(color)
}
/*
* Callback for command "/command": launches explicit WeeChat or plugin command.
* Callback for command "/command": launch explicit WeeChat or plugin command.
*/
COMMAND_CALLBACK(command)
@@ -2036,7 +2036,7 @@ COMMAND_CALLBACK(cursor)
}
/*
* Callback for command "/debug": controls debug for core/plugins.
* Callback for command "/debug": control debug for core/plugins.
*/
COMMAND_CALLBACK(debug)
@@ -2313,7 +2313,7 @@ COMMAND_CALLBACK(debug)
}
/*
* Prints eval debug output.
* Print eval debug output.
*/
void
@@ -2342,8 +2342,7 @@ command_eval_print_debug (const char *debug)
}
/*
* Callback for command "/eval": evaluates an expression and sends result to
* buffer.
* Callback for command "/eval": evaluate an expression and send result to buffer.
*/
COMMAND_CALLBACK(eval)
@@ -2598,7 +2597,7 @@ COMMAND_CALLBACK(eval)
}
/*
* Displays one filter.
* Display one filter.
*/
void
@@ -2621,7 +2620,7 @@ command_filter_display (struct t_gui_filter *filter)
}
/*
* Callback for command "/filter": manages message filters.
* Callback for command "/filter": manage message filters.
*/
COMMAND_CALLBACK(filter)
@@ -2968,7 +2967,7 @@ COMMAND_CALLBACK(filter)
}
/*
* Displays help for commands of a plugin (or core commands if plugin is NULL).
* Display help for commands of a plugin (or core commands if plugin is NULL).
*/
void
@@ -3113,7 +3112,7 @@ command_help_list_plugin_commands (struct t_weechat_plugin *plugin,
}
/*
* Displays help for commands.
* Display help for commands.
*/
void
@@ -3133,7 +3132,7 @@ command_help_list_commands (int verbose)
}
/*
* Returns translated help text for values of a color option.
* Return translated help text for values of a color option.
*/
const char *
@@ -3154,7 +3153,7 @@ command_help_option_color_values (void)
"\"_\" for underline");
}
/*
* Callback for command "/help": displays help about commands and options.
* Callback for command "/help": display help about commands and options.
*/
COMMAND_CALLBACK(help)
@@ -3525,7 +3524,7 @@ COMMAND_CALLBACK(help)
}
/*
* Callback for command "/history": displays command history for current buffer.
* Callback for command "/history": display command history for current buffer.
*/
COMMAND_CALLBACK(history)
@@ -3587,7 +3586,7 @@ COMMAND_CALLBACK(history)
}
/*
* Callback for command "/hotlist": manages hotlist.
* Callback for command "/hotlist": manage hotlist.
*/
COMMAND_CALLBACK(hotlist)
@@ -3840,7 +3839,7 @@ COMMAND_CALLBACK(input)
}
/*
* Callback for command "/item": manages custom bar items
* Callback for command "/item": manage custom bar items
*/
COMMAND_CALLBACK(item)
@@ -4041,7 +4040,7 @@ COMMAND_CALLBACK(item)
}
/*
* Displays a key binding.
* Display a key binding.
*/
void
@@ -4071,7 +4070,7 @@ command_key_display (struct t_gui_key *key, struct t_gui_key *default_key)
}
/*
* Displays a list of keys.
* Display a list of keys.
*/
void
@@ -4101,7 +4100,7 @@ command_key_display_list (const char *message_no_key,
}
/*
* Displays differences between default and current keys (keys added, redefined
* Display differences between default and current keys (keys added, redefined
* or removed).
*/
@@ -4184,7 +4183,7 @@ command_key_display_listdiff (int context)
}
/*
* Resets a key in the given context.
* Reset a key in the given context.
*/
int
@@ -4250,7 +4249,7 @@ command_key_reset (int context, const char *key)
}
/*
* Callback for command "/key": binds/unbinds keys.
* Callback for command "/key": bind/unbind keys.
*/
COMMAND_CALLBACK(key)
@@ -4571,7 +4570,7 @@ COMMAND_CALLBACK(key)
}
/*
* Displays a tree of windows.
* Display a tree of windows.
*/
void
@@ -4615,7 +4614,7 @@ command_layout_display_tree (struct t_gui_layout_window *layout_window,
}
/*
* Gets arguments for /layout command (if option is store/apply/del).
* Get arguments for /layout command (if option is store/apply/del).
*/
void
@@ -4652,7 +4651,7 @@ command_layout_get_arguments (int argc, char **argv,
}
/*
* Callback for command "/layout": manages layouts.
* Callback for command "/layout": manage layouts.
*/
COMMAND_CALLBACK(layout)
@@ -4885,7 +4884,7 @@ command_mouse_timer (const char *delay)
}
/*
* Callback for command "/mouse": controls mouse.
* Callback for command "/mouse": control mouse.
*/
COMMAND_CALLBACK(mouse)
@@ -4944,7 +4943,7 @@ COMMAND_CALLBACK(mouse)
}
/*
* Callback for command "/mute": silently executes a command.
* Callback for command "/mute": silently execute a command.
*/
COMMAND_CALLBACK(mute)
@@ -5032,9 +5031,9 @@ COMMAND_CALLBACK(mute)
}
/*
* Opens a file in write mode to redirect messages.
* Open a file in write mode to redirect messages.
*
* Returns a pointer to the file, NULL if error.
* Return a pointer to the file, NULL if error.
*/
FILE *
@@ -5286,7 +5285,7 @@ COMMAND_CALLBACK(pipe)
}
/*
* Displays a list of loaded plugins.
* Display a list of loaded plugins.
*/
void
@@ -5355,9 +5354,9 @@ command_plugin_list (const char *name, int full)
}
/*
* Lists loaded plugins in input.
* List loaded plugins in input.
*
* Sends input to buffer if send_to_buffer == 1.
* Send input to buffer if send_to_buffer == 1.
* String is translated if translated == 1 (otherwise it's English).
*/
@@ -5435,7 +5434,7 @@ command_plugin_list_input (struct t_gui_buffer *buffer,
}
/*
* Callback for command "/plugin": lists/loads/unloads WeeChat plugins.
* Callback for command "/plugin": list/load/unload WeeChat plugins.
*/
COMMAND_CALLBACK(plugin)
@@ -5818,7 +5817,7 @@ COMMAND_CALLBACK(print)
}
/*
* Displays a list of proxies.
* Display a list of proxies.
*/
void
@@ -5872,7 +5871,7 @@ command_proxy_list (void)
}
/*
* Callback for command "/proxy": manages proxies.
* Callback for command "/proxy": manage proxies.
*/
COMMAND_CALLBACK(proxy)
@@ -6011,7 +6010,7 @@ COMMAND_CALLBACK(proxy)
}
/*
* Callback for command "/quit": quits WeeChat.
* Callback for command "/quit": quit WeeChat.
*/
COMMAND_CALLBACK(quit)
@@ -6066,7 +6065,7 @@ COMMAND_CALLBACK(quit)
}
/*
* Reloads a configuration file.
* Reload a configuration file.
*/
void
@@ -6098,7 +6097,7 @@ command_reload_file (struct t_config_file *config_file)
}
/*
* Callback for command "/reload": reloads a configuration file.
* Callback for command "/reload": reload a configuration file.
*/
COMMAND_CALLBACK(reload)
@@ -6149,7 +6148,7 @@ COMMAND_CALLBACK(reload)
}
/*
* Executes a repeated command.
* Execute a repeated command.
*/
void
@@ -6250,7 +6249,7 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Callback for command "/repeat": executes a command several times.
* Callback for command "/repeat": execute a command several times.
*/
COMMAND_CALLBACK(repeat)
@@ -6332,7 +6331,7 @@ COMMAND_CALLBACK(repeat)
}
/*
* Resets one option.
* Reset one option.
*/
void
@@ -6359,7 +6358,7 @@ command_reset_option (struct t_config_option *option,
}
/*
* Callback for command "/reset": resets configuration options.
* Callback for command "/reset": reset configuration options.
*/
COMMAND_CALLBACK(reset)
@@ -6442,7 +6441,7 @@ COMMAND_CALLBACK(reset)
}
/*
* Saves a configuration file to disk.
* Save a configuration file to disk.
*/
void
@@ -6464,7 +6463,7 @@ command_save_file (struct t_config_file *config_file)
}
/*
* Callback for command "/save": saves configuration files to disk.
* Callback for command "/save": save configuration files to disk.
*/
COMMAND_CALLBACK(save)
@@ -6703,7 +6702,7 @@ COMMAND_CALLBACK(secure)
}
/*
* Displays a configuration section.
* Display a configuration section.
*/
void
@@ -6722,7 +6721,7 @@ command_set_display_section (struct t_config_file *config_file,
}
/*
* Displays a configuration option.
* Display a configuration option.
*/
void
@@ -6808,9 +6807,9 @@ command_set_display_option (struct t_config_option *option,
}
/*
* Displays a list of options.
* Display a list of options.
*
* Returns the number of options displayed.
* Return the number of options displayed.
*/
int
@@ -6879,12 +6878,12 @@ command_set_display_option_list (const char *message, const char *search,
}
/*
* Displays multiple lists of options.
* Display multiple lists of options.
*
* If display_only_changed == 1, then it will display only options with value
* changed (different from default value).
* If display_only_changed == 1, then display only options with value changed
* (different from default value).
*
* Returns the total number of options displayed.
* Return the total number of options displayed.
*/
int
@@ -6968,7 +6967,7 @@ command_set_display_option_lists (char **argv, int arg_start, int arg_end,
}
/*
* Callback for command "/set": displays or sets configuration options.
* Callback for command "/set": display or set configuration options.
*/
COMMAND_CALLBACK(set)
@@ -7238,7 +7237,7 @@ COMMAND_CALLBACK(sys)
}
/*
* Callback for command "/toggle": toggles value of configuration option.
* Callback for command "/toggle": toggle value of configuration option.
*/
COMMAND_CALLBACK(toggle)
@@ -7320,7 +7319,7 @@ COMMAND_CALLBACK(toggle)
}
/*
* Unsets/resets one option.
* Unset/reset one option.
*/
void
@@ -7353,7 +7352,7 @@ command_unset_option (struct t_config_option *option,
}
/*
* Callback for command "/unset": unsets/resets configuration options.
* Callback for command "/unset": unset/reset configuration options.
*/
COMMAND_CALLBACK(unset)
@@ -7444,7 +7443,7 @@ COMMAND_CALLBACK(unset)
}
/*
* Displays the number of upgrades done and the date of first/last start.
* Display the number of upgrades done and the date of first/last start.
*/
void
@@ -7526,7 +7525,7 @@ command_upgrade_display (struct t_gui_buffer *buffer,
}
/*
* Callback for command "/upgrade": upgrades WeeChat.
* Callback for command "/upgrade": upgrade WeeChat.
*/
COMMAND_CALLBACK(upgrade)
@@ -7777,7 +7776,7 @@ COMMAND_CALLBACK(upgrade)
}
/*
* Callback for command "/uptime": displays WeeChat uptime.
* Callback for command "/uptime": display WeeChat uptime.
*/
COMMAND_CALLBACK(uptime)
@@ -7858,7 +7857,7 @@ COMMAND_CALLBACK(uptime)
}
/*
* Displays WeeChat version.
* Display WeeChat version.
*/
void
@@ -7902,7 +7901,7 @@ command_version_display (struct t_gui_buffer *buffer,
}
/*
* Callback for command "/version": displays WeeChat version.
* Callback for command "/version": display WeeChat version.
*/
COMMAND_CALLBACK(version)
@@ -7947,7 +7946,7 @@ COMMAND_CALLBACK(version)
}
/*
* Callback for command "/wait": schedules a command execution in future.
* Callback for command "/wait": schedule a command execution in future.
*/
COMMAND_CALLBACK(wait)
@@ -7974,7 +7973,7 @@ COMMAND_CALLBACK(wait)
}
/*
* Callback for command "/window": manages windows.
* Callback for command "/window": manage windows.
*/
COMMAND_CALLBACK(window)
@@ -8383,7 +8382,7 @@ COMMAND_CALLBACK(window)
}
/*
* Hooks WeeChat core commands.
* Hook WeeChat core commands.
*/
void
@@ -10180,7 +10179,7 @@ command_init (void)
}
/*
* Executes a list of commands (separated by ";").
* Execute a list of commands (separated by ";").
*/
void
@@ -10212,7 +10211,7 @@ command_exec_list (const char *command_list)
}
/*
* Executes commands at startup.
* Execute commands at startup.
*/
void
+53 -53
View File
@@ -65,7 +65,7 @@ extern char **environ;
/*
* Adds a word with quotes around to completion list.
* Add a word with quotes around to completion list.
*/
void
@@ -82,7 +82,7 @@ completion_list_add_quoted_word (struct t_gui_completion *completion,
}
/*
* Adds bar names to completion list.
* Add bar names to completion list.
*/
int
@@ -109,7 +109,7 @@ completion_list_add_bars_names_cb (const void *pointer, void *data,
}
/*
* Adds bar items to completion list.
* Add bar items to completion list.
*/
int
@@ -137,7 +137,7 @@ completion_list_add_bars_items_cb (const void *pointer, void *data,
}
/*
* Adds custom bar items names to completion list.
* Add custom bar items names to completion list.
*/
int
@@ -165,7 +165,7 @@ completion_list_add_custom_bar_items_names_cb (const void *pointer, void *data,
}
/*
* Adds custom bar item conditions to completion list.
* Add custom bar item conditions to completion list.
*/
int
@@ -190,7 +190,7 @@ completion_list_add_custom_bar_item_conditions_cb (const void *pointer, void *da
}
/*
* Adds custom bar item contents to completion list.
* Add custom bar item contents to completion list.
*/
int
@@ -215,7 +215,7 @@ completion_list_add_custom_bar_item_contents_cb (const void *pointer, void *data
}
/*
* Adds arguments for commands that add a custom bar item.
* Add arguments for commands that add a custom bar item.
*/
int
@@ -283,7 +283,7 @@ completion_list_add_custom_bar_item_add_arguments_cb (const void *pointer, void
}
/*
* Adds bar options to completion list.
* Add bar options to completion list.
*/
int
@@ -310,7 +310,7 @@ completion_list_add_bars_options_cb (const void *pointer, void *data,
}
/*
* Adds buffer names to completion list.
* Add buffer names to completion list.
*/
int
@@ -338,7 +338,7 @@ completion_list_add_buffers_names_cb (const void *pointer, void *data,
}
/*
* Adds buffer numbers to completion list.
* Add buffer numbers to completion list.
*/
int
@@ -368,7 +368,7 @@ completion_list_add_buffers_numbers_cb (const void *pointer, void *data,
}
/*
* Adds plugin+buffer names to completion list.
* Add plugin+buffer names to completion list.
*/
int
@@ -396,7 +396,7 @@ completion_list_add_buffers_plugins_names_cb (const void *pointer, void *data,
}
/*
* Adds a buffer local variable to completions list.
* Add a buffer local variable to completions list.
*/
void
@@ -414,7 +414,7 @@ completion_list_map_buffer_local_variable_cb (void *data,
}
/*
* Adds buffer local variables to completion list.
* Add buffer local variables to completion list.
*/
int
@@ -437,7 +437,7 @@ completion_list_add_buffer_local_variables_cb (const void *pointer, void *data,
}
/*
* Adds buffer local variable value to completion list.
* Add buffer local variable value to completion list.
*/
int
@@ -487,7 +487,7 @@ completion_list_add_buffer_local_variable_value_cb (const void *pointer, void *d
}
/*
* Adds buffer properties (that can be set) to completion list.
* Add buffer properties (that can be set) to completion list.
*/
int
@@ -515,7 +515,7 @@ completion_list_add_buffer_properties_set_cb (const void *pointer, void *data,
}
/*
* Adds a buffer local variable to completions list (for `/buffer setauto`).
* Add a buffer local variable to completions list (for `/buffer setauto`).
*/
void
@@ -538,7 +538,7 @@ completion_list_map_buffer_local_variable_setauto_cb (void *data,
}
/*
* Adds buffer properties (that can be set), local variables and key bindings
* Add buffer properties (that can be set), local variables and key bindings
* to completion list.
*/
@@ -585,7 +585,7 @@ completion_list_add_buffer_properties_setauto_cb (const void *pointer, void *dat
}
/*
* Adds buffer properties (that can be read) to completion list.
* Add buffer properties (that can be read) to completion list.
*/
int
@@ -625,7 +625,7 @@ completion_list_add_buffer_properties_get_cb (const void *pointer, void *data,
}
/*
* Adds window numbers to completion list.
* Add window numbers to completion list.
*/
int
@@ -654,7 +654,7 @@ completion_list_add_windows_numbers_cb (const void *pointer, void *data,
}
/*
* Adds colors to completion list.
* Add colors to completion list.
*/
int
@@ -711,7 +711,7 @@ completion_list_add_colors_cb (const void *pointer, void *data,
}
/*
* Adds a palette color to completion list.
* Add a palette color to completion list.
*/
void
@@ -729,7 +729,7 @@ completion_list_map_add_palette_color_cb (void *data,
}
/*
* Adds palette colors to completion list.
* Add palette colors to completion list.
*/
int
@@ -752,7 +752,7 @@ completion_list_add_palette_colors_cb (const void *pointer, void *data,
}
/*
* Adds configuration files to completion list.
* Add configuration files to completion list.
*/
int
@@ -780,7 +780,7 @@ completion_list_add_config_files_cb (const void *pointer, void *data,
}
/*
* Adds path/filename to completion list.
* Add path/filename to completion list.
*/
int
@@ -923,7 +923,7 @@ end:
}
/*
* Adds filter names to completion list.
* Add filter names to completion list.
*/
int
@@ -951,7 +951,7 @@ completion_list_add_filters_cb (const void *pointer, void *data,
}
/*
* Adds disabled filter names to completion list.
* Add disabled filter names to completion list.
*/
int
@@ -982,7 +982,7 @@ completion_list_add_filters_disabled_cb (const void *pointer, void *data,
}
/*
* Adds enabled filter names to completion list.
* Add enabled filter names to completion list.
*/
int
@@ -1013,7 +1013,7 @@ completion_list_add_filters_enabled_cb (const void *pointer, void *data,
}
/*
* Adds command hook types to completion list.
* Add command hook types to completion list.
*/
int
@@ -1040,7 +1040,7 @@ completion_list_add_hook_types_cb (const void *pointer, void *data,
}
/*
* Adds command hooks to completion list.
* Add command hooks to completion list.
*/
int
@@ -1091,7 +1091,7 @@ completion_list_add_commands_cb (const void *pointer, void *data,
}
/*
* Adds info hooks to completion list.
* Add info hooks to completion list.
*/
int
@@ -1123,7 +1123,7 @@ completion_list_add_infos_cb (const void *pointer, void *data,
}
/*
* Adds infolist hooks to completion list.
* Add infolist hooks to completion list.
*/
int
@@ -1155,7 +1155,7 @@ completion_list_add_infolists_cb (const void *pointer, void *data,
}
/*
* Adds nicks to completion list.
* Add nicks to completion list.
*/
int
@@ -1206,7 +1206,7 @@ completion_list_add_nicks_cb (const void *pointer, void *data,
}
/*
* Adds configuration options to completion list.
* Add configuration options to completion list.
*/
int
@@ -1254,7 +1254,7 @@ completion_list_add_config_options_cb (const void *pointer, void *data,
}
/*
* Adds plugin names to completion list.
* Add plugin names to completion list.
*/
int
@@ -1282,7 +1282,7 @@ completion_list_add_plugins_cb (const void *pointer, void *data,
}
/*
* Adds a plugin installed to completion list.
* Add a plugin installed to completion list.
*/
void
@@ -1317,7 +1317,7 @@ completion_list_add_plugins_installed_exec_cb (void *data,
}
/*
* Adds plugins installed to completion list.
* Add plugins installed to completion list.
*/
int
@@ -1384,7 +1384,7 @@ completion_list_add_plugins_installed_cb (const void *pointer, void *data,
}
/*
* Adds plugin commands to completion list.
* Add plugin commands to completion list.
*
* The plugin name is read in previous argument.
*/
@@ -1472,7 +1472,7 @@ completion_list_add_plugins_commands_cb (const void *pointer, void *data,
}
/*
* Adds value of option to completion list.
* Add value of option to completion list.
*
* The option name is read in previous argument.
*/
@@ -1688,7 +1688,7 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
}
/*
* Adds WeeChat commands to completion list.
* Add WeeChat commands to completion list.
*/
int
@@ -1740,7 +1740,7 @@ completion_list_add_weechat_commands_cb (const void *pointer, void *data,
}
/*
* Adds proxy names to completion list.
* Add proxy names to completion list.
*/
int
@@ -1768,7 +1768,7 @@ completion_list_add_proxies_names_cb (const void *pointer, void *data,
}
/*
* Adds proxy options to completion list.
* Add proxy options to completion list.
*/
int
@@ -1795,7 +1795,7 @@ completion_list_add_proxies_options_cb (const void *pointer, void *data,
}
/*
* Adds key contexts to completion list.
* Add key contexts to completion list.
*/
int
@@ -1822,7 +1822,7 @@ completion_list_add_keys_contexts_cb (const void *pointer, void *data,
}
/*
* Adds keys to completion list.
* Add keys to completion list.
*/
int
@@ -1853,7 +1853,7 @@ completion_list_add_keys_codes_cb (const void *pointer, void *data,
}
/*
* Adds keys that can be reset (keys added, redefined or removed) to completion
* Add keys that can be reset (keys added, redefined or removed) to completion
* list.
*/
@@ -1905,7 +1905,7 @@ completion_list_add_keys_codes_for_reset_cb (const void *pointer, void *data,
}
/*
* Adds areas for free cursor movement ("chat" and bar names) to completion
* Add areas for free cursor movement ("chat" and bar names) to completion
* list.
*/
@@ -1947,7 +1947,7 @@ completion_list_add_cursor_areas_cb (const void *pointer, void *data,
}
/*
* Adds layout names to completion list.
* Add layout names to completion list.
*/
int
@@ -1975,7 +1975,7 @@ completion_list_add_layouts_names_cb (const void *pointer, void *data,
}
/*
* Adds a secured data to completion list.
* Add a secured data to completion list.
*/
void
@@ -1993,7 +1993,7 @@ completion_list_map_add_secured_data_cb (void *data,
}
/*
* Adds secured data to completion list.
* Add secured data to completion list.
*/
int
@@ -2016,7 +2016,7 @@ completion_list_add_secured_data_cb (const void *pointer, void *data,
}
/*
* Adds environment variables to completion list.
* Add environment variables to completion list.
*/
int
@@ -2052,7 +2052,7 @@ completion_list_add_env_vars_cb (const void *pointer, void *data,
}
/*
* Adds value of an environment variable to completion list.
* Add value of an environment variable to completion list.
*/
int
@@ -2099,7 +2099,7 @@ completion_list_add_env_value_cb (const void *pointer, void *data,
}
/*
* Adds a buffer local variable for /eval to completions list.
* Add a buffer local variable for /eval to completions list.
*/
void
@@ -2122,7 +2122,7 @@ completion_list_map_eval_buffer_local_variable_cb (void *data,
}
/*
* Adds /eval variables to completion list.
* Add /eval variables to completion list.
*/
int
@@ -2225,7 +2225,7 @@ completion_list_add_eval_variables_cb (const void *pointer, void *data,
}
/*
* Adds hooks for completions done by WeeChat core.
* Add hooks for completions done by WeeChat core.
*/
void
+123 -124
View File
@@ -65,9 +65,9 @@ void config_file_option_free_data (struct t_config_option *option);
/*
* Checks if a configuration file pointer is valid.
* Check if a configuration file pointer is valid.
*
* Returns:
* Return:
* 1: configuration file exists
* 0: configuration file does not exist
*/
@@ -92,7 +92,7 @@ config_file_valid (struct t_config_file *config_file)
}
/*
* Searches for a configuration file.
* Search for a configuration file.
*/
struct t_config_file *
@@ -119,7 +119,7 @@ config_file_search (const char *name)
}
/*
* Searches for position of configuration file (to keep configuration files
* Search for position of configuration file (to keep configuration files
* sorted by name).
*/
@@ -143,7 +143,7 @@ config_file_find_pos (const char *name)
}
/*
* Inserts a configuration file (keeping files sorted by name).
* Insert a configuration file (keeping files sorted by name).
*/
void
@@ -188,9 +188,9 @@ config_file_config_insert (struct t_config_file *config_file)
}
/*
* Creates a new configuration file.
* Create a new configuration file.
*
* Returns pointer to new configuration file, NULL if error.
* Return pointer to new configuration file, NULL if error.
*/
struct t_config_file *
@@ -250,10 +250,10 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name,
}
/*
* Sets configuration file version and a callback to update config
* Set configuration file version and a callback to update config
* sections/options on-the-fly when the config is read.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -282,10 +282,10 @@ config_file_set_version (struct t_config_file *config_file,
}
/*
* Compares two configuration files to sort them by priority (highest priority
* Compare two configuration files to sort them by priority (highest priority
* at beginning of list).
*
* Returns:
* Return:
* -1: config1 has higher priority than config2
* 1: config1 has same or lower priority than config2
*/
@@ -308,7 +308,7 @@ config_file_arraylist_cmp_config_cb (void *data,
}
/*
* Returns an arraylist with pointers to configuration files, sorted by
* Return an arraylist with pointers to configuration files, sorted by
* priority (from highest to lowest).
*/
@@ -339,7 +339,7 @@ config_file_get_configs_by_priority (void)
}
/*
* Searches for position of section in configuration file (to keep sections
* Search for position of section in configuration file (to keep sections
* sorted by name).
*/
@@ -364,9 +364,9 @@ config_file_section_find_pos (struct t_config_file *config_file,
}
/*
* Creates a new section in a configuration file.
* Create a new section in a configuration file.
*
* Returns pointer to new section, NULL if error.
* Return pointer to new section, NULL if error.
*/
struct t_config_section *
@@ -459,9 +459,9 @@ config_file_new_section (struct t_config_file *config_file, const char *name,
}
/*
* Searches for a section in a configuration file.
* Search for a section in a configuration file.
*
* Returns pointer to section found, NULL if not found.
* Return pointer to section found, NULL if not found.
*/
struct t_config_section *
@@ -485,7 +485,7 @@ config_file_search_section (struct t_config_file *config_file,
}
/*
* Builds full name for an option, using format: "file.section.option".
* Build full name for an option, using format: "file.section.option".
*
* Note: result must be freed after use.
*/
@@ -508,7 +508,7 @@ config_file_option_full_name (struct t_config_option *option)
}
/*
* Executes hook_config for modified option.
* Execute hook_config for modified option.
*/
void
@@ -561,7 +561,7 @@ config_file_hook_config_exec (struct t_config_option *option)
}
/*
* Searches for position of option in section (to keep options sorted by name).
* Search for position of option in section (to keep options sorted by name).
*/
struct t_config_option *
@@ -583,7 +583,7 @@ config_file_option_find_pos (struct t_config_section *section, const char *name)
}
/*
* Inserts an option in section (keeping options sorted by name).
* Insert an option in section (keeping options sorted by name).
*/
void
@@ -629,9 +629,9 @@ config_file_option_insert_in_section (struct t_config_option *option)
}
/*
* Allocates memory for a new option and initializes it.
* Allocate memory for a new option and initializes it.
*
* Returns pointer to new option, NULL if error.
* Return pointer to new option, NULL if error.
*/
struct t_config_option *
@@ -672,9 +672,9 @@ config_file_option_malloc (void)
}
/*
* Creates a new option.
* Create a new option.
*
* Returns pointer to new option, NULL if error.
* Return pointer to new option, NULL if error.
*/
struct t_config_option *
@@ -977,9 +977,9 @@ end:
}
/*
* Searches for an option in a configuration file or section.
* Search for an option in a configuration file or section.
*
* Returns pointer to option found, NULL if error.
* Return pointer to option found, NULL if error.
*/
struct t_config_option *
@@ -1028,9 +1028,9 @@ config_file_search_option (struct t_config_file *config_file,
}
/*
* Searches for an option in a configuration file or section.
* Search for an option in a configuration file or section.
*
* Returns section/option found (in section_found/option_found), NULL if not
* Return section/option found (in section_found/option_found), NULL if not
* found.
*/
@@ -1090,7 +1090,7 @@ config_file_search_section_option (struct t_config_file *config_file,
}
/*
* Searches for a file/section/option using a full name of option (format:
* Search for a file/section/option using a full name of option (format:
* "file.section.option").
*/
@@ -1165,7 +1165,7 @@ config_file_search_with_string (const char *option_name,
}
/*
* Gets pointer to parent option, NULL if the option has no parent.
* Get pointer to parent option, NULL if the option has no parent.
*/
struct t_config_option *
@@ -1187,9 +1187,9 @@ config_file_get_parent_option (struct t_config_option *option)
}
/*
* Checks if a string with boolean value is valid.
* Check if a string with boolean value is valid.
*
* Returns:
* Return:
* 1: boolean value is valid
* 0: boolean value is NOT valid
*/
@@ -1219,9 +1219,9 @@ config_file_string_boolean_is_valid (const char *text)
}
/*
* Converts string to boolean value.
* Convert string to boolean value.
*
* Returns:
* Return:
* 1: boolean value is true
* 0: boolean value is false
*/
@@ -1244,9 +1244,9 @@ config_file_string_to_boolean (const char *text)
}
/*
* Resets an option to its default value.
* Reset an option to its default value.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -1392,9 +1392,9 @@ config_file_option_reset (struct t_config_option *option, int run_callback)
}
/*
* Sets the value for an option.
* Set the value for an option.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -1718,9 +1718,9 @@ config_file_option_set (struct t_config_option *option, const char *value,
}
/*
* Toggles value of an option.
* Toggle value of an option.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -1825,9 +1825,9 @@ end:
}
/*
* Sets null (undefined) value for an option.
* Set null (undefined) value for an option.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -1875,9 +1875,9 @@ config_file_option_set_null (struct t_config_option *option, int run_callback)
}
/*
* Sets the default value for an option.
* Set the default value for an option.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, default value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, default value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -2190,9 +2190,9 @@ config_file_option_set_default (struct t_config_option *option,
}
/*
* Unsets/resets an option.
* Unset/reset an option.
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: OK, value has not been reset
* WEECHAT_CONFIG_OPTION_UNSET_OK_RESET: OK, value has been reset
* WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: OK, value has been removed
@@ -2265,7 +2265,7 @@ config_file_option_unset (struct t_config_option *option)
}
/*
* Renames an option.
* Rename an option.
*/
void
@@ -2340,7 +2340,7 @@ config_file_option_rename (struct t_config_option *option,
}
/*
* Builds a string with the value or default value of option,
* Build a string with the value or default value of option,
* depending on the type of option.
*
* According to default_value:
@@ -2435,7 +2435,7 @@ config_file_option_value_to_string (struct t_config_option *option,
}
/*
* Gets a string value of an option property.
* Get a string value of an option property.
*/
const char *
@@ -2462,7 +2462,7 @@ config_file_option_get_string (struct t_config_option *option,
}
/*
* Gets a pointer on an option property.
* Get a pointer on an option property.
*/
void *
@@ -2503,9 +2503,9 @@ config_file_option_get_pointer (struct t_config_option *option,
}
/*
* Checks if an option has a null value.
* Check if an option has a null value.
*
* Returns:
* Return:
* 1: value of option is null
* 0: value of option is not null
*/
@@ -2520,9 +2520,9 @@ config_file_option_is_null (struct t_config_option *option)
}
/*
* Checks if an option has a null default value.
* Check if an option has a null default value.
*
* Returns:
* Return:
* 1: default value of option is null
* 0: default value of option is not null
*/
@@ -2537,9 +2537,9 @@ config_file_option_default_is_null (struct t_config_option *option)
}
/*
* Checks if an option has changed (current value different from default value).
* Check if an option has changed (current value different from default value).
*
* Returns:
* Return:
* 1: option has changed
* 0: option has default value
*/
@@ -2580,10 +2580,10 @@ int config_file_option_has_changed (struct t_config_option *option)
}
/*
* Sets the value for an option using a full name of option (format:
* Set the value for an option using a full name of option (format:
* "file.section.option").
*
* Returns:
* Return:
* WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: OK, value has been changed
* WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: OK, value not changed
* WEECHAT_CONFIG_OPTION_SET_ERROR: error
@@ -2632,9 +2632,9 @@ config_file_option_set_with_string (const char *option_name, const char *value)
}
/*
* Returns boolean value of an option.
* Return boolean value of an option.
*
* Returns 1 if value is true, 0 if it is false.
* Return 1 if value is true, 0 if it is false.
*/
int
@@ -2647,9 +2647,9 @@ config_file_option_boolean (struct t_config_option *option)
}
/*
* Returns default boolean value of an option.
* Return default boolean value of an option.
*
* Returns 1 if default value is true, 0 if it is false.
* Return 1 if default value is true, 0 if it is false.
*/
int
@@ -2662,11 +2662,11 @@ config_file_option_boolean_default (struct t_config_option *option)
}
/*
* Returns inherited boolean value of an option: value of option if not NULL,
* Return inherited boolean value of an option: value of option if not NULL,
* or value of the parent option (if option inherits from another option).
*
* If the parent option is not found, returns the default value of the option.
* If the parent value is NULL, returns the default value of the parent option.
* If the parent option is not found, return the default value of the option.
* If the parent value is NULL, return the default value of the parent option.
*/
int
@@ -2690,7 +2690,7 @@ config_file_option_boolean_inherited (struct t_config_option *option)
}
/*
* Returns integer value of an option.
* Return integer value of an option.
*/
int
@@ -2721,7 +2721,7 @@ config_file_option_integer (struct t_config_option *option)
}
/*
* Returns default integer value of an option.
* Return default integer value of an option.
*/
int
@@ -2752,11 +2752,11 @@ config_file_option_integer_default (struct t_config_option *option)
}
/*
* Returns inherited integer value of an option: value of option if not NULL,
* Return inherited integer value of an option: value of option if not NULL,
* or value of the parent option (if option inherits from another option).
*
* If the parent option is not found, returns the default value of the option.
* If the parent value is NULL, returns the default value of the parent option.
* If the parent option is not found, return the default value of the option.
* If the parent value is NULL, return the default value of the parent option.
*/
int
@@ -2780,7 +2780,7 @@ config_file_option_integer_inherited (struct t_config_option *option)
}
/*
* Returns string value of an option.
* Return string value of an option.
*/
const char *
@@ -2811,7 +2811,7 @@ config_file_option_string (struct t_config_option *option)
}
/*
* Returns default string value of an option.
* Return default string value of an option.
*/
const char *
@@ -2842,11 +2842,11 @@ config_file_option_string_default (struct t_config_option *option)
}
/*
* Returns inherited string value of an option: value of option if not NULL,
* Return inherited string value of an option: value of option if not NULL,
* or value of the parent option (if option inherits from another option).
*
* If the parent option is not found, returns the default value of the option.
* If the parent value is NULL, returns the default value of the parent option.
* If the parent option is not found, return the default value of the option.
* If the parent value is NULL, return the default value of the parent option.
*/
const char *
@@ -2870,7 +2870,7 @@ config_file_option_string_inherited (struct t_config_option *option)
}
/*
* Returns color value of an option.
* Return color value of an option.
*/
const char *
@@ -2883,7 +2883,7 @@ config_file_option_color (struct t_config_option *option)
}
/*
* Returns default color value of an option.
* Return default color value of an option.
*/
const char *
@@ -2896,11 +2896,11 @@ config_file_option_color_default (struct t_config_option *option)
}
/*
* Returns inherited color value of an option: value of option if not NULL,
* Return inherited color value of an option: value of option if not NULL,
* or value of the parent option (if option inherits from another option).
*
* If the parent option is not found, returns the default value of the option.
* If the parent value is NULL, returns the default value of the parent option.
* If the parent option is not found, return the default value of the option.
* If the parent value is NULL, return the default value of the parent option.
*/
const char *
@@ -2922,7 +2922,7 @@ config_file_option_color_inherited (struct t_config_option *option)
}
/*
* Returns enum value of an option.
* Return enum value of an option.
*/
int
@@ -2953,7 +2953,7 @@ config_file_option_enum (struct t_config_option *option)
}
/*
* Returns default enum value of an option.
* Return default enum value of an option.
*/
int
@@ -2984,11 +2984,11 @@ config_file_option_enum_default (struct t_config_option *option)
}
/*
* Returns inherited enum value of an option: value of option if not NULL,
* Return inherited enum value of an option: value of option if not NULL,
* or value of the parent option (if option inherits from another option).
*
* If the parent option is not found, returns the default value of the option.
* If the parent value is NULL, returns the default value of the parent option.
* If the parent option is not found, return the default value of the option.
* If the parent value is NULL, return the default value of the parent option.
*/
int
@@ -3012,9 +3012,9 @@ config_file_option_enum_inherited (struct t_config_option *option)
}
/*
* Returns a char to add before the name of option to escape it.
* Return a char to add before the name of option to escape it.
*
* Returns:
* Return:
* "\": name must be escaped with "\" (if names begins with # [ \)
* "": name must not be escaped
*/
@@ -3034,9 +3034,9 @@ config_file_option_escape (const char *name)
}
/*
* Writes an option in a configuration file.
* Write an option in a configuration file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3102,11 +3102,11 @@ config_file_write_option (struct t_config_file *config_file,
}
/*
* Writes a line in a configuration file.
* Write a line in a configuration file.
*
* If value is NULL, then writes a section with [ ] around.
* If value is NULL, write a section with `[` and `]` around.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3142,9 +3142,9 @@ config_file_write_line (struct t_config_file *config_file,
}
/*
* Writes a configuration file (this function must not be called directly).
* Write a configuration file (this function must not be called directly).
*
* Returns:
* Return:
* WEECHAT_CONFIG_WRITE_OK: OK
* WEECHAT_CONFIG_WRITE_ERROR: error
* WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory
@@ -3357,9 +3357,9 @@ end:
}
/*
* Writes a configuration file.
* Write a configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_WRITE_OK: OK
* WEECHAT_CONFIG_WRITE_ERROR: error
* WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory
@@ -3372,9 +3372,9 @@ config_file_write (struct t_config_file *config_file)
}
/*
* Parses configuration version.
* Parse configuration version.
*
* Returns:
* Return:
* >= 1: configuration version
* -1: error
*/
@@ -3397,8 +3397,7 @@ config_file_parse_version (const char *version)
}
/*
* Backups a configuration file if its version is unsupported and cannot be
* loaded.
* Backup a configuration file if its version is unsupported and cannot be loaded.
*/
void
@@ -3457,13 +3456,13 @@ config_file_backup (const char *filename)
}
/*
* Updates data read from config file: either section or option + value.
* Update data read from config file: either section or option + value.
* The update callback (if defined in config) is called if the config version
* read in file is less than to the current config version.
*
* Parameters "section", "option" and "value" are updated in place: if the
* callback gives a new value, they are first freed and allocated again with
* the new value (or set to NULL for the value if the callback returns
* the new value (or set to NULL for the value if the callback return
* special key "value_null").
*
* Section can be updated only if option and value are NULL (ie if we are
@@ -3590,9 +3589,9 @@ config_file_update_data_read (struct t_config_file *config_file,
}
/*
* Reads a configuration file (this function must not be called directly).
* Read a configuration file (this function must not be called directly).
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -3920,9 +3919,9 @@ end_file:
}
/*
* Reads a configuration file.
* Read a configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -3935,9 +3934,9 @@ config_file_read (struct t_config_file *config_file)
}
/*
* Reloads a configuration file.
* Reload a configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -3991,7 +3990,7 @@ config_file_reload (struct t_config_file *config_file)
}
/*
* Frees data in an option.
* Free data in an option.
*/
void
@@ -4009,7 +4008,7 @@ config_file_option_free_data (struct t_config_option *option)
}
/*
* Frees an option.
* Free an option.
*/
void
@@ -4057,7 +4056,7 @@ config_file_option_free (struct t_config_option *option, int run_callback)
}
/*
* Frees options in a section.
* Free options in a section.
*/
void
@@ -4073,7 +4072,7 @@ config_file_section_free_options (struct t_config_section *section)
}
/*
* Frees a section.
* Free a section.
*/
void
@@ -4116,7 +4115,7 @@ config_file_section_free (struct t_config_section *section)
}
/*
* Frees a configuration file.
* Free a configuration file.
*/
void
@@ -4159,7 +4158,7 @@ config_file_free (struct t_config_file *config_file)
}
/*
* Frees all configuration files.
* Free all configuration files.
*/
void
@@ -4172,7 +4171,7 @@ config_file_free_all (void)
}
/*
* Frees all configuration files for a plugin.
* Free all configuration files for a plugin.
*/
void
@@ -4193,7 +4192,7 @@ config_file_free_all_plugin (struct t_weechat_plugin *plugin)
}
/*
* Returns hdata for structure t_config_file.
* Return hdata for structure t_config_file.
*/
struct t_hdata *
@@ -4230,7 +4229,7 @@ config_file_hdata_config_file_cb (const void *pointer, void *data,
}
/*
* Returns hdata for structure t_config_section.
* Return hdata for structure t_config_section.
*/
struct t_hdata *
@@ -4275,7 +4274,7 @@ config_file_hdata_config_section_cb (const void *pointer, void *data,
}
/*
* Returns hdata for structure t_config_option.
* Return hdata for structure t_config_option.
*/
struct t_hdata *
@@ -4321,9 +4320,9 @@ config_file_hdata_config_option_cb (const void *pointer, void *data,
}
/*
* Adds a configuration option in an infolist.
* Add a configuration option in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -4463,9 +4462,9 @@ end:
}
/*
* Adds configuration options in an infolist.
* Add configuration options in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -4506,7 +4505,7 @@ config_file_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints configuration file in WeeChat log file (usually for crash dump).
* Print configuration file in WeeChat log file (usually for crash dump).
*/
void
+47 -50
View File
@@ -404,7 +404,7 @@ config_change_sys_rlimit (const void *pointer, void *data,
}
/*
* Checks option "weechat.look.config_permissions".
* Check option "weechat.look.config_permissions".
*/
int
@@ -507,7 +507,7 @@ config_change_window_title (const void *pointer, void *data,
}
/*
* Sets word chars array with a word chars option.
* Set word chars array with a word chars option.
*/
void
@@ -762,7 +762,7 @@ config_change_buffer_time_same (const void *pointer, void *data,
}
/*
* Computes the "prefix_max_length" on all buffers.
* Compute the "prefix_max_length" on all buffers.
*/
void
@@ -781,7 +781,7 @@ config_compute_prefix_max_length_all_buffers (void)
}
/*
* Sets nick colors using option "weechat.color.chat_nick_colors".
* Set nick colors using option "weechat.color.chat_nick_colors".
*/
void
@@ -859,8 +859,7 @@ config_change_look_nick_color_force (const void *pointer, void *data,
}
/*
* Sets eval syntax highlighting colors using option
* "weechat.color.eval_syntax_colors".
* Set eval syntax highlighting colors using option "weechat.color.eval_syntax_colors".
*/
void
@@ -1176,7 +1175,7 @@ config_change_item_time_format (const void *pointer, void *data,
}
/*
* Gets the current time formatted for the bar item status.
* Get the current time formatted for the bar item status.
*/
void
@@ -1265,7 +1264,7 @@ config_change_prefix_align_min (const void *pointer, void *data,
}
/*
* Checks option "weechat.look.prefix_align_more".
* Check option "weechat.look.prefix_align_more".
*/
int
@@ -1282,7 +1281,7 @@ config_check_prefix_align_more (const void *pointer, void *data,
}
/*
* Checks option "weechat.look.prefix_buffer_align_more".
* Check option "weechat.look.prefix_buffer_align_more".
*/
int
@@ -1299,7 +1298,7 @@ config_check_prefix_buffer_align_more (const void *pointer, void *data,
}
/*
* Checks options "weechat.look.separator_{horizontal|vertical}".
* Check options "weechat.look.separator_{horizontal|vertical}".
*/
int
@@ -1316,7 +1315,7 @@ config_check_separator (const void *pointer, void *data,
}
/*
* Checks options "weechat.look.whitespace_char" and
* Check options "weechat.look.whitespace_char" and
* "weechat.look.tab_whitespace_char".
*/
@@ -1473,8 +1472,7 @@ config_change_completion_nick_ignore_words (const void *pointer,
}
/*
* Callback for changes on option
* "weechat.completion.partial_completion_templates".
* Callback for changes on option "weechat.completion.partial_completion_templates".
*/
void
@@ -1542,7 +1540,7 @@ config_change_network_gnutls_ca (const void *pointer, void *data,
}
/*
* Checks option "weechat.network.proxy_curl".
* Check option "weechat.network.proxy_curl".
*/
int
@@ -1602,9 +1600,9 @@ config_change_plugin_extension (const void *pointer, void *data,
}
/*
* Timer called each minute: checks if the day has changed, and if yes:
* - refreshes screen (if needed)
* - sends signal "day_changed"
* Timer called each minute: check if the day has changed, and if yes:
* - refresh screen (if needed)
* - send signal "day_changed"
*/
int
@@ -1652,7 +1650,7 @@ config_day_change_timer_cb (const void *pointer, void *data,
}
/*
* Initializes some things after reading/reloading WeeChat configuration file.
* Initialize some things after reading/reloading WeeChat configuration file.
*/
void
@@ -1701,7 +1699,7 @@ config_weechat_init_after_read (void)
}
/*
* Updates options in configuration file while reading the file.
* Update options in configuration file while reading the file.
*/
struct t_hashtable *
@@ -1939,9 +1937,9 @@ config_weechat_update_cb (const void *pointer, void *data,
}
/*
* Reloads WeeChat configuration file.
* Reload WeeChat configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -1994,7 +1992,7 @@ config_weechat_reload_cb (const void *pointer, void *data,
}
/*
* Gets debug level for a plugin (or "core").
* Get debug level for a plugin (or "core").
*/
struct t_config_option *
@@ -2006,8 +2004,7 @@ config_weechat_debug_get (const char *plugin_name)
}
/*
* Sets debug level for "core" and all plugins, using values from section
* "debug".
* Set debug level for "core" and all plugins, using values from section "debug".
*/
void
@@ -2129,7 +2126,7 @@ config_weechat_debug_delete_option_cb (const void *pointer, void *data,
}
/*
* Sets debug level for a plugin (or "core").
* Set debug level for a plugin (or "core").
*/
int
@@ -2266,7 +2263,7 @@ config_weechat_palette_delete_option_cb (const void *pointer, void *data,
}
/*
* Reads a proxy option in WeeChat configuration file.
* Read a proxy option in WeeChat configuration file.
*/
int
@@ -2345,7 +2342,7 @@ config_weechat_proxy_read_cb (const void *pointer, void *data,
}
/*
* Reads a bar option in WeeChat configuration file.
* Read a bar option in WeeChat configuration file.
*/
int
@@ -2425,7 +2422,7 @@ config_weechat_bar_read_cb (const void *pointer, void *data,
}
/*
* Reads a custom bar item option in WeeChat configuration file.
* Read a custom bar item option in WeeChat configuration file.
*/
int
@@ -2515,7 +2512,7 @@ config_weechat_custom_bar_item_read_cb (const void *pointer, void *data,
}
/*
* Reads a layout option in WeeChat configuration file.
* Read a layout option in WeeChat configuration file.
*/
int
@@ -2646,9 +2643,9 @@ config_weechat_layout_read_cb (const void *pointer, void *data,
}
/*
* Writes layout of windows in WeeChat configuration file.
* Write layout of windows in WeeChat configuration file.
*
* Returns:
* Return:
* 1: OK
* 0: write error
*/
@@ -2689,7 +2686,7 @@ config_weechat_layout_write_tree (struct t_config_file *config_file,
}
/*
* Writes section "layout" in WeeChat configuration file.
* Write section "layout" in WeeChat configuration file.
*/
int
@@ -2749,7 +2746,7 @@ config_weechat_layout_write_cb (const void *pointer, void *data,
}
/*
* Applies a buffer option to all matching buffers.
* Apply a buffer option to all matching buffers.
*/
void
@@ -2871,9 +2868,9 @@ config_weechat_buffer_create_option_cb (const void *pointer, void *data,
}
/*
* Sets a buffer property.
* Set a buffer property.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3024,12 +3021,12 @@ config_weechat_notify_delete_option_cb (const void *pointer, void *data,
}
/*
* Sets a notify level for a buffer.
* Set a notify level for a buffer.
*
* A negative value resets notify for buffer to its default value (and
* removes buffer from config file).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3054,7 +3051,7 @@ config_weechat_notify_set (struct t_gui_buffer *buffer, const char *notify)
}
/*
* Reads a filter option in WeeChat configuration file.
* Read a filter option in WeeChat configuration file.
*/
int
@@ -3098,7 +3095,7 @@ config_weechat_filter_read_cb (const void *pointer, void *data,
}
/*
* Writes section "filter" in WeeChat configuration file.
* Write section "filter" in WeeChat configuration file.
*/
int
@@ -3132,9 +3129,9 @@ config_weechat_filter_write_cb (const void *pointer, void *data,
}
/*
* Searches key context with the section pointer.
* Search key context with the section pointer.
*
* Returns key context, -1 if not found.
* Return key context, -1 if not found.
*/
int
@@ -3223,9 +3220,9 @@ config_weechat_key_delete_option_cb (const void *pointer, void *data,
}
/*
* Creates options in WeeChat configuration.
* Create options in WeeChat configuration.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -5599,9 +5596,9 @@ config_weechat_init_options (void)
}
/*
* Initializes WeeChat configuration.
* Initialize WeeChat configuration.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -5661,9 +5658,9 @@ config_weechat_init (void)
}
/*
* Reads WeeChat configuration file.
* Read WeeChat configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -5684,9 +5681,9 @@ config_weechat_read (void)
}
/*
* Writes WeeChat configuration file.
* Write WeeChat configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_WRITE_OK: OK
* WEECHAT_CONFIG_WRITE_ERROR: error
* WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory
@@ -5699,7 +5696,7 @@ config_weechat_write (void)
}
/*
* Frees WeeChat configuration file and variables.
* Free WeeChat configuration file and variables.
*/
void
+16 -16
View File
@@ -123,7 +123,7 @@ int weecrypto_cipher[] = {
/*
* Returns the hash algorithm with the name, or GCRY_MD_NONE if not found.
* Return the hash algorithm with the name, or GCRY_MD_NONE if not found.
*/
int
@@ -144,7 +144,7 @@ weecrypto_get_hash_algo (const char *hash_algo)
}
/*
* Returns the cipher with the name, or GCRY_CIPHER_NONE if not found.
* Return the cipher with the name, or GCRY_CIPHER_NONE if not found.
*/
int
@@ -165,7 +165,7 @@ weecrypto_get_cipher (const char *cipher)
}
/*
* Computes hash of data using the given hash algorithm.
* Compute hash of data using the given hash algorithm.
*
* The hash size depends on the algorithm, common ones are:
*
@@ -196,7 +196,7 @@ weecrypto_get_cipher (const char *cipher)
* If hash_size is not NULL, the length of hash is stored in *hash_size
* (in bytes).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -255,7 +255,7 @@ hash_end:
}
/*
* Computes hash of file using the given hash algorithm.
* Compute hash of file using the given hash algorithm.
*
* The hash size depends on the algorithm, common ones are:
*
@@ -286,7 +286,7 @@ hash_end:
* If hash_size is not NULL, the length of hash is stored in *hash_size
* (in bytes).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -361,7 +361,7 @@ hash_end:
}
/*
* Computes PKCS#5 Passphrase Based Key Derivation Function number 2 (PBKDF2)
* Compute PKCS#5 Passphrase Based Key Derivation Function number 2 (PBKDF2)
* hash of data.
*
* The hash size depends on the algorithm, common ones are:
@@ -375,7 +375,7 @@ hash_end:
* If hash_size is not NULL, the length of hash is stored in *hash_size
* (in bytes).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -419,7 +419,7 @@ hash_pbkdf2_end:
}
/*
* Computes keyed-hash message authentication code (HMAC).
* Compute keyed-hash message authentication code (HMAC).
*
* The hash size depends on the algorithm, common ones are:
*
@@ -450,7 +450,7 @@ hash_pbkdf2_end:
* If hash_size is not NULL, the length of hash is stored in *hash_size
* (in bytes).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -514,10 +514,10 @@ hmac_end:
}
/*
* Generates a Time-based One-Time Password (TOTP), as described
* Generate a Time-based One-Time Password (TOTP), as described
* in the RFC 6238.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -556,10 +556,10 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
}
/*
* Generates a Time-based One-Time Password (TOTP), as described
* Generate a Time-based One-Time Password (TOTP), as described
* in the RFC 6238.
*
* Returns the password as string, NULL if error.
* Return the password as string, NULL if error.
*
* Note: result must be freed after use.
*/
@@ -615,9 +615,9 @@ error:
}
/*
* Validates a Time-based One-Time Password (TOTP).
* Validate a Time-based One-Time Password (TOTP).
*
* Returns:
* Return:
* 1: OTP is OK
* 0: OTP is invalid
*/
+15 -16
View File
@@ -91,7 +91,7 @@ long long debug_long_callbacks = 0; /* callbacks taking more than */
/*
* Displays build information on stdout.
* Display build information on stdout.
*/
void
@@ -149,7 +149,7 @@ debug_build_info (void)
}
/*
* Writes dump of data to WeeChat log file.
* Write dump of data to WeeChat log file.
*/
void
@@ -226,7 +226,7 @@ debug_dump_cb (const void *pointer, void *data,
/*
* Callback for system signal SIGSEGV handler.
*
* Writes dump of data and backtrace to WeeChat log file, then exit.
* Write dump of data and backtrace to WeeChat log file, then exit.
*/
void
@@ -271,7 +271,7 @@ debug_sigsegv_cb (int signo)
}
/*
* Displays tree of windows (this function must not be called directly).
* Display tree of windows (this function must not be called directly).
*/
void
@@ -341,7 +341,7 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent)
}
/*
* Displays tree of windows.
* Display tree of windows.
*/
void
@@ -353,7 +353,7 @@ debug_windows_tree (void)
}
/*
* Displays information about dynamic memory allocation.
* Display information about dynamic memory allocation.
*/
void
@@ -499,7 +499,7 @@ debug_hdata_map_cb (void *data,
}
/*
* Displays a list of hdata in memory.
* Display a list of hdata in memory.
*/
void
@@ -517,7 +517,7 @@ debug_hdata (void)
}
/*
* Displays info about hooks.
* Display info about hooks.
*/
void
@@ -538,7 +538,7 @@ debug_hooks (void)
}
/*
* Displays info about hooks for one or multiple plugins matching a mask.
* Display info about hooks for one or multiple plugins matching a mask.
*/
void
@@ -657,7 +657,7 @@ debug_hooks_plugin_types (const char *plugin_mask, const char **hook_types)
}
/*
* Displays a list of infolists in memory.
* Display a list of infolists in memory.
*/
void
@@ -748,7 +748,7 @@ debug_infolists (void)
}
/*
* Callback for signal "debug_libs": displays infos about external libraries
* Callback for signal "debug_libs": display infos about external libraries
* used (called when command "/debug libs" is issued).
*
* Note: this function displays libraries for WeeChat core only: plugins can
@@ -821,7 +821,7 @@ debug_libs_cb (const void *pointer, void *data,
}
/*
* Displays WeeChat directories.
* Display WeeChat directories.
*/
void
@@ -859,8 +859,7 @@ debug_directories (void)
/*
* Display time elapsed between two times.
*
* If display is 1, the message is displayed in core buffer, otherwise it's
* written in log file.
* If display is 1, display message in core buffer, otherwise write in log file.
*/
void
@@ -1032,7 +1031,7 @@ debug_unicode (const char *string)
}
/*
* Initializes debug.
* Initialize debug.
*/
void
@@ -1048,7 +1047,7 @@ debug_init (void)
}
/*
* Ends debug.
* End debug.
*/
void
+41 -41
View File
@@ -57,7 +57,7 @@
/*
* Returns the path to a temporary directory, the first valid directory in
* Return the path to a temporary directory, the first valid directory in
* this list:
* - content of environment variable "TMPDIR"
* - P_tmpdir (from stdio.h)
@@ -100,9 +100,9 @@ dir_get_temp_dir (void)
}
/*
* Creates a directory in WeeChat home.
* Create a directory in WeeChat home.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -175,9 +175,9 @@ end:
}
/*
* Creates a directory.
* Create a directory.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -198,9 +198,9 @@ dir_mkdir (const char *directory, int mode)
}
/*
* Creates a directory and makes parent directories as needed.
* Create a directory and make parent directories as needed.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -257,9 +257,9 @@ dir_mkdir_parents (const char *directory, int mode)
}
/*
* Unlinks a file or directory; callback called by function dir_rmtree().
* Unlink a file or directory; callback called by function dir_rmtree().
*
* Returns the return code of remove():
* Return the return code of remove():
* 0: OK
* -1: error
*/
@@ -277,9 +277,9 @@ dir_unlink_cb (const char *fpath, const struct stat *sb, int typeflag,
}
/*
* Removes a directory and all files inside recursively.
* Remove a directory and all files inside recursively.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -298,12 +298,12 @@ dir_rmtree (const char *directory)
}
/*
* Uses one or four different paths for WeeChat home directories.
* Use one or four different paths for WeeChat home directories.
*
* If 4 paths are given, they must be separated by colons and given in this
* order: config, data, cache, runtime.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -374,9 +374,9 @@ end:
}
/*
* Creates WeeChat temporary home directory (deleted on exit).
* Create WeeChat temporary home directory (deleted on exit).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -435,9 +435,9 @@ end:
}
/*
* Finds XDG directories.
* Find XDG directories.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -592,10 +592,10 @@ error:
}
/*
* Finds WeeChat home directories: it can be either XDG directories or the
* Find WeeChat home directories: it can be either XDG directories or the
* same directory for all files (like the legacy directory ~/.weechat).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -673,7 +673,7 @@ use_xdg:
}
/*
* Removes trailing separators in path, which is modified in place
* Remove trailing separators in path, which is modified in place
* (each trailing separator is replaced by NUL char).
*
* Example on Linux: "/home/xxx/" => "/home/xxx".
@@ -696,9 +696,9 @@ dir_remove_trailing_separators (char *path)
}
/*
* Creates a home directory.
* Create a home directory.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -733,7 +733,7 @@ dir_create_home_dir (char *path)
}
/*
* Creates WeeChat home directories.
* Create WeeChat home directories.
*
* Any error in this function (or a sub function called) is fatal: WeeChat
* cannot run at all without the home directories.
@@ -770,7 +770,7 @@ error:
}
/*
* Removes WeeChat home directories (called when -t / --temp-dir is given).
* Remove WeeChat home directories (called when -t / --temp-dir is given).
*/
void
@@ -788,7 +788,7 @@ dir_remove_home_dirs (void)
}
/*
* Returns a string with home directories separated by colons, in this order:
* Return a string with home directories separated by colons, in this order:
* config_dir, data_dir, state_dir, cache_dir, runtime_dir.
*
* Example of value returned:
@@ -815,7 +815,7 @@ dir_get_string_home_dirs (void)
}
/*
* Finds files in a directory and executes a function on each file.
* Find files in a directory and execute a function on each file.
*/
void
@@ -863,10 +863,10 @@ dir_exec_on_files (const char *directory, int recurse_subdirs,
}
/*
* Searches for the full name of a WeeChat library with name and extension
* Search for the full name of a WeeChat library with name and extension
* (searches first in WeeChat user's dir, then WeeChat global lib directory).
*
* Returns name of library found, NULL if not found.
* Return name of library found, NULL if not found.
*
* Note: result must be freed after use (if not NULL).
*/
@@ -933,7 +933,7 @@ dir_search_full_lib_name_ext (const char *filename, const char *extension,
}
/*
* Searches for the full name of a WeeChat library with name.
* Search for the full name of a WeeChat library with name.
*
* All extensions listed in option "weechat.plugin.extension" are tested.
*
@@ -986,9 +986,9 @@ dir_search_full_lib_name (const char *filename, const char *plugins_dir)
}
/*
* Reads content of a file.
* Read content of a file.
*
* Returns an allocated buffer with the content of file, NULL if error.
* Return an allocated buffer with the content of file, NULL if error.
*
* Note: result must be freed after use.
*/
@@ -1042,9 +1042,9 @@ error:
}
/*
* Copies a file to another location.
* Copy a file to another location.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1097,13 +1097,13 @@ end:
}
/*
* Compresses a file with gzip.
* Compress a file with gzip.
*
* Notes:
* - the output file must not exist
* - compression_level is an integer between 1 and 9
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1203,13 +1203,13 @@ end:
}
/*
* Compresses a file with zstandard.
* Compress a file with zstandard.
*
* Notes:
* - the output file must not exist
* - compression_level is an integer between 1 and 19
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1387,7 +1387,7 @@ end:
}
/*
* Compresses a file with gzip or zstandard.
* Compress a file with gzip or zstandard.
*
* The output file must not exist.
*
@@ -1398,7 +1398,7 @@ end:
* Parameter "compression_level" is the compression level as percentage:
* from 1 (fast, low compression) to 100 (slow, best compression).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1433,14 +1433,14 @@ dir_file_compress (const char *filename_input,
}
/*
* Compares the content of two files (the attributes of the files like the
* Compare the content of two files (the attributes of the files like the
* permissions or timestamp are ignored).
*
* Comparison is done like this:
* 1. if sizes are different, return 1 (different content)
* 2. if sizes are the same, read both files until a difference is found
*
* Returns:
* Return:
* 0: both files exist and their content is exactly the same
* 1: content is different
* 2: other error (file not found, read error)
+52 -52
View File
@@ -61,7 +61,7 @@ char *string_escaped[32];
/*
* Escapes a string to display in a table: replace "|" by "\|".
* Escape a string to display in a table: replace "|" by "\|".
*/
char *
@@ -74,7 +74,7 @@ doc_gen_escape_table (const char *message)
}
/*
* Escapes a string to be used as anchor link: replace ",", "@" and "*" by "-".
* Escape a string to be used as anchor link: replace ",", "@" and "*" by "-".
*/
char *
@@ -94,13 +94,13 @@ doc_gen_escape_anchor_link (const char *message)
}
/*
* Opens a file for write using:
* Open a file for write using:
* - path
* - doc: "api" or "user"
* - name
* - language (eg: "fr")
*
* Returns the file opened, NULL if error.
* Return the file opened, NULL if error.
*/
FILE *
@@ -135,13 +135,13 @@ doc_gen_open_file (const char *path, const char *doc, const char *name,
}
/*
* Closes the file and renames it without ".temp" suffix, if the target name
* Close the file and rename it without ".temp" suffix, if the target name
* does not exist or if it exists with a different (obsolete) content.
*
* If the target name exists with same content it's kept as-is (so the
* timestamp does not change) and the temporary file is just deleted.
* If the target name exists with same content, keep it as-is (so the
* timestamp does not change) and just delete the temporary file.
*
* Returns:
* Return:
* 1: target file has been updated
* 0: target file unchanged
* -1: error
@@ -183,7 +183,7 @@ doc_gen_close_file (const char *path, const char *doc, const char *name,
}
/*
* Checks if a command must be documented or not: all commands are documented
* Check if a command must be documented or not: all commands are documented
* except the default aliases (that create commands).
*/
@@ -195,7 +195,7 @@ doc_gen_check_command (const char *plugin, const char *command)
}
/*
* Compares two hooks "command" to sort by plugin / command.
* Compare two hooks "command" to sort by plugin / command.
*/
int
@@ -221,9 +221,9 @@ doc_gen_hook_command_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with commands.
* Generate files with commands.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -366,7 +366,7 @@ doc_gen_user_commands (const char *path, const char *lang)
}
/*
* Checks if an option must be documented or not.
* Check if an option must be documented or not.
*/
int
@@ -395,7 +395,7 @@ doc_gen_check_option (struct t_config_option *option)
}
/*
* Compares two options to sort by plugin / command.
* Compare two options to sort by plugin / command.
*/
int
@@ -425,9 +425,9 @@ doc_gen_option_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with commands.
* Generate files with commands.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -588,9 +588,9 @@ doc_gen_user_options (const char *path, const char *lang)
}
/*
* Generates files with default aliases.
* Generate files with default aliases.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -638,9 +638,9 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
}
/*
* Generates files with IRC colors.
* Generate files with IRC colors.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -684,7 +684,7 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
}
/*
* Compares two hooks "info" to sort by plugin / info.
* Compare two hooks "info" to sort by plugin / info.
*/
int
@@ -710,9 +710,9 @@ doc_gen_hook_info_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with infos.
* Generate files with infos.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -773,7 +773,7 @@ doc_gen_api_infos (const char *path, const char *lang)
}
/*
* Compares two hooks "info_hashtable" to sort by plugin / info.
* Compare two hooks "info_hashtable" to sort by plugin / info.
*/
int
@@ -799,9 +799,9 @@ doc_gen_hook_info_hashtable_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with infos_hashtable.
* Generate files with infos_hashtable.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -864,7 +864,7 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
}
/*
* Compares two hooks "infolist" to sort by plugin / infolist.
* Compare two hooks "infolist" to sort by plugin / infolist.
*/
int
@@ -890,9 +890,9 @@ doc_gen_hook_infolist_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with infolists.
* Generate files with infolists.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -955,7 +955,7 @@ doc_gen_api_infolists (const char *path, const char *lang)
}
/*
* Compares two hooks "hdata" to sort by plugin / hdata.
* Compare two hooks "hdata" to sort by plugin / hdata.
*/
int
@@ -981,7 +981,7 @@ doc_gen_hook_hdata_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Compares two hooks lists to sort by name (and lists beginning with "last_"
* Compare two hooks lists to sort by name (and lists beginning with "last_"
* at the end).
*/
@@ -1009,7 +1009,7 @@ doc_gen_hdata_list_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Compares two hooks hdata keys to sort by offset.
* Compare two hooks hdata keys to sort by offset.
*/
int
@@ -1030,7 +1030,7 @@ doc_gen_hdata_key_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates content of a hdata.
* Generate content of a hdata.
*/
void
@@ -1172,9 +1172,9 @@ doc_gen_api_hdata_content (FILE *file, struct t_hdata *hdata)
}
/*
* Generates files with hdata.
* Generate files with hdata.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1250,7 +1250,7 @@ doc_gen_api_hdata (const char *path, const char *lang)
}
/*
* Compares two hooks "completion" to sort by plugin / completion.
* Compare two hooks "completion" to sort by plugin / completion.
*/
int
@@ -1276,9 +1276,9 @@ doc_gen_hook_completion_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with completions.
* Generate files with completions.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1337,9 +1337,9 @@ doc_gen_api_completions (const char *path, const char *lang)
}
/*
* Generates files with URL options.
* Generate files with URL options.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1397,7 +1397,7 @@ doc_gen_api_url_options (const char *path, const char *lang)
}
/*
* Compares two plugins to sort by priority (descending).
* Compare two plugins to sort by priority (descending).
*/
int
@@ -1421,9 +1421,9 @@ doc_gen_plugin_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with plugins priority.
* Generate files with plugins priority.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1483,7 +1483,7 @@ doc_gen_api_plugins_priority (const char *path, const char *lang)
}
/*
* Compares two configurations to sort by priority (descending).
* Compare two configurations to sort by priority (descending).
*/
int
@@ -1507,9 +1507,9 @@ doc_gen_config_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Generates files with config priority.
* Generate files with config priority.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1569,9 +1569,9 @@ doc_gen_api_config_priority (const char *path, const char *lang)
}
/*
* Generates files with scripting API functions.
* Generate files with scripting API functions.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1602,9 +1602,9 @@ doc_gen_scripting_functions (const char *path, const char *lang)
}
/*
* Generates files with scripting API constants.
* Generate files with scripting API constants.
*
* Returns:
* Return:
* 1: OK, target file updated
* 0: OK, target file unchanged
* -1: error
@@ -1664,9 +1664,9 @@ doc_gen_scripting_constants (const char *path, const char *lang)
}
/*
* Generates WeeChat files used to build documentation.
* Generate WeeChat files used to build documentation.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
+43 -43
View File
@@ -96,7 +96,7 @@ char *eval_expression_condition (const char *expr,
/*
* Adds a debug message in the debug output.
* Add a debug message in the debug output.
*/
void
@@ -142,7 +142,7 @@ eval_debug_message (struct t_eval_context *eval_context, int debug_id,
/*
* Adds a debug message in the debug output, with variable arguments.
* Add a debug message in the debug output, with variable arguments.
*/
void
@@ -159,10 +159,10 @@ eval_debug_message_vargs (struct t_eval_context *eval_context, int debug_id,
}
/*
* Checks if a value is true: a value is true if string is non-NULL, non-empty
* Check if a value is true: a value is true if string is non-NULL, non-empty
* and different from "0".
*
* Returns:
* Return:
* 1: value is true
* 0: value is false
*/
@@ -174,7 +174,7 @@ eval_is_true (const char *value)
}
/*
* Searches a string in another at same level (skip sub-expressions between
* Search a string in another at same level (skip sub-expressions between
* prefix/suffix).
*
* If escape is 1, the prefix can be escaped with '\' (and then is ignored).
@@ -184,7 +184,7 @@ eval_is_true (const char *value)
* will return a pointer on "|| z" (because the first "||" is
* in a sub-expression, which is skipped).
*
* Returns pointer to string found, or NULL if not found.
* Return pointer to string found, or NULL if not found.
*/
const char *
@@ -267,7 +267,7 @@ end:
}
/*
* Evaluates a condition and returns boolean result:
* Evaluate a condition and return boolean result:
* "0" if false
* "1" if true
*
@@ -287,7 +287,7 @@ eval_string_eval_cond (const char *text, struct t_eval_context *eval_context)
}
/*
* Adds range of chars.
* Add range of chars.
*
* Note: result must be freed after use.
*/
@@ -350,7 +350,7 @@ end:
}
/*
* Hides chars in a string.
* Hide chars in a string.
*
* Note: result must be freed after use.
*/
@@ -391,7 +391,7 @@ eval_string_hide (const char *text)
}
/*
* Cuts string.
* Cut string.
*
* Note: result must be freed after use.
*/
@@ -444,7 +444,7 @@ eval_string_cut (const char *text, int screen)
}
/*
* Repeats string.
* Repeat string.
*
* Note: result must be freed after use.
*/
@@ -477,12 +477,12 @@ eval_string_repeat (const char *text)
}
/*
* Splits string.
* Split string.
*
* Format: number,separators,flags,string
*
* If number == "count", returns the number of items after split.
* If number == "random", returns a random item.
* If number == "count", return the number of items after split.
* If number == "random", return a random item.
* If number > 0, return this index (empty string if not enough items).
* If number < 0, return this index starting from the end (-1 = last item,
* -2 = penultimate item, etc.).
@@ -642,12 +642,12 @@ end:
}
/*
* Splits shell arguments.
* Split shell arguments.
*
* Format: number,string
*
* If number == "count", returns the number of arguments.
* If number == "random", returns a random argument.
* If number == "count", return the number of arguments.
* If number == "random", return a random argument.
* If number > 0, return this index (empty string if not enough arguments).
* If number < 0, return this index starting from the end (-1 = last argument,
* -2 = penultimate argument, etc.).
@@ -738,7 +738,7 @@ end:
}
/*
* Returns a regex group captured.
* Return a regex group captured.
*
* Note: result must be freed after use.
*/
@@ -790,7 +790,7 @@ eval_string_regex_group (const char *text, struct t_eval_context *eval_context)
}
/*
* Returns a string with color code.
* Return a string with color code.
*
* Note: result must be freed after use.
*/
@@ -809,7 +809,7 @@ eval_string_color (const char *text)
}
/*
* Returns a string modified by a modifier.
* Return a string modified by a modifier.
*
* Note: result must be freed after use.
*/
@@ -844,7 +844,7 @@ eval_string_modifier (const char *text)
}
/*
* Returns an info.
* Return an info.
*
* Note: result must be freed after use.
*/
@@ -878,7 +878,7 @@ eval_string_info (const char *text)
}
/*
* Encodes a string in base 16, 32, or 64.
* Encode a string in base 16, 32, or 64.
*
* Note: result must be freed after use.
*/
@@ -921,7 +921,7 @@ end:
}
/*
* Decodes a string encoded in base 16, 32, or 64.
* Decode a string encoded in base 16, 32, or 64.
*
* Note: result must be freed after use.
*/
@@ -962,7 +962,7 @@ end:
}
/*
* Returns a date.
* Return a date.
*
* Note: result must be freed after use.
*/
@@ -982,7 +982,7 @@ eval_string_date (const char *text)
}
/*
* Evaluates a condition and returns evaluated if/else clause.
* Evaluate a condition and return evaluated if/else clause.
*
* Note: result must be freed after use.
*/
@@ -1050,7 +1050,7 @@ eval_string_if (const char *text, struct t_eval_context *eval_context)
}
/*
* Returns a random integer number.
* Return a random integer number.
*
* Note: result must be freed after use.
*/
@@ -1103,7 +1103,7 @@ error:
}
/*
* Translates text.
* Translate text.
*
* Note: result must be freed after use.
*/
@@ -1122,7 +1122,7 @@ eval_string_translate (const char *text)
}
/*
* Defines a variable.
* Define a variable.
*/
void
@@ -1144,7 +1144,7 @@ eval_string_define (const char *text, struct t_eval_context *eval_context)
}
/*
* Returns count of items in a hdata, as a string.
* Return count of items in a hdata, as a string.
*
* Note: result must be freed after use.
*/
@@ -1218,7 +1218,7 @@ end:
}
/*
* Gets value of hdata using "path" to a variable.
* Get value of hdata using "path" to a variable.
*
* Note: result must be freed after use.
*/
@@ -1411,7 +1411,7 @@ end:
}
/*
* Returns a string using hdata.
* Return a string using hdata.
*
* Note: result must be freed after use.
*/
@@ -1519,7 +1519,7 @@ end:
}
/*
* Returns text with syntax highlighting (using markers, to be replaced by
* Return text with syntax highlighting (using markers, to be replaced by
* colors later).
*
* Note: result must be freed after use.
@@ -1546,7 +1546,7 @@ eval_syntax_highlight_add_markers (const char *prefix, const char *text,
}
/*
* Replaces raw highlight markers with color codes defined in option
* Replace raw highlight markers with color codes defined in option
* weechat.color.eval_syntax_colors.
*
* Note: result must be freed after use.
@@ -1603,7 +1603,7 @@ eval_syntax_highlight_colorize (const char *value)
}
/*
* Adds syntax highlighting in text.
* Add syntax highlighting in text.
*
* Note: result must be freed after use.
*/
@@ -1625,7 +1625,7 @@ eval_syntax_highlight (const char *text, struct t_eval_context *eval_context)
}
/*
* Replaces variables, which can be, by order of priority:
* Replace variables, which can be, by order of priority:
* - ${raw_hl:string}: the string itself without evaluation but with syntax highlighting
* - ${raw:string}: the string itself without evaluation
* - ${hl:string}: the string with syntax highlighting
@@ -2088,7 +2088,7 @@ end:
}
/*
* Replaces variables in a string.
* Replace variables in a string.
*
* Note: result must be freed after use.
*/
@@ -2131,15 +2131,15 @@ eval_replace_vars (const char *expr, struct t_eval_context *eval_context)
}
/*
* Compares two expressions.
* Compare two expressions.
*
* Returns:
* Return:
* "1": comparison is true
* "0": comparison is false
*
* Examples:
* "15 > 2": returns "1"
* "abc == def": returns "0"
* "15 > 2": return "1"
* "abc == def": return "0"
*
* Note: result must be freed after use.
*/
@@ -2275,7 +2275,7 @@ end:
}
/*
* Evaluates a condition (this function must not be called directly).
* Evaluate a condition (this function must not be called directly).
*
* For return value, see function eval_expression().
*
@@ -2498,7 +2498,7 @@ end:
}
/*
* Replaces text in a string using a regular expression and replacement text.
* Replace text in a string using a regular expression and replacement text.
*
* The argument "regex" is a pointer to a regex compiled with WeeChat function
* string_regcomp (or function regcomp).
@@ -2637,7 +2637,7 @@ end:
}
/*
* Evaluates an expression.
* Evaluate an expression.
*
* The hashtable "pointers" must have string for keys, pointer for values.
* The hashtable "extra_vars" must have string for keys and values.
+53 -53
View File
@@ -50,9 +50,9 @@ char *hashtable_type_string[HASHTABLE_NUM_TYPES] =
/*
* Searches for a hashtable type.
* Search for a hashtable type.
*
* Returns index of type in enum t_hashtable_type, -1 if type is not found.
* Return index of type in enum t_hashtable_type, -1 if type is not found.
*/
int
@@ -74,9 +74,9 @@ hashtable_get_type (const char *type)
}
/*
* Hashes a string using a variant of djb2 hash.
* Hash a string using a variant of djb2 hash.
*
* Returns the hash of the string.
* Return the hash of the string.
*/
unsigned long long
@@ -98,9 +98,9 @@ hashtable_hash_key_djb2 (const char *string)
}
/*
* Hashes a key (default callback).
* Hash a key (default callback).
*
* Returns the hash of the key, depending on the type.
* Return the hash of the key, depending on the type.
*/
unsigned long long
@@ -135,9 +135,9 @@ hashtable_hash_key_default_cb (struct t_hashtable *hashtable, const void *key)
}
/*
* Compares two keys (default callback).
* Compare two keys (default callback).
*
* Returns:
* Return:
* < 0: key1 < key2
* 0: key1 == key2
* > 0: key1 > key2
@@ -200,14 +200,14 @@ hashtable_keycmp_default_cb (struct t_hashtable *hashtable,
}
/*
* Creates a new hashtable.
* Create a new hashtable.
*
* The size is NOT a limit for number of items in hashtable. It is the size of
* internal array to store hashed keys: a high value uses more memory, but has
* better performance because this reduces the collisions of hashed keys and
* then reduces length of linked lists.
* then reduce length of linked lists.
*
* Returns pointer to new hashtable, NULL if error.
* Return pointer to new hashtable, NULL if error.
*/
struct t_hashtable *
@@ -266,7 +266,7 @@ hashtable_new (int size,
}
/*
* Allocates space for a key or value.
* Allocate space for a key or value.
*/
void
@@ -334,7 +334,7 @@ hashtable_alloc_type (enum t_hashtable_type type,
}
/*
* Frees space used by a key.
* Free space used by a key.
*/
void
@@ -366,7 +366,7 @@ hashtable_free_key (struct t_hashtable *hashtable,
}
/*
* Frees space used by a value.
* Free space used by a value.
*/
void
@@ -399,11 +399,11 @@ hashtable_free_value (struct t_hashtable *hashtable,
}
/*
* Sets value for a key in hashtable.
* Set value for a key in hashtable.
*
* The size arguments are used only for type "buffer".
*
* Returns pointer to item created/updated, NULL if error.
* Return pointer to item created/updated, NULL if error.
*/
struct t_hashtable_item *
@@ -490,12 +490,12 @@ hashtable_set_with_size (struct t_hashtable *hashtable,
}
/*
* Sets value for a key in hashtable.
* Set value for a key in hashtable.
*
* Note: this function can be called *only* if key AND value are *not* of type
* "buffer".
*
* Returns pointer to item created/updated, NULL if error.
* Return pointer to item created/updated, NULL if error.
*/
struct t_hashtable_item *
@@ -506,9 +506,9 @@ hashtable_set (struct t_hashtable *hashtable,
}
/*
* Searches for an item in hashtable.
* Search for an item in hashtable.
*
* If hash is non NULL, then it is set with hash value of key (even if key is
* If hash is non NULL, then set it with hash value of key (even if key is
* not found).
*/
@@ -541,9 +541,9 @@ hashtable_get_item (struct t_hashtable *hashtable, const void *key,
}
/*
* Gets value for a key in hashtable.
* Get value for a key in hashtable.
*
* Returns pointer to value for key, NULL if key is not found.
* Return pointer to value for key, NULL if key is not found.
*/
void *
@@ -557,9 +557,9 @@ hashtable_get (struct t_hashtable *hashtable, const void *key)
}
/*
* Checks if a key exists in the hashtable.
* Check if a key exists in the hashtable.
*
* Returns:
* Return:
* 1: key exists
* 0: key does not exist
*/
@@ -571,9 +571,9 @@ hashtable_has_key (struct t_hashtable *hashtable, const void *key)
}
/*
* Converts a value (from any type) to a string.
* Convert a value (from any type) to a string.
*
* Returns pointer to a static buffer (for type string, returns pointer to
* Return pointer to a static buffer (for type string, return pointer to
* string itself), which must be used immediately, it is overwritten by
* subsequent calls to this function.
*/
@@ -611,7 +611,7 @@ hashtable_to_string (enum t_hashtable_type type, const void *value)
}
/*
* Calls a function on all hashtable entries.
* Call a function on all hashtable entries.
*/
void
@@ -639,7 +639,7 @@ hashtable_map (struct t_hashtable *hashtable,
}
/*
* Calls a function on all hashtable entries (sends keys and values as strings).
* Call a function on all hashtable entries (sends keys and values as strings).
*/
void
@@ -680,7 +680,7 @@ hashtable_map_string (struct t_hashtable *hashtable,
}
/*
* Duplicates key/value in another hashtable (callback called for each variable
* Duplicate key/value in another hashtable (callback called for each variable
* in hashtable).
*/
@@ -700,9 +700,9 @@ hashtable_duplicate_map_cb (void *data,
}
/*
* Duplicates a hashtable.
* Duplicate a hashtable.
*
* Returns pointer to new hashtable, NULL if error.
* Return pointer to new hashtable, NULL if error.
*/
struct t_hashtable *
@@ -731,7 +731,7 @@ hashtable_dup (struct t_hashtable *hashtable)
}
/*
* Builds sorted list of keys (callback called for each variable in hashtable).
* Build sorted list of keys (callback called for each variable in hashtable).
*/
void
@@ -752,7 +752,7 @@ hashtable_get_list_keys_map_cb (void *data,
}
/*
* Gets list with sorted keys of hashtable.
* Get list with sorted keys of hashtable.
*
* Note: list must be freed after use.
*/
@@ -772,7 +772,7 @@ hashtable_get_list_keys (struct t_hashtable *hashtable)
}
/*
* Gets a hashtable property as integer.
* Get a hashtable property as integer.
*/
int
@@ -790,7 +790,7 @@ hashtable_get_integer (struct t_hashtable *hashtable, const char *property)
}
/*
* Computes length of all keys (callback called for each variable in hashtable).
* Compute length of all keys (callback called for each variable in hashtable).
*/
void
@@ -812,7 +812,7 @@ hashtable_compute_length_keys_cb (void *data,
}
/*
* Computes length of all values (callback called for each variable in
* Compute length of all values (callback called for each variable in
* hashtable).
*/
@@ -842,7 +842,7 @@ hashtable_compute_length_values_cb (void *data,
}
/*
* Computes length of all keys + values (callback called for each variable in
* Compute length of all keys + values (callback called for each variable in
* hashtable).
*/
@@ -856,7 +856,7 @@ hashtable_compute_length_keys_values_cb (void *data,
}
/*
* Builds a string with all keys (callback called for each variable in
* Build a string with all keys (callback called for each variable in
* hashtable).
*/
@@ -882,7 +882,7 @@ hashtable_build_string_keys_cb (void *data,
}
/*
* Builds a string with all values (callback called for each variable in
* Build a string with all values (callback called for each variable in
* hashtable).
*/
@@ -915,7 +915,7 @@ hashtable_build_string_values_cb (void *data,
}
/*
* Builds a string with all keys + values (callback called for each variable in
* Build a string with all keys + values (callback called for each variable in
* hashtable).
*/
@@ -951,9 +951,9 @@ hashtable_build_string_keys_values_cb (void *data,
}
/*
* Gets keys and/or values of hashtable as string.
* Get keys and/or values of hashtable as string.
*
* Returns a string with one of these formats:
* Return a string with one of these formats:
* if keys == 1 and values == 0: "key1,key2,key3"
* if keys == 0 and values == 1: "value1,value2,value3"
* if keys == 1 and values == 1: "key1:value1,key2:value2,key3:value3"
@@ -1028,7 +1028,7 @@ hashtable_get_keys_values (struct t_hashtable *hashtable,
}
/*
* Gets a hashtable property as string.
* Get a hashtable property as string.
*/
const char *
@@ -1056,7 +1056,7 @@ hashtable_get_string (struct t_hashtable *hashtable, const char *property)
}
/*
* Sets a hashtable property (pointer).
* Set a hashtable property (pointer).
*/
void
@@ -1073,9 +1073,9 @@ hashtable_set_pointer (struct t_hashtable *hashtable, const char *property,
}
/*
* Adds hashtable keys and values in an infolist.
* Add hashtable keys and values in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1148,9 +1148,9 @@ hashtable_add_to_infolist (struct t_hashtable *hashtable,
}
/*
* Adds hashtable keys and values from an infolist.
* Add hashtable keys and values from an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1238,7 +1238,7 @@ hashtable_add_from_infolist (struct t_hashtable *hashtable,
}
/*
* Removes an item from hashtable.
* Remove an item from hashtable.
*/
void
@@ -1277,7 +1277,7 @@ hashtable_remove_item (struct t_hashtable *hashtable,
}
/*
* Removes an item from hashtable (searches it with key).
* Remove an item from hashtable (searches it with key).
*/
void
@@ -1295,7 +1295,7 @@ hashtable_remove (struct t_hashtable *hashtable, const void *key)
}
/*
* Removes all items from hashtable.
* Remove all items from hashtable.
*/
void
@@ -1316,7 +1316,7 @@ hashtable_remove_all (struct t_hashtable *hashtable)
}
/*
* Frees a hashtable: removes all items and frees hashtable.
* Free a hashtable: removes all items and frees hashtable.
*/
void
@@ -1332,7 +1332,7 @@ hashtable_free (struct t_hashtable *hashtable)
}
/*
* Prints hashtable in WeeChat log file (usually for crash dump).
* Print hashtable in WeeChat log file (usually for crash dump).
*/
void
+55 -55
View File
@@ -46,7 +46,7 @@ char *hdata_type_string[WEECHAT_NUM_HDATA_TYPES] =
/*
* Frees a hdata variable.
* Free a hdata variable.
*/
void
@@ -68,7 +68,7 @@ hdata_free_var_cb (struct t_hashtable *hashtable, const void *key, void *value)
}
/*
* Frees a hdata list.
* Free a hdata list.
*/
void
@@ -82,9 +82,9 @@ hdata_free_list_cb (struct t_hashtable *hashtable, const void *key, void *value)
}
/*
* Creates a new hdata.
* Create a new hdata.
*
* Returns pointer to new hdata, NULL if error.
* Return pointer to new hdata, NULL if error.
*/
struct t_hdata *
@@ -133,7 +133,7 @@ hdata_new (struct t_weechat_plugin *plugin, const char *hdata_name,
}
/*
* Adds a new variable in a hdata.
* Add a new variable in a hdata.
*/
void
@@ -172,7 +172,7 @@ hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type,
}
/*
* Adds a new list pointer in a hdata.
* Add a new list pointer in a hdata.
*/
void
@@ -194,7 +194,7 @@ hdata_new_list (struct t_hdata *hdata, const char *name, void *pointer,
}
/*
* Gets offset of variable in hdata.
* Get offset of variable in hdata.
*/
int
@@ -213,7 +213,7 @@ hdata_get_var_offset (struct t_hdata *hdata, const char *name)
}
/*
* Gets type of variable in hdata (as integer).
* Get type of variable in hdata (as integer).
*/
int
@@ -232,7 +232,7 @@ hdata_get_var_type (struct t_hdata *hdata, const char *name)
}
/*
* Gets type of variable in hdata (as string).
* Get type of variable in hdata (as string).
*/
const char *
@@ -251,9 +251,9 @@ hdata_get_var_type_string (struct t_hdata *hdata, const char *name)
}
/*
* Gets size of array for a variable (if variable is an array).
* Get size of array for a variable (if variable is an array).
*
* Returns size of array, -1 if variable is not an array (or if error).
* Return size of array, -1 if variable is not an array (or if error).
*/
int
@@ -351,7 +351,7 @@ hdata_get_var_array_size (struct t_hdata *hdata, void *pointer,
}
/*
* Gets size of array for variable as string.
* Get size of array for variable as string.
*/
const char *
@@ -374,9 +374,9 @@ hdata_get_var_array_size_string (struct t_hdata *hdata, void *pointer,
}
/*
* Gets hdata name for a variable.
* Get hdata name for a variable.
*
* Returns hdata name, NULL if variable has no hdata.
* Return hdata name, NULL if variable has no hdata.
*/
const char *
@@ -395,7 +395,7 @@ hdata_get_var_hdata (struct t_hdata *hdata, const char *name)
}
/*
* Gets pointer to content of variable using hdata variable name.
* Get pointer to content of variable using hdata variable name.
*/
void *
@@ -414,7 +414,7 @@ hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets pointer to content of variable using hdata variable offset.
* Get pointer to content of variable using hdata variable offset.
*/
void *
@@ -427,7 +427,7 @@ hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer, int offset)
}
/*
* Gets a list pointer in hdata.
* Get a list pointer in hdata.
*/
void *
@@ -446,9 +446,9 @@ hdata_get_list (struct t_hdata *hdata, const char *name)
}
/*
* Checks if a pointer is in the list.
* Check if a pointer is in the list.
*
* Returns:
* Return:
* 1: pointer exists in list
* 0: pointer does not exist
*/
@@ -476,7 +476,7 @@ hdata_check_pointer_in_list (struct t_hdata *hdata, void *list, void *pointer)
}
/*
* Checks if a pointer is in a list with flag "check_pointers".
* Check if a pointer is in a list with flag "check_pointers".
*/
void
@@ -513,14 +513,14 @@ hdata_check_pointer_map_cb (void *data, struct t_hashtable *hashtable,
}
/*
* Checks if a pointer is valid for a given hdata/list.
* Check if a pointer is valid for a given hdata/list.
*
* If argument "list" is NULL, the check is made with all lists in hdata
* that have flag "check_pointers". If no list is defined with this flag,
* the pointer is considered valid (so this function returns 1); if the
* pointer is not found in any list, this function returns 0.
* the pointer is considered valid (so this function return 1); if the
* pointer is not found in any list, this function return 0.
*
* Returns:
* Return:
* 1: pointer exists in the given list (or a list with check_pointers flag)
* 0: pointer does not exist
*/
@@ -553,7 +553,7 @@ hdata_check_pointer (struct t_hdata *hdata, void *list, void *pointer)
}
/*
* Moves pointer to another element in list.
* Move pointer to another element in list.
*/
void *
@@ -579,9 +579,9 @@ hdata_move (struct t_hdata *hdata, void *pointer, int count)
}
/*
* Searches for an element in list using expression.
* Search for an element in list using expression.
*
* Returns pointer to element found, NULL if not found.
* Return pointer to element found, NULL if not found.
*/
void *
@@ -659,7 +659,7 @@ end:
}
/*
* Returns number of item in this hdata, starting at "pointer".
* Return number of item in this hdata, starting at "pointer".
*/
int
@@ -680,7 +680,7 @@ hdata_count (struct t_hdata *hdata, void *pointer)
}
/*
* Extracts index from name of a variable.
* Extract index from name of a variable.
*
* A name can contain index with this format: "NNN|name" (where NNN is an
* integer >= 0).
@@ -723,7 +723,7 @@ hdata_get_index_and_name (const char *name, int *index, const char **ptr_name)
}
/*
* Gets char value of a variable in hdata.
* Get char value of a variable in hdata.
*/
char
@@ -757,7 +757,7 @@ hdata_char (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets integer value of a variable in hdata.
* Get integer value of a variable in hdata.
*/
int
@@ -791,7 +791,7 @@ hdata_integer (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets long value of a variable in hdata.
* Get long value of a variable in hdata.
*/
long
@@ -825,7 +825,7 @@ hdata_long (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets "long long" value of a variable in hdata.
* Get "long long" value of a variable in hdata.
*/
long long
@@ -859,7 +859,7 @@ hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets string value of a variable in hdata.
* Get string value of a variable in hdata.
*/
const char *
@@ -896,7 +896,7 @@ hdata_string (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets pointer value of a variable in hdata.
* Get pointer value of a variable in hdata.
*/
void *
@@ -930,7 +930,7 @@ hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets time value of a variable in hdata.
* Get time value of a variable in hdata.
*/
time_t
@@ -964,7 +964,7 @@ hdata_time (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Gets hashtable value of a variable in hdata.
* Get hashtable value of a variable in hdata.
*/
struct t_hashtable *
@@ -998,11 +998,11 @@ hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name)
}
/*
* Compares a hdata variable of two objects.
* Compare a hdata variable of two objects.
*
* If case_sensitive == 1, the comparison of strings is case-sensitive.
*
* Returns:
* Return:
* -1: variable1 < variable2
* 0: variable1 == variable2
* 1: variable1 > variable2
@@ -1230,13 +1230,13 @@ end:
}
/*
* Sets value for a variable in hdata.
* Set value for a variable in hdata.
*
* WARNING: this is dangerous, and only some variables can be set by this
* function (this depends on hdata, see API doc for more info) and this
* function can be called *ONLY* in an "update" callback (in hdata).
*
* Returns:
* Return:
* 1: OK (value set)
* 0: error (or not allowed)
*/
@@ -1338,7 +1338,7 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name,
}
/*
* Updates some data in hdata.
* Update some data in hdata.
*
* The hashtable contains keys with new values.
* A special key "__delete" can be used to delete the whole structure at
@@ -1347,8 +1347,8 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name,
* WARNING: this is dangerous, and only some data can be updated by this
* function (this depends on hdata, see API doc for more info).
*
* Returns number of variables updated, 0 if nothing has been updated.
* In case of deletion, returns 1 if OK, 0 if error.
* Return number of variables updated, 0 if nothing has been updated.
* In case of deletion, return 1 if OK, 0 if error.
*/
int
@@ -1390,7 +1390,7 @@ hdata_update (struct t_hdata *hdata, void *pointer,
}
/*
* Gets a hdata property as string.
* Get a hdata property as string.
*/
const char *
@@ -1420,7 +1420,7 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
}
/*
* Frees a hdata.
* Free a hdata.
*/
void
@@ -1439,7 +1439,7 @@ hdata_free (struct t_hdata *hdata)
}
/*
* Frees hdata for a plugin (callback called for each hdata in memory).
* Free hdata for a plugin (callback called for each hdata in memory).
*/
void
@@ -1455,7 +1455,7 @@ hdata_free_all_plugin_map_cb (void *data, struct t_hashtable *hashtable,
}
/*
* Frees all hdata created by a plugin.
* Free all hdata created by a plugin.
*/
void
@@ -1465,7 +1465,7 @@ hdata_free_all_plugin (struct t_weechat_plugin *plugin)
}
/*
* Frees all hdata.
* Free all hdata.
*/
void
@@ -1475,7 +1475,7 @@ hdata_free_all (void)
}
/*
* Prints variable of a hdata in WeeChat log file (callback called for each
* Print variable of a hdata in WeeChat log file (callback called for each
* variable in hdata).
*/
@@ -1501,7 +1501,7 @@ hdata_print_log_var_map_cb (void *data, struct t_hashtable *hashtable,
}
/*
* Prints hdata in WeeChat log file (callback called for each hdata in memory).
* Print hdata in WeeChat log file (callback called for each hdata in memory).
*/
void
@@ -1538,7 +1538,7 @@ hdata_print_log_map_cb (void *data, struct t_hashtable *hashtable,
}
/*
* Prints hdata in WeeChat log file (usually for crash dump).
* Print hdata in WeeChat log file (usually for crash dump).
*/
void
@@ -1548,7 +1548,7 @@ hdata_print_log (void)
}
/*
* Frees a hdata in hashtable "weechat_hdata".
* Free a hdata in hashtable "weechat_hdata".
*/
void
@@ -1563,7 +1563,7 @@ hdata_free_hdata_cb (struct t_hashtable *hashtable,
}
/*
* Initializes hdata: creates a hashtable with hdata.
* Initialize hdata: creates a hashtable with hdata.
*/
void
@@ -1578,7 +1578,7 @@ hdata_init (void)
}
/*
* Frees all hdata and hashtable with hdata.
* Free all hdata and hashtable with hdata.
*/
void
+27 -27
View File
@@ -158,7 +158,7 @@ t_callback_hook *hook_callback_print_log[HOOK_NUM_TYPES] =
/*
* Initializes hooks.
* Initialize hooks.
*/
void
@@ -214,9 +214,9 @@ hook_init (void)
}
/*
* Searches for a hook type.
* Search for a hook type.
*
* Returns index of type in enum t_hook_type, -1 if type is not found.
* Return index of type in enum t_hook_type, -1 if type is not found.
*/
int
@@ -238,7 +238,7 @@ hook_search_type (const char *type)
}
/*
* Searches for position of hook in list (to keep hooks sorted).
* Search for position of hook in list (to keep hooks sorted).
*
* Hooks are sorted by priority, except commands which are sorted by command
* name, and then priority.
@@ -283,7 +283,7 @@ hook_find_pos (struct t_hook *hook)
}
/*
* Adds a hook to list.
* Add a hook to list.
*/
void
@@ -330,7 +330,7 @@ hook_add_to_list (struct t_hook *new_hook)
}
/*
* Removes a hook from list.
* Remove a hook from list.
*/
void
@@ -366,7 +366,7 @@ hook_remove_from_list (struct t_hook *hook)
}
/*
* Removes hooks marked as "deleted" from list.
* Remove hooks marked as "deleted" from list.
*/
void
@@ -395,7 +395,7 @@ hook_remove_deleted (void)
}
/*
* Initializes a new hook with default values.
* Initialize a new hook with default values.
*/
void
@@ -426,9 +426,9 @@ hook_init_data (struct t_hook *hook, struct t_weechat_plugin *plugin,
}
/*
* Checks if a hook pointer is valid.
* Check if a hook pointer is valid.
*
* Returns:
* Return:
* 1: hook exists
* 0: hook does not exist
*/
@@ -457,7 +457,7 @@ hook_valid (struct t_hook *hook)
}
/*
* Starts a hook exec.
* Start a hook exec.
*/
void
@@ -467,7 +467,7 @@ hook_exec_start (void)
}
/*
* Ends a hook_exec.
* End a hook_exec.
*/
void
@@ -481,7 +481,7 @@ hook_exec_end (void)
}
/*
* Starts execution of a hook callback.
* Start execution of a hook callback.
*/
void
@@ -504,7 +504,7 @@ hook_callback_start (struct t_hook *hook, struct t_hook_exec_cb *hook_exec_cb)
}
/*
* Ends execution of a hook callback.
* End execution of a hook callback.
*/
void
@@ -541,7 +541,7 @@ hook_callback_end (struct t_hook *hook, struct t_hook_exec_cb *hook_exec_cb)
}
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -553,7 +553,7 @@ hook_get_description (struct t_hook *hook)
}
/*
* Sets a hook property (string).
* Set a hook property (string).
*/
void
@@ -691,7 +691,7 @@ hook_schedule_clean_process (pid_t pid)
}
/*
* Unhooks something.
* Unhook something.
*/
void
@@ -743,7 +743,7 @@ unhook (struct t_hook *hook)
}
/*
* Unhooks everything for a plugin/subplugin.
* Unhook everything for a plugin/subplugin.
*/
void
@@ -773,7 +773,7 @@ unhook_all_plugin (struct t_weechat_plugin *plugin, const char *subplugin)
}
/*
* Unhooks everything.
* Unhook everything.
*/
void
@@ -795,7 +795,7 @@ unhook_all (void)
}
/*
* Returns hdata for hook.
* Return hdata for hook.
*/
struct t_hdata *
@@ -839,9 +839,9 @@ hook_hdata_hook_cb (const void *pointer, void *data, const char *hdata_name)
}
/*
* Adds a hook in an infolist.
* Add a hook in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -890,9 +890,9 @@ hook_add_to_infolist_pointer (struct t_infolist *infolist, struct t_hook *hook)
}
/*
* Adds hooks of a type in an infolist.
* Add hooks of a type in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -930,11 +930,11 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type,
}
/*
* Adds hooks in an infolist.
* Add hooks in an infolist.
*
* Argument "arguments" can be a hook type with optional comma + name after.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -982,7 +982,7 @@ hook_add_to_infolist (struct t_infolist *infolist, struct t_hook *pointer,
}
/*
* Prints hooks in WeeChat log file (usually for crash dump).
* Print hooks in WeeChat log file (usually for crash dump).
*/
void
+33 -33
View File
@@ -43,9 +43,9 @@ char *infolist_type_char_string[INFOLIST_NUM_TYPES] = {
/*
* Creates a new infolist.
* Create a new infolist.
*
* Returns pointer to infolist, NULL if error.
* Return pointer to infolist, NULL if error.
*/
struct t_infolist *
@@ -74,9 +74,9 @@ infolist_new (struct t_weechat_plugin *plugin)
}
/*
* Checks if an infolist pointer is valid.
* Check if an infolist pointer is valid.
*
* Returns:
* Return:
* 1: infolist exists
* 0: infolist is not found
*/
@@ -101,9 +101,9 @@ infolist_valid (struct t_infolist *infolist)
}
/*
* Creates a new item in an infolist.
* Create a new item in an infolist.
*
* Returns pointer to new item, NULL if error.
* Return pointer to new item, NULL if error.
*/
struct t_infolist_item *
@@ -131,9 +131,9 @@ infolist_new_item (struct t_infolist *infolist)
}
/*
* Creates a new integer variable in an item.
* Create a new integer variable in an item.
*
* Returns pointer to new variable, NULL if error.
* Return pointer to new variable, NULL if error.
*/
struct t_infolist_var *
@@ -168,9 +168,9 @@ infolist_new_var_integer (struct t_infolist_item *item,
}
/*
* Creates a new string variable in an item.
* Create a new string variable in an item.
*
* Returns pointer to new variable, NULL if error.
* Return pointer to new variable, NULL if error.
*/
struct t_infolist_var *
@@ -203,9 +203,9 @@ infolist_new_var_string (struct t_infolist_item *item,
}
/*
* Creates a new pointer variable in an item.
* Create a new pointer variable in an item.
*
* Returns pointer to new variable, NULL if error.
* Return pointer to new variable, NULL if error.
*/
struct t_infolist_var *
@@ -238,9 +238,9 @@ infolist_new_var_pointer (struct t_infolist_item *item,
}
/*
* Creates a new buffer variable in an item.
* Create a new buffer variable in an item.
*
* Returns pointer to new variable, NULL if error.
* Return pointer to new variable, NULL if error.
*/
struct t_infolist_var *
@@ -285,9 +285,9 @@ infolist_new_var_buffer (struct t_infolist_item *item,
}
/*
* Creates a new time variable in an item.
* Create a new time variable in an item.
*
* Returns pointer to new variable, NULL if error.
* Return pointer to new variable, NULL if error.
*/
struct t_infolist_var *
@@ -322,9 +322,9 @@ infolist_new_var_time (struct t_infolist_item *item,
}
/*
* Gets next item for an infolist.
* Get next item for an infolist.
*
* If pointer is NULL, returns first item of infolist.
* If pointer is NULL, return first item of infolist.
*/
struct t_infolist_item *
@@ -343,9 +343,9 @@ infolist_next (struct t_infolist *infolist)
}
/*
* Gets previous item for an infolist.
* Get previous item for an infolist.
*
* If pointer is NULL, returns last item of infolist.
* If pointer is NULL, return last item of infolist.
*/
struct t_infolist_item *
@@ -364,7 +364,7 @@ infolist_prev (struct t_infolist *infolist)
}
/*
* Resets pointer to current item in infolist.
* Reset pointer to current item in infolist.
*/
void
@@ -377,7 +377,7 @@ infolist_reset_item_cursor (struct t_infolist *infolist)
}
/*
* Searches for a variable in current infolist item.
* Search for a variable in current infolist item.
*/
struct t_infolist_var *
@@ -400,7 +400,7 @@ infolist_search_var (struct t_infolist *infolist, const char *name)
}
/*
* Gets list of fields for current infolist item.
* Get list of fields for current infolist item.
*/
const char *
@@ -434,7 +434,7 @@ infolist_fields (struct t_infolist *infolist)
}
/*
* Gets integer value for a variable in current infolist item.
* Get integer value for a variable in current infolist item.
*/
int
@@ -462,7 +462,7 @@ infolist_integer (struct t_infolist *infolist, const char *var)
}
/*
* Gets string value for a variable in current infolist item.
* Get string value for a variable in current infolist item.
*/
const char *
@@ -490,7 +490,7 @@ infolist_string (struct t_infolist *infolist, const char *var)
}
/*
* Gets pointer value for a variable in current infolist item.
* Get pointer value for a variable in current infolist item.
*/
void *
@@ -518,7 +518,7 @@ infolist_pointer (struct t_infolist *infolist, const char *var)
}
/*
* Gets buffer value for a variable in current infolist item.
* Get buffer value for a variable in current infolist item.
*
* Argument "size" is set with the size of buffer.
*/
@@ -552,7 +552,7 @@ infolist_buffer (struct t_infolist *infolist, const char *var,
}
/*
* Gets time value for a variable in current infolist item.
* Get time value for a variable in current infolist item.
*/
time_t
@@ -580,7 +580,7 @@ infolist_time (struct t_infolist *infolist, const char *var)
}
/*
* Frees a variable in item.
* Free a variable in item.
*/
void
@@ -623,7 +623,7 @@ infolist_var_free (struct t_infolist_item *item,
}
/*
* Frees an item in infolist.
* Free an item in infolist.
*/
void
@@ -662,7 +662,7 @@ infolist_item_free (struct t_infolist *infolist,
}
/*
* Frees an infolist.
* Free an infolist.
*/
void
@@ -699,7 +699,7 @@ infolist_free (struct t_infolist *infolist)
}
/*
* Frees all infolists created by a plugin.
* Free all infolists created by a plugin.
*/
void
@@ -718,7 +718,7 @@ infolist_free_all_plugin (struct t_weechat_plugin *plugin)
}
/*
* Prints infolists in WeeChat log file (usually for crash dump).
* Print infolists in WeeChat log file (usually for crash dump).
*/
void
+8 -8
View File
@@ -45,9 +45,9 @@ char **input_commands_allowed = NULL;
/*
* Sends data to buffer input callback.
* Send data to buffer input callback.
*
* Returns the return code of buffer callback, or WEECHAT_RC_ERROR if the
* Return the return code of buffer callback, or WEECHAT_RC_ERROR if the
* buffer has no input callback.
*/
@@ -72,9 +72,9 @@ input_exec_data (struct t_gui_buffer *buffer, const char *data)
}
/*
* Executes a command.
* Execute a command.
*
* Returns:
* Return:
* WEECHAT_RC_OK: command executed
* WEECHAT_RC_ERROR: error, command not executed
*/
@@ -228,12 +228,12 @@ end:
}
/*
* Sends data to a buffer's callback.
* Send data to a buffer's callback.
*
* If split_newline = 1 and if buffer input_multiline = 0, the string
* is split on "\n" and multiple commands can then be executed.
*
* Returns:
* Return:
* WEECHAT_RC_OK: data properly sent (or command executed successfully)
* WEECHAT_RC_ERROR: error
*/
@@ -399,12 +399,12 @@ input_data_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Sends data to a buffer's callback with an optional delay (in milliseconds).
* Send data to a buffer's callback with an optional delay (in milliseconds).
*
* If delay < 1, the command is executed immediately.
* If delay >= 1, the command is scheduled for execution in this number of ms.
*
* Returns:
* Return:
* WEECHAT_RC_OK: data properly sent or scheduled for execution
* WEECHAT_RC_ERROR: error
*/
+27 -27
View File
@@ -36,9 +36,9 @@
/*
* Creates a new list.
* Create a new list.
*
* Returns pointer to new list, NULL if error.
* Return pointer to new list, NULL if error.
*/
struct t_weelist *
@@ -57,7 +57,7 @@ weelist_new (void)
}
/*
* Searches for position of data (to keep list sorted).
* Search for position of data (to keep list sorted).
*/
struct t_weelist_item *
@@ -79,7 +79,7 @@ weelist_find_pos (struct t_weelist *weelist, const char *data)
}
/*
* Inserts an element in the list (keeping list sorted).
* Insert an element in the list (keeping list sorted).
*/
void
@@ -140,9 +140,9 @@ weelist_insert (struct t_weelist *weelist, struct t_weelist_item *item,
}
/*
* Creates new data and add it to the list.
* Create new data and add it to the list.
*
* Returns pointer to new item, NULL if error.
* Return pointer to new item, NULL if error.
*/
struct t_weelist_item *
@@ -166,9 +166,9 @@ weelist_add (struct t_weelist *weelist, const char *data, const char *where,
}
/*
* Searches for data in a list (case-sensitive).
* Search for data in a list (case-sensitive).
*
* Returns pointer to item found, NULL if not found.
* Return pointer to item found, NULL if not found.
*/
struct t_weelist_item *
@@ -190,9 +190,9 @@ weelist_search (struct t_weelist *weelist, const char *data)
}
/*
* Searches for data in a list (case-sensitive).
* Search for data in a list (case-sensitive).
*
* Returns position of item found (>= 0), -1 if not found.
* Return position of item found (>= 0), -1 if not found.
*/
int
@@ -217,9 +217,9 @@ weelist_search_pos (struct t_weelist *weelist, const char *data)
}
/*
* Searches for data in a list (case-insensitive).
* Search for data in a list (case-insensitive).
*
* Returns pointer to item found, NULL if not found.
* Return pointer to item found, NULL if not found.
*/
struct t_weelist_item *
@@ -241,9 +241,9 @@ weelist_casesearch (struct t_weelist *weelist, const char *data)
}
/*
* Searches for data in a list (case-insensitive).
* Search for data in a list (case-insensitive).
*
* Returns position of item found (>= 0), -1 if not found.
* Return position of item found (>= 0), -1 if not found.
*/
int
@@ -268,7 +268,7 @@ weelist_casesearch_pos (struct t_weelist *weelist, const char *data)
}
/*
* Gets an item in a list by position (0 is first element).
* Get an item in a list by position (0 is first element).
*/
struct t_weelist_item *
@@ -294,7 +294,7 @@ weelist_get (struct t_weelist *weelist, int position)
}
/*
* Sets a new value for an item.
* Set a new value for an item.
*/
void
@@ -308,9 +308,9 @@ weelist_set (struct t_weelist_item *item, const char *value)
}
/*
* Gets next item.
* Get next item.
*
* Returns NULL if end of list has been reached.
* Return NULL if end of list has been reached.
*/
struct t_weelist_item *
@@ -323,9 +323,9 @@ weelist_next (struct t_weelist_item *item)
}
/*
* Gets previous item.
* Get previous item.
*
* Returns NULL if beginning of list has been reached.
* Return NULL if beginning of list has been reached.
*/
struct t_weelist_item *
@@ -338,7 +338,7 @@ weelist_prev (struct t_weelist_item *item)
}
/*
* Gets string pointer to item data.
* Get string pointer to item data.
*/
const char *
@@ -351,7 +351,7 @@ weelist_string (struct t_weelist_item *item)
}
/*
* Gets user data pointer to item data.
* Get user data pointer to item data.
*/
void *
@@ -364,7 +364,7 @@ weelist_user_data (struct t_weelist_item *item)
}
/*
* Gets size of list.
* Get size of list.
*/
int
@@ -377,7 +377,7 @@ weelist_size (struct t_weelist *weelist)
}
/*
* Removes an item from a list.
* Remove an item from a list.
*/
void
@@ -411,7 +411,7 @@ weelist_remove (struct t_weelist *weelist, struct t_weelist_item *item)
}
/*
* Removes all items from a list.
* Remove all items from a list.
*/
void
@@ -427,7 +427,7 @@ weelist_remove_all (struct t_weelist *weelist)
}
/*
* Frees a list.
* Free a list.
*/
void
@@ -441,7 +441,7 @@ weelist_free (struct t_weelist *weelist)
}
/*
* Prints list in WeeChat log file (usually for crash dump).
* Print list in WeeChat log file (usually for crash dump).
*/
void
+7 -7
View File
@@ -54,9 +54,9 @@ int weechat_log_use_time = 1; /* 0 to temporary disable time in log, */
/*
* Opens the WeeChat log file.
* Open the WeeChat log file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -116,7 +116,7 @@ log_open (const char *filename, const char *mode)
}
/*
* Initializes the WeeChat log file.
* Initialize the WeeChat log file.
*/
void
@@ -140,7 +140,7 @@ log_init (void)
}
/*
* Writes a message in WeeChat log file.
* Write a message in WeeChat log file.
*/
void
@@ -193,7 +193,7 @@ log_printf (const char *message, ...)
}
/*
* Dumps a string as hexa data in WeeChat log file.
* Dump a string as hexa data in WeeChat log file.
*/
void
@@ -227,7 +227,7 @@ log_printf_hexa (const char *spaces, const char *string)
}
/*
* Closes the WeeChat log file.
* Close the WeeChat log file.
*/
void
@@ -252,7 +252,7 @@ log_close (void)
}
/*
* Renames the WeeChat log file (when crashing).
* Rename the WeeChat log file (when crashing).
*
* The file "weechat.log" is renamed to "weechat_crash_YYYYMMDD_NNNN.log",
* where YYYYMMDD is the current date and NNNN the PID of WeeChat process.
+32 -32
View File
@@ -72,7 +72,7 @@ gnutls_certificate_credentials_t gnutls_xcred; /* GnuTLS client credentials */
/*
* Initializes gcrypt.
* Initialize gcrypt.
*/
void
@@ -87,7 +87,7 @@ network_init_gcrypt (void)
}
/*
* Allocates credentials structure.
* Allocate credentials structure.
*/
void
@@ -101,9 +101,9 @@ network_allocate_credentials (void)
}
/*
* Loads system's default trusted certificate authorities.
* Load system's default trusted certificate authorities.
*
* Returns the number of certificates loaded.
* Return the number of certificates loaded.
*/
int
@@ -143,7 +143,7 @@ network_load_system_ca_file (int force_display)
}
/*
* Loads user's trusted certificate authorities.
* Load user's trusted certificate authorities.
*/
int
@@ -229,7 +229,7 @@ end:
}
/*
* Loads system's default and user's trusted certificate authorities.
* Load system's default and user's trusted certificate authorities.
*/
void
@@ -247,7 +247,7 @@ network_load_ca_files (int force_display)
}
/*
* Reloads system's default and user's trusted certificate authorities.
* Reload system's default and user's trusted certificate authorities.
*/
void
@@ -271,7 +271,7 @@ network_reload_ca_files (int force_display)
}
/*
* Initializes GnuTLS.
* Initialize GnuTLS.
*/
void
@@ -288,7 +288,7 @@ network_init_gnutls (void)
}
/*
* Ends network.
* End network.
*/
void
@@ -306,9 +306,9 @@ network_end (void)
}
/*
* Checks if a string contains a valid IP address (IPv4 or IPv6).
* Check if a string contains a valid IP address (IPv4 or IPv6).
*
* Returns:
* Return:
* 1: string is a valid IPv4 or IPv6
* 0: string is not a valid IP address
*/
@@ -335,12 +335,12 @@ network_is_ip_address (const char *address)
}
/*
* Sends data on a socket with retry.
* Send data on a socket with retry.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns number of bytes sent, -1 if error.
* Return number of bytes sent, -1 if error.
*/
int
@@ -367,12 +367,12 @@ network_send_with_retry (int sock, const void *buffer, int length, int flags)
}
/*
* Receives data on a socket with retry.
* Receive data on a socket with retry.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns number of bytes received, -1 if error.
* Return number of bytes received, -1 if error.
*/
int
@@ -399,12 +399,12 @@ network_recv_with_retry (int sock, void *buffer, int length, int flags)
}
/*
* Establishes a connection and authenticates with a HTTP proxy.
* Establish a connection and authenticates with a HTTP proxy.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -463,9 +463,9 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address,
}
/*
* Resolves a hostname to its IP address (works with IPv4 and IPv6).
* Resolve a hostname to its IP address (works with IPv4 and IPv6).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -510,14 +510,14 @@ network_resolve (const char *hostname, char *ip, int *version)
}
/*
* Establishes a connection and authenticates with a socks4 proxy.
* Establish a connection and authenticates with a socks4 proxy.
*
* The socks4 protocol is explained here: https://en.wikipedia.org/wiki/SOCKS
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -563,7 +563,7 @@ network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address,
}
/*
* Establishes a connection and authenticates with a socks5 proxy.
* Establish a connection and authenticates with a socks5 proxy.
*
* The socks5 protocol is explained in RFC 1928.
* The socks5 authentication with username/pass is explained in RFC 1929.
@@ -571,7 +571,7 @@ network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address,
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -734,12 +734,12 @@ network_pass_socks5proxy (struct t_proxy *proxy, int sock, const char *address,
}
/*
* Establishes a connection and authenticates with a proxy.
* Establish a connection and authenticates with a proxy.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -772,12 +772,12 @@ network_pass_proxy (const char *proxy, int sock, const char *address, int port)
}
/*
* Connects to a remote host and wait for connection if socket is non blocking.
* Connect to a remote host and wait for connection if socket is non blocking.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -822,12 +822,12 @@ network_connect (int sock, const struct sockaddr *addr, socklen_t addrlen)
}
/*
* Connects to a remote host.
* Connect to a remote host.
*
* WARNING: this function is blocking, it must be called only in a forked
* process.
*
* Returns:
* Return:
* >= 0: connected socket fd
* -1: error
*/
@@ -913,7 +913,7 @@ error:
}
/*
* Connects to peer in a child process.
* Connect to peer in a child process.
*/
void
@@ -1563,7 +1563,7 @@ network_connect_gnutls_handshake_timer_cb (const void *pointer,
}
/*
* Reads connection progress from child process.
* Read connection progress from child process.
*/
int
@@ -1784,7 +1784,7 @@ network_connect_child_read_cb (const void *pointer, void *data, int fd)
}
/*
* Connects with fork (called by hook_connect() only!).
* Connect with fork (called by hook_connect() only!).
*/
void
+27 -27
View File
@@ -56,9 +56,9 @@ struct t_proxy *last_weechat_temp_proxy = NULL; /* reading configuration */
/*
* Searches for a proxy option.
* Search for a proxy option.
*
* Returns index of option in enum t_proxy_option, -1 if option is not found.
* Return index of option in enum t_proxy_option, -1 if option is not found.
*/
int
@@ -80,9 +80,9 @@ proxy_search_option (const char *option_name)
}
/*
* Searches for a proxy type.
* Search for a proxy type.
*
* Returns index of option in enum t_proxy_type, -1 if type is not found.
* Return index of option in enum t_proxy_type, -1 if type is not found.
*/
int
@@ -104,9 +104,9 @@ proxy_search_type (const char *type)
}
/*
* Checks if a proxy pointer is valid.
* Check if a proxy pointer is valid.
*
* Returns:
* Return:
* 1: proxy exists
* 0: proxy does not exist
*/
@@ -131,9 +131,9 @@ proxy_valid (struct t_proxy *proxy)
}
/*
* Searches for a proxy by name.
* Search for a proxy by name.
*
* Returns pointer to proxy found, NULL if not found.
* Return pointer to proxy found, NULL if not found.
*/
struct t_proxy *
@@ -156,7 +156,7 @@ proxy_search (const char *name)
}
/*
* Sets name for a proxy.
* Set name for a proxy.
*/
void
@@ -193,9 +193,9 @@ proxy_set_name (struct t_proxy *proxy, const char *name)
}
/*
* Sets a property for a proxy.
* Set a property for a proxy.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -246,9 +246,9 @@ proxy_set (struct t_proxy *proxy, const char *property, const char *value)
}
/*
* Creates an option for a proxy.
* Create an option for a proxy.
*
* Returns pointer to new option, NULL if error.
* Return pointer to new option, NULL if error.
*/
struct t_config_option *
@@ -330,7 +330,7 @@ proxy_create_option (const char *proxy_name, int index_option,
}
/*
* Creates an option for a temporary proxy (when reading configuration file).
* Create an option for a temporary proxy (when reading configuration file).
*/
void
@@ -347,9 +347,9 @@ proxy_create_option_temp (struct t_proxy *temp_proxy, int index_option,
}
/*
* Allocates and initializes a new proxy structure.
* Allocate and initialize a new proxy structure.
*
* Returns pointer to new proxy, NULL if error.
* Return pointer to new proxy, NULL if error.
*/
struct t_proxy *
@@ -374,9 +374,9 @@ proxy_alloc (const char *name)
}
/*
* Adds a new proxy with options.
* Add a new proxy with options.
*
* Returns pointer to new proxy, NULL if error.
* Return pointer to new proxy, NULL if error.
*/
struct t_proxy *
@@ -415,9 +415,9 @@ proxy_new_with_options (const char *name,
}
/*
* Adds a new proxy.
* Add a new proxy.
*
* Returns pointer to new proxy, NULL if error.
* Return pointer to new proxy, NULL if error.
*/
struct t_proxy *
@@ -470,7 +470,7 @@ proxy_new (const char *name, const char *type, const char *ipv6,
}
/*
* Uses temporary proxies (added by reading configuration file).
* Use temporary proxies (added by reading configuration file).
*/
void
@@ -532,7 +532,7 @@ proxy_use_temp_proxies (void)
}
/*
* Frees a proxy.
* Free a proxy.
*/
void
@@ -564,7 +564,7 @@ proxy_free (struct t_proxy *proxy)
}
/*
* Frees all proxies.
* Free all proxies.
*/
void
@@ -577,7 +577,7 @@ proxy_free_all (void)
}
/*
* Returns hdata for proxy.
* Return hdata for proxy.
*/
struct t_hdata *
@@ -605,9 +605,9 @@ proxy_hdata_proxy_cb (const void *pointer, void *data,
}
/*
* Adds a proxy in an infolist.
* Add a proxy in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -645,7 +645,7 @@ proxy_add_to_infolist (struct t_infolist *infolist, struct t_proxy *proxy)
}
/*
* Prints proxies in WeeChat log file (usually for crash dump).
* Print proxies in WeeChat log file (usually for crash dump).
*/
void
+4 -4
View File
@@ -49,7 +49,7 @@ int secure_buffer_display_values = 0;
/*
* Displays a secured data.
* Display a secured data.
*/
void
@@ -83,7 +83,7 @@ secure_buffer_display_data (void *data,
}
/*
* Displays content of secured data buffer.
* Display content of secured data buffer.
*/
void
@@ -195,7 +195,7 @@ secure_buffer_close_cb (const void *pointer, void *data,
}
/*
* Assigns secured data buffer to pointer if it is not yet set.
* Assign secured data buffer to pointer if it is not yet set.
*/
void
@@ -213,7 +213,7 @@ secure_buffer_assign (void)
}
/*
* Opens a buffer to display secured data.
* Open a buffer to display secured data.
*/
void
+18 -18
View File
@@ -56,7 +56,7 @@ int secure_config_loading = 0;
/*
* Gets passphrase from user and puts it in variable "secure_passphrase".
* Get passphrase from user and put it in variable "secure_passphrase".
*/
void
@@ -103,9 +103,9 @@ secure_config_get_passphrase_from_user (const char *error)
}
/*
* Gets passphrase from a command.
* Get passphrase from a command.
*
* Returns passphrase from command output (only the first line with max length
* Return passphrase from command output (only the first line with max length
* of SECURE_PASSPHRASE_MAX_LENGTH chars), or NULL if error.
*
* Note: result must be freed after use.
@@ -144,9 +144,9 @@ secure_config_get_passphrase_from_command (const char *command)
}
/*
* Reloads secured data configuration file.
* Reload secured data configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -212,7 +212,7 @@ secure_config_check_crypt_option_cb (const void *pointer, void *data,
}
/*
* Reads a data option in secured data configuration file.
* Read a data option in secured data configuration file.
*/
int
@@ -371,7 +371,7 @@ secure_config_data_read_cb (const void *pointer, void *data,
}
/*
* Encrypts data and writes it in secured data configuration file.
* Encrypt data and write it in secured data configuration file.
*/
void
@@ -464,7 +464,7 @@ secure_config_data_write_map_cb (void *data,
}
/*
* Writes already encrypted data in secured data configuration file.
* Write already encrypted data in secured data configuration file.
*/
void
@@ -484,7 +484,7 @@ secure_config_data_write_map_encrypted_cb (void *data,
}
/*
* Writes section "data" in secured data configuration file.
* Write section "data" in secured data configuration file.
*/
int
@@ -536,9 +536,9 @@ secure_config_data_write_cb (const void *pointer, void *data,
}
/*
* Creates options in secured data configuration.
* Create options in secured data configuration.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -631,9 +631,9 @@ secure_config_init_options (void)
}
/*
* Reads secured data configuration file.
* Read secured data configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_READ_OK: OK
* WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory
* WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found
@@ -654,9 +654,9 @@ secure_config_read (void)
}
/*
* Writes secured data configuration file.
* Write secured data configuration file.
*
* Returns:
* Return:
* WEECHAT_CONFIG_WRITE_OK: OK
* WEECHAT_CONFIG_WRITE_ERROR: error
* WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory
@@ -669,9 +669,9 @@ secure_config_write (void)
}
/*
* Initializes secured data configuration.
* Initialize secured data configuration.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -693,7 +693,7 @@ secure_config_init (void)
}
/*
* Frees secured data file and variables.
* Free secured data file and variables.
*/
void
+13 -13
View File
@@ -56,9 +56,9 @@ int secure_data_encrypted = 0;
/*
* Derives a key from salt + passphrase (using a hash).
* Derive a key from salt + passphrase (using a hash).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -101,9 +101,9 @@ secure_derive_key (const char *salt, const char *passphrase,
}
/*
* Encrypts data using a hash algorithm + cipher + passphrase.
* Encrypt data using a hash algorithm + cipher + passphrase.
*
* Following actions are performed:
* The following actions are performed:
* 1. derive a key from the passphrase (with optional salt)
* 2. compute hash of data
* 3. store hash + data in a buffer
@@ -124,7 +124,7 @@ secure_derive_key (const char *salt, const char *passphrase,
* \_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/
* encrypted data
*
* Returns:
* Return:
* 0: OK
* -1: not enough memory
* -2: key derive error
@@ -260,13 +260,13 @@ encrypt_end:
}
/*
* Decrypts data using a hash algorithm + cipher + passphrase.
* Decrypt data using a hash algorithm + cipher + passphrase.
*
* The buffer must contain:
* - salt (8 bytes, used to derive a key from the passphrase)
* - encrypted hash(data) + data
*
* Following actions are performed:
* The following actions are performed:
* 1. check length of buffer (it must have at least salt + hash + some data)
* 2. derive a key from the passphrase using salt (at beginning of buffer)
* 3. decrypt hash + data in a buffer
@@ -274,7 +274,7 @@ encrypt_end:
* 5. check that decrypted hash is equal to hash of data
* 6. return decrypted data
*
* Returns:
* Return:
* 0: OK
* -1: not enough memory
* -2: buffer is not long enough
@@ -410,10 +410,10 @@ decrypt_end:
}
/*
* Decrypts data still encrypted (data that could not be decrypted when reading
* Decrypt data still encrypted (data that could not be decrypted when reading
* secured data configuration file (because no passphrase was given).
*
* Returns:
* Return:
* >= 0: number of decrypted data
* -1: error decrypting data (bad passphrase)
* -2: unsupported hash algorithm
@@ -494,9 +494,9 @@ secure_decrypt_data_not_decrypted (const char *passphrase)
}
/*
* Initializes secured data.
* Initialize secured data.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -539,7 +539,7 @@ secure_init (void)
}
/*
* Frees all allocated data.
* Free all allocated data.
*/
void
+12 -12
View File
@@ -128,10 +128,10 @@ signal_sigusr2_cb (int signo)
}
/*
* Gets a signal index with a signal number; only some commonly used signal
* Get a signal index with a signal number; only some commonly used signal
* names are supported here (see declaration of signal_list[]).
*
* Returns the index of signal in structure string_signal, -1 if not found.
* Return the index of signal in structure string_signal, -1 if not found.
*/
int
@@ -150,10 +150,10 @@ signal_search_number (int signal_number)
}
/*
* Gets a signal number with a name; only some commonly used signal names are
* Get a signal number with a name; only some commonly used signal names are
* supported here (see declaration of signal_list[]).
*
* Returns the signal number, -1 if not found.
* Return the signal number, -1 if not found.
*/
int
@@ -175,7 +175,7 @@ signal_search_name (const char *name)
}
/*
* Catches a system signal.
* Catch a system signal.
*/
void
@@ -190,9 +190,9 @@ signal_catch (int signum, void (*handler)(int))
}
/*
* Sends a WeeChat signal on a system signal received.
* Send a WeeChat signal on a system signal received.
*
* Returns:
* Return:
* WEECHAT_RC_OK: the WeeChat handler must be executed
* WEECHAT_RC_OK_EAT: signal eaten, the WeeChat handler must NOT be executed
*/
@@ -215,7 +215,7 @@ signal_send_to_weechat (int signal_index)
}
/*
* Evaluates and executes the command bound to a signal.
* Evaluate and execute the command bound to a signal.
*/
void
@@ -253,7 +253,7 @@ signal_exec_command (int signal_index, const char *command)
}
/*
* Handles a specific signal received:
* Handle a specific signal received.
*/
void
@@ -278,7 +278,7 @@ signal_handle_number (int signal_number, int count, const char *command)
}
/*
* Handles signals received: sends WeeChat signal and executes the configured
* Handle signals received: sends WeeChat signal and execute the configured
* command (is signal not eaten).
*/
@@ -312,7 +312,7 @@ signal_handle (void)
}
/*
* Suspends WeeChat process.
* Suspend WeeChat process.
*/
void
@@ -323,7 +323,7 @@ signal_suspend (void)
}
/*
* Initializes signal.
* Initialize signal.
*/
void
+126 -126
View File
@@ -72,13 +72,13 @@ char **string_concat_buffer[STRING_NUM_CONCAT_BUFFERS];
/*
* Formats a message in a string allocated by the function.
* Format a message in a string allocated by the function.
*
* This function is defined for systems where the GNU function `asprintf()`
* is not available.
* The behavior is almost the same except that `*result` is set to NULL on error.
*
* Returns the number of bytes in the resulting string, negative value in case
* Return the number of bytes in the resulting string, negative value in case
* of error.
*
* Value of `*result` is allocated with the result string (NULL if error),
@@ -127,7 +127,7 @@ string_asprintf (char **result, const char *fmt, ...)
}
/*
* Defines a "strndup" function for systems where this function does not exist
* Define a "strndup" function for systems where this function does not exist
* (FreeBSD and maybe others).
*
* Note: result must be freed after use.
@@ -155,7 +155,7 @@ string_strndup (const char *string, int bytes)
}
/*
* Cuts a string after max "length" chars, adds an optional suffix
* Cut a string after max "length" chars, adds an optional suffix
* after the string if it is cut.
*
* If count_suffix == 1, the length of suffix is counted in the max length.
@@ -224,7 +224,7 @@ string_cut (const char *string, int length, int count_suffix, int screen,
}
/*
* Reverses a string.
* Reverse a string.
*
* Note: result must be freed after use.
*/
@@ -266,7 +266,7 @@ string_reverse (const char *string)
}
/*
* Reverses a string for screen: color codes are not reversed.
* Reverse a string for screen: color codes are not reversed.
* For example: reverse of "<red>test" is "test<red>" where the color code
* "<red>" is kept as-is, so it is still valid (this is not the case with
* function string_reverse).
@@ -328,7 +328,7 @@ string_reverse_screen (const char *string)
}
/*
* Repeats a string a given number of times.
* Repeat a string a given number of times.
*
* Note: result must be freed after use.
*/
@@ -371,7 +371,7 @@ string_repeat (const char *string, int count)
}
/*
* Converts string to lowercase (locale dependent).
* Convert string to lowercase (locale dependent).
*/
char *
@@ -414,7 +414,7 @@ string_tolower (const char *string)
}
/*
* Converts string to uppercase (locale dependent).
* Convert string to uppercase (locale dependent).
*/
char *
@@ -457,7 +457,7 @@ string_toupper (const char *string)
}
/*
* Converts string to lower case (using a range of chars).
* Convert string to lower case (using a range of chars).
*
* Note: result must be freed after use.
*/
@@ -489,7 +489,7 @@ string_tolower_range (const char *string, int range)
}
/*
* Converts string to upper case (using a range of char).
* Convert string to upper case (using a range of char).
*
* Note: result must be freed after use.
*/
@@ -521,9 +521,9 @@ string_toupper_range (const char *string, int range)
}
/*
* Compares two chars (case-sensitive).
* Compare two chars (case-sensitive).
*
* Returns: arithmetic result of subtracting the first UTF-8 char in string2
* Return: arithmetic result of subtracting the first UTF-8 char in string2
* from the first UTF-8 char in string1:
* < 0: string1 < string2
* 0: string1 == string2
@@ -537,9 +537,9 @@ string_charcmp (const char *string1, const char *string2)
}
/*
* Compares two chars (case-insensitive).
* Compare two chars (case-insensitive).
*
* Returns: arithmetic result of subtracting the first UTF-8 char in string2
* Return: arithmetic result of subtracting the first UTF-8 char in string2
* (converted to lowercase) from the first UTF-8 char in string1 (converted
* to lowercase):
* < 0: string1 < string2
@@ -576,7 +576,7 @@ string_charcasecmp (const char *string1, const char *string2)
}
/*
* Compares two chars (case-insensitive using a range).
* Compare two chars (case-insensitive using a range).
*
* The range is the number of chars which can be converted from upper to lower
* case. For example 26 = all letters of alphabet, 29 = all letters + 3 chars.
@@ -587,7 +587,7 @@ string_charcasecmp (const char *string1, const char *string2)
* - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~
* (ranges 29 and 30 are used by some protocols like IRC)
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase) from the last compared UTF-8 char in
* string1 (converted to lowercase):
* < 0: string1 < string2
@@ -612,9 +612,9 @@ string_charcasecmp_range (const char *string1, const char *string2, int range)
}
/*
* Compares two strings (case-sensitive).
* Compare two strings (case-sensitive).
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 from the last compared UTF-8 char in string1:
* < 0: string1 < string2
* 0: string1 == string2
@@ -646,9 +646,9 @@ string_strcmp (const char *string1, const char *string2)
}
/*
* Compares two strings with max length (case-sensitive).
* Compare two strings with max length (case-sensitive).
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 from the last compared UTF-8 char in string1:
* < 0: string1 < string2
* 0: string1 == string2
@@ -685,9 +685,9 @@ string_strncmp (const char *string1, const char *string2, int max)
}
/*
* Compares two strings (case-insensitive).
* Compare two strings (case-insensitive).
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase) from the last compared UTF-8 char in
* string1 (converted to lowercase):
* < 0: string1 < string2
@@ -720,7 +720,7 @@ string_strcasecmp (const char *string1, const char *string2)
}
/*
* Compares two strings (case-insensitive using a range).
* Compare two strings (case-insensitive using a range).
*
* The range is the number of chars which can be converted from upper to lower
* case. For example 26 = all letters of alphabet, 29 = all letters + 3 chars.
@@ -731,7 +731,7 @@ string_strcasecmp (const char *string1, const char *string2)
* - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~
* (ranges 29 and 30 are used by some protocols like IRC)
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase) from the last compared UTF-8 char in
* string1 (converted to lowercase):
* < 0: string1 < string2
@@ -764,9 +764,9 @@ string_strcasecmp_range (const char *string1, const char *string2, int range)
}
/*
* Compares two strings with max length (case-insensitive).
* Compare two strings with max length (case-insensitive).
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase) from the last compared UTF-8 char in
* string1 (converted to lowercase):
* < 0: string1 < string2
@@ -804,7 +804,7 @@ string_strncasecmp (const char *string1, const char *string2, int max)
}
/*
* Compares two strings with max length (case-insensitive using a range).
* Compare two strings with max length (case-insensitive using a range).
*
* The range is the number of chars which can be converted from upper to lower
* case. For example 26 = all letters of alphabet, 29 = all letters + 3 chars.
@@ -815,7 +815,7 @@ string_strncasecmp (const char *string1, const char *string2, int max)
* - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~
* (ranges 29 and 30 are used by some protocols like IRC)
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase) from the last compared UTF-8 char in
* string1 (converted to lowercase):
* < 0: string1 < string2
@@ -854,9 +854,9 @@ string_strncasecmp_range (const char *string1, const char *string2, int max,
}
/*
* Compares two strings, ignoring some chars.
* Compare two strings, ignoring some chars.
*
* Returns: arithmetic result of subtracting the last compared UTF-8 char in
* Return: arithmetic result of subtracting the last compared UTF-8 char in
* string2 (converted to lowercase if case_sensitive is set to 0) from the last
* compared UTF-8 char in string1 (converted to lowercase if case_sensitive is
* set to 0):
@@ -923,9 +923,9 @@ string_strcmp_ignore_chars (const char *string1, const char *string2,
}
/*
* Searches for a string in another string (locale and case independent).
* Search for a string in another string (locale and case independent).
*
* Returns pointer to string found, or NULL if not found.
* Return pointer to string found, or NULL if not found.
*/
const char *
@@ -950,12 +950,12 @@ string_strcasestr (const char *string, const char *search)
}
/*
* Checks if a string matches a mask.
* Check if a string matches a mask.
*
* The mask can contain wildcards ("*"), each wildcard matches 0 or more chars
* in the string.
*
* Returns:
* Return:
* 1: string matches mask
* 0: string does not match mask
*/
@@ -1080,7 +1080,7 @@ string_match (const char *string, const char *mask, int case_sensitive)
}
/*
* Checks if a string matches a list of masks. Negative masks are allowed
* Check if a string matches a list of masks. Negative masks are allowed
* with "!mask" to exclude this mask and have higher priority than standard
* masks.
*
@@ -1090,7 +1090,7 @@ string_match (const char *string, const char *mask, int case_sensitive)
* forbidden:
* "*", "!toto", "!abc"
*
* Returns:
* Return:
* 1: string matches list of masks
* 0: string does not match list of masks
*/
@@ -1122,7 +1122,7 @@ string_match_list (const char *string, const char **masks, int case_sensitive)
}
/*
* Expands home in a path.
* Expand home in a path.
*
* Example: "~/file.txt" => "/home/user/file.txt"
*
@@ -1158,7 +1158,7 @@ string_expand_home (const char *path)
* 2. "~" by user home directory (call to string_expand_home)
* 3. evaluated variables (see /help eval)
*
* Returns the evaluated path, NULL if error.
* Return the evaluated path, NULL if error.
*
* Note: result must be freed after use.
*/
@@ -1225,7 +1225,7 @@ end:
}
/*
* Removes quotes at beginning/end of string (ignores spaces if there are before
* Remove quotes at beginning/end of string (ignores spaces if there are before
* first quote or after last quote).
*
* Note: result must be freed after use.
@@ -1268,7 +1268,7 @@ string_remove_quotes (const char *string, const char *quotes)
}
/*
* Strips chars at beginning/end of string.
* Strip chars at beginning/end of string.
*
* Note: result must be freed after use.
*/
@@ -1311,7 +1311,7 @@ string_strip (const char *string, int left, int right, const char *chars)
}
/*
* Converts escaped chars to their values.
* Convert escaped chars to their values.
*
* Following escaped chars are supported:
* \" double quote
@@ -1472,9 +1472,9 @@ string_convert_escaped_chars (const char *string)
}
/*
* Checks if first char of string is a whitespace (space, tab, newline or carriage return).
* Check if first char of string is a whitespace (space, tab, newline or carriage return).
*
* Returns:
* Return:
* 1: first char is whitespace
* 0: first char is not whitespace
*/
@@ -1490,11 +1490,11 @@ string_is_whitespace_char (const char *string)
}
/*
* Checks if first char of string is a "word char".
* Check if first char of string is a "word char".
*
* The word chars are customizable with options "weechat.look.word_chars_*".
*
* Returns:
* Return:
* 1: first char is a word char
* 0: first char is not a word char
*/
@@ -1540,12 +1540,12 @@ string_is_word_char (const char *string,
}
/*
* Checks if first char of string is a "word char" (for highlight).
* Check if first char of string is a "word char" (for highlight).
*
* The word chars for highlights are customizable with option
* "weechat.look.word_chars_highlight".
*
* Returns:
* Return:
* 1: first char is a word char
* 0: first char is not a word char
*/
@@ -1559,12 +1559,12 @@ string_is_word_char_highlight (const char *string)
}
/*
* Checks if first char of string is a "word char" (for input).
* Check if first char of string is a "word char" (for input).
*
* The word chars for input are customizable with option
* "weechat.look.word_chars_input".
*
* Returns:
* Return:
* 1: first char is a word char
* 0: first char is not a word char
*/
@@ -1578,7 +1578,7 @@ string_is_word_char_input (const char *string)
}
/*
* Converts a mask (string with only "*" as wildcard) to a regex, paying
* Convert a mask (string with only "*" as wildcard) to a regex, paying
* attention to special chars in a regex.
*
* Note: result must be freed after use.
@@ -1630,7 +1630,7 @@ string_mask_to_regex (const char *mask)
}
/*
* Extracts flags and regex from a string.
* Extract flags and regex from a string.
*
* Format of flags is: (?eins-eins)string
* Flags are:
@@ -1706,10 +1706,10 @@ string_regex_flags (const char *regex, int default_flags, int *flags)
}
/*
* Compiles a regex using optional flags at beginning of string (for format of
* Compile a regex using optional flags at beginning of string (for format of
* flags in regex, see string_regex_flags()).
*
* Returns:
* Return:
* 0: successful compilation
* other value: compilation failed
*
@@ -1733,9 +1733,9 @@ string_regcomp (void *preg, const char *regex, int default_flags)
}
/*
* Checks if a string has a highlight (using list of words to highlight).
* Check if a string has a highlight (using list of words to highlight).
*
* Returns:
* Return:
* 1: string has a highlight
* 0: string has no highlight
*/
@@ -1840,7 +1840,7 @@ string_has_highlight (const char *string, const char *highlight_words)
}
/*
* Checks if a string has a highlight using a compiled regular expression (any
* Check if a string has a highlight using a compiled regular expression (any
* match in string must be surrounded by delimiters).
*/
@@ -1889,7 +1889,7 @@ string_has_highlight_regex_compiled (const char *string, regex_t *regex)
}
/*
* Checks if a string has a highlight using a regular expression (any match in
* Check if a string has a highlight using a regular expression (any match in
* string must be surrounded by delimiters).
*/
@@ -1913,7 +1913,7 @@ string_has_highlight_regex (const char *string, const char *regex)
}
/*
* Replaces a string by new one in a string.
* Replace a string by new one in a string.
*
* Note: result must be freed after use.
*/
@@ -2140,7 +2140,7 @@ string_replace_regex_get_replace (const char *string, regmatch_t *regex_match,
}
/*
* Replaces text in a string using a regular expression and replacement text.
* Replace text in a string using a regular expression and replacement text.
*
* The argument "regex" is a pointer to a regex compiled with WeeChat function
* string_regcomp (or function regcomp).
@@ -2262,7 +2262,7 @@ string_replace_regex (const char *string, void *regex, const char *replace,
}
/*
* Translates chars by other ones in a string.
* Translate chars by other ones in a string.
*
* Note: result must be freed after use.
*/
@@ -2314,7 +2314,7 @@ string_translate_chars (const char *string,
}
/*
* Splits a string according to separators.
* Split a string according to separators.
*
* This function must not be called directly (call string_split or
* string_split_shared instead).
@@ -2607,7 +2607,7 @@ error:
}
/*
* Splits a string according to separators.
* Split a string according to separators.
*
* For full description, see function string_split_internal.
*/
@@ -2622,7 +2622,7 @@ string_split (const char *string, const char *separators,
}
/*
* Splits a string according to separators, and use shared strings for the
* Split a string according to separators, and use shared strings for the
* strings in the array returned.
*
* For full description, see function string_split_internal.
@@ -2638,7 +2638,7 @@ string_split_shared (const char *string, const char *separators,
}
/*
* Splits a string like the shell does for a command with arguments.
* Split a string like the shell does for a command with arguments.
*
* This function is a C conversion of Python class "shlex"
* (file: Lib/shlex.py in Python repository)
@@ -2836,7 +2836,7 @@ string_split_shell (const char *string, int *num_items)
}
/*
* Frees a split string.
* Free a split string.
*/
void
@@ -2853,7 +2853,7 @@ string_free_split (char **split_string)
}
/*
* Frees a split string (using shared strings).
* Free a split string (using shared strings).
*/
void
@@ -2870,7 +2870,7 @@ string_free_split_shared (char **split_string)
}
/*
* Rebuilds a split string using a delimiter and optional index of start/end
* Rebuild a split string using a delimiter and optional index of start/end
* string.
*
* If index_end < 0, then all arguments are used until NULL is found.
@@ -2914,7 +2914,7 @@ string_rebuild_split_string (const char **split_string,
}
/*
* Splits a list of commands separated by 'separator' and escaped with '\'.
* Split a list of commands separated by 'separator' and escaped with '\'.
* Empty commands are removed, spaces on the left of each commands are stripped.
*
* Note: result must be freed after use with function
@@ -3005,7 +3005,7 @@ string_split_command (const char *command, char separator)
}
/*
* Frees a command split.
* Free a command split.
*/
void
@@ -3022,7 +3022,7 @@ string_free_split_command (char **split_command)
}
/*
* Splits tags in an array of tags.
* Split tags in an array of tags.
*
* The format of tags is a list of tags separated by commas (logical OR),
* and for each item, multiple tags can be separated by "+" (logical AND).
@@ -3074,7 +3074,7 @@ string_split_tags (const char *tags, int *num_tags)
}
/*
* Frees tags split.
* Free tags split.
*/
void
@@ -3091,7 +3091,7 @@ string_free_split_tags (char ***split_tags)
}
/*
* Converts a string to another charset.
* Convert a string to another charset.
*
* Note: result must be freed after use.
*/
@@ -3207,7 +3207,7 @@ string_iconv (int from_utf8, const char *from_code, const char *to_code,
}
/*
* Converts a string to WeeChat internal storage charset (UTF-8).
* Convert a string to WeeChat internal storage charset (UTF-8).
*
* Note: result must be freed after use.
*/
@@ -3247,7 +3247,7 @@ string_iconv_to_internal (const char *charset, const char *string)
}
/*
* Converts internal string to terminal charset, for display or write of
* Convert internal string to terminal charset, for display or write of
* configuration files.
*
* Note: result must be freed after use.
@@ -3289,9 +3289,9 @@ string_iconv_from_internal (const char *charset, const char *string)
}
/*
* Encodes a string to terminal charset and calls fprintf.
* Encode a string to terminal charset and calls fprintf.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3321,7 +3321,7 @@ string_fprintf (FILE *file, const char *data, ...)
}
/*
* Formats a string with size and unit name (bytes, KB, MB, GB).
* Format a string with size and unit name (bytes, KB, MB, GB).
*
* Note: result must be freed after use.
*/
@@ -3375,7 +3375,7 @@ string_format_size (unsigned long long size)
}
/*
* Parses a string with a size and returns the size in bytes.
* Parse a string with a size and return the size in bytes.
*
* The format is "123" or "123x" or "123 x" where "123" is any positive
* integer number and "x" the unit, which can be one of (lower or upper case
@@ -3387,7 +3387,7 @@ string_format_size (unsigned long long size)
* g gigabytes (1g = 1000m = 1,000,000,000 bytes)
* t terabytes (1t = 1000g = 1,000,000,000,000 bytes)
*
* Returns the parsed size, 0 if error.
* Return the parsed size, 0 if error.
*/
unsigned long long
@@ -3465,12 +3465,12 @@ end:
}
/*
* Encodes a string in base16 (hexadecimal).
* Encode a string in base16 (hexadecimal).
*
* Argument "length" is number of bytes in "from" to convert (commonly
* strlen(from)).
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3496,9 +3496,9 @@ string_base16_encode (const char *from, int length, char *to)
}
/*
* Decodes a base16 string (hexadecimal).
* Decode a base16 string (hexadecimal).
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3543,7 +3543,7 @@ string_base16_decode (const char *from, char *to)
}
/*
* Encodes a string in base32.
* Encode a string in base32.
*
* Argument "length" is number of bytes in "from" to convert (commonly
* strlen(from)).
@@ -3568,7 +3568,7 @@ string_base16_decode (const char *from, char *to)
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3624,7 +3624,7 @@ string_base32_encode (const char *from, int length, char *to)
}
/*
* Decodes a base32 string.
* Decode a base32 string.
*
* This function is inspired by:
* https://github.com/google/google-authenticator-libpam/blob/master/src/base32.c
@@ -3647,7 +3647,7 @@ string_base32_encode (const char *from, int length, char *to)
* limitations under the License.
*
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3704,7 +3704,7 @@ string_base32_decode (const char *from, char *to)
}
/*
* Converts 3 bytes of 8 bits in 4 bytes of 6 bits.
* Convert 3 bytes of 8 bits in 4 bytes of 6 bits.
*/
void
@@ -3725,7 +3725,7 @@ string_convbase64_8x3_to_6x4 (int url, const char *from, char *to)
}
/*
* Encodes a string in base64.
* Encode a string in base64.
*
* If url == 1, base64url is decoded, otherwise standard base64.
*
@@ -3737,7 +3737,7 @@ string_convbase64_8x3_to_6x4 (int url, const char *from, char *to)
* Argument "length" is number of bytes in "from" to convert (commonly
* strlen(from)).
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3802,7 +3802,7 @@ string_base64_encode (int url, const char *from, int length, char *to)
}
/*
* Converts 4 bytes of 6 bits to 3 bytes of 8 bits.
* Convert 4 bytes of 6 bits to 3 bytes of 8 bits.
*/
void
@@ -3814,7 +3814,7 @@ string_convbase64_6x4_to_8x3 (const unsigned char *from, unsigned char *to)
}
/*
* Decodes a base64 string.
* Decode a base64 string.
*
* If url == 1, base64url is decoded, otherwise standard base64.
*
@@ -3823,7 +3823,7 @@ string_convbase64_6x4_to_8x3 (const unsigned char *from, unsigned char *to)
* "/" --> _ (underline)
* no padding char ("=")
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3892,14 +3892,14 @@ string_base64_decode (int url, const char *from, char *to)
}
/*
* Encodes a string, according to "base" parameter:
* Encode a string, according to "base" parameter:
* - "16": base16
* - "32": base32
* - "64": base64
* - "64url": base64url: same as base64 with no padding ("="), chars replaced:
* + --> - and "/" --> _
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3925,14 +3925,14 @@ string_base_encode (const char *base, const char *from, int length, char *to)
}
/*
* Decodes a string, according to "base" parameter:
* Decode a string, according to "base" parameter:
* - "16": base16
* - "32": base32
* - "64": base64
* - "64url": base64url: same as base64 with no padding ("="), chars replaced:
* + --> - and "/" --> _
*
* Returns length of string in "*to" (it does not count final \0),
* Return length of string in "*to" (it does not count final \0),
* -1 if error.
*/
@@ -3958,7 +3958,7 @@ string_base_decode (const char *base, const char *from, char *to)
}
/*
* Dumps a data buffer as hexadecimal + ascii.
* Dump a data buffer as hexadecimal + ascii.
*
* Note: result must be freed after use.
*/
@@ -4059,9 +4059,9 @@ end:
}
/*
* Checks if a string is a command.
* Check if a string is a command.
*
* Returns:
* Return:
* 1: first char of string is a command char
* 0: string is not a command
*/
@@ -4092,9 +4092,9 @@ string_is_command_char (const char *string)
}
/*
* Gets pointer to input text for buffer.
* Get pointer to input text for buffer.
*
* Returns pointer inside "string" argument or NULL if it's a command (by
* Return pointer inside "string" argument or NULL if it's a command (by
* default a command starts with a single '/').
*/
@@ -4159,7 +4159,7 @@ string_input_for_buffer (const char *string)
}
/*
* Returns the number of bytes in common between two strings (this function
* Return the number of bytes in common between two strings (this function
* works with bytes and not UTF-8 chars).
*/
@@ -4184,7 +4184,7 @@ string_get_common_bytes_count (const char *string1, const char *string2)
}
/*
* Returns the distance between two strings using the Levenshtein algorithm.
* Return the distance between two strings using the Levenshtein algorithm.
* See: https://en.wikipedia.org/wiki/Levenshtein_distance
*/
@@ -4244,7 +4244,7 @@ string_levenshtein (const char *string1, const char *string2,
}
/*
* Replaces ${vars} using a callback that returns replacement value (this value
* Replace ${vars} using a callback that return replacement value (this value
* must be newly allocated because it will be freed in this function).
*
* Nested variables are supported, for example: "${var1:${var2}}".
@@ -4425,7 +4425,7 @@ string_replace_with_callback (const char *string,
}
/*
* Extracts priority and name from a string.
* Extract priority and name from a string.
*
* String can be:
* - a simple name like "test":
@@ -4471,10 +4471,10 @@ string_get_priority_and_name (const char *string,
}
/*
* Hashes a shared string.
* Hash a shared string.
* The string starts after the reference count, which is skipped.
*
* Returns the hash of the shared string (variant of djb2).
* Return the hash of the shared string (variant of djb2).
*/
unsigned long long
@@ -4488,10 +4488,10 @@ string_shared_hash_key (struct t_hashtable *hashtable,
}
/*
* Compares two shared strings.
* Compare two shared strings.
* Each string starts after the reference count, which is skipped.
*
* Returns:
* Return:
* < 0: key1 < key2
* 0: key1 == key2
* > 0: key1 > key2
@@ -4509,7 +4509,7 @@ string_shared_keycmp (struct t_hashtable *hashtable,
}
/*
* Frees a shared string.
* Free a shared string.
*/
void
@@ -4522,7 +4522,7 @@ string_shared_free_key (struct t_hashtable *hashtable, void *key)
}
/*
* Gets a pointer to a shared string.
* Get a pointer to a shared string.
*
* A shared string is an entry in the hashtable "string_hashtable_shared", with:
* - key: reference count (unsigned integer on 32 bits) + string
@@ -4531,7 +4531,7 @@ string_shared_free_key (struct t_hashtable *hashtable, void *key)
* The initial reference count is set to 1 and is incremented each time this
* function is called for a same string (string content, not the pointer).
*
* Returns the pointer to the shared string (start of string in key, after the
* Return the pointer to the shared string (start of string in key, after the
* reference count), NULL if error.
* The string returned has exactly same content as string received in argument,
* but the pointer to the string is different.
@@ -4597,7 +4597,7 @@ string_shared_get (const char *string)
}
/*
* Frees a shared string.
* Free a shared string.
*
* The reference count of the string is decremented. If it becomes 0, then the
* shared string is removed from the hashtable (and then the string is really
@@ -4621,12 +4621,12 @@ string_shared_free (const char *string)
}
/*
* Allocates a dynamic string (with a variable length).
* Allocate a dynamic string (with a variable length).
*
* The parameter size_alloc is the initial allocated size, which must be
* greater than zero.
*
* Returns the pointer to the allocated string, which is initialized as empty
* Return the pointer to the allocated string, which is initialized as empty
* string.
*
* The string returned can be used with following restrictions:
@@ -4667,14 +4667,14 @@ string_dyn_alloc (int size_alloc)
}
/*
* Copies "new_string" into a dynamic string and replaces its current content
* Copy "new_string" into a dynamic string and replaces its current content
* (adjusts its size accordingly).
*
* The string pointer (*string) is updated with the new allocated string
* if the string had to be extended, or the same pointer if there was enough
* size to copy the new string.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -4718,7 +4718,7 @@ string_dyn_copy (char **string, const char *new_string)
}
/*
* Concatenates a string to a dynamic string and adjusts its size accordingly.
* Concatenate a string to a dynamic string and adjusts its size accordingly.
*
* The parameter "bytes" is the max number of bytes to concatenate
* (a terminating null byte '\0' is automatically added); value -1 means
@@ -4728,7 +4728,7 @@ string_dyn_copy (char **string, const char *new_string)
* if the string had to be extended, or the same pointer if there was enough
* size to concatenate the new string.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -4783,7 +4783,7 @@ string_dyn_concat (char **string, const char *add, int bytes)
}
/*
* Frees a dynamic string.
* Free a dynamic string.
*
* The argument "string" is a pointer on a string returned by function
* string_dyn_alloc or a string pointer modified by string_dyn_concat.
@@ -4795,7 +4795,7 @@ string_dyn_concat (char **string, const char *add, int bytes)
* Be careful, the pointer in *string may change after this call because
* the string can be reallocated to its exact size.
*
* Returns the pointer to the string if "free_string" is 0 (string
* Return the pointer to the string if "free_string" is 0 (string
* pointer is still valid), or NULL if "free_string" is 1 (string
* has been freed).
*/
@@ -4835,7 +4835,7 @@ string_dyn_free (char **string, int free_string)
}
/*
* Concatenates strings, using a separator (which can be NULL or empty string
* Concatenate strings, using a separator (which can be NULL or empty string
* to not use any separator).
*
* Last argument must be NULL to terminate the variable list of arguments.
@@ -4882,7 +4882,7 @@ string_concat (const char *separator, ...)
}
/*
* Initializes string.
* Initialize string.
*/
void
@@ -4897,7 +4897,7 @@ string_init (void)
}
/*
* Frees all allocated data.
* Free all allocated data.
*/
void
+5 -5
View File
@@ -104,7 +104,7 @@ struct t_rlimit_resource rlimit_resource[] =
/*
* Sets resource limit.
* Set resource limit.
*/
#ifdef HAVE_SYS_RESOURCE_H
@@ -174,7 +174,7 @@ sys_setrlimit_resource (const char *resource_name, long long limit)
#endif /* HAVE_SYS_RESOURCE_H */
/*
* Sets resource limits using value of option "weechat.startup.sys_rlimit".
* Set resource limits using value of option "weechat.startup.sys_rlimit".
*/
void
@@ -220,7 +220,7 @@ sys_setrlimit (void)
}
/*
* Displays resource limits.
* Display resource limits.
*/
void
@@ -278,7 +278,7 @@ sys_display_rlimit (void)
}
/*
* Displays resource usage.
* Display resource usage.
*/
void
@@ -346,7 +346,7 @@ sys_display_rusage (void)
}
/*
* Calls waitpid() to acknowledge the end of forked processes, thus preventing
* Call waitpid() to acknowledge the end of forked processes, thus preventing
* them to become zombies.
*/
+26 -26
View File
@@ -48,7 +48,7 @@ struct t_upgrade_file *last_upgrade_file = NULL;
/*
* Displays an error with upgrade.
* Display an error with upgrade.
*/
void
@@ -85,9 +85,9 @@ upgrade_file_error (struct t_upgrade_file *upgrade_file, char *message1,
}
/*
* Writes an integer value in upgrade file.
* Write an integer value in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -102,9 +102,9 @@ upgrade_file_write_integer (struct t_upgrade_file *upgrade_file, int value)
}
/*
* Writes a time value in upgrade file.
* Write a time value in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -119,9 +119,9 @@ upgrade_file_write_time (struct t_upgrade_file *upgrade_file, time_t date)
}
/*
* Writes a string in upgrade file.
* Write a string in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -150,9 +150,9 @@ upgrade_file_write_string (struct t_upgrade_file *upgrade_file,
}
/*
* Writes a buffer in upgrade file.
* Write a buffer in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -178,11 +178,11 @@ upgrade_file_write_buffer (struct t_upgrade_file *upgrade_file, void *pointer,
}
/*
* Creates an upgrade file.
* Create an upgrade file.
*
* If write == 1, then opens in write mode, otherwise in read mode.
*
* Returns pointer to new upgrade file, NULL if error.
* Return pointer to new upgrade file, NULL if error.
*/
struct t_upgrade_file *
@@ -255,9 +255,9 @@ upgrade_file_new (const char *filename,
}
/*
* Writes an object in upgrade file.
* Write an object in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -414,9 +414,9 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id,
}
/*
* Reads an integer in upgrade file.
* Read an integer in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -441,9 +441,9 @@ upgrade_file_read_integer (struct t_upgrade_file *upgrade_file, int *value)
}
/*
* Reads a string in upgrade file.
* Read a string in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -491,9 +491,9 @@ upgrade_file_read_string (struct t_upgrade_file *upgrade_file, char **string)
}
/*
* Reads a buffer in upgrade file.
* Read a buffer in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -537,9 +537,9 @@ upgrade_file_read_buffer (struct t_upgrade_file *upgrade_file,
}
/*
* Reads time in upgrade file.
* Read time in upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -565,9 +565,9 @@ upgrade_file_read_time (struct t_upgrade_file *upgrade_file, time_t *time)
}
/*
* Reads an object in upgrade file and calls read callback.
* Read an object in upgrade file and calls read callback.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -716,9 +716,9 @@ end:
}
/*
* Reads an upgrade file.
* Read an upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -758,7 +758,7 @@ upgrade_file_read (struct t_upgrade_file *upgrade_file)
}
/*
* Closes and frees an upgrade file.
* Close and frees an upgrade file.
*/
void
+23 -23
View File
@@ -59,10 +59,10 @@ struct t_gui_layout *upgrade_layout = NULL;
/*
* Saves history in WeeChat upgrade file (from last to first, to restore it in
* Save history in WeeChat upgrade file (from last to first, to restore it in
* good order).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -113,9 +113,9 @@ upgrade_weechat_save_history (struct t_upgrade_file *upgrade_file,
}
/*
* Saves buffers in WeeChat upgrade file.
* Save buffers in WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -202,9 +202,9 @@ upgrade_weechat_save_buffers (struct t_upgrade_file *upgrade_file)
}
/*
* Saves miscellaneous info in WeeChat upgrade file.
* Save miscellaneous info in WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -251,9 +251,9 @@ upgrade_weechat_save_misc (struct t_upgrade_file *upgrade_file)
}
/*
* Saves hotlist in WeeChat upgrade file.
* Save hotlist in WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -288,9 +288,9 @@ upgrade_weechat_save_hotlist (struct t_upgrade_file *upgrade_file)
}
/*
* Saves tree with layout for windows in WeeChat upgrade file.
* Save tree with layout for windows in WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -338,9 +338,9 @@ upgrade_weechat_save_layout_window_tree (struct t_upgrade_file *upgrade_file,
}
/*
* Saves layout for windows in WeeChat upgrade file.
* Save layout for windows in WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -370,9 +370,9 @@ upgrade_weechat_save_layout_window (struct t_upgrade_file *upgrade_file)
}
/*
* Saves WeeChat upgrade file.
* Save WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -401,7 +401,7 @@ upgrade_weechat_save (void)
}
/*
* Reads a buffer from infolist.
* Read a buffer from infolist.
*/
void
@@ -647,7 +647,7 @@ upgrade_weechat_read_buffer (struct t_infolist *infolist)
}
/*
* Reads a buffer line from infolist.
* Read a buffer line from infolist.
*/
void
@@ -704,7 +704,7 @@ upgrade_weechat_read_buffer_line (struct t_infolist *infolist)
}
/*
* Reads a nicklist from infolist.
* Read a nicklist from infolist.
*/
void
@@ -781,7 +781,7 @@ upgrade_weechat_read_nicklist (struct t_infolist *infolist)
}
/*
* Reads hotlist from infolist.
* Read hotlist from infolist.
*/
void
@@ -832,7 +832,7 @@ upgrade_weechat_read_hotlist (struct t_infolist *infolist)
}
/*
* Reads WeeChat upgrade file.
* Read WeeChat upgrade file.
*/
int
@@ -898,9 +898,9 @@ upgrade_weechat_read_cb (const void *pointer, void *data,
}
/*
* Loads WeeChat upgrade file.
* Load WeeChat upgrade file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -956,7 +956,7 @@ upgrade_weechat_load (void)
}
/*
* Removes a .upgrade file (callback called for each .upgrade file in WeeChat
* Remove a .upgrade file (callback called for each .upgrade file in WeeChat
* home directory).
*/
@@ -975,7 +975,7 @@ upgrade_weechat_remove_file_cb (void *data, const char *filename)
}
/*
* Removes *.upgrade files after upgrade and send signal "weechat_upgrade_done".
* Remove *.upgrade files after upgrade and send signal "weechat_upgrade_done".
*/
void
+17 -17
View File
@@ -683,9 +683,9 @@ struct t_url_option url_options[] =
/*
* Searches for a constant in array of constants.
* Search for a constant in array of constants.
*
* Returns index of constant, -1 if not found.
* Return index of constant, -1 if not found.
*/
int
@@ -709,7 +709,7 @@ weeurl_search_constant (struct t_url_constant *constants, const char *name)
}
/*
* Gets value of mask using constants.
* Get value of mask using constants.
*
* Argument "string_mask" has format: "const1+const2+const3".
*/
@@ -752,9 +752,9 @@ weeurl_get_mask_value (struct t_url_constant *constants,
}
/*
* Searches for an URL option in table of options.
* Search for an URL option in table of options.
*
* Returns index of option, -1 if not found.
* Return index of option, -1 if not found.
*/
int
@@ -778,7 +778,7 @@ weeurl_search_option (const char *name)
}
/*
* Reads data from a file (callback called to read a file).
* Read data from a file (callback called to read a file).
*/
size_t
@@ -788,7 +788,7 @@ weeurl_read_stream (void *buffer, size_t size, size_t nmemb, void *stream)
}
/*
* Writes data in a file (callback called to write a file).
* Write data in a file (callback called to write a file).
*/
size_t
@@ -798,7 +798,7 @@ weeurl_write_stream (void *buffer, size_t size, size_t nmemb, void *stream)
}
/*
* Adds data to a dynamic string (callback called to catch stdout).
* Add data to a dynamic string (callback called to catch stdout).
*/
size_t
@@ -813,7 +813,7 @@ weeurl_write_string (void *buffer, size_t size, size_t nmemb, void *string)
}
/*
* Sets option in CURL easy handle (callback called for each option in hashtable
* Set option in CURL easy handle (callback called for each option in hashtable
* "options").
*/
@@ -920,7 +920,7 @@ weeurl_option_map_cb (void *data,
}
/*
* Sets proxy in CURL easy handle.
* Set proxy in CURL easy handle.
*/
void
@@ -968,7 +968,7 @@ weeurl_set_proxy (CURL *curl, struct t_proxy *proxy)
}
/*
* Downloads URL using options.
* Download URL using options.
*
* If output is not NULL, it must be a hashtable with keys and values of type
* "string". The following keys may be added in the hashtable,
@@ -982,7 +982,7 @@ weeurl_set_proxy (CURL *curl, struct t_proxy *proxy)
* error | error message (set only in case of error)
*
* If timeout is 0, the function blocks until the end of the transfer.
* If timeout (in milliseconds) is > 0, the function returns an error in the
* If timeout (in milliseconds) is > 0, the function return an error in the
* output hashtable if the timeout is reached while the transfer is still
* active.
*
@@ -990,7 +990,7 @@ weeurl_set_proxy (CURL *curl, struct t_proxy *proxy)
* pointed integer becomes different from 0 (set by the caller of this function),
* the download is immediately stopped with an error.
*
* Returns:
* Return:
* 0: OK
* 1: invalid URL
* 2: error downloading URL
@@ -1261,9 +1261,9 @@ end:
}
/*
* Adds an URL option in an infolist.
* Add an URL option in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1319,7 +1319,7 @@ weeurl_option_add_to_infolist (struct t_infolist *infolist,
}
/*
* Initializes URL.
* Initialize URL.
*/
void
@@ -1329,7 +1329,7 @@ weeurl_init (void)
}
/*
* Ends URL.
* End URL.
*/
void
+38 -38
View File
@@ -44,7 +44,7 @@ int local_utf8 = 0;
/*
* Initializes UTF-8 in WeeChat.
* Initialize UTF-8 in WeeChat.
*/
void
@@ -54,9 +54,9 @@ utf8_init (void)
}
/*
* Checks if a string has some 8-bit chars.
* Check if a string has some 8-bit chars.
*
* Returns:
* Return:
* 1: string has 8-bit chars
* 0: string has only 7-bit chars
*/
@@ -74,12 +74,12 @@ utf8_has_8bits (const char *string)
}
/*
* Checks if a string is UTF-8 valid.
* Check if a string is UTF-8 valid.
*
* If length is <= 0, checks whole string.
* If length is > 0, checks only this number of chars (not bytes).
*
* Returns:
* Return:
* 1: string is UTF-8 valid
* 0: string it not UTF-8 valid, and then if error is not NULL, it is set
* with first non valid UTF-8 char in string
@@ -167,7 +167,7 @@ invalid:
}
/*
* Normalizes an string: removes non UTF-8 chars and replaces them by a
* Normalize an string: removes non UTF-8 chars and replaces them by a
* "replacement" char.
*/
@@ -186,9 +186,9 @@ utf8_normalize (char *string, char replacement)
}
/*
* Gets pointer to previous UTF-8 char in a string.
* Get pointer to previous UTF-8 char in a string.
*
* Returns pointer to previous UTF-8 char, NULL if not found (for example
* Return pointer to previous UTF-8 char, NULL if not found (for example
* "string_start" was reached).
*/
@@ -234,9 +234,9 @@ utf8_prev_char (const char *string_start, const char *string)
}
/*
* Gets pointer to next UTF-8 char in a string.
* Get pointer to next UTF-8 char in a string.
*
* Returns pointer to next UTF-8 char, NULL if string was NULL.
* Return pointer to next UTF-8 char, NULL if string was NULL.
*/
const char *
@@ -277,9 +277,9 @@ utf8_next_char (const char *string)
}
/*
* Gets pointer to the beginning of the UTF-8 line in a string.
* Get pointer to the beginning of the UTF-8 line in a string.
*
* Returns pointer to the beginning of the UTF-8 line, NULL if string was NULL.
* Return pointer to the beginning of the UTF-8 line, NULL if string was NULL.
*/
const char *
@@ -300,9 +300,9 @@ utf8_beginning_of_line (const char *string_start, const char *string)
}
/*
* Gets pointer to the end of the UTF-8 line in a string.
* Get pointer to the end of the UTF-8 line in a string.
*
* Returns pointer to the end of the UTF-8 line, NULL if string was NULL.
* Return pointer to the end of the UTF-8 line, NULL if string was NULL.
*/
const char *
@@ -320,9 +320,9 @@ utf8_end_of_line (const char *string)
}
/*
* Gets UTF-8 char as an integer.
* Get UTF-8 char as an integer.
*
* Returns the UTF-8 char as integer number.
* Return the UTF-8 char as integer number.
*/
int
@@ -377,7 +377,7 @@ utf8_char_int (const char *string)
}
/*
* Converts a unicode char (as unsigned integer) to a string.
* Convert a unicode char (as unsigned integer) to a string.
*
* The string must have a size >= 5
* (4 bytes for the UTF-8 char + the final '\0').
@@ -385,7 +385,7 @@ utf8_char_int (const char *string)
* In case of error (if unicode value is > 0x1FFFFF), the string is set to an
* empty string (string[0] == '\0').
*
* Returns the number of bytes in the UTF-8 char (not counting the final '\0').
* Return the number of bytes in the UTF-8 char (not counting the final '\0').
*/
int
@@ -443,9 +443,9 @@ utf8_int_string (unsigned int unicode_value, char *string)
}
/*
* Gets size of UTF-8 char (in bytes).
* Get size of UTF-8 char (in bytes).
*
* Returns an integer between 0 and 4.
* Return an integer between 0 and 4.
*/
int
@@ -464,10 +464,10 @@ utf8_char_size (const char *string)
}
/*
* Gets length of an UTF-8 string in number of chars (not bytes).
* Get length of an UTF-8 string in number of chars (not bytes).
* Result is <= strlen (string).
*
* Returns length of string (>= 0).
* Return length of string (>= 0).
*/
int
@@ -488,9 +488,9 @@ utf8_strlen (const char *string)
}
/*
* Gets length of an UTF-8 string for N bytes max in string.
* Get length of an UTF-8 string for N bytes max in string.
*
* Returns length of string (>= 0).
* Return length of string (>= 0).
*/
int
@@ -513,9 +513,9 @@ utf8_strnlen (const char *string, int bytes)
}
/*
* Gets number of chars needed on screen to display the UTF-8 char.
* Get number of chars needed on screen to display the UTF-8 char.
*
* Returns the number of chars (>= 0).
* Return the number of chars (>= 0).
*/
int
@@ -552,9 +552,9 @@ utf8_char_size_screen (const char *string)
}
/*
* Gets number of chars needed on screen to display the UTF-8 string.
* Get number of chars needed on screen to display the UTF-8 string.
*
* Returns the number of chars (>= 0).
* Return the number of chars (>= 0).
*/
int
@@ -584,9 +584,9 @@ utf8_strlen_screen (const char *string)
}
/*
* Moves forward N chars in an UTF-8 string.
* Move forward N chars in an UTF-8 string.
*
* Returns pointer to the new position in string.
* Return pointer to the new position in string.
*/
const char *
@@ -604,13 +604,13 @@ utf8_add_offset (const char *string, int offset)
}
/*
* Gets real position in UTF-8 string, in bytes.
* Get real position in UTF-8 string, in bytes.
*
* Argument "pos" is a number of chars (not bytes).
*
* Example: ("déca", 2) returns 3.
* Example: ("déca", 2) return 3.
*
* Returns the real position (>= 0).
* Return the real position (>= 0).
*/
int
@@ -635,13 +635,13 @@ utf8_real_pos (const char *string, int pos)
}
/*
* Gets position in UTF-8 string, in chars.
* Get position in UTF-8 string, in chars.
*
* Argument "real_pos" is a number of bytes (not chars).
*
* Example: ("déca", 3) returns 2.
* Example: ("déca", 3) return 2.
*
* Returns the position in string.
* Return the position in string.
*/
int
@@ -664,7 +664,7 @@ utf8_pos (const char *string, int real_pos)
}
/*
* Duplicates an UTF-8 string, with max N chars.
* Duplicate an UTF-8 string, with max N chars.
*
* Note: result must be freed after use.
*/
@@ -688,7 +688,7 @@ utf8_strndup (const char *string, int length)
}
/*
* Copies max N chars from a string to another and adds null byte at the end.
* Copy max N chars from a string to another and adds null byte at the end.
*
* Note: the target string "dest" must be long enough.
*/
+21 -21
View File
@@ -50,12 +50,12 @@
/*
* Parses an integer.
* Parse an integer.
*
* If result is not NULL, *result is set with the parsed integer in case
* there is no error.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -88,12 +88,12 @@ util_parse_int (const char *string, int base, int *result)
}
/*
* Parses a long integer.
* Parse a long integer.
*
* If result is not NULL, *result is set with the parsed long integer in case
* there is no error.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -125,12 +125,12 @@ util_parse_long (const char *string, int base, long *result)
}
/*
* Parses a long long integer.
* Parse a long long integer.
*
* If result is not NULL, *result is set with the parsed long integer in case
* there is no error.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -162,9 +162,9 @@ util_parse_longlong (const char *string, int base, long long *result)
}
/*
* Compares two timeval structures.
* Compare two timeval structures.
*
* Returns:
* Return:
* -1: tv1 < tv2
* 0: tv1 == tv2
* 1: tv1 > tv2
@@ -188,9 +188,9 @@ util_timeval_cmp (struct timeval *tv1, struct timeval *tv2)
}
/*
* Calculates difference between two timeval structures.
* Calculate difference between two timeval structures.
*
* Returns difference in microseconds.
* Return difference in microseconds.
*/
long long
@@ -208,7 +208,7 @@ util_timeval_diff (struct timeval *tv1, struct timeval *tv2)
}
/*
* Adds interval (in microseconds) to a timeval structure.
* Add interval (in microseconds) to a timeval structure.
*/
void
@@ -231,7 +231,7 @@ util_timeval_add (struct timeval *tv, long long interval)
}
/*
* Converts microseconds to a string, using format: "H:MM:SS.mmmmmm"
* Convert microseconds to a string, using format: "H:MM:SS.mmmmmm"
* where: H=hours, MM=minutes, SS=seconds, mmmmmm=microseconds
*
* Note: result must be freed after use.
@@ -256,7 +256,7 @@ util_get_microseconds_string (unsigned long long microseconds)
}
/*
* Converts date to a string, using format of option "weechat.look.time_format"
* Convert date to a string, using format of option "weechat.look.time_format"
* (can be localized).
*/
@@ -279,7 +279,7 @@ util_get_time_string (const time_t *date)
}
/*
* Formats date and time like strftime (but with timeval structure as input)
* Format date and time like strftime (but with timeval structure as input)
* and adds extra specifiers:
* - "%@": return the date expressed in Coordinated Universal Time (UTC)
* instead of date relative to the user's specified timezone
@@ -383,7 +383,7 @@ util_strftimeval (char *string, int max, const char *format, struct timeval *tv)
}
/*
* Parses a date/time string, which can be one of these formats:
* Parse a date/time string, which can be one of these formats:
*
* Format | Example
* -------------------------------------+----------------------------------
@@ -399,7 +399,7 @@ util_strftimeval (char *string, int max, const char *format, struct timeval *tv)
* UTC time | 19:04:55.123456Z
* Timestamp date | 1756580695.123456
*
* Notes :
* Notes:
*
* - For ISO 8601, characters `T' and `Z` can be used in lower case: `t` and `z`.
* - The timezone offset format is `[+/-]hh:mm`, `[+/-]hhmm` or `[+/-]hh`.
@@ -408,7 +408,7 @@ util_strftimeval (char *string, int max, const char *format, struct timeval *tv)
* A dot (`.`) or comma (`,`) can be used to separate seconds from the other
* digits.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -676,7 +676,7 @@ util_parse_time (const char *datetime, struct timeval *tv)
}
/*
* Returns difference between two times.
* Return difference between two times.
*
* The following variables are set, if pointer is not NULL:
* - number of total seconds between the two times (basic subtraction)
@@ -705,7 +705,7 @@ util_get_time_diff (time_t time1, time_t time2,
}
/*
* Parses a string with a delay and optional unit, returns the delay in
* Parse a string with a delay and optional unit, return the delay in
* microseconds.
*
* The delay is a number followed by a unit which can be:
@@ -722,7 +722,7 @@ util_get_time_diff (time_t time1, time_t time2,
* - 60000000: minutes
* - 3600000000: hours
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -794,7 +794,7 @@ util_parse_delay (const char *string_delay, unsigned long long default_factor,
}
/*
* Gets version number (integer) with a version as string.
* Get version number (integer) with a version as string.
*
* Non-digit chars like "-dev" are ignored.
*
+8 -8
View File
@@ -30,7 +30,7 @@
/*
* Returns package name ("weechat").
* Return package name ("weechat").
*/
const char *
@@ -40,7 +40,7 @@ version_get_name (void)
}
/*
* Returns the WeeChat version.
* Return the WeeChat version.
*
* Examples:
* 0.3.9-dev
@@ -55,7 +55,7 @@ version_get_version (void)
}
/*
* Returns the package name ("weechat") + WeeChat version.
* Return the package name ("weechat") + WeeChat version.
*
* Examples:
* weechat 0.3.9-dev
@@ -70,7 +70,7 @@ version_get_name_version (void)
}
/*
* Returns the output of "git describe" (non-empty only for a devel version,
* Return the output of "git describe" (non-empty only for a devel version,
* if compilation was made using the git repository, if git command was found).
*
* Example:
@@ -84,7 +84,7 @@ version_get_git (void)
}
/*
* Returns the WeeChat version + the git version (between brackets, and only if
* Return the WeeChat version + the git version (between brackets, and only if
* it is not empty).
*
* Examples:
@@ -112,7 +112,7 @@ version_get_version_with_git (void)
}
/*
* Returns date of WeeChat compilation.
* Return date of WeeChat compilation.
*
* Example:
* Dec 16 2012
@@ -125,7 +125,7 @@ version_get_compilation_date (void)
}
/*
* Returns time of WeeChat compilation.
* Return time of WeeChat compilation.
*
* Example:
* 18:10:22
@@ -138,7 +138,7 @@ version_get_compilation_time (void)
}
/*
* Returns date/time of WeeChat compilation.
* Return date/time of WeeChat compilation.
*
* Example:
* Dec 16 2012 18:10:22
+9 -9
View File
@@ -39,7 +39,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -51,9 +51,9 @@ hook_command_run_get_description (struct t_hook *hook)
}
/*
* Hooks a command when it's run by WeeChat.
* Hook a command when it's run by WeeChat.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -98,7 +98,7 @@ hook_command_run (struct t_weechat_plugin *plugin,
}
/*
* Executes a command_run hook.
* Execute a command_run hook.
*/
int
@@ -185,7 +185,7 @@ hook_command_run_exec (struct t_gui_buffer *buffer, const char *command)
}
/*
* Frees data in a command_run hook.
* Free data in a command_run hook.
*/
void
@@ -205,7 +205,7 @@ hook_command_run_free_data (struct t_hook *hook)
}
/*
* Returns hdata for command_run hook.
* Return hdata for command_run hook.
*/
struct t_hdata *
@@ -229,9 +229,9 @@ hook_command_run_hdata_hook_command_run_cb (const void *pointer, void *data,
}
/*
* Adds command_run hook data in the infolist item.
* Add command_run hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -254,7 +254,7 @@ hook_command_run_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints command_run hook data in WeeChat log file (usually for crash dump).
* Print command_run hook data in WeeChat log file (usually for crash dump).
*/
void
+22 -22
View File
@@ -44,7 +44,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -56,9 +56,9 @@ hook_command_get_description (struct t_hook *hook)
}
/*
* Searches for a command hook in list.
* Search for a command hook in list.
*
* Returns pointer to hook found, NULL if not found.
* Return pointer to hook found, NULL if not found.
*/
struct t_hook *
@@ -83,7 +83,7 @@ hook_command_search (struct t_weechat_plugin *plugin, const char *command)
}
/*
* Builds variables/arrays that will be used for completion of commands
* Build variables/arrays that will be used for completion of commands
* arguments.
*/
@@ -273,7 +273,7 @@ hook_command_build_completion (struct t_hook_command *hook_command)
}
/*
* Removes all raw markers from a string: converts "raw[xxx]" to "xxx".
* Remove all raw markers from a string: converts "raw[xxx]" to "xxx".
*
* Note: result must be freed after use.
*/
@@ -318,7 +318,7 @@ hook_command_remove_raw_markers (const char *string)
}
/*
* Frees an argument description.
* Free an argument description.
*/
void
@@ -333,7 +333,7 @@ hook_command_arraylist_arg_desc_free (void *data, struct t_arraylist *arraylist,
}
/*
* Formats and translates arguments description of a command.
* Format and translates arguments description of a command.
*
* Note: result must be freed after use.
*/
@@ -500,9 +500,9 @@ error:
}
/*
* Hooks a command.
* Hook a command.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -576,9 +576,9 @@ hook_command (struct t_weechat_plugin *plugin, const char *command,
}
/*
* Executes a command hook.
* Execute a command hook.
*
* Returns:
* Return:
* HOOK_COMMAND_EXEC_OK: command executed successfully
* HOOK_COMMAND_EXEC_ERROR: command executed and failed
* HOOK_COMMAND_EXEC_NOT_FOUND: command not found
@@ -768,12 +768,12 @@ end:
}
/*
* Gets relevance for cmd2 (existing command) compared to cmd1 (non-existing
* Get relevance for cmd2 (existing command) compared to cmd1 (non-existing
* command).
*
* Both commands are in lower case.
*
* Returns a number based on the Levenshtein distance between two commands,
* Return a number based on the Levenshtein distance between two commands,
* lower is better.
*/
@@ -812,7 +812,7 @@ hook_command_similar_get_relevance (const char *cmd1, int length_cmd1,
}
/*
* Compares similar commands to sort them by relevance (lower number first:
* Compare similar commands to sort them by relevance (lower number first:
* best relevance).
*/
@@ -839,7 +839,7 @@ hook_command_similar_cmp_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Frees a similar command.
* Free a similar command.
*/
void
@@ -854,7 +854,7 @@ hook_command_similar_free_cb (void *data, struct t_arraylist *arraylist,
}
/*
* Builds an arraylist with similar commands.
* Build an arraylist with similar commands.
*
* Note: result must be freed after use.
*/
@@ -906,7 +906,7 @@ hook_command_build_list_similar_commands (const char *command)
}
/*
* Displays an error on unknown command, with a list of existing similar
* Display an error on unknown command, with a list of existing similar
* command names.
*/
@@ -971,7 +971,7 @@ hook_command_display_error_unknown (const char *command)
}
/*
* Frees data in a command hook.
* Free data in a command hook.
*/
void
@@ -1049,7 +1049,7 @@ hook_command_free_data (struct t_hook *hook)
}
/*
* Returns hdata for command hook.
* Return hdata for command hook.
*/
struct t_hdata *
@@ -1084,9 +1084,9 @@ hook_command_hdata_hook_command_cb (const void *pointer, void *data,
}
/*
* Adds command hook data in the infolist item.
* Add command hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1141,7 +1141,7 @@ hook_command_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints command hook data in WeeChat log file (usually for crash dump).
* Print command hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -39,7 +39,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -51,9 +51,9 @@ hook_completion_get_description (struct t_hook *hook)
}
/*
* Hooks a completion.
* Hook a completion.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -101,7 +101,7 @@ hook_completion (struct t_weechat_plugin *plugin, const char *completion_item,
}
/*
* Executes a completion hook.
* Execute a completion hook.
*/
void
@@ -158,7 +158,7 @@ hook_completion_exec (struct t_weechat_plugin *plugin,
}
/*
* Frees data in a completion hook.
* Free data in a completion hook.
*/
void
@@ -183,7 +183,7 @@ hook_completion_free_data (struct t_hook *hook)
}
/*
* Returns hdata for completion hook.
* Return hdata for completion hook.
*/
struct t_hdata *
@@ -207,9 +207,9 @@ hook_completion_hdata_hook_completion_cb (const void *pointer, void *data,
}
/*
* Adds completion hook data in the infolist item.
* Add completion hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -237,7 +237,7 @@ hook_completion_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints completion hook data in WeeChat log file (usually for crash dump).
* Print completion hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -50,9 +50,9 @@ hook_config_get_description (struct t_hook *hook)
}
/*
* Hooks a configuration option.
* Hook a configuration option.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -95,7 +95,7 @@ hook_config (struct t_weechat_plugin *plugin, const char *option,
}
/*
* Executes a config hook.
* Execute a config hook.
*/
void
@@ -132,7 +132,7 @@ hook_config_exec (const char *option, const char *value)
}
/*
* Frees data in a config hook.
* Free data in a config hook.
*/
void
@@ -152,7 +152,7 @@ hook_config_free_data (struct t_hook *hook)
}
/*
* Returns hdata for config hook.
* Return hdata for config hook.
*/
struct t_hdata *
@@ -175,9 +175,9 @@ hook_config_hdata_hook_config_cb (const void *pointer, void *data,
}
/*
* Adds config hook data in the infolist item.
* Add config hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -198,7 +198,7 @@ hook_config_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints config hook data in WeeChat log file (usually for crash dump).
* Print config hook data in WeeChat log file (usually for crash dump).
*/
void
+10 -10
View File
@@ -42,7 +42,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -63,9 +63,9 @@ hook_connect_get_description (struct t_hook *hook)
}
/*
* Hooks a connection to a peer (using fork).
* Hook a connection to a peer (using fork).
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -140,7 +140,7 @@ hook_connect (struct t_weechat_plugin *plugin, const char *proxy,
}
/*
* Verifies certificates.
* Verify certificates.
*/
int
@@ -173,7 +173,7 @@ hook_connect_gnutls_verify_certificates (gnutls_session_t tls_session)
}
/*
* Sets certificates.
* Set certificates.
*/
int
@@ -210,7 +210,7 @@ hook_connect_gnutls_set_certificates (gnutls_session_t tls_session,
}
/*
* Frees data in a connect hook.
* Free data in a connect hook.
*/
void
@@ -314,7 +314,7 @@ hook_connect_free_data (struct t_hook *hook)
}
/*
* Returns hdata for connect hook.
* Return hdata for connect hook.
*/
struct t_hdata *
@@ -360,9 +360,9 @@ hook_connect_hdata_hook_connect_cb (const void *pointer, void *data,
}
/*
* Adds connect hook data in the infolist item.
* Add connect hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -421,7 +421,7 @@ hook_connect_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints connect hook data in WeeChat log file (usually for crash dump).
* Print connect hook data in WeeChat log file (usually for crash dump).
*/
void
+14 -14
View File
@@ -45,7 +45,7 @@ int hook_fd_pollfd_count = 0; /* number of file descriptors */
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -67,9 +67,9 @@ hook_fd_get_description (struct t_hook *hook)
}
/*
* Searches for a fd hook in list.
* Search for a fd hook in list.
*
* Returns pointer to hook found, NULL if not found.
* Return pointer to hook found, NULL if not found.
*/
struct t_hook *
@@ -89,7 +89,7 @@ hook_fd_search (int fd)
}
/*
* Reallocates the "struct pollfd" array for poll().
* Reallocate the "struct pollfd" array for poll().
*/
void
@@ -150,9 +150,9 @@ hook_fd_remove_cb (struct t_hook *hook)
}
/*
* Hooks a fd event.
* Hook a fd event.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -199,9 +199,9 @@ hook_fd (struct t_weechat_plugin *plugin, int fd, int flag_read,
}
/*
* Executes fd hooks:
* - poll() on fie descriptors
* - call of hook fd callbacks if needed.
* Execute fd hooks:
* - poll() on fie descriptors
* - call of hook fd callbacks if needed.
*/
void
@@ -300,7 +300,7 @@ hook_fd_exec (void)
}
/*
* Frees data in a fd hook.
* Free data in a fd hook.
*/
void
@@ -314,7 +314,7 @@ hook_fd_free_data (struct t_hook *hook)
}
/*
* Returns hdata for fd hook.
* Return hdata for fd hook.
*/
struct t_hdata *
@@ -338,9 +338,9 @@ hook_fd_hdata_hook_fd_cb (const void *pointer, void *data, const char *hdata_nam
}
/*
* Adds fd hook data in the infolist item.
* Add fd hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -365,7 +365,7 @@ hook_fd_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints fd hook data in WeeChat log file (usually for crash dump).
* Print fd hook data in WeeChat log file (usually for crash dump).
*/
void
+11 -11
View File
@@ -39,7 +39,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -51,9 +51,9 @@ hook_focus_get_description (struct t_hook *hook)
}
/*
* Hooks a focus.
* Hook a focus.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -96,7 +96,7 @@ hook_focus (struct t_weechat_plugin *plugin,
}
/*
* Adds keys of a hashtable into another.
* Add keys of a hashtable into another.
*/
void
@@ -116,7 +116,7 @@ hook_focus_hashtable_map_cb (void *data,
}
/*
* Adds keys of a hashtable into another (adding suffix "2" to keys).
* Add keys of a hashtable into another (adding suffix "2" to keys).
*/
void
@@ -143,7 +143,7 @@ hook_focus_hashtable_map2_cb (void *data,
}
/*
* Gets data for focus on (x,y) on screen.
* Get data for focus on (x,y) on screen.
*
* Argument hashtable_focus2 is not NULL only for a mouse gesture (it's for
* point where mouse button has been released).
@@ -276,7 +276,7 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1,
}
/*
* Frees data in a focus hook.
* Free data in a focus hook.
*/
void
@@ -296,7 +296,7 @@ hook_focus_free_data (struct t_hook *hook)
}
/*
* Returns hdata for focus hook.
* Return hdata for focus hook.
*/
struct t_hdata *
@@ -319,9 +319,9 @@ hook_focus_hdata_hook_focus_cb (const void *pointer, void *data,
}
/*
* Adds focus hook data in the infolist item.
* Add focus hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -342,7 +342,7 @@ hook_focus_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints focus hook data in WeeChat log file (usually for crash dump).
* Print focus hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -39,7 +39,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -51,9 +51,9 @@ hook_hdata_get_description (struct t_hook *hook)
}
/*
* Hooks a hdata.
* Hook a hdata.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -98,7 +98,7 @@ hook_hdata (struct t_weechat_plugin *plugin, const char *hdata_name,
}
/*
* Gets hdata via hdata hook.
* Get hdata via hdata hook.
*/
struct t_hdata *
@@ -153,7 +153,7 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
}
/*
* Frees data in a hdata hook.
* Free data in a hdata hook.
*/
void
@@ -178,7 +178,7 @@ hook_hdata_free_data (struct t_hook *hook)
}
/*
* Returns hdata for hdata hook.
* Return hdata for hdata hook.
*/
struct t_hdata *
@@ -202,9 +202,9 @@ hook_hdata_hdata_hook_hdata_cb (const void *pointer, void *data,
}
/*
* Adds hdata hook data in the infolist item.
* Add hdata hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -232,7 +232,7 @@ hook_hdata_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints hdata hook data in WeeChat log file (usually for crash dump).
* Print hdata hook data in WeeChat log file (usually for crash dump).
*/
void
+11 -11
View File
@@ -39,7 +39,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -52,9 +52,9 @@ hook_hsignal_get_description (struct t_hook *hook)
}
/*
* Hooks a hsignal (signal with hashtable).
* Hook a hsignal (signal with hashtable).
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -103,10 +103,10 @@ hook_hsignal (struct t_weechat_plugin *plugin, const char *signal,
}
/*
* Checks if a hooked hsignal matches a signal sent: it matches if at least
* Check if a hooked hsignal matches a signal sent: it matches if at least
* one of the signal masks are matching the signal sent.
*
* Returns:
* Return:
* 1: hook matches signal sent
* 0: hook does not match signal sent
*/
@@ -126,7 +126,7 @@ hook_hsignal_match (const char *signal, struct t_hook *hook)
}
/*
* Sends a hsignal (signal with hashtable).
* Send a hsignal (signal with hashtable).
*/
int
@@ -185,7 +185,7 @@ hook_hsignal_send (const char *signal, struct t_hashtable *hashtable)
}
/*
* Frees data in a hsignal hook.
* Free data in a hsignal hook.
*/
void
@@ -206,7 +206,7 @@ hook_hsignal_free_data (struct t_hook *hook)
}
/*
* Returns hdata for hsignal hook.
* Return hdata for hsignal hook.
*/
struct t_hdata *
@@ -230,9 +230,9 @@ hook_hsignal_hdata_hook_hsignal_cb (const void *pointer, void *data,
}
/*
* Adds hsignal hook data in the infolist item.
* Add hsignal hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -264,7 +264,7 @@ hook_hsignal_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints hsignal hook data in WeeChat log file (usually for crash dump).
* Print hsignal hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -50,9 +50,9 @@ hook_info_hashtable_get_description (struct t_hook *hook)
}
/*
* Hooks an info using hashtable.
* Hook an info using hashtable.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -102,7 +102,7 @@ hook_info_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
}
/*
* Gets info (as hashtable) via info hook.
* Get info (as hashtable) via info hook.
*/
struct t_hashtable *
@@ -152,7 +152,7 @@ hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
}
/*
* Frees data in an info_hashtable hook.
* Free data in an info_hashtable hook.
*/
void
@@ -187,7 +187,7 @@ hook_info_hashtable_free_data (struct t_hook *hook)
}
/*
* Returns hdata for info_hashtable hook.
* Return hdata for info_hashtable hook.
*/
struct t_hdata *
@@ -214,9 +214,9 @@ hook_info_hashtable_hdata_hook_info_hashtable_cb (const void *pointer,
}
/*
* Adds info_hashtable hook data in the infolist item.
* Add info_hashtable hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -258,7 +258,7 @@ hook_info_hashtable_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints info_hashtable hook data in WeeChat log file (usually for crash dump).
* Print info_hashtable hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -50,9 +50,9 @@ hook_info_get_description (struct t_hook *hook)
}
/*
* Hooks an info.
* Hook an info.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -99,7 +99,7 @@ hook_info (struct t_weechat_plugin *plugin, const char *info_name,
}
/*
* Gets info (as string) via info hook.
* Get info (as string) via info hook.
*
* Note: result must be freed after use.
*/
@@ -151,7 +151,7 @@ hook_info_get (struct t_weechat_plugin *plugin, const char *info_name,
}
/*
* Frees data in an info hook.
* Free data in an info hook.
*/
void
@@ -181,7 +181,7 @@ hook_info_free_data (struct t_hook *hook)
}
/*
* Returns hdata for info hook.
* Return hdata for info hook.
*/
struct t_hdata *
@@ -206,9 +206,9 @@ hook_info_hdata_hook_info_cb (const void *pointer, void *data,
}
/*
* Adds info hook data in the infolist item.
* Add info hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -243,7 +243,7 @@ hook_info_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints info hook data in WeeChat log file (usually for crash dump).
* Print info hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -50,9 +50,9 @@ hook_infolist_get_description (struct t_hook *hook)
}
/*
* Hooks an infolist.
* Hook an infolist.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -102,7 +102,7 @@ hook_infolist (struct t_weechat_plugin *plugin, const char *infolist_name,
}
/*
* Gets an infolist via infolist hook.
* Get an infolist via infolist hook.
*/
struct t_infolist *
@@ -153,7 +153,7 @@ hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name,
}
/*
* Frees data in an infolist hook.
* Free data in an infolist hook.
*/
void
@@ -188,7 +188,7 @@ hook_infolist_free_data (struct t_hook *hook)
}
/*
* Returns hdata for infolist hook.
* Return hdata for infolist hook.
*/
struct t_hdata *
@@ -214,9 +214,9 @@ hook_infolist_hdata_hook_infolist_cb (const void *pointer, void *data,
}
/*
* Adds infolist hook data in the infolist item.
* Add infolist hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -258,7 +258,7 @@ hook_infolist_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints infolist hook data in WeeChat log file (usually for crash dump).
* Print infolist hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -41,7 +41,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -61,9 +61,9 @@ hook_line_get_description (struct t_hook *hook)
}
/*
* Hooks a line added in a buffer.
* Hook a line added in a buffer.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -121,7 +121,7 @@ hook_line (struct t_weechat_plugin *plugin, const char *buffer_type,
}
/*
* Executes a line hook and updates the line data.
* Execute a line hook and updates the line data.
*/
void
@@ -212,7 +212,7 @@ hook_line_exec (struct t_gui_line *line)
}
/*
* Frees data in a line hook.
* Free data in a line hook.
*/
void
@@ -237,7 +237,7 @@ hook_line_free_data (struct t_hook *hook)
}
/*
* Returns hdata for line hook.
* Return hdata for line hook.
*/
struct t_hdata *
@@ -264,9 +264,9 @@ hook_line_hdata_hook_line_cb (const void *pointer, void *data,
}
/*
* Adds line hook data in the infolist item.
* Add line hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -295,7 +295,7 @@ hook_line_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints line hook data in WeeChat log file (usually for crash dump).
* Print line hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -50,9 +50,9 @@ hook_modifier_get_description (struct t_hook *hook)
}
/*
* Hooks a modifier.
* Hook a modifier.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -94,7 +94,7 @@ hook_modifier (struct t_weechat_plugin *plugin, const char *modifier,
}
/*
* Executes a modifier hook.
* Execute a modifier hook.
*
* Note: result must be freed after use.
*/
@@ -164,7 +164,7 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier,
}
/*
* Frees data in a modifier hook.
* Free data in a modifier hook.
*/
void
@@ -184,7 +184,7 @@ hook_modifier_free_data (struct t_hook *hook)
}
/*
* Returns hdata for modifier hook.
* Return hdata for modifier hook.
*/
struct t_hdata *
@@ -207,9 +207,9 @@ hook_modifier_hdata_hook_modifier_cb (const void *pointer, void *data,
}
/*
* Adds modifier hook data in the infolist item.
* Add modifier hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -230,7 +230,7 @@ hook_modifier_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints modifier hook data in WeeChat log file (usually for crash dump).
* Print modifier hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -41,7 +41,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -73,9 +73,9 @@ hook_print_get_description (struct t_hook *hook)
}
/*
* Hooks a message printed by WeeChat.
* Hook a message printed by WeeChat.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -118,7 +118,7 @@ hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer,
}
/*
* Executes a print hook.
* Execute a print hook.
*/
void
@@ -190,7 +190,7 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
/*
* Frees data in a print hook.
* Free data in a print hook.
*/
void
@@ -215,7 +215,7 @@ hook_print_free_data (struct t_hook *hook)
}
/*
* Returns hdata for print hook.
* Return hdata for print hook.
*/
struct t_hdata *
@@ -242,9 +242,9 @@ hook_print_hdata_hook_print_cb (const void *pointer, void *data,
}
/*
* Adds print hook data in the infolist item.
* Add print hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -273,7 +273,7 @@ hook_print_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints print hook data in WeeChat log file (usually for crash dump).
* Print print hook data in WeeChat log file (usually for crash dump).
*/
void
+20 -21
View File
@@ -53,7 +53,7 @@ void hook_process_run (struct t_hook *hook_process);
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -72,9 +72,9 @@ hook_process_get_description (struct t_hook *hook)
}
/*
* Hooks a process (using fork) with options in hashtable.
* Hook a process (using fork) with options in hashtable.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -188,9 +188,9 @@ error:
}
/*
* Hooks a process (using fork).
* Hook a process (using fork).
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -206,7 +206,7 @@ hook_process (struct t_weechat_plugin *plugin,
}
/*
* Child process for hook process: executes command and returns string result
* Child process for hook process: execute command and return string result
* into pipe for WeeChat process.
*/
@@ -379,7 +379,7 @@ hook_process_child (struct t_hook *hook_process)
}
/*
* Sends buffers (stdout/stderr) to callback.
* Send buffers (stdout/stderr) to callback.
*/
void
@@ -412,7 +412,7 @@ hook_process_send_buffers (struct t_hook *hook_process, int callback_rc)
}
/*
* Adds some data to buffer (stdout or stderr).
* Add some data to buffer (stdout or stderr).
*/
void
@@ -429,7 +429,7 @@ hook_process_add_to_buffer (struct t_hook *hook_process, int index_buffer,
}
/*
* Reads process output (stdout or stderr) from child process.
* Read process output (stdout or stderr) from child process.
*/
void
@@ -462,7 +462,7 @@ hook_process_child_read (struct t_hook *hook_process, int fd,
}
/*
* Reads process output (stdout) from child process.
* Read process output (stdout) from child process.
*/
int
@@ -481,7 +481,7 @@ hook_process_child_read_stdout_cb (const void *pointer, void *data, int fd)
}
/*
* Reads process output (stderr) from child process.
* Read process output (stderr) from child process.
*/
int
@@ -500,7 +500,7 @@ hook_process_child_read_stderr_cb (const void *pointer, void *data, int fd)
}
/*
* Reads process output from child process until EOF
* Read process output from child process until EOF
* (called when the child process has ended).
*/
@@ -576,7 +576,7 @@ hook_process_child_read_until_eof (struct t_hook *hook_process)
}
/*
* Checks if child process is still alive.
* Check if child process is still alive.
*/
int
@@ -635,8 +635,7 @@ hook_process_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Executes process command in child, and read data in current process,
* with fd hook.
* Execute process command in child, and read data in current process, with fd hook.
*/
void
@@ -788,7 +787,7 @@ error:
}
/*
* Executes all process commands pending.
* Execute all process commands pending.
*/
void
@@ -822,7 +821,7 @@ hook_process_exec (void)
}
/*
* Frees data in a process hook.
* Free data in a process hook.
*/
void
@@ -918,7 +917,7 @@ hook_process_free_data (struct t_hook *hook)
}
/*
* Returns hdata for process hook.
* Return hdata for process hook.
*/
struct t_hdata *
@@ -952,9 +951,9 @@ hook_process_hdata_hook_process_cb (const void *pointer, void *data,
}
/*
* Adds process hook data in the infolist item.
* Add process hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1003,7 +1002,7 @@ hook_process_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints process hook data in WeeChat log file (usually for crash dump).
* Print process hook data in WeeChat log file (usually for crash dump).
*/
void
+12 -12
View File
@@ -38,7 +38,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -51,9 +51,9 @@ hook_signal_get_description (struct t_hook *hook)
}
/*
* Hooks a signal.
* Hook a signal.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -102,10 +102,10 @@ hook_signal (struct t_weechat_plugin *plugin, const char *signal,
}
/*
* Checks if a hooked signal matches a signal sent: it matches if at least
* Check if a hooked signal matches a signal sent: it matches if at least
* one of the signal masks are matching the signal sent.
*
* Returns:
* Return:
* 1: hook matches signal sent
* 0: hook does not match signal sent
*/
@@ -125,7 +125,7 @@ hook_signal_match (const char *signal, struct t_hook *hook)
}
/*
* Extracts flags from signal and returns flags and pointer to start of signal.
* Extract flags from signal and return flags and pointer to start of signal.
*/
void
@@ -176,7 +176,7 @@ hook_signal_extract_flags (const char *signal, const char **ptr_signal,
}
/*
* Sends a signal.
* Send a signal.
*/
int
@@ -236,7 +236,7 @@ hook_signal_send (const char *signal, const char *type_data, void *signal_data)
}
/*
* Frees data in a signal hook.
* Free data in a signal hook.
*/
void
@@ -257,7 +257,7 @@ hook_signal_free_data (struct t_hook *hook)
}
/*
* Returns hdata for signal hook.
* Return hdata for signal hook.
*/
struct t_hdata *
@@ -281,9 +281,9 @@ hook_signal_hdata_hook_signal_cb (const void *pointer, void *data,
}
/*
* Adds signal hook data in the infolist item.
* Add signal hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -315,7 +315,7 @@ hook_signal_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints signal hook data in WeeChat log file (usually for crash dump).
* Print signal hook data in WeeChat log file (usually for crash dump).
*/
void
+13 -13
View File
@@ -43,7 +43,7 @@ time_t hook_last_system_time = 0; /* used to detect system clock skew */
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -80,7 +80,7 @@ hook_timer_get_description (struct t_hook *hook)
}
/*
* Initializes a timer hook.
* Initialize a timer hook.
*/
void
@@ -136,9 +136,9 @@ hook_timer_init (struct t_hook *hook)
}
/*
* Hooks a timer.
* Hook a timer.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -180,8 +180,8 @@ hook_timer (struct t_weechat_plugin *plugin, long interval, int align_second,
}
/*
* Checks if system clock is older than previous call to this function (that
* means new time is lower than in past). If yes, adjusts all timers to current
* Check if system clock is older than previous call to this function (that
* means new time is lower than in past). If yes, adjust all timers to current
* time.
*/
@@ -222,7 +222,7 @@ hook_timer_check_system_clock (void)
}
/*
* Returns time until next timeout (in milliseconds).
* Return time until next timeout (in milliseconds).
*/
int
@@ -300,7 +300,7 @@ end:
}
/*
* Executes timer hooks.
* Execute timer hooks.
*/
void
@@ -361,7 +361,7 @@ hook_timer_exec (void)
}
/*
* Frees data in a timer hook.
* Free data in a timer hook.
*/
void
@@ -375,7 +375,7 @@ hook_timer_free_data (struct t_hook *hook)
}
/*
* Returns hdata for timer hook.
* Return hdata for timer hook.
*/
struct t_hdata *
@@ -404,9 +404,9 @@ hook_timer_hdata_hook_timer_cb (const void *pointer, void *data,
}
/*
* Adds timer hook data in the infolist item.
* Add timer hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -442,7 +442,7 @@ hook_timer_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints timer hook data in WeeChat log file (usually for crash dump).
* Print timer hook data in WeeChat log file (usually for crash dump).
*/
void
+12 -12
View File
@@ -47,7 +47,7 @@
/*
* Returns description of hook.
* Return description of hook.
*
* Note: result must be freed after use.
*/
@@ -66,7 +66,7 @@ hook_url_get_description (struct t_hook *hook)
}
/*
* Displays keys and values of a hashtable.
* Display keys and values of a hashtable.
*/
void
@@ -83,7 +83,7 @@ hook_url_hashtable_map_cb (void *data, struct t_hashtable *hashtable,
}
/*
* Runs callback of url hook.
* Run callback of url hook.
*/
void
@@ -154,7 +154,7 @@ hook_url_transfer_thread (void *hook_pointer)
}
/*
* Checks if thread is still alive.
* Check if thread is still alive.
*/
int
@@ -218,7 +218,7 @@ hook_url_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Starts transfer for an URL hook.
* Start transfer for an URL hook.
*/
void
@@ -286,9 +286,9 @@ hook_url_transfer (struct t_hook *hook)
}
/*
* Hooks a URL.
* Hook a URL.
*
* Returns pointer to new hook, NULL if error.
* Return pointer to new hook, NULL if error.
*/
struct t_hook *
@@ -358,7 +358,7 @@ error:
}
/*
* Frees data in a url hook.
* Free data in a url hook.
*/
void
@@ -422,7 +422,7 @@ hook_url_free_data (struct t_hook *hook)
}
/*
* Returns hdata for url hook.
* Return hdata for url hook.
*/
struct t_hdata *
@@ -452,9 +452,9 @@ hook_url_hdata_hook_url_cb (const void *pointer, void *data,
}
/*
* Adds url hook data in the infolist item.
* Add url hook data in the infolist item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -489,7 +489,7 @@ hook_url_add_to_infolist (struct t_infolist_item *item,
}
/*
* Prints url hook data in WeeChat log file (usually for crash dump).
* Print url hook data in WeeChat log file (usually for crash dump).
*/
void
+9 -9
View File
@@ -133,7 +133,7 @@ int weechat_auto_load_scripts = 1; /* auto-load scripts */
/*
* Displays WeeChat startup message.
* Display WeeChat startup message.
*/
void
@@ -205,10 +205,10 @@ weechat_startup_message (void)
}
/*
* Displays warnings about $TERM if it is detected as wrong.
* Display warnings about $TERM if it is detected as wrong.
*
* If $TERM is different from "screen" or "screen-256color" and that $STY is
* set (GNU screen) or $TMUX is set (tmux), then a warning is displayed.
* set (GNU screen) or $TMUX is set (tmux), then display a warning.
*/
void
@@ -275,8 +275,8 @@ weechat_term_check (void)
}
/*
* Displays warning about wrong locale ($LANG and $LC_*) if they are detected
* as wrong.
* Display warning about wrong locale ($LANG and $LC_*) if they are detected as
* wrong.
*/
void
@@ -293,7 +293,7 @@ weechat_locale_check (void)
}
/*
* Shutdowns WeeChat.
* Shut down WeeChat.
*/
void
@@ -332,7 +332,7 @@ weechat_shutdown (int return_code, int crash)
}
/*
* Initializes gettext.
* Initialize gettext.
*/
void
@@ -354,7 +354,7 @@ weechat_init_gettext (void)
}
/*
* Initializes WeeChat.
* Initialize WeeChat.
*/
void
@@ -426,7 +426,7 @@ weechat_init (int argc, char *argv[], void (*gui_init_cb)(void))
}
/*
* Ends WeeChat.
* End WeeChat.
*/
void
+9 -9
View File
@@ -49,9 +49,9 @@
/*
* Initializes Curses windows for bar window.
* Initialize Curses windows for bar window.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -76,7 +76,7 @@ gui_bar_window_objects_init (struct t_gui_bar_window *bar_window)
}
/*
* Frees Curses windows for a bar window.
* Free Curses windows for a bar window.
*/
void
@@ -98,7 +98,7 @@ gui_bar_window_objects_free (struct t_gui_bar_window *bar_window)
}
/*
* Creates curses window for bar.
* Create curses window for bar.
*/
void
@@ -160,9 +160,9 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window)
}
/*
* Prints a string text on a bar window.
* Print a string text on a bar window.
*
* Returns:
* Return:
* 1: everything was printed
* 0: some text was not displayed (wrapped due to bar window width)
*/
@@ -427,7 +427,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
}
/*
* Expands spacers using the sizes computed, replacing them by 0 to N spaces.
* Expand spacers using the sizes computed, replacing them by 0 to N spaces.
*
* Note: result must be freed after use.
*/
@@ -532,7 +532,7 @@ gui_bar_window_expand_spacers (const char *string, int length_on_screen,
}
/*
* Draws a bar for a window.
* Draw a bar for a window.
*/
void
@@ -963,7 +963,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
}
/*
* Prints bar window infos in WeeChat log file (usually for crash dump).
* Print bar window infos in WeeChat log file (usually for crash dump).
*/
void
+28 -28
View File
@@ -52,9 +52,9 @@
/*
* Gets real width for chat.
* Get real width for chat.
*
* Returns width - 1 if nicklist is at right, for good copy/paste (without
* Return width - 1 if nicklist is at right, for good copy/paste (without
* nicklist separator).
*/
@@ -74,9 +74,9 @@ gui_chat_get_real_width (struct t_gui_window *window)
}
/*
* Checks if marker must be displayed after this line.
* Check if marker must be displayed after this line.
*
* Returns:
* Return:
* 1: marker must be displayed after this line
* 0: marker must not be displayed after this line
*/
@@ -119,7 +119,7 @@ gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
/*
* Resets style using color depending on window (active or not) and line (buffer
* Reset style using color depending on window (active or not) and line (buffer
* selected in merged buffer or not).
*/
@@ -158,7 +158,7 @@ gui_chat_reset_style (struct t_gui_window *window, struct t_gui_line *line,
}
/*
* Deletes all chars from the cursor to the end of the current line.
* Delete all chars from the cursor to the end of the current line.
*/
void
@@ -174,7 +174,7 @@ gui_chat_clrtoeol (struct t_gui_window *window)
}
/*
* Displays a new line.
* Display a new line.
*/
void
@@ -193,7 +193,7 @@ gui_chat_display_new_line (struct t_gui_window *window,
}
/*
* Displays an horizontal line (marker for data not read).
* Display an horizontal line (marker for data not read).
*/
void
@@ -229,7 +229,7 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
}
/*
* Returns next char of a word (for display), special chars like
* Return next char of a word (for display), special chars like
* colors/attributes are skipped and optionally applied.
*/
@@ -369,10 +369,10 @@ gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line,
}
/*
* Displays word on chat buffer, letter by letter, special chars like
* Display word on chat buffer, letter by letter, special chars like
* colors/attributes are interpreted.
*
* Returns number of chars displayed on screen.
* Return number of chars displayed on screen.
*/
int
@@ -496,9 +496,9 @@ gui_chat_display_word_raw (struct t_gui_window *window, struct t_gui_line *line,
}
/*
* Displays the prefix_suffix in the beginning of a line.
* Display the prefix_suffix in the beginning of a line.
*
* Returns number of chars displayed on screen.
* Return number of chars displayed on screen.
*/
int
@@ -574,9 +574,9 @@ gui_chat_display_prefix_suffix (struct t_gui_window *window,
}
/*
* Displays a word on chat buffer.
* Display a word on chat buffer.
*
* Returns number of chars displayed on screen.
* Return number of chars displayed on screen.
*/
int
@@ -702,7 +702,7 @@ gui_chat_display_word (struct t_gui_window *window,
}
/*
* Displays a message when the day has changed.
* Display a message when the day has changed.
*/
void
@@ -775,9 +775,9 @@ gui_chat_display_day_changed (struct t_gui_window *window,
}
/*
* Checks if time on line is the same as time on previous line.
* Check if time on line is the same as time on previous line.
*
* Returns:
* Return:
* 1: time is same as time on previous line
* 0: time is different from time on previous line
*/
@@ -802,7 +802,7 @@ gui_chat_line_time_is_same_as_previous (struct t_gui_line *line)
}
/*
* Displays time, buffer name (for merged buffers) and prefix for a line.
* Display time, buffer name (for merged buffers) and prefix for a line.
*/
void
@@ -1368,14 +1368,14 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window,
}
/*
* Displays a line in the chat window.
* Display a line in the chat window.
*
* If count == 0, display whole line.
* If count > 0, display 'count' lines (beginning from the end).
* If simulate == 1, nothing is displayed (for counting how many lines would
* have been displayed).
*
* Returns number of lines displayed (or simulated).
* Return number of lines displayed (or simulated).
*/
int
@@ -1737,7 +1737,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
}
/*
* Displays a line in the chat window (for a buffer with free content).
* Display a line in the chat window (for a buffer with free content).
*/
void
@@ -1803,7 +1803,7 @@ gui_chat_display_line_y (struct t_gui_window *window, struct t_gui_line *line,
}
/*
* Returns pointer to line & offset for a difference with given line.
* Return pointer to line & offset for a difference with given line.
*/
void
@@ -1915,7 +1915,7 @@ gui_chat_calculate_line_diff (struct t_gui_window *window,
}
/*
* Draws chat window for a formatted buffer.
* Draw chat window for a formatted buffer.
*/
void
@@ -2046,7 +2046,7 @@ gui_chat_draw_formatted_buffer (struct t_gui_window *window)
}
/*
* Draws chat window for a free buffer.
* Draw chat window for a free buffer.
*/
void
@@ -2093,7 +2093,7 @@ gui_chat_draw_free_buffer (struct t_gui_window *window, int clear_chat)
}
/*
* Gets line content in bare display.
* Get line content in bare display.
*
* Note: result must be freed after use.
*/
@@ -2150,7 +2150,7 @@ end:
}
/*
* Draws a buffer in bare display (not ncurses).
* Draw a buffer in bare display (not ncurses).
*/
void
@@ -2301,7 +2301,7 @@ gui_chat_draw_bare (struct t_gui_window *window)
}
/*
* Draws chat window for a buffer.
* Draw chat window for a buffer.
*/
void
+36 -37
View File
@@ -116,9 +116,9 @@ int gui_color_timer = 0; /* timer in seconds */
/*
* Searches for a color by name.
* Search for a color by name.
*
* Returns index of color in WeeChat colors table, -1 if not found.
* Return index of color in WeeChat colors table, -1 if not found.
*/
int
@@ -140,9 +140,9 @@ gui_color_search (const char *color_name)
}
/*
* Searches for a color by index.
* Search for a color by index.
*
* Returns name of color in WeeChat colors table, NULL if not found.
* Return name of color in WeeChat colors table, NULL if not found.
*/
const char *
@@ -214,9 +214,9 @@ gui_color_get_extended_flags (int attrs)
}
/*
* Assigns a WeeChat color (read from configuration).
* Assign a WeeChat color (read from configuration).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -270,12 +270,12 @@ gui_color_assign (int *color, const char *color_name)
}
/*
* Assigns color by difference.
* Assign color by difference.
*
* It is called when a color option is set with value ++X or --X, to search
* another color (for example ++1 is next color/alias in list).
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -323,7 +323,7 @@ gui_color_assign_by_diff (int *color, const char *color_name, int diff)
}
/*
* Gets number of WeeChat colors.
* Get number of WeeChat colors.
*/
int
@@ -333,7 +333,7 @@ gui_color_get_weechat_colors_number (void)
}
/*
* Gets number of colors supported by terminal.
* Get number of colors supported by terminal.
*/
int
@@ -343,7 +343,7 @@ gui_color_get_term_colors (void)
}
/*
* Gets number of color pairs supported by terminal.
* Get number of color pairs supported by terminal.
*/
int
@@ -353,8 +353,7 @@ gui_color_get_term_color_pairs (void)
}
/*
* Gets current pairs as arrays (one array for foregrounds, another for
* backgrounds).
* Get current pairs as arrays (one array for foregrounds, another for backgrounds).
*
* Each array has "gui_color_num_pairs+1" entries. Pairs not used have value -2
* in both arrays.
@@ -414,7 +413,7 @@ error:
}
/*
* Displays a warning when no more pair is available in table.
* Display a warning when no more pair is available in table.
*/
int
@@ -435,11 +434,11 @@ gui_color_timer_warning_pairs_full (const void *pointer, void *data,
}
/*
* Gets a pair with given foreground/background colors.
* Get a pair with given foreground/background colors.
*
* If no pair is found for fg/bg, a new pair is created.
*
* Returns a value between 0 and COLOR_PAIRS-1.
* Return a value between 0 and COLOR_PAIRS-1.
*/
int
@@ -517,7 +516,7 @@ gui_color_get_pair (int fg, int bg)
}
/*
* Gets color pair with a WeeChat color number.
* Get color pair with a WeeChat color number.
*/
int
@@ -545,7 +544,7 @@ gui_color_weechat_get_pair (int weechat_color)
}
/*
* Gets color name.
* Get color name.
*/
const char *
@@ -592,7 +591,7 @@ gui_color_get_name (int num_color)
}
/*
* Builds a WeeChat color with foreground and background.
* Build a WeeChat color with foreground and background.
*
* Foreground and background must be >= 0 and can be a WeeChat or extended
* color, with optional attributes for foreground.
@@ -643,7 +642,7 @@ gui_color_build (int number, int foreground, int background)
}
/*
* Initializes color variables using terminal infos.
* Initialize color variables using terminal infos.
*/
void
@@ -703,7 +702,7 @@ gui_color_init_vars (void)
}
/*
* Frees color variables.
* Free color variables.
*/
void
@@ -722,7 +721,7 @@ gui_color_free_vars (void)
}
/*
* Initializes color pairs with terminal colors.
* Initialize color pairs with terminal colors.
*/
void
@@ -740,7 +739,7 @@ gui_color_init_pairs_terminal (void)
}
/*
* Initializes color pairs with WeeChat colors.
* Initialize color pairs with WeeChat colors.
*
* Pairs defined by WeeChat are set with their values (from pair 1 to pair N),
* and other pairs are set with terminal color and default background (-1).
@@ -771,7 +770,7 @@ gui_color_init_pairs_weechat (void)
}
/*
* Displays terminal colors.
* Display terminal colors.
*
* This is called by command line option "-c" / "--colors".
*/
@@ -830,7 +829,7 @@ gui_color_display_terminal_colors (void)
}
/*
* Displays line with terminal colors and timer (remaining time for display of
* Display line with terminal colors and timer (remaining time for display of
* terminal colors).
*/
@@ -864,7 +863,7 @@ gui_color_info_term_colors (char *buffer, int size)
}
/*
* Displays content of color buffer.
* Display content of color buffer.
*/
void
@@ -1168,7 +1167,7 @@ gui_color_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Switches between WeeChat and terminal colors.
* Switch between WeeChat and terminal colors.
*/
void
@@ -1215,7 +1214,7 @@ gui_color_switch_colors (void)
}
/*
* Resets all color pairs (the next refresh will auto reallocate needed pairs).
* Reset all color pairs (the next refresh will auto reallocate needed pairs).
*
* It is useful when color pairs table is full, to remove non used pairs.
*/
@@ -1289,7 +1288,7 @@ gui_color_buffer_close_cb (const void *pointer, void *data,
}
/*
* Assigns color buffer to pointer if it is not yet set.
* Assign color buffer to pointer if it is not yet set.
*/
void
@@ -1307,7 +1306,7 @@ gui_color_buffer_assign (void)
}
/*
* Opens a buffer to display colors.
* Open a buffer to display colors.
*/
void
@@ -1349,7 +1348,7 @@ gui_color_buffer_open (void)
}
/*
* Adds an alias in hashtable with aliases.
* Add an alias in hashtable with aliases.
*/
void
@@ -1381,7 +1380,7 @@ gui_color_palette_add_alias_cb (void *data,
}
/*
* Builds aliases for palette.
* Build aliases for palette.
*/
void
@@ -1431,7 +1430,7 @@ gui_color_palette_build_aliases (void)
}
/*
* Creates a new color in palette.
* Create a new color in palette.
*/
struct t_gui_color_palette *
@@ -1523,7 +1522,7 @@ gui_color_palette_new (int number, const char *value)
}
/*
* Frees a color in palette.
* Free a color in palette.
*/
void
@@ -1538,7 +1537,7 @@ gui_color_palette_free (struct t_gui_color_palette *color_palette)
}
/*
* Initializes WeeChat colors.
* Initialize WeeChat colors.
*/
void
@@ -1612,7 +1611,7 @@ gui_color_init_weechat (void)
}
/*
* Allocates GUI colors.
* Allocate GUI colors.
*/
void
@@ -1630,7 +1629,7 @@ gui_color_alloc (void)
}
/*
* Dumps colors.
* Dump colors.
*/
void
+4 -4
View File
@@ -52,7 +52,7 @@
/*
* Creates key bind, only if it does not exist yet.
* Create key bind, only if it does not exist yet.
*/
void
@@ -67,7 +67,7 @@ gui_key_default_bind (int context, const char *key, const char *command,
}
/*
* Creates default key bindings for a given context.
* Create default key bindings for a given context.
*
* If create_option == 1, config options are created, otherwise keys are just
* added to linked list (gui_keys[]).
@@ -292,7 +292,7 @@ gui_key_default_bindings (int context, int create_option)
}
/*
* Flushes keyboard buffer.
* Flush keyboard buffer.
*/
void
@@ -511,7 +511,7 @@ gui_key_flush (int paste)
}
/*
* Reads keyboard chars.
* Read keyboard chars.
*/
int
+5 -5
View File
@@ -72,7 +72,7 @@ int gui_term_lines = 0; /* number of lines in terminal */
/*
* Gets a password from user (called on startup, when GUI is not initialized).
* Get a password from user (called on startup, when GUI is not initialized).
*
* The result is stored in "password" with max "size" bytes (including the
* final '\0').
@@ -161,7 +161,7 @@ gui_main_signal_sigint (int signo)
}
/*
* Initializes GUI.
* Initialize GUI.
*/
void
@@ -262,7 +262,7 @@ gui_main_signal_sigwinch (int signo)
}
/*
* Displays infos about ncurses lib.
* Display infos about ncurses lib.
*/
void
@@ -277,7 +277,7 @@ gui_main_debug_libs (void)
}
/*
* Refreshes for windows, buffers, bars.
* Refresh for windows, buffers, bars.
*/
void
@@ -464,7 +464,7 @@ gui_main_loop (void)
}
/*
* Ends GUI.
* End GUI.
*
* Argument "clean_exit" is 0 when WeeChat is crashing (we don't clean objects
* because WeeChat can crash again during this cleanup...).
+11 -11
View File
@@ -84,7 +84,7 @@ char *gui_mouse_button_utf8_codes[][2] =
/*
* Enables mouse.
* Enable mouse.
*/
void
@@ -99,7 +99,7 @@ gui_mouse_enable (void)
}
/*
* Disables mouse.
* Disable mouse.
*/
void
@@ -114,7 +114,7 @@ gui_mouse_disable (void)
}
/*
* Displays state of mouse.
* Display state of mouse.
*/
void
@@ -126,7 +126,7 @@ gui_mouse_display_state (void)
}
/*
* Initializes "grab mode".
* Initialize "grab mode".
*/
void
@@ -136,7 +136,7 @@ gui_mouse_grab_init (int area)
}
/*
* Gets area for input, according to (x,y) of mouse event.
* Get area for input, according to (x,y) of mouse event.
*
* For example: @item(buffer_nicklist)
* @bar(title)
@@ -181,7 +181,7 @@ gui_mouse_grab_event2input (void)
}
/*
* Ends "grab mode".
* End "grab mode".
*/
void
@@ -216,7 +216,7 @@ gui_mouse_grab_end (const char *mouse_key)
}
/*
* Returns size of mouse event (SGR and UTF-8 events are supported):
* Return size of mouse event (SGR and UTF-8 events are supported):
* -1: not a mouse event
* 0: incomplete mouse event
* > 0: complete mouse event
@@ -265,7 +265,7 @@ gui_mouse_event_size (const char *key)
}
/*
* Concatenates the mouse event gesture in a key (containing the button name).
* Concatenate the mouse event gesture in a key (containing the button name).
*
* Note: *key must be long enough for the gesture added by this function
* (see below).
@@ -349,7 +349,7 @@ gui_mouse_event_concat_gesture (char *key)
}
/*
* Gets mouse event name with a SGR mouse event.
* Get mouse event name with a SGR mouse event.
*/
const char *
@@ -482,7 +482,7 @@ error:
}
/*
* Gets mouse event name with a UTF-8 mouse event: if the key is invalid UTF-8,
* Get mouse event name with a UTF-8 mouse event: if the key is invalid UTF-8,
* use the 3 bytes, otherwise 3 UTF-8 chars.
*/
@@ -596,7 +596,7 @@ gui_mouse_event_name_utf8 (const char *key)
}
/*
* Processes a mouse event.
* Process a mouse event.
*/
void
+1 -1
View File
@@ -39,7 +39,7 @@
/*
* Sets "eat_newline_glitch" variable.
* Set "eat_newline_glitch" variable.
*
* With value 0, this is used to not auto insert newline char at end of lines
* displayed, so that long words like URLs are not cut when they are selected
+81 -82
View File
@@ -76,7 +76,7 @@ int gui_window_saved_style_index = 0; /* index in list of savec styles */
/*
* Gets screen width (terminal width in chars for Curses).
* Get screen width (terminal width in chars for Curses).
*/
int
@@ -86,7 +86,7 @@ gui_window_get_width (void)
}
/*
* Gets screen height (terminal height in chars for Curses).
* Get screen height (terminal height in chars for Curses).
*/
int
@@ -96,7 +96,7 @@ gui_window_get_height (void)
}
/*
* Reads terminal size.
* Read terminal size.
*/
void
@@ -120,9 +120,9 @@ gui_window_read_terminal_size (void)
}
/*
* Initializes Curses windows.
* Initialize Curses windows.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -145,7 +145,7 @@ gui_window_objects_init (struct t_gui_window *window)
}
/*
* Frees Curses windows for a window.
* Free Curses windows for a window.
*/
void
@@ -175,7 +175,7 @@ gui_window_objects_free (struct t_gui_window *window, int free_separators)
}
/*
* Clears a Curses window.
* Clear a Curses window.
*/
void
@@ -210,7 +210,7 @@ gui_window_clear (WINDOW *window, int fg, int bg)
}
/*
* Clears until end of line with current background.
* Clear until end of line with current background.
*/
void
@@ -230,7 +230,7 @@ gui_window_clrtoeol (WINDOW *window)
}
/*
* Saves current style.
* Save current style.
*/
void
@@ -259,7 +259,7 @@ gui_window_save_style (WINDOW *window)
}
/*
* Restores style values.
* Restore style values.
*/
void
@@ -290,7 +290,7 @@ gui_window_restore_style (WINDOW *window)
}
/*
* Resets style (color and attr) with a WeeChat color for a window.
* Reset style (color and attr) with a WeeChat color for a window.
*/
void
@@ -305,7 +305,7 @@ gui_window_reset_style (WINDOW *window, int weechat_color)
}
/*
* Resets color with a WeeChat color for a window.
* Reset color with a WeeChat color for a window.
*/
void
@@ -319,7 +319,7 @@ gui_window_reset_color (WINDOW *window, int weechat_color)
}
/*
* Sets style for color.
* Set style for color.
*/
void
@@ -330,7 +330,7 @@ gui_window_set_color_style (WINDOW *window, int style)
}
/*
* Removes style for color.
* Remove style for color.
*/
void
@@ -341,7 +341,7 @@ gui_window_remove_color_style (WINDOW *window, int style)
}
/*
* Sets color for a window.
* Set color for a window.
*/
void
@@ -354,7 +354,7 @@ gui_window_set_color (WINDOW *window, int fg, int bg)
}
/*
* Sets WeeChat color for window.
* Set WeeChat color for window.
*/
void
@@ -387,7 +387,7 @@ gui_window_set_weechat_color (WINDOW *window, int num_color)
}
/*
* Sets a custom color for a window (foreground only).
* Set a custom color for a window (foreground only).
*/
void
@@ -454,7 +454,7 @@ gui_window_set_custom_color_fg (WINDOW *window, int fg)
}
/*
* Sets a custom color for a window (background only).
* Set a custom color for a window (background only).
*/
void
@@ -483,7 +483,7 @@ gui_window_set_custom_color_bg (WINDOW *window, int bg)
}
/*
* Sets a custom color for a window (foreground and background).
* Set a custom color for a window (foreground and background).
*/
void
@@ -556,7 +556,7 @@ gui_window_set_custom_color_fg_bg (WINDOW *window, int fg, int bg,
}
/*
* Sets a custom color for a window (pair number).
* Set a custom color for a window (pair number).
*/
void
@@ -570,7 +570,7 @@ gui_window_set_custom_color_pair (WINDOW *window, int pair)
}
/*
* Toggles text emphasis.
* Toggle text emphasis.
*/
void
@@ -580,7 +580,7 @@ gui_window_toggle_emphasis (void)
}
/*
* Emphasizes some chars already displayed in a window, either using a color
* Emphasize some chars already displayed in a window, either using a color
* (from config options), or by doing an exclusive or (XOR) with attributes
* (like reverse video).
*
@@ -628,10 +628,10 @@ gui_window_emphasize (WINDOW *window, int x, int y, int count)
}
/*
* Applies foreground color code in string and moves string pointer after color
* Apply foreground color code in string and moves string pointer after color
* in string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -700,10 +700,10 @@ gui_window_string_apply_color_fg (unsigned char **string, WINDOW *window)
}
/*
* Applies background color code in string and moves string pointer after color
* Apply background color code in string and moves string pointer after color
* in string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -759,10 +759,10 @@ gui_window_string_apply_color_bg (unsigned char **string, WINDOW *window)
}
/*
* Applies foreground + background color code in string and moves string pointer
* Apply foreground + background color code in string and moves string pointer
* after color in string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -883,10 +883,10 @@ gui_window_string_apply_color_fg_bg (unsigned char **string, WINDOW *window)
}
/*
* Applies pair color code in string and moves string pointer after color in
* Apply pair color code in string and moves string pointer after color in
* string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -920,10 +920,10 @@ gui_window_string_apply_color_pair (unsigned char **string, WINDOW *window)
}
/*
* Applies weechat color code in string and moves string pointer after color in
* Apply weechat color code in string and moves string pointer after color in
* string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -957,10 +957,10 @@ gui_window_string_apply_color_weechat (unsigned char **string, WINDOW *window)
}
/*
* Applies "set attribute" color code in string and moves string pointer after
* Apply "set attribute" color code in string and moves string pointer after
* color in string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -1008,10 +1008,10 @@ gui_window_string_apply_color_set_attr (unsigned char **string, WINDOW *window)
}
/*
* Applies "remove attribute" color code in string and moves string pointer
* Apply "remove attribute" color code in string and moves string pointer
* after color in string.
*
* If window is NULL, no color is applied but string pointer is moved anyway.
* If window is NULL, do not apply colors but still move string pointer.
*/
void
@@ -1059,7 +1059,7 @@ gui_window_string_apply_color_remove_attr (unsigned char **string, WINDOW *windo
}
/*
* Calculates position and size for a buffer and subwindows.
* Calculate position and size for a buffer and subwindows.
*/
void
@@ -1100,10 +1100,10 @@ gui_window_calculate_pos_size (struct t_gui_window *window)
}
/*
* Draws a horizontal line (like ncurses function "mvwhline", but UTF-8 chars
* Draw a horizontal line (like ncurses function "mvwhline", but UTF-8 chars
* are supported).
*
* If "string" is NULL or empty, the ACS_HLINE char is used (plain line).
* If "string" is NULL or empty, use the ACS_HLINE char (plain line).
* If "string" is not NULL and not empty, its width on screen must be exactly
* one char.
*/
@@ -1127,10 +1127,10 @@ gui_window_hline (WINDOW *window, int x, int y, int width, const char *string)
}
/*
* Draws a vertical line (like ncurses function "mvwvline", but UTF-8 chars
* Draw a vertical line (like ncurses function "mvwvline", but UTF-8 chars
* are supported).
*
* If "string" is NULL or empty, the ACS_VLINE char is used (plain line).
* If "string" is NULL or empty, use the ACS_VLINE char (plain line).
* If "string" is not NULL and not empty, its width on screen must be exactly
* one char.
*/
@@ -1154,7 +1154,7 @@ gui_window_vline (WINDOW *window, int x, int y, int height, const char *string)
}
/*
* Draws window separators.
* Draw window separators.
*/
void
@@ -1246,7 +1246,7 @@ gui_window_draw_separators (struct t_gui_window *window)
}
/*
* Switches to another buffer in a window.
* Switch to another buffer in a window.
*/
void
@@ -1381,7 +1381,7 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
}
/*
* Switches to another window.
* Switch to another window.
*/
void
@@ -1420,7 +1420,7 @@ gui_window_switch (struct t_gui_window *window)
}
/*
* Displays previous page on buffer.
* Display previous page on buffer.
*/
void
@@ -1471,7 +1471,7 @@ gui_window_page_up (struct t_gui_window *window)
}
/*
* Displays next page on buffer.
* Display next page on buffer.
*/
void
@@ -1530,7 +1530,7 @@ gui_window_page_down (struct t_gui_window *window)
}
/*
* Displays previous few lines in buffer.
* Display previous few lines in buffer.
*/
void
@@ -1575,7 +1575,7 @@ gui_window_scroll_up (struct t_gui_window *window)
}
/*
* Displays next few lines in buffer.
* Display next few lines in buffer.
*/
void
@@ -1628,7 +1628,7 @@ gui_window_scroll_down (struct t_gui_window *window)
}
/*
* Scrolls to top of buffer.
* Scroll to top of buffer.
*/
void
@@ -1662,7 +1662,7 @@ gui_window_scroll_top (struct t_gui_window *window)
}
/*
* Scrolls to bottom of buffer.
* Scroll to bottom of buffer.
*/
void
@@ -1704,7 +1704,7 @@ gui_window_scroll_bottom (struct t_gui_window *window)
}
/*
* Scrolls beyond the end of buffer (so that all lines become "hidden" above the
* Scroll beyond the end of buffer (so that all lines become "hidden" above the
* top of window).
*/
@@ -1724,11 +1724,11 @@ gui_window_scroll_beyond_end (struct t_gui_window *window)
}
/*
* Auto-resizes all windows, according to % of global size.
* Auto-resize all windows, according to % of global size.
*
* This function is called after a terminal resize.
*
* Returns:
* Return:
* 0: OK
* -1: all windows must be merged (not enough space)
*/
@@ -1806,7 +1806,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree,
}
/*
* Auto-resizes and refreshes all windows.
* Auto-resize and refreshes all windows.
*/
void
@@ -1876,9 +1876,9 @@ gui_window_refresh_windows (void)
}
/*
* Horizontally splits a window.
* Split a window horizontally.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *
@@ -1929,9 +1929,9 @@ gui_window_split_horizontal (struct t_gui_window *window, int percentage)
}
/*
* Vertically splits a window.
* Split a window vertically.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *
@@ -1981,7 +1981,7 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage)
}
/*
* Resizes a window.
* Resize a window.
*/
void
@@ -2018,7 +2018,7 @@ gui_window_resize (struct t_gui_window_tree *tree, int percentage)
}
/*
* Resizes window using delta percentage.
* Resize a window using delta percentage.
*/
void
@@ -2059,9 +2059,9 @@ gui_window_resize_delta (struct t_gui_window_tree *tree, int delta_percentage)
}
/*
* Merges window with its sister.
* Merge a window with its sister.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2112,7 +2112,7 @@ gui_window_merge (struct t_gui_window *window)
}
/*
* Merges all windows into only one.
* Merge all windows into only one.
*/
void
@@ -2154,9 +2154,9 @@ gui_window_merge_all (struct t_gui_window *window)
}
/*
* Closes a window.
* Close a window.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2182,7 +2182,7 @@ gui_window_close (struct t_gui_window *window)
}
/*
* Returns a code about position of 2 windows:
* Return a code about position of 2 windows:
* 0 = they're not side by side
* 1 = side by side: win2 is over the win1
* 2 = side by side: win2 on the right
@@ -2245,7 +2245,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2)
}
/*
* Searches and switches to a window over current window.
* Search and switch to a window over current window.
*/
void
@@ -2269,7 +2269,7 @@ gui_window_switch_up (struct t_gui_window *window)
}
/*
* Searches and switches to a window below current window.
* Search and switch to a window below current window.
*/
void
@@ -2293,7 +2293,7 @@ gui_window_switch_down (struct t_gui_window *window)
}
/*
* Searches and switches to a window on the left of current window.
* Search and switch to a window on the left of current window.
*/
void
@@ -2317,7 +2317,7 @@ gui_window_switch_left (struct t_gui_window *window)
}
/*
* Searches and switches to a window on the right of current window.
* Search and switch to a window on the right of current window.
*/
void
@@ -2341,7 +2341,7 @@ gui_window_switch_right (struct t_gui_window *window)
}
/*
* Counts number of windows in a tree with a given split, for balancing windows.
* Count number of windows in a tree with a given split, for balancing windows.
*/
int
@@ -2367,9 +2367,9 @@ gui_window_balance_count (struct t_gui_window_tree *tree, int split_horizontal)
}
/*
* Balances windows (set all splits to 50%).
* Balance windows (set all splits to 50%).
*
* Returns:
* Return:
* 1: some windows have been balanced
* 0: nothing was changed
*/
@@ -2407,7 +2407,7 @@ gui_window_balance (struct t_gui_window_tree *tree)
}
/*
* Swaps buffers of two windows.
* Swap buffers of two windows.
*
* Argument "direction" can be:
* 0 = auto (swap with sister)
@@ -2510,7 +2510,7 @@ gui_window_bare_display_timer_cb (const void *pointer, void *data,
}
/*
* Toggles bare display.
* Toggle bare display.
*/
void
@@ -2562,7 +2562,7 @@ gui_window_bare_display_toggle (const char *delay)
}
/*
* Sets terminal title.
* Set terminal title.
*
* Note: the content of "title" (if not NULL) is evaluated, so variables like
* "${info:version}" can be used inside.
@@ -2635,7 +2635,7 @@ gui_window_set_title (const char *title)
}
/*
* Copies text to clipboard (sent to terminal).
* Copy text to clipboard (sent to terminal).
*/
void
@@ -2660,7 +2660,7 @@ gui_window_send_clipboard (const char *storage_unit, const char *text)
}
/*
* Enables/disables bracketed paste mode.
* Toggle bracketed paste mode.
*/
void
@@ -2683,7 +2683,7 @@ gui_window_set_bracketed_paste_mode (int enable)
}
/*
* Moves cursor on screen (for cursor mode).
* Move cursor on screen (for cursor mode).
*/
void
@@ -2697,7 +2697,7 @@ gui_window_move_cursor (void)
}
/*
* Displays some infos about terminal and colors.
* Display some infos about terminal and colors.
*/
void
@@ -2710,8 +2710,7 @@ gui_window_term_display_infos (void)
}
/*
* Prints window Curses objects infos in WeeChat log file (usually for crash
* dump).
* Print window Curses objects infos in WeeChat log file (usually for crash dump).
*/
void
+1 -1
View File
@@ -40,7 +40,7 @@
/*
* Daemonizes the process.
* Daemonize the process.
*/
void
+23 -23
View File
@@ -55,10 +55,10 @@ struct t_gui_bar_item_custom *last_gui_temp_custom_bar_item = NULL;
/*
* Checks if a custom bar item name is valid: it must not have any
* Check if a custom bar item name is valid: it must not have any
* space/period.
*
* Returns:
* Return:
* 1: name is valid
* 0: name is invalid
*/
@@ -82,9 +82,9 @@ gui_bar_item_custom_name_valid (const char *name)
}
/*
* Searches for a custom bar item option name.
* Search for a custom bar item option name.
*
* Returns index of option in enum t_gui_bar_item_custom_option,
* Return index of option in enum t_gui_bar_item_custom_option,
* -1 if not found.
*/
@@ -107,7 +107,7 @@ gui_bar_item_custom_search_option (const char *option_name)
}
/*
* Searches for a custom bar item by name.
* Search for a custom bar item by name.
*/
struct t_gui_bar_item_custom *
@@ -130,9 +130,9 @@ gui_bar_item_custom_search (const char *item_name)
}
/*
* Searches for a custom bar item with name of option (like "name.content").
* Search for a custom bar item with name of option (like "name.content").
*
* Returns pointer to custom bar item found, NULL if not found.
* Return pointer to custom bar item found, NULL if not found.
*/
struct t_gui_bar_item_custom *
@@ -185,9 +185,9 @@ gui_bar_item_custom_config_change (const void *pointer, void *data,
}
/*
* Creates an option for a custom bar item.
* Create an option for a custom bar item.
*
* Returns pointer to new option, NULL if error.
* Return pointer to new option, NULL if error.
*/
struct t_config_option *
@@ -240,7 +240,7 @@ gui_bar_item_custom_create_option (const char *item_name, int index_option,
}
/*
* Creates option for a temporary custom bar item (when reading configuration
* Create option for a temporary custom bar item (when reading configuration
* file).
*/
@@ -340,9 +340,9 @@ end:
}
/*
* Allocates and initializes new custom bar item structure.
* Allocate and initialize new custom bar item structure.
*
* Returns pointer to new custom bar item, NULL if error.
* Return pointer to new custom bar item, NULL if error.
*/
struct t_gui_bar_item_custom *
@@ -368,7 +368,7 @@ gui_bar_item_custom_alloc (const char *name)
}
/*
* Creates bar item in a custom bar item.
* Create bar item in a custom bar item.
*/
void
@@ -384,9 +384,9 @@ gui_bar_item_custom_create_bar_item (struct t_gui_bar_item_custom *item)
}
/*
* Creates a new custom bar item with options.
* Create a new custom bar item with options.
*
* Returns pointer to new bar, NULL if error.
* Return pointer to new bar, NULL if error.
*/
struct t_gui_bar_item_custom *
@@ -418,9 +418,9 @@ gui_bar_item_custom_new_with_options (const char *name,
}
/*
* Creates a new custom bar item.
* Create a new custom bar item.
*
* Returns pointer to new custom bar item, NULL if not found.
* Return pointer to new custom bar item, NULL if not found.
*/
struct t_gui_bar_item_custom *
@@ -486,7 +486,7 @@ error:
}
/*
* Uses temporary custom bar items (created by reading configuration file).
* Use temporary custom bar items (created by reading configuration file).
*/
void
@@ -538,9 +538,9 @@ gui_bar_item_custom_use_temp_items (void)
}
/*
* Renames a custom bar item.
* Rename a custom bar item.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -598,7 +598,7 @@ gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
}
/*
* Frees data in a custom bar item.*
* Free data in a custom bar item.
*/
void
@@ -614,7 +614,7 @@ gui_bar_item_custom_free_data (struct t_gui_bar_item_custom *item)
}
/*
* Deletes a custom bar item.
* Delete a custom bar item.
*/
void
@@ -651,7 +651,7 @@ gui_bar_item_custom_free (struct t_gui_bar_item_custom *item)
}
/*
* Deletes all custom bar items.
* Delete all custom bar items.
*/
void
+32 -33
View File
@@ -77,9 +77,9 @@ struct t_hook *gui_bar_item_timer_hotlist_resort = NULL;
/*
* Checks if a bar item pointer is valid.
* Check if a bar item pointer is valid.
*
* Returns:
* Return:
* 1: bar item exists
* 0: bar item does not exist
*/
@@ -104,9 +104,9 @@ gui_bar_item_valid (struct t_gui_bar_item *bar_item)
}
/*
* Searches for a default bar item by name.
* Search for a default bar item by name.
*
* Returns index in gui_bar_item_names[], -1 if not found.
* Return index in gui_bar_item_names[], -1 if not found.
*/
int
@@ -128,7 +128,7 @@ gui_bar_item_search_default (const char *item_name)
}
/*
* Searches for a bar item by name.
* Search for a bar item by name.
*/
struct t_gui_bar_item *
@@ -150,12 +150,12 @@ gui_bar_item_search (const char *item_name)
}
/*
* Searches for a bar item in a plugin.
* Search for a bar item in a plugin.
*
* If exact_plugin == 1, then searches only for this plugin, otherwise, if
* If exact_plugin == 1, search only for this plugin, otherwise, if
* plugin is not found, function may return item for core (plugin == NULL).
*
* Returns pointer to bar item found, NULL if not found.
* Return pointer to bar item found, NULL if not found.
*/
struct t_gui_bar_item *
@@ -197,9 +197,9 @@ gui_bar_item_search_with_plugin (struct t_weechat_plugin *plugin,
/*
* Check if an item is used in a bar.
*
* If partial_name == 1, then searches if an item begins with "item_name".
* If partial_name == 1, search if an item begins with "item_name".
*
* Returns:
* Return:
* 1: bar item is used in the bar
* 0: bar item is not used in the bar
*/
@@ -239,12 +239,11 @@ gui_bar_item_used_in_bar (struct t_gui_bar *bar, const char *item_name,
}
/*
* Checks if a bar item is used in at least one bar.
* Check if a bar item is used in at least one bar.
*
* If partial_name == 1, then searches a bar that contains item beginning with
* "item_name".
* If partial_name == 1, search a bar that contains item beginning with "item_name".
*
* Returns:
* Return:
* 1: bar item is used in at least one bar
* 0: bar item is not used in a bar
*/
@@ -295,7 +294,7 @@ gui_bar_item_used_in_at_least_one_bar (const char *item_name, int partial_name,
}
/*
* Gets buffer, prefix, name and suffix for an item.
* Get buffer, prefix, name and suffix for an item.
*
* Examples:
* - item name "[time]" returns:
@@ -372,14 +371,14 @@ gui_bar_item_get_vars (const char *item_name,
}
/*
* Returns value of a bar item.
* Return value of a bar item.
*
* Run callbacks if a name exists, then concatenates:
* Run callbacks if a name exists, then concatenate:
* prefix + return of callback + suffix
*
* For example: if item == "[time]"
* returns: color(delimiter) + "[" +
* (value of item "time") + color(delimiter) + "]"
* return: color(delimiter) + "[" +
* (value of item "time") + color(delimiter) + "]"
*
* Note: result must be freed after use.
*/
@@ -539,7 +538,7 @@ gui_bar_item_get_value (struct t_gui_bar *bar, struct t_gui_window *window,
}
/*
* Counts number of lines in item.
* Count number of lines in item.
*/
int
@@ -563,9 +562,9 @@ gui_bar_item_count_lines (char *string)
}
/*
* Creates a new bar item.
* Create a new bar item.
*
* Returns pointer to new bar item, NULL if not found.
* Return pointer to new bar item, NULL if not found.
*/
struct t_gui_bar_item *
@@ -615,7 +614,7 @@ gui_bar_item_new (struct t_weechat_plugin *plugin, const char *name,
}
/*
* Updates an item on all bars displayed on screen.
* Update an item on all bars displayed on screen.
*/
void
@@ -707,7 +706,7 @@ gui_bar_item_update (const char *item_name)
}
/*
* Deletes a bar item.
* Delete a bar item.
*/
void
@@ -737,7 +736,7 @@ gui_bar_item_free (struct t_gui_bar_item *item)
}
/*
* Deletes all bar items.
* Delete all bar items.
*/
void
@@ -750,7 +749,7 @@ gui_bar_item_free_all (void)
}
/*
* Deletes all bar items for a plugin.
* Delete all bar items for a plugin.
*/
void
@@ -2285,7 +2284,7 @@ gui_bar_item_timer_hotlist_resort_cb (const void *pointer, void *data,
return WEECHAT_RC_OK;
}
/*
* Callback when a signal is received: rebuilds an item.
* Callback when a signal is received: rebuild an item.
*/
int
@@ -2322,7 +2321,7 @@ gui_bar_item_signal_cb (const void *pointer, void *data,
}
/*
* Hooks a signal to update bar items.
* Hook a signal to update bar items.
*/
void
@@ -2342,7 +2341,7 @@ gui_bar_item_hook_signal (const char *signal, const char *item)
}
/*
* Initializes default items in WeeChat.
* Initialize default items in WeeChat.
*/
void
@@ -2554,7 +2553,7 @@ gui_bar_item_init (void)
}
/*
* Removes bar items and hooks.
* Remove bar items and hooks.
*/
void
@@ -2609,9 +2608,9 @@ gui_bar_item_hdata_bar_item_cb (const void *pointer, void *data,
}
/*
* Adds a bar item in an infolist.
* Add a bar item in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2644,7 +2643,7 @@ gui_bar_item_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints bar items infos in WeeChat log file (usually for crash dump).
* Print bar items infos in WeeChat log file (usually for crash dump).
*/
void
+50 -50
View File
@@ -48,9 +48,9 @@
/*
* Checks if a bar window pointer is valid.
* Check if a bar window pointer is valid.
*
* Returns:
* Return:
* 1: bar window exists
* 0: bar window does not exist
*/
@@ -89,9 +89,9 @@ gui_bar_window_valid (struct t_gui_bar_window *bar_window)
}
/*
* Searches for a reference to a bar in a window.
* Search for a reference to a bar in a window.
*
* Returns pointer to bar window found, NULL if not found.
* Return pointer to bar window found, NULL if not found.
*/
struct t_gui_bar_window *
@@ -114,10 +114,10 @@ gui_bar_window_search_bar (struct t_gui_window *window, struct t_gui_bar *bar)
}
/*
* Gets bar_window pointer displayed at (x,y).
* Get bar_window pointer displayed at (x,y).
*
* If window is not NULL, search is done in bar windows of window.
* If window is NULL, search is done in root bar windows.
* If window is not NULL, search in bar windows of window.
* If window is NULL, search in root bar windows.
*/
void
@@ -276,9 +276,9 @@ gui_bar_window_search_by_xy (struct t_gui_window *window, int x, int y,
}
/*
* Gets total bar size (window bars) for a position.
* Get total bar size (window bars) for a position.
*
* Bar is optional, if not NULL, computes size from bar 1 to bar # - 1.
* Bar is optional, if not NULL, compute size from bar 1 to bar # - 1.
*/
int
@@ -328,7 +328,7 @@ gui_bar_window_get_size (struct t_gui_bar *bar, struct t_gui_window *window,
}
/*
* Calculates position and size of a bar.
* Calculate position and size of a bar.
*/
void
@@ -411,7 +411,7 @@ gui_bar_window_calculate_pos_size (struct t_gui_bar_window *bar_window,
}
/*
* Searches for position of a bar window (to keep list sorted by bar priority).
* Search for position of a bar window (to keep list sorted by bar priority).
*/
struct t_gui_bar_window *
@@ -435,7 +435,7 @@ gui_bar_window_find_pos (struct t_gui_bar *bar, struct t_gui_window *window)
}
/*
* Allocates content for a bar window.
* Allocate content for a bar window.
*/
void
@@ -544,7 +544,7 @@ error:
}
/*
* Frees content of a bar window.
* Free content of a bar window.
*/
void
@@ -583,7 +583,7 @@ gui_bar_window_content_free (struct t_gui_bar_window *bar_window)
}
/*
* Builds content of an item for a bar window.
* Build content of an item for a bar window.
*/
void
@@ -618,8 +618,8 @@ gui_bar_window_content_build_item (struct t_gui_bar_window *bar_window,
}
/*
* Builds content of a bar window: calls callback for each item, then
* concatenates values (according to bar position and filling).
* Build content of a bar window: call callback for each item, then
* concatenate values (according to bar position and filling).
*/
void
@@ -644,7 +644,7 @@ gui_bar_window_content_build (struct t_gui_bar_window *bar_window,
}
/*
* Gets item or subitem content (first rebuilds content if refresh is needed).
* Get item or subitem content (first rebuild content if refresh is needed).
*/
const char *
@@ -667,9 +667,9 @@ gui_bar_window_content_get (struct t_gui_bar_window *bar_window,
}
/*
* Checks if the item content is a spacer (bar item "spacer").
* Check if the item content is a spacer (bar item "spacer").
*
* Returns:
* Return:
* 1: item is a spacer
* 1: item is not a spacer
*/
@@ -685,7 +685,7 @@ gui_bar_window_item_is_spacer (const char *item)
}
/*
* Gets content of a bar window, formatted for display, according to filling
* Get content of a bar window, formatted for display, according to filling
* for bar position.
*
* The integer variable *num_spacers is set with the number of spacers found
@@ -989,10 +989,10 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
}
/*
* Checks if spacer can be used in the bar according to its position, filling
* Check if spacer can be used in the bar according to its position, filling
* and size.
*
* Returns:
* Return:
* 1: spacers can be used
* 0: spacers cannot be used
*/
@@ -1019,7 +1019,7 @@ gui_bar_window_can_use_spacer (struct t_gui_bar_window *bar_window)
}
/*
* Computes size of each spacer in the bar.
* Compute size of each spacer in the bar.
*
* Note: result must be freed after use.
*/
@@ -1063,7 +1063,7 @@ gui_bar_window_compute_spacers_size (int length_on_screen,
}
/*
* Adds coordinates (item index/subindex and x,y).
* Add coordinates (item index/subindex and x,y).
*/
void
@@ -1107,7 +1107,7 @@ gui_bar_window_coords_add (struct t_gui_bar_window *bar_window,
}
/*
* Frees coords of a bar window.
* Free coords of a bar window.
*/
void
@@ -1131,7 +1131,7 @@ gui_bar_window_coords_free (struct t_gui_bar_window *bar_window)
}
/*
* Inserts bar window in list of bar windows (at good position, according to
* Insert bar window in list of bar windows (at good position, according to
* priority).
*/
@@ -1177,9 +1177,9 @@ gui_bar_window_insert (struct t_gui_bar_window *bar_window,
}
/*
* Creates a new "window bar" for a bar, in screen or a window.
* Create a new "window bar" for a bar, in screen or a window.
*
* If window is not NULL, bar window will be in this window.
* If window is not NULL, create bar window in this window.
*/
void
@@ -1245,9 +1245,9 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
}
/*
* Gets current size of bar window.
* Get current size of bar window.
*
* Returns width or height, depending on bar position.
* Return width or height, depending on bar position.
*/
int
@@ -1257,7 +1257,7 @@ gui_bar_window_get_current_size (struct t_gui_bar_window *bar_window)
}
/*
* Returns max size for bar window in a window.
* Return max size for bar window in a window.
*/
int
@@ -1289,7 +1289,7 @@ gui_bar_window_get_max_size_in_window (struct t_gui_bar_window *bar_window,
}
/*
* Returns max size for bar window.
* Return max size for bar window.
*/
int
@@ -1323,7 +1323,7 @@ gui_bar_window_get_max_size (struct t_gui_bar_window *bar_window,
}
/*
* Sets current size of all bar windows for a bar.
* Set current size of all bar windows for a bar.
*/
void
@@ -1370,7 +1370,7 @@ gui_bar_window_set_current_size (struct t_gui_bar_window *bar_window,
}
/*
* Frees a bar window.
* Free a bar window.
*/
void
@@ -1410,12 +1410,12 @@ gui_bar_window_free (struct t_gui_bar_window *bar_window,
}
/*
* Removes unused bars, according to bars conditions.
* Remove unused bars, according to bars conditions.
*
* If window is NULL, unused root bars are removed.
* If window is not NULL, unused window bars in this window are removed.
* If window is NULL, remove unused root bars.
* If window is not NULL, remove unused window bars in this window.
*
* Returns:
* Return:
* 1: at least one bar was removed
* 0: no bar was removed
*/
@@ -1466,12 +1466,12 @@ gui_bar_window_remove_unused_bars (struct t_gui_window *window)
}
/*
* Adds missing bars, according to bars conditions.
* Add missing bars, according to bars conditions.
*
* If window is NULL, missing root bars are added.
* If window is not NULL, missing window bars in this window are added.
* If window is NULL, add missing root bars.
* If window is not NULL, add missing window bars in this window.
*
* Returns:
* Return:
* 1: at least one bar was created
* 0: no bar was created
*/
@@ -1517,11 +1517,11 @@ gui_bar_window_add_missing_bars (struct t_gui_window *window)
}
/*
* Scrolls a bar window with a value.
* Scroll a bar window with a value.
*
* If add == 1, then value is added (otherwise subtracted).
* If add_x == 1, then value is added to scroll_x (otherwise scroll_y).
* If percent == 1, then value is a percentage (otherwise number of chars).
* If add == 1, add value (otherwise subtract).
* If add_x == 1, add value to scroll_x (otherwise scroll_y).
* If percent == 1, value is a percentage (otherwise number of chars).
*/
void
@@ -1633,7 +1633,7 @@ gui_bar_window_update_cb (void *data, struct t_hdata *hdata, void *pointer,
}
/*
* Returns hdata for bar window.
* Return hdata for bar window.
*/
struct t_hdata *
@@ -1677,9 +1677,9 @@ gui_bar_window_hdata_bar_window_cb (const void *pointer, void *data,
}
/*
* Adds a bar window in an infolist.
* Add a bar window in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1748,7 +1748,7 @@ gui_bar_window_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints bar window infos in WeeChat log file (usually for crash dump).
* Print bar window infos in WeeChat log file (usually for crash dump).
*/
void
+63 -64
View File
@@ -103,9 +103,9 @@ void gui_bar_free_bar_windows (struct t_gui_bar *bar);
/*
* Checks if a bar pointer is valid.
* Check if a bar pointer is valid.
*
* Returns:
* Return:
* 1: bar exists
* 0: bar does not exist
*/
@@ -129,9 +129,9 @@ gui_bar_valid (struct t_gui_bar *bar)
}
/*
* Searches for a default bar name.
* Search for a default bar name.
*
* Returns index of default bar in enum t_gui_bar_default, -1 if not found.
* Return index of default bar in enum t_gui_bar_default, -1 if not found.
*/
int
@@ -153,9 +153,9 @@ gui_bar_search_default_bar (const char *bar_name)
}
/*
* Searches for a bar option name.
* Search for a bar option name.
*
* Returns index of option in enum t_gui_bar_option, -1 if not found.
* Return index of option in enum t_gui_bar_option, -1 if not found.
*/
int
@@ -177,9 +177,9 @@ gui_bar_search_option (const char *option_name)
}
/*
* Searches for a bar type.
* Search for a bar type.
*
* Returns index of type in enum t_gui_bar_type, -1 if not found.
* Return index of type in enum t_gui_bar_type, -1 if not found.
*/
int
@@ -201,9 +201,9 @@ gui_bar_search_type (const char *type)
}
/*
* Searches for a bar position.
* Search for a bar position.
*
* Returns index of position in enum t_gui_bar_position, -1 if not found.
* Return index of position in enum t_gui_bar_position, -1 if not found.
*/
int
@@ -225,9 +225,9 @@ gui_bar_search_position (const char *position)
}
/*
* Checks if "add_size" is OK for bar.
* Check if "add_size" is OK for bar.
*
* Returns:
* Return:
* 1: new size is OK
* 0: new size is too big
*/
@@ -272,8 +272,7 @@ gui_bar_check_size_add (struct t_gui_bar *bar, int add_size)
}
/*
* Returns filling option for bar, according to filling for current bar
* position.
* Return filling option for bar, according to filling for current bar position.
*/
enum t_gui_bar_filling
@@ -287,7 +286,7 @@ gui_bar_get_filling (struct t_gui_bar *bar)
}
/*
* Searches for position of a bar in list (to keep list sorted by priority).
* Search for position of a bar in list (to keep list sorted by priority).
*/
struct t_gui_bar *
@@ -306,7 +305,7 @@ gui_bar_find_pos (struct t_gui_bar *bar)
}
/*
* Inserts a bar to the list (at good position, according to priority).
* Insert a bar to the list (at good position, according to priority).
*/
void
@@ -347,11 +346,11 @@ gui_bar_insert (struct t_gui_bar *bar)
}
/*
* Checks if bar must be displayed in window according to conditions.
* Check if bar must be displayed in window according to conditions.
*
* If window is NULL (case of root bars), the current window is used.
* If window is NULL (case of root bars), use the current window.
*
* Returns:
* Return:
* 1: bar must be displayed
* 0: bar must not be displayed
*/
@@ -452,7 +451,7 @@ gui_bar_check_conditions (struct t_gui_bar *bar,
}
/*
* Gets total bar size ("root" type) for a position.
* Get total bar size ("root" type) for a position.
*/
int
@@ -483,9 +482,9 @@ gui_bar_root_get_size (struct t_gui_bar *bar, enum t_gui_bar_position position)
}
/*
* Searches for a bar by name.
* Search for a bar by name.
*
* Returns pointer to bar found, NULL if not found.
* Return pointer to bar found, NULL if not found.
*/
struct t_gui_bar *
@@ -507,9 +506,9 @@ gui_bar_search (const char *name)
}
/*
* Searches for a bar with name of option (like "status.type").
* Search for a bar with name of option (like "status.type").
*
* Returns pointer to bar found, NULL if not found.
* Return pointer to bar found, NULL if not found.
*/
struct t_gui_bar *
@@ -542,7 +541,7 @@ gui_bar_search_with_option_name (const char *option_name)
}
/*
* Rebuilds content of bar windows for a bar.
* Rebuild content of bar windows for a bar.
*/
void
@@ -574,7 +573,7 @@ gui_bar_content_build_bar_windows (struct t_gui_bar *bar)
}
/*
* Asks refresh for bar.
* Ask refresh for bar.
*/
void
@@ -584,7 +583,7 @@ gui_bar_ask_refresh (struct t_gui_bar *bar)
}
/*
* Asks for bar refresh on screen (for all windows where bar is).
* Ask for bar refresh on screen (for all windows where bar is).
*/
void
@@ -605,7 +604,7 @@ gui_bar_refresh (struct t_gui_bar *bar)
}
/*
* Draws a bar.
* Draw a bar.
*/
void
@@ -641,7 +640,7 @@ gui_bar_draw (struct t_gui_bar *bar)
}
/*
* Applies new size for all bar windows of bar.
* Apply new size for all bar windows of bar.
*/
void
@@ -676,7 +675,7 @@ gui_bar_apply_current_size (struct t_gui_bar *bar)
}
/*
* Frees arrays with items for a bar.
* Free arrays with items for a bar.
*/
void
@@ -733,7 +732,7 @@ gui_bar_free_items_arrays (struct t_gui_bar *bar)
}
/*
* Builds array with items for a bar.
* Build array with items for a bar.
*/
void
@@ -806,7 +805,7 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
/*
* Callback for checking bar type before changing it.
*
* Returns always 0 because changing the type of a bar is not allowed.
* Return always 0 because changing the type of a bar is not allowed.
*/
int
@@ -1008,7 +1007,7 @@ gui_bar_config_change_filling (const void *pointer, void *data,
/*
* Callback for checking bar size before changing it.
*
* Returns:
* Return:
* 1: new size is OK
* 0: new size is NOT OK
*/
@@ -1195,7 +1194,7 @@ gui_bar_config_change_items (const void *pointer, void *data,
}
/*
* Sets name for a bar.
* Set name for a bar.
*/
void
@@ -1219,9 +1218,9 @@ gui_bar_set_name (struct t_gui_bar *bar, const char *name)
}
/*
* Sets a property for a bar.
* Set a property for a bar.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1318,9 +1317,9 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
/*
* Creates an option for a bar.
* Create an option for a bar.
*
* Returns pointer to new option, NULL if error.
* Return pointer to new option, NULL if error.
*/
struct t_config_option *
@@ -1520,7 +1519,7 @@ gui_bar_create_option (const char *bar_name, int index_option, const char *value
}
/*
* Creates option for a temporary bar (when reading configuration file).
* Create option for a temporary bar (when reading configuration file).
*/
void
@@ -1540,9 +1539,9 @@ gui_bar_create_option_temp (struct t_gui_bar *temp_bar, int index_option,
}
/*
* Allocates and initializes new bar structure.
* Allocate and initializes new bar structure.
*
* Returns pointer to new bar, NULL if error.
* Return pointer to new bar, NULL if error.
*/
struct t_gui_bar *
@@ -1575,7 +1574,7 @@ gui_bar_alloc (const char *name)
}
/*
* Sets default value for a bar option.
* Set default value for a bar option.
*/
void
@@ -1600,9 +1599,9 @@ gui_bar_set_default_value (struct t_gui_bar *bar, int index_option,
}
/*
* Creates a new bar with options.
* Create a new bar with options.
*
* Returns pointer to new bar, NULL if error.
* Return pointer to new bar, NULL if error.
*/
struct t_gui_bar *
@@ -1681,9 +1680,9 @@ gui_bar_new_with_options (const char *name,
}
/*
* Creates a new bar.
* Create a new bar.
*
* Returns pointer to new bar, NULL if error.
* Return pointer to new bar, NULL if error.
*/
struct t_gui_bar *
@@ -1805,9 +1804,9 @@ gui_bar_new (const char *name, const char *hidden, const char *priority,
}
/*
* Creates a default bar.
* Create a default bar.
*
* Returns pointer to new bar, NULL if error.
* Return pointer to new bar, NULL if error.
*/
struct t_gui_bar *
@@ -1833,7 +1832,7 @@ gui_bar_new_default (enum t_gui_bar_default bar)
}
/*
* Uses temporary bars (created by reading configuration file).
* Use temporary bars (created by reading configuration file).
*/
void
@@ -1906,7 +1905,7 @@ gui_bar_use_temp_bars (void)
}
/*
* Creates default input bar if it does not exist.
* Create default input bar if it does not exist.
*/
void
@@ -1950,7 +1949,7 @@ gui_bar_create_default_input (void)
}
/*
* Creates default title bar if it does not exist.
* Create default title bar if it does not exist.
*/
void
@@ -1972,7 +1971,7 @@ gui_bar_create_default_title (void)
}
/*
* Creates default status bar if it does not exist.
* Create default status bar if it does not exist.
*/
void
@@ -1994,7 +1993,7 @@ gui_bar_create_default_status (void)
}
/*
* Creates default nicklist bar if it does not exist.
* Create default nicklist bar if it does not exist.
*/
void
@@ -2016,7 +2015,7 @@ gui_bar_create_default_nicklist (void)
}
/*
* Creates default bars if they do not exist.
* Create default bars if they do not exist.
*/
void
@@ -2029,7 +2028,7 @@ gui_bar_create_default (void)
}
/*
* Updates a bar on screen.
* Update a bar on screen.
*/
void
@@ -2051,9 +2050,9 @@ gui_bar_update (const char *name)
}
/*
* Scrolls a bar.
* Scroll a bar.
*
* Returns:
* Return:
* 1: scroll OK
* 0: error
*/
@@ -2169,7 +2168,7 @@ gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_window *window,
}
/*
* Deletes a bar.
* Delete a bar.
*/
void
@@ -2211,7 +2210,7 @@ gui_bar_free (struct t_gui_bar *bar)
}
/*
* Deletes all bars.
* Delete all bars.
*/
void
@@ -2224,7 +2223,7 @@ gui_bar_free_all (void)
}
/*
* Frees bar windows for a bar.
* Free bar windows for a bar.
*/
void
@@ -2256,7 +2255,7 @@ gui_bar_free_bar_windows (struct t_gui_bar *bar)
}
/*
* Returns hdata for bar.
* Return hdata for bar.
*/
struct t_hdata *
@@ -2292,9 +2291,9 @@ gui_bar_hdata_bar_cb (const void *pointer, void *data, const char *hdata_name)
}
/*
* Adds a bar in an infolist.
* Add a bar in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2381,7 +2380,7 @@ gui_bar_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints bar infos in WeeChat log file (usually for crash dump).
* Print bar infos in WeeChat log file (usually for crash dump).
*/
void
+148 -149
View File
File diff suppressed because it is too large Load Diff
+38 -40
View File
@@ -83,7 +83,7 @@ char *gui_chat_pipe_color_string[GUI_CHAT_PIPE_NUM_COLORS] =
/*
* Initializes some variables for chat area (called before reading WeeChat
* Initialize some variables for chat area (called before reading WeeChat
* configuration file).
*/
@@ -112,7 +112,7 @@ gui_chat_init (void)
}
/*
* Builds prefix with colors (called after reading WeeChat configuration file).
* Build prefix with colors (called after reading WeeChat configuration file).
*/
void
@@ -149,7 +149,7 @@ gui_chat_prefix_build (void)
}
/*
* Returns number of char in a string (special chars like colors/attributes are
* Return number of char in a string (special chars like colors/attributes are
* ignored).
*/
@@ -173,7 +173,7 @@ gui_chat_strlen (const char *string)
}
/*
* Returns number of char needed on screen to display a word (special chars like
* Return number of char needed on screen to display a word (special chars like
* colors/attributes are ignored).
*/
@@ -199,7 +199,7 @@ gui_chat_strlen_screen (const char *string)
}
/*
* Moves forward N chars in a string, skipping all formatting chars (like
* Move forward N chars in a string, skipping all formatting chars (like
* colors/attributes).
*/
@@ -221,7 +221,7 @@ gui_chat_string_add_offset (const char *string, int offset)
}
/*
* Moves forward N chars (using size on screen) in a string, skipping all
* Move forward N chars (using size on screen) in a string, skipping all
* formatting chars (like colors/attributes).
*/
@@ -251,15 +251,14 @@ gui_chat_string_add_offset_screen (const char *string, int offset_screen)
}
/*
* Gets real position in string (ignoring formatting chars like
* colors/attributes).
* Get real position in string (ignoring formatting chars like colors/attributes).
*
* If argument "use_screen_size" is 0, the "pos" argument is a number of UTF-8
* chars.
* If argument "use_screen_size" is 1, the "pos" argument is the width of UTF-8
* chars on screen.
*
* Returns real position, in bytes.
* Return real position, in bytes.
*/
int
@@ -295,10 +294,9 @@ gui_chat_string_real_pos (const char *string, int pos, int use_screen_size)
}
/*
* Gets real position in string (ignoring formatting chars like
* colors/attributes).
* Get real position in string (ignoring formatting chars like colors/attributes).
*
* Returns position, in number of UTF-8 chars.
* Return position, in number of UTF-8 chars.
*/
int
@@ -325,9 +323,10 @@ gui_chat_string_pos (const char *string, int real_pos)
}
/*
* Returns info about next word: beginning, end, length.
* Return info about next word: beginning, end, length.
*
* Stops before the first newline character, even if no characters or only spaces and color codes precede it.
* Stop before the first newline character, even if no characters or only spaces
* and color codes precede it.
*
* Note: the word_{start|end}_offset are in bytes, but word_length(_with_spaces)
* are in number of chars on screen.
@@ -405,7 +404,7 @@ gui_chat_get_word_info (struct t_gui_window *window,
}
/*
* Gets time string, for display (with colors).
* Get time string, for display (with colors).
*
* Note: result must be freed after use.
*/
@@ -522,7 +521,7 @@ gui_chat_get_time_string (time_t date, int date_usec, int highlight)
}
/*
* Calculates time length with a time format (format can include color codes
* Calculate time length with a time format (format can include color codes
* with format ${name}).
*/
@@ -551,7 +550,7 @@ gui_chat_get_time_length (void)
}
/*
* Changes time format for all lines of all buffers.
* Change time format for all lines of all buffers.
*/
void
@@ -579,10 +578,10 @@ gui_chat_change_time_format (void)
}
/*
* Checks if the buffer pointer is valid for printing a chat message,
* Check if the buffer pointer is valid for printing a chat message,
* according to buffer type.
*
* Returns:
* Return:
* 1: buffer is valid
* 0: buffer is not valid
*/
@@ -612,9 +611,9 @@ gui_chat_buffer_valid (struct t_gui_buffer *buffer,
}
/*
* Searches for a pipe color name.
* Search for a pipe color name.
*
* Returns index of color in enum t_gui_chat_pipe_color, -1 if not found.
* Return index of color in enum t_gui_chat_pipe_color, -1 if not found.
*/
int
@@ -636,7 +635,7 @@ gui_chat_pipe_search_color (const char *color)
}
/*
* Converts color in a message, according to variable gui_chat_pipe_color.
* Convert color in a message, according to variable gui_chat_pipe_color.
*
* Note: result must be freed after use.
*/
@@ -663,7 +662,7 @@ gui_chat_pipe_convert_color (const char *data)
}
/*
* Builds a message with a line: "<prefix> <message>" or "<message>" if there
* Build a message with a line: "<prefix> <message>" or "<message>" if there
* is no prefix.
*
* Note: result must be freed after use.
@@ -693,7 +692,7 @@ gui_chat_pipe_build_message (struct t_gui_line *line)
}
/*
* Sends data to a buffer (command `/pipe -o`).
* Send data to a buffer (command `/pipe -o`).
*/
void
@@ -732,9 +731,9 @@ gui_chat_pipe_send_buffer_input (struct t_gui_buffer *buffer, const char *data)
}
/*
* Handles a redirection with /pipe command.
* Handle a redirection with /pipe command.
*
* Returns:
* Return:
* 1: line has been handled and must NOT be displayed
* 0: line has NOT been handled and must be displayed
*/
@@ -805,7 +804,7 @@ gui_chat_pipe_handle_line (struct t_gui_line *line)
}
/*
* Ends pipe and flushes concatenated lines to a buffer or a file
* End pipe and flushes concatenated lines to a buffer or a file
* (if command `/pipe -g` was used).
*/
@@ -886,9 +885,9 @@ gui_chat_pipe_end (void)
}
/*
* Displays a message in a buffer with optional date and tags.
* This function is called internally by the function
* gui_chat_printf_date_tags.
* Display a message in a buffer with optional date and tags.
*
* This function is called internally by the function gui_chat_printf_date_tags.
*/
void
@@ -1105,7 +1104,7 @@ no_print:
}
/*
* Adds a line when WeeChat is waiting for the core buffer.
* Add a line when WeeChat is waiting for the core buffer.
*
* The line is stored in an internal buffer area and will be displayed later
* in the core buffer.
@@ -1128,12 +1127,11 @@ gui_chat_add_line_waiting_buffer (const char *message)
}
/*
* Displays lines that are waiting for buffer.
* Display lines that are waiting for buffer.
*
* If "f" is not NULL, the lines are written in this file (which is commonly
* stdout or stderr).
* If "f" is NULL, the lines are displayed in core buffer if the GUI is
* initialized (gui_init_ok == 1), otherwise on stdout.
* If "f" is not NULL, write lines in this file (which is commonly stdout or stderr).
* If "f" is NULL, display lines in core buffer if the GUI is initialized
* (gui_init_ok == 1), otherwise on stdout.
*/
void
@@ -1170,7 +1168,7 @@ gui_chat_print_lines_waiting_buffer (FILE *f)
}
/*
* Displays a message in a buffer with optional date and tags.
* Display a message in a buffer with optional date and tags.
*
* Note: this function works only with formatted buffers (not buffers with free
* content).
@@ -1253,7 +1251,7 @@ gui_chat_printf_datetime_tags (struct t_gui_buffer *buffer,
}
/*
* Displays a message on a line in a buffer with free content.
* Display a message on a line in a buffer with free content.
*
* Note: this function works only with free content buffers (not formatted
* buffers).
@@ -1388,7 +1386,7 @@ end:
}
/*
* Quotes a line.
* Quote a line.
*/
int
@@ -1492,7 +1490,7 @@ gui_chat_hsignal_quote_line_cb (const void *pointer, void *data,
}
/*
* Frees some variables allocated for chat area.
* Free some variables allocated for chat area.
*/
void
+35 -36
View File
@@ -115,9 +115,9 @@ char *gui_color_ansi[16] =
/*
* Returns a color code from an option, which can be a color or a string.
* Return a color code from an option, which can be a color or a string.
*
* Returns NULL if the option has a wrong type.
* Return NULL if the option has a wrong type.
*/
const char *
@@ -146,9 +146,9 @@ gui_color_from_option (struct t_config_option *option)
}
/*
* Searches for a color with configuration option name.
* Search for a color with configuration option name.
*
* Returns color string, NULL if not found.
* Return color string, NULL if not found.
*/
const char *
@@ -181,9 +181,9 @@ gui_color_search_config (const char *color_name)
}
/*
* Returns flag for attribute char of a color.
* Return flag for attribute char of a color.
*
* Returns 0 if char is unknown.
* Return 0 if char is unknown.
*/
int
@@ -214,7 +214,7 @@ gui_color_attr_get_flag (char c)
}
/*
* Builds string with attributes of color.
* Build string with attributes of color.
*
* The str_attr must be at least 6 bytes long (5 for attributes + final '\0').
*/
@@ -245,7 +245,7 @@ gui_color_attr_build_string (int color, char *str_attr)
}
/*
* Gets a custom color with a name.
* Get a custom color with a name.
*/
const char *
@@ -539,9 +539,9 @@ gui_color_get_custom (const char *color_name)
}
/*
* Converts a terminal color to its RGB value.
* Convert a terminal color to its RGB value.
*
* Returns a RGB color as integer.
* Return a RGB color as integer.
*/
int
@@ -554,13 +554,13 @@ gui_color_convert_term_to_rgb (int color)
}
/*
* Converts a RGB color to the closest terminal color.
* Convert a RGB color to the closest terminal color.
*
* Argument "limit" is the number of colors to check in the table of terminal
* colors (starting from 0). So for example 256 will return any of the 256
* colors, 16 will return a color between 0 and 15.
*
* Returns the closest terminal color (0-255).
* Return the closest terminal color (0-255).
*/
int
@@ -601,14 +601,13 @@ gui_color_convert_rgb_to_term (int rgb, int limit)
}
/*
* Returns the size (in bytes) of the WeeChat color code at the beginning
* Return the size (in bytes) of the WeeChat color code at the beginning
* of "string".
*
* If "string" is NULL, empty or does not start with a color code,
* it returns 0.
* Return 0 if "string" is NULL, empty or does not start with a color code.
*
* If "string" begins with multiple color codes, only the size of the first
* one is returned.
* Return the size of the first color code if "string" begins with multiple
* color codes.
*/
int
@@ -777,7 +776,7 @@ gui_color_code_size (const char *string)
}
/*
* Removes WeeChat color codes from a message and optionally replaces them
* Remove WeeChat color codes from a message and optionally replaces them
* by a string.
*
* Note: result must be freed after use.
@@ -965,7 +964,7 @@ gui_color_decode (const char *string, const char *replacement)
}
/*
* Converts ANSI color codes to WeeChat colors (or removes them).
* Convert ANSI color codes to WeeChat colors (or removes them).
*
* This callback is called by gui_color_decode_ansi, it must not be called
* directly.
@@ -1189,7 +1188,7 @@ end:
}
/*
* Converts ANSI color codes to WeeChat colors (or removes them).
* Convert ANSI color codes to WeeChat colors (or removes them).
*
* Note: result must be freed after use.
*/
@@ -1220,7 +1219,7 @@ gui_color_decode_ansi (const char *string, int keep_colors)
}
/*
* Adds an ANSI color code with a WeeChat attribute flag.
* Add an ANSI color code with a WeeChat attribute flag.
*/
void
@@ -1253,9 +1252,9 @@ gui_color_add_ansi_flag (char **output, int flag)
}
/*
* Converts a WeeChat color number to an ANSI color number.
* Convert a WeeChat color number to an ANSI color number.
*
* Returns -1 if the color is not found.
* Return -1 if the color is not found.
*/
int
@@ -1279,7 +1278,7 @@ gui_color_weechat_to_ansi (int color)
}
/*
* Replaces WeeChat colors by ANSI colors.
* Replace WeeChat colors by ANSI colors.
*
* Note: result must be freed after use.
*/
@@ -1726,12 +1725,12 @@ gui_color_encode_ansi (const char *string)
}
/*
* Emphasizes a string or regular expression in a string (which can contain
* Emphasize a string or regular expression in a string (which can contain
* colors).
*
* Argument "case_sensitive" is used only for "search", if the "regex" is NULL.
*
* Returns string with the search string/regex emphasized, NULL if error.
* Return string with the search string/regex emphasized, NULL if error.
*
* Note: result must be freed after use.
*/
@@ -1883,7 +1882,7 @@ gui_color_emphasize (const char *string,
}
/*
* Frees a color.
* Free a color.
*/
void
@@ -1916,7 +1915,7 @@ gui_color_palette_free_value_cb (struct t_hashtable *hashtable,
}
/*
* Allocates hashtables and lists for palette.
* Allocate hashtables and lists for palette.
*/
void
@@ -1946,9 +1945,9 @@ gui_color_palette_alloc_structs (void)
}
/*
* Gets color pair number with alias.
* Get color pair number with alias.
*
* Returns -1 if alias is not found.
* Return -1 if alias is not found.
*/
int
@@ -1968,7 +1967,7 @@ gui_color_palette_get_alias (const char *alias)
}
/*
* Gets a color palette with number.
* Get a color palette with number.
*/
struct t_gui_color_palette *
@@ -1982,7 +1981,7 @@ gui_color_palette_get (int number)
}
/*
* Adds a color in palette.
* Add a color in palette.
*/
void
@@ -2007,7 +2006,7 @@ gui_color_palette_add (int number, const char *value)
}
/*
* Removes a color in palette.
* Remove a color in palette.
*/
void
@@ -2032,7 +2031,7 @@ gui_color_palette_remove (int number)
}
/*
* Frees hashtables and lists for palette.
* Free hashtables and lists for palette.
*/
void
@@ -2044,7 +2043,7 @@ gui_color_palette_free_structs (void)
}
/*
* Initializes colors.
* Initialize colors.
*/
void
@@ -2059,7 +2058,7 @@ gui_color_init (void)
}
/*
* Ends GUI colors.
* End GUI colors.
*/
void
+42 -42
View File
@@ -59,7 +59,7 @@ int gui_completion_freeze = 0; /* 1 to freeze completions (do not */
/*
* Compares two words in completion list.
* Compare two words in completion list.
*/
int
@@ -85,7 +85,7 @@ gui_completion_word_compare_cb (void *data,
}
/*
* Frees a word in completion list.
* Free a word in completion list.
*/
void
@@ -107,7 +107,7 @@ gui_completion_word_free_cb (void *data,
}
/*
* Initializes completion.
* Initialize completion.
*/
void
@@ -148,9 +148,9 @@ gui_completion_init (struct t_gui_completion *completion,
}
/*
* Creates a new completion.
* Create a new completion.
*
* Returns pointer to completion, NULL if error.
* Return pointer to completion, NULL if error.
*/
struct t_gui_completion *
@@ -181,9 +181,9 @@ gui_completion_new (struct t_weechat_plugin *plugin,
}
/*
* Adds an item to partial completion list.
* Add an item to partial completion list.
*
* Returns pointer to new item, NULL if error.
* Return pointer to new item, NULL if error.
*/
struct t_gui_completion_word *
@@ -206,7 +206,7 @@ gui_completion_partial_list_add (struct t_gui_completion *completion,
}
/*
* Frees data in completion.
* Free data in completion.
*/
void
@@ -238,7 +238,7 @@ gui_completion_free_data (struct t_gui_completion *completion)
}
/*
* Frees completion.
* Free completion.
*/
void
@@ -270,7 +270,7 @@ gui_completion_free (struct t_gui_completion *completion)
}
/*
* Frees all completions created by a plugin.
* Free all completions created by a plugin.
*/
void
@@ -289,7 +289,7 @@ gui_completion_free_all_plugin (struct t_weechat_plugin *plugin)
}
/*
* Stops completion (for example after 1 argument of command with 1 argument).
* Stop completion (for example after 1 argument of command with 1 argument).
*/
void
@@ -310,9 +310,9 @@ gui_completion_stop (struct t_gui_completion *completion)
}
/*
* Checks if nick has one or more ignored chars (for nick comparison).
* Check if nick has one or more ignored chars (for nick comparison).
*
* Returns:
* Return:
* 1: nick has one or more ignored chars
* 0: nick has no ignored chars
*/
@@ -341,7 +341,7 @@ gui_completion_nick_has_ignored_chars (const char *string)
}
/*
* Duplicates a nick and ignores some chars.
* Duplicate a nick and ignores some chars.
*
* Note: result must be freed after use.
*/
@@ -379,7 +379,7 @@ gui_completion_nick_strdup_ignore_chars (const char *string)
* Locale and case independent string comparison with max length for nicks
* (alpha or digits only).
*
* Returns:
* Return:
* < 0: base_word < nick
* 0: base_word == nick
* > 0: base_word > nick
@@ -417,9 +417,9 @@ gui_completion_nickncmp (const char *base_word, const char *nick, int max)
}
/*
* Compares two strings (follows case-sensitive flag in completion structure).
* Compare two strings (follows case-sensitive flag in completion structure).
*
* Returns:
* Return:
* < 0: string1 < string2
* 0: string1 == string2
* > 0: string1 > string2
@@ -437,10 +437,10 @@ gui_completion_strcmp (struct t_gui_completion *completion,
}
/*
* Compares two strings with max length (follows case-sensitive flag in
* Compare two strings with max length (follows case-sensitive flag in
* completion structure).
*
* Returns:
* Return:
* < 0: string1 < string2
* 0: string1 == string2
* > 0: string1 > string2
@@ -459,9 +459,9 @@ gui_completion_strncmp (struct t_gui_completion *completion,
}
/*
* Checks if a nick is ignored from completion (no completion with this nick).
* Check if a nick is ignored from completion (no completion with this nick).
*
* Returns:
* Return:
* 1: nick ignored
* 0: nick NOT ignored (can be used in completion)
*/
@@ -497,7 +497,7 @@ gui_completion_nick_ignored (const char *nick)
}
/*
* Adds a word to completion list.
* Add a word to completion list.
*/
void
@@ -573,7 +573,7 @@ gui_completion_custom (struct t_gui_completion *completion,
}
/*
* Builds data list according to a template.
* Build data list according to a template.
*/
void
@@ -657,7 +657,7 @@ gui_completion_build_list_template (struct t_gui_completion *completion,
}
/*
* Gets template matching arguments for command.
* Get template matching arguments for command.
*/
int
@@ -718,9 +718,9 @@ gui_completion_get_matching_template (struct t_gui_completion *completion,
}
/*
* Searches for a command hook.
* Search for a command hook.
*
* Returns pointer to hook found, NULL if not found.
* Return pointer to hook found, NULL if not found.
*/
struct t_hook *
@@ -773,7 +773,7 @@ gui_completion_search_command (struct t_gui_completion *completion,
}
/*
* Gets template according to user arguments for command.
* Get template according to user arguments for command.
*/
char *
@@ -821,7 +821,7 @@ gui_completion_get_template_for_args (struct t_gui_completion *completion,
}
/*
* Builds data list according to command and argument index.
* Build data list according to command and argument index.
*/
void
@@ -896,7 +896,7 @@ gui_completion_build_list (struct t_gui_completion *completion)
}
/*
* Finds context for completion.
* Find context for completion.
*/
void
@@ -1102,9 +1102,9 @@ gui_completion_find_context (struct t_gui_completion *completion,
}
/*
* Finds common prefix size in matching items (case is ignored).
* Find common prefix size in matching items (case is ignored).
*
* If utf_char is not null, only words beginning with this char are compared
* If utf_char is not null, compare only words beginning with this char
* (all other words are ignored).
*
* For example with items:
@@ -1151,7 +1151,7 @@ gui_completion_common_prefix_size (struct t_arraylist *list,
}
/*
* Builds list with possible completions when a partial completion occurs.
* Build list with possible completions when a partial completion occurs.
*/
void
@@ -1233,7 +1233,7 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
}
/*
* Completes word using matching items.
* Complete word using matching items.
*/
void
@@ -1395,7 +1395,7 @@ gui_completion_complete (struct t_gui_completion *completion)
}
/*
* Completes a command.
* Complete a command.
*/
void
@@ -1423,7 +1423,7 @@ gui_completion_command (struct t_gui_completion *completion)
}
/*
* Gets default completion template: from buffer local variable
* Get default completion template: from buffer local variable
* "completion_default_template" if defined, or the value of option
* "weechat.completion.default_template".
*
@@ -1495,7 +1495,7 @@ gui_completion_auto (struct t_gui_completion *completion)
}
/*
* Completes word according to context.
* Complete word according to context.
*/
int
@@ -1630,7 +1630,7 @@ gui_completion_search (struct t_gui_completion *completion, const char *data,
}
/*
* Gets a completion property as string.
* Get a completion property as string.
*/
const char *
@@ -1651,7 +1651,7 @@ gui_completion_get_string (struct t_gui_completion *completion,
}
/*
* Sets a completion property.
* Set a completion property.
*/
void
@@ -1668,7 +1668,7 @@ gui_completion_set (struct t_gui_completion *completion,
}
/*
* Returns hdata for completion.
* Return hdata for completion.
*/
struct t_hdata *
@@ -1715,7 +1715,7 @@ gui_completion_hdata_completion_cb (const void *pointer, void *data,
}
/*
* Returns hdata for completion word.
* Return hdata for completion word.
*/
struct t_hdata *
@@ -1739,7 +1739,7 @@ gui_completion_hdata_completion_word_cb (const void *pointer, void *data,
}
/*
* Prints list of completion words in WeeChat log file (usually for crash dump).
* Print list of completion words in WeeChat log file (usually for crash dump).
*/
void
@@ -1760,7 +1760,7 @@ gui_completion_list_words_print_log (struct t_arraylist *list,
}
/*
* Prints completion list in WeeChat log file (usually for crash dump).
* Print completion list in WeeChat log file (usually for crash dump).
*/
void
+10 -11
View File
@@ -50,7 +50,7 @@ int gui_cursor_y = 0; /* position of cursor in cursor mode */
/*
* Toggles cursor mode.
* Toggle cursor mode.
*/
void
@@ -84,7 +84,7 @@ gui_cursor_mode_toggle (void)
}
/*
* Stops cursor mode.
* Stop cursor mode.
*/
void
@@ -95,7 +95,7 @@ gui_cursor_mode_stop (void)
}
/*
* Sets debug for cursor mode.
* Set debug for cursor mode.
*/
void
@@ -113,7 +113,7 @@ gui_cursor_debug_set (int debug)
}
/*
* Displays debug info about (x,y) in input.
* Display debug info about (x,y) in input.
*/
void
@@ -151,7 +151,7 @@ gui_cursor_display_debug_info (void)
}
/*
* Sets cursor at position (x,y).
* Set cursor at position (x,y).
*/
void
@@ -178,7 +178,7 @@ gui_cursor_move_xy (int x, int y)
}
/*
* Moves cursor by adding values to (x,y).
* Move cursor by adding values to (x,y).
*/
void
@@ -205,8 +205,7 @@ gui_cursor_move_add_xy (int add_x, int add_y)
}
/*
* Moves cursor to the given position: top_left, top_right, bottom_left or
* bottom_right.
* Move cursor to the given position: top_left, top_right, bottom_left or bottom_right.
*/
void
@@ -303,7 +302,7 @@ end:
}
/*
* Moves cursor to another area by adding values to (x,y).
* Move cursor to another area by adding values to (x,y).
*/
void
@@ -384,12 +383,12 @@ gui_cursor_move_area_add_xy (int add_x, int add_y)
}
/*
* Moves cursor to another area by name.
* Move cursor to another area by name.
*
* Parameter "position" can be "top_left", "top_right", "bottom_left" or
* "bottom_right" (if NULL, top left is the default position).
*
* Returns:
* Return:
* 1: OK
* 0: area not found
*/
+22 -22
View File
@@ -51,9 +51,9 @@ int gui_filters_enabled = 1; /* filters enabled? */
/*
* Checks if a line must be displayed or not (filtered).
* Check if a line must be displayed or not (filtered).
*
* Returns:
* Return:
* 1: line must be displayed (not filtered)
* 0: line must be hidden (filtered)
*/
@@ -110,7 +110,7 @@ gui_filter_check_line (struct t_gui_line_data *line_data)
}
/*
* Filters a buffer, using message filters.
* Filter a buffer, using message filters.
*
* If line_data is NULL, filters all lines in buffer.
* If line_data is not NULL, filters only this line_data.
@@ -188,7 +188,7 @@ gui_filter_buffer (struct t_gui_buffer *buffer,
}
/*
* Filters all buffers, using message filters.
* Filter all buffers, using message filters.
*
* If filter is NULL, filters all buffers.
* If filter is not NULL, filters only buffers matched by this filter.
@@ -212,7 +212,7 @@ gui_filter_all_buffers (struct t_gui_filter *filter)
}
/*
* Enables message filtering.
* Enable message filtering.
*/
void
@@ -228,7 +228,7 @@ gui_filter_global_enable (void)
}
/*
* Disables message filtering.
* Disable message filtering.
*/
void
@@ -244,9 +244,9 @@ gui_filter_global_disable (void)
}
/*
* Searches for a filter by name.
* Search for a filter by name.
*
* Returns pointer to filter found, NULL if not found.
* Return pointer to filter found, NULL if not found.
*/
struct t_gui_filter *
@@ -269,7 +269,7 @@ gui_filter_search_by_name (const char *name)
}
/*
* Displays an error when a new filter is created.
* Display an error when a new filter is created.
*/
void
@@ -284,7 +284,7 @@ gui_filter_new_error (const char *name, const char *error)
}
/*
* Searches for position of filter in list (to keep filters sorted by name).
* Search for position of filter in list (to keep filters sorted by name).
*/
struct t_gui_filter *
@@ -304,7 +304,7 @@ gui_filter_find_pos (struct t_gui_filter *filter)
}
/*
* Adds a filter to the list of filters (sorted by name).
* Add a filter to the list of filters (sorted by name).
*/
void
@@ -338,7 +338,7 @@ gui_filter_add_to_list (struct t_gui_filter *filter)
}
/*
* Removes a filter from list of filters.
* Remove a filter from list of filters.
*/
void
@@ -355,9 +355,9 @@ gui_filter_remove_from_list (struct t_gui_filter *filter)
}
/*
* Creates a new filter.
* Create a new filter.
*
* Returns pointer to new filter, NULL if error.
* Return pointer to new filter, NULL if error.
*/
struct t_gui_filter *
@@ -500,9 +500,9 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
}
/*
* Renames a filter.
* Rename a filter.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -527,7 +527,7 @@ gui_filter_rename (struct t_gui_filter *filter, const char *new_name)
}
/*
* Removes a filter.
* Remove a filter.
*/
void
@@ -565,7 +565,7 @@ gui_filter_free (struct t_gui_filter *filter)
}
/*
* Removes all filters.
* Remove all filters.
*/
void
@@ -578,7 +578,7 @@ gui_filter_free_all (void)
}
/*
* Returns hdata for filter.
* Return hdata for filter.
*/
struct t_hdata *
@@ -615,9 +615,9 @@ gui_filter_hdata_filter_cb (const void *pointer, void *data,
}
/*
* Adds a filter in an infolist.
* Add a filter in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -670,7 +670,7 @@ gui_filter_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints filter infos in WeeChat log file (usually for crash dump).
* Print filter infos in WeeChat log file (usually for crash dump).
*/
void
+7 -7
View File
@@ -43,9 +43,9 @@
/*
* Gets info about what is pointed by cursor at (x,y).
* Get info about what is pointed by cursor at (x,y).
*
* Returns pointer to focus info, NULL if error.
* Return pointer to focus info, NULL if error.
*
* Note: focus info must be freed after use.
*/
@@ -96,7 +96,7 @@ gui_focus_get_info (int x, int y)
}
/*
* Frees a focus info structure.
* Free a focus info structure.
*/
void
@@ -116,7 +116,7 @@ gui_focus_free_info (struct t_gui_focus_info *focus_info)
}
/*
* Adds local variables of buffer in hashtable.
* Add local variables of buffer in hashtable.
*/
void
@@ -141,9 +141,9 @@ gui_focus_buffer_localvar_map_cb (void *data,
}
/*
* Adds focus info into hashtable.
* Add focus info into hashtable.
*
* Returns pointer to new hashtable.
* Return pointer to new hashtable.
*
* Note: result must be freed after use.
*/
@@ -272,7 +272,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
}
/*
* Returns GUI focus info with hashtable "gui_focus_info".
* Return GUI focus info with hashtable "gui_focus_info".
*/
struct t_hashtable *
+14 -14
View File
@@ -51,7 +51,7 @@ int num_gui_history = 0;
/*
* Removes oldest history entry in a buffer.
* Remove oldest history entry in a buffer.
*/
void
@@ -78,7 +78,7 @@ gui_history_buffer_remove_oldest (struct t_gui_buffer *buffer)
}
/*
* Adds a text/command to buffer's history.
* Add a text/command to buffer's history.
*/
void
@@ -116,7 +116,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string)
}
/*
* Removes oldest global history entry.
* Remove oldest global history entry.
*/
void
@@ -149,7 +149,7 @@ gui_history_global_remove_oldest (void)
}
/*
* Adds a text/command to global history.
* Add a text/command to global history.
*/
void
@@ -186,7 +186,7 @@ gui_history_global_add (const char *string)
}
/*
* Adds a text/command to buffer's history + global history.
* Add a text/command to buffer's history + global history.
*/
void
@@ -211,9 +211,9 @@ gui_history_add (struct t_gui_buffer *buffer, const char *string)
}
/*
* Searches for text in a history entry.
* Search for text in a history entry.
*
* Returns:
* Return:
* 1: text found in line
* 0: text not found in line
*/
@@ -253,9 +253,9 @@ gui_history_search_text (struct t_gui_buffer *buffer,
}
/*
* Searches in history using string in buffer input.
* Search in history using string in buffer input.
*
* Returns:
* Return:
* 1: an history was found
* 0: text not found
*/
@@ -298,7 +298,7 @@ gui_history_search (struct t_gui_buffer *buffer,
}
/*
* Frees global history.
* Free global history.
*/
void
@@ -321,7 +321,7 @@ gui_history_global_free (void)
/*
* Frees history for a buffer.
* Free history for a buffer.
*/
void
@@ -402,7 +402,7 @@ gui_history_hdata_history_update_cb (void *data,
}
/*
* Returns hdata for history.
* Return hdata for history.
*/
struct t_hdata *
@@ -429,9 +429,9 @@ gui_history_hdata_history_cb (const void *pointer, void *data,
}
/*
* Adds history in an infolist.
* Add history in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
+29 -29
View File
@@ -61,7 +61,7 @@ char *gui_hotlist_priority_string[GUI_HOTLIST_NUM_PRIORITIES] =
/*
* Sends signal "hotlist_changed".
* Send signal "hotlist_changed".
*/
void
@@ -72,9 +72,9 @@ gui_hotlist_changed_signal (struct t_gui_buffer *buffer)
}
/*
* Searches for hotlist priority.
* Search for hotlist priority.
*
* Returns index of hotlist priority found, -1 if not found.
* Return index of hotlist priority found, -1 if not found.
*/
int
@@ -95,9 +95,9 @@ gui_hotlist_search_priority (const char *priority)
}
/*
* Searches for hotlist with buffer pointer.
* Search for hotlist with buffer pointer.
*
* Returns pointer to hotlist found, NULL if not found.
* Return pointer to hotlist found, NULL if not found.
*/
struct t_gui_hotlist *
@@ -115,9 +115,9 @@ gui_hotlist_search (struct t_gui_hotlist *hotlist, struct t_gui_buffer *buffer)
}
/*
* Duplicates a hotlist element.
* Duplicate a hotlist element.
*
* Returns pointer to new hotlist, NULL if error.
* Return pointer to new hotlist, NULL if error.
*/
struct t_gui_hotlist *
@@ -141,7 +141,7 @@ gui_hotlist_dup (struct t_gui_hotlist *hotlist)
}
/*
* Frees a hotlist and removes it from hotlist queue.
* Free a hotlist and removes it from hotlist queue.
*/
void
@@ -184,7 +184,7 @@ gui_hotlist_free (struct t_gui_hotlist **hotlist,
}
/*
* Frees all hotlists.
* Free all hotlists.
*/
void
@@ -199,9 +199,9 @@ gui_hotlist_free_all (struct t_gui_hotlist **hotlist,
}
/*
* Checks if a buffer must be added to hotlist, according to its notify level.
* Check if a buffer must be added to hotlist, according to its notify level.
*
* Returns:
* Return:
* 1: buffer must be added to hotlist
* 0: buffer must not be added to hotlist
*/
@@ -230,12 +230,12 @@ gui_hotlist_check_buffer_notify (struct t_gui_buffer *buffer,
}
/*
* Compares two hotlists in order to add them in the sorted list.
* Compare two hotlists in order to add them in the sorted list.
*
* The comparison is made using the list of fields defined in the option
* "weechat.look.hotlist_sort".
*
* Returns:
* Return:
* -1: hotlist1 < hotlist2
* 0: hotlist1 == hotlist2
* 1: hotlist1 > hotlist2
@@ -285,7 +285,7 @@ gui_hotlist_compare_hotlists (struct t_hdata *hdata_hotlist,
}
/*
* Searches for position of hotlist (to keep hotlist sorted).
* Search for position of hotlist (to keep hotlist sorted).
*/
struct t_gui_hotlist *
@@ -310,7 +310,7 @@ gui_hotlist_find_pos (struct t_gui_hotlist *hotlist,
}
/*
* Adds new hotlist in list.
* Add new hotlist in list.
*/
void
@@ -354,11 +354,11 @@ gui_hotlist_add_hotlist (struct t_gui_hotlist **hotlist,
}
/*
* Adds a buffer to hotlist, with priority.
* Add a buffer to hotlist, with priority.
*
* If creation_time is NULL, current time is used.
* If creation_time is NULL, use current time.
*
* Returns pointer to hotlist created or changed, NULL if no hotlist was
* Return pointer to hotlist created or changed, NULL if no hotlist was
* created/changed.
*/
@@ -495,7 +495,7 @@ gui_hotlist_add (struct t_gui_buffer *buffer,
}
/*
* Restores a hotlist that was removed from a buffer.
* Restore a hotlist that was removed from a buffer.
*/
void
@@ -523,7 +523,7 @@ gui_hotlist_restore_buffer (struct t_gui_buffer *buffer)
}
/*
* Restores latest hotlist removed in all buffers.
* Restore latest hotlist removed in all buffers.
*/
void
@@ -539,7 +539,7 @@ gui_hotlist_restore_all_buffers (void)
}
/*
* Resorts hotlist.
* Resort hotlist.
*/
void
@@ -577,7 +577,7 @@ gui_hotlist_resort (void)
}
/*
* Clears hotlist with a level mask (integer).
* Clear hotlist with a level mask (integer).
*
* Argument "level_mask" is a combination of:
* 1 = join/part
@@ -616,7 +616,7 @@ gui_hotlist_clear (int level_mask)
}
/*
* Clears hotlist with a level mask (string).
* Clear hotlist with a level mask (string).
*/
void
@@ -682,7 +682,7 @@ gui_hotlist_clear_level_string (struct t_gui_buffer *buffer,
}
/*
* Removes a buffer from hotlist.
* Remove a buffer from hotlist.
*/
void
@@ -734,7 +734,7 @@ gui_hotlist_remove_buffer (struct t_gui_buffer *buffer,
}
/*
* Returns hdata for hotlist.
* Return hdata for hotlist.
*/
struct t_hdata *
@@ -765,9 +765,9 @@ gui_hotlist_hdata_hotlist_cb (const void *pointer, void *data,
}
/*
* Adds a hotlist in an infolist.
* Add a hotlist in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -839,7 +839,7 @@ gui_hotlist_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints hotlist in WeeChat log file (usually for crash dump).
* Print hotlist in WeeChat log file (usually for crash dump).
*/
void
@@ -867,7 +867,7 @@ gui_hotlist_print_log (void)
}
/*
* Ends hotlist.
* End hotlist.
*/
void
+69 -73
View File
@@ -51,10 +51,9 @@ char *gui_input_clipboard = NULL; /* internal clipboard content */
/*
* Optimizes input buffer size by adding or deleting data block (predefined
* size).
* Optimize input buffer size by adding or deleting data block (predefined size).
*
* Returns:
* Return:
* 1: input size optimized
* 0: error (input and its size are not changed)
*/
@@ -87,7 +86,7 @@ gui_input_optimize_size (struct t_gui_buffer *buffer,
}
/*
* Replaces full input by another string, trying to keep cursor position if new
* Replace full input by another string, trying to keep cursor position if new
* string is long enough.
*/
@@ -121,7 +120,7 @@ gui_input_replace_input (struct t_gui_buffer *buffer, const char *new_input)
}
/*
* Sends signal "input_paste_pending".
* Send signal "input_paste_pending".
*/
void
@@ -138,7 +137,7 @@ gui_input_paste_pending_signal (void)
}
/*
* Sends modifier and signal "input_text_changed".
* Send modifier and signal "input_text_changed".
*/
void
@@ -188,7 +187,7 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
}
/*
* Sends signal "input_text_cursor_moved".
* Send signal "input_text_cursor_moved".
*/
void
@@ -205,7 +204,7 @@ gui_input_text_cursor_moved_signal (struct t_gui_buffer *buffer)
}
/*
* Sends signal "input_search".
* Send signal "input_search".
*/
void
@@ -221,7 +220,7 @@ gui_input_search_signal (struct t_gui_buffer *buffer)
}
/*
* Sets position in input line.
* Set position in input line.
*/
void
@@ -237,7 +236,7 @@ gui_input_set_pos (struct t_gui_buffer *buffer, int pos)
}
/*
* Inserts a string into the input buffer at cursor position.
* Insert a string into the input buffer at cursor position.
*/
void
@@ -278,7 +277,7 @@ gui_input_insert_string (struct t_gui_buffer *buffer, const char *string)
}
/*
* Copies string into the internal clipboard.
* Copy string into the internal clipboard.
*/
void
@@ -300,7 +299,7 @@ gui_input_clipboard_copy (const char *buffer, int size)
}
/*
* Pastes the internal clipboard at cursor pos in input line
* Paste the internal clipboard at cursor pos in input line
* (default key: ctrl-y).
*/
@@ -318,7 +317,7 @@ gui_input_clipboard_paste (struct t_gui_buffer *buffer)
}
/*
* Sends data to buffer:
* Send data to buffer:
* - saves text in history
* - stops completion
* - frees all undos
@@ -340,7 +339,7 @@ gui_input_send_data_to_buffer (struct t_gui_buffer *buffer, char *data)
}
/*
* Sends current input to buffer.
* Send current input to buffer.
*/
void
@@ -374,7 +373,7 @@ gui_input_return (struct t_gui_buffer *buffer)
}
/*
* Splits input on newlines then sends each line to buffer.
* Split input on newlines then sends each line to buffer.
*/
void
@@ -406,7 +405,7 @@ gui_input_split_return (struct t_gui_buffer *buffer)
}
/*
* Completes a word in input buffer.
* Complete a word in input buffer.
*/
void
@@ -493,7 +492,7 @@ gui_input_complete (struct t_gui_buffer *buffer)
}
/*
* Completes with next word (default key: tab).
* Complete with next word (default key: tab).
*/
void
@@ -517,7 +516,7 @@ gui_input_complete_next (struct t_gui_buffer *buffer)
}
/*
* Completes with previous word (default key: shift-tab).
* Complete with previous word (default key: shift-tab).
*/
void
@@ -541,7 +540,7 @@ gui_input_complete_previous (struct t_gui_buffer *buffer)
}
/*
* Searches for text in buffer at current position (default key: ctrl-r).
* Search for text in buffer at current position (default key: ctrl-r).
*/
void
@@ -559,7 +558,7 @@ gui_input_search_text_here (struct t_gui_buffer *buffer)
}
/*
* Searches for text in buffer.
* Search for text in buffer.
*/
void
@@ -576,7 +575,7 @@ gui_input_search_text (struct t_gui_buffer *buffer)
}
/*
* Searches for text in buffer/global command line history.
* Search for text in buffer/global command line history.
*/
void
@@ -593,7 +592,7 @@ gui_input_search_history (struct t_gui_buffer *buffer)
}
/*
* Compiles regex used to search text in buffer.
* Compile regex used to search text in buffer.
*/
void
@@ -629,7 +628,7 @@ gui_input_search_compile_regex (struct t_gui_buffer *buffer)
}
/*
* Switches case for search in buffer (default key: alt-c during search).
* Switch case for search in buffer (default key: alt-c during search).
*/
void
@@ -647,7 +646,7 @@ gui_input_search_switch_case (struct t_gui_buffer *buffer)
}
/*
* Switches string/regex for search in buffer (default key: ctrl-r during
* Switch string/regex for search in buffer (default key: ctrl-r during
* search).
*/
@@ -666,7 +665,7 @@ gui_input_search_switch_regex (struct t_gui_buffer *buffer)
}
/*
* Switches search in messages/prefixes (default key: tab during search).
* Switch search in messages/prefixes (default key: tab during search).
*/
void
@@ -708,7 +707,7 @@ gui_input_search_switch_where (struct t_gui_buffer *buffer)
}
/*
* Searches backward in buffer (default key: up during search).
* Search backward in buffer (default key: up during search).
*/
void
@@ -739,7 +738,7 @@ gui_input_search_previous (struct t_gui_buffer *buffer)
}
/*
* Searches forward in buffer (default key: down during search).
* Search forward in buffer (default key: down during search).
*/
void
@@ -770,7 +769,7 @@ gui_input_search_next (struct t_gui_buffer *buffer)
}
/*
* Stops text search at current position (default key: return during search).
* Stop text search at current position (default key: return during search).
*/
void
@@ -797,7 +796,7 @@ gui_input_search_stop_here (struct t_gui_buffer *buffer)
}
/*
* Stops text search (default key: ctrl-q during search).
* Stop text search (default key: ctrl-q during search).
*/
void
@@ -824,7 +823,7 @@ gui_input_search_stop (struct t_gui_buffer *buffer)
}
/*
* Deletes previous char (default key: backspace).
* Delete previous char (default key: backspace).
*/
void
@@ -856,7 +855,7 @@ gui_input_delete_previous_char (struct t_gui_buffer *buffer)
}
/*
* Deletes next char (default key: del).
* Delete next char (default key: del).
*/
void
@@ -894,8 +893,7 @@ gui_input_delete_next_char (struct t_gui_buffer *buffer)
}
/*
* Delete the range between two positions and copy the content to the
* clipboard.
* Delete the range between two positions and copy the content to the clipboard.
*/
void
@@ -930,7 +928,7 @@ gui_input_delete_range (struct t_gui_buffer *buffer,
}
/*
* Deletes previous word (default key: alt-backspace).
* Delete previous word (default key: alt-backspace).
*/
void
@@ -969,7 +967,7 @@ gui_input_delete_previous_word (struct t_gui_buffer *buffer)
}
/*
* Deletes previous word until whitespace (default key: ctrl-w).
* Delete previous word until whitespace (default key: ctrl-w).
*/
void
@@ -1008,7 +1006,7 @@ gui_input_delete_previous_word_whitespace (struct t_gui_buffer *buffer)
}
/*
* Deletes next word (default key: alt-d).
* Delete next word (default key: alt-d).
*/
void
@@ -1056,9 +1054,9 @@ gui_input_delete_next_word (struct t_gui_buffer *buffer)
}
/*
* Deletes all from cursor pos to beginning of line (default key: ctrl-u).
* Delete all from cursor pos to beginning of line (default key: ctrl-u).
*
* If cursor is at beginning of line, deletes to beginning of previous line.
* If cursor is at beginning of line, delete to beginning of previous line.
*/
void
@@ -1112,9 +1110,9 @@ gui_input_delete_beginning_of_line (struct t_gui_buffer *buffer)
}
/*
* Deletes all from cursor pos to end of line (default key: ctrl-k).
* Delete all from cursor pos to end of line (default key: ctrl-k).
*
* If cursor is at end of line, deletes to end of next line.
* If cursor is at end of line, delete to end of next line.
*/
void
@@ -1163,7 +1161,7 @@ gui_input_delete_end_of_line (struct t_gui_buffer *buffer)
}
/*
* Deletes all from cursor pos to beginning of input (default key: alt-ctrl-u).
* Delete all from cursor pos to beginning of input (default key: alt-ctrl-u).
*/
void
@@ -1199,7 +1197,7 @@ gui_input_delete_beginning_of_input (struct t_gui_buffer *buffer)
}
/*
* Deletes all from cursor pos to end of input (default key: alt-ctrl-k).
* Delete all from cursor pos to end of input (default key: alt-ctrl-k).
*/
void
@@ -1226,7 +1224,7 @@ gui_input_delete_end_of_input (struct t_gui_buffer *buffer)
}
/*
* Deletes current line (default key: alt-r).
* Delete current line (default key: alt-r).
*/
void
@@ -1271,7 +1269,7 @@ gui_input_delete_line (struct t_gui_buffer *buffer)
}
/*
* Deletes entire input (default key: alt-R).
* Delete entire input (default key: alt-R).
*/
void
@@ -1292,7 +1290,7 @@ gui_input_delete_input (struct t_gui_buffer *buffer)
}
/*
* Transposes chars at cursor pos (default key: ctrl-t).
* Transpose chars at cursor pos (default key: ctrl-t).
*/
void
@@ -1331,9 +1329,9 @@ gui_input_transpose_chars (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to beginning of line (default key: home).
* Move cursor to beginning of line (default key: home).
*
* If cursor is at beginning of line, moves to beginning of previous line.
* If cursor is at beginning of line, move to beginning of previous line.
*/
void
@@ -1366,9 +1364,9 @@ gui_input_move_beginning_of_line (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to end of line (default key: end).
* Move cursor to end of line (default key: end).
*
* If cursor is at end of line, moves to end of next line.
* If cursor is at end of line, move to end of next line.
*/
void
@@ -1401,7 +1399,7 @@ gui_input_move_end_of_line (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to beginning of input (default key: shift-home).
* Move cursor to beginning of input (default key: shift-home).
*/
void
@@ -1415,7 +1413,7 @@ gui_input_move_beginning_of_input (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to end of input (default key: shift-end).
* Move cursor to end of input (default key: shift-end).
*/
void
@@ -1432,7 +1430,7 @@ gui_input_move_end_of_input (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to previous char (default key: left).
* Move cursor to previous char (default key: left).
*/
void
@@ -1446,7 +1444,7 @@ gui_input_move_previous_char (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to next char (default key: right).
* Move cursor to next char (default key: right).
*/
void
@@ -1463,8 +1461,7 @@ gui_input_move_next_char (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to beginning of previous word (default key: alt-b or
* ctrl-left).
* Move cursor to beginning of previous word (default key: alt-b or ctrl-left).
*/
void
@@ -1503,8 +1500,7 @@ gui_input_move_previous_word (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to the beginning of next word (default key: alt-f or
* ctrl-right).
* Move cursor to the beginning of next word (default key: alt-f or ctrl-right).
*/
void
@@ -1546,7 +1542,7 @@ gui_input_move_next_word (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to previous line (default key: shift-up).
* Move cursor to previous line (default key: shift-up).
*/
void
@@ -1595,7 +1591,7 @@ gui_input_move_previous_line (struct t_gui_buffer *buffer)
}
/*
* Moves cursor to next line (default key: shift-down).
* Move cursor to next line (default key: shift-down).
*/
void
@@ -1643,7 +1639,7 @@ gui_input_move_next_line (struct t_gui_buffer *buffer)
}
/*
* Recalls previous command from local or global history.
* Recall previous command from local or global history.
*/
void
@@ -1700,7 +1696,7 @@ gui_input_history_previous (struct t_gui_window *window,
}
/*
* Recalls next command from local or global history.
* Recall next command from local or global history.
*/
void
@@ -1777,7 +1773,7 @@ gui_input_history_next (struct t_gui_window *window,
}
/*
* Recalls previous command from local history (default key: up).
* Recall previous command from local history (default key: up).
*/
void
@@ -1795,7 +1791,7 @@ gui_input_history_local_previous (struct t_gui_buffer *buffer)
}
/*
* Recalls next command from local history (default key: down).
* Recall next command from local history (default key: down).
*/
void
@@ -1813,7 +1809,7 @@ gui_input_history_local_next (struct t_gui_buffer *buffer)
}
/*
* Recalls previous command from global history (default key: ctrl-up).
* Recall previous command from global history (default key: ctrl-up).
*/
void
@@ -1831,7 +1827,7 @@ gui_input_history_global_previous (struct t_gui_buffer *buffer)
}
/*
* Recalls next command from global history (default key: ctrl-down).
* Recall next command from global history (default key: ctrl-down).
*/
void
@@ -1849,8 +1845,8 @@ gui_input_history_global_next (struct t_gui_buffer *buffer)
}
/*
* Sends the current history entry (found with search or recalled with
* "up" key) and inserts the next one in the command line without sending it
* Send the current history entry (found with search or recalled with
* "up" key) and insert the next one in the command line without sending it
* (default key: ctrl-o, in contexts "default" and "histsearch").
*/
@@ -1897,7 +1893,7 @@ gui_input_history_use_get_next (struct t_gui_buffer *buffer)
}
/*
* Initializes "grab key mode" (next key will be inserted into input buffer)
* Initialize "grab key mode" (next key will be inserted into input buffer)
* (default key: alt-k).
*/
@@ -1909,7 +1905,7 @@ gui_input_grab_key (struct t_gui_buffer *buffer, int command, const char *delay)
}
/*
* Initializes "grab mouse mode" (next mouse event will be inserted into input
* Initialize "grab mouse mode" (next mouse event will be inserted into input
* buffer) (default key: button2 of mouse in input bar).
*/
@@ -1921,7 +1917,7 @@ gui_input_grab_mouse (struct t_gui_buffer *buffer, int area)
}
/*
* Inserts a string in command line.
* Insert a string in command line.
*/
void
@@ -1942,7 +1938,7 @@ gui_input_insert (struct t_gui_buffer *buffer, const char *args)
}
/*
* Uses a undo: replace input with undo content.
* Use a undo: replace input with undo content.
*/
void
@@ -1959,7 +1955,7 @@ gui_input_undo_use (struct t_gui_buffer *buffer, struct t_gui_input_undo *undo)
}
/*
* Undoes last action on input buffer (default key: ctrl-_).
* Undo last action on input buffer (default key: ctrl-_).
*/
void
@@ -1990,7 +1986,7 @@ gui_input_undo (struct t_gui_buffer *buffer)
}
/*
* Redoes last action on input buffer (default key: alt-_).
* Redo last action on input buffer (default key: alt-_).
*/
void
+79 -79
View File
@@ -109,7 +109,7 @@ time_t gui_key_last_activity_time = 0; /* last activity time (key) */
/*
* Initializes keyboard.
* Initialize keyboard.
*/
void
@@ -142,9 +142,9 @@ gui_key_init (void)
}
/*
* Searches for a context by name.
* Search for a context by name.
*
* Returns index of context in enum t_gui_key_context, -1 if not found.
* Return index of context in enum t_gui_key_context, -1 if not found.
*/
int
@@ -166,7 +166,7 @@ gui_key_search_context (const char *context)
}
/*
* Gets current context.
* Get current context.
*/
int
@@ -187,7 +187,7 @@ gui_key_get_current_context (void)
}
/*
* Initializes "grab" mode.
* Initialize "grab" mode.
*/
void
@@ -215,7 +215,7 @@ gui_key_grab_init (int grab_command, const char *delay)
}
/*
* Inserts grabbed key in input buffer.
* Insert grabbed key in input buffer.
*/
int
@@ -303,7 +303,7 @@ gui_key_grab_end_timer_cb (const void *pointer, void *data, int remaining_calls)
}
/*
* Gets internal code from user key name.
* Get internal code from user key name.
*
* Note: this function works with legacy keys (WeeChat < 4.0.0) and should not
* be used anymore.
@@ -384,7 +384,7 @@ gui_key_legacy_internal_code (const char *key)
}
/*
* Expands raw key code to its name and name using aliases (human readable
* Expand raw key code to its name and name using aliases (human readable
* key name).
*
* Examples (return: rc, key name, key name with alias):
@@ -397,7 +397,7 @@ gui_key_legacy_internal_code (const char *key)
* "\001[[1;3D" => 1, "meta-[1;3D", "meta-left"
* "\001[w\001[[1;3A" => 1, "meta-w,meta-[1;3A", "meta-w,meta-up"
*
* Returns:
* Return:
* 1: OK
* 0: error: incomplete/invalid raw key
*
@@ -827,7 +827,7 @@ error:
}
/*
* Converts a legacy key to the new key name (using comma separator and alias).
* Convert a legacy key to the new key name (using comma separator and alias).
*
* Examples:
* "ctrl-" => NULL
@@ -875,7 +875,7 @@ gui_key_legacy_to_alias (const char *key)
}
/*
* Attempts to fix a key in mouse context (starting with "@area:"):
* Attempt to fix a key in mouse context (starting with "@area:"):
* - transform "ctrl-alt-" to "alt-ctrl-"
*
* Example:
@@ -916,7 +916,7 @@ gui_key_fix_mouse (const char *key)
}
/*
* Attempts to fix key:
* Attempt to fix key:
* - transform upper case ctrl keys to lower case ("ctrl-A" -> "ctrl-a")
* - replace " " by "space"
* - replace "meta2-" by "meta-["
@@ -993,7 +993,7 @@ gui_key_fix (const char *key)
}
/*
* Searches for position of a key (to keep keys sorted).
* Search for position of a key (to keep keys sorted).
*/
struct t_gui_key *
@@ -1014,7 +1014,7 @@ gui_key_find_pos (struct t_gui_key *keys, struct t_gui_key *key)
}
/*
* Inserts key into sorted list.
* Insert key into sorted list.
*/
void
@@ -1062,7 +1062,7 @@ gui_key_insert_sorted (struct t_gui_key **keys,
}
/*
* Sets area type and name.
* Set area type and name.
*
* For example: "bar(nicklist)" returns:
* type: 2 (bar)
@@ -1111,7 +1111,7 @@ gui_key_set_area_type_name (const char *area,
}
/*
* Sets areas types (any, chat, bar or item) and names for a key.
* Set areas types (any, chat, bar or item) and names for a key.
*/
void
@@ -1166,7 +1166,7 @@ gui_key_set_areas (struct t_gui_key *key)
}
/*
* Computes a score key for sorting keys and set it in key (high score == at the
* Compute a score key for sorting keys and set it in key (high score == at the
* end of list).
*/
@@ -1215,10 +1215,10 @@ gui_key_set_score (struct t_gui_key *key)
}
/*
* Checks if a key is safe or not: a safe key should begin with the "meta" or
* Check if a key is safe or not: a safe key should begin with the "meta" or
* "ctrl" code (there are exceptions).
*
* Returns:
* Return:
* 1: key is safe for the given context
* 0: key is NOT safe for the given context
*/
@@ -1270,7 +1270,7 @@ gui_key_is_safe (int context, const char *key)
}
/*
* Checks if the key chunk seems valid.
* Check if the key chunk seems valid.
*
* Example of valid key chunk:
* "meta-a"
@@ -1283,7 +1283,7 @@ gui_key_is_safe (int context, const char *key)
* "meta-[A" (raw code)
* "ctrl-cb" (invalid: missing comma)
*
* Returns:
* Return:
* 1: key chunk seems valid
* 0: key chunk seems either invalid or a raw code
*/
@@ -1335,7 +1335,7 @@ gui_key_chunk_seems_valid (const char *chunk)
}
/*
* Checks if the key seems valid: not a raw code, and no comma is missing.
* Check if the key seems valid: not a raw code, and no comma is missing.
*
* Example of valid keys:
* "meta-a"
@@ -1348,7 +1348,7 @@ gui_key_chunk_seems_valid (const char *chunk)
* "meta-[A" (raw code)
* "ctrl-cb" (invalid: missing comma)
*
* Returns:
* Return:
* 1: key seems valid
* 0: key seems either invalid or a raw code
*/
@@ -1416,9 +1416,9 @@ gui_key_option_change_cb (const void *pointer, void *data,
}
/*
* Creates a new key option.
* Create a new key option.
*
* Returns pointer to existing or new option.
* Return pointer to existing or new option.
*/
struct t_config_option *
@@ -1462,14 +1462,14 @@ gui_key_new_option (int context, const char *name, const char *value)
}
/*
* Adds a new key in keys list.
* Add a new key in keys list.
*
* If buffer is not null, then key is specific to buffer, otherwise it's general
* key (for most keys).
*
* If create_option == 1, a config option is created as well.
*
* Returns pointer to new key, NULL if error.
* Return pointer to new key, NULL if error.
*/
struct t_gui_key *
@@ -1571,9 +1571,9 @@ error:
}
/*
* Searches for a key.
* Search for a key.
*
* Returns pointer to key found, NULL if not found.
* Return pointer to key found, NULL if not found.
*/
struct t_gui_key *
@@ -1597,7 +1597,7 @@ gui_key_search (struct t_gui_key *keys, const char *key)
/*
* Compare chunks with key chunks.
*
* Returns:
* Return:
* 2: exact match
* 1: partial match (key_chunks starts with chunks but is longer)
* 0: no match
@@ -1621,14 +1621,14 @@ gui_key_compare_chunks (const char **chunks, int chunks_count,
}
/*
* Searches key chunks for context default, search or cursor (not for mouse).
* Search key chunks for context default, search or cursor (not for mouse).
* It can be part of key chunks or exact match.
*
* Parameter "chunks1" is the raw key split into chunks, and "chunks2" is the
* key with alias split into chunks (at least one of the chunks must be non
* NULL).
*
* Returns pointer to key found, NULL if not found.
* Return pointer to key found, NULL if not found.
* In case of exact match, *exact_match is set to 1, otherwise 0.
*/
@@ -1701,7 +1701,7 @@ gui_key_search_part (struct t_gui_buffer *buffer, int context,
}
/*
* Binds a key to a command.
* Bind a key to a command.
*
* If buffer is not null, then key is specific to buffer otherwise it's general
* key (for most keys).
@@ -1710,7 +1710,7 @@ gui_key_search_part (struct t_gui_buffer *buffer, int context,
*
* If key already exists, it is removed then added again with new value.
*
* Returns pointer to new key, NULL if error.
* Return pointer to new key, NULL if error.
*/
struct t_gui_key *
@@ -1756,7 +1756,7 @@ gui_key_bind (struct t_gui_buffer *buffer, int context, const char *key,
}
/*
* Binds keys in hashtable.
* Bind keys in hashtable.
*/
void
@@ -1800,12 +1800,12 @@ gui_key_bind_plugin_hashtable_map_cb (void *data,
}
/*
* Creates many keys using a hashtable (used by plugins only).
* Create many keys using a hashtable (used by plugins only).
*
* If key already exists, it is NOT changed (plugins should never overwrite user
* keys).
*
* Returns number of keys added.
* Return number of keys added.
*/
int
@@ -1831,9 +1831,9 @@ gui_key_bind_plugin (const char *context, struct t_hashtable *keys)
}
/*
* Removes one key binding.
* Remove one key binding.
*
* Returns:
* Return:
* 1: key removed
* 0: key not removed
*/
@@ -1883,9 +1883,9 @@ gui_key_unbind (struct t_gui_buffer *buffer, int context, const char *key)
}
/*
* Removes one or more key binding(s) (used by plugins only).
* Remove one or more key binding(s) (used by plugins only).
*
* Returns number of keys removed.
* Return number of keys removed.
*/
int
@@ -1947,9 +1947,9 @@ gui_key_unbind_plugin (const char *context, const char *key)
}
/*
* Checks if area in key is matching focus area on screen (cursor/mouse).
* Check if area in key is matching focus area on screen (cursor/mouse).
*
* Returns:
* Return:
* 1: area in key is matching focus area
* 0: area in key is not matching focus area
*/
@@ -2006,7 +2006,7 @@ gui_key_focus_matching (struct t_gui_key *key,
}
/*
* Displays focus hashtable (for debug).
* Display focus hashtable (for debug).
*/
void
@@ -2031,9 +2031,9 @@ gui_key_focus_display_hashtable (struct t_hashtable *hashtable)
}
/*
* Runs command according to focus.
* Run command according to focus.
*
* Returns:
* Return:
* 1: command was executed
* 0: command was not executed
*/
@@ -2183,10 +2183,10 @@ gui_key_focus_command (const char *key, int context,
}
/*
* Processes key pressed in cursor or mouse mode, looking for keys: "{area}key"
* Process key pressed in cursor or mouse mode, looking for keys: "{area}key"
* in context "cursor" or "mouse".
*
* Returns:
* Return:
* 1: command was executed
* 0: command was not executed
*/
@@ -2254,7 +2254,7 @@ end:
}
/*
* Prints a key in debug mode:
* Print a key in debug mode:
* - raw combo (eg: "^[[A")
* - for keyboard:
* - key name (eg: "meta-[A")
@@ -2333,9 +2333,9 @@ gui_key_debug_print_key (const char *combo, const char *key_name,
}
/*
* Processes a new key pressed.
* Process a new key pressed.
*
* Returns:
* Return:
* 1: key must be added to input buffer
* 0: key must not be added to input buffer
*/
@@ -2610,7 +2610,7 @@ end:
}
/*
* Deletes a key binding.
* Delete a key binding.
*
* If delete_option == 1, the config option is deleted.
*/
@@ -2661,7 +2661,7 @@ gui_key_free (int context,
}
/*
* Deletes all key bindings.
* Delete all key bindings.
*
* If delete_option == 1, the config options are deleted.
*/
@@ -2679,7 +2679,7 @@ gui_key_free_all (int context, struct t_gui_key **keys,
}
/*
* Optimizes keyboard buffer size.
* Optimize keyboard buffer size.
*/
void
@@ -2710,7 +2710,7 @@ gui_key_buffer_optimize (void)
}
/*
* Resets keyboard buffer (create empty if never created before).
* Reset keyboard buffer (create empty if never created before).
*/
void
@@ -2732,7 +2732,7 @@ gui_key_buffer_reset (void)
}
/*
* Adds a key to keyboard buffer.
* Add a key to keyboard buffer.
*/
void
@@ -2763,12 +2763,12 @@ gui_key_buffer_add (unsigned char key)
}
/*
* Searches for a string in gui_key_buffer (array of integers).
* Search for a string in gui_key_buffer (array of integers).
*
* Argument start_index must be >= 0.
* If max_index is negative, the search is until end of buffer.
*
* Returns index for string found in gui_key_buffer (not from "start_index" but
* Return index for string found in gui_key_buffer (not from "start_index" but
* from beginning of gui_key_buffer), or -1 if string is not found.
*/
@@ -2810,7 +2810,7 @@ gui_key_buffer_search (int start_index, int max_index, const char *string)
}
/*
* Removes some chars from gui_key_buffer.
* Remove some chars from gui_key_buffer.
*/
void
@@ -2826,7 +2826,7 @@ gui_key_buffer_remove (int index, int number)
}
/*
* Removes final newline at end of paste.
* Remove final newline at end of paste.
*/
void
@@ -2842,7 +2842,7 @@ gui_key_paste_remove_newline (void)
}
/*
* Replaces tabs by spaces in paste.
* Replace tabs by spaces in paste.
*/
void
@@ -2858,7 +2858,7 @@ gui_key_paste_replace_tabs (void)
}
/*
* Starts paste of text.
* Start paste of text.
*/
void
@@ -2869,7 +2869,7 @@ gui_key_paste_start (void)
}
/*
* Finishes paste of text. Does necessary modifications before flush of text.
* Finish paste of text, do necessary modifications before flush of text.
*/
void
@@ -2880,9 +2880,9 @@ gui_key_paste_finish (void)
}
/*
* Returns real number of lines in buffer.
* Return real number of lines in buffer.
*
* Returns number of lines (lines+1 if last key is not return).
* Return number of lines (lines+1 if last key is not return).
*/
int
@@ -2910,11 +2910,11 @@ gui_key_get_paste_lines (void)
}
/*
* Checks pasted lines: if more than N lines, then enables paste mode and ask
* Check pasted lines: if more than N lines, then enables paste mode and ask
* confirmation to user (ctrl-y=paste, ctrl-n=cancel) (N is option
* weechat.look.paste_max_lines).
*
* Returns:
* Return:
* 1: paste mode has been enabled
* 0: paste mode has not been enabled
*/
@@ -2967,7 +2967,7 @@ gui_key_paste_bracketed_timer_cb (const void *pointer, void *data,
}
/*
* Removes timer for bracketed paste.
* Remove timer for bracketed paste.
*/
void
@@ -2981,7 +2981,7 @@ gui_key_paste_bracketed_timer_remove (void)
}
/*
* Adds timer for bracketed paste.
* Add timer for bracketed paste.
*/
void
@@ -2996,7 +2996,7 @@ gui_key_paste_bracketed_timer_add (void)
}
/*
* Starts bracketed paste of text (ESC[200~ detected).
* Start bracketed paste of text (ESC[200~ detected).
*/
void
@@ -3007,7 +3007,7 @@ gui_key_paste_bracketed_start (void)
}
/*
* Stops bracketed paste of text (ESC[201~ detected or timeout while waiting for
* Stop bracketed paste of text (ESC[201~ detected or timeout while waiting for
* this code).
*/
@@ -3019,7 +3019,7 @@ gui_key_paste_bracketed_stop (void)
}
/*
* Accepts paste from user.
* Accept paste from user.
*/
void
@@ -3031,7 +3031,7 @@ gui_key_paste_accept (void)
}
/*
* Cancels paste from user (resets buffer).
* Cancel paste from user (resets buffer).
*/
void
@@ -3043,7 +3043,7 @@ gui_key_paste_cancel (void)
}
/*
* Ends keyboard (frees some data).
* End keyboard (frees some data).
*/
void
@@ -3072,7 +3072,7 @@ gui_key_end (void)
}
/*
* Returns hdata for key.
* Return hdata for key.
*/
struct t_hdata *
@@ -3131,9 +3131,9 @@ gui_key_hdata_key_cb (const void *pointer, void *data,
}
/*
* Adds a key in an infolist.
* Add a key in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -3171,7 +3171,7 @@ gui_key_add_to_infolist (struct t_infolist *infolist, struct t_gui_key *key)
}
/*
* Prints a key info in WeeChat log file (usually for crash dump).
* Print a key info in WeeChat log file (usually for crash dump).
*/
void
@@ -3197,7 +3197,7 @@ gui_key_print_log_key (struct t_gui_key *key, const char *prefix)
}
/*
* Prints key infos in WeeChat log file (usually for crash dump).
* Print key infos in WeeChat log file (usually for crash dump).
*/
void
+48 -48
View File
@@ -48,9 +48,9 @@ struct t_gui_layout *gui_layout_current = NULL;
/*
* Searches a layout by name.
* Search a layout by name.
*
* Returns pointer to layout found, NULL if not found.
* Return pointer to layout found, NULL if not found.
*/
struct t_gui_layout *
@@ -73,12 +73,12 @@ gui_layout_search (const char *name)
}
/*
* Allocates a new layout.
* Allocate a new layout.
*
* Note: the layout is not added to the list (a call to gui_layout_add() will do
* that).
*
* Returns pointer to new layout, NULL if error.
* Return pointer to new layout, NULL if error.
*/
struct t_gui_layout *
@@ -107,9 +107,9 @@ gui_layout_alloc (const char *name)
}
/*
* Adds a layout in "gui_layouts".
* Add a layout in "gui_layouts".
*
* Returns:
* Return:
* 1: layout added
* 0: layout not added (another layout exists with same name)
*/
@@ -138,7 +138,7 @@ gui_layout_add (struct t_gui_layout *layout)
}
/*
* Renames a layout.
* Rename a layout.
*/
void
@@ -152,7 +152,7 @@ gui_layout_rename (struct t_gui_layout *layout, const char *new_name)
}
/*
* Removes a buffer layout from a layout.
* Remove a buffer layout from a layout.
*/
void
@@ -180,7 +180,7 @@ gui_layout_buffer_remove (struct t_gui_layout *layout,
}
/*
* Removes all buffer layouts from a layout.
* Remove all buffer layouts from a layout.
*/
void
@@ -196,7 +196,7 @@ gui_layout_buffer_remove_all (struct t_gui_layout *layout)
}
/*
* Resets layout_number in all buffers.
* Reset layout_number in all buffers.
*/
void
@@ -212,9 +212,9 @@ gui_layout_buffer_reset (void)
}
/*
* Adds a buffer layout in a layout.
* Add a buffer layout in a layout.
*
* Returns pointer to buffer layout, NULL if error.
* Return pointer to buffer layout, NULL if error.
*/
struct t_gui_layout_buffer *
@@ -249,7 +249,7 @@ gui_layout_buffer_add (struct t_gui_layout *layout,
}
/*
* Gets layout number for a plugin/buffer.
* Get layout number for a plugin/buffer.
*/
void
@@ -292,7 +292,7 @@ gui_layout_buffer_get_number (struct t_gui_layout *layout,
}
/*
* Gets layout numbers for all buffers.
* Get layout numbers for all buffers.
*/
void
@@ -312,7 +312,7 @@ gui_layout_buffer_get_number_all (struct t_gui_layout *layout)
}
/*
* Stores current layout for buffers in a layout.
* Store current layout for buffers in a layout.
*/
void
@@ -339,7 +339,7 @@ gui_layout_buffer_store (struct t_gui_layout *layout)
}
/*
* Applies a layout for buffers.
* Applie a layout for buffers.
*/
void
@@ -376,7 +376,7 @@ gui_layout_buffer_apply (struct t_gui_layout *layout)
}
/*
* Removes a window layout.
* Remove a window layout.
*/
void
@@ -399,7 +399,7 @@ gui_layout_window_remove (struct t_gui_layout_window *layout_window)
}
/*
* Removes all window layouts from a layout.
* Remove all window layouts from a layout.
*/
void
@@ -417,7 +417,7 @@ gui_layout_window_remove_all (struct t_gui_layout *layout)
/*
* Resets layout for windows.
* Reset layout for windows.
*/
void
@@ -441,9 +441,9 @@ gui_layout_window_reset (void)
}
/*
* Searches for a window layout by internal id.
* Searche for a window layout by internal id.
*
* Returns pointer to window layout found, NULL if not found.
* Return pointer to window layout found, NULL if not found.
*/
struct t_gui_layout_window *
@@ -476,9 +476,9 @@ gui_layout_window_search_by_id (struct t_gui_layout_window *layout_window,
}
/*
* Adds a window layout.
* Add a window layout.
*
* Returns pointer to new window layout, NULL if not found.
* Return pointer to new window layout, NULL if not found.
*/
struct t_gui_layout_window *
@@ -525,7 +525,7 @@ gui_layout_window_add (struct t_gui_layout_window **layout_window,
}
/*
* Stores tree of windows.
* Store tree of windows.
*/
void
@@ -575,9 +575,9 @@ gui_layout_window_store_tree (struct t_gui_layout *layout,
}
/*
* Stores current layout for windows in a layout.
* Store current layout for windows in a layout.
*
* Returns internal id of current window.
* Return internal id of current window.
*/
void
@@ -596,9 +596,9 @@ gui_layout_window_store (struct t_gui_layout *layout)
}
/*
* Checks whether a window has its layout buffer displayed or not.
* Check whether a window has its layout buffer displayed or not.
*
* Returns:
* Return:
* 1: the window has layout info and the proper buffer displayed
* 0: the window has layout info but NOT the proper buffer displayed
* -1: the window has no layout info
@@ -624,7 +624,7 @@ gui_layout_window_check_buffer (struct t_gui_window *window)
}
/*
* Assigns a buffer to windows.
* Assign a buffer to windows.
*/
void
@@ -649,8 +649,8 @@ gui_layout_window_assign_buffer (struct t_gui_buffer *buffer)
}
/*
* For each window, checks if another buffer should be assigned, and if yes,
* assigns it.
* For each window, check if another buffer should be assigned, and if yes,
* assign it.
*/
void
@@ -678,7 +678,7 @@ gui_layout_window_assign_all_buffers (void)
}
/*
* Applies tree windows (re-splits screen according to windows tree and assigns
* Apply tree windows (re-split screen according to windows tree and assign
* buffer to windows).
*/
@@ -736,7 +736,7 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window,
}
/*
* Applies current layout for windows.
* Apply current layout for windows.
*/
void
@@ -766,7 +766,7 @@ gui_layout_window_apply (struct t_gui_layout *layout,
}
/*
* Stores layout according to option "store_layout_on_exit".
* Store layout according to option "store_layout_on_exit".
*/
void
@@ -813,7 +813,7 @@ gui_layout_store_on_exit (void)
}
/*
* Frees a layout.
* Free a layout.
*/
void
@@ -837,7 +837,7 @@ gui_layout_free (struct t_gui_layout *layout)
}
/*
* Removes a layout from hashtable "gui_layouts".
* Remove a layout from hashtable "gui_layouts".
*/
void
@@ -872,7 +872,7 @@ gui_layout_remove (struct t_gui_layout *layout)
}
/*
* Removes all layouts from "gui_layouts".
* Remove all layouts from "gui_layouts".
*/
void
@@ -885,7 +885,7 @@ gui_layout_remove_all (void)
}
/*
* Returns hdata for buffer layout.
* Return hdata for buffer layout.
*/
struct t_hdata *
@@ -912,7 +912,7 @@ gui_layout_hdata_layout_buffer_cb (const void *pointer, void *data,
}
/*
* Returns hdata for window layout.
* Return hdata for window layout.
*/
struct t_hdata *
@@ -941,7 +941,7 @@ gui_layout_hdata_layout_window_cb (const void *pointer, void *data,
}
/*
* Returns hdata for layout.
* Return hdata for layout.
*/
struct t_hdata *
@@ -974,9 +974,9 @@ gui_layout_hdata_layout_cb (const void *pointer, void *data,
}
/*
* Adds a buffer layout in an infolist.
* Add a buffer layout in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1005,9 +1005,9 @@ gui_layout_buffer_add_to_infolist (struct t_infolist *infolist,
}
/*
* Adds a window layout in an infolist.
* Add a window layout in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1050,9 +1050,9 @@ gui_layout_window_add_to_infolist (struct t_infolist *infolist,
}
/*
* Adds a layout in an infolist.
* Add a layout in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1084,7 +1084,7 @@ gui_layout_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints windows layout infos in WeeChat log file (usually for crash dump).
* Print windows layout infos in WeeChat log file (usually for crash dump).
*/
void
@@ -1114,7 +1114,7 @@ gui_layout_print_log_window (struct t_gui_layout_window *layout_window,
}
/*
* Prints layouts in WeeChat log file (usually for crash dump).
* Print layouts in WeeChat log file (usually for crash dump).
*/
void
+69 -69
View File
@@ -51,9 +51,9 @@
/*
* Allocates structure "t_gui_lines" and initializes it.
* Allocate structure "t_gui_lines" and initialize it.
*
* Returns pointer to new lines, NULL if error.
* Return pointer to new lines, NULL if error.
*/
struct t_gui_lines *
@@ -80,7 +80,7 @@ gui_line_lines_alloc (void)
}
/*
* Frees a "t_gui_lines" structure.
* Free a "t_gui_lines" structure.
*/
void
@@ -93,7 +93,7 @@ gui_line_lines_free (struct t_gui_lines *lines)
}
/*
* Allocates array with tags in a line_data.
* Allocate array with tags in a line_data.
*/
void
@@ -115,7 +115,7 @@ gui_line_tags_alloc (struct t_gui_line_data *line_data, const char *tags)
}
/*
* Frees array with tags in a line_data.
* Free array with tags in a line_data.
*/
void
@@ -133,11 +133,11 @@ gui_line_tags_free (struct t_gui_line_data *line_data)
}
/*
* Checks if prefix on line is a nick and is the same as nick on previous/next
* Check if prefix on line is a nick and is the same as nick on previous/next
* line (according to direction: if < 0, check if it's the same nick as
* previous line, otherwise next line).
*
* Returns:
* Return:
* 1: prefix is a nick and same as nick on previous/next line
* 0: prefix is not a nick, or different from nick on previous/next line
*/
@@ -191,11 +191,11 @@ gui_line_prefix_is_same_nick (struct t_gui_line *line, int direction)
}
/*
* Gets prefix and its length (for display only).
* Get prefix and its length (for display only).
*
* If the prefix can be hidden (same nick as previous message), and if the
* option is enabled (not empty string), then returns empty prefix or prefix
* from option.
* Return empty prefix or prefix from option if the prefix can be hidden
* (same nick as previous message), and if the option is enabled
* (not empty string).
*/
void
@@ -287,7 +287,7 @@ gui_line_get_prefix_for_display (struct t_gui_line *line,
}
/*
* Gets alignment for a line.
* Get alignment for a line.
*/
int
@@ -380,7 +380,7 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
}
/*
* Builds a string with prefix and message.
* Build a string with prefix and message.
*
* Note: result must be freed after use.
*/
@@ -408,7 +408,7 @@ gui_line_build_string_prefix_message (const char *prefix, const char *message)
}
/*
* Builds a string with action message and nick with nick offline color.
* Build a string with action message and nick with nick offline color.
*
* Note: result must be freed after use.
*/
@@ -439,7 +439,7 @@ gui_line_build_string_message_nick_offline (const char *message)
}
/*
* Builds a string with message and tags.
* Build a string with message and tags.
*
* If colors == 1, keep colors in message and use color for delimiters around
* tags.
@@ -503,9 +503,9 @@ gui_line_build_string_message_tags (const char *message,
}
/*
* Checks if a line is displayed (no filter on line or filters disabled).
* Check if a line is displayed (no filter on line or filters disabled).
*
* Returns:
* Return:
* 1: line is displayed
* 0: line is hidden
*/
@@ -525,9 +525,9 @@ gui_line_is_displayed (struct t_gui_line *line)
}
/*
* Gets the first line displayed of a buffer.
* Get the first line displayed of a buffer.
*
* Returns pointer to first line displayed, NULL if not found.
* Return pointer to first line displayed, NULL if not found.
*/
struct t_gui_line *
@@ -545,9 +545,9 @@ gui_line_get_first_displayed (struct t_gui_buffer *buffer)
}
/*
* Gets the last line displayed of a buffer.
* Get the last line displayed of a buffer.
*
* Returns pointer to last line displayed, NULL if not found.
* Return pointer to last line displayed, NULL if not found.
*/
struct t_gui_line *
@@ -565,9 +565,9 @@ gui_line_get_last_displayed (struct t_gui_buffer *buffer)
}
/*
* Gets previous line displayed.
* Get previous line displayed.
*
* Returns pointer to previous line displayed, NULL if not found.
* Return pointer to previous line displayed, NULL if not found.
*/
struct t_gui_line *
@@ -585,9 +585,9 @@ gui_line_get_prev_displayed (struct t_gui_line *line)
}
/*
* Gets next line displayed.
* Get next line displayed.
*
* Returns pointer to next line displayed, NULL if not found.
* Return pointer to next line displayed, NULL if not found.
*/
struct t_gui_line *
@@ -605,9 +605,9 @@ gui_line_get_next_displayed (struct t_gui_line *line)
}
/*
* Searches a line by id.
* Search a line by id.
*
* Returns pointer to line found, NULL if not found.
* Return pointer to line found, NULL if not found.
*/
struct t_gui_line *
@@ -630,9 +630,9 @@ gui_line_search_by_id (struct t_gui_buffer *buffer, int id)
}
/*
* Searches for text in a line.
* Search for text in a line.
*
* Returns:
* Return:
* 1: text found in line
* 0: text not found in line
*/
@@ -721,9 +721,9 @@ gui_line_search_text (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
/*
* Checks if a line matches regex.
* Check if a line matches regex.
*
* Returns:
* Return:
* 1: line matches regex
* 0: line does not match regex
*/
@@ -777,10 +777,10 @@ gui_line_match_regex (struct t_gui_line_data *line_data, regex_t *regex_prefix,
}
/*
* Checks if a line has tag "no_filter" (which means that line should never been
* Check if a line has tag "no_filter" (which means that line should never been
* filtered: it is always displayed).
*
* Returns:
* Return:
* 1: line has tag "no_filter"
* 0: line does not have tag "no_filter"
*/
@@ -804,9 +804,9 @@ gui_line_has_tag_no_filter (struct t_gui_line_data *line_data)
}
/*
* Checks if line matches tags.
* Check if line matches tags.
*
* Returns:
* Return:
* 1: line matches tags
* 0: line does not match tags
*/
@@ -869,7 +869,7 @@ gui_line_match_tags (struct t_gui_line_data *line_data,
}
/*
* Returns pointer on tag starting with "tag", NULL if such tag is not found.
* Return pointer on tag starting with "tag", NULL if such tag is not found.
*/
const char *
@@ -893,7 +893,7 @@ gui_line_search_tag_starting_with (struct t_gui_line *line, const char *tag)
}
/*
* Gets nick in tags: returns "xxx" if tag "nick_xxx" is found.
* Get nick in tags: return "xxx" if tag "nick_xxx" is found.
*/
const char *
@@ -912,10 +912,10 @@ gui_line_get_nick_tag (struct t_gui_line *line)
}
/*
* Checks if a line has highlight (with a string in global highlight or buffer
* Check if a line has highlight (with a string in global highlight or buffer
* highlight).
*
* Returns:
* Return:
* 1: line has highlight
* 0: line has no highlight
*/
@@ -1113,9 +1113,9 @@ end:
}
/*
* Checks if nick of line is offline (not in nicklist anymore).
* Check if nick of line is offline (not in nicklist anymore).
*
* Returns:
* Return:
* 1: nick is offline
* 0: nick is still there (in nicklist)
*/
@@ -1142,9 +1142,9 @@ gui_line_has_offline_nick (struct t_gui_line *line)
}
/*
* Checks if line is an action (eg: `/me` in irc plugin).
* Check if line is an action (eg: `/me` in irc plugin).
*
* Returns:
* Return:
* 1: line is an action
* 0: line is not an action
*/
@@ -1168,7 +1168,7 @@ gui_line_is_action (struct t_gui_line *line)
}
/*
* Computes "buffer_max_length" for a "t_gui_lines" structure.
* Compute "buffer_max_length" for a "t_gui_lines" structure.
*/
void
@@ -1195,7 +1195,7 @@ gui_line_compute_buffer_max_length (struct t_gui_buffer *buffer,
}
/*
* Computes "prefix_max_length" for a "t_gui_lines" structure.
* Compute "prefix_max_length" for a "t_gui_lines" structure.
*/
void
@@ -1224,7 +1224,7 @@ gui_line_compute_prefix_max_length (struct t_gui_lines *lines)
}
/*
* Adds a line to a "t_gui_lines" structure.
* Add a line to a "t_gui_lines" structure.
*/
void
@@ -1264,7 +1264,7 @@ gui_line_add_to_list (struct t_gui_lines *lines,
}
/*
* Frees data in a line.
* Free data in a line.
*/
void
@@ -1280,7 +1280,7 @@ gui_line_free_data (struct t_gui_line *line)
}
/*
* Removes a line from a "t_gui_lines" structure.
* Remove a line from a "t_gui_lines" structure.
*/
void
@@ -1363,7 +1363,7 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer,
}
/*
* Adds line to mixed lines for a buffer.
* Add line to mixed lines for a buffer.
*/
void
@@ -1381,7 +1381,7 @@ gui_line_mixed_add (struct t_gui_lines *lines,
}
/*
* Frees all mixed lines matching a buffer.
* Free all mixed lines matching a buffer.
*/
void
@@ -1410,7 +1410,7 @@ gui_line_mixed_free_buffer (struct t_gui_buffer *buffer)
}
/*
* Frees all mixed lines in a buffer.
* Free all mixed lines in a buffer.
*/
void
@@ -1429,7 +1429,7 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer)
}
/*
* Deletes a line from a buffer.
* Delete a line from a buffer.
*/
void
@@ -1462,7 +1462,7 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
/*
* Deletes all formatted lines from a buffer.
* Delete all formatted lines from a buffer.
*/
void
@@ -1493,9 +1493,9 @@ gui_line_free_all (struct t_gui_buffer *buffer)
}
/*
* Gets max notify level for a line, according to the nick.
* Get max notify level for a line, according to the nick.
*
* Returns max notify level, between -1 and GUI_HOTLIST_HIGHLIGHT.
* Return max notify level, between -1 and GUI_HOTLIST_HIGHLIGHT.
*/
int
@@ -1520,7 +1520,7 @@ gui_line_get_max_notify_level (struct t_gui_line *line)
}
/*
* Sets the notify level in a line:
* Set the notify level in a line:
* -1: no notify at all
* 0: low (GUI_HOTLIST_LOW)
* 1: message (GUI_HOTLIST_MESSAGE)
@@ -1552,7 +1552,7 @@ gui_line_set_notify_level (struct t_gui_line *line, int max_notify_level)
}
/*
* Sets highlight flag in a line:
* Set highlight flag in a line:
* 0: no highlight
* 1: highlight
*/
@@ -1570,7 +1570,7 @@ gui_line_set_highlight (struct t_gui_line *line, int max_notify_level)
}
/*
* Creates a new line for a buffer.
* Create a new line for a buffer.
*/
struct t_gui_line *
@@ -1663,7 +1663,7 @@ gui_line_new (struct t_gui_buffer *buffer, int y,
}
/*
* Updates data in a line via the hook_line.
* Update data in a line via the hook_line.
*/
void
@@ -1884,7 +1884,7 @@ gui_line_hook_update (struct t_gui_line *line,
}
/*
* Adds a new line in a buffer with formatted content.
* Add a new line in a buffer with formatted content.
*/
void
@@ -2005,7 +2005,7 @@ gui_line_add (struct t_gui_line *line)
}
/*
* Adds or updates a line in a buffer with free content.
* Add or updates a line in a buffer with free content.
*
* Ba careful: when replacing an existing line in the buffer, the "line"
* pointer received as parameter is freed and then becomes invalid.
@@ -2101,7 +2101,7 @@ gui_line_add_y (struct t_gui_line *line)
}
/*
* Clears prefix and message on a line (used on buffers with free content only).
* Clear prefix and message on a line (used on buffers with free content only).
*/
void
@@ -2130,7 +2130,7 @@ gui_line_clear (struct t_gui_line *line)
}
/*
* Mixes lines of a buffer (or group of buffers) with a new buffer.
* Mix lines of a buffer (or group of buffers) with a new buffer.
*/
void
@@ -2223,7 +2223,7 @@ gui_line_mix_buffers (struct t_gui_buffer *buffer)
}
/*
* Returns hdata for lines.
* Return hdata for lines.
*/
struct t_hdata *
@@ -2254,7 +2254,7 @@ gui_line_hdata_lines_cb (const void *pointer, void *data,
}
/*
* Returns hdata for line.
* Return hdata for line.
*/
struct t_hdata *
@@ -2410,7 +2410,7 @@ gui_line_hdata_line_data_update_cb (void *data,
}
/*
* Returns hdata for line data.
* Return hdata for line data.
*/
struct t_hdata *
@@ -2449,9 +2449,9 @@ gui_line_hdata_line_data_cb (const void *pointer, void *data,
}
/*
* Adds a line in an infolist.
* Add a line in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2534,7 +2534,7 @@ gui_line_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints lines structure infos in WeeChat log file (usually for crash dump).
* Print lines structure infos in WeeChat log file (usually for crash dump).
*/
void
+2 -2
View File
@@ -47,7 +47,7 @@ char gui_mouse_event_button = '#'; /* button pressed (or wheel) */
/*
* Sets debug for mouse events.
* Set debug for mouse events.
*/
void
@@ -65,7 +65,7 @@ gui_mouse_debug_set (int debug)
}
/*
* Resets event values.
* Reset event values.
*/
void
+13 -13
View File
@@ -39,7 +39,7 @@
/*
* Hashes a string with a variant of djb2 hash, using 64-bit integer.
* Hash a string with a variant of djb2 hash, using 64-bit integer.
*
* Number pointed by *color_64 is updated by the function.
*/
@@ -56,7 +56,7 @@ gui_nick_hash_djb2_64 (const char *nickname, uint64_t *color_64)
}
/*
* Hashes a string with a variant of djb2 hash, using 32-bit integer.
* Hash a string with a variant of djb2 hash, using 32-bit integer.
*
* Number pointed by *color_32 is updated by the function.
*/
@@ -73,7 +73,7 @@ gui_nick_hash_djb2_32 (const char *nickname, uint32_t *color_32)
}
/*
* Hashes a string with sum of letters, using 64-bit integer.
* Hash a string with sum of letters, using 64-bit integer.
*
* Number pointed by *color_64 is updated by the function.
*/
@@ -89,7 +89,7 @@ gui_nick_hash_sum_64 (const char *nickname, uint64_t *color_64)
}
/*
* Hashes a string with sum of letters, using 32-bit integer.
* Hash a string with sum of letters, using 32-bit integer.
*
* Number pointed by *color_32 is updated by the function.
*/
@@ -105,9 +105,9 @@ gui_nick_hash_sum_32 (const char *nickname, uint32_t *color_32)
}
/*
* Hashes a nickname to find color.
* Hash a nickname to find color.
*
* Returns a number which is between 0 and num_colors - 1 (inclusive).
* Return a number which is between 0 and num_colors - 1 (inclusive).
*
* num_colors is commonly the number of colors in the option
* "weechat.color.chat_nick_colors".
@@ -165,9 +165,9 @@ gui_nick_hash_color (const char *nickname, int num_colors)
}
/*
* Gets forced color for a nick.
* Get forced color for a nick.
*
* Returns the name of color (for example: "green"), NULL if no color is forced
* Return the name of color (for example: "green"), NULL if no color is forced
* for nick.
*/
@@ -196,7 +196,7 @@ gui_nick_get_forced_color (const char *nickname)
}
/*
* Duplicates a nick and stops at first char in list (using option
* Duplicate a nick and stops at first char in list (using option
* weechat.look.nick_color_stop_chars).
*
* Note: result must be freed after use.
@@ -243,7 +243,7 @@ gui_nick_strdup_for_color (const char *nickname)
}
/*
* Finds a color name for a nick (according to nick letters).
* Find a color name for a nick (according to nick letters).
*
* If case_range < 0, nick is case-sensitive.
* If case_range == 0, nick is converted to lower case (with string_tolower).
@@ -258,7 +258,7 @@ gui_nick_strdup_for_color (const char *nickname)
* allowed with format "fg:bg", for example: "blue,yellow:red" for blue and
* yellow on red).
*
* Returns the name of a color (for example: "green").
* Return the name of a color (for example: "green").
*
* Note: result must be freed after use.
*/
@@ -333,7 +333,7 @@ end:
}
/*
* Finds a color code for a nick (according to nick letters).
* Find a color code for a nick (according to nick letters).
*
* If case_range < 0, nick is case-sensitive.
* If case_range == 0, nick is converted to lower case (with string_tolower).
@@ -348,7 +348,7 @@ end:
* allowed with format "fg:bg", for example: "blue,yellow:red" for blue and
* yellow on red).
*
* Returns a WeeChat color code (that can be used for display).
* Return a WeeChat color code (that can be used for display).
*
* Note: result must be freed after use.
*/
+53 -53
View File
@@ -54,7 +54,7 @@ struct t_hashtable *gui_nicklist_hsignal = NULL;
/*
* Sends a signal when something has changed in nicklist.
* Send a signal when something has changed in nicklist.
*/
void
@@ -83,7 +83,7 @@ gui_nicklist_send_signal (const char *signal, struct t_gui_buffer *buffer,
}
/*
* Sends a hsignal when something will change or has changed in nicklist.
* Send a hsignal when something will change or has changed in nicklist.
*/
void
@@ -116,7 +116,7 @@ gui_nicklist_send_hsignal (const char *signal, struct t_gui_buffer *buffer,
}
/*
* Searches for position of a group (to keep nicklist sorted).
* Search for position of a group (to keep nicklist sorted).
*/
struct t_gui_nick_group *
@@ -136,7 +136,7 @@ gui_nicklist_find_pos_group (struct t_gui_nick_group *groups,
}
/*
* Inserts group into sorted list.
* Insert group into sorted list.
*/
void
@@ -180,10 +180,10 @@ gui_nicklist_insert_group_sorted (struct t_gui_nick_group **groups,
}
/*
* Searches for a group in nicklist by id (this function must not be called
* Search for a group in nicklist by id (this function must not be called
* directly).
*
* Returns pointer to group found, NULL if not found.
* Return pointer to group found, NULL if not found.
*/
struct t_gui_nick_group *
@@ -218,10 +218,10 @@ gui_nicklist_search_group_id (struct t_gui_buffer *buffer,
}
/*
* Searches for a group in nicklist by name (this function must not be called
* Search for a group in nicklist by name (this function must not be called
* directly).
*
* Returns pointer to group found, NULL if not found.
* Return pointer to group found, NULL if not found.
*/
struct t_gui_nick_group *
@@ -264,9 +264,9 @@ gui_nicklist_search_group_name (struct t_gui_buffer *buffer,
}
/*
* Searches for a group in nicklist.
* Search for a group in nicklist.
*
* Returns pointer to group found, NULL if not found.
* Return pointer to group found, NULL if not found.
*/
struct t_gui_nick_group *
@@ -298,7 +298,7 @@ gui_nicklist_search_group (struct t_gui_buffer *buffer,
}
/*
* Returns a new unique id for a group/nick.
* Return a new unique id for a group/nick.
*
* The id is the current time with microseconds precision.
* The same time (including microseconds) can be used only one time, so that
@@ -327,9 +327,9 @@ gui_nicklist_generate_id (struct t_gui_buffer *buffer)
}
/*
* Adds a group to nicklist with identifier (internal use).
* Add a group to nicklist with identifier (internal use).
*
* Returns pointer to new group, NULL if error.
* Return pointer to new group, NULL if error.
*/
struct t_gui_nick_group *
@@ -388,9 +388,9 @@ gui_nicklist_add_group_with_id (struct t_gui_buffer *buffer, long long id,
}
/*
* Adds a group to nicklist.
* Add a group to nicklist.
*
* Returns pointer to new group, NULL if error.
* Return pointer to new group, NULL if error.
*/
struct t_gui_nick_group *
@@ -411,7 +411,7 @@ gui_nicklist_add_group (struct t_gui_buffer *buffer,
}
/*
* Searches for position of a nick (to keep nicklist sorted).
* Search for position of a nick (to keep nicklist sorted).
*/
struct t_gui_nick *
@@ -434,7 +434,7 @@ gui_nicklist_find_pos_nick (struct t_gui_nick_group *group,
}
/*
* Inserts nick into sorted list.
* Insert nick into sorted list.
*/
void
@@ -477,10 +477,10 @@ gui_nicklist_insert_nick_sorted (struct t_gui_nick_group *group,
}
/*
* Searches for a nick in nicklist by id (this function must not be called
* Search for a nick in nicklist by id (this function must not be called
* directly).
*
* Returns pointer to nick found, NULL if not found.
* Return pointer to nick found, NULL if not found.
*/
struct t_gui_nick *
@@ -512,10 +512,10 @@ gui_nicklist_search_nick_id (struct t_gui_buffer *buffer,
}
/*
* Searches for a nick in nicklist by name (this function must not be called
* Search for a nick in nicklist by name (this function must not be called
* directly).
*
* Returns pointer to nick found, NULL if not found.
* Return pointer to nick found, NULL if not found.
*/
struct t_gui_nick *
@@ -559,9 +559,9 @@ gui_nicklist_search_nick_name (struct t_gui_buffer *buffer,
}
/*
* Searches for a nick in nicklist.
* Search for a nick in nicklist.
*
* Returns pointer to nick found, NULL if not found.
* Return pointer to nick found, NULL if not found.
*/
struct t_gui_nick *
@@ -590,9 +590,9 @@ gui_nicklist_search_nick (struct t_gui_buffer *buffer,
}
/*
* Adds a nick to nicklist with identifier (internal use).
* Add a nick to nicklist with identifier (internal use).
*
* Returns pointer to new nick, NULL if error.
* Return pointer to new nick, NULL if error.
*/
struct t_gui_nick *
@@ -642,9 +642,9 @@ gui_nicklist_add_nick_with_id (struct t_gui_buffer *buffer, long long id,
}
/*
* Adds a nick to nicklist.
* Add a nick to nicklist.
*
* Returns pointer to new nick, NULL if error.
* Return pointer to new nick, NULL if error.
*/
struct t_gui_nick *
@@ -669,7 +669,7 @@ gui_nicklist_add_nick (struct t_gui_buffer *buffer,
}
/*
* Removes a nick from a group.
* Remove a nick from a group.
*/
void
@@ -724,7 +724,7 @@ gui_nicklist_remove_nick (struct t_gui_buffer *buffer,
}
/*
* Removes a group from nicklist.
* Remove a group from nicklist.
*/
void
@@ -793,7 +793,7 @@ gui_nicklist_remove_group (struct t_gui_buffer *buffer,
}
/*
* Removes all nicks in nicklist.
* Remove all nicks in nicklist.
*/
void
@@ -816,7 +816,7 @@ gui_nicklist_remove_all (struct t_gui_buffer *buffer)
}
/*
* Gets next item (group or nick) of a group/nick.
* Get next item (group or nick) of a group/nick.
*/
void
@@ -896,10 +896,10 @@ gui_nicklist_get_next_item (struct t_gui_buffer *buffer,
}
/*
* Returns first char of a group that will be displayed on screen.
* Return first char of a group that will be displayed on screen.
*
* If name begins with some digits followed by '|', then start is after '|',
* otherwise it's beginning of name.
* If name begins with some digits followed by '|', start after '|',
* otherwise start at beginning of name.
*/
const char *
@@ -921,7 +921,7 @@ gui_nicklist_get_group_start (const char *name)
}
/*
* Computes visible_count variable for a nicklist.
* Compute visible_count variable for a nicklist.
*/
void
@@ -960,7 +960,7 @@ gui_nicklist_compute_visible_count (struct t_gui_buffer *buffer,
}
/*
* Gets a group property as integer.
* Get a group property as integer.
*/
int
@@ -983,7 +983,7 @@ gui_nicklist_group_get_integer (struct t_gui_buffer *buffer,
}
/*
* Gets a group property as string.
* Get a group property as string.
*/
const char *
@@ -1006,7 +1006,7 @@ gui_nicklist_group_get_string (struct t_gui_buffer *buffer,
}
/*
* Gets a group property as pointer.
* Get a group property as pointer.
*/
void *
@@ -1027,7 +1027,7 @@ gui_nicklist_group_get_pointer (struct t_gui_buffer *buffer,
}
/*
* Sets a group property (string).
* Set a group property (string).
*/
void
@@ -1080,7 +1080,7 @@ gui_nicklist_group_set (struct t_gui_buffer *buffer,
}
/*
* Gets a nick property as integer.
* Get a nick property as integer.
*/
int
@@ -1101,7 +1101,7 @@ gui_nicklist_nick_get_integer (struct t_gui_buffer *buffer,
}
/*
* Gets a nick property as string.
* Get a nick property as string.
*/
const char *
@@ -1128,7 +1128,7 @@ gui_nicklist_nick_get_string (struct t_gui_buffer *buffer,
}
/*
* Gets a nick property as pointer.
* Get a nick property as pointer.
*/
void *
@@ -1149,7 +1149,7 @@ gui_nicklist_nick_get_pointer (struct t_gui_buffer *buffer,
}
/*
* Sets a nick property (string).
* Set a nick property (string).
*/
void
@@ -1214,7 +1214,7 @@ gui_nicklist_nick_set (struct t_gui_buffer *buffer,
}
/*
* Returns hdata for nick_group.
* Return hdata for nick_group.
*/
struct t_hdata *
@@ -1248,7 +1248,7 @@ gui_nicklist_hdata_nick_group_cb (const void *pointer, void *data,
}
/*
* Returns hdata for nick.
* Return hdata for nick.
*/
struct t_hdata *
@@ -1279,9 +1279,9 @@ gui_nicklist_hdata_nick_cb (const void *pointer, void *data,
}
/*
* Adds a group in an infolist.
* Add a group in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1323,9 +1323,9 @@ gui_nicklist_add_group_to_infolist (struct t_infolist *infolist,
}
/*
* Adds a nick in an infolist.
* Add a nick in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1369,9 +1369,9 @@ gui_nicklist_add_nick_to_infolist (struct t_infolist *infolist,
}
/*
* Adds a nicklist in an infolist.
* Add a nicklist in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -1422,7 +1422,7 @@ gui_nicklist_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints nicklist infos in WeeChat log file (usually for crash dump).
* Print nicklist infos in WeeChat log file (usually for crash dump).
*/
void
@@ -1539,7 +1539,7 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent)
}
/*
* Frees all allocated data.
* Free all allocated data.
*/
void
+55 -56
View File
@@ -76,9 +76,9 @@ struct t_hook *gui_window_bare_display_timer = NULL;
/*
* Searches for a window by number.
* Search for a window by number.
*
* Returns pointer to window found, NULL if error.
* Return pointer to window found, NULL if error.
*/
struct t_gui_window *
@@ -97,7 +97,7 @@ gui_window_search_by_number (int number)
}
/*
* Gets pointer of window displayed at (x,y).
* Get pointer of window displayed at (x,y).
*
* Return pointer to window found, NULL if not found.
*/
@@ -123,7 +123,7 @@ gui_window_search_by_xy (int x, int y)
}
/*
* Returns following info:
* Return following info:
* - chat (0/1)
* - line
* - x in line
@@ -321,7 +321,7 @@ gui_window_get_context_at_xy (struct t_gui_window *window,
}
/*
* Sets flag "gui_window_refresh_needed".
* Set flag "gui_window_refresh_needed".
*/
void
@@ -332,9 +332,9 @@ gui_window_ask_refresh (int refresh)
}
/*
* Creates first entry in windows tree.
* Create first entry in windows tree.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -355,7 +355,7 @@ gui_window_tree_init (struct t_gui_window *window)
}
/*
* Converts a node to a leaf (free any leafs).
* Convert a node to a leaf (free any leafs).
*
* Called when 2 windows are merging into one.
*/
@@ -381,7 +381,7 @@ gui_window_tree_node_to_leaf (struct t_gui_window_tree *node,
}
/*
* Deletes entire windows tree.
* Delete entire windows tree.
*/
void
@@ -400,8 +400,7 @@ gui_window_tree_free (struct t_gui_window_tree **tree)
}
/*
* Searches a parent window which is split on the given direction
* ('h' or 'v').
* Search a parent window which is split on the given direction ('h' or 'v').
*/
struct t_gui_window_tree *
@@ -421,9 +420,9 @@ gui_window_tree_get_split (struct t_gui_window_tree *tree,
}
/*
* Searches for a scroll with buffer pointer.
* Search for a scroll with buffer pointer.
*
* Returns pointer to window scroll, NULL if not found.
* Return pointer to window scroll, NULL if not found.
*/
struct t_gui_window_scroll *
@@ -447,7 +446,7 @@ gui_window_scroll_search (struct t_gui_window *window,
}
/*
* Initializes a window scroll structure.
* Initialize a window scroll structure.
*/
void
@@ -467,7 +466,7 @@ gui_window_scroll_init (struct t_gui_window_scroll *window_scroll,
}
/*
* Frees a scroll structure in a window.
* Free a scroll structure in a window.
*/
void
@@ -488,7 +487,7 @@ gui_window_scroll_free (struct t_gui_window *window,
}
/*
* Frees all scroll structures in a window.
* Free all scroll structures in a window.
*/
void
@@ -501,7 +500,7 @@ gui_window_scroll_free_all (struct t_gui_window *window)
}
/*
* Removes all scroll structures which are empty (not scrolled).
* Remove all scroll structures which are empty (not scrolled).
*
* Note: the first scroll in list (current buffer) is NOT removed by this
* function.
@@ -536,7 +535,7 @@ gui_window_scroll_remove_not_scrolled (struct t_gui_window *window)
}
/*
* Switches scroll to a buffer.
* Switch scroll to a buffer.
*/
void
@@ -583,7 +582,7 @@ gui_window_scroll_switch (struct t_gui_window *window,
}
/*
* Removes buffer from scroll list in a window.
* Remove buffer from scroll list in a window.
*/
void
@@ -601,9 +600,9 @@ gui_window_scroll_remove_buffer (struct t_gui_window *window,
}
/*
* Creates a new window.
* Create a new window.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *
@@ -755,9 +754,9 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
}
/*
* Checks if a window pointer is valid.
* Check if a window pointer is valid.
*
* Returns:
* Return:
* 1: window exists
* 0: window does not exist
*/
@@ -782,9 +781,9 @@ gui_window_valid (struct t_gui_window *window)
}
/*
* Searches for window displaying a buffer.
* Search for window displaying a buffer.
*
* Returns NULL if no window is displaying given buffer.
* Return NULL if no window is displaying given buffer.
* If many windows are displaying this buffer, the first window in list is
* returned (or current window if it is displaying this buffer).
*/
@@ -812,7 +811,7 @@ gui_window_search_with_buffer (struct t_gui_buffer *buffer)
}
/*
* Gets a window property as integer.
* Get a window property as integer.
*/
int
@@ -854,7 +853,7 @@ gui_window_get_integer (struct t_gui_window *window, const char *property)
}
/*
* Gets a window property as string.
* Get a window property as string.
*/
const char *
@@ -867,7 +866,7 @@ gui_window_get_string (struct t_gui_window *window, const char *property)
}
/*
* Gets a window property as pointer.
* Get a window property as pointer.
*/
void *
@@ -889,7 +888,7 @@ gui_window_get_pointer (struct t_gui_window *window, const char *property)
}
/*
* Sets layout plugin name for window.
* Set layout plugin name for window.
*/
void
@@ -910,7 +909,7 @@ gui_window_set_layout_plugin_name (struct t_gui_window *window,
}
/*
* Sets layout buffer name for window.
* Set layout buffer name for window.
*/
void
@@ -931,7 +930,7 @@ gui_window_set_layout_buffer_name (struct t_gui_window *window,
}
/*
* Initializes a line in window coordinates.
* Initialize a line in window coordinates.
*/
void
@@ -954,7 +953,7 @@ gui_window_coords_init_line (struct t_gui_window *window, int line)
}
/*
* Removes a line from coordinates: each time the line is found in the array
* Remove a line from coordinates: each time the line is found in the array
* "coords", it is reinitialized.
*/
@@ -975,7 +974,7 @@ gui_window_coords_remove_line (struct t_gui_window *window,
}
/*
* Removes a line from coordinates: each time a line with data == line_data is
* Remove a line from coordinates: each time a line with data == line_data is
* found in the array "coords", it is reinitialized.
*/
@@ -999,7 +998,7 @@ gui_window_coords_remove_line_data (struct t_gui_window *window,
}
/*
* Allocates and initializes coordinates for window.
* Allocate and initializes coordinates for window.
*/
void
@@ -1028,7 +1027,7 @@ gui_window_coords_alloc (struct t_gui_window *window)
}
/*
* Deletes a window.
* Delete a window.
*/
void
@@ -1105,7 +1104,7 @@ gui_window_free (struct t_gui_window *window)
}
/*
* Switches to previous window.
* Switch to previous window.
*/
void
@@ -1119,7 +1118,7 @@ gui_window_switch_previous (struct t_gui_window *window)
}
/*
* Switches to next window.
* Switch to next window.
*/
void
@@ -1133,7 +1132,7 @@ gui_window_switch_next (struct t_gui_window *window)
}
/*
* Switches to window by number.
* Switch to window by number.
*/
void
@@ -1150,7 +1149,7 @@ gui_window_switch_by_number (int number)
}
/*
* Switches to next window displaying a buffer.
* Switch to next window displaying a buffer.
*/
void
@@ -1174,7 +1173,7 @@ gui_window_switch_by_buffer (struct t_gui_window *window, int buffer_number)
}
/*
* Scrolls window by a number of messages or time.
* Scroll window by a number of messages or time.
*/
void
@@ -1425,7 +1424,7 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
}
/*
* Horizontally scrolls window.
* Scroll window horizontally.
*/
void
@@ -1494,7 +1493,7 @@ gui_window_scroll_horiz (struct t_gui_window *window, char *scroll)
}
/*
* Scrolls to previous highlight.
* Scroll to previous highlight.
*/
void
@@ -1531,7 +1530,7 @@ gui_window_scroll_previous_highlight (struct t_gui_window *window)
}
/*
* Scrolls to next highlight.
* Scroll to next highlight.
*/
void
@@ -1568,7 +1567,7 @@ gui_window_scroll_next_highlight (struct t_gui_window *window)
}
/*
* Scrolls to first unread line of buffer.
* Scroll to first unread line of buffer.
*/
void
@@ -1601,9 +1600,9 @@ gui_window_scroll_unread (struct t_gui_window *window)
}
/*
* Searches for text in buffer lines or commands history.
* Search for text in buffer lines or commands history.
*
* Returns:
* Return:
* 1: successful search
* 0: no results found
*/
@@ -1680,7 +1679,7 @@ gui_window_search_text (struct t_gui_window *window)
}
/*
* Starts search in a buffer at a given position
* Start search in a buffer at a given position
* (or in whole buffer if text_search_start_line is NULL).
*/
@@ -1768,7 +1767,7 @@ gui_window_search_start (struct t_gui_window *window, int search,
}
/*
* Restarts search (after input changes or exact flag (un)set).
* Restart search (after input changes or exact flag (un)set).
*/
void
@@ -1828,7 +1827,7 @@ gui_window_search_restart (struct t_gui_window *window)
}
/*
* Stops search in a buffer, at current position if stop_here == 1 or reset
* Stop search in a buffer, at current position if stop_here == 1 or reset
* scroll to the initial value if stop_here == 0.
*/
@@ -1886,7 +1885,7 @@ gui_window_search_stop (struct t_gui_window *window, int stop_here)
}
/*
* Zooms window (maximize it or restore layout before previous zoom).
* Zoom window (maximize it or restore layout before previous zoom).
*/
void
@@ -1931,7 +1930,7 @@ gui_window_zoom (struct t_gui_window *window)
}
/*
* Returns hdata for window.
* Return hdata for window.
*/
struct t_hdata *
@@ -1981,7 +1980,7 @@ gui_window_hdata_window_cb (const void *pointer, void *data,
}
/*
* Returns hdata for window scroll.
* Return hdata for window scroll.
*/
struct t_hdata *
@@ -2013,7 +2012,7 @@ gui_window_hdata_window_scroll_cb (const void *pointer, void *data,
}
/*
* Returns hdata for window tree.
* Return hdata for window tree.
*/
struct t_hdata *
@@ -2041,9 +2040,9 @@ gui_window_hdata_window_tree_cb (const void *pointer, void *data,
}
/*
* Adds a window in an infolist.
* Add a window in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -2100,7 +2099,7 @@ gui_window_add_to_infolist (struct t_infolist *infolist,
}
/*
* Prints window infos in WeeChat log file (usually for crash dump).
* Print window infos in WeeChat log file (usually for crash dump).
*/
void
+2 -2
View File
@@ -32,7 +32,7 @@
/*
* Adds a new alias.
* Add a new alias.
*/
void
@@ -348,7 +348,7 @@ alias_command_cb (const void *pointer, void *data,
}
/*
* Hooks alias command.
* Hook alias command.
*/
void
+3 -3
View File
@@ -30,7 +30,7 @@
/*
* Adds list of aliases to completion list.
* Add list of aliases to completion list.
*/
int
@@ -58,7 +58,7 @@ alias_completion_alias_cb (const void *pointer, void *data,
}
/*
* Adds value of an alias to completion list.
* Add value of an alias to completion list.
*/
int
@@ -113,7 +113,7 @@ alias_completion_alias_value_cb (const void *pointer, void *data,
}
/*
* Hooks completions.
* Hook completions.
*/
void
+10 -10
View File
@@ -164,7 +164,7 @@ alias_config_completion_delete_cb (const void *pointer, void *data,
}
/*
* Reloads alias configuration file.
* Reload alias configuration file.
*/
int
@@ -183,7 +183,7 @@ alias_config_reload (const void *pointer, void *data,
}
/*
* Writes default aliases in configuration file in section "cmd" (command).
* Write default aliases in configuration file in section "cmd" (command).
*/
int
@@ -212,7 +212,7 @@ alias_config_cmd_write_default_cb (const void *pointer, void *data,
}
/*
* Creates a new option in section "cmd" (command).
* Create a new option in section "cmd" (command).
*/
void
@@ -269,7 +269,7 @@ alias_config_cmd_create_option_cb (const void *pointer, void *data,
}
/*
* Writes default completions in configuration file in section "completion".
* Write default completions in configuration file in section "completion".
*/
int
@@ -301,7 +301,7 @@ alias_config_completion_write_default_cb (const void *pointer, void *data,
}
/*
* Creates a new option in section "completion".
* Create a new option in section "completion".
*/
void
@@ -356,7 +356,7 @@ alias_config_completion_create_option_cb (const void *pointer, void *data,
}
/*
* Updates options in configuration file while reading the file.
* Update options in configuration file while reading the file.
*/
struct t_hashtable *
@@ -421,9 +421,9 @@ alias_config_update_cb (const void *pointer, void *data,
}
/*
* Initializes alias configuration file.
* Initialize alias configuration file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -468,7 +468,7 @@ alias_config_init (void)
}
/*
* Reads alias configuration file.
* Read alias configuration file.
*/
int
@@ -478,7 +478,7 @@ alias_config_read (void)
}
/*
* Writes alias configuration file.
* Write alias configuration file.
*/
int
+3 -3
View File
@@ -29,7 +29,7 @@
/*
* Returns infolist "alias".
* Return infolist "alias".
*/
struct t_infolist *
@@ -85,7 +85,7 @@ alias_info_infolist_alias_cb (const void *pointer, void *data,
}
/*
* Returns infolist "alias_default".
* Return infolist "alias_default".
*/
struct t_infolist *
@@ -137,7 +137,7 @@ alias_info_infolist_alias_default_cb (const void *pointer, void *data,
}
/*
* Hooks infolist for alias plugin.
* Hook infolist for alias plugin.
*/
void
+25 -26
View File
@@ -49,9 +49,9 @@ struct t_alias *last_alias = NULL;
/*
* Checks if an alias pointer is valid.
* Check if an alias pointer is valid.
*
* Returns:
* Return:
* 1: alias exists
* 0; alias does not exist
*/
@@ -76,9 +76,9 @@ alias_valid (struct t_alias *alias)
}
/*
* Searches for an alias by name.
* Search for an alias by name.
*
* Returns pointer to alias found, NULL if not found.
* Return pointer to alias found, NULL if not found.
*/
struct t_alias *
@@ -99,7 +99,7 @@ alias_search (const char *alias_name)
}
/*
* Adds word (in range) to alias string.
* Add word (in range) to alias string.
*/
void
@@ -116,7 +116,7 @@ alias_string_add_word_range (char **alias, const char *start, const char *end)
}
/*
* Adds some arguments to alias string.
* Add some arguments to alias string.
*/
void
@@ -134,7 +134,7 @@ alias_string_add_arguments (char **alias, char **argv,
}
/*
* Replaces arguments in alias.
* Replace arguments in alias.
*
* Arguments replaced are (n and m in 1..9):
* $n argument n
@@ -285,7 +285,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
}
/*
* Replaces local buffer variables in string, then runs command on buffer.
* Replace local buffer variables in string, then runs command on buffer.
*/
void
@@ -413,7 +413,7 @@ alias_cb (const void *pointer, void *data,
}
/*
* Hooks command for an alias.
* Hook command for an alias.
*/
void
@@ -462,7 +462,7 @@ alias_hook_command (struct t_alias *alias)
}
/*
* Searches for position of alias (to keep aliases sorted by name).
* Search for position of alias (to keep aliases sorted by name).
*/
struct t_alias *
@@ -481,7 +481,7 @@ alias_find_pos (const char *name)
}
/*
* Inserts alias in list of aliases.
* Insert alias in list of aliases.
*/
void
@@ -522,7 +522,7 @@ alias_insert (struct t_alias *alias)
}
/*
* Removes alias from list of aliases.
* Remove alias from list of aliases.
*/
void
@@ -539,9 +539,9 @@ alias_remove_from_list (struct t_alias *alias)
}
/*
* Renames an alias.
* Rename an alias.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -583,7 +583,7 @@ alias_rename (struct t_alias *alias, const char *new_name)
}
/*
* Frees an alias and remove it from list.
* Free an alias and remove it from list.
*/
void
@@ -604,7 +604,7 @@ alias_free (struct t_alias *alias)
}
/*
* Frees all aliases.
* Free all aliases.
*/
void
@@ -617,7 +617,7 @@ alias_free_all (void)
}
/*
* Updates completion for an alias.
* Update completion for an alias.
*/
void
@@ -632,10 +632,9 @@ alias_update_completion (struct t_alias *alias, const char *completion)
}
/*
* Checks if an alias name is valid: it must contain neither slashes nor
* spaces.
* Check if an alias name is valid: it must contain neither slashes nor spaces.
*
* Returns:
* Return:
* 1: name is valid
* 0: name is invalid
*/
@@ -659,9 +658,9 @@ alias_name_valid (const char *name)
}
/*
* Creates a new alias and adds it to alias list.
* Create a new alias and adds it to alias list.
*
* Returns pointer to new alias, NULL if error.
* Return pointer to new alias, NULL if error.
*/
struct t_alias *
@@ -716,9 +715,9 @@ alias_new (const char *name, const char *command, const char *completion)
}
/*
* Adds an alias in an infolist.
* Add an alias in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -750,7 +749,7 @@ alias_add_to_infolist (struct t_infolist *infolist, struct t_alias *alias)
}
/*
* Initializes alias plugin.
* Initialize alias plugin.
*/
int
@@ -777,7 +776,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
}
/*
* Ends alias plugin.
* End alias plugin.
*/
int
+12 -12
View File
@@ -44,7 +44,7 @@ int old_line_number_current_buffer[BUFLIST_BAR_NUM_ITEMS] =
/*
* Returns the bar item name with an index.
* Return the bar item name with an index.
*/
const char *
@@ -67,7 +67,7 @@ buflist_bar_item_get_name (int index)
}
/*
* Returns the bar item index with an item name, -1 if not found.
* Return the bar item index with an item name, -1 if not found.
*/
int
@@ -90,7 +90,7 @@ buflist_bar_item_get_index (const char *item_name)
}
/*
* Returns the bar item index with a bar item pointer, -1 if not found.
* Return the bar item index with a bar item pointer, -1 if not found.
*/
int
@@ -108,7 +108,7 @@ buflist_bar_item_get_index_with_pointer (struct t_gui_bar_item *item)
}
/*
* Updates buflist bar item if buflist is enabled (or if force argument is 1).
* Update buflist bar item if buflist is enabled (or if force argument is 1).
*
* If index == -1, all bar items (or all bar items used) are refreshed,
* otherwise only this bar item is refreshed.
@@ -143,12 +143,12 @@ buflist_bar_item_update (int index, int force)
}
/*
* Checks if the bar can be scrolled, the bar must have:
* Check if the bar can be scrolled, the bar must have:
* - a position "left" or "right"
* - a filling "vertical"
* - the item_name as first item.
*
* Returns:
* Return:
* 1: bar can be scrolled
* 0: bar must not be scrolled
*/
@@ -207,7 +207,7 @@ buflist_bar_item_bar_can_scroll (struct t_gui_bar *bar, const char *item_name)
}
/*
* Auto-scrolls a bar window displaying buflist item.
* Auto-scroll a bar window displaying buflist item.
*/
void
@@ -249,7 +249,7 @@ buflist_bar_item_auto_scroll_bar_window (struct t_gui_bar_window *bar_window,
}
/*
* Auto-scrolls all bars with a given buflist item as first item.
* Auto-scroll all bars with a given buflist item as first item.
*/
void
@@ -300,7 +300,7 @@ buflist_bar_item_auto_scroll (const char *item_name, int line_number)
}
/*
* Returns the content of the bar item.
* Return the content of the bar item.
*/
char *
@@ -713,9 +713,9 @@ end:
}
/*
* Initializes buflist bar items.
* Initialize buflist bar items.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -776,7 +776,7 @@ buflist_bar_item_init (void)
}
/*
* Ends buflist bar items.
* End buflist bar items.
*/
void
+1 -1
View File
@@ -97,7 +97,7 @@ buflist_command_buflist (const void *pointer, void *data,
}
/*
* Hooks buflist commands.
* Hook buflist commands.
*/
void
+3 -3
View File
@@ -30,7 +30,7 @@
/*
* Adds all buflist items to completion list.
* Add all buflist items to completion list.
*/
int
@@ -58,7 +58,7 @@ buflist_completion_items_cb (const void *pointer, void *data,
}
/*
* Adds used buflist items to completion list.
* Add used buflist items to completion list.
*/
int
@@ -86,7 +86,7 @@ buflist_completion_items_used_cb (const void *pointer, void *data,
}
/*
* Hooks completions.
* Hook completions.
*/
void
+10 -10
View File
@@ -82,7 +82,7 @@ char *buflist_config_format_hotlist_eval = NULL;
/*
* Reloads buflist configuration file.
* Reload buflist configuration file.
*/
int
@@ -103,7 +103,7 @@ buflist_config_reload (const void *pointer, void *data,
}
/*
* Frees the signals hooked for refresh.
* Free the signals hooked for refresh.
*/
void
@@ -126,9 +126,9 @@ buflist_config_free_signals_refresh (void)
}
/*
* Compares two signals to add them in the sorted arraylist.
* Compare two signals to add them in the sorted arraylist.
*
* Returns:
* Return:
* -1: signal1 < signal2
* 0: signal1 == signal2
* 1: signal1 > signal2
@@ -167,7 +167,7 @@ buflist_config_signal_buffer_cb (const void *pointer, void *data,
}
/*
* Hooks the signals for refresh.
* Hook the signals for refresh.
*/
void
@@ -463,9 +463,9 @@ buflist_config_change_format (const void *pointer, void *data,
}
/*
* Initializes buflist configuration file.
* Initialize buflist configuration file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -803,7 +803,7 @@ buflist_config_init (void)
}
/*
* Reads buflist configuration file.
* Read buflist configuration file.
*/
int
@@ -824,7 +824,7 @@ buflist_config_read (void)
}
/*
* Writes buflist configuration file.
* Write buflist configuration file.
*/
int
@@ -834,7 +834,7 @@ buflist_config_write (void)
}
/*
* Frees buflist configuration.
* Free buflist configuration.
*/
void
+4 -4
View File
@@ -28,9 +28,9 @@
/*
* Adds a buffer in an infolist.
* Add a buffer in an infolist.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -54,7 +54,7 @@ buflist_buffer_add_to_infolist (struct t_infolist *infolist, struct t_gui_buffer
}
/*
* Returns infolist "buflist".
* Return infolist "buflist".
*/
struct t_infolist *
@@ -112,7 +112,7 @@ buflist_info_infolist_buflist_cb (const void *pointer, void *data,
}
/*
* Hooks infolist for buflist plugin.
* Hook infolist for buflist plugin.
*/
void
+5 -5
View File
@@ -182,7 +182,7 @@ end:
}
/*
* Moves a buffer after a mouse gesture in buflist bar.
* Move a buffer after a mouse gesture in buflist bar.
*/
void
@@ -223,7 +223,7 @@ buflist_mouse_move_buffer (const char *key, struct t_gui_buffer *buffer,
}
/*
* Switches to previous/next buffer displayed in an item, starting from
* Switch to previous/next buffer displayed in an item, starting from
* current buffer.
*/
@@ -433,9 +433,9 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal,
}
/*
* Initializes mouse.
* Initialize mouse.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -458,7 +458,7 @@ buflist_mouse_init (void)
}
/*
* Ends mouse.
* End mouse.
*/
void
+10 -10
View File
@@ -54,7 +54,7 @@ struct t_hdata *buflist_hdata_bar_window = NULL;
/*
* Adds the buflist bar.
* Add the buflist bar.
*/
void
@@ -70,7 +70,7 @@ buflist_add_bar (void)
}
/*
* Gets IRC server and channel pointers for a buffer.
* Get IRC server and channel pointers for a buffer.
*
* According to buffer:
* - non IRC buffer: both are NULL
@@ -139,7 +139,7 @@ buflist_buffer_get_irc_pointers (struct t_gui_buffer *buffer,
}
/*
* Compares two inactive merged buffers.
* Compare two inactive merged buffers.
*
* Buffers are sorted so that the active buffer and buffers immediately after
* this one are first in list, followed by the buffers before the active one.
@@ -162,7 +162,7 @@ buflist_buffer_get_irc_pointers (struct t_gui_buffer *buffer,
* weechat
* libera
*
* Returns:
* Return:
* -1: buffer1 must be sorted before buffer2
* 0: no sort (buffer2 will be after buffer1 by default)
* 1: buffer2 must be sorted after buffer1
@@ -212,12 +212,12 @@ buflist_compare_inactive_merged_buffers (struct t_gui_buffer *buffer1,
}
/*
* Compares two buffers in order to add them in the sorted arraylist.
* Compare two buffers in order to add them in the sorted arraylist.
*
* The comparison is made using the list of fields defined in the option
* "buflist.look.sort".
*
* Returns:
* Return:
* -1: buffer1 < buffer2
* 0: buffer1 == buffer2
* 1: buffer1 > buffer2
@@ -341,10 +341,10 @@ buflist_compare_buffers (void *data, struct t_arraylist *arraylist,
}
/*
* Builds a list of pointers to buffers, sorted according to option
* Build a list of pointers to buffers, sorted according to option
* "buflist.look.sort".
*
* Returns an arraylist that must be freed by weechat_arraylist_free after use.
* Return an arraylist that must be freed by weechat_arraylist_free after use.
*/
struct t_arraylist *
@@ -417,7 +417,7 @@ buflist_script_loaded_cb (const void *pointer, void *data, const char *signal,
}
/*
* Initializes buflist plugin.
* Initialize buflist plugin.
*/
int
@@ -520,7 +520,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
}
/*
* Ends buflist plugin.
* End buflist plugin.
*/
int
+19 -19
View File
@@ -53,7 +53,7 @@ char *charset_internal = NULL;
/*
* Reloads charset configuration file.
* Reload charset configuration file.
*/
int
@@ -72,10 +72,10 @@ charset_config_reload (const void *pointer, void *data,
}
/*
* Checks if a decoding charset is allowed (different from "UTF-8", which is the
* Check if a decoding charset is allowed (different from "UTF-8", which is the
* internal charset).
*
* Returns:
* Return:
* 1: charset is allowed
* 0: charset not allowed
*/
@@ -99,9 +99,9 @@ charset_decode_is_allowed (const char *charset)
}
/*
* Checks the validity of a decoding charset.
* Check the validity of a decoding charset.
*
* Returns:
* Return:
* 1: valid
* 0: invalid
*/
@@ -120,7 +120,7 @@ charset_check_charset_decode_cb (const void *pointer, void *data,
}
/*
* Sets a charset.
* Set a charset.
*/
int
@@ -187,9 +187,9 @@ charset_config_create_option (const void *pointer, void *data,
}
/*
* Initializes charset configuration file.
* Initialize charset configuration file.
*
* Returns:
* Return:
* 1: OK
* 0: error
*/
@@ -279,7 +279,7 @@ charset_config_init (void)
}
/*
* Reads charset configuration file.
* Read charset configuration file.
*/
int
@@ -289,7 +289,7 @@ charset_config_read (void)
}
/*
* Writes charset configuration file.
* Write charset configuration file.
*/
int
@@ -299,9 +299,9 @@ charset_config_write (void)
}
/*
* Checks if a charset is valid.
* Check if a charset is valid.
*
* Returns:
* Return:
* 1: charset is valid
* 0: charset is not valid
*/
@@ -323,7 +323,7 @@ charset_check (const char *charset)
}
/*
* Reads a charset in configuration file.
* Read a charset in configuration file.
*
* First tries with all arguments, then removes one by one to find charset (from
* specific to general charset).
@@ -378,7 +378,7 @@ charset_get (struct t_config_section *section, const char *name,
}
/*
* Decodes a string with a charset to internal charset (UTF-8).
* Decode a string with a charset to internal charset (UTF-8).
*/
char *
@@ -409,7 +409,7 @@ charset_decode_cb (const void *pointer, void *data,
}
/*
* Encodes a string from internal charset (UTF-8) to another charset.
* Encode a string from internal charset (UTF-8) to another charset.
*/
char *
@@ -440,7 +440,7 @@ charset_encode_cb (const void *pointer, void *data,
}
/*
* Sets a charset.
* Set a charset.
*/
void
@@ -463,7 +463,7 @@ charset_set (struct t_config_section *section, const char *type,
}
/*
* Displays terminal and internal charsets.
* Display terminal and internal charsets.
*/
void
@@ -576,7 +576,7 @@ charset_command_cb (const void *pointer, void *data,
}
/*
* Initializes charset plugin.
* Initialize charset plugin.
*/
int
@@ -624,7 +624,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
}
/*
* Ends charset plugin.
* End charset plugin.
*/
int
+2 -3
View File
@@ -108,8 +108,7 @@ exec_buffer_close_cb (const void *pointer, void *data,
}
/*
* Restore buffer callbacks (input and close) for buffers created by exec
* plugin.
* Restore buffer callbacks (input and close) for buffers created by exec plugin.
*/
void
@@ -140,7 +139,7 @@ exec_buffer_set_callbacks (void)
}
/*
* Creates a new exec buffer for a command.
* Create a new exec buffer for a command.
*/
struct t_gui_buffer *
+7 -7
View File
@@ -34,7 +34,7 @@
/*
* Displays a list of executed commands.
* Display a list of executed commands.
*/
void
@@ -139,10 +139,10 @@ exec_command_list (void)
}
/*
* Searches a running command by id, and displays an error if command is not
* Search a running command by id, and displays an error if command is not
* found or not running anymore.
*
* Returns the command found, or NULL if not found or not running.
* Return the command found, or NULL if not found or not running.
*/
struct t_exec_cmd *
@@ -175,7 +175,7 @@ exec_command_search_running_id (const char *id)
/*
* Parse command options.
*
* Returns:
* Return:
* 1: options parsed successfully
* 0: error parsing options
*/
@@ -396,9 +396,9 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options,
}
/*
* Runs a command.
* Run a command.
*
* Returns:
* Return:
* WEECHAT_RC_OK: command run successfully
* WEECHAT_RC_ERROR: error running command
*/
@@ -813,7 +813,7 @@ exec_command_exec (const void *pointer, void *data,
}
/*
* Hooks exec commands.
* Hook exec commands.
*/
void
+2 -2
View File
@@ -30,7 +30,7 @@
/*
* Adds executed commands ids to completion list.
* Add executed commands ids to completion list.
*/
int
@@ -66,7 +66,7 @@ exec_completion_commands_ids_cb (const void *pointer, void *data,
}
/*
* Hooks completions.
* Hook completions.
*/
void

Some files were not shown because too many files have changed in this diff Show More