1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 11:13:12 +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