diff options
Diffstat (limited to 'src')
157 files changed, 5776 insertions, 10221 deletions
diff --git a/src/core/wee-backtrace.c b/src/core/wee-backtrace.c index 01f7fb8a7..863fa9228 100644 --- a/src/core/wee-backtrace.c +++ b/src/core/wee-backtrace.c @@ -48,8 +48,7 @@ /* - * weechat_backtrace_printf: display a backtrace line (on stderr and in - * WeeChat log) + * Displays a backtrace line on standard error output and in WeeChat log. */ void @@ -65,8 +64,7 @@ weechat_backtrace_printf (const char *message, ...) } /* - * weechat_backtrace_addr2line: display function name and line with a - * backtrace address + * Displays function name and line with a backtrace address. */ void @@ -147,7 +145,7 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol) } /* - * weechat_backtrace: display backtrace (called when a SIGSEGV is received) + * Displays backtrace (function called when a SIGSEGV is received). */ void diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 6d3f17e8f..dada86788 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -71,13 +71,17 @@ /* - * command_away: toggle away status + * Callback for command "/away". + * + * The command /away in core does nothing, so this function is empty. + * Plugins that need /away command can use hook_command_run() to do something + * when user issues the /away command. */ COMMAND_EMPTY(away) /* - * command_bar_list: list bars + * Displays a list of bars. */ void @@ -151,7 +155,7 @@ command_bar_list (int full) } /* - * command_bar: manage bars + * Callback for command "/bar": manages bars. */ COMMAND_CALLBACK(bar) @@ -466,7 +470,7 @@ COMMAND_CALLBACK(bar) } /* - * command_buffer_display_localvar: display local variable for a buffer + * Displays a local variable for a buffer. */ void @@ -497,7 +501,7 @@ command_buffer_display_localvar (void *data, } /* - * command_buffer: manage buffers + * Callback for command "/buffer": manages buffers. */ COMMAND_CALLBACK(buffer) @@ -1026,7 +1030,8 @@ COMMAND_CALLBACK(buffer) } /* - * command_color: define custom colors and display palette of colors + * Callback for command "/color": defines custom colors and displays palette of + * colors. */ COMMAND_CALLBACK(color) @@ -1170,7 +1175,7 @@ COMMAND_CALLBACK(color) } /* - * command_command: launch explicit WeeChat or plugin command + * Callback for command "/command": launches explicit WeeChat or plugin command. */ COMMAND_CALLBACK(command) @@ -1217,7 +1222,7 @@ COMMAND_CALLBACK(command) } /* - * command_cursor: free movement of cursor on screen + * Callback for command "/cursor": free movement of cursor on screen. */ COMMAND_CALLBACK(cursor) @@ -1301,7 +1306,7 @@ COMMAND_CALLBACK(cursor) } /* - * command_debug: control debug for core/plugins + * Callback for command "/debug": controls debug for core/plugins. */ COMMAND_CALLBACK(debug) @@ -1445,7 +1450,8 @@ COMMAND_CALLBACK(debug) } /* - * command_eval: evaluate expression and send result to buffer + * Callback for command "/eval": evaluates an expression and sends result to + * buffer. */ COMMAND_CALLBACK(eval) @@ -1522,7 +1528,7 @@ COMMAND_CALLBACK(eval) } /* - * command_filter_display: display one filter + * Displays one filter. */ void @@ -1546,7 +1552,7 @@ command_filter_display (struct t_gui_filter *filter) } /* - * command_filter: manage message filters + * Callback for command "/filter": manages message filters. */ COMMAND_CALLBACK(filter) @@ -1827,8 +1833,7 @@ COMMAND_CALLBACK(filter) } /* - * command_help_list_plugin_commands: display help for commands of a plugin - * (or core commands if plugin is NULL) + * Displays help for commands of a plugin (or core commands if plugin is NULL). */ void @@ -1949,7 +1954,7 @@ command_help_list_plugin_commands (struct t_weechat_plugin *plugin, } /* - * command_help_list_commands: display help for commands + * Displays help for commands. */ void @@ -1969,7 +1974,7 @@ command_help_list_commands (int verbose) } /* - * command_help: display help about commands + * Callback for command "/help": displays help about commands and options. */ COMMAND_CALLBACK(help) @@ -2359,7 +2364,7 @@ COMMAND_CALLBACK(help) } /* - * command_history: display current buffer history + * Callback for command "/history": displays command history for current buffer. */ COMMAND_CALLBACK(history) @@ -2414,7 +2419,7 @@ COMMAND_CALLBACK(history) } /* - * command_input: input actions (used by key bindings) + * Callback for command "/input": input actions (used by key bindings). */ COMMAND_CALLBACK(input) @@ -2531,7 +2536,7 @@ COMMAND_CALLBACK(input) } /* - * command_key_display: display a key binding + * Displays a key binding. */ void @@ -2568,7 +2573,7 @@ command_key_display (struct t_gui_key *key, struct t_gui_key *default_key) } /* - * command_key_display_list: display a list of keys + * Displays a list of keys. */ void @@ -2596,8 +2601,8 @@ command_key_display_list (const char *message_no_key, } /* - * command_key_display_listdiff: list differences between default and current - * keys (keys added, redefined or removed) + * Displays differences between default and current keys (keys added, redefined + * or removed). */ void @@ -2679,7 +2684,7 @@ command_key_display_listdiff (int context) } /* - * command_key_reset: reset a key for a given context + * Resets a key for a given context. */ int @@ -2768,7 +2773,7 @@ command_key_reset (int context, const char *key) } /* - * command_key: bind/unbind keys + * Callback for command "/key": binds/unbinds keys. */ COMMAND_CALLBACK(key) @@ -3077,7 +3082,7 @@ COMMAND_CALLBACK(key) } /* - * command_layout_display_tree: display tree of windows + * Displays a tree of windows. */ void @@ -3135,7 +3140,7 @@ command_layout_display_tree (struct t_gui_layout_window *layout_window, } /* - * command_layout: save/apply buffers/windows layout + * Callback for command "/layout": saves/applies buffers/windows layout. */ COMMAND_CALLBACK(layout) @@ -3245,7 +3250,7 @@ COMMAND_CALLBACK(layout) } /* - * command_mouse_timer_cb: callback for mouse timer + * Callback for mouse timer. */ int @@ -3270,7 +3275,7 @@ command_mouse_timer_cb (void *data, int remaining_calls) } /* - * command_mouse_timer: timer for toggling mouse + * Timer for toggling mouse. */ void @@ -3288,7 +3293,7 @@ command_mouse_timer (const char *delay) } /* - * command_mouse: mouse control + * Callback for command "/mouse": controls mouse. */ COMMAND_CALLBACK(mouse) @@ -3356,7 +3361,7 @@ COMMAND_CALLBACK(mouse) } /* - * command_mute: execute a command mute + * Callback for command "/mute": silently executes a command. */ COMMAND_CALLBACK(mute) @@ -3425,7 +3430,7 @@ COMMAND_CALLBACK(mute) } /* - * command_plugin_list: list loaded plugins + * Displays a list of loaded plugins. */ void @@ -3646,7 +3651,7 @@ command_plugin_list (const char *name, int full) } } - /* config options hooked */ + /* configuration options hooked */ hook_found = 0; for (ptr_hook = weechat_hooks[HOOK_TYPE_CONFIG]; ptr_hook; ptr_hook = ptr_hook->next_hook) @@ -3721,7 +3726,7 @@ command_plugin_list (const char *name, int full) } /* - * command_plugin: list/load/unload WeeChat plugins + * Callback for command "/plugin": lists/loads/unloads WeeChat plugins. */ COMMAND_CALLBACK(plugin) @@ -3836,7 +3841,7 @@ COMMAND_CALLBACK(plugin) } /* - * command_proxy_list: list proxies + * Displays a list of proxies. */ void @@ -3874,7 +3879,7 @@ command_proxy_list () } /* - * command_proxy: manage proxies + * Callback for command "/proxy": manages proxies. */ COMMAND_CALLBACK(proxy) @@ -4006,7 +4011,7 @@ COMMAND_CALLBACK(proxy) } /* - * command_quit: quit WeeChat + * Callback for command "/quit": quits WeeChat. */ COMMAND_CALLBACK(quit) @@ -4055,7 +4060,7 @@ COMMAND_CALLBACK(quit) } /* - * command_reload_file: reload a configuration file + * Reloads a configuration file. */ void @@ -4085,7 +4090,7 @@ command_reload_file (struct t_config_file *config_file) } /* - * command_reload: reload WeeChat and plugins options from disk + * Callback for command "/reload": reloads a configuration file. */ COMMAND_CALLBACK(reload) @@ -4128,7 +4133,7 @@ COMMAND_CALLBACK(reload) } /* - * command_repeat_timer_cb: callback for repeat timer + * Callback for repeat timer. */ int @@ -4169,7 +4174,7 @@ command_repeat_timer_cb (void *data, int remaining_calls) } /* - * command_repeat: execute a command several times + * Callback for command "/repeat": executes a command several times. */ COMMAND_CALLBACK(repeat) @@ -4255,7 +4260,7 @@ COMMAND_CALLBACK(repeat) } /* - * command_save_file: save a configuration file to disk + * Saves a configuration file to disk. */ void @@ -4277,7 +4282,7 @@ command_save_file (struct t_config_file *config_file) } /* - * command_save: save configuration files to disk + * Callback for command "/save": saves configuration files to disk. */ COMMAND_CALLBACK(save) @@ -4322,7 +4327,7 @@ COMMAND_CALLBACK(save) } /* - * command_set_display_section: display configuration section + * Displays a configuration section. */ void @@ -4340,7 +4345,7 @@ command_set_display_section (struct t_config_file *config_file, } /* - * command_set_display_option: display configuration option + * Displays a configuration option. */ void @@ -4521,8 +4526,9 @@ command_set_display_option (struct t_config_option *option, } /* - * command_set_display_option_list: display list of options - * return: number of options displayed + * Displays a list of options. + * + * Returns the number of options displayed. */ int @@ -4579,7 +4585,7 @@ command_set_display_option_list (const char *message, const char *search) } /* - * command_set: set config options + * Callback for command "/set": sets configuration options. */ COMMAND_CALLBACK(set) @@ -4690,7 +4696,7 @@ COMMAND_CALLBACK(set) } /* - * command_unset: unset/reset config options + * Callback for command "/unset": unsets/resets configuration options. */ COMMAND_CALLBACK(unset) @@ -4781,7 +4787,7 @@ COMMAND_CALLBACK(unset) } /* - * command_upgrade: upgrade WeeChat + * Callback for command "/upgrade": upgrades WeeChat. */ COMMAND_CALLBACK(upgrade) @@ -4916,7 +4922,7 @@ COMMAND_CALLBACK(upgrade) } /* - * command_uptime: display WeeChat uptime + * Callback for command "/uptime": displays WeeChat uptime. */ COMMAND_CALLBACK(uptime) @@ -4989,7 +4995,7 @@ COMMAND_CALLBACK(uptime) } /* - * command_version_display: display WeeChat version + * Displays WeeChat version. */ void @@ -5066,7 +5072,7 @@ command_version_display (struct t_gui_buffer *buffer, } /* - * command_version: display WeeChat version + * Callback for command "/version": displays WeeChat version. */ COMMAND_CALLBACK(version) @@ -5098,7 +5104,7 @@ COMMAND_CALLBACK(version) } /* - * command_wait_timer_cb: callback for timer set by command_wait + * Callback for timer set by command_wait. */ int @@ -5139,7 +5145,7 @@ command_wait_timer_cb (void *data, int remaining_calls) } /* - * command_wait: schedule a command execution in future + * Callback for command "/wait": schedules a command execution in future. */ COMMAND_CALLBACK(wait) @@ -5215,7 +5221,7 @@ COMMAND_CALLBACK(wait) } /* - * command_window: manage windows + * Callback for command "/window": manages windows. */ COMMAND_CALLBACK(window) @@ -5588,7 +5594,7 @@ COMMAND_CALLBACK(window) } /* - * command_init: hook WeeChat commands + * Hooks WeeChat core commands. */ void @@ -6551,7 +6557,7 @@ command_init () } /* - * command_exec_list: execute command list + * Executes a list of commands (separated by ";"). */ void @@ -6576,7 +6582,7 @@ command_exec_list (const char *command_list) } /* - * command_startup: execute command at startup + * Executes commands at startup. */ void diff --git a/src/core/wee-completion.c b/src/core/wee-completion.c index 37119fbe4..5de9c9942 100644 --- a/src/core/wee-completion.c +++ b/src/core/wee-completion.c @@ -55,7 +55,7 @@ /* - * completion_list_add_bars_names_cb: add bars names to completion list + * Adds bar names to completion list. */ int @@ -81,7 +81,7 @@ completion_list_add_bars_names_cb (void *data, } /* - * completion_list_add_bars_options: add bars options to completion list + * Adds bar options to completion list. */ int @@ -107,7 +107,7 @@ completion_list_add_bars_options_cb (void *data, } /* - * completion_list_add_buffers_names_cb: add buffers names to completion list + * Adds buffer names to completion list. */ int @@ -134,7 +134,7 @@ completion_list_add_buffers_names_cb (void *data, } /* - * completion_list_add_buffers_numbers_cb: add buffers numbers to completion list + * Adds buffer numbers to completion list. */ int @@ -163,8 +163,7 @@ completion_list_add_buffers_numbers_cb (void *data, } /* - * completion_list_add_buffers_plugins_names_cb: add plugins + buffers names to - * completion list + * Adds plugin+buffer names to completion list. */ int @@ -191,8 +190,7 @@ completion_list_add_buffers_plugins_names_cb (void *data, } /* - * completion_list_add_buffer_properties_set_cb: add buffer properties (that - * can be set) to completion list + * Adds buffer properties (that can be set) to completion list. */ int @@ -219,8 +217,7 @@ completion_list_add_buffer_properties_set_cb (void *data, } /* - * completion_list_add_buffer_properties_get_cb: add buffer properties (that - * can be read) to completion list + * Adds buffer properties (that can be read) to completion list. */ int @@ -259,7 +256,7 @@ completion_list_add_buffer_properties_get_cb (void *data, } /* - * completion_list_add_windows_numbers_cb: add windows numbers to completion list + * Adds window numbers to completion list. */ int @@ -287,7 +284,7 @@ completion_list_add_windows_numbers_cb (void *data, } /* - * completion_list_map_add_palette_color_cb: add palette color in completion + * Adds a palette color to completion list. */ void @@ -305,7 +302,7 @@ completion_list_map_add_palette_color_cb (void *data, } /* - * completion_list_add_palette_colors_cb: add colors (in section "palette") + * Adds palette colors to completion list. */ int @@ -327,7 +324,7 @@ completion_list_add_palette_colors_cb (void *data, } /* - * completion_list_add_config_files_cb: add config files to completion list + * Adds configuration files to completion list. */ int @@ -354,7 +351,7 @@ completion_list_add_config_files_cb (void *data, } /* - * completion_list_add_filename: add filename to completion list + * Adds path/filename to completion list. */ int @@ -463,7 +460,7 @@ completion_list_add_filename_cb (void *data, } /* - * completion_list_add_filters_cb: add filters to completion list + * Adds filter names to completion list. */ int @@ -490,7 +487,7 @@ completion_list_add_filters_cb (void *data, } /* - * completion_list_add_commands_cb: add command hooks to completion list + * Adds command hooks to completion list. */ int @@ -521,7 +518,7 @@ completion_list_add_commands_cb (void *data, } /* - * completion_list_add_infos_cb: add info hooks to completion list + * Adds info hooks to completion list. */ int @@ -552,7 +549,7 @@ completion_list_add_infos_cb (void *data, } /* - * completion_list_add_infolists_cb: add infolist hooks to completion list + * Adds infolist hooks to completion list. */ int @@ -583,7 +580,7 @@ completion_list_add_infolists_cb (void *data, } /* - * completion_list_add_nicks_cb: add nicks to completion list + * Adds nicks to completion list. */ int @@ -608,8 +605,10 @@ completion_list_add_nicks_cb (void *data, completion); if (weelist_size (completion->completion_list) == count_before) { - /* no plugin overrides nick completion, then we use default nick */ - /* completion, wich nicks of nicklist, in order of nicklist */ + /* + * no plugin overrides nick completion => use default nick + * completion, with nicks of nicklist, in order of nicklist + */ ptr_group = NULL; ptr_nick = NULL; gui_nicklist_get_next_item (completion->buffer, @@ -631,8 +630,7 @@ completion_list_add_nicks_cb (void *data, } /* - * completion_list_add_config_options_cb: add config option to completion - * list + * Adds configuration options to completion list. */ int @@ -683,7 +681,7 @@ completion_list_add_config_options_cb (void *data, } /* - * completion_list_add_plugins_cb: add plugin name to completion list + * Adds plugin names to completion list. */ int @@ -710,9 +708,9 @@ completion_list_add_plugins_cb (void *data, } /* - * completion_list_add_plugins_commands_cb: add plugin commands to completion - * list (plugin name is previous - * argument) + * Adds plugin commands to completion list. + * + * The plugin name is read in previous argument. */ int @@ -773,26 +771,9 @@ completion_list_add_plugins_commands_cb (void *data, } /* - * completion_list_map_add_color_alias_cb: add color alias in completion - */ - -void -completion_list_map_add_color_alias_cb (void *data, - struct t_hashtable *hashtable, - const void *key, const void *value) -{ - /* make C compiler happy */ - (void) hashtable; - (void) value; - - gui_completion_list_add ((struct t_gui_completion *)data, - (char *)key, - 0, WEECHAT_LIST_POS_SORT); -} - -/* - * completion_list_add_config_option_values_cb: add option value to completion - * list + * Adds value of option to completion list. + * + * The option name is read in previous argument. */ int @@ -1044,8 +1025,7 @@ completion_list_add_config_option_values_cb (void *data, } /* - * completion_list_add_weechat_commands_cb: add WeeChat commands to - * completion list + * Adds WeeChat commands to completion list. */ int @@ -1079,7 +1059,7 @@ completion_list_add_weechat_commands_cb (void *data, } /* - * completion_list_add_proxies_names_cb: add proxies names to completion list + * Adds proxy names to completion list. */ int @@ -1106,7 +1086,7 @@ completion_list_add_proxies_names_cb (void *data, } /* - * completion_list_add_proxies_options: add proxies options to completion list + * Adds proxy options to completion list. */ int @@ -1132,7 +1112,7 @@ completion_list_add_proxies_options_cb (void *data, } /* - * completion_list_add_keys_contexts_cb: add keys contexts to completion list + * Adds key contexts to completion list. */ int @@ -1158,7 +1138,7 @@ completion_list_add_keys_contexts_cb (void *data, } /* - * completion_list_add_keys_codes_cb: add keys to completion list + * Adds keys to completion list. */ int @@ -1193,9 +1173,8 @@ completion_list_add_keys_codes_cb (void *data, } /* - * completion_list_add_keys_codes_for_reset_cb: add keys that can be reset - * (keys added, redefined or - * removed) to completion list + * Adds keys that can be reset (keys added, redefined or removed) to completion + * list. */ int @@ -1252,8 +1231,8 @@ completion_list_add_keys_codes_for_reset_cb (void *data, } /* - * completion_list_add_cursor_areas_cb: add areas for free cursor movement - * ("chat" and bar names) + * Adds areas for free cursor movement ("chat" and bar names) to completion + * list. */ int @@ -1293,7 +1272,7 @@ completion_list_add_cursor_areas_cb (void *data, } /* - * completion_init: add hooks for completions done by WeeChat core + * Adds hooks for completions done by WeeChat core. */ void diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 505e14a8c..2ac1e2046 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -59,7 +59,7 @@ void config_file_option_free_data (struct t_config_option *option); /* - * config_file_search: search a configuration file + * Searches for a configuration file. */ struct t_config_file * @@ -82,7 +82,9 @@ config_file_search (const char *name) } /* - * config_file_new: create new configuration options structure + * Creates a new configuration file. + * + * Returns pointer to new configuration file, NULL if error. */ struct t_config_file * @@ -98,7 +100,7 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name, if (!name) return NULL; - /* it's NOT authorized to create two configuration files with same filename */ + /* two configuration files can not have same name */ if (config_file_search (name)) return NULL; @@ -147,7 +149,9 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name, } /* - * config_file_new_section: create a new section in a config + * Creates a new section in a configuration file. + * + * Returns pointer to new section, NULL if error. */ struct t_config_section * @@ -225,7 +229,9 @@ config_file_new_section (struct t_config_file *config_file, const char *name, } /* - * config_file_search_section: search a section in a configuration structure + * Searches for a section in a configuration file. + * + * Returns pointer to section found, NULL if not found. */ struct t_config_section * @@ -249,7 +255,7 @@ config_file_search_section (struct t_config_file *config_file, } /* - * config_file_option_full_name: build full name for an option + * Builds full name for an option, using format: "file.section.option". */ char * @@ -277,7 +283,7 @@ config_file_option_full_name (struct t_config_option *option) } /* - * config_file_hook_config_exec: execute hook_config for modified option + * Executes hook_config for modified option. */ void @@ -330,8 +336,7 @@ config_file_hook_config_exec (struct t_config_option *option) } /* - * config_file_option_find_pos: find position for an option in section - * (for sorting options) + * Searches for position of option in section (to keep options sorted by name). */ struct t_config_option * @@ -354,8 +359,7 @@ config_file_option_find_pos (struct t_config_section *section, const char *name) } /* - * config_file_option_insert_in_section: insert option in section (for sorting - * options) + * Inserts an option in section (keeping options sorted by name). */ void @@ -401,7 +405,9 @@ config_file_option_insert_in_section (struct t_config_option *option) } /* - * config_file_option_malloc: allocate memory for new option and fill it with 0/NULL + * Allocates memory for a new option and initializes it. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -438,7 +444,9 @@ config_file_option_malloc () } /* - * config_file_new_option: create a new option + * Creates a new option. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -698,7 +706,9 @@ error: } /* - * config_file_search_option: search an option in a configuration file or section + * Searches for an option in a configuration file or section. + * + * Returns pointer to option found, NULL if error. */ struct t_config_option * @@ -737,8 +747,10 @@ config_file_search_option (struct t_config_file *config_file, } /* - * config_file_search_section_option: search an option in a configuration file - * or section and return section/option + * Searches for an option in a configuration file or section. + * + * Returns section/option found (in section_found/option_found), NULL if not + * found. */ void @@ -786,9 +798,8 @@ config_file_search_section_option (struct t_config_file *config_file, } /* - * config_file_search_with_string: search file/section/option for - * an option with full string - * (file.section.option) + * Searches for a file/section/option using a full name of option (format: + * "file.section.option"). */ void @@ -861,7 +872,11 @@ config_file_search_with_string (const char *option_name, } /* - * config_file_string_boolean_is_valid: return 1 if boolean is valid, otherwise 0 + * Checks if a string with boolean value is valid. + * + * Returns: + * 1: boolean value is valid + * 0: boolean value is NOT valid */ int @@ -889,8 +904,11 @@ config_file_string_boolean_is_valid (const char *text) } /* - * config_file_string_to_boolean: return boolean value of string - * (1 for true, 0 for false) + * Converts string to boolean value. + * + * Returns: + * 1: boolean value is true + * 0: boolean value is false */ int @@ -911,11 +929,12 @@ config_file_string_to_boolean (const char *text) } /* - * config_file_option_reset: set default value for an option - * return one of these values: - * WEECHAT_CONFIG_OPTION_SET_OK_CHANGED - * WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE - * WEECHAT_CONFIG_OPTION_SET_ERROR + * Resets an option to its default value. + * + * Returns: + * 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 */ int @@ -1037,11 +1056,12 @@ config_file_option_reset (struct t_config_option *option, int run_callback) } /* - * config_file_option_set: set value for an option - * return one of these values: - * WEECHAT_CONFIG_OPTION_SET_OK_CHANGED - * WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE - * WEECHAT_CONFIG_OPTION_SET_ERROR + * Sets the value for an option. + * + * Returns: + * 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 */ int @@ -1349,11 +1369,12 @@ config_file_option_set (struct t_config_option *option, const char *value, } /* - * config_file_option_set_null: set null (undefined) value for an option - * return one of these values: - * WEECHAT_CONFIG_OPTION_SET_OK_CHANGED - * WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE - * WEECHAT_CONFIG_OPTION_SET_ERROR + * Sets null (undefined) value for an option. + * + * Returns: + * 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 */ int @@ -1399,12 +1420,13 @@ config_file_option_set_null (struct t_config_option *option, int run_callback) } /* - * config_file_option_unset: unset/reset option - * return one of these values: - * WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET - * WEECHAT_CONFIG_OPTION_UNSET_OK_RESET - * WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED - * WEECHAT_CONFIG_OPTION_UNSET_ERROR + * Unsets/resets an option. + * + * Returns: + * 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 + * WEECHAT_CONFIG_OPTION_UNSET_ERROR: error */ int @@ -1471,7 +1493,7 @@ config_file_option_unset (struct t_config_option *option) } /* - * config_file_option_rename: rename an option + * Renames an option. */ void @@ -1512,7 +1534,7 @@ config_file_option_rename (struct t_config_option *option, } /* - * config_file_option_get_pointer: get a pointer of an option property + * Gets a pointer of an option property. */ void * @@ -1551,8 +1573,11 @@ config_file_option_get_pointer (struct t_config_option *option, } /* - * config_file_option_is_null: return 1 if value of option is null - * 0 if it is not null + * Checks if an option has a null value. + * + * Returns: + * 1: value of option is null + * 0: value of option is not null */ int @@ -1565,8 +1590,11 @@ config_file_option_is_null (struct t_config_option *option) } /* - * config_file_option_default_is_null: return 1 if default value of option is null - * 0 if it is not null + * Checks if an option has a null default value. + * + * Returns: + * 1: default value of option is null + * 0: default value of option is not null */ int @@ -1579,13 +1607,14 @@ config_file_option_default_is_null (struct t_config_option *option) } /* - * config_file_option_set_with_string: set value for an option (with a string - * for name of option) - * return one of these values: - * WEECHAT_CONFIG_OPTION_SET_OK_CHANGED - * WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE - * WEECHAT_CONFIG_OPTION_SET_ERROR - * WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND + * Sets the value for an option using a full name of option (format: + * "file.section.option"). + * + * Returns: + * 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 + * WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND: option not found */ int @@ -1629,7 +1658,9 @@ config_file_option_set_with_string (const char *option_name, const char *value) } /* - * config_file_option_boolean: return boolean value of an option + * Returns boolean value of an option. + * + * Returns 1 if value is true, 0 if it is false. */ int @@ -1645,7 +1676,9 @@ config_file_option_boolean (struct t_config_option *option) } /* - * config_file_option_boolean_default: return default boolean value of an option + * Returns default boolean value of an option. + * + * Returns 1 if default value is true, 0 if it is false. */ int @@ -1661,7 +1694,7 @@ config_file_option_boolean_default (struct t_config_option *option) } /* - * config_file_option_integer: return integer value of an option + * Returns integer value of an option. */ int @@ -1689,7 +1722,7 @@ config_file_option_integer (struct t_config_option *option) } /* - * config_file_option_integer_default: return default integer value of an option + * Returns default integer value of an option. */ int @@ -1717,7 +1750,7 @@ config_file_option_integer_default (struct t_config_option *option) } /* - * config_file_option_string: return string value of an option + * Returns string value of an option. */ const char * @@ -1748,7 +1781,7 @@ config_file_option_string (struct t_config_option *option) } /* - * config_file_option_string_default: return default string value of an option + * Returns default string value of an option. */ const char * @@ -1779,7 +1812,7 @@ config_file_option_string_default (struct t_config_option *option) } /* - * config_file_option_color: return color value of an option + * Returns color value of an option. */ const char * @@ -1792,7 +1825,7 @@ config_file_option_color (struct t_config_option *option) } /* - * config_file_option_color_default: return default color value of an option + * Returns default color value of an option. */ const char * @@ -1805,10 +1838,11 @@ config_file_option_color_default (struct t_config_option *option) } /* - * config_file_option_escape: return "\" if name of option must be escaped, - * or empty string if option must not be escaped - * The option is escaped if it is begining with one - * of these chars: # [ \ + * Returns a char to add before the name of option to escape it. + * + * Returns: + * "\": name must be escaped with "\" (if names begins with # [ \) + * "": name must not be escaped */ const char * @@ -1826,8 +1860,11 @@ config_file_option_escape (const char *name) } /* - * config_file_write_option: write an option in a configuration file - * return 1 if ok, 0 if error + * Writes an option in a configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1891,9 +1928,13 @@ config_file_write_option (struct t_config_file *config_file, } /* - * config_file_write_line: write a line in a configuration file - * if value is NULL, then write a section with [ ] around - * return 1 if ok, 0 if error + * Writes a line in a configuration file. + * + * If value is NULL, then writes a section with [ ] around. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1927,12 +1968,12 @@ config_file_write_line (struct t_config_file *config_file, } /* - * config_file_write_internal: write a configuration file - * (should not be called directly) - * return one of these values: - * WEECHAT_CONFIG_WRITE_OK - * WEECHAT_CONFIG_WRITE_ERROR - * WEECHAT_CONFIG_WRITE_MEMORY_ERROR + * Writes a configuration file (this function must not be called directly). + * + * Returns: + * WEECHAT_CONFIG_WRITE_OK: OK + * WEECHAT_CONFIG_WRITE_ERROR: error + * WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory */ int @@ -2080,11 +2121,12 @@ error: } /* - * config_file_write: write a configuration file - * return one of these values: - * WEECHAT_CONFIG_WRITE_OK - * WEECHAT_CONFIG_WRITE_ERROR - * WEECHAT_CONFIG_WRITE_MEMORY_ERROR + * Writes a configuration file. + * + * Returns: + * WEECHAT_CONFIG_WRITE_OK: OK + * WEECHAT_CONFIG_WRITE_ERROR: error + * WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory */ int @@ -2094,12 +2136,12 @@ config_file_write (struct t_config_file *config_file) } /* - * config_file_read_internal: read a configuration file - * (should not be called directly) - * return one of these values: - * WEECHAT_CONFIG_READ_OK - * WEECHAT_CONFIG_READ_MEMORY_ERROR - * WEECHAT_CONFIG_READ_FILE_NOT_FOUND + * Reads a configuration file (this function must not be called directly). + * + * Returns: + * WEECHAT_CONFIG_READ_OK: OK + * WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory + * WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found */ int @@ -2339,11 +2381,12 @@ config_file_read_internal (struct t_config_file *config_file, int reload) } /* - * config_file_read: read a configuration file - * return one of these values: - * WEECHAT_CONFIG_READ_OK - * WEECHAT_CONFIG_READ_MEMORY_ERROR - * WEECHAT_CONFIG_READ_FILE_NOT_FOUND + * Reads a configuration file. + * + * Returns: + * WEECHAT_CONFIG_READ_OK: OK + * WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory + * WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found */ int @@ -2353,11 +2396,12 @@ config_file_read (struct t_config_file *config_file) } /* - * config_file_reload: reload a configuration file - * return one of these values: - * WEECHAT_CONFIG_READ_OK - * WEECHAT_CONFIG_READ_MEMORY_ERROR - * WEECHAT_CONFIG_READ_FILE_NOT_FOUND + * Reloads a configuration file. + * + * Returns: + * WEECHAT_CONFIG_READ_OK: OK + * WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory + * WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found */ int @@ -2408,7 +2452,7 @@ config_file_reload (struct t_config_file *config_file) } /* - * config_file_option_free_data: free data in an option + * Frees data in an option. */ void @@ -2427,7 +2471,7 @@ config_file_option_free_data (struct t_config_option *option) } /* - * config_file_option_free: free an option + * Frees an option. */ void @@ -2465,7 +2509,7 @@ config_file_option_free (struct t_config_option *option) } /* - * config_file_section_free_options: free options in a section + * Frees options in a section. */ void @@ -2481,7 +2525,7 @@ config_file_section_free_options (struct t_config_section *section) } /* - * config_file_section_free: free a section + * Frees a section. */ void @@ -2520,7 +2564,7 @@ config_file_section_free (struct t_config_section *section) } /* - * config_file_free: free a configuration file + * Frees a configuration file. */ void @@ -2561,7 +2605,7 @@ config_file_free (struct t_config_file *config_file) } /* - * config_file_free_all: free all configuration files + * Frees all configuration files. */ void @@ -2574,7 +2618,7 @@ config_file_free_all () } /* - * config_file_free_all: free all configuration files for a plugin + * Frees all configuration files for a plugin. */ void @@ -2595,7 +2639,7 @@ config_file_free_all_plugin (struct t_weechat_plugin *plugin) } /* - * config_file_hdata_config_file_cb: return hdata for config_file + * Returns hdata for structure t_config_file. */ struct t_hdata * @@ -2627,7 +2671,7 @@ config_file_hdata_config_file_cb (void *data, const char *hdata_name) } /* - * config_file_hdata_config_section_cb: return hdata for config_section + * Returns hdata for structure t_config_section. */ struct t_hdata * @@ -2665,7 +2709,7 @@ config_file_hdata_config_section_cb (void *data, const char *hdata_name) } /* - * config_file_hdata_config_option_cb: return hdata for config_option + * Returns hdata for structure t_config_option. */ struct t_hdata * @@ -2705,8 +2749,11 @@ config_file_hdata_config_option_cb (void *data, const char *hdata_name) } /* - * config_file_add_to_infolist: add configuration options in an infolist - * return 1 if ok, 0 if error + * Adds configuration options in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3015,7 +3062,7 @@ config_file_add_to_infolist (struct t_infolist *infolist, } /* - * config_file_print_log: print configuration in log (usually for crash dump) + * Prints configuration file in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-config.c b/src/core/wee-config.c index a4fa0e5aa..530bd9d67 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -260,7 +260,7 @@ int config_num_plugin_extensions = 0; /* - * config_change_sys_rlimit: called when the system resource limits is changed + * Callback for changes on option "weechat.startup.sys_rlimit". */ void @@ -275,7 +275,7 @@ config_change_sys_rlimit (void *data, struct t_config_option *option) } /* - * config_change_save_config_on_exit: called when "save_config_on_exit" flag is changed + * Callback for changes on option "weechat.look.save_config_on_exit". */ void @@ -295,7 +295,7 @@ config_change_save_config_on_exit (void *data, struct t_config_option *option) } /* - * config_change_title: called when title is changed + * Callback for changes on option "weechat.look.set_title". */ void @@ -310,7 +310,7 @@ config_change_title (void *data, struct t_config_option *option) } /* - * config_change_buffers: called when buffers change (for example nicklist) + * Callback for changes on options that require a refresh of buffers. */ void @@ -324,7 +324,7 @@ config_change_buffers (void *data, struct t_config_option *option) } /* - * config_change_buffer_content: called when content of a buffer changes + * Callback for changes on options that require a refresh of content of buffer. */ void @@ -339,7 +339,7 @@ config_change_buffer_content (void *data, struct t_config_option *option) } /* - * config_change_mouse: called when mouse state is changed + * Callback for changes on option "weechat.look.mouse". */ void @@ -359,7 +359,7 @@ config_change_mouse (void *data, struct t_config_option *option) } /* - * config_change_buffer_notify_default: called when buffer default notify changes + * Callback for changes on option "weechat.look.buffer_notify_default". */ void @@ -373,7 +373,7 @@ config_change_buffer_notify_default (void *data, struct t_config_option *option) } /* - * config_change_buffer_time_format: called when buffer time format changes + * Callback for changes on option "weechat.look.buffer_time_format". */ void @@ -390,8 +390,7 @@ config_change_buffer_time_format (void *data, struct t_config_option *option) } /* - * config_compute_prefix_max_length_all_buffers: compute the "prefix_max_length" - * on all buffers + * Computes the "prefix_max_length" on all buffers. */ void @@ -410,7 +409,7 @@ config_compute_prefix_max_length_all_buffers () } /* - * config_change_prefix_same_nick: called when "prefix for same nick" changes + * Callback for changes on option "weechat.look.prefix_same_nick". */ void @@ -428,7 +427,7 @@ config_change_prefix_same_nick (void *data, struct t_config_option *option) } /* - * config_change_eat_newline_glitch: called when eat_newline_glitch changes + * Callback for changes on option "weechat.look.eat_newline_glitch". */ void @@ -454,7 +453,7 @@ config_change_eat_newline_glitch (void *data, struct t_config_option *option) } /* - * config_change_highlight_regex: called when highlight_regex changes + * Callback for changes on option "weechat.look.highlight_regex". */ void @@ -489,7 +488,7 @@ config_change_highlight_regex (void *data, struct t_config_option *option) } /* - * config_change_highlight_tags: called when highlight_tags changes + * Callback for changes on option "weechat.look.highlight_tags". */ void @@ -515,11 +514,11 @@ config_change_highlight_tags (void *data, struct t_config_option *option) } /* - * config_change_hotlist: called when hotlist changes + * Callback for changes on option "weechat.look.hotlist_sort". */ void -config_change_hotlist (void *data, struct t_config_option *option) +config_change_hotlist_sort (void *data, struct t_config_option *option) { /* make C compiler happy */ (void) data; @@ -529,7 +528,7 @@ config_change_hotlist (void *data, struct t_config_option *option) } /* - * config_change_paste_bracketed: called when bracketed paste mode is changed + * Callback for changes on option "weechat.look.paste_bracketed". */ void @@ -544,7 +543,7 @@ config_change_paste_bracketed (void *data, struct t_config_option *option) } /* - * config_change_read_marker: called when read marker is changed + * Callback for changes on option "weechat.look.read_marker". */ void @@ -558,7 +557,7 @@ config_change_read_marker (void *data, struct t_config_option *option) } /* - * config_change_prefix: called when a prefix is changed + * Callback for changes on a prefix option. */ void @@ -572,7 +571,7 @@ config_change_prefix (void *data, struct t_config_option *option) } /* - * config_change_prefix_align_min: called when prefix_align_min is changed + * Callback for changes on option "weechat.look.prefix_align_min". */ void @@ -587,8 +586,7 @@ config_change_prefix_align_min (void *data, struct t_config_option *option) } /* - * config_check_prefix_align_more: check string "prefix align more" (must be - * max one char wide on screen) + * Callback for changes on option "weechat.look.prefix_align_more". */ int @@ -603,8 +601,7 @@ config_check_prefix_align_more (void *data, struct t_config_option *option, } /* - * config_check_prefix_buffer_align_more: check string "prefix buffer align more" - * (must be max one char wide on screen) + * Callback for changes on option "weechat.look.prefix_buffer_align_more". */ int @@ -620,7 +617,7 @@ config_check_prefix_buffer_align_more (void *data, } /* - * config_change_color: called when a color is changed by /set command + * Callback for changes on a color option. */ void @@ -638,7 +635,7 @@ config_change_color (void *data, struct t_config_option *option) } /* - * config_change_nick_colors: called when nick colors are changed + * Callback for changes on option "weechat.color.chat_nick_colors". */ void @@ -652,7 +649,7 @@ config_change_nick_colors (void *data, struct t_config_option *option) } /* - * config_change_network_gnutls_ca_file: called when gnutls_ca_file is changed + * Callback for changes on option "weechat.network.gnutls_ca_file". */ void @@ -668,7 +665,7 @@ config_change_network_gnutls_ca_file (void *data, } /* - * config_change_plugin_extension: called when plugin extension is changed + * Callback for changes on option "weechat.plugin.extension". */ void @@ -694,8 +691,7 @@ config_change_plugin_extension (void *data, struct t_config_option *option) } /* - * config_day_change_timer_cb: timer callback for displaying - * "Day changed to xxx" message + * Displays message "Day changed to xxx". */ int @@ -752,8 +748,7 @@ config_day_change_timer_cb (void *data, int remaining_calls) } /* - * config_weechat_init_after_read: initialize some things after reading (or - * reloading) configuration file + * Initializes some things after reading/reloading WeeChat configuration file. */ void @@ -782,7 +777,7 @@ config_weechat_init_after_read () gui_bar_create_default (); } - /* if no key was found config file, then we use default bindings */ + /* if no key was found configuration file, then we use default bindings */ for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if (!gui_keys[i]) @@ -794,11 +789,12 @@ config_weechat_init_after_read () } /* - * config_weechat_reload_cb: reload WeeChat configuration file - * return one of these values: - * WEECHAT_CONFIG_READ_OK - * WEECHAT_CONFIG_READ_MEMORY_ERROR - * WEECHAT_CONFIG_READ_FILE_NOT_FOUND + * Reloads WeeChat configuration file. + * + * Returns: + * WEECHAT_CONFIG_READ_OK: OK + * WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory + * WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found */ int @@ -840,7 +836,7 @@ config_weechat_reload_cb (void *data, struct t_config_file *config_file) } /* - * config_weechat_debug_get: get debug level for a plugin (or "core") + * Gets debug level for a plugin (or "core"). */ struct t_config_option * @@ -852,8 +848,8 @@ config_weechat_debug_get (const char *plugin_name) } /* - * config_weechat_debug_set_all: set debug for "core" and all plugins, using - * values from [debug] section + * Sets debug level for "core" and all plugins, using values from section + * "debug". */ void @@ -876,7 +872,7 @@ config_weechat_debug_set_all () } /* - * config_weechat_debug_change_cb: called when a debug option is changed + * Callback for changes on a debug option. */ void @@ -891,7 +887,7 @@ config_weechat_debug_change_cb (void *data, } /* - * config_weechat_debug_create_option_cb: create option in "debug" section + * Callback called when an option is created in section "debug". */ int @@ -949,7 +945,7 @@ config_weechat_debug_create_option_cb (void *data, } /* - * config_weechat_debug_delete_option_cb: delete option in "debug" section + * Callback called when an option is deleted in section "debug". */ int @@ -971,7 +967,7 @@ config_weechat_debug_delete_option_cb (void *data, } /* - * config_weechat_debug_set: set debug level for a plugin (or "core") + * Sets debug level for a plugin (or "core"). */ int @@ -985,7 +981,7 @@ config_weechat_debug_set (const char *plugin_name, const char *value) } /* - * config_weechat_palette_change_cb: called when a palette option is changed + * Callback for changes on a palette option. */ void @@ -1008,7 +1004,7 @@ config_weechat_palette_change_cb (void *data, } /* - * config_weechat_palette_create_option_cb: create option in "palette" section + * Callback called when an option is created in section "palette". */ int @@ -1077,7 +1073,7 @@ config_weechat_palette_create_option_cb (void *data, } /* - * config_weechat_palette_delete_option_cb: delete option in "palette" section + * Callback called when an option is deleted in section "palette". */ int @@ -1105,7 +1101,7 @@ config_weechat_palette_delete_option_cb (void *data, } /* - * config_weechat_proxy_read_cb: read proxy option in config file + * Reads a proxy option in WeeChat configuration file. */ int @@ -1184,7 +1180,7 @@ config_weechat_proxy_read_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_bar_read_cb: read bar option in config file + * Reads a bar option in WeeChat configuration file. */ int @@ -1263,7 +1259,7 @@ config_weechat_bar_read_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_layout_read_cb: read layout option in config file + * Reads a layout option in WeeChat configuration file. */ int @@ -1342,7 +1338,7 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_layout_write: write windows layout in configuration file + * Writes layout of windows in WeeChat configuration file. */ int @@ -1379,7 +1375,7 @@ config_weechat_layout_write_tree (struct t_config_file *config_file, } /* - * config_weechat_layout_write_cb: write layout section in configuration file + * Writes section "layout" in WeeChat configuration file. */ int @@ -1415,7 +1411,7 @@ config_weechat_layout_write_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_notify_change_cb: callback when notify option is changed + * Callback for changes on a notify option. */ void @@ -1429,8 +1425,7 @@ config_weechat_notify_change_cb (void *data, struct t_config_option *option) } /* - * config_weechat_notify_create_option_cb: callback to create option in "notify" - * section + * Callback called when an option is created in section "notify". */ int @@ -1488,8 +1483,7 @@ config_weechat_notify_create_option_cb (void *data, } /* - * config_weechat_notify_delete_option_cb: called when a notify option is - * deleted + * Callback called when an option is deleted in section "notify". */ int @@ -1511,10 +1505,14 @@ config_weechat_notify_delete_option_cb (void *data, } /* - * config_weechat_notify_set: set a notify level for a buffer - * negative value will reset notify for buffer to - * default value (and remove buffer from config file) - * return 1 if ok, 0 if error + * Sets a notify level for a buffer. + * + * A negative value resets notify for buffer to its default value (and + * removes buffer from config file). + * + * Returns: + * 1: OK + * 0: error */ int @@ -1548,7 +1546,7 @@ config_weechat_notify_set (struct t_gui_buffer *buffer, const char *notify) } /* - * config_weechat_filter_read_cb: read filter option from config file + * Reads a filter option in WeeChat configuration file. */ int @@ -1584,7 +1582,7 @@ config_weechat_filter_read_cb (void *data, } /* - * config_weechat_filter_write_cb: write filter section in configuration file + * Writes a filter option in WeeChat configuration file. */ int @@ -1616,7 +1614,7 @@ config_weechat_filter_write_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_key_read_cb: read key option in config file + * Reads a key option in WeeChat configuration file. */ int @@ -1658,7 +1656,7 @@ config_weechat_key_read_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_key_write_cb: write key section in configuration file + * Writes section "key" in WeeChat configuration file. */ int @@ -1703,8 +1701,11 @@ config_weechat_key_write_cb (void *data, struct t_config_file *config_file, } /* - * config_weechat_init_options: init WeeChat config structure (all core options) - * return: 1 if ok, 0 if error + * Creates options in WeeChat configuration. + * + * Returns: + * 1: OK + * 0: error */ int @@ -2019,7 +2020,7 @@ config_weechat_init_options () "number_asc, number_desc)"), "group_time_asc|group_time_desc|group_number_asc|" "group_number_desc|number_asc|number_desc", - 0, 0, "group_time_asc", NULL, 0, NULL, NULL, &config_change_hotlist, NULL, NULL, NULL); + 0, 0, "group_time_asc", NULL, 0, NULL, NULL, &config_change_hotlist_sort, NULL, NULL, NULL); config_look_hotlist_unique_numbers = config_file_new_option ( weechat_config_file, ptr_section, "hotlist_unique_numbers", "boolean", @@ -2327,7 +2328,7 @@ config_weechat_init_options () N_("text color for '+' when scrolling bars"), NULL, -1, 0, "lightmagenta", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); - /* chat window */ + /* chat area */ config_color_chat = config_file_new_option ( weechat_config_file, ptr_section, "chat", "color", @@ -2548,7 +2549,7 @@ config_weechat_init_options () N_("text color for values"), NULL, GUI_COLOR_CHAT_VALUE, 0, "cyan", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); - /* status window */ + /* status bar */ config_color_status_number = config_file_new_option ( weechat_config_file, ptr_section, "status_number", "color", @@ -2635,7 +2636,7 @@ config_weechat_init_options () N_("text color for time (status bar)"), NULL, -1, 0, "default", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); - /* input window */ + /* input bar */ config_color_input_text_not_found = config_file_new_option ( weechat_config_file, ptr_section, "input_text_not_found", "color", @@ -2648,7 +2649,7 @@ config_weechat_init_options () N_("text color for actions in input line"), NULL, -1, 0, "lightgreen", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); - /* nicklist window */ + /* nicklist bar */ config_color_nicklist_group = config_file_new_option ( weechat_config_file, ptr_section, "nicklist_group", "color", @@ -2952,8 +2953,11 @@ config_weechat_init_options () } /* - * config_weechat_init: init WeeChat config structure - * return: 1 if ok, 0 if error + * Initializes WeeChat configuration. + * + * Returns: + * 1: OK + * 0: error */ int @@ -2995,11 +2999,12 @@ config_weechat_init () } /* - * config_weechat_read: read WeeChat configuration file - * return one of these values: - * WEECHAT_CONFIG_READ_OK - * WEECHAT_CONFIG_READ_MEMORY_ERROR - * WEECHAT_CONFIG_READ_FILE_NOT_FOUND + * Reads WeeChat configuration file. + * + * Returns: + * WEECHAT_CONFIG_READ_OK: OK + * WEECHAT_CONFIG_READ_MEMORY_ERROR: not enough memory + * WEECHAT_CONFIG_READ_FILE_NOT_FOUND: file not found */ int @@ -3022,11 +3027,12 @@ config_weechat_read () } /* - * config_weechat_write: write WeeChat configuration file - * return one of these values: - * WEECHAT_CONFIG_WRITE_OK - * WEECHAT_CONFIG_WRITE_ERROR - * WEECHAT_CONFIG_WRITE_MEMORY_ERROR + * Writes WeeChat configuration file. + * + * Returns: + * WEECHAT_CONFIG_WRITE_OK: OK + * WEECHAT_CONFIG_WRITE_ERROR: error + * WEECHAT_CONFIG_WRITE_MEMORY_ERROR: not enough memory */ int @@ -3036,7 +3042,7 @@ config_weechat_write () } /* - * config_weechat_free: free WeeChat configuration file and vars + * Frees WeeChat configuration file and variables. */ void diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index aa205fd57..1be397a02 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -60,7 +60,7 @@ int debug_dump_active = 0; /* - * debug_dump: write dump to WeeChat log file + * Writes dump of data to WeeChat log file. */ void @@ -116,7 +116,10 @@ debug_dump (int crash) } /* - * debug_dump_cb: callback for "debug_dump" signal hooked + * Callback for signal "debug_dump". + * + * This function is called when WeeChat is crashing or when command + * "/debug dump" is issued. */ int @@ -135,8 +138,9 @@ debug_dump_cb (void *data, const char *signal, const char *type_data, } /* - * debug_sigsegv: SIGSEGV handler: save crash log to - * <weechat_home>/weechat.log and exit + * Callback for system signal SIGSEGV handler. + * + * Writes dump of data and backtrace to WeeChat log file, then exit. */ void @@ -168,7 +172,9 @@ debug_sigsegv () } /* - * debug_buffer_cb: callback for "debug_buffer" signal hooked + * Callback for signal "debug_buffer". + * + * This function is called when command "/debug buffer" is issued. */ int @@ -186,7 +192,7 @@ debug_buffer_cb (void *data, const char *signal, const char *type_data, } /* - * debug_windows_tree_display: display tree of windows + * Displays tree of windows (this function must not be called directly). */ void @@ -238,7 +244,7 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent) } /* - * debug_windows_tree_display: display tree of windows + * Displays tree of windows. */ void @@ -250,7 +256,9 @@ debug_windows_tree () } /* - * debug_windows_cb: callback for "debug_windows" signal hooked + * Callback for signal "debug_windows". + * + * This function is called when command "/debug windows" is issued. */ int @@ -269,7 +277,7 @@ debug_windows_cb (void *data, const char *signal, const char *type_data, } /* - * debug_memory: display information about dynamic memory allocation + * Displays information about dynamic memory allocation. */ void @@ -300,7 +308,7 @@ debug_memory () } /* - * debug_hdata_hash_var_map_cb: function called for each variable in hdata + * Callback called for each variable in hdata. */ void @@ -323,7 +331,7 @@ debug_hdata_hash_var_map_cb (void *data, } /* - * debug_hdata_hash_list_map_cb: function called for each list in hdata + * Callback called for each list in hdata. */ void @@ -342,7 +350,7 @@ debug_hdata_hash_list_map_cb (void *data, } /* - * debug_hdata_map_cb: function called for each hdata in memory + * Callback called for each hdata in memory. */ void @@ -398,7 +406,7 @@ debug_hdata_map_cb (void *data, struct t_hashtable *hashtable, } /* - * debug_hdata: display list of hdata in memory + * Displays a list of hdata in memory. */ void @@ -416,7 +424,7 @@ debug_hdata () } /* - * debug_hooks: display infos about hooks + * Displays info about hooks. */ void @@ -445,7 +453,7 @@ debug_hooks () } /* - * debug_infolists: display list of infolists in memory + * Displays a list of infolists in memory. */ void @@ -534,7 +542,7 @@ debug_infolists () } /* - * debug_init: hook signals for debug + * Hooks signals for debug. */ void diff --git a/src/core/wee-eval.c b/src/core/wee-eval.c index f52e359e4..8f5faa247 100644 --- a/src/core/wee-eval.c +++ b/src/core/wee-eval.c @@ -48,9 +48,12 @@ char *comparisons[EVAL_NUM_COMPARISONS] = { "==", "!=", "<=", "<", ">=", ">", /* - * eval_is_true: return 1 if value is true, 0 otherwise - * A value is true if string is non-NULL, non-empty and different - * from "0". + * Checks if a value is true: a value is true if string is non-NULL, non-empty + * and different from "0". + * + * Returns: + * 1: value is true + * 0: value is false */ int @@ -60,8 +63,9 @@ eval_is_true (const char *value) } /* - * eval_hdata_get_value: get value of hdata using "path" to a variable - * Note: result must be freed after use + * Gets value of hdata using "path" to a variable. + * + * Note: result must be freed after use. */ char * @@ -209,16 +213,16 @@ end: } /* - * eval_replace_vars_cb: callback to replace variables, which can be, - * by order of priority: - * 1. an extra variable (from hashtable "extra_vars") - * 2. an name of option (file.section.option) - * 3. a buffer local variable - * 4. a hdata name/variable - * Examples: - * option: ${weechat.look.scroll_amount} - * hdata : ${window.buffer.full_name} - * ${window.buffer.local_variables.type} + * Replaces variables, which can be, by order of priority: + * 1. an extra variable (from hashtable "extra_vars") + * 2. an name of option (file.section.option) + * 3. a buffer local variable + * 4. a hdata name/variable + * + * Examples: + * option: ${weechat.look.scroll_amount} + * hdata : ${window.buffer.full_name} + * ${window.buffer.local_variables.type} */ char * @@ -329,7 +333,7 @@ end: } /* - * eval_replace_vars: replace variables in a string + * Replaces variables in a string. */ char * @@ -349,7 +353,17 @@ eval_replace_vars (const char *expr, struct t_hashtable *pointers, } /* - * eval_compare: compate two expressions + * Compares two expressions. + * + * Returns: + * "1": comparison is true + * "0": comparison is false + * + * Examples: + * "15 > 2": returns "1" + * "abc == def": returns "0" + * + * Note: result must be freed after use. */ char * @@ -440,12 +454,13 @@ end: } /* - * eval_expression_internal: evaluate an expression and return a string with - * the result (see function eval_expression()) - * (should not be called directly) - * Argument keep_parentheses is almost always 0, - * it is 1 only if the expression is a regex (to keep - * flags inside the parentheses) + * Evaluates an expression (this function must not be called directly). + * + * Argument keep_parentheses is almost always 0, it is 1 only if the expression + * is a regex (to keep flags inside the parentheses). + * + * For return value, see function eval_expression(). + * Note: result must be freed after use. */ char * @@ -635,31 +650,33 @@ end: } /* - * eval_expression: evaluate an expression and return a string with the result - * The hashtable "pointers" must have string for keys, pointer - * for values. - * The hashtable "extra_vars" must have string for keys and - * values. - * The expression can contain: - * - conditions: == != < <= > >= - * - logical operators: && || - * - parentheses for priority - * Examples (the [ ] are NOT part of result): - * >> ${window.buffer.number} - * == [2] - * >> buffer:${window.buffer.full_name} - * == [buffer:irc.freenode.#weechat] - * >> ${window.buffer.full_name} == irc.freenode.#weechat - * == [1] - * >> ${window.buffer.full_name} == irc.freenode.#test - * == [0] - * >> ${window.win_width} - * == [112] - * >> ${window.win_height} - * == [40] - * >> ${window.win_width} >= 30 && ${window.win_height} >= 20 - * == [1] - * Note: result must be freed after use + * Evaluates an expression. + * + * The hashtable "pointers" must have string for keys, pointer for values. + * The hashtable "extra_vars" must have string for keys and values. + * + * The expression can contain: + * - conditions: == != < <= > >= + * - logical operators: && || + * - parentheses for priority + * + * Examples (the [ ] are NOT part of result): + * >> ${window.buffer.number} + * == [2] + * >> buffer:${window.buffer.full_name} + * == [buffer:irc.freenode.#weechat] + * >> ${window.buffer.full_name} == irc.freenode.#weechat + * == [1] + * >> ${window.buffer.full_name} == irc.freenode.#test + * == [0] + * >> ${window.win_width} + * == [112] + * >> ${window.win_height} + * == [40] + * >> ${window.win_width} >= 30 && ${window.win_height} >= 20 + * == [1] + * + * Note: result must be freed after use. */ char * diff --git a/src/core/wee-hashtable.c b/src/core/wee-hashtable.c index ba25da341..8db9445f1 100644 --- a/src/core/wee-hashtable.c +++ b/src/core/wee-hashtable.c @@ -45,7 +45,9 @@ char *hashtable_type_string[HASHTABLE_NUM_TYPES] = /* - * hashtable_get_type: get integer for type (string) + * Searches for a hashtable type. + * + * Returns index of type in enum t_hashtable_type, -1 if type is not found. */ int @@ -67,7 +69,9 @@ hashtable_get_type (const char *type) } /* - * hashtable_hash_key_string_cb: default callback to hash a string key + * Hashes a string key (default callback). + * + * Returns an unsigned integer between 0 and size-1. */ unsigned int @@ -86,7 +90,12 @@ hashtable_hash_key_string_cb (struct t_hashtable *hashtable, const void *key) } /* - * hashtable_keycmp_string_cb: default callback for string comparison on keys + * Compares two string keys (default callback). + * + * Returns: + * -1: key1 < key2 + * 0: key1 == key2 + * 1: key1 > key2 */ int @@ -100,7 +109,14 @@ hashtable_keycmp_string_cb (struct t_hashtable *hashtable, } /* - * hashtable_new: create a new hash table + * Creates 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. + * + * Returns pointer to new hashtable, NULL if error. */ struct t_hashtable * @@ -157,7 +173,7 @@ hashtable_new (int size, } /* - * hashtable_alloc_type: alloc space for a key or value + * Allocates space for a key or value. */ void @@ -214,7 +230,7 @@ hashtable_alloc_type (enum t_hashtable_type type, } /* - * hashtable_free_key: free space used by a key + * Frees space used by a key. */ void @@ -237,7 +253,7 @@ hashtable_free_key (struct t_hashtable *hashtable, } /* - * hashtable_free_value: free space used by a value + * Frees space used by a value. */ void @@ -269,9 +285,13 @@ hashtable_free_value (struct t_hashtable *hashtable, } /* - * hashtable_set_with_size: set value for item in hash table - * argument size is used only for type "buffer" - * return 1 if ok, 0 if error + * Sets value for a key in hashtable. + * + * The size arguments are used only for type "buffer". + * + * Returns: + * 1: OK + * 0: error */ int @@ -289,7 +309,7 @@ hashtable_set_with_size (struct t_hashtable *hashtable, return 0; } - /* search position for item in hash table */ + /* search position for item in hashtable */ hash = hashtable->callback_hash_key (hashtable, key); pos_item = NULL; for (ptr_item = hashtable->htable[hash]; @@ -300,7 +320,7 @@ hashtable_set_with_size (struct t_hashtable *hashtable, pos_item = ptr_item; } - /* replace value if item is already in hash table */ + /* replace value if item is already in hashtable */ if (ptr_item && (hashtable->callback_keycmp (hashtable, key, ptr_item->key) == 0)) { hashtable_free_value (hashtable, ptr_item); @@ -349,10 +369,14 @@ hashtable_set_with_size (struct t_hashtable *hashtable, } /* - * hashtable_set: set value for item in hash table - * return 1 if ok, 0 if error - * Note: this function can be called *only* if key AND value are - * *not* of type "buffer" + * Sets value for a key in hashtable. + * + * Note: this function can be called *only* if key AND value are *not* of type + * "buffer". + * + * Returns: + * 1: OK + * 0: error */ int @@ -363,9 +387,10 @@ hashtable_set (struct t_hashtable *hashtable, } /* - * hashtable_get_item: search an item in hashtable - * if hash is non NULL pointer, then it is set with - * hash value of key (even if key is not found) + * Searches for an item in hashtable. + * + * If hash is non NULL, then it is set with hash value of key (even if key is + * not found). */ struct t_hashtable_item * @@ -397,9 +422,9 @@ hashtable_get_item (struct t_hashtable *hashtable, const void *key, } /* - * hashtable_get: get value for a key in hash table - * return pointer to "value" for key, - * or NULL if key is not found in hash table + * Gets value for a key in hashtable. + * + * Returns pointer to value for key, NULL if key is not found. */ void * @@ -413,7 +438,11 @@ hashtable_get (struct t_hashtable *hashtable, const void *key) } /* - * hashtable_has_key: return 1 if key is in hashtable, otherwise 0 + * Checks if a key exists in the hashtable. + * + * Returns: + * 1: key exists + * 0: key does not exist */ int @@ -423,11 +452,11 @@ hashtable_has_key (struct t_hashtable *hashtable, const void *key) } /* - * hashtable_to_string: convert a value (from any type) to a string - * Value returned is a pointer to a static buffer (except - * if type is string, then pointer to string itself is - * returned) and must be used immediately, it is - * overwritten by subsequent calls to this function. + * Converts a value (from any type) to a string. + * + * Returns pointer to a static buffer (for type string, returns pointer to + * string itself), which must be used immediately, it is overwritten by + * subsequent calls to this function. */ const char * @@ -463,7 +492,7 @@ hashtable_to_string (enum t_hashtable_type type, const void *value) } /* - * hashtable_map: call a function on all hashtable entries + * Calls a function on all hashtable entries. */ void @@ -495,8 +524,7 @@ hashtable_map (struct t_hashtable *hashtable, } /* - * hashtable_map_string: call a function on all hashtable entries, - * sending keys and values as strings + * Calls a function on all hashtable entries (sends keys and values as strings). */ void @@ -543,8 +571,8 @@ hashtable_map_string (struct t_hashtable *hashtable, } /* - * hashtable_duplicate_map_cb: function called for each variable in hashtable - * to duplicate all keys + * Duplicates key/value in another hashtable (callback called for each variable + * in hashtable). */ void @@ -563,7 +591,9 @@ hashtable_duplicate_map_cb (void *data, } /* - * hashtable_dup: duplicate hashtable + * Duplicates a hashtable. + * + * Returns pointer to new hashtable, NULL if error. */ struct t_hashtable * @@ -588,8 +618,7 @@ hashtable_dup (struct t_hashtable *hashtable) } /* - * hashtable_get_list_keys_map_cb: function called for each variable in - * hashtable to build sorted list of keys + * Builds sorted list of keys (callback called for each variable in hashtable). */ void @@ -610,8 +639,9 @@ hashtable_get_list_keys_map_cb (void *data, } /* - * hashtable_get_list_keys: get list with sorted keys of hashtable - * Note: list must be freed after use + * Gets list with sorted keys of hashtable. + * + * Note: list must be freed after use. */ struct t_weelist * @@ -626,7 +656,7 @@ hashtable_get_list_keys (struct t_hashtable *hashtable) } /* - * hashtable_get_integer: get a hashtable property as integer + * Gets a hashtable property as integer. */ int @@ -644,7 +674,7 @@ hashtable_get_integer (struct t_hashtable *hashtable, const char *property) } /* - * hashtable_compute_length_keys_cb: compute length of all keys + * Computes length of all keys (callback called for each variable in hashtable). */ void @@ -666,7 +696,8 @@ hashtable_compute_length_keys_cb (void *data, } /* - * hashtable_compute_length_values_cb: compute length of all values + * Computes length of all values (callback called for each variable in + * hashtable). */ void @@ -695,7 +726,8 @@ hashtable_compute_length_values_cb (void *data, } /* - * hashtable_compute_length_keys_values_cb: compute length of all keys + values + * Computes length of all keys + values (callback called for each variable in + * hashtable). */ void @@ -708,7 +740,8 @@ hashtable_compute_length_keys_values_cb (void *data, } /* - * hashtable_build_string_keys_cb: build string with all keys + * Builds a string with all keys (callback called for each variable in + * hashtable). */ void @@ -733,7 +766,8 @@ hashtable_build_string_keys_cb (void *data, } /* - * hashtable_build_string_values_cb: build string with all values + * Builds a string with all values (callback called for each variable in + * hashtable). */ void @@ -765,7 +799,8 @@ hashtable_build_string_values_cb (void *data, } /* - * hashtable_build_string_keys_values_cb: build string with all keys + values + * Builds a string with all keys + values (callback called for each variable in + * hashtable). */ void @@ -800,11 +835,12 @@ hashtable_build_string_keys_values_cb (void *data, } /* - * hashtable_get_keys_values: get keys and/or values of hashtable as string - * string has format, one of: - * keys only: "key1,key2,key3" - * values only: "value1,value2,value3" - * keys + values: "key1:value1,key2:value2,key3:value3" + * Gets keys and/or values of hashtable as string. + * + * Returns 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" */ const char * @@ -876,7 +912,7 @@ hashtable_get_keys_values (struct t_hashtable *hashtable, } /* - * hashtable_get_string: get a hashtable property as string + * Gets a hashtable property as string. */ const char * @@ -904,7 +940,7 @@ hashtable_get_string (struct t_hashtable *hashtable, const char *property) } /* - * hashtable_set_pointer: set a hashtable property (pointer) + * Sets a hashtable property (pointer). */ void @@ -919,8 +955,11 @@ hashtable_set_pointer (struct t_hashtable *hashtable, const char *property, } /* - * hashtable_add_to_infolist: add hashtable keys and values to infolist - * return 1 if ok, 0 if error + * Adds hashtable keys and values in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -987,7 +1026,7 @@ hashtable_add_to_infolist (struct t_hashtable *hashtable, } /* - * hashtable_remove_item: remove an item from hashmap + * Removes an item from hashtable. */ void @@ -1016,7 +1055,7 @@ hashtable_remove_item (struct t_hashtable *hashtable, } /* - * hashtable_remove: remove an item from hashmap (search it with key) + * Removes an item from hashtable (searches it with key). */ void @@ -1034,7 +1073,7 @@ hashtable_remove (struct t_hashtable *hashtable, const void *key) } /* - * hashtable_remove_all: remove all items from hashmap + * Removes all items from hashtable. */ void @@ -1055,7 +1094,7 @@ hashtable_remove_all (struct t_hashtable *hashtable) } /* - * hashtable_free: free hashtable (remove all items and free hashtable) + * Frees a hashtable: removes all items and frees hashtable. */ void @@ -1072,7 +1111,7 @@ hashtable_free (struct t_hashtable *hashtable) } /* - * hashtable_print_log: print hashtable in log (usually for crash dump) + * Prints hashtable in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c index 0ccad400d..95b0f2eb4 100644 --- a/src/core/wee-hdata.c +++ b/src/core/wee-hdata.c @@ -44,7 +44,7 @@ char *hdata_type_string[8] = /* - * hdata_free_var: free a hdata variable + * Frees a hdata variable. */ void @@ -69,7 +69,9 @@ hdata_free_var (struct t_hashtable *hashtable, } /* - * hdata_new: create a new hdata + * Creates a new hdata. + * + * Returns pointer to new hdata, NULL if error. */ struct t_hdata * @@ -118,7 +120,7 @@ hdata_new (struct t_weechat_plugin *plugin, const char *hdata_name, } /* - * hdata_new_var: add a new variable (offset/type) in a hdata + * Adds a new variable in a hdata. */ void @@ -144,7 +146,7 @@ hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, } /* - * hdata_new_list: add a new list pointer in a hdata + * Adds a new list pointer in a hdata. */ void @@ -157,7 +159,7 @@ hdata_new_list (struct t_hdata *hdata, const char *name, void *pointer) } /* - * hdata_get_var_offset: get offset of variable + * Gets offset of variable in hdata. */ int @@ -176,7 +178,7 @@ hdata_get_var_offset (struct t_hdata *hdata, const char *name) } /* - * hdata_get_var_type: get type of variable (as integer) + * Gets type of variable in hdata (as integer). */ int @@ -195,7 +197,7 @@ hdata_get_var_type (struct t_hdata *hdata, const char *name) } /* - * hdata_get_var_type_string: get type of variable (as string) + * Gets type of variable in hdata (as string). */ const char * @@ -214,10 +216,9 @@ hdata_get_var_type_string (struct t_hdata *hdata, const char *name) } /* - * hdata_get_var_array_size: get array size for variable (if variable is an - * array) - * return -1 if if variable is not an array - * (or if error) + * Gets 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). */ int @@ -311,7 +312,7 @@ hdata_get_var_array_size (struct t_hdata *hdata, void *pointer, } /* - * hdata_get_var_array_size_string: get array size for variable as string + * Gets size of array for variable as string. */ const char * @@ -334,8 +335,9 @@ hdata_get_var_array_size_string (struct t_hdata *hdata, void *pointer, } /* - * hdata_get_var_hdata: get hdata name for a variable (NULL if variable has - * no hdata) + * Gets hdata name for a variable. + * + * Returns hdata name, NULL if variable has no hdata. */ const char * @@ -354,7 +356,7 @@ hdata_get_var_hdata (struct t_hdata *hdata, const char *name) } /* - * hdata_get_var: get pointer to content of variable using hdata var name + * Gets pointer to content of variable using hdata variable name. */ void * @@ -373,8 +375,7 @@ hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_get_var_at_offset: get pointer to content of variable using hdata var - * offset + * Gets pointer to content of variable using hdata variable offset. */ void * @@ -387,7 +388,7 @@ hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer, int offset) } /* - * hdata_get_list: get a list pointer + * Gets a list pointer in hdata. */ void * @@ -406,9 +407,11 @@ hdata_get_list (struct t_hdata *hdata, const char *name) } /* - * hdata_check_pointer: check if a pointer is valid for a given hdata/list - * return 1 if pointer exists in list - * 0 if pointer does not exist + * Checks if a pointer is valid for a given hdata/list. + * + * Returns: + * 1: pointer exists in list + * 0: pointer does not exist */ int @@ -433,7 +436,7 @@ hdata_check_pointer (struct t_hdata *hdata, void *list, void *pointer) } /* - * hdata_move: move pointer to another element in list + * Moves pointer to another element in list. */ void * @@ -459,11 +462,12 @@ hdata_move (struct t_hdata *hdata, void *pointer, int count) } /* - * hdata_get_index_and_name: extract index from name of variable - * A name can contain index with this format: - * "N|name" (where N is an integer >= 0) - * "index" is set to N, "ptr_name" points to start - * of name in string (after the "|" if found) + * Extracts index from name of a variable. + * + * A name can contain index with this format: "NNN|name" (where NNN is an + * integer >= 0). + * Argument "index" is set to N, "ptr_name" points to start of name in string + * (after the "|" if found). */ void @@ -501,7 +505,7 @@ hdata_get_index_and_name (const char *name, int *index, const char **ptr_name) } /* - * hdata_char: get char value of a variable in structure using hdata + * Gets char value of a variable in hdata. */ char @@ -531,7 +535,7 @@ hdata_char (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_integer: get integer value of a variable in structure using hdata + * Gets integer value of a variable in hdata. */ int @@ -561,7 +565,7 @@ hdata_integer (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_long: get long value of a variable in structure using hdata + * Gets long value of a variable in hdata. */ long @@ -591,7 +595,7 @@ hdata_long (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_string: get string value of a variable in structure using hdata + * Gets string value of a variable in hdata. */ const char * @@ -621,7 +625,7 @@ hdata_string (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_pointer: get pointer value of a variable in structure using hdata + * Gets pointer value of a variable in hdata. */ void * @@ -651,7 +655,7 @@ hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_time: get time value of a variable in structure using hdata + * Gets time value of a variable in hdata. */ time_t @@ -681,7 +685,7 @@ hdata_time (struct t_hdata *hdata, void *pointer, const char *name) } /* - * hdata_hashtable: get hashtable value of a variable in structure using hdata + * Gets hashtable value of a variable in hdata. */ struct t_hashtable * @@ -710,12 +714,16 @@ hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name) return NULL; } -/* hdata_set: 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). - * Return 1 if ok (value set), 0 if error (or not allowed) +/* + * Sets 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: + * 1: OK (value set) + * 0: error (or not allowed) */ int @@ -795,15 +803,17 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name, } /* - * hdata_update: 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 pointer (if allowed for this hdata). - * WARNING: this is dangerous, and only some data can be updated - * by this function (this depends on hdata, see API doc - * for more info) - * Return number of variables updated or 0 if nothing has been - * updated. In case of deletion, return 1 if ok, 0 if error. + * Updates some data in hdata. + * + * The hashtable contains keys with new values. + * A special key "__delete" can be used to delete the whole structure at + * pointer (if allowed for this hdata). + * + * 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. */ int @@ -847,7 +857,7 @@ hdata_update (struct t_hdata *hdata, void *pointer, } /* - * hdata_get_string: get a hdata property as string + * Gets a hdata property as string. */ const char * @@ -877,7 +887,7 @@ hdata_get_string (struct t_hdata *hdata, const char *property) } /* - * hdata_free: free a hdata + * Frees a hdata. */ void @@ -896,7 +906,7 @@ hdata_free (struct t_hdata *hdata) } /* - * hdata_free_all_plugin_map_cb: function called for each hdata in memory + * Frees hdata for a plugin (callback called for each hdata in memory). */ void @@ -915,7 +925,7 @@ hdata_free_all_plugin_map_cb (void *data, struct t_hashtable *hashtable, } /* - * hdata_free_all_plugin: free all hdata created by a plugin + * Frees all hdata created by a plugin. */ void @@ -925,7 +935,7 @@ hdata_free_all_plugin (struct t_weechat_plugin *plugin) } /* - * hdata_free_all_map_cb: function called for each hdata in memory + * Frees hdata (callback called for each hdata in memory). */ void @@ -944,7 +954,7 @@ hdata_free_all_map_cb (void *data, struct t_hashtable *hashtable, } /* - * hdata_free_all: free all hdata + * Frees all hdata. */ void @@ -954,7 +964,8 @@ hdata_free_all () } /* - * hdata_print_log_var_map_cb: function called for each variable in hdata + * Prints variable of a hdata in WeeChat log file (callback called for each + * variable in hdata). */ void @@ -979,7 +990,7 @@ hdata_print_log_var_map_cb (void *data, struct t_hashtable *hashtable, } /* - * hdata_print_log_map_cb: function called for each hdata in memory + * Prints hdata in WeeChat log file (callback called for each hdata in memory). */ void @@ -1014,7 +1025,7 @@ hdata_print_log_map_cb (void *data, struct t_hashtable *hashtable, } /* - * hdata_print_log: print hdata in log (usually for crash dump) + * Prints hdata in WeeChat log file (usually for crash dump). */ void @@ -1024,7 +1035,7 @@ hdata_print_log () } /* - * hdata_init: create hashtable with hdata + * Initializes hdata: creates a hashtable with hdata. */ void @@ -1038,7 +1049,7 @@ hdata_init () } /* - * hdata_end: free all hdata and hashtable with hdata + * Frees all hdata and hashtable with hdata. */ void diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 94bc11a69..bf42740de 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -77,7 +77,7 @@ void hook_process_run (struct t_hook *hook_process); /* - * hook_init: init hooks lists + * Initializes lists of hooks. */ void @@ -94,7 +94,9 @@ hook_init () } /* - * hook_search_type: search type string and return integer (-1 if not found) + * Searches for a hook type. + * + * Returns index of type in enum t_hook_type, -1 if type is not found. */ int @@ -116,9 +118,10 @@ hook_search_type (const char *type) } /* - * hook_find_pos: find position for new hook: - * - for type command: sort on command name, then priority - * - for all other types: sort on priority + * Searches 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. */ struct t_hook * @@ -160,7 +163,7 @@ hook_find_pos (struct t_hook *hook) } /* - * hook_add_to_list: add a hook to list + * Adds a hook to list. */ void @@ -201,7 +204,7 @@ hook_add_to_list (struct t_hook *new_hook) } /* - * hook_remove_from_list: remove a hook from list + * Removes a hook from list. */ void @@ -231,7 +234,7 @@ hook_remove_from_list (struct t_hook *hook) } /* - * hook_remove_deleted: remove deleted hooks from list + * Removes hooks marked as "deleted" from list. */ void @@ -260,31 +263,31 @@ hook_remove_deleted () } /* - * hook_get_priority_and_name: get priority (integer) and pointer to start of - * name, from argument "name" - * name may be: - * - a simple name like "test": - * => priority = 1000 (default), ptr_name = "test" - * - a priority + "|" + name, like "500|test": - * => priority = 500, ptr_name = "test" + * Extracts priority and name from a string. + * + * String can be: + * - a simple name like "test": + * => priority = 1000 (default), name = "test" + * - a priority + "|" + name, like "500|test": + * => priority = 500, name = "test" */ void -hook_get_priority_and_name (const char *name, - int *priority, const char **ptr_name) +hook_get_priority_and_name (const char *string, + int *priority, const char **name) { char *pos, *str_priority, *error; long number; if (priority) *priority = HOOK_PRIORITY_DEFAULT; - if (ptr_name) - *ptr_name = name; + if (name) + *name = string; - pos = strchr (name, '|'); + pos = strchr (string, '|'); if (pos) { - str_priority = string_strndup (name, pos - name); + str_priority = string_strndup (string, pos - string); if (str_priority) { error = NULL; @@ -293,8 +296,8 @@ hook_get_priority_and_name (const char *name, { if (priority) *priority = number; - if (ptr_name) - *ptr_name = pos + 1; + if (name) + *name = pos + 1; } free (str_priority); } @@ -302,7 +305,7 @@ hook_get_priority_and_name (const char *name, } /* - * hook_init_data: init data a new hook with default values + * Initializes a new hook with default values. */ void @@ -330,9 +333,11 @@ hook_init_data (struct t_hook *hook, struct t_weechat_plugin *plugin, } /* - * hook_valid: check if a hook pointer exists - * return 1 if hook exists - * 0 if hook is not found + * Checks if a hook pointer is valid. + * + * Returns: + * 1: hook exists + * 0: hook does not exist */ int @@ -356,7 +361,7 @@ hook_valid (struct t_hook *hook) } /* - * hook_exec_start: code executed before a hook exec + * Starts a hook exec. */ void @@ -366,7 +371,7 @@ hook_exec_start () } /* - * hook_exec_end: code executed after a hook exec + * Ends a hook_exec. */ void @@ -380,7 +385,9 @@ hook_exec_end () } /* - * hook_search_command: search command hook in list + * Searches for a command hook in list. + * + * Returns pointer to hook found, NULL if not found. */ struct t_hook * @@ -402,8 +409,8 @@ hook_search_command (struct t_weechat_plugin *plugin, const char *command) } /* - * hook_command_build_completion: build variables/arrays that will be used for - * completion of commands arguments + * Builds variables/arrays that will be used for completion of commands + * arguments. */ void @@ -572,7 +579,9 @@ hook_command_build_completion (struct t_hook_command *hook_command) } /* - * hook_command: hook a command + * Hooks a command. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -641,14 +650,15 @@ hook_command (struct t_weechat_plugin *plugin, const char *command, } /* - * hook_command_exec: execute command hook - * return: 0 if command executed and failed - * 1 if command executed successfully - * -1 if command not found - * -2 if command is ambigous (same command exists - * for another plugin, and we don't know which - * one to run) - * -3 if command is already running + * Executes a command hook. + * + * Returns: + * 0: command executed and failed + * 1: command executed successfully + * -1: command not found + * -2: command is ambiguous (same command exists for another plugin, and we + * don't know which one to run) + * -3: command is already running */ int @@ -783,7 +793,9 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, } /* - * hook_command_run: hook a command when it's run by WeeChat + * Hooks a command when it's run by WeeChat. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -823,7 +835,7 @@ hook_command_run (struct t_weechat_plugin *plugin, const char *command, } /* - * hook_command_run_exec: execute command_run hook + * Executes a command_run hook. */ int @@ -895,7 +907,7 @@ hook_command_run_exec (struct t_gui_buffer *buffer, const char *command) } /* - * hook_timer_init: init a timer hook + * Initializes a timer hook. */ void @@ -950,7 +962,9 @@ hook_timer_init (struct t_hook *hook) } /* - * hook_timer: hook a timer + * Hooks a timer. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -991,10 +1005,9 @@ hook_timer (struct t_weechat_plugin *plugin, long interval, int align_second, } /* - * hook_timer_check_system_clock: check if system clock is older than previous - * call to this function (that means new time - * is lower that in past). If yes, then adjust - * all timers to current time + * 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 + * time. */ void @@ -1034,9 +1047,7 @@ hook_timer_check_system_clock () } /* - * hook_timer_time_to_next: get time to next timeout - * return 1 if timeout is set with next timeout - * 0 if there's no timeout + * Sets time until next timeout. */ void @@ -1106,7 +1117,7 @@ hook_timer_time_to_next (struct timeval *tv_timeout) } /* - * hook_timer_exec: execute timer hooks + * Executes timer hooks. */ void @@ -1161,7 +1172,9 @@ hook_timer_exec () } /* - * hook_search_fd: search fd hook in list + * Searches for a fd hook in list. + * + * Returns pointer to hook found, NULL if not found. */ struct t_hook * @@ -1181,7 +1194,9 @@ hook_search_fd (int fd) } /* - * hook_fd: hook a fd event + * Hooks a fd event. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1226,8 +1241,9 @@ hook_fd (struct t_weechat_plugin *plugin, int fd, int flag_read, } /* - * hook_fd_set: fill sets according to hd hooked - * return highest fd set + * Fills sets according to fd hooked. + * + * Returns highest fd set. */ int @@ -1284,7 +1300,7 @@ hook_fd_set (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds) } /* - * hook_fd_exec: execute fd callbacks with sets + * Executes fd callbacks with sets. */ void @@ -1321,7 +1337,9 @@ hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds) } /* - * hook_process_hashtable: hook a process (using fork) with options in hashtable + * Hooks a process (using fork) with options in hashtable. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1393,7 +1411,9 @@ hook_process_hashtable (struct t_weechat_plugin *plugin, } /* - * hook_process: hook a process (using fork) + * Hooks a process (using fork). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1406,8 +1426,8 @@ hook_process (struct t_weechat_plugin *plugin, } /* - * hook_process_child: child process for hook process: execute function and - * return string result into pipe for WeeChat process + * Child process for hook process: executes command and returns string result + * into pipe for WeeChat process. */ void @@ -1536,7 +1556,7 @@ hook_process_child (struct t_hook *hook_process) } /* - * hook_process_send_buffers: send buffers (stdout/stderr) to callback + * Sends buffers (stdout/stderr) to callback. */ void @@ -1568,7 +1588,7 @@ hook_process_send_buffers (struct t_hook *hook_process, int callback_rc) } /* - * hook_process_add_to_buffer: add some data to buffer (stdout or stderr) + * Adds some data to buffer (stdout or stderr). */ void @@ -1585,8 +1605,7 @@ hook_process_add_to_buffer (struct t_hook *hook_process, int index_buffer, } /* - * hook_process_child_read: read process output (stdout or stderr) from child - * process + * Reads process output (stdout or stderr) from child process. */ void @@ -1613,8 +1632,7 @@ hook_process_child_read (struct t_hook *hook_process, int fd, } /* - * hook_process_child_read_stdout_cb: read process output (stdout) from child - * process + * Reads process output (stdout) from child process. */ int @@ -1629,8 +1647,7 @@ hook_process_child_read_stdout_cb (void *arg_hook_process, int fd) } /* - * hook_process_child_read_stderr_cb: read process output (stderr) from child - * process + * Reads process output (stderr) from child process. */ int @@ -1645,7 +1662,7 @@ hook_process_child_read_stderr_cb (void *arg_hook_process, int fd) } /* - * hook_process_timer_cb: timer to check if child is died or not + * Checks if child process is still alive. */ int @@ -1694,8 +1711,8 @@ hook_process_timer_cb (void *arg_hook_process, int remaining_calls) } /* - * hook_process_run: fork, execute process function in child, and read data in - * current process, with fd hook + * Executes process command in child, and read data in current process, + * with fd hook. */ void @@ -1800,7 +1817,9 @@ hook_process_run (struct t_hook *hook_process) } /* - * hook_connect: hook a connection to peer (using fork) + * Hooks a connection to a peer (using fork). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1884,7 +1903,7 @@ hook_connect (struct t_weechat_plugin *plugin, const char *proxy, } /* - * hook_connect_gnutls_verify_certificates: verify certificates + * Verifies certificates. */ #ifdef HAVE_GNUTLS @@ -1917,7 +1936,7 @@ hook_connect_gnutls_verify_certificates (gnutls_session_t tls_session) #endif /* - * hook_connect_gnutls_set_certificates: set certificates + * Sets certificates. */ #ifdef HAVE_GNUTLS @@ -1958,7 +1977,9 @@ hook_connect_gnutls_set_certificates (gnutls_session_t tls_session, #endif /* - * hook_print: hook a message printed by WeeChat + * Hooks a message printed by WeeChat. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2007,7 +2028,7 @@ hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer, } /* - * hook_print_exec: execute print hook + * Executes a print hook. */ void @@ -2108,7 +2129,9 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) } /* - * hook_signal: hook a signal + * Hooks a signal. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2147,7 +2170,7 @@ hook_signal (struct t_weechat_plugin *plugin, const char *signal, } /* - * hook_signal_send: send a signal + * Sends a signal. */ void @@ -2179,7 +2202,9 @@ hook_signal_send (const char *signal, const char *type_data, void *signal_data) } /* - * hook_hsignal: hook a hsignal (signal with hashtable) + * Hooks a hsignal (signal with hashtable). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2218,7 +2243,7 @@ hook_hsignal (struct t_weechat_plugin *plugin, const char *signal, } /* - * hook_hsignal_send: send a hsignal (signal with hashtable) + * Sends a hsignal (signal with hashtable). */ void @@ -2250,7 +2275,9 @@ hook_hsignal_send (const char *signal, struct t_hashtable *hashtable) } /* - * hook_config: hook a config option + * Hooks a configuration option. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2290,7 +2317,7 @@ hook_config (struct t_weechat_plugin *plugin, const char *option, } /* - * hook_config_exec: execute config hooks + * Executes a config hook. */ void @@ -2323,7 +2350,9 @@ hook_config_exec (const char *option, const char *value) } /* - * hook_completion: hook a completion + * Hooks a completion. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2367,7 +2396,7 @@ hook_completion (struct t_weechat_plugin *plugin, const char *completion_item, } /* - * hook_completion_get_string: get a completion property as string + * Gets a completion property as string. */ const char * @@ -2378,7 +2407,7 @@ hook_completion_get_string (struct t_gui_completion *completion, } /* - * hook_completion_list_add: add a word for a completion (called by plugins) + * Adds a word for a completion. */ void @@ -2390,7 +2419,7 @@ hook_completion_list_add (struct t_gui_completion *completion, } /* - * hook_completion_exec: execute completion hook + * Executes a completion hook. */ void @@ -2429,7 +2458,9 @@ hook_completion_exec (struct t_weechat_plugin *plugin, } /* - * hook_modifier: hook a modifier + * Hooks a modifier. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2468,7 +2499,7 @@ hook_modifier (struct t_weechat_plugin *plugin, const char *modifier, } /* - * hook_modifier_exec: execute modifier hook + * Executes a modifier hook. */ char * @@ -2532,7 +2563,9 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier, } /* - * hook_info: hook an info + * Hooks an info. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2575,7 +2608,7 @@ hook_info (struct t_weechat_plugin *plugin, const char *info_name, } /* - * hook_info_get: get info (as string) via info hook + * Gets info (as string) via info hook. */ const char * @@ -2622,7 +2655,9 @@ hook_info_get (struct t_weechat_plugin *plugin, const char *info_name, } /* - * hook_info_hashtable: hook an info using hashtable + * Hooks an info using hashtable. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2670,7 +2705,7 @@ hook_info_hashtable (struct t_weechat_plugin *plugin, const char *info_name, } /* - * hook_info_get_hashtable: get info (as hashtable) via info hook + * Gets info (as hashtable) via info hook. */ struct t_hashtable * @@ -2717,7 +2752,9 @@ hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name, } /* - * hook_infolist: hook an infolist + * Hooks an infolist. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2764,7 +2801,7 @@ hook_infolist (struct t_weechat_plugin *plugin, const char *infolist_name, } /* - * hook_infolist_get: get infolist via infolist hook + * Gets an infolist via infolist hook. */ struct t_infolist * @@ -2811,7 +2848,9 @@ hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name, } /* - * hook_hdata: hook a hdata + * Hooks a hdata. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2853,7 +2892,7 @@ hook_hdata (struct t_weechat_plugin *plugin, const char *hdata_name, } /* - * hook_hdata_get: get hdata via info hook + * Gets hdata via hdata hook. */ struct t_hdata * @@ -2906,7 +2945,9 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name) } /* - * hook_focus: hook a focus + * Hooks a focus. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -2945,7 +2986,7 @@ hook_focus (struct t_weechat_plugin *plugin, const char *area, } /* - * hook_focus_hashtable_map_cb: add keys of a hashtable into another + * Adds keys of a hashtable into another. */ void @@ -2964,8 +3005,7 @@ hook_focus_hashtable_map_cb (void *data, struct t_hashtable *hashtable, } /* - * hook_focus_hashtable_map2_cb: add keys of a hashtable into another - * (adding suffix "2" to keys) + * Adds keys of a hashtable into another (adding suffix "2" to keys). */ void @@ -2993,9 +3033,10 @@ hook_focus_hashtable_map2_cb (void *data, struct t_hashtable *hashtable, } /* - * hook_focus_get_data: get data for focus on (x,y) on screen - * hashtable_focus2 is not NULL only for a mouse gesture - * (it's for point where mouse button has been released) + * Gets 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). */ struct t_hashtable * @@ -3118,7 +3159,7 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1, } /* - * hook_set: set a hook property (string) + * Sets a hook property (string). */ void @@ -3133,7 +3174,7 @@ hook_set (struct t_hook *hook, const char *property, const char *value) } /* - * unhook: unhook something + * Unhooks something. */ void @@ -3374,7 +3415,7 @@ unhook (struct t_hook *hook) } /* - * unhook_all_plugin: unhook all for a plugin + * Unhooks everything for a plugin. */ void @@ -3397,7 +3438,7 @@ unhook_all_plugin (struct t_weechat_plugin *plugin) } /* - * unhook_all: unhook all + * Unhooks everything. */ void @@ -3419,8 +3460,11 @@ unhook_all () } /* - * hook_add_to_infolist_type: add hooks of a type in an infolist - * return 1 if ok, 0 if error + * Adds hooks of a type in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3822,10 +3866,13 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type, } /* - * hook_add_to_infolist: add hooks in an infolist - * arguments can be a hook type with optional comma + - * name after - * return 1 if ok, 0 if error + * Adds hooks in an infolist. + * + * Argument "arguments" can be a hook type with optional comma + name after. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3868,7 +3915,7 @@ hook_add_to_infolist (struct t_infolist *infolist, const char *arguments) } /* - * hook_print_log: print hooks in log (usually for crash dump) + * Prints hooks in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-infolist.c b/src/core/wee-infolist.c index 166d3bc8a..61612e19d 100644 --- a/src/core/wee-infolist.c +++ b/src/core/wee-infolist.c @@ -39,7 +39,9 @@ struct t_infolist *last_weechat_infolist = NULL; /* - * infolist_new: create a new weechat infolist + * Creates a new infolist. + * + * Returns pointer to infolist, NULL if error. */ struct t_infolist * @@ -68,7 +70,9 @@ infolist_new (struct t_weechat_plugin *plugin) } /* - * infolist_new_item: create a new item in an infolist + * Creates a new item in an infolist. + * + * Returns pointer to new item, NULL if error. */ struct t_infolist_item * @@ -96,7 +100,9 @@ infolist_new_item (struct t_infolist *infolist) } /* - * infolist_new_var_integer: create a new integer variable in an item + * Creates a new integer variable in an item. + * + * Returns pointer to new variable, NULL if error. */ struct t_infolist_var * @@ -130,7 +136,9 @@ infolist_new_var_integer (struct t_infolist_item *item, } /* - * infolist_new_var_string: create a new string variable in an item + * Creates a new string variable in an item. + * + * Returns pointer to new variable, NULL if error. */ struct t_infolist_var * @@ -162,7 +170,9 @@ infolist_new_var_string (struct t_infolist_item *item, } /* - * infolist_new_var_pointer: create a new pointer variable in an item + * Creates a new pointer variable in an item. + * + * Returns pointer to new variable, NULL if error. */ struct t_infolist_var * @@ -194,7 +204,9 @@ infolist_new_var_pointer (struct t_infolist_item *item, } /* - * infolist_new_var_buffer: create a new buffer variable in an item + * Creates a new buffer variable in an item. + * + * Returns pointer to new variable, NULL if error. */ struct t_infolist_var * @@ -229,7 +241,9 @@ infolist_new_var_buffer (struct t_infolist_item *item, } /* - * infolist_new_var_time: create a new time variable in an item + * Creates a new time variable in an item. + * + * Returns pointer to new variable, NULL if error. */ struct t_infolist_var * @@ -263,9 +277,11 @@ infolist_new_var_time (struct t_infolist_item *item, } /* - * infolist_valid: check if an infolist pointer exists - * return 1 if list exists - * 0 if list is not found + * Checks if an infolist pointer is valid. + * + * Returns: + * 1: infolist exists + * 0: infolist is not found */ int @@ -285,9 +301,9 @@ infolist_valid (struct t_infolist *infolist) } /* - * infolist_next: return next item for an infolist - * if current item pointer is NULL, - * then return first item of infolist + * Gets next item for an infolist. + * + * If pointer is NULL, returns first item of infolist. */ struct t_infolist_item * @@ -303,9 +319,9 @@ infolist_next (struct t_infolist *infolist) } /* - * infolist_prev: return previous item for an infolist - * if current item pointer is NULL, - * then return last item of infolist + * Gets previous item for an infolist. + * + * If pointer is NULL, returns last item of infolist. */ struct t_infolist_item * @@ -321,7 +337,7 @@ infolist_prev (struct t_infolist *infolist) } /* - * infolist_reset_item_cursor: reset pointer to current item in infolist + * Resets pointer to current item in infolist. */ void @@ -331,7 +347,7 @@ infolist_reset_item_cursor (struct t_infolist *infolist) } /* - * infolist_fields: get list of fields for current infolist item + * Gets list of fields for current infolist item. */ const char * @@ -389,7 +405,7 @@ infolist_fields (struct t_infolist *infolist) } /* - * infolist_integer: get an integer variable value in current infolist item + * Gets integer value for a variable in current infolist item. */ int @@ -417,7 +433,7 @@ infolist_integer (struct t_infolist *infolist, const char *var) } /* - * infolist_string: get a string variable value in current list item + * Gets string value for a variable in current infolist item. */ const char * @@ -445,7 +461,7 @@ infolist_string (struct t_infolist *infolist, const char *var) } /* - * infolist_pointer: get a pointer variable value in current infolist item + * Gets pointer value for a variable in current infolist item. */ void * @@ -473,8 +489,9 @@ infolist_pointer (struct t_infolist *infolist, const char *var) } /* - * infolist_buffer: get a buffer variable value in current infolist item - * size is used to return size of buffer + * Gets buffer value for a variable in current infolist item. + * + * Argument "size" is set with the size of buffer. */ void * @@ -506,7 +523,7 @@ infolist_buffer (struct t_infolist *infolist, const char *var, } /* - * infolist_time: get a time variable value in current infolist item + * Gets time value for a variable in current infolist item. */ time_t @@ -534,7 +551,7 @@ infolist_time (struct t_infolist *infolist, const char *var) } /* - * infolist_var_free: free an infolist variable + * Frees a variable in item. */ void @@ -575,7 +592,7 @@ infolist_var_free (struct t_infolist_item *item, } /* - * infolist_item_free: free an infolist item + * Frees an item in infolist. */ void @@ -612,7 +629,7 @@ infolist_item_free (struct t_infolist *infolist, } /* - * infolist_free: free an infolist + * Frees an infolist. */ void @@ -646,7 +663,7 @@ infolist_free (struct t_infolist *infolist) } /* - * infolist_free_all_plugin: free all infolists created by a plugin + * Frees all infolists created by a plugin. */ void @@ -665,7 +682,7 @@ infolist_free_all_plugin (struct t_weechat_plugin *plugin) } /* - * infolist_print_log: print infolists infos in log (usually for crash dump) + * Prints infolists in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-input.c b/src/core/wee-input.c index 869568916..15c85a618 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -40,7 +40,7 @@ /* - * input_exec_data: send data to buffer input callback + * Sends data to buffer input callback. */ void @@ -60,7 +60,7 @@ input_exec_data (struct t_gui_buffer *buffer, const char *data) } /* - * input_exec_command: execute a command (WeeChat internal or a plugin command) + * Executes a command. */ void @@ -114,9 +114,9 @@ input_exec_command (struct t_gui_buffer *buffer, break; case 1: /* command hooked, OK (executed) */ break; - case -2: /* command is ambigous (exists for other plugins) */ + case -2: /* command is ambiguous (exists for other plugins) */ gui_chat_printf (NULL, - _("%sError: ambigous command \"%s\": it exists " + _("%sError: ambiguous command \"%s\": it exists " "in many plugins and not in \"%s\" plugin"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], command + 1, @@ -152,7 +152,7 @@ input_exec_command (struct t_gui_buffer *buffer, } /* - * input_data: read user input and send data to buffer callback + * Reads user input and sends data to buffer's callback. */ void diff --git a/src/core/wee-list.c b/src/core/wee-list.c index 66499c219..b884e4178 100644 --- a/src/core/wee-list.c +++ b/src/core/wee-list.c @@ -36,7 +36,9 @@ /* - * weelist_new: create a new list + * Creates a new list. + * + * Returns pointer to new list, NULL if error. */ struct t_weelist * @@ -54,7 +56,7 @@ weelist_new () } /* - * weelist_find_pos: find position for data (keeping list sorted) + * Searches for position of data (to keep list sorted). */ struct t_weelist_item * @@ -76,7 +78,7 @@ weelist_find_pos (struct t_weelist *weelist, const char *data) } /* - * weelist_insert: insert an element to the list (at good position) + * Inserts an element in the list (keeping list sorted). */ void @@ -137,7 +139,9 @@ weelist_insert (struct t_weelist *weelist, struct t_weelist_item *item, } /* - * weelist_add: create new data and add it to list + * Creates new data and add it to the list. + * + * Returns pointer to new item, NULL if error. */ struct t_weelist_item * @@ -161,7 +165,9 @@ weelist_add (struct t_weelist *weelist, const char *data, const char *where, } /* - * weelist_search: search data in a list (case sensitive) + * Searches for data in a list (case sensitive). + * + * Returns pointer to item found, NULL if not found. */ struct t_weelist_item * @@ -183,8 +189,9 @@ weelist_search (struct t_weelist *weelist, const char *data) } /* - * weelist_search_pos: search data in a list (case sensitive), return position - * of item found, -1 if not found + * Searches for data in a list (case sensitive). + * + * Returns position of item found (>= 0), -1 if not found. */ int @@ -209,7 +216,9 @@ weelist_search_pos (struct t_weelist *weelist, const char *data) } /* - * weelist_casesearch: search data in a list (case insensitive) + * Searches for data in a list (case insensitive). + * + * Returns pointer to item found, NULL if not found. */ struct t_weelist_item * @@ -231,8 +240,9 @@ weelist_casesearch (struct t_weelist *weelist, const char *data) } /* - * weelist_casesearch_pos: search data in a list (case insensitive), return - * position of item found, -1 if not found + * Searches for data in a list (case insensitive). + * + * Returns position of item found (>= 0), -1 if not found. */ int @@ -257,7 +267,7 @@ weelist_casesearch_pos (struct t_weelist *weelist, const char *data) } /* - * weelist_get: get an item in a list by position (0 is first element) + * Gets an item in a list by position (0 is first element). */ struct t_weelist_item * @@ -283,7 +293,7 @@ weelist_get (struct t_weelist *weelist, int position) } /* - * weelist_set: set a new value for an item + * Sets a new value for an item. */ void @@ -298,7 +308,9 @@ weelist_set (struct t_weelist_item *item, const char *value) } /* - * weelist_next: get next item + * Gets next item. + * + * Returns NULL if end of list has been reached. */ struct t_weelist_item * @@ -311,7 +323,9 @@ weelist_next (struct t_weelist_item *item) } /* - * weelist_prev: get previous item + * Gets previous item. + * + * Returns NULL if beginning of list has been reached. */ struct t_weelist_item * @@ -324,7 +338,7 @@ weelist_prev (struct t_weelist_item *item) } /* - * weelist_string: get string pointer to item data + * Gets string pointer to item data. */ const char * @@ -337,7 +351,7 @@ weelist_string (struct t_weelist_item *item) } /* - * weelist_size: return size of weelist + * Gets size of list. */ int @@ -350,7 +364,7 @@ weelist_size (struct t_weelist *weelist) } /* - * weelist_remove: remove an item from a list + * Removes an item from a list. */ void @@ -385,7 +399,7 @@ weelist_remove (struct t_weelist *weelist, struct t_weelist_item *item) } /* - * weelist_remove_all: remove all items from a list + * Removes all items from a list. */ void @@ -401,7 +415,7 @@ weelist_remove_all (struct t_weelist *weelist) } /* - * weelist_free: free a list + * Frees a list. */ void @@ -415,7 +429,7 @@ weelist_free (struct t_weelist *weelist) } /* - * weelist_print_log: print weelist in log (usually for crash dump) + * Prints list in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-log.c b/src/core/wee-log.c index 26dd1302d..3bc8732e6 100644 --- a/src/core/wee-log.c +++ b/src/core/wee-log.c @@ -53,7 +53,11 @@ int weechat_log_use_time = 1; /* 0 to temporary disable time in log, */ /* - * log_open: initialize log file + * Opens the WeeChat log file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -101,7 +105,7 @@ log_open (const char *filename, const char *mode) } /* - * log_init: initialize log file + * Initializes the WeeChat log file. */ void @@ -120,7 +124,7 @@ log_init () } /* - * log_printf: write a message in WeeChat log (<weechat_home>/weechat.log) + * Writes a message in WeeChat log file. */ void @@ -173,7 +177,7 @@ log_printf (const char *message, ...) } /* - * log_printf_hexa: dump a string as hexa data in log file + * Dumps a string as hexa data in WeeChat log file. */ void @@ -207,7 +211,7 @@ log_printf_hexa (const char *spaces, const char *string) } /* - * log_close: close log file + * Closes the WeeChat log file. */ void @@ -232,7 +236,10 @@ log_close () } /* - * log_crash_rename: rename log file when crashing + * Renames 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. */ int diff --git a/src/core/wee-network.c b/src/core/wee-network.c index d07b6f163..c164cffe1 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -62,7 +62,7 @@ gnutls_certificate_credentials_t gnutls_xcred; /* GnuTLS client credentials */ /* - * network_set_gnutls_ca_file: set trust file with option gnutls_ca_file + * Sets trust file with option "gnutls_ca_file". */ void @@ -90,7 +90,7 @@ network_set_gnutls_ca_file () } /* - * network_init: init network + * Initializes network. */ void @@ -131,7 +131,7 @@ network_init () } /* - * network_end: end network + * Ends network. */ void @@ -151,10 +151,12 @@ network_end () } /* - * network_send_with_retry: send data on a socket with retry - * return number of bytes sent, or -1 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Sends 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. */ int @@ -181,10 +183,12 @@ network_send_with_retry (int sock, const void *buffer, int length, int flags) } /* - * network_recv_with_retry: receive data on a socket with retry - * return number of bytes received, or -1 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Receives 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. */ int @@ -211,12 +215,14 @@ network_recv_with_retry (int sock, void *buffer, int length, int flags) } /* - * network_pass_httpproxy: establish connection/authentification to an - * http proxy - * return 1 if connection is ok - * 0 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Establishes a connection and authenticates with a HTTP proxy. + * + * WARNING: this function is blocking, it must be called only in a forked + * process. + * + * Returns: + * 1: OK + * 0: error */ int @@ -262,10 +268,11 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address, } /* - * network_resolve: resolve hostname on its IP address - * (works with ipv4 and ipv6) - * return 1 if resolution is ok - * 0 if error + * Resolves a hostname to its IP address (works with IPv4 and IPv6). + * + * Returns: + * 1: OK + * 0: error */ int @@ -306,20 +313,22 @@ network_resolve (const char *hostname, char *ip, int *version) } /* - * network_pass_socks4proxy: establish connection/authentification thru a - * socks4 proxy - * return 1 if connection is ok - * 0 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Establishes a connection and authenticates with a socks4 proxy. + * + * The socks4 protocol is explained here: http://en.wikipedia.org/wiki/SOCKS + * + * WARNING: this function is blocking, it must be called only in a forked + * process. + * + * Returns: + * 1: OK + * 0: error */ int network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address, int port) { - /* socks4 protocol is explained here: http://en.wikipedia.org/wiki/SOCKS */ - struct t_network_socks4 socks4; unsigned char buffer[24]; char ip_addr[NI_MAXHOST]; @@ -349,23 +358,23 @@ network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address, } /* - * network_pass_socks5proxy: establish connection/authentification thru a - * socks5 proxy - * return 1 if connection is ok - * 0 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Establishes 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. + * + * WARNING: this function is blocking, it must be called only in a forked + * process. + * + * Returns: + * 1: OK + * 0: error */ int network_pass_socks5proxy (struct t_proxy *proxy, int sock, const char *address, int port) { - /* - * socks5 protocol is explained in RFC 1928 - * socks5 authentication with username/pass is explained in RFC 1929 - */ - struct t_network_socks5 socks5; unsigned char buffer[288]; int username_len, password_len, addr_len, addr_buffer_len; @@ -506,11 +515,14 @@ network_pass_socks5proxy (struct t_proxy *proxy, int sock, const char *address, } /* - * network_pass_proxy: establish connection/authentification to a proxy - * return 1 if connection is ok - * 0 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Establishes a connection and authenticates with a proxy. + * + * WARNING: this function is blocking, it must be called only in a forked + * process. + * + * Returns: + * 1: OK + * 0: error */ int @@ -541,11 +553,14 @@ network_pass_proxy (const char *proxy, int sock, const char *address, int port) } /* - * network_connect: connect to a remote host and wait for connection if socket - * is non blocking - * return 1 if connect is ok, 0 if connect failed - * Note: this function is blocking, it must be called - * only in a forked process + * Connects 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: + * 1: OK + * 0: error */ int @@ -584,11 +599,14 @@ network_connect (int sock, const struct sockaddr *addr, socklen_t addrlen) } /* - * network_connect_to: connect to a remote host - * return 1 if connection is ok - * 0 if error - * Note: this function is blocking, it must be called - * only in a forked process + * Connects to a remote host. + * + * WARNING: this function is blocking, it must be called only in a forked + * process. + * + * Returns: + * 1: OK + * 0: error */ int @@ -640,7 +658,7 @@ network_connect_to (const char *proxy, int sock, } /* - * network_connect_child: child process trying to connect to peer + * Connects to peer in a child process. */ void @@ -1134,7 +1152,7 @@ end: } /* - * network_connect_child_timer_cb: timer for timeout of child process + * Timer callback for timeout of child process. */ int @@ -1159,9 +1177,10 @@ network_connect_child_timer_cb (void *arg_hook_connect, int remaining_calls) } /* - * network_connect_gnutls_handshake_fd_cb: callback for gnutls handshake - * (used to not block WeeChat if - * handshake takes some time to finish) + * Callback for GnuTLS handshake. + * + * This callback is used to not block WeeChat (handshake takes some time to + * finish). */ #ifdef HAVE_GNUTLS @@ -1237,7 +1256,7 @@ network_connect_gnutls_handshake_fd_cb (void *arg_hook_connect, int fd) #endif /* - * network_connect_gnutls_handshake_timer_cb: timer for timeout on handshake + * Timer callback for timeout of handshake. */ #ifdef HAVE_GNUTLS @@ -1268,7 +1287,7 @@ network_connect_gnutls_handshake_timer_cb (void *arg_hook_connect, #endif /* - * network_connect_child_read_cb: read connection progress from child process + * Reads connection progress from child process. */ int @@ -1508,7 +1527,7 @@ network_connect_child_read_cb (void *arg_hook_connect, int fd) } /* - * network_connect_with_fork: connect with fork (called by hook_connect() only!) + * Connects with fork (called by hook_connect() only!). */ void diff --git a/src/core/wee-proxy.c b/src/core/wee-proxy.c index 552c0d873..3adb0b531 100644 --- a/src/core/wee-proxy.c +++ b/src/core/wee-proxy.c @@ -46,13 +46,13 @@ struct t_proxy *weechat_proxies = NULL; /* first proxy */ struct t_proxy *last_weechat_proxy = NULL; /* last proxy */ struct t_proxy *weechat_temp_proxies = NULL; /* proxies used when */ -struct t_proxy *last_weechat_temp_proxy = NULL; /* reading config */ +struct t_proxy *last_weechat_temp_proxy = NULL; /* reading configuration */ /* - * proxy_search_option search a proxy option name - * return index of option in array - * "proxy_option_string", or -1 if not found + * Searches for a proxy option. + * + * Returns index of option in enum t_proxy_option, -1 if option is not found. */ int @@ -74,8 +74,9 @@ proxy_search_option (const char *option_name) } /* - * proxy_search_type: search type number with string - * return -1 if type is not found + * Searches for a proxy type. + * + * Returns index of option in enum t_proxy_type, -1 if type is not found. */ int @@ -97,7 +98,9 @@ proxy_search_type (const char *type) } /* - * proxy_search: search a proxy by name + * Searches for a proxy by name. + * + * Returns pointer to proxy found, NULL if not found. */ struct t_proxy * @@ -120,8 +123,9 @@ proxy_search (const char *name) } /* - * proxy_search_with_option_name: search a proxy with name of option - * (like "local_proxy.address") + * Searches for a proxy by option name. + * + * Returns pointer to proxy found, NULL if not found. */ struct t_proxy * @@ -152,7 +156,7 @@ proxy_search_with_option_name (const char *option_name) } /* - * proxy_set_name: set name for a proxy + * Sets name for a proxy. */ void @@ -190,8 +194,11 @@ proxy_set_name (struct t_proxy *proxy, const char *name) } /* - * proxy_set: set a property for a proxy - * return: 1 if ok, 0 if error + * Sets a property for a proxy. + * + * Returns: + * 1: OK + * 0: error */ int @@ -240,7 +247,9 @@ proxy_set (struct t_proxy *proxy, const char *property, const char *value) } /* - * proxy_create_option: create an option for a proxy + * Creates an option for a proxy. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -321,8 +330,7 @@ proxy_create_option (const char *proxy_name, int index_option, } /* - * proxy_create_option_temp: create option for a temporary proxy (when reading - * config file) + * Creates an option for a temporary proxy (when reading configuration file). */ void @@ -339,7 +347,9 @@ proxy_create_option_temp (struct t_proxy *temp_proxy, int index_option, } /* - * proxy_alloc: allocate and initialize new proxy structure + * Allocates and initializes a new proxy structure. + * + * Returns pointer to new proxy, NULL if error. */ struct t_proxy * @@ -364,7 +374,9 @@ proxy_alloc (const char *name) } /* - * proxy_new_with_options: create a new proxy with options + * Creates a new proxy with options. + * + * Returns pointer to new proxy, NULL if error. */ struct t_proxy * @@ -403,7 +415,9 @@ proxy_new_with_options (const char *name, } /* - * proxy_new: create a new proxy + * Creates a new proxy. + * + * Returns pointer to new proxy, NULL if error. */ struct t_proxy * @@ -462,7 +476,7 @@ proxy_new (const char *name, const char *type, const char *ipv6, } /* - * proxy_use_temp_proxies: use temp proxies (created by reading config file) + * Uses temporary proxies (created by reading configuration file). */ void @@ -525,7 +539,7 @@ proxy_use_temp_proxies () } /* - * proxy_free: delete a proxy + * Frees a proxy. */ void @@ -558,7 +572,7 @@ proxy_free (struct t_proxy *proxy) } /* - * proxy_free_all: delete all proxies + * Frees all proxies. */ void @@ -571,7 +585,7 @@ proxy_free_all () } /* - * proxy_print_log: print proxy infos in log (usually for crash dump) + * Prints proxies in WeeChat log file (usually for crash dump). */ void diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 38dde2de1..fa03cfa23 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -55,8 +55,8 @@ /* - * string_strndup: define strndup function for systems where this function does - * not exist (FreeBSD and maybe other) + * Defines a "strndup" function for systems where this function does not exist + * (FreeBSD and maybe others). */ char * @@ -78,7 +78,7 @@ string_strndup (const char *string, int length) } /* - * string_tolower: locale independant string conversion to lower case + * Converts string to lower case (locale independent). */ void @@ -93,7 +93,7 @@ string_tolower (char *string) } /* - * string_toupper: locale independant string conversion to upper case + * Converts string to upper case (locale independent). */ void @@ -108,7 +108,12 @@ string_toupper (char *string) } /* - * string_strcasecmp: locale and case independent string comparison + * Compares two strings (locale and case independent). + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -133,13 +138,21 @@ string_strcasecmp (const char *string1, const char *string2) } /* - * string_strcasecmp_range: locale and case independent string comparison - * using range to compare case: - * - range = 26: A-Z ==> a-z - * - range = 29: A-Z [ \ ] ==> a-z { | } - * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ - * (ranges 29 and 30 are used by some protocols like - * IRC) + * Compares two strings (locale and case independent) 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. + * + * Examples: + * - range = 26: A-Z ==> a-z + * - range = 29: A-Z [ \ ] ==> a-z { | } + * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ + * (ranges 29 and 30 are used by some protocols like IRC) + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -164,8 +177,12 @@ string_strcasecmp_range (const char *string1, const char *string2, int range) } /* - * string_strncasecmp: locale and case independent string comparison - * with max length + * Compares two strings with max length (locale and case independent). + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -195,13 +212,22 @@ string_strncasecmp (const char *string1, const char *string2, int max) } /* - * string_strncasecmp_range: locale and case independent string comparison - * with max length, using range to compare case: - * - range = 26: A-Z ==> a-z - * - range = 29: A-Z [ \ ] ==> a-z { | } - * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ - * (ranges 29 and 30 are used by some protocols like - * IRC) + * Compares two strings with max length (locale and case independent) 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. + * + * Examples: + * - range = 26: A-Z ==> a-z + * - range = 29: A-Z [ \ ] ==> a-z { | } + * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ + * (ranges 29 and 30 are used by some protocols like IRC) + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -232,7 +258,12 @@ string_strncasecmp_range (const char *string1, const char *string2, int max, } /* - * string_strcmp_ignore_chars: compare 2 strings, ignoring ignore some chars + * Compares two strings, ignoring some chars. + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -295,7 +326,7 @@ string_strcmp_ignore_chars (const char *string1, const char *string2, } /* - * string_strcasestr: locale and case independent string search + * Searches for a string in another string (locale and case independent). */ char * @@ -320,9 +351,13 @@ string_strcasestr (const char *string, const char *search) } /* - * string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" are allowed - * inside mask + * Checks if a string matches a mask. + * + * Mask can begin or end with "*", no other "*" are allowed inside mask. + * + * Returns: + * 1: string matches mask + * 0: string does not match mask */ int @@ -404,8 +439,9 @@ string_match (const char *string, const char *mask, int case_sensitive) } /* - * string_replace: replace a string by new one in a string - * note: returned value has to be free() after use + * Replaces a string by new one in a string. + * + * Note: result must be freed after use. */ char * @@ -461,9 +497,11 @@ string_replace (const char *string, const char *search, const char *replace) } /* - * string_expand_home: expand home in a PATH - * (for example: "~/file.txt" => "/home/xxx/file.txt") - * note: returned value has to be free() after use + * Expands home in a path. + * + * Example: "~/file.txt" => "/home/xxx/file.txt" + * + * Note: result must be freed after use. */ char * @@ -494,10 +532,10 @@ string_expand_home (const char *path) } /* - * string_remove_quotes: remove quotes at beginning/end of string - * (ignore spaces if there are before first quote or - * after last quote) - * note: returned value has to be free() after use + * Removes 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. */ char * @@ -537,8 +575,9 @@ string_remove_quotes (const char *string, const char *quotes) } /* - * string_strip: strip chars at beginning and/or end of string - * note: returned value has to be free() after use + * Strips chars at beginning/end of string. + * + * Note: result must be freed after use. */ char * @@ -579,8 +618,9 @@ string_strip (const char *string, int left, int right, const char *chars) } /* - * string_convert_hex_chars: convert hex chars (\x??) to value - * note: returned value has to be free() after use + * Converts hex chars (\x??) to value. + * + * Note: result must be freed after use. */ char * @@ -651,7 +691,11 @@ string_convert_hex_chars (const char *string) } /* - * string_is_word_char: return 1 if given character is a "word character" + * Checks if first char of string is a "word char". + * + * Returns: + * 1: first char is a word char + * 0: first char is not a word char */ int @@ -678,8 +722,8 @@ string_is_word_char (const char *string) } /* - * string_mask_to_regex: convert a mask (string with only "*" as wildcard) to a - * regex, paying attention to special chars in a regex + * Converts a mask (string with only "*" as wildcard) to a regex, paying + * attention to special chars in a regex. */ char * @@ -728,19 +772,19 @@ string_mask_to_regex (const char *mask) } /* - * string_regex_flags: get pointer on string after flags and return mask with - * flags to compile regex - * format of flags is: - * (?eins-eins)string - * flags: - * e: POSIX extended regex (REG_EXTENDED) - * i: case insensitive (REG_ICASE) - * n: match-any-character operators don't match a newline (REG_NEWLINE) - * s: support for substring addressing of matches is not required (REG_NOSUB) - * examples (with default_flags = REG_EXTENDED): - * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE - * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE - * "(?i-e)toto": regex "toto", flags = REG_ICASE + * Extracts flags and regex from a string. + * + * Format of flags is: (?eins-eins)string + * Flags are: + * e: POSIX extended regex (REG_EXTENDED) + * i: case insensitive (REG_ICASE) + * n: match-any-character operators don't match a newline (REG_NEWLINE) + * s: support for substring addressing of matches is not required (REG_NOSUB) + * + * Examples (with default_flags = REG_EXTENDED): + * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE + * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE + * "(?i-e)toto": regex "toto", flags = REG_ICASE */ const char * @@ -801,8 +845,8 @@ string_regex_flags (const char *regex, int default_flags, int *flags) } /* - * string_regcomp: compile a regex using optional flags at beginning of string - * (for format of flags in regex, see string_regex_flags()) + * Compiles a regex using optional flags at beginning of string (for format of + * flags in regex, see string_regex_flags()). */ int @@ -816,9 +860,11 @@ string_regcomp (void *preg, const char *regex, int default_flags) } /* - * string_has_highlight: return 1 if string contains a highlight (using list of - * words to highlight) - * return 0 if no highlight is found in string + * Checks if a string has a highlight (using list of words to highlight). + * + * Returns: + * 1: string has a highlight + * 0: string has no highlight */ int @@ -929,10 +975,8 @@ string_has_highlight (const char *string, const char *highlight_words) } /* - * string_has_highlight_regex_compiled: return 1 if string contains a highlight - * using a regular expression (any match - * in string must be surrounded by word - * chars) + * Checks if a string has a highlight using a compiled regular expression (any + * match in string must be surrounded by word chars). */ int @@ -974,9 +1018,8 @@ string_has_highlight_regex_compiled (const char *string, regex_t *regex) } /* - * string_has_highlight_regex: return 1 if string contains a highlight - * using a regular expression (any match in string - * must be surrounded by word chars) + * Checks if a string has a highlight using a regular expression (any match in + * string must be surrounded by word chars). */ int @@ -999,18 +1042,19 @@ string_has_highlight_regex (const char *string, const char *regex) } /* - * string_split: split a string according to separators - * examples: - * string_split ("abc de fghi", " ", 0, 0, NULL) - * ==> array[0] = "abc" - * array[1] = "de" - * array[2] = "fghi" - * array[3] = NULL - * string_split ("abc de fghi", " ", 1, 0, NULL) - * ==> array[0] = "abc de fghi" - * array[1] = "de fghi" - * array[2] = "fghi" - * array[3] = NULL + * Splits a string according to separators. + * + * Examples: + * string_split ("abc de fghi", " ", 0, 0, NULL) + * ==> array[0] = "abc" + * array[1] = "de" + * array[2] = "fghi" + * array[3] = NULL + * string_split ("abc de fghi", " ", 1, 0, NULL) + * ==> array[0] = "abc de fghi" + * array[1] = "de fghi" + * array[2] = "fghi" + * array[3] = NULL */ char ** @@ -1138,18 +1182,20 @@ string_split (const char *string, const char *separators, int keep_eol, } /* - * string_split_shell: split a string like the shell does for a command with - * arguments. - * Note: result must be freed with string_free_split. - * This function is a C conversion of python class "shlex" - * (file: Lib/shlex.py in python repository) - * Doc: http://docs.python.org/3/library/shlex.html - * Copyrights in shlex.py: - * Module and documentation by Eric S. Raymond, 21 Dec 1998 - * Input stacking and error message cleanup added by ESR, March 2000 - * push_source() and pop_source() made explicit by ESR, January 2001. - * Posix compliance, split(), string arguments, and - * iterator interface by Gustavo Niemeyer, April 2003. + * Splits 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) + * Doc: http://docs.python.org/3/library/shlex.html + * + * Copyrights in shlex.py: + * Module and documentation by Eric S. Raymond, 21 Dec 1998 + * Input stacking and error message cleanup added by ESR, March 2000 + * push_source() and pop_source() made explicit by ESR, January 2001. + * Posix compliance, split(), string arguments, and + * iterator interface by Gustavo Niemeyer, April 2003. + * + * Note: result must be freed with string_free_split. */ char ** @@ -1328,7 +1374,7 @@ string_split_shell (const char *string) } /* - * string_free_split: free a split string + * Frees a split string. */ void @@ -1345,9 +1391,9 @@ string_free_split (char **split_string) } /* - * string_build_with_split_string: build a string with a split string - * note: returned value has to be free() after - * use + * Builds a string with a split string. + * + * Note: result must be free after use. */ char * @@ -1385,11 +1431,10 @@ string_build_with_split_string (const char **split_string, } /* - * string_split_command: split a list of commands separated by 'separator' - * and ecscaped with '\' - * - empty commands are removed - * - spaces on the left of each commands are stripped - * Result must be freed with free_multi_command + * Splits 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 with free_multi_command. */ char ** @@ -1477,8 +1522,7 @@ string_split_command (const char *command, char separator) } /* - * string_free_split_command : free a list of commands split - * with string_split_command + * Frees a command split. */ void @@ -1495,8 +1539,9 @@ string_free_split_command (char **split_command) } /* - * string_iconv: convert string to another charset - * note: returned value has to be free() after use + * Converts a string to another charset. + * + * Note: result must be freed after use. */ char * @@ -1605,9 +1650,9 @@ string_iconv (int from_utf8, const char *from_code, const char *to_code, } /* - * string_iconv_to_internal: convert user string (input, script, ..) to - * WeeChat internal storage charset - * note: returned value has to be free() after use + * Converts a string to WeeChat internal storage charset (UTF-8). + * + * Note: result has to be freed after use. */ char * @@ -1645,9 +1690,9 @@ string_iconv_to_internal (const char *charset, const char *string) } /* - * string_iconv_from_internal: convert internal string to terminal charset, - * for display - * note: returned value has to be free() after use + * Converts internal string to terminal charset, for display. + * + * Note: result has to be freed after use. */ char * @@ -1682,8 +1727,11 @@ string_iconv_from_internal (const char *charset, const char *string) } /* - * string_iconv_fprintf: encode to terminal charset, then call fprintf on a file - * return 1 if ok, 0 if error + * Encodes a string to terminal charset and calls fprintf. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1708,8 +1756,9 @@ string_iconv_fprintf (FILE *file, const char *data, ...) } /* - * string_format_size: format a string with size and unit name (bytes, KB, MB, GB) - * note: returned value has to be free() after use + * Formats a string with size and unit name (bytes, KB, MB, GB). + * + * Note: result has to be freed after use. */ char * @@ -1744,7 +1793,7 @@ string_format_size (unsigned long long size) } /* - * string_convbase64_8x3_to_6x4 : convert 3 bytes of 8 bits in 4 bytes of 6 bits + * Converts 3 bytes of 8 bits in 4 bytes of 6 bits. */ void @@ -1760,9 +1809,10 @@ string_convbase64_8x3_to_6x4 (const char *from, char *to) } /* - * string_encode_base64: encode a string in base64 - * length is number of bytes in "from" to convert - * (commonly strlen(from)) + * Encodes a string in base64. + * + * Argument "length" is number of bytes in "from" to convert (commonly + * strlen(from)). */ void @@ -1806,7 +1856,7 @@ string_encode_base64 (const char *from, int length, char *to) } /* - * string_convbase64_6x4_to_8x3 : convert 4 bytes of 6 bits to 3 bytes of 8 bits + * Converts 4 bytes of 6 bits to 3 bytes of 8 bits. */ void @@ -1818,9 +1868,9 @@ string_convbase64_6x4_to_8x3 (const unsigned char *from, unsigned char *to) } /* - * string_decode_base64: decode a base64 string - * return length of string in *to - * (does not count final \0) + * Decodes a base64 string. + * + * Returns length of string in "*to" (it does not count final \0). */ int @@ -1883,8 +1933,11 @@ string_decode_base64 (const char *from, char *to) } /* - * string_is_command_char: return 1 if first char of string is a command char, - * otherwise 0 + * Checks if a string is a command. + * + * Returns: + * 1: first char of string is a command char + * 0: string is not a command */ int @@ -1913,10 +1966,10 @@ string_is_command_char (const char *string) } /* - * string_input_for_buffer: return pointer to input text for buffer (pointer - * inside "string" argument) - * or return NULL if it's a command - * (by default, a command starts with a single '/') + * Gets pointer to input text for buffer. + * + * Returns pointer inside "string" argument or NULL if it's a command (by + * default a command starts with a single '/'). */ const char * @@ -1963,12 +2016,10 @@ string_input_for_buffer (const char *string) } /* - * string_replace_with_callback: replace ${codes} using a callback that return - * replacement value (this value must be newly - * allocated because it will be freed in this - * function) - * "errors" is set with number of keys not found - * by callback + * Replaces ${codes} using a callback that returns replacement value (this value + * must be newly allocated because it will be freed in this function). + * + * Argument "errors" is set with number of keys not found by callback. */ char * diff --git a/src/core/wee-upgrade-file.c b/src/core/wee-upgrade-file.c index eed1740a4..2d8d9b611 100644 --- a/src/core/wee-upgrade-file.c +++ b/src/core/wee-upgrade-file.c @@ -48,7 +48,7 @@ struct t_upgrade_file *last_upgrade_file = NULL; /* - * upgrade_file_error: display error + * Displays an error with upgrade. */ void @@ -85,8 +85,11 @@ upgrade_file_error (struct t_upgrade_file *upgrade_file, char *message1, } /* - * upgrade_file_write_integer: write int value in upgrade file - * return 1 if ok, 0 if error + * Writes an integer value in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -99,8 +102,11 @@ upgrade_file_write_integer (struct t_upgrade_file *upgrade_file, int value) } /* - * upgrade_file_write_time: write int value in upgrade file - * return 1 if ok, 0 if error + * Writes a time value in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -113,8 +119,11 @@ upgrade_file_write_time (struct t_upgrade_file *upgrade_file, time_t date) } /* - * upgrade_file_write_string: write string in upgrade file - * return 1 if ok, 0 if error + * Writes a string in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -141,8 +150,11 @@ upgrade_file_write_string (struct t_upgrade_file *upgrade_file, } /* - * upgrade_file_write_buffer: write buffer in upgrade file - * return 1 if ok, 0 if error + * Writes a buffer in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -166,9 +178,11 @@ upgrade_file_write_buffer (struct t_upgrade_file *upgrade_file, void *pointer, } /* - * upgrade_file_new: create an upgrade file - * if write == 1 then it's opened in write mode, otherwise - * read mode + * Creates an upgrade file. + * + * If write == 1, then opens in write mode, otherwise in read mode. + * + * Returns pointer to new upgrade file, NULL if error. */ struct t_upgrade_file * @@ -233,8 +247,11 @@ upgrade_file_new (const char *filename, int write) } /* - * upgrade_file_write_object: write object to file - * return 1 if ok, 0 if error + * Writes an object in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -386,7 +403,11 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id, } /* - * upgrade_file_read_integer: read integer from upgrade file + * Reads an integer in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -409,7 +430,11 @@ upgrade_file_read_integer (struct t_upgrade_file *upgrade_file, int *value) } /* - * upgrade_file_read_string: read string from upgrade file + * Reads a string in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -455,7 +480,11 @@ upgrade_file_read_string (struct t_upgrade_file *upgrade_file, char **string) } /* - * upgrade_file_read_string_utf8: read string from file, then normalize UTF-8 + * Reads an UTF-8 string in upgrade file (reads a string then normalizes it). + * + * Returns: + * 1: OK + * 0: error */ int @@ -472,7 +501,11 @@ upgrade_file_read_string_utf8 (struct t_upgrade_file *upgrade_file, } /* - * upgrade_file_read_buffer: read buffer from upgrade file + * Reads a buffer in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -514,7 +547,11 @@ upgrade_file_read_buffer (struct t_upgrade_file *upgrade_file, } /* - * upgrade_file_read_time: read time from upgrade file + * Reads time in upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -538,8 +575,11 @@ upgrade_file_read_time (struct t_upgrade_file *upgrade_file, time_t *time) } /* - * upgrade_file_read_object: read object from file, then call read callback - * return 1 if ok, 0 if error + * Reads an object in upgrade file and calls read callback. + * + * Returns: + * 1: OK + * 0: error */ int @@ -687,8 +727,11 @@ end: } /* - * upgrade_file_read: read an upgrade file - * return 1 if ok, 0 if error + * Reads an upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -733,7 +776,7 @@ upgrade_file_read (struct t_upgrade_file *upgrade_file, } /* - * upgrade_file_close: close an upgrade file + * Closes an upgrade file. */ void diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c index ed8109334..ede2c382d 100644 --- a/src/core/wee-upgrade.c +++ b/src/core/wee-upgrade.c @@ -59,8 +59,12 @@ struct t_gui_layout_window *upgrade_layout_windows = NULL; /* - * upgrade_weechat_save_history: save history info to upgrade file - * (from last to first, to restore it in good order) + * Saves history in WeeChat upgrade file (from last to first, to restore it in + * good order). + * + * Returns: + * 1: OK + * 0: error */ int @@ -109,7 +113,11 @@ upgrade_weechat_save_history (struct t_upgrade_file *upgrade_file, } /* - * upgrade_weechat_save_buffers: save buffers info to upgrade file + * Saves buffers in WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -194,7 +202,11 @@ upgrade_weechat_save_buffers (struct t_upgrade_file *upgrade_file) } /* - * upgrade_weechat_save_misc: save miscellaneous info to upgrade file + * Saves miscellaneous info in WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -239,7 +251,11 @@ upgrade_weechat_save_misc (struct t_upgrade_file *upgrade_file) } /* - * upgrade_weechat_save_hotlist: save hotlist info to upgrade file + * Saves hotlist in WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -272,8 +288,11 @@ upgrade_weechat_save_hotlist (struct t_upgrade_file *upgrade_file) } /* - * upgrade_weechat_save_layout_window_tree: save tree with layout for windows - * to upgrade file + * Saves tree with layout for windows in WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -319,7 +338,11 @@ upgrade_weechat_save_layout_window_tree (struct t_upgrade_file *upgrade_file, } /* - * upgrade_weechat_save_layout_window: save layout for windows to upgrade file + * Saves layout for windows in WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -341,8 +364,11 @@ upgrade_weechat_save_layout_window (struct t_upgrade_file *upgrade_file) } /* - * upgrade_weechat_save: save upgrade file - * return 1 if ok, 0 if error + * Saves WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -368,7 +394,7 @@ upgrade_weechat_save () } /* - * upgrade_weechat_read_cb: callback for reading upgrade file + * Reads WeeChat upgrade file. */ int @@ -679,8 +705,11 @@ upgrade_weechat_read_cb (void *data, } /* - * upgrade_weechat_load: load upgrade file - * return 1 if ok, 0 if error + * Loads WeeChat upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -726,7 +755,8 @@ upgrade_weechat_load () } /* - * upgrade_weechat_remove_file_cb: callback called to remove a .upgrade file + * Removes a .upgrade file (callback called for each .upgrade file in WeeChat + * home directory). */ void @@ -744,8 +774,7 @@ upgrade_weechat_remove_file_cb (void *data, const char *filename) } /* - * upgrade_weechat_end: remove *.upgrade files after upgrade and send signal - * "weechat_upgrade_done" + * Removes *.upgrade files after upgrade and send signal "weechat_upgrade_done". */ void diff --git a/src/core/wee-url.c b/src/core/wee-url.c index a1ae09cd2..e8449596b 100644 --- a/src/core/wee-url.c +++ b/src/core/wee-url.c @@ -846,7 +846,9 @@ struct t_url_option url_options[] = /* - * weeurl_search_constant: search a constant in array of constants + * Searches for a constant in array of constants. + * + * Returns index of constant, -1 if not found. */ int @@ -867,8 +869,9 @@ weeurl_search_constant (struct t_url_constant *constants, const char *name) } /* - * weeurl_get_mask_value: get value of mask using constants - * string_mask has format: "const1+const2+const3" + * Gets value of mask using constants. + * + * Argument "string_mask" has format: "const1+const2+const3". */ long @@ -902,7 +905,9 @@ weeurl_get_mask_value (struct t_url_constant *constants, } /* - * weeurl_search_option: search an url option in table of options + * Searches for an URL option in table of options. + * + * Returns index of option, -1 if not found. */ int @@ -923,7 +928,7 @@ weeurl_search_option (const char *name) } /* - * weeurl_read: read callback for curl, used to read data from a file + * Reads data from a file (callback called to read a file). */ size_t @@ -933,7 +938,7 @@ weeurl_read (void *buffer, size_t size, size_t nmemb, void *stream) } /* - * weeurl_write: write callback for curl, used to write data in a file + * Writes data in a file (callback called to write a file). */ size_t @@ -943,8 +948,8 @@ weeurl_write (void *buffer, size_t size, size_t nmemb, void *stream) } /* - * weeurl_set_options: callback called for each option in hashtable "options", - * it sets option in CURL easy handle + * Sets option in CURL easy handle (callback called for each option in hashtable + * "options"). */ void @@ -1031,13 +1036,14 @@ weeurl_option_map_cb (void *data, } /* - * weeurl_download: download URL, using options - * return code: - * 0: ok - * 1: invalid url - * 2: error downloading url - * 3: memory error - * 4: file error + * Downloads URL using options. + * + * Returns: + * 0: OK + * 1: invalid URL + * 2: error downloading URL + * 3: not enough memory + * 4: file error */ int @@ -1117,8 +1123,11 @@ end: } /* - * weeurl_option_add_to_infolist: add an url option in an infolist - * return 1 if ok, 0 if error + * Adds an URL option in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/core/wee-utf8.c b/src/core/wee-utf8.c index b0d58a0aa..f66436872 100644 --- a/src/core/wee-utf8.c +++ b/src/core/wee-utf8.c @@ -38,8 +38,9 @@ int local_utf8 = 0; + /* - * utf8_init: initializes UTF-8 in WeeChat + * Initializes UTF-8 in WeeChat. */ void @@ -49,7 +50,11 @@ utf8_init () } /* - * utf8_has_8bits: return 1 if string has 8-bits chars, 0 if only 7-bits chars + * Checks if a string has some 8-bit chars. + * + * Returns: + * 1: string has 8-bit chars + * 0: string has only 7-bit chars */ int @@ -65,9 +70,12 @@ utf8_has_8bits (const char *string) } /* - * utf8_is_valid: return 1 if UTF-8 string is valid, 0 otherwise - * if error is not NULL, it is set with first non valid UTF-8 - * char in string, if any + * Checks if a string is UTF-8 valid. + * + * Returns: + * 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 */ int @@ -129,8 +137,8 @@ utf8_is_valid (const char *string, char **error) } /* - * utf8_normalize: normalize UTF-8 string: remove non UTF-8 chars and - * replace them by a char + * Normalizes an string: removes non UTF-8 chars and replaces them by a + * "replacement" char. */ void @@ -148,7 +156,7 @@ utf8_normalize (char *string, char replacement) } /* - * utf8_prev_char: return previous UTF-8 char in a string + * Returns pointer to previous UTF-8 char in a string. */ char * @@ -189,7 +197,7 @@ utf8_prev_char (const char *string_start, const char *string) } /* - * utf8_next_char: return next UTF-8 char in a string + * Returns pointer to next UTF-8 char in a string. */ char * @@ -230,7 +238,7 @@ utf8_next_char (const char *string) } /* - * utf8_char_int: return UTF-8 char as integer + * Returns UTF-8 char as an integer. */ int @@ -285,7 +293,7 @@ utf8_char_int (const char *string) } /* - * utf8_wide_char: get wide char from string (first char) + * Gets wide char from string (first char). */ wint_t @@ -325,7 +333,9 @@ utf8_wide_char (const char *string) } /* - * utf8_char_size: return UTF-8 char size (in bytes) + * Gets size of UTF-8 char (in bytes). + * + * Returns an integer between 0 and 4. */ int @@ -338,7 +348,8 @@ utf8_char_size (const char *string) } /* - * utf8_strlen: return length of an UTF-8 string (<= strlen(string)) + * Returns length of an UTF-8 string in number of chars (not bytes). + * Result is <= strlen(string). */ int @@ -359,7 +370,7 @@ utf8_strlen (const char *string) } /* - * utf8_strnlen: return length of an UTF-8 string, for N bytes max in string + * Returns length of an UTF-8 string for N bytes max in string. */ int @@ -382,8 +393,7 @@ utf8_strnlen (const char *string, int bytes) } /* - * utf8_strlen_screen: return number of chars needed on screen to display - * UTF-8 string + * Returns number of chars needed on screen to display the UTF-8 string. */ int @@ -427,7 +437,7 @@ utf8_strlen_screen (const char *string) } /* - * utf8_charcmp: compare two utf8 chars (case sensitive) + * Compares two UTF-8 chars (case sensitive). */ int @@ -460,7 +470,7 @@ utf8_charcmp (const char *string1, const char *string2) } /* - * utf8_charcasecmp: compare two utf8 chars (case is ignored) + * Compares two UTF-8 chars (case is ignored). */ int @@ -483,13 +493,21 @@ utf8_charcasecmp (const char *string1, const char *string2) } /* - * utf8_charcasecmp_range: compare two utf8 chars, case is ignored - * using a range, examples: - * - range = 26: A-Z ==> a-z - * - range = 29: A-Z [ \ ] ==> a-z { | } - * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ - * (ranges 29 and 30 are used by some protocols like - * IRC) + * Compares two UTF-8 chars (case is ignored) 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. + * + * Examples: + * - range = 26: A-Z ==> a-z + * - range = 29: A-Z [ \ ] ==> a-z { | } + * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ + * (ranges 29 and 30 are used by some protocols like IRC) + * + * Returns: + * < 0: char1 < char2 + * 0: char1 == char2 + * > 0: char1 > char2 */ int @@ -512,8 +530,7 @@ utf8_charcasecmp_range (const char *string1, const char *string2, int range) } /* - * utf8_char_size_screen: return number of chars needed on screen to display - * UTF-8 char + * Returns number of chars needed on screen to display the UTF-8 char. */ int @@ -536,7 +553,7 @@ utf8_char_size_screen (const char *string) } /* - * utf8_add_offset: move forward N chars in an UTF-8 string + * Moves forward N chars in an UTF-8 string. */ char * @@ -554,8 +571,11 @@ utf8_add_offset (const char *string, int offset) } /* - * utf8_real_pos: get real position in UTF-8 string - * for example: ("aébc", 2) returns 3 + * Returns real position in UTF-8 string, in bytes. + * + * Argument "pos" is a number of chars (not bytes). + * + * Example: ("déca", 2) returns 3. */ int @@ -580,8 +600,11 @@ utf8_real_pos (const char *string, int pos) } /* - * utf8_pos: get position in UTF-8 - * for example: ("aébc", 3) returns 2 + * Returns position in UTF-8 string, in chars. + * + * Argument "real_pos" is a number of bytes (not chars). + * + * Example: ("déca", 3) returns 2. */ int @@ -604,7 +627,7 @@ utf8_pos (const char *string, int real_pos) } /* - * utf8_strndup: return duplicate string, with max N UTF-8 chars + * Duplicates an UTF-8 string, with max N chars. */ char * diff --git a/src/core/wee-util.c b/src/core/wee-util.c index f2e668c50..63f54e66f 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -107,7 +107,7 @@ struct t_rlimit_resource rlimit_resource[] = /* - * util_setrlimit_resource: set resource limit + * Sets resource limit. */ #ifdef HAVE_SYS_RESOURCE_H @@ -175,8 +175,7 @@ util_setrlimit_resource (const char *resource_name, long limit) #endif /* - * util_setrlimit: set resource limits using value of option - * "weechat.startup.sys_rlimit" + * Sets resource limits using value of option "weechat.startup.sys_rlimit". */ void @@ -219,10 +218,12 @@ util_setrlimit () } /* - * util_timeval_cmp: compare two timeval structures - * return: -1 if tv1 < tv2 - * 0 if tv1 == tv2 - * 1 if tv1 > tv2 + * Compares two timeval structures. + * + * Returns: + * -1: tv1 < tv2 + * 0: tv1 == tv2 + * 1: tv1 > tv2 */ int @@ -240,8 +241,9 @@ util_timeval_cmp (struct timeval *tv1, struct timeval *tv2) } /* - * util_timeval_diff: calculates difference between two times (return in - * milliseconds) + * Calculates difference between two timeval structures. + * + * Returns difference in milliseconds. */ long @@ -261,7 +263,7 @@ util_timeval_diff (struct timeval *tv1, struct timeval *tv2) } /* - * util_timeval_add: add interval (in milliseconds) to a timeval struct + * Adds interval (in milliseconds) to a timeval structure. */ void @@ -281,8 +283,8 @@ util_timeval_add (struct timeval *tv, long interval) } /* - * util_get_time_string: converts date to a string, using format of option - * weechat.look.time_format (can be localized) + * Converts date to a string, using format of option "weechat.look.time_format" + * (can be localized). */ char * @@ -303,7 +305,7 @@ util_get_time_string (const time_t *date) } /* - * util_catch_signal: catch a signal + * Catches a system signal. */ void @@ -318,8 +320,11 @@ util_catch_signal (int signum, void (*handler)(int)) } /* - * util_mkdir_home: create a directory in WeeChat home - * return 1 if ok, 0 if error + * Creates a directory in WeeChat home. + * + * Returns: + * 1: OK + * 0: error */ int @@ -353,8 +358,11 @@ util_mkdir_home (const char *directory, int mode) } /* - * util_mkdir: create a directory - * return 1 if ok, 0 if error + * Creates a directory. + * + * Returns: + * 1: OK + * 0: error */ int @@ -373,8 +381,11 @@ util_mkdir (const char *directory, int mode) } /* - * util_mkdir_parents: create a directory and make parent directories as needed - * return 1 if ok, 0 if error + * Creates a directory and makes parent directories as needed. + * + * Returns: + * 1: OK + * 0: error */ int @@ -429,8 +440,7 @@ util_mkdir_parents (const char *directory, int mode) } /* - * util_exec_on_files: find files in a directory and execute a - * function on each file + * Finds files in a directory and executes a function on each file. */ void @@ -466,14 +476,12 @@ util_exec_on_files (const char *directory, int hidden_files, void *data, } /* - * util_search_full_lib_name: search the full name of a WeeChat library - * file with name and extension - * - look in WeeChat user's dir, then WeeChat - * global lib dir - * - sys_directory is the system directory under - * WeeChat lib prefix, for example "plugins" - * - result has to be free() after use (if not NULL) - * - NULL is returned if lib is not found + * Searches 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. + * + * Note: result must be freed after use (if not NULL). */ char * @@ -545,14 +553,11 @@ util_search_full_lib_name_ext (const char *filename, const char *extension, } /* - * util_search_full_lib_name: search the full name of a WeeChat library - * file with a part of name - * - look in WeeChat user's dir, then WeeChat - * global lib dir - * - plugins_dir is the directory under WeeChat lib - * prefix (for system dir) or under WeeChat home, - * for example "plugins" - * - result has to be free() after use (if not NULL) + * Searches for the full name of a WeeChat library with name. + * + * All extensions listed in option "weechat.plugin.extension" are tested. + * + * Note: result must be freed after use (if not NULL). */ char * @@ -600,10 +605,11 @@ util_search_full_lib_name (const char *filename, const char *plugins_dir) } /* - * util_file_get_content: read the content of a file - * return an allocated buffer with the file content - * else NULL if an error occurred - * (the buffer must be freed by the caller) + * Reads content of a file. + * + * Returns an allocated buffer with the content of file, NULL if error. + * + * Note: result must be freed after use. */ char * @@ -653,15 +659,17 @@ util_file_get_content (const char *filename) } /* - * util_version_number: get version number (integer) with version as string - * (non-digit chars like "-dev" are ignored) - * for example: - * "0.3.2-dev" ==> 197120 (== 0x00030200) - * "0.3.2-rc1" ==> 197120 (== 0x00030200) - * "0.3.2" ==> 197120 (== 0x00030200) - * "0.3.1.1" ==> 196865 (== 0x00030101) - * "0.3.1" ==> 196864 (== 0x00030100) - * "0.3.0" ==> 196608 (== 0x00030000) + * Gets version number (integer) with a version as string. + * + * Non-digit chars like "-dev" are ignored. + * + * Examples: + * "0.3.2-dev" ==> 197120 (== 0x00030200) + * "0.3.2-rc1" ==> 197120 (== 0x00030200) + * "0.3.2" ==> 197120 (== 0x00030200) + * "0.3.1.1" ==> 196865 (== 0x00030101) + * "0.3.1" ==> 196864 (== 0x00030100) + * "0.3.0" ==> 196608 (== 0x00030000) */ int diff --git a/src/core/weechat.c b/src/core/weechat.c index 5b25a2177..e41115fd1 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -99,18 +99,7 @@ char *weechat_startup_commands = NULL; /* startup commands (-r flag) */ /* - * weechat_init_vars: initialize some variables - */ - -void -weechat_init_vars () -{ - weechat_first_start_time = time (NULL); - gettimeofday (&weechat_current_start_timeval, NULL); -} - -/* - * weechat_display_copyright: display WeeChat copyright + * Displays WeeChat copyright on standard output. */ void @@ -128,7 +117,7 @@ weechat_display_copyright () } /* - * weechat_display_usage: display WeeChat usage + * Displays WeeChat usage on standard output. */ void @@ -163,7 +152,7 @@ weechat_display_usage (char *exec_name) } /* - * weechat_display_keys: display WeeChat default keys + * Displays WeeChat default keys on standard output. */ void @@ -197,7 +186,9 @@ weechat_display_keys () } /* - * weechat_parse_args: parse command line args + * Parses command line arguments. + * + * Arguments argc and argv come from main() function. */ void @@ -317,11 +308,14 @@ weechat_parse_args (int argc, char *argv[]) } /* - * weechat_create_home_dirs: create WeeChat directories + * Creates WeeChat home directory (by default ~/.weechat). + * + * Any error in this function is fatal: WeeChat can not run without a home + * directory. */ void -weechat_create_home_dirs () +weechat_create_home_dir () { char *ptr_home, *config_weechat_home = WEECHAT_HOME; int dir_length; @@ -398,7 +392,7 @@ weechat_create_home_dirs () } /* - * weechat_welcome_message: display WeeChat welcome message - yeah! + * Displays WeeChat welcome message. */ void @@ -431,7 +425,7 @@ weechat_welcome_message () } /* - * weechat_shutdown: shutdown WeeChat + * Shutdowns WeeChat. */ void @@ -454,13 +448,14 @@ weechat_shutdown (int return_code, int crash) } /* - * main: WeeChat startup + * Entry point for WeeChat. */ int main (int argc, char *argv[]) { - weechat_init_vars (); /* initialize some variables */ + weechat_first_start_time = time (NULL); /* initialize start time */ + gettimeofday (&weechat_current_start_timeval, NULL); setlocale (LC_ALL, ""); /* initialize gettext */ #ifdef ENABLE_NLS @@ -491,7 +486,7 @@ main (int argc, char *argv[]) if (!config_weechat_init ()) /* init options with default values */ exit (EXIT_FAILURE); weechat_parse_args (argc, argv); /* parse command line args */ - weechat_create_home_dirs (); /* create WeeChat directories */ + weechat_create_home_dir (); /* create WeeChat home directory */ log_init (); /* init log file */ if (config_weechat_read () < 0) /* read WeeChat configuration */ exit (EXIT_FAILURE); diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index eb53656dc..83a1375f4 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -45,7 +45,7 @@ /* - * gui_bar_window_objects_init: init Curses windows for bar window + * Initializes Curses windows for bar window. */ int @@ -65,7 +65,7 @@ gui_bar_window_objects_init (struct t_gui_bar_window *bar_window) } /* - * gui_window_objects_free: free Curses windows for a bar window + * Frees Curses windows for a bar window. */ void @@ -84,7 +84,7 @@ gui_bar_window_objects_free (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_create_win: create curses window for bar + * Creates curses window for bar. */ void @@ -143,10 +143,11 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_print_string: print a string text on a bar window - * return 1 if all was printed, 0 if some text - * was not displayed (wrapped due to bar window - * width) + * Prints a string text on a bar window. + * + * Returns: + * 1: everything was printed + * 0: some text was not displayed (wrapped due to bar window width) */ int @@ -376,7 +377,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_draw: draw a bar for a window + * Draws a bar for a window. */ void @@ -786,7 +787,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_objects_print_log: print bar window infos in log (usually for crash dump) + * Prints bar window infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 6d7828326..56fae3136 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -45,8 +45,10 @@ /* - * gui_chat_get_real_width: return real width: width - 1 if nicklist is at right, - * for good copy/paste (without nicklist separator) + * Gets real width for chat. + * + * Returns width - 1 if nicklist is at right, for good copy/paste (without + * nicklist separator). */ int @@ -60,8 +62,11 @@ gui_chat_get_real_width (struct t_gui_window *window) } /* - * gui_chat_marker_for_line: return 1 if marker must be displayed after this - * line, or 0 if it must not + * Checks if marker must be displayed after this line. + * + * Returns: + * 1: marker must be displayed after this line + * 0: marker must not be displayed after this line */ int @@ -102,8 +107,8 @@ gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line) } /* - * gui_chat_reset_style: reset style using color depending on window (active or - * not) and line (buffer selected in merged buffer or not) + * Resets style using color depending on window (active or not) and line (buffer + * selected in merged buffer or not). */ void @@ -141,7 +146,7 @@ gui_chat_reset_style (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_new_line: display a new line + * Displays a new line. */ void @@ -166,8 +171,7 @@ gui_chat_display_new_line (struct t_gui_window *window, } /* - * gui_chat_display_horizontal_line: display an horizontal line (marker for - * data not read) + * Displays an horizontal line (marker for data not read). */ void @@ -204,9 +208,8 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate) } /* - * gui_chat_string_next_char: returns next char of a word (for display) - * special chars like colors, bold, .. are skipped - * and optionaly applied + * Returns next char of a word (for display), special chars like + * colors/attributes are skipped and optionally applied. */ char * @@ -340,9 +343,10 @@ gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_word_raw: display word on chat buffer, letter by letter - * special chars like color, bold, .. are interpreted - * return number of chars displayed on screen + * Displays word on chat buffer, letter by letter, special chars like + * colors/attributes are interpreted. + * + * Returns number of chars displayed on screen. */ int @@ -413,8 +417,9 @@ gui_chat_display_word_raw (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_word: display a word on chat buffer - * return number of chars displayed on screen + * Displays a word on chat buffer. + * + * Returns number of chars displayed on screen. */ int @@ -586,8 +591,7 @@ gui_chat_display_word (struct t_gui_window *window, } /* - * gui_chat_display_time_to_prefix: display time, buffer name (for merged - * buffers) and prefix for a line + * Displays time, buffer name (for merged buffers) and prefix for a line. */ void @@ -988,14 +992,14 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, } /* - * gui_chat_display_line: display a line in the chat window - * if count == 0, display whole line - * if count > 0, display 'count' lines - * (beginning from the end) - * if simulate == 1, nothing is displayed - * (for counting how many lines would have been - * displayed) - * return number of lines displayed (or simulated) + * Displays a line in the chat window. + * + * If count == 0, display whole line. + * If count > 0, display 'count' lines (beginning from the end). + * If simulate == 1, nothing is displayed (for counting how many lines would + * have been displayed). + * + * Returns number of lines displayed (or simulated). */ int @@ -1221,8 +1225,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_line_y: display a line in the chat window (for a buffer - * with free content) + * Displays a line in the chat window (for a buffer with free content). */ void @@ -1253,8 +1256,7 @@ gui_chat_display_line_y (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_calculate_line_diff: returns pointer to line & offset for a - * difference with given line + * Returns pointer to line & offset for a difference with given line. */ void @@ -1353,7 +1355,7 @@ gui_chat_calculate_line_diff (struct t_gui_window *window, } /* - * gui_chat_draw_formatted_buffer: draw chat window for a formatted buffer + * Draws chat window for a formatted buffer. */ void @@ -1460,7 +1462,7 @@ gui_chat_draw_formatted_buffer (struct t_gui_window *window) } /* - *gui_chat_draw_free_buffer: draw chat window for a free buffer + * Draws chat window for a free buffer. */ void @@ -1499,7 +1501,7 @@ gui_chat_draw_free_buffer (struct t_gui_window *window, int clear_chat) } /* - * gui_chat_draw: draw chat window for a buffer + * Draws chat window for a buffer. */ void diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index e3fffcf31..44c164bf9 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -115,8 +115,9 @@ int gui_color_timer = 0; /* timer in seconds */ /* - * gui_color_search: search a color by name - * Return: number of color in WeeChat colors table + * Searches for a color by name. + * + * Return index of color in WeeChat colors table, -1 if not found. */ int @@ -135,8 +136,11 @@ gui_color_search (const char *color_name) } /* - * gui_color_assign: assign a WeeChat color (read from config) - * return 1 if ok, 0 if error + * Assigns a WeeChat color (read from configuration). + * + * Returns: + * 1: OK + * 0: error */ int @@ -188,12 +192,14 @@ gui_color_assign (int *color, const char *color_name) } /* - * gui_color_assign_by_diff: assign color by difference - * It is called when a color option is - * set with value ++X or --X, to search - * another color (for example ++1 is - * next color/alias in list) - * return 1 if ok, 0 if error + * Assigns color by difference. + * + * It is called when a color option is set with value ++X or --X, to search + * another color (for example ++1 is next color/alias in list). + * + * Returns: + * 1: OK + * 0: error */ int @@ -239,7 +245,7 @@ gui_color_assign_by_diff (int *color, const char *color_name, int diff) } /* - * gui_color_get_weechat_colors_number: get number of WeeChat colors + * Gets number of WeeChat colors. */ int @@ -249,7 +255,7 @@ gui_color_get_weechat_colors_number () } /* - * gui_color_get_term_colors: get number of colors supported by terminal + * Gets number of colors supported by terminal. */ int @@ -259,10 +265,11 @@ gui_color_get_term_colors () } /* - * gui_color_get_pairs_arrays: get current pairs as arrays (one array for - * foregrounds, another for backgrounds) - * Each array has "gui_color_num_pairs+1" entries. - * Pairs not used have value -2 in both arrays. + * Gets current pairs as arrays (one array for foregrounds, another for + * backgrounds). + * + * Each array has "gui_color_num_pairs+1" entries. Pairs not used have value -2 + * in both arrays. */ void @@ -319,8 +326,7 @@ error: } /* - * gui_color_timer_warning_pairs_full: display a warning when no more pair is - * available in table + * Displays a warning when no more pair is available in table. */ int @@ -339,9 +345,11 @@ gui_color_timer_warning_pairs_full (void *data, int remaining_calls) } /* - * gui_color_get_pair: get a pair with given foreground/background colors - * If no pair is found for fg/bg, a new pair is created - * Value returned is between 0 and COLOR_PAIRS-1 + * Gets a pair with given foreground/background colors. + * + * If no pair is found for fg/bg, a new pair is created. + * + * Returns a value between 0 and COLOR_PAIRS-1. */ int @@ -396,7 +404,7 @@ gui_color_get_pair (int fg, int bg) } /* - * gui_color_weechat_get_pair: get color pair with a WeeChat color number + * Gets color pair with a WeeChat color number. */ int @@ -424,7 +432,7 @@ gui_color_weechat_get_pair (int weechat_color) } /* - * gui_color_get_name: get color name + * Gets color name. */ const char * @@ -471,10 +479,10 @@ gui_color_get_name (int num_color) } /* - * gui_color_build: build a WeeChat color with foreground and background - * Foreground and background must be >= 0 and can be a - * WeeChat or extended color, with optional attributes for - * foreground. + * Builds a WeeChat color with foreground and background. + * + * Foreground and background must be >= 0 and can be a WeeChat or extended + * color, with optional attributes for foreground. */ void @@ -528,7 +536,7 @@ gui_color_build (int number, int foreground, int background) } /* - * gui_color_init_vars: init color variables using terminal infos + * Initializes color variables using terminal infos. */ void @@ -595,7 +603,7 @@ gui_color_init_vars () } /* - * gui_color_free_vars: free color variables + * Frees color variables. */ void @@ -614,7 +622,7 @@ gui_color_free_vars () } /* - * gui_color_init_pairs_terminal: init color pairs with terminal colors + * Initializes color pairs with terminal colors. */ void @@ -632,11 +640,10 @@ gui_color_init_pairs_terminal () } /* - * gui_color_init_pairs_weechat: init color pairs with WeeChat colors - * Pairs defined by WeeChat are set with their - * values (from pair 1 to pair N), and other - * pairs are set with terminal color and default - * background (-1). + * Initializes color pairs with WeeChat colors. + * + * Pairs defined by WeeChat are set with their values (from pair 1 to pair N), + * and other pairs are set with terminal color and default background (-1). */ void @@ -666,9 +673,9 @@ gui_color_init_pairs_weechat () } /* - * gui_color_display_terminal_colors: display terminal colors - * This is called by command line option - * "-c" / "--colors" + * Displays terminal colors. + * + * This is called by command line option "-c" / "--colors". */ void @@ -727,9 +734,8 @@ gui_color_display_terminal_colors () } /* - * gui_color_buffer_display_timer: display line with terminal colors and timer - * (remaining time for display of terminal - * colors) + * Displays line with terminal colors and timer (remaining time for display of + * terminal colors). */ void @@ -745,7 +751,7 @@ gui_color_buffer_display_timer () } /* - * gui_color_buffer_display: display content of color buffer + * Displays content of color buffer. */ void @@ -990,7 +996,7 @@ gui_color_buffer_display () } /* - * gui_color_timer_cb: callback for timer + * Callback for timer. */ int @@ -1019,7 +1025,7 @@ gui_color_timer_cb (void *data, int remaining_calls) } /* - * gui_color_switch_colrs: switch between WeeChat and terminal colors + * Switches between WeeChat and terminal colors. */ void @@ -1066,10 +1072,9 @@ gui_color_switch_colors () } /* - * gui_color_reset_pairs: reset all color pairs - * (the next refresh will auto reallocate needed pairs) - * It is useful when color pairs table is full, to - * remove non used pairs. + * Resets all color pairs (the next refresh will auto reallocate needed pairs). + * + * It is useful when color pairs table is full, to remove non used pairs. */ void @@ -1089,7 +1094,7 @@ gui_color_reset_pairs () } /* - * gui_color_buffer_input_cb: input callback for color buffer + * Input callback for color buffer. */ int @@ -1121,7 +1126,7 @@ gui_color_buffer_input_cb (void *data, struct t_gui_buffer *buffer, } /* - * gui_color_buffer_close_cb: close callback for color buffer + * Close callback for color buffer. */ int @@ -1137,7 +1142,7 @@ gui_color_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * gui_color_buffer_assign: assign color buffer to pointer if it is not yet set + * Assigns color buffer to pointer if it is not yet set. */ void @@ -1155,7 +1160,7 @@ gui_color_buffer_assign () } /* - * gui_color_buffer_open: open a buffer to display colors + * Opens a buffer to display colors. */ void @@ -1185,7 +1190,7 @@ gui_color_buffer_open () } /* - * gui_color_palette_add_alias_cb: add an alias in hashtable with aliases + * Adds an alias in hashtable with aliases. */ void @@ -1217,7 +1222,7 @@ gui_color_palette_add_alias_cb (void *data, } /* - * gui_color_palette_build_aliases: build aliases for palette + * Builds aliases for palette. */ void @@ -1267,7 +1272,7 @@ gui_color_palette_build_aliases () } /* - * gui_color_palette_new: create a new color in palette + * Creates a new color in palette. */ struct t_gui_color_palette * @@ -1355,7 +1360,7 @@ gui_color_palette_new (int number, const char *value) } /* - * gui_color_palette_free: free a color in palette + * Frees a color in palette. */ void @@ -1371,7 +1376,7 @@ gui_color_palette_free (struct t_gui_color_palette *color_palette) } /* - * gui_color_init_weechat: init WeeChat colors + * Initializes WeeChat colors. */ void @@ -1438,7 +1443,7 @@ gui_color_init_weechat () } /* - * gui_color_pre_init: pre-init colors + * Pre-initializes colors. */ void @@ -1453,7 +1458,7 @@ gui_color_pre_init () } /* - * gui_color_init: init GUI colors + * Initializes GUI colors. */ void @@ -1471,7 +1476,7 @@ gui_color_init () } /* - * gui_color_dump: dump colors + * Dumps colors. */ void @@ -1505,7 +1510,7 @@ gui_color_dump () } /* - * gui_color_end: end GUI colors + * Ends GUI colors. */ void diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c index 420bd65e5..1d43e5219 100644 --- a/src/gui/curses/gui-curses-key.c +++ b/src/gui/curses/gui-curses-key.c @@ -51,7 +51,7 @@ /* - * gui_key_default_bind: create key bind, only if it does not exist yet + * Creates key bind, only if it does not exist yet. */ void @@ -72,7 +72,7 @@ gui_key_default_bind (int context, const char *key, const char *command) } /* - * gui_key_default_bindings: create default key bindings for context given + * Creates default key bindings for a given context. */ void @@ -294,7 +294,7 @@ gui_key_default_bindings (int context) } /* - * gui_key_flush: flush keyboard buffer + * Flushes keyboard buffer. */ void @@ -489,7 +489,7 @@ gui_key_flush (int paste) } /* - * gui_key_read_cb: read keyboard chars + * Reads keyboard chars. */ int diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index d86335bc6..dcb92846c 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -63,8 +63,9 @@ int gui_reload_config = 0; int gui_term_cols = 0; int gui_term_lines = 0; + /* - * gui_main_pre_init: pre-initialize GUI (called before gui_init) + * Pre-initializes GUI (called before gui_init). */ void @@ -82,7 +83,7 @@ gui_main_pre_init (int *argc, char **argv[]) } /* - * gui_main_init: init GUI + * Initializes GUI. */ void @@ -104,7 +105,7 @@ gui_main_init () gui_color_init (); - /* build prefixes according to config */ + /* build prefixes according to configuration */ gui_chat_prefix_build (); refresh (); @@ -182,7 +183,7 @@ gui_main_init () } /* - * gui_main_signal_sigquit: quit WeeChat + * Callback for system signal SIGQUIT: quits WeeChat. */ void @@ -195,7 +196,7 @@ gui_main_signal_sigquit () } /* - * gui_main_signal_sigterm: quit WeeChat + * Callback for system signal SIGTERM: quits WeeChat. */ void @@ -208,7 +209,7 @@ gui_main_signal_sigterm () } /* - * gui_main_signal_sighup: reload WeeChat configuration + * Callback for system signal SIGHUP: reloads WeeChat configuration. */ void @@ -217,14 +218,14 @@ gui_main_signal_sighup () /* * SIGHUP signal is received when terminal is closed (exit of WeeChat * without using /quit command), that's why we set only flag to reload - * config files later (when terminal is closed, config files are NOT + * configuration files later (when terminal is closed, config files are NOT * reloaded, but they are if signal SIGHUP is sent to WeeChat by user) */ gui_reload_config = 1; } /* - * gui_main_signal_sigwinch: called when signal SIGWINCH is received + * Callback for system signal SIGWINCH: refreshes screen. */ void @@ -234,7 +235,7 @@ gui_main_signal_sigwinch () } /* - * gui_main_refreshs: refreshs for windows, buffers, bars + * Refreshs for windows, buffers, bars. */ void @@ -304,7 +305,7 @@ gui_main_refreshs () } /* - * gui_main_loop: main loop for WeeChat with ncurses GUI + * Main loop for WeeChat with ncurses GUI. */ void @@ -382,9 +383,10 @@ gui_main_loop () } /* - * gui_main_end: GUI end - * clean_exit is 0 when WeeChat is crashing (we don't clean - * objects because WeeChat can crash again during this cleanup...) + * Ends GUI. + * + * Argument "clean_exit" is 0 when WeeChat is crashing (we don't clean objects + * because WeeChat can crash again during this cleanup...). */ void diff --git a/src/gui/curses/gui-curses-mouse.c b/src/gui/curses/gui-curses-mouse.c index 73264665d..8a9b658ee 100644 --- a/src/gui/curses/gui-curses-mouse.c +++ b/src/gui/curses/gui-curses-mouse.c @@ -83,7 +83,7 @@ char *gui_mouse_button_codes[][2] = /* - * gui_mouse_enable: enable mouse + * Enables mouse. */ void @@ -94,7 +94,7 @@ gui_mouse_enable () } /* - * gui_mouse_disable: disable mouse + * Disables mouse. */ void @@ -105,7 +105,7 @@ gui_mouse_disable () } /* - * gui_mouse_display_state: display state of mouse + * Displays state of mouse. */ void @@ -117,7 +117,7 @@ gui_mouse_display_state () } /* - * gui_mouse_grab_init: init "grab mode" + * Initializes "grab mode". */ void @@ -127,12 +127,12 @@ gui_mouse_grab_init (int area) } /* - * gui_mouse_grab_event2input: get area for input, according to (x,y) of mouse - * event - * for example: @item(buffer_nicklist) - * @bar(title) - * @chat - * @* + * Gets area for input, according to (x,y) of mouse event. + * + * For example: @item(buffer_nicklist) + * @bar(title) + * @chat + * @* */ char * @@ -172,7 +172,7 @@ gui_mouse_grab_event2input () } /* - * gui_mouse_grab_end: end "grab mode" + * Ends "grab mode". */ void @@ -208,7 +208,7 @@ gui_mouse_grab_end (const char *mouse_key) } /* - * gui_mouse_event_timer_cb: timer for grabbing mouse code + * Timer for grabbing mouse code. */ int @@ -224,7 +224,7 @@ gui_mouse_event_timer_cb (void *data, int remaining_calls) } /* - * gui_mouse_event_init: init mouse event + * Initializes mouse event. */ void @@ -242,7 +242,7 @@ gui_mouse_event_init () } /* - * gui_mouse_event_code2key: get key name with a mouse code + * Gets key name with a mouse code. */ const char * @@ -418,7 +418,7 @@ gui_mouse_event_code2key (const char *code) } /* - * gui_mouse_event_end: end mouse event + * Ends mouse event. */ void diff --git a/src/gui/curses/gui-curses-term.c b/src/gui/curses/gui-curses-term.c index 5084d5e26..65d0695c5 100644 --- a/src/gui/curses/gui-curses-term.c +++ b/src/gui/curses/gui-curses-term.c @@ -33,11 +33,11 @@ /* - * gui_term_set_eat_newline_glitch: set "eat_newline_glitch" variable - * With value 0, this is used to not auto - * insert newline char at end of lines - * displayed, so that long words like URLs are - * not cut when they are selected with mouse + * Sets "eat_newline_glitch" variable. + * + * With value 0, this is used to not auto insert newline char at end of lines + * displayed, so that long words like URLs are not cut when they are selected + * with mouse. */ void diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 789baf912..be3a62ec5 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -67,7 +67,7 @@ int gui_window_saved_style[4]; /* current style saved */ /* - * gui_window_get_width: get screen width (terminal width in chars for Curses) + * Gets screen width (terminal width in chars for Curses). */ int @@ -77,7 +77,7 @@ gui_window_get_width () } /* - * gui_window_get_height: get screen height (terminal height in chars for Curses) + * Gets screen height (terminal height in chars for Curses). */ int @@ -87,7 +87,7 @@ gui_window_get_height () } /* - * gui_window_read_terminal_size: read terminal size + * Reads terminal size. */ void @@ -111,7 +111,11 @@ gui_window_read_terminal_size () } /* - * gui_window_objects_init: init Curses windows + * Initializes Curses windows. + * + * Returns: + * 1: OK + * 0: error */ int @@ -132,7 +136,7 @@ gui_window_objects_init (struct t_gui_window *window) } /* - * gui_window_objects_free: free Curses windows for a window + * Frees Curses windows for a window. */ void @@ -159,7 +163,7 @@ gui_window_objects_free (struct t_gui_window *window, int free_separators) } /* - * gui_window_clear_weechat: clear a Curses window with a weechat color + * Clears a Curses window with a WeeChat color. */ void @@ -174,7 +178,7 @@ gui_window_clear_weechat (WINDOW *window, int weechat_color) } /* - * gui_window_clear: clear a Curses window + * Clears a Curses window. */ void @@ -199,7 +203,7 @@ gui_window_clear (WINDOW *window, int fg, int bg) } /* - * gui_window_clrtoeol: clear until end of line with current background + * Clears until end of line with current background. */ void @@ -212,7 +216,7 @@ gui_window_clrtoeol (WINDOW *window) } /* - * gui_window_save_style: save current style + * Saves current style. */ void @@ -225,7 +229,7 @@ gui_window_save_style () } /* - * gui_window_restore_style: restore style values + * Restores style values. */ void @@ -238,8 +242,7 @@ gui_window_restore_style () } /* - * gui_window_reset_style: reset style (color and attr) with a weechat color - * for a window + * Resets style (color and attr) with a WeeChat color for a window. */ void @@ -256,7 +259,7 @@ gui_window_reset_style (WINDOW *window, int weechat_color) } /* - * gui_window_reset_color: reset color with a weechat color for a window + * Resets color with a WeeChat color for a window. */ void @@ -267,7 +270,7 @@ gui_window_reset_color (WINDOW *window, int weechat_color) } /* - * gui_window_set_color_style: set style for color + * Sets style for color. */ void @@ -278,7 +281,7 @@ gui_window_set_color_style (WINDOW *window, int style) } /* - * gui_window_remove_color_style: remove style for color + * Removes style for color. */ void @@ -289,7 +292,7 @@ gui_window_remove_color_style (WINDOW *window, int style) } /* - * gui_window_set_color: set color for a window + * Sets color for a window. */ void @@ -302,7 +305,7 @@ gui_window_set_color (WINDOW *window, int fg, int bg) } /* - * gui_window_set_weechat_color: set WeeChat color for window + * Sets WeeChat color for window. */ void @@ -335,8 +338,7 @@ gui_window_set_weechat_color (WINDOW *window, int num_color) } /* - * gui_window_set_custom_color_fg: set a custom color for a window - * (foreground only) + * Sets a custom color for a window (foreground only). */ void @@ -400,8 +402,7 @@ gui_window_set_custom_color_fg (WINDOW *window, int fg) } /* - * gui_window_set_custom_color_bg: set a custom color for a window - * (background only) + * Sets a custom color for a window (background only). */ void @@ -432,8 +433,7 @@ gui_window_set_custom_color_bg (WINDOW *window, int bg) } /* - * gui_window_set_custom_color_fg_bg: set a custom color for a window - * (foreground and background) + * Sets a custom color for a window (foreground and background). */ void @@ -502,8 +502,7 @@ gui_window_set_custom_color_fg_bg (WINDOW *window, int fg, int bg) } /* - * gui_window_set_custom_color_pair: set a custom color for a window - * (pair number) + * Sets a custom color for a window (pair number). */ void @@ -518,10 +517,10 @@ gui_window_set_custom_color_pair (WINDOW *window, int pair) } /* - * gui_window_string_apply_color_fg: apply foreground color code in string and - * move string pointer after color in string - * If window is NULL, no color is applied but - * string pointer is moved anyway + * Applies foreground color code in string and moves string pointer after color + * in string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -590,10 +589,10 @@ gui_window_string_apply_color_fg (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_bg: apply background color code in string and - * move string pointer after color in string - * If window is NULL, no color is applied but - * string pointer is moved anyway + * Applies background color code in string and moves string pointer after color + * in string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -649,11 +648,10 @@ gui_window_string_apply_color_bg (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_fg_bg: apply foreground + background color - * code in string and move string pointer - * after color in string - * If window is NULL, no color is applied - * but string pointer is moved anyway + * Applies foreground + background color code in string and moves string pointer + * after color in string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -769,11 +767,10 @@ gui_window_string_apply_color_fg_bg (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_pair: apply pair color code in string and - * move string pointer after color in - * string - * If window is NULL, no color is applied - * but string pointer is moved anyway + * Applies pair color code in string and moves string pointer after color in + * string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -807,12 +804,10 @@ gui_window_string_apply_color_pair (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_weechat: apply weechat color code in string - * and move string pointer after color - * in string - * If window is NULL, no color is - * applied but string pointer is moved - * anyway + * Applies weechat color code in string and moves string pointer after color in + * string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -846,12 +841,10 @@ gui_window_string_apply_color_weechat (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_set_attr: apply "set attribute" color code in - * string and move string pointer after - * color in string - * If window is NULL, no color is - * applied but string pointer is moved - * anyway + * Applies "set attribute" color code in string and moves string pointer after + * color in string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -888,12 +881,10 @@ gui_window_string_apply_color_set_attr (unsigned char **string, WINDOW *window) } /* - * gui_window_string_apply_color_remove_attr: apply "remove attribute" color - * code in string and move string - * pointer after color in string - * If window is NULL, no color is - * applied but string pointer is - * moved anyway + * Applies "remove attribute" color code in string and moves string pointer + * after color in string. + * + * If window is NULL, no color is applied but string pointer is moved anyway. */ void @@ -930,8 +921,7 @@ gui_window_string_apply_color_remove_attr (unsigned char **string, WINDOW *windo } /* - * gui_window_calculate_pos_size: calculate position and size for a buffer and - * subwindows + * Calculates position and size for a buffer and subwindows. */ void @@ -972,7 +962,7 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* - * gui_window_draw_separators: draw window separators + * Draws window separators. */ void @@ -1041,7 +1031,7 @@ gui_window_draw_separators (struct t_gui_window *window) } /* - * gui_window_redraw_buffer: redraw a buffer + * Redraws a buffer. */ void @@ -1054,7 +1044,7 @@ gui_window_redraw_buffer (struct t_gui_buffer *buffer) } /* - * gui_window_redraw_all_buffers: redraw all buffers + * Redraws all buffers. */ void @@ -1073,7 +1063,7 @@ gui_window_redraw_all_buffers () } /* - * gui_window_switch_to_buffer: switch to another buffer in a window + * Switches to another buffer in a window. */ void @@ -1192,7 +1182,7 @@ gui_window_switch_to_buffer (struct t_gui_window *window, } /* - * gui_window_switch: switch to another window + * Switches to another window. */ void @@ -1229,7 +1219,7 @@ gui_window_switch (struct t_gui_window *window) } /* - * gui_window_page_up: display previous page on buffer + * Displays previous page on buffer. */ void @@ -1278,7 +1268,7 @@ gui_window_page_up (struct t_gui_window *window) } /* - * gui_window_page_down: display next page on buffer + * Displays next page on buffer. */ void @@ -1334,7 +1324,7 @@ gui_window_page_down (struct t_gui_window *window) } /* - * gui_window_scroll_up: display previous few lines in buffer + * Displays previous few lines in buffer. */ void @@ -1376,7 +1366,7 @@ gui_window_scroll_up (struct t_gui_window *window) } /* - * gui_window_scroll_down: display next few lines in buffer + * Displays next few lines in buffer. */ void @@ -1426,7 +1416,7 @@ gui_window_scroll_down (struct t_gui_window *window) } /* - * gui_window_scroll_top: scroll to top of buffer + * Scrolls to top of buffer. */ void @@ -1461,7 +1451,7 @@ gui_window_scroll_top (struct t_gui_window *window) } /* - * gui_window_scroll_bottom: scroll to bottom of buffer + * Scrolls to bottom of buffer. */ void @@ -1504,10 +1494,13 @@ gui_window_scroll_bottom (struct t_gui_window *window) } /* - * gui_window_auto_resize: auto-resize all windows, according to % of global size - * This function is called after a terminal resize. - * Returns 0 if ok, -1 if all window should be merged - * (not enough space according to windows %) + * Auto-resizes all windows, according to % of global size. + * + * This function is called after a terminal resize. + * + * Returns: + * 0: OK + * -1: all windows must be merged (not enough space) */ int @@ -1583,7 +1576,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, } /* - * gui_window_refresh_windows: auto resize and refresh all windows + * Auto-resizes and refreshes all windows. */ void @@ -1644,7 +1637,9 @@ gui_window_refresh_windows () } /* - * gui_window_split_horizontal: split a window horizontally + * Horizontally splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -1693,7 +1688,9 @@ gui_window_split_horizontal (struct t_gui_window *window, int percentage) } /* - * gui_window_split_vertical: split a window vertically + * Vertically splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -1744,7 +1741,7 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage) } /* - * gui_window_resize: resize window + * Resizes window. */ void @@ -1786,7 +1783,7 @@ gui_window_resize (struct t_gui_window *window, int percentage) } /* - * gui_window_resize_delta: resize window using delta percentage + * Resizes window using delta percentage. */ void @@ -1832,7 +1829,11 @@ gui_window_resize_delta (struct t_gui_window *window, int delta_percentage) } /* - * gui_window_merge: merge window with its sister + * Merges window with its sister. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1882,7 +1883,7 @@ gui_window_merge (struct t_gui_window *window) } /* - * gui_window_merge_all: merge all windows into only one + * Merges all windows into only one. */ void @@ -1924,12 +1925,12 @@ gui_window_merge_all (struct t_gui_window *window) } /* - * gui_window_side_by_side: return a code about position of 2 windows: - * 0 = they're not side by side - * 1 = side by side (win2 is over the win1) - * 2 = side by side (win2 on the right) - * 3 = side by side (win2 below win1) - * 4 = side by side (win2 on the left) + * Returns a code about position of 2 windows: + * 0 = they're not side by side + * 1 = side by side: win2 is over the win1 + * 2 = side by side: win2 on the right + * 3 = side by side: win2 below win1 + * 4 = side by side: win2 on the left */ int @@ -1987,7 +1988,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* - * gui_window_switch_up: search and switch to a window over current window + * Searches and switches to a window over current window. */ void @@ -2011,7 +2012,7 @@ gui_window_switch_up (struct t_gui_window *window) } /* - * gui_window_switch_down: search and switch to a window below current window + * Searches and switches to a window below current window. */ void @@ -2035,7 +2036,7 @@ gui_window_switch_down (struct t_gui_window *window) } /* - * gui_window_switch_left: search and switch to a window on the left of current window + * Searches and switches to a window on the left of current window. */ void @@ -2059,7 +2060,7 @@ gui_window_switch_left (struct t_gui_window *window) } /* - * gui_window_switch_right: search and switch to a window on the right of current window + * Searches and switches to a window on the right of current window. */ void @@ -2083,8 +2084,7 @@ gui_window_switch_right (struct t_gui_window *window) } /* - * gui_window_balance_count: count number of windows in a tree with a given - * split, for balancing windows + * Counts number of windows in a tree with a given split, for balancing windows. */ int @@ -2110,9 +2110,11 @@ gui_window_balance_count (struct t_gui_window_tree *tree, int split_horizontal) } /* - * gui_window_balance: balance windows (set all splits to 50%) - * return 1 if some windows have been balanced - * 0 if nothing was changed + * Balances windows (set all splits to 50%). + * + * Returns: + * 1: some windows have been balanced + * 0: nothing was changed */ int @@ -2148,12 +2150,14 @@ gui_window_balance (struct t_gui_window_tree *tree) } /* - * gui_window_swap: swap buffers of two windows - * direction can be: 0 = auto (swap with sister) - * 1 = window above - * 2 = window on the right - * 3 = window below - * 4 = window on the left + * Swaps buffers of two windows. + * + * Argument "direction" can be: + * 0 = auto (swap with sister) + * 1 = window above + * 2 = window on the right + * 3 = window below + * 4 = window on the left */ void @@ -2205,9 +2209,9 @@ gui_window_swap (struct t_gui_window *window, int direction) } /* - * gui_window_refresh_screen: called when term size is modified - * full_refresh == 1 when Ctrl+L is pressed, - * or if terminal is resized + * Called when terminal size is modified. + * + * Argument full_refresh == 1 when Ctrl+L is pressed, or if terminal is resized. */ void @@ -2225,7 +2229,7 @@ gui_window_refresh_screen (int full_refresh) } /* - * gui_window_set_title: set terminal title + * Sets terminal title. */ void @@ -2313,7 +2317,7 @@ gui_window_set_title (const char *title) } /* - * gui_window_send_clipboard: copy text to clipboard (sent to terminal) + * Copies text to clipboard (sent to terminal). */ void @@ -2335,7 +2339,7 @@ gui_window_send_clipboard (const char *storage_unit, const char *text) } /* - * gui_window_set_bracketed_paste_mode: enable/disable bracketed paste mode + * Enables/disables bracketed paste mode. */ void @@ -2357,7 +2361,7 @@ gui_window_set_bracketed_paste_mode (int enable) } /* - * gui_window_move_cursor: move cursor on screen (for cursor mode) + * Moves cursor on screen (for cursor mode). */ void @@ -2371,7 +2375,7 @@ gui_window_move_cursor () } /* - * gui_window_term_display_infos: display some infos about terminal and colors + * Displays some infos about terminal and colors. */ void @@ -2384,8 +2388,8 @@ gui_window_term_display_infos () } /* - * gui_window_objects_print_log: print window Curses objects infos in log - * (usually for crash dump) + * Prints window Curses objects infos in WeeChat log file (usually for crash + * dump). */ void diff --git a/src/gui/gtk/gui-gtk-bar-window.c b/src/gui/gtk/gui-gtk-bar-window.c index 53e016f92..cabc562e0 100644 --- a/src/gui/gtk/gui-gtk-bar-window.c +++ b/src/gui/gtk/gui-gtk-bar-window.c @@ -38,7 +38,7 @@ /* - * gui_bar_window_objects_init: init Gtk windows for bar window + * Initializes Gtk windows for bar window. */ int @@ -57,7 +57,7 @@ gui_bar_window_objects_init (struct t_gui_bar_window *bar_window) } /* - * gui_window_objects_free: free Gtk windows for a bar window + * Frees Gtk windows for a bar window. */ void @@ -68,7 +68,7 @@ gui_bar_window_objects_free (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_create_win: create curses window for bar + * Creates curses window for bar. */ void @@ -80,8 +80,9 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_print_string: print a string text on a bar window - * return number of chars displayed on screen + * Prints a string text on a bar window. + * + * Returns number of chars displayed on screen. */ int @@ -97,7 +98,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_draw: draw a bar for a window + * Draws a bar for a window. */ void @@ -111,7 +112,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_objects_print_log: print bar window infos in log (usually for crash dump) + * Prints bar window infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c index 47c48c281..19dd9afd0 100644 --- a/src/gui/gtk/gui-gtk-chat.c +++ b/src/gui/gtk/gui-gtk-chat.c @@ -42,8 +42,7 @@ /* - * gui_chat_set_style: set style (bold, underline, ..) - * for a chat window + * Sets style (bold, underline, ..) for a chat window. */ void @@ -56,8 +55,7 @@ gui_chat_set_style (struct t_gui_window *window, int style) } /* - * gui_chat_remove_style: remove style (bold, underline, ..) - * for a chat window + * Removes style (bold, underline, ..) for a chat window. */ void @@ -70,8 +68,7 @@ gui_chat_remove_style (struct t_gui_window *window, int style) } /* - * gui_chat_toggle_style: toggle a style (bold, underline, ..) - * for a chat window + * Toggles a style (bold, underline, ..) for a chat window. */ void @@ -85,8 +82,7 @@ gui_chat_toggle_style (struct t_gui_window *window, int style) } /* - * gui_chat_reset_style: reset style (color and attr) - * for a chat window + * Resets style (color and attr) for a chat window. */ void @@ -104,7 +100,7 @@ gui_chat_reset_style (struct t_gui_window *window) } /* - * gui_chat_set_color_style: set style for color + * Sets style for color. */ void @@ -116,7 +112,7 @@ gui_chat_set_color_style (struct t_gui_window *window, int style) } /* - * gui_chat_remove_color_style: remove style for color + * Removes style for color. */ void @@ -128,7 +124,7 @@ gui_chat_remove_color_style (struct t_gui_window *window, int style) } /* - * gui_chat_reset_color_style: reset style for color + * Resets style for color. */ void @@ -140,7 +136,7 @@ gui_chat_reset_color_style (struct t_gui_window *window) } /* - * gui_chat_set_color: set color for a chat window + * Sets color for a chat window. */ void @@ -153,7 +149,7 @@ gui_chat_set_color (struct t_gui_window *window, int fg, int bg) } /* - * gui_chat_set_weechat_color: set a WeeChat color for a chat window + * Sets a WeeChat color for a chat window. */ void @@ -168,9 +164,8 @@ gui_chat_set_weechat_color (struct t_gui_window *window, int weechat_color) } /* - * gui_chat_string_next_char: returns next char of a word (for display) - * special chars like colors, bold, .. are skipped - * and optionaly applied + * Returns next char of a word (for display), special chars like + * colors/attributes are skipped and optionally applied. */ char * @@ -190,8 +185,8 @@ gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_word_raw: display word on chat buffer, letter by letter - * special chars like color, bold, .. are interpreted + * Display word on chat buffer, letter by letter, special chars like + * colors/attributes are interpreted. */ void @@ -205,7 +200,7 @@ gui_chat_display_word_raw (struct t_gui_window *window, const char *string) } /* - * gui_chat_display_word: display a word on chat buffer + * Displays a word on chat buffer. */ void @@ -230,12 +225,14 @@ gui_chat_display_word (struct t_gui_window *window, } /* - * gui_chat_display_line: display a line in the chat window - * if count == 0, display whole line - * if count > 0, display 'count' lines (beginning from the end) - * if simulate == 1, nothing is displayed (for counting how - * many lines would have been lines displayed) - * returns: number of lines displayed (or simulated) + * Displays a line in the chat window. + * + * If count == 0, display whole line. + * If count > 0, display 'count' lines (beginning from the end). + * If simulate == 1, nothing is displayed (for counting how many lines would + * have been lines displayed). + * + * Returns number of lines displayed (or simulated). */ int @@ -251,8 +248,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, int } /* - * gui_chat_calculate_line_diff: returns pointer to line & offset for a difference - * with given line + * Returns pointer to line & offset for a difference with given line. */ void @@ -350,7 +346,7 @@ gui_chat_calculate_line_diff (struct t_gui_window *window, struct t_gui_line **l } /* - * gui_chat_draw: draw chat window for a buffer + * Draws chat window for a buffer. */ void diff --git a/src/gui/gtk/gui-gtk-color.c b/src/gui/gtk/gui-gtk-color.c index 05d050374..ff72c51b6 100644 --- a/src/gui/gtk/gui-gtk-color.c +++ b/src/gui/gtk/gui-gtk-color.c @@ -57,8 +57,9 @@ struct t_gui_color gui_weechat_colors[] = /* - * gui_color_search: search a color by name - * Return: number of color in WeeChat colors table + * Searches for a color by name. + * + * Returns index of color in WeeChat colors table. */ int @@ -77,7 +78,7 @@ gui_color_search (const char *color_name) } /* - * gui_color_assign: assign a WeeChat color (read from config) + * Assigns a WeeChat color (read from configuration). */ int @@ -102,12 +103,14 @@ gui_color_assign (int *color, const char *color_name) } /* - * gui_color_assign_by_diff: assign color by difference - * It is called when a color option is - * set with value ++X or --X, to search - * another color (for example ++1 is - * next color/alias in list) - * return 1 if ok, 0 if error + * Assigns color by difference. + * + * It is called when a color option is set with value ++X or --X, to search + * another color (for example ++1 is next color/alias in list). + * + * Returns: + * 1: OK + * 0: error */ int @@ -122,7 +125,7 @@ gui_color_assign_by_diff (int *color, const char *color_name, int diff) } /* - * gui_color_get_weechat_colors_number: get number of available colors + * Gets number of available colors. */ int @@ -132,7 +135,7 @@ gui_color_get_weechat_colors_number () } /* - * gui_color_get_term_colors: get number of colors supported by terminal + * Gets number of colors supported by terminal. */ int @@ -142,7 +145,7 @@ gui_color_get_term_colors () } /* - * gui_color_get_pair: get a pair with given foreground/background colors + * Gets a pair with given foreground/background colors. */ int @@ -155,7 +158,7 @@ gui_color_get_pair (int fg, int bg) } /* - * gui_color_weechat_get_pair: get color pair with a WeeChat color number + * Gets color pair with a WeeChat color number. */ int @@ -167,7 +170,7 @@ gui_color_weechat_get_pair (int weechat_color) } /* - * gui_color_get_name: get color name + * Gets color name. */ const char * @@ -177,7 +180,7 @@ gui_color_get_name (int num_color) } /* - * gui_color_init_weechat: init WeeChat colors + * Initializes WeeChat colors. */ void @@ -187,7 +190,7 @@ gui_color_init_weechat () } /* - * gui_color_rebuild_weechat: rebuild WeeChat colors + * Rebuilds WeeChat colors. */ void @@ -209,9 +212,9 @@ gui_color_rebuild_weechat () } /* - * gui_color_display_terminal_colors: display terminal colors - * This is called by command line option - * "-c" / "--colors" + * Displays terminal colors. + * + * This is called by command line option "-c" / "--colors". */ void @@ -221,7 +224,7 @@ gui_color_display_terminal_colors () } /* - * gui_color_buffer_display: display content of color buffer + * Displays content of color buffer. */ void @@ -231,7 +234,7 @@ gui_color_buffer_display () } /* - * gui_color_switch_colrs: switch between WeeChat and terminal colors + * Switches between WeeChat and terminal colors. */ void @@ -241,7 +244,7 @@ gui_color_switch_colors () } /* - * gui_color_reset_pairs: reset all color pairs + * Resets all color pairs. */ void @@ -251,7 +254,7 @@ gui_color_reset_pairs () } /* - * gui_color_buffer_assign: assign color buffer to pointer if it is not yet set + * Assigns color buffer to pointer if it is not yet set. */ void @@ -261,7 +264,7 @@ gui_color_buffer_assign () } /* - * gui_color_buffer_open: open a buffer to display colors + * Opens a buffer to display colors. */ void @@ -271,7 +274,7 @@ gui_color_buffer_open () } /* - * gui_color_palette_build_aliases: build aliases for palette + * Builds aliases for palette. */ void @@ -281,7 +284,7 @@ gui_color_palette_build_aliases () } /* - * gui_color_palette_new: create a new color in palette + * Creates a new color in palette. */ struct t_gui_color_palette * @@ -295,7 +298,7 @@ gui_color_palette_new (int number, const char *value) } /* - * gui_color_palette_free: free a color in palette + * Frees a color in palette. */ void @@ -306,7 +309,7 @@ gui_color_palette_free (struct t_gui_color_palette *color_palette) } /* - * gui_color_pre_init: pre-init colors + * Pre-initializes colors. */ void @@ -321,7 +324,7 @@ gui_color_pre_init () } /* - * gui_color_init: init GUI colors + * Initializes GUI colors. */ void @@ -331,7 +334,7 @@ gui_color_init () } /* - * gui_color_dump: dump colors + * Dumps colors. */ void @@ -341,7 +344,7 @@ gui_color_dump () } /* - * gui_color_end: end GUI colors + * Ends GUI colors. */ void diff --git a/src/gui/gtk/gui-gtk-key.c b/src/gui/gtk/gui-gtk-key.c index 960d7c95d..4cd1ab866 100644 --- a/src/gui/gtk/gui-gtk-key.c +++ b/src/gui/gtk/gui-gtk-key.c @@ -37,7 +37,7 @@ /* - * gui_key_default_bindings: create default key bindings + * Creates default key bindings. */ void @@ -48,7 +48,7 @@ gui_key_default_bindings (int context) } /* - * gui_key_read: read keyboard chars + * Reads keyboard chars. */ void diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c index 57ee22efb..b8b2577c7 100644 --- a/src/gui/gtk/gui-gtk-main.c +++ b/src/gui/gtk/gui-gtk-main.c @@ -63,7 +63,7 @@ GtkWidget *gui_gtk_label1; /* - * gui_main_pre_init: pre-initialize GUI (called before gui_init) + * Pre-initializes GUI (called before gui_init). */ void @@ -80,7 +80,7 @@ gui_main_pre_init (int *argc, char **argv[]) } /* - * gui_main_init: init GUI + * Initializes GUI. */ void @@ -93,7 +93,7 @@ gui_main_init () gui_color_init (); - /* build prefixes according to config */ + /* build prefixes according to configuration */ gui_chat_prefix_build (); /* init clipboard buffer */ @@ -217,7 +217,7 @@ gui_main_init () } /* - * gui_main_loop: main loop for WeeChat with Gtk GUI + * Main loop for WeeChat with Gtk GUI. */ void @@ -228,9 +228,10 @@ gui_main_loop () } /* - * gui_main_end: GUI end - * clean_exit is 0 when WeeChat is crashing (we don't clean - * objects because WeeChat can crash again during this cleanup...) + * Ends GUI. + * + * Argument "clean_exit" is 0 when WeeChat is crashing (we don't clean objects + * because WeeChat can crash again during this cleanup...). */ void diff --git a/src/gui/gtk/gui-gtk-mouse.c b/src/gui/gtk/gui-gtk-mouse.c index 8accbbca7..a6feb26e7 100644 --- a/src/gui/gtk/gui-gtk-mouse.c +++ b/src/gui/gtk/gui-gtk-mouse.c @@ -30,7 +30,7 @@ /* - * gui_mouse_enable: enable mouse + * Enables mouse. */ void @@ -40,7 +40,7 @@ gui_mouse_enable () } /* - * gui_mouse_disable: disable mouse + * Disables mouse. */ void @@ -50,7 +50,7 @@ gui_mouse_disable () } /* - * gui_mouse_display_state: display state of mouse + * Displays state of mouse. */ void @@ -60,7 +60,7 @@ gui_mouse_display_state () } /* - * gui_mouse_grab_init: init "grab mode" + * Initializes "grab mode". */ void @@ -72,7 +72,7 @@ gui_mouse_grab_init (int area) } /* - * gui_mouse_event_init: init mouse event + * Initializes mouse event. */ void @@ -82,7 +82,7 @@ gui_mouse_event_init () } /* - * gui_mouse_event_code2key: get key name with a mouse code + * Gets key name with a mouse code. */ const char * @@ -96,7 +96,7 @@ gui_mouse_event_code2key (const char *code) } /* - * gui_mouse_event_end: end mouse event + * Ends mouse event. */ void diff --git a/src/gui/gtk/gui-gtk-term.c b/src/gui/gtk/gui-gtk-term.c index 8dd3ea6bf..618ca3faa 100644 --- a/src/gui/gtk/gui-gtk-term.c +++ b/src/gui/gtk/gui-gtk-term.c @@ -26,7 +26,7 @@ #endif /* - * gui_term_set_eat_newline_glitch: not used in Gtk GUI + * Not used in Gtk GUI. */ void diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index ad43e0036..ba912a866 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -45,7 +45,7 @@ /* - * gui_window_get_width: get screen width + * Gets screen width. */ int @@ -55,7 +55,7 @@ gui_window_get_width () } /* - * gui_window_get_height: get screen height + * Gets screen height. */ int @@ -65,7 +65,11 @@ gui_window_get_height () } /* - * gui_window_objects_init: init Gtk widgets + * Initializes Gtk widgets. + * + * Returns: + * 1: OK + * 0: error */ int @@ -85,7 +89,7 @@ gui_window_objects_init (struct t_gui_window *window) } /* - * gui_window_objects_free: free Gtk widgets for a window + * Frees Gtk widgets for a window. */ void @@ -97,7 +101,7 @@ gui_window_objects_free (struct t_gui_window *window, int free_separators) } /* - * gui_window_set_weechat_color: set WeeChat color for window + * Sets WeeChat color for window. */ /* TODO: write this function for Gtk */ @@ -113,7 +117,7 @@ gui_window_set_weechat_color (WINDOW *window, int num_color) }*/ /* - * gui_window_calculate_pos_size: calculate position and size for a window & sub-win + * Calculates position and size for a window & sub-win. */ void @@ -124,7 +128,7 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* - * gui_window_draw_separators: draw window separation + * Draws window separation. */ void @@ -149,7 +153,7 @@ gui_window_draw_separators (struct t_gui_window *window) } /* - * gui_window_redraw_buffer: redraw a buffer + * Redraws a buffer. */ void @@ -160,7 +164,7 @@ gui_window_redraw_buffer (struct t_gui_buffer *buffer) } /* - * gui_window_redraw_all_buffers: redraw all buffers + * Redraws all buffers. */ void @@ -170,7 +174,7 @@ gui_window_redraw_all_buffers () } /* - * gui_window_switch: switch to another window + * Switches to another window. */ void @@ -193,7 +197,7 @@ gui_window_switch (struct t_gui_window *window) } /* - * gui_window_switch_to_buffer: switch to another buffer + * Switches to another buffer. */ void @@ -258,7 +262,7 @@ gui_window_switch_to_buffer (struct t_gui_window *window, } /* - * gui_window_page_up: display previous page on buffer + * Displays previous page on buffer. */ void @@ -279,7 +283,7 @@ gui_window_page_up (struct t_gui_window *window) } /* - * gui_window_page_down: display next page on buffer + * Displays next page on buffer. */ void @@ -314,7 +318,7 @@ gui_window_page_down (struct t_gui_window *window) } /* - * gui_window_scroll_up: display previous few lines in buffer + * Displays previous few lines in buffer. */ void @@ -336,7 +340,7 @@ gui_window_scroll_up (struct t_gui_window *window) } /* - * gui_window_scroll_down: display next few lines in buffer + * Displays next few lines in buffer. */ void @@ -372,7 +376,7 @@ gui_window_scroll_down (struct t_gui_window *window) } /* - * gui_window_scroll_top: scroll to top of buffer + * Scrolls to top of buffer. */ void @@ -390,7 +394,7 @@ gui_window_scroll_top (struct t_gui_window *window) } /* - * gui_window_scroll_bottom: scroll to bottom of buffer + * Scrolls to bottom of buffer. */ void @@ -408,10 +412,13 @@ gui_window_scroll_bottom (struct t_gui_window *window) } /* - * gui_window_auto_resize: auto-resize all windows, according to % of global size - * This function is called after a terminal resize. - * Returns 0 if ok, -1 if all window should be merged - * (not enough space according to windows %) + * Auto-resizes all windows, according to % of global size. + * + * This function is called after a terminal resize. + * + * Returns: + * 0: OK + * -1: all windows must be merged (not enough space) */ int @@ -463,7 +470,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, } /* - * gui_window_refresh_windows: auto resize and refresh all windows + * Auto-resizes and refreshes all windows. */ void @@ -478,7 +485,9 @@ gui_window_refresh_windows () } /* - * gui_window_split_horizontal: split a window horizontally + * Horizontally splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -523,7 +532,9 @@ gui_window_split_horizontal (struct t_gui_window *window, int percentage) } /* - * gui_window_split_vertical: split a window vertically + * Vertically splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -570,7 +581,7 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage) } /* - * gui_window_resize: resize window + * Resizes window. */ void @@ -582,7 +593,7 @@ gui_window_resize (struct t_gui_window *window, int percentage) } /* - * gui_window_resize_delta: resize window using delta percentage + * Resizes window using delta percentage. */ void @@ -594,7 +605,11 @@ gui_window_resize_delta (struct t_gui_window *window, int delta_percentage) } /* - * gui_window_merge: merge window with its sister + * Merges window with its sister. + * + * Returns: + * 1: OK + * 0: error */ int @@ -639,7 +654,7 @@ gui_window_merge (struct t_gui_window *window) } /* - * gui_window_merge_all: merge all windows into only one + * Merges all windows into only one. */ void @@ -650,12 +665,12 @@ gui_window_merge_all (struct t_gui_window *window) } /* - * gui_window_side_by_side: return a code about position of 2 windows: - * 0 = they're not side by side - * 1 = side by side (win2 is over the win1) - * 2 = side by side (win2 on the right) - * 3 = side by side (win2 below win1) - * 4 = side by side (win2 on the left) + * Returns a code about position of 2 windows: + * 0 = they're not side by side + * 1 = side by side: win2 is over the win1 + * 2 = side by side: win2 on the right + * 3 = side by side: win2 below win1 + * 4 = side by side: win2 on the left */ int @@ -705,7 +720,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* - * gui_window_switch_up: search and switch to a window over current window + * Searches and switches to a window over current window. */ void @@ -728,7 +743,7 @@ gui_window_switch_up (struct t_gui_window *window) } /* - * gui_window_switch_down: search and switch to a window below current window + * Searches and switches to a window below current window. */ void @@ -751,7 +766,7 @@ gui_window_switch_down (struct t_gui_window *window) } /* - * gui_window_switch_left: search and switch to a window on the left of current window + * Searches and switches to a window on the left of current window. */ void @@ -774,7 +789,7 @@ gui_window_switch_left (struct t_gui_window *window) } /* - * gui_window_switch_right: search and switch to a window on the right of current window + * Searches and switches to a window on the right of current window. */ void @@ -797,9 +812,11 @@ gui_window_switch_right (struct t_gui_window *window) } /* - * gui_window_balance: balance windows (set all splits to 50%) - * return 1 if some windows have been balanced - * 0 if nothing was changed + * Balance windows (set all splits to 50%). + * + * Returns: + * 1: some windows have been balanced + * 0: nothing was changed */ int @@ -812,12 +829,14 @@ gui_window_balance (struct t_gui_window_tree *tree) } /* - * gui_window_swap: swap buffer of two windows - * direction can be: 0 = auto (swap with sister) - * 1 = window above - * 2 = window on the right - * 3 = window below - * 4 = window on the left + * Swaps buffer of two windows. + * + * Argument "direction" can be: + * 0 = auto (swap with sister) + * 1 = window above + * 2 = window on the right + * 3 = window below + * 4 = window on the left */ void @@ -830,7 +849,7 @@ gui_window_swap (struct t_gui_window *window, int direction) } /* - * gui_window_refresh_screen: called when term size is modified + * Called when terminal size is modified. */ void @@ -842,7 +861,7 @@ gui_window_refresh_screen (int full_refresh) } /* - * gui_window_set_title: set terminal title + * Sets terminal title. */ void @@ -854,7 +873,7 @@ gui_window_set_title (const char *title) } /* - * gui_window_send_clipboard: copy text to clipboard (sent to terminal) + * Copies text to clipboard (sent to terminal). */ void @@ -867,7 +886,7 @@ gui_window_send_clipboard (const char *storage_unit, const char *text) } /* - * gui_window_set_bracketed_paste_mode: enable/disable bracketed paste mode + * Enables/disables bracketed paste mode. */ void @@ -879,7 +898,7 @@ gui_window_set_bracketed_paste_mode (int enable) } /* - * gui_window_move_cursor: move cursor on screen (for cursor mode) + * Moves cursor on screen (for cursor mode). */ void @@ -889,7 +908,7 @@ gui_window_move_cursor () } /* - * gui_window_term_display_infos: display some infos about terminal and colors + * Displays some infos about terminal and colors. */ void @@ -899,8 +918,7 @@ gui_window_term_display_infos () } /* - * gui_window_objects_print_log: print Gtk objects infos in log - * (usually for crash dump) + * Prints Gtk objects infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index 25a584344..e8ae2b1b6 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -85,9 +85,11 @@ struct t_hdata *gui_bar_item_hdata_bar_item = NULL; /* - * gui_bar_item_valid: check if a bar item pointer exists - * return 1 if bar item exists - * 0 if bar item is not found + * Checks if a bar item pointer is valid. + * + * Returns: + * 1: bar item exists + * 0: bar item does not exist */ int @@ -110,7 +112,7 @@ gui_bar_item_valid (struct t_gui_bar_item *bar_item) } /* - * gui_bar_item_search: search a bar item + * Searches for a bar item by name. */ struct t_gui_bar_item * @@ -132,11 +134,12 @@ gui_bar_item_search (const char *item_name) } /* - * gui_bar_item_search_with_plugin: search a bar item for a plugin - * if exact_plugin == 1, then search only for - * this plugin, otherwise, if plugin is not - * found, function may return item for core - * (plugin == NULL) + * Searches for a bar item in a plugin. + * + * If exact_plugin == 1, then searches only for this plugin, otherwise, if + * plugin is not found, function may return item for core (plugin == NULL). + * + * Returns pointer to bar item found, NULL if not found. */ struct t_gui_bar_item * @@ -176,9 +179,13 @@ gui_bar_item_search_with_plugin (struct t_weechat_plugin *plugin, } /* - * gui_bar_item_used_in_bar: return 1 if an item is used in the bar - * if partial_name == 1, then search if an item - * begins with "item_name" + * Check if an item is used in a bar. + * + * If partial_name == 1, then searches if an item begins with "item_name". + * + * Returns: + * 1: bar item is used in the bar + * 0: bar item is not used in the bar */ int @@ -213,11 +220,14 @@ gui_bar_item_used_in_bar (struct t_gui_bar *bar, const char *item_name, } /* - * gui_bar_item_used_in_at_least_one_bar: return 1 if an item is used in at - * least one bar - * if partial_name == 1, then search a - * bar that contains item beginning with - * "item_name" + * Checks if a bar item is used in at least one bar. + * + * If partial_name == 1, then searches a bar that contains item beginning with + * "item_name". + * + * Returns: + * 1: bar item is used in at least one bar + * 0: bar item is not used in a bar */ int @@ -263,12 +273,12 @@ gui_bar_item_used_in_at_least_one_bar (const char *item_name, int partial_name, } /* - * gui_bar_item_set_prefix_name_suffix: get prefix, name and suffix for an item - * for example, item name "[time]" - * will return: - * prefix: "[" - * name : "time" - * suffix: "]" + * Gets prefix, name and suffix for an item. + * + * For example, item name "[time]", returns: + * prefix: "[" + * name : "time" + * suffix: "]" */ void @@ -319,13 +329,14 @@ gui_bar_item_set_prefix_name_suffix (const char *item_name, } /* - * gui_bar_item_get_value: return value of a bar item - * run callback if a name exists, then concatenate - * prefix + return of callback + suffix - * for example: if item == "[time]" - * return: color(delimiter) + "[" + - * (value of item "time") + color(delimiter) + - * "]" + * Returns value of a bar item. + * + * Run callbacks if a name exists, then concatenates: + * prefix + return of callback + suffix + * + * For example: if item == "[time]" + * returns: color(delimiter) + "[" + + * (value of item "time") + color(delimiter) + "]" */ char * @@ -448,7 +459,7 @@ gui_bar_item_get_value (struct t_gui_bar *bar, struct t_gui_window *window, } /* - * gui_bar_item_count_lines: count number of lines in item + * Counts number of lines in item. */ int @@ -472,7 +483,9 @@ gui_bar_item_count_lines (char *string) } /* - * gui_bar_item_new: create a new bar item + * Creates a new bar item. + * + * Returns pointer to new bar item, NULL if not found. */ struct t_gui_bar_item * @@ -517,7 +530,7 @@ gui_bar_item_new (struct t_weechat_plugin *plugin, const char *name, } /* - * gui_bar_item_update: update an item on all bars displayed on screen + * Updates an item on all bars displayed on screen. */ void @@ -565,7 +578,7 @@ gui_bar_item_update (const char *item_name) } /* - * gui_bar_item_free: delete a bar item + * Deletes a bar item. */ void @@ -592,7 +605,7 @@ gui_bar_item_free (struct t_gui_bar_item *item) } /* - * gui_bar_item_free_all: delete all bar items + * Deletes all bar items. */ void @@ -605,7 +618,7 @@ gui_bar_item_free_all () } /* - * gui_bar_item_free_all_plugin: delete all bar items for a plugin + * Deletes all bar items for a plugin. */ void @@ -626,7 +639,7 @@ gui_bar_item_free_all_plugin (struct t_weechat_plugin *plugin) } /* - * gui_bar_item_default_input_paste: default item for input paste question + * Default item for input paste question. */ char * @@ -657,7 +670,7 @@ gui_bar_item_default_input_paste (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_input_prompt: default item for input prompt + * Default item for input prompt. */ char * @@ -682,7 +695,7 @@ gui_bar_item_default_input_prompt (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_input_search: default item for input search status + * Default item for input search status. */ char * @@ -723,7 +736,7 @@ gui_bar_item_default_input_search (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_input_text: default item for input text + * Default item for input text. */ char * @@ -846,7 +859,7 @@ gui_bar_item_default_input_text (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_time: default item for time + * Default item for time. */ char * @@ -877,7 +890,7 @@ gui_bar_item_default_time (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_count: default item for number of buffers + * Default item for number of buffers. */ char * @@ -898,7 +911,7 @@ gui_bar_item_default_buffer_count (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_plugin: default item for name of buffer plugin + * Default item for name of buffer plugin. */ char * @@ -919,7 +932,7 @@ gui_bar_item_default_buffer_plugin (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_number: default item for number of buffer + * Default item for number of buffer. */ char * @@ -943,7 +956,7 @@ gui_bar_item_default_buffer_number (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_name: default item for name of buffer + * Default item for name of buffer. */ char * @@ -967,10 +980,10 @@ gui_bar_item_default_buffer_name (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_modes: default item for modes of buffer - * Note: this bar item is empty for WeeChat - * cote, this is used only by plugins like - * irc to display channel modes + * Default item for modes of buffer. + * + * Note: this bar item is empty for WeeChat core, this is used only by plugins + * like irc to display channel modes. */ char * @@ -986,7 +999,7 @@ gui_bar_item_default_buffer_modes (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_filter: default item for buffer filter + * Default item for buffer filter. */ char * @@ -1014,8 +1027,7 @@ gui_bar_item_default_buffer_filter (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_nicklist_count: default item for number of nicks - * in buffer nicklist + * Default item for number of nicks in buffer nicklist. */ char * @@ -1042,7 +1054,7 @@ gui_bar_item_default_buffer_nicklist_count (void *data, } /* - * gui_bar_item_default_scroll: default item for scrolling indicator + * Default item for scrolling indicator. */ char * @@ -1069,7 +1081,7 @@ gui_bar_item_default_scroll (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_hotlist: default item for hotlist + * Default item for hotlist. */ char * @@ -1277,7 +1289,7 @@ gui_bar_item_default_hotlist (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_completion: default item for (partial) completion + * Default item for (partial) completion. */ char * @@ -1333,7 +1345,7 @@ gui_bar_item_default_completion (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_title: default item for buffer title + * Default item for buffer title. */ char * @@ -1352,7 +1364,7 @@ gui_bar_item_default_buffer_title (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_buffer_nicklist: default item for nicklist + * Default item for nicklist. */ char * @@ -1489,7 +1501,7 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_default_window_number: default item for number of window + * Default item for number of window. */ char * @@ -1511,7 +1523,7 @@ gui_bar_item_default_window_number (void *data, struct t_gui_bar_item *item, } /* - * gui_bar_item_focus_buffer_nicklist: focus on nicklist + * Focus on nicklist. */ struct t_hashtable * @@ -1585,7 +1597,7 @@ gui_bar_item_focus_buffer_nicklist (void *data, } /* - * gui_bar_item_timer_cb: timer callback + * Timer callback for updating time. */ int @@ -1622,8 +1634,7 @@ gui_bar_item_timer_cb (void *data, int remaining_calls) } /* - * gui_bar_item_signal_cb: callback when a signal is received, for rebuilding - * an item + * Callback when a signal is received: rebuilds an item. */ int @@ -1641,7 +1652,7 @@ gui_bar_item_signal_cb (void *data, const char *signal, } /* - * gui_bar_item_hook_signal: hook a signal to update bar items + * Hooks a signal to update bar items. */ void @@ -1661,7 +1672,7 @@ gui_bar_item_hook_signal (const char *signal, const char *item) } /* - * gui_bar_item_init: init default items in WeeChat + * Initializes default items in WeeChat. */ void @@ -1864,7 +1875,7 @@ gui_bar_item_init () } /* - * gui_bar_item_end: remove bar items and hooks + * Removes bar items and hooks. */ void @@ -1888,7 +1899,7 @@ gui_bar_item_end () } /* - * gui_bar_item_hdata_bar_item_cb: return hdata for bar item + * Return hdata for bar item. */ struct t_hdata * @@ -1916,8 +1927,11 @@ gui_bar_item_hdata_bar_item_cb (void *data, const char *hdata_name) } /* - * gui_bar_item_add_to_infolist: add a bar item in an infolist - * return 1 if ok, 0 if error + * Adds a bar item in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1946,7 +1960,7 @@ gui_bar_item_add_to_infolist (struct t_infolist *infolist, } /* - * gui_bar_item_print_log: print bar items infos in log (usually for crash dump) + * Prints bar items infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c index 29406b49f..08e9125a1 100644 --- a/src/gui/gui-bar-window.c +++ b/src/gui/gui-bar-window.c @@ -46,9 +46,11 @@ /* - * gui_bar_window_valid: check if a bar window pointer exists - * return 1 if bar window exists - * 0 if bar window is not found + * Checks if a bar window pointer is valid. + * + * Returns: + * 1: bar window exists + * 0: bar window does not exist */ int @@ -85,7 +87,9 @@ gui_bar_window_valid (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_search_bar: search a reference to a bar in a window + * Searches for a reference to a bar in a window. + * + * Returns pointer to bar window found, NULL if not found. */ struct t_gui_bar_window * @@ -105,11 +109,10 @@ gui_bar_window_search_bar (struct t_gui_window *window, struct t_gui_bar *bar) } /* - * gui_bar_window_search_by_xy: get bar_window pointer displayed at (x,y) - * if window is not NULL, search is done in - * bar windows of window - * if window is NULL, search is done in root - * bar windows + * Gets bar_window pointer displayed at (x,y). + * + * If window is not NULL, search is done in bar windows of window. + * If window is NULL, search is done in root bar windows. */ void @@ -249,9 +252,9 @@ gui_bar_window_search_by_xy (struct t_gui_window *window, int x, int y, } /* - * gui_bar_window_get_size: get total bar size (window bars) for a position - * bar is optional, if not NULL, size is computed - * from bar 1 to bar # - 1 + * Gets total bar size (window bars) for a position. + * + * Bar is optional, if not NULL, computes size from bar 1 to bar # - 1. */ int @@ -296,7 +299,7 @@ gui_bar_window_get_size (struct t_gui_bar *bar, struct t_gui_window *window, } /* - * gui_bar_window_calculate_pos_size: calculate position and size of a bar + * Calculates position and size of a bar. */ void @@ -376,8 +379,7 @@ gui_bar_window_calculate_pos_size (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_find_pos: find position for bar window (keeping list sorted - * by bar priority) + * Searches for position of a bar window (to keep list sorted by bar priority). */ struct t_gui_bar_window * @@ -398,7 +400,7 @@ gui_bar_window_find_pos (struct t_gui_bar *bar, struct t_gui_window *window) } /* - * gui_bar_window_content_alloc: allocate content for a bar window + * Allocates content for a bar window. */ void @@ -502,7 +504,7 @@ error: } /* - * gui_bar_window_content_free: free content of a bar window + * Frees content of a bar window. */ void @@ -538,10 +540,7 @@ gui_bar_window_content_free (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_content_build_item: build content of an item for a bar window, - * by calling callback for each item, then - * concat values (according to bar position - * and filling) + * Builds content of an item for a bar window. */ void @@ -573,9 +572,8 @@ gui_bar_window_content_build_item (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_content_build: build content of a bar window, by calling - * callback for each item, then concat values - * (according to bar position and filling) + * Builds content of a bar window: calls callback for each item, then + * concatenates values (according to bar position and filling). */ void @@ -597,8 +595,7 @@ gui_bar_window_content_build (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_content_get: get item or subitem content (first rebuild - * content if refresh is needed) + * Gets item or subitem content (first rebuilds content if refresh is needed). */ char * @@ -618,9 +615,8 @@ gui_bar_window_content_get (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_content_get_with_filling: get content of a bar window, - * formatted for display, according - * to filling for bar position + * Gets content of a bar window, formatted for display, according to filling for + * bar position. */ char * @@ -932,7 +928,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_coords_add: add coordinates (item index/subindex and x,y) + * Adds coordinates (item index/subindex and x,y). */ void @@ -973,7 +969,7 @@ gui_bar_window_coords_add (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_coords_free: free coords of a bar window + * Frees coords of a bar window. */ void @@ -994,8 +990,8 @@ gui_bar_window_coords_free (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_insert: insert bar window in list of bar windows (at good - * position, according to priority) + * Inserts bar window in list of bar windows (at good position, according to + * priority). */ void @@ -1037,8 +1033,9 @@ gui_bar_window_insert (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_new: create a new "window bar" for a bar, in screen or a window - * if window is not NULL, bar window will be in this window + * Creates a new "window bar" for a bar, in screen or a window. + * + * If window is not NULL, bar window will be in this window. */ void @@ -1103,9 +1100,9 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window) } /* - * gui_bar_window_get_current_size: get current size of bar window - * return width or height, depending on bar - * position + * Gets current size of bar window. + * + * Returns width or height, depending on bar position. */ int @@ -1115,8 +1112,7 @@ gui_bar_window_get_current_size (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_get_max_size_in_window: return max size for bar window - * in a window + * Returns max size for bar window in a window. */ int @@ -1148,7 +1144,7 @@ gui_bar_window_get_max_size_in_window (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_get_max_size: return max size for bar window + * Returns max size for bar window. */ int @@ -1182,7 +1178,7 @@ gui_bar_window_get_max_size (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_set_current_size: set current size of all bar windows for a bar + * Sets current size of all bar windows for a bar. */ void @@ -1226,7 +1222,7 @@ gui_bar_window_set_current_size (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_free: free a bar window + * Frees a bar window. */ void @@ -1258,9 +1254,11 @@ gui_bar_window_free (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_remove_unused_bars: remove unused bars for a window - * return 1 if at least one bar was removed - * 0 if no bar was removed + * Removes unused bars for a window. + * + * Returns: + * 1: at least one bar was removed + * 0: no bar was removed */ int @@ -1290,9 +1288,11 @@ gui_bar_window_remove_unused_bars (struct t_gui_window *window) } /* - * gui_bar_window_add_missing_bars: add missing bars for a window - * return 1 if at least one bar was created - * 0 if no bar was created + * Adds missing bars for a window. + * + * Returns: + * 1: at least one bar was created + * 0: no bar was created */ int @@ -1320,10 +1320,11 @@ gui_bar_window_add_missing_bars (struct t_gui_window *window) } /* - * gui_bar_window_scroll: scroll a bar window with a value - * if add == 1, then value is added (otherwise subtracted) - * if add_x == 1, then value is added to scroll_x (otherwise scroll_y) - * if percent == 1, then value is a percentage (otherwise number of chars) + * Scrolls a bar window with a value. + * + * If add == 1, then value is added (otherwise subtracted). + * If add_x == 1, then value is added to scroll_x (otherwise scroll_y). + * If percent == 1, then value is a percentage (otherwise number of chars). */ void @@ -1393,7 +1394,7 @@ gui_bar_window_scroll (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_hdata_bar_window_cb: return hdata for bar window + * Returns hdata for bar window. */ struct t_hdata * @@ -1434,8 +1435,11 @@ gui_bar_window_hdata_bar_window_cb (void *data, const char *hdata_name) } /* - * gui_bar_window_add_to_infolist: add a bar window in an infolist - * return 1 if ok, 0 if error + * Adds a bar window in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1500,7 +1504,7 @@ gui_bar_window_add_to_infolist (struct t_infolist *infolist, } /* - * gui_bar_window_print_log: print bar window infos in log (usually for crash dump) + * Prints bar window infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index 32fb6f33a..a884b6653 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -75,9 +75,11 @@ void gui_bar_free_bar_windows (struct t_gui_bar *bar); /* - * gui_bar_valid: check if a bar pointer exists - * return 1 if bar exists - * 0 if bar is not found + * Checks if a bar pointer is valid. + * + * Returns: + * 1: bar exists + * 0: bar does not exist */ int @@ -99,9 +101,9 @@ gui_bar_valid (struct t_gui_bar *bar) } /* - * gui_bar_search_option search a bar option name - * return index of option in array - * "gui_bar_option_string", or -1 if not found + * Searches for a bar option name. + * + * Returns index of option in enum t_gui_bar_option, -1 if not found. */ int @@ -123,8 +125,9 @@ gui_bar_search_option (const char *option_name) } /* - * gui_bar_search_type: search type number with string - * return -1 if type is not found + * Searches for a bar type. + * + * Returns index of type in enum t_gui_bar_type, -1 if not found. */ int @@ -146,8 +149,9 @@ gui_bar_search_type (const char *type) } /* - * gui_bar_search_position: search position number with string - * return -1 if type is not found + * Searches for a bar position. + * + * Returns index of position in enum t_gui_bar_position, -1 if not found. */ int @@ -169,10 +173,10 @@ gui_bar_search_position (const char *position) } /* - * gui_bar_get_min_width: return minimum width of a bar window displayed for - * a bar - * for example, if a bar is displayed in 3 windows, - * this function return min width of these 3 bar windows + * Returns minimum width of a bar window displayed for a bar. + * + * For example, if a bar is displayed in 3 windows, this function returns min + * width of these 3 bar windows. */ int @@ -206,10 +210,10 @@ gui_bar_get_min_width (struct t_gui_bar *bar) } /* - * gui_bar_get_min_height: return minimum height of a bar window displayed for - * a bar - * for example, if a bar is displayed in 3 windows, - * this function return min width of these 3 bar windows + * Returns minimum height of a bar window displayed for a bar. + * + * For example, if a bar is displayed in 3 windows, this function returns min + * width of these 3 bar windows. */ int @@ -243,9 +247,11 @@ gui_bar_get_min_height (struct t_gui_bar *bar) } /* - * gui_bar_check_size_add: check if "add_size" is ok for bar - * return 1 if new size is ok - * 0 if new size is too big + * Checks if "add_size" is ok for bar. + * + * Returns: + * 1: new size is OK + * 0: new size is too big */ int @@ -288,8 +294,8 @@ gui_bar_check_size_add (struct t_gui_bar *bar, int add_size) } /* - * gui_bar_get_filling: return filling option for bar, according to filling - * for current bar position + * Returns filling option for bar, according to filling for current bar + * position. */ enum t_gui_bar_filling @@ -303,8 +309,7 @@ gui_bar_get_filling (struct t_gui_bar *bar) } /* - * gui_bar_find_pos: find position for a bar in list (keeping list sorted - * by priority) + * Searches for position of a bar in list (to keep list sorted by priority). */ struct t_gui_bar * @@ -323,8 +328,7 @@ gui_bar_find_pos (struct t_gui_bar *bar) } /* - * gui_bar_insert: insert a bar to the list (at good position, according to - * priority) + * Inserts a bar to the list (at good position, according to priority). */ void @@ -365,9 +369,11 @@ gui_bar_insert (struct t_gui_bar *bar) } /* - * gui_bar_check_conditions_for_window: return 1 if bar should be displayed in - * this window, according to condition(s) - * on bar + * Checks if bar must be displayed in window according to conditions. + * + * Returns: + * 1: bar must be displayed + * 0: bar must not be displayed */ int @@ -460,7 +466,7 @@ gui_bar_check_conditions_for_window (struct t_gui_bar *bar, } /* - * gui_bar_root_get_size: get total bar size ("root" type) for a position + * Gets total bar size ("root" type) for a position. */ int @@ -490,7 +496,9 @@ gui_bar_root_get_size (struct t_gui_bar *bar, enum t_gui_bar_position position) } /* - * gui_bar_search: search a bar by name + * Searches for a bar by name. + * + * Returns pointer to bar found, NULL if not found. */ struct t_gui_bar * @@ -512,8 +520,9 @@ gui_bar_search (const char *name) } /* - * gui_bar_search_with_option_name: search a bar with name of option - * (like "uptime.type") + * Searches for a bar with name of option (like "status.type"). + * + * Returns pointer to bar found, NULL if not found. */ struct t_gui_bar * @@ -543,7 +552,7 @@ gui_bar_search_with_option_name (const char *option_name) } /* - * gui_bar_content_build_bar_windows: rebuild content of bar windows for a bar + * Rebuilds content of bar windows for a bar. */ void @@ -575,7 +584,7 @@ gui_bar_content_build_bar_windows (struct t_gui_bar *bar) } /* - * gui_bar_ask_refresh: ask refresh for bar + * Asks refresh for bar. */ void @@ -585,7 +594,7 @@ gui_bar_ask_refresh (struct t_gui_bar *bar) } /* - * gui_bar_refresh: ask for bar refresh on screen (for all windows where bar is) + * Asks for bar refresh on screen (for all windows where bar is). */ void @@ -606,7 +615,7 @@ gui_bar_refresh (struct t_gui_bar *bar) } /* - * gui_bar_draw: draw a bar + * Draws a bar. */ void @@ -642,7 +651,7 @@ gui_bar_draw (struct t_gui_bar *bar) } /* - * gui_bar_apply_current_size: apply new size for all bar windows of bar + * Applies new size for all bar windows of bar. */ void @@ -677,7 +686,7 @@ gui_bar_apply_current_size (struct t_gui_bar *bar) } /* - * gui_bar_free_items_arrays: free arrays with items for a bar + * Frees arrays with items for a bar. */ void @@ -734,7 +743,7 @@ gui_bar_free_items_arrays (struct t_gui_bar *bar) } /* - * gui_bar_set_items_array: build array with items for a bar + * Builds array with items for a bar. */ void @@ -783,7 +792,9 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items) } /* - * gui_bar_config_check_type: callback for checking bar type before changing it + * Callback for checking bar type before changing it. + * + * Returns always 0 because changing the type of a bar is not allowed. */ int @@ -803,7 +814,7 @@ gui_bar_config_check_type (void *data, struct t_config_option *option, } /* - * gui_bar_config_change_hidden: callback when "hidden" flag is changed + * Callback called when "hidden" flag is changed. */ void @@ -864,7 +875,7 @@ gui_bar_config_change_hidden (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_priority: callback when priority is changed + * Callback called when "priority" is changed. */ void @@ -919,7 +930,7 @@ gui_bar_config_change_priority (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_conditions: callback when conditions is changed + * Callback called when "conditions" is changed. */ void @@ -933,7 +944,7 @@ gui_bar_config_change_conditions (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_position: callback when position is changed + * Callback called when "position" is changed. */ void @@ -952,7 +963,7 @@ gui_bar_config_change_position (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_filling: callback when filling is changed + * Callback called when "filling" is changed. */ void @@ -971,7 +982,11 @@ gui_bar_config_change_filling (void *data, struct t_config_option *option) } /* - * gui_bar_config_check_size: callback for checking bar size before changing it + * Callback for checking bar size before changing it. + * + * Returns: + * 1: new size is OK + * 0: new size is NOT OK */ int @@ -1037,7 +1052,7 @@ gui_bar_config_check_size (void *data, struct t_config_option *option, } /* - * gui_bar_config_change_size: callback when size is changed + * Callback called when "size" is changed. */ void @@ -1057,7 +1072,7 @@ gui_bar_config_change_size (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_size_max: callback when max size is changed + * Callback called when "size_max" is changed. */ void @@ -1086,7 +1101,7 @@ gui_bar_config_change_size_max (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_color: callback when color (fg or bg) is changed + * Callback when color (fg or bg) is changed. */ void @@ -1103,7 +1118,7 @@ gui_bar_config_change_color (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_separator: callback when separator is changed + * Callback called when "separator" is changed. */ void @@ -1120,7 +1135,7 @@ gui_bar_config_change_separator (void *data, struct t_config_option *option) } /* - * gui_bar_config_change_items: callback when items is changed + * Callback called when "items" is changed. */ void @@ -1142,7 +1157,7 @@ gui_bar_config_change_items (void *data, struct t_config_option *option) } /* - * gui_bar_set_name: set name for a bar + * Sets name for a bar. */ void @@ -1196,8 +1211,11 @@ gui_bar_set_name (struct t_gui_bar *bar, const char *name) } /* - * gui_bar_set: set a property for a bar - * return: 1 if ok, 0 if error + * Sets a property for a bar. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1288,10 +1306,10 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value) } /* - * gui_bar_default_items: return default items for a bar name - * default bars (input, title, status, nicklist) have - * default items, all other bars have empty default - * items + * Returns default items for a bar name. + * + * Default bars (input, title, status, nicklist) have default items, all other + * bars have empty default items. */ const char * @@ -1311,7 +1329,9 @@ gui_bar_default_items (const char *bar_name) } /* - * gui_bar_create_option: create an option for a bar + * Creates an option for a bar. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -1479,8 +1499,7 @@ gui_bar_create_option (const char *bar_name, int index_option, const char *value } /* - * gui_bar_create_option_temp: create option for a temporary bar (when reading - * config file) + * Creates option for a temporary bar (when reading configuration file). */ void @@ -1543,7 +1562,9 @@ gui_bar_create_option_temp (struct t_gui_bar *temp_bar, int index_option, } /* - * gui_bar_alloc: allocate and initialize new bar structure + * Allocates and initializes new bar structure. + * + * Returns pointer to new bar, NULL if error. */ struct t_gui_bar * @@ -1575,7 +1596,9 @@ gui_bar_alloc (const char *name) } /* - * gui_bar_new_with_options: create a new bar with options + * Creates a new bar with options. + * + * Returns pointer to new bar, NULL if error. */ struct t_gui_bar * @@ -1651,7 +1674,9 @@ gui_bar_new_with_options (const char *name, } /* - * gui_bar_new: create a new bar + * Creates a new bar. + * + * Returns pointer to new bar, NULL if error. */ struct t_gui_bar * @@ -1760,7 +1785,7 @@ gui_bar_new (const char *name, const char *hidden, const char *priority, } /* - * gui_bar_use_temp_bars: use temp bars (created by reading config file) + * Uses temporary bars (created by reading configuration file). */ void @@ -1831,7 +1856,7 @@ gui_bar_use_temp_bars () } /* - * gui_bar_create_default_input: create default input bar if it does not exist + * Creates default input bar if it does not exist. */ void @@ -1895,7 +1920,7 @@ gui_bar_create_default_input () } /* - * gui_bar_create_default_title: create default title bar if it does not exist + * Creates default title bar if it does not exist. */ void @@ -1931,7 +1956,7 @@ gui_bar_create_default_title () } /* - * gui_bar_create_default_status: create default status bar if it does not exist + * Creates default status bar if it does not exist. */ void @@ -1967,7 +1992,7 @@ gui_bar_create_default_status () } /* - * gui_bar_create_default_nicklist: create default nicklist bar if it does not exist + * Creates default nicklist bar if it does not exist. */ void @@ -2003,7 +2028,7 @@ gui_bar_create_default_nicklist () } /* - * gui_bar_create_default: create default bars if they do not exist + * Creates default bars if they do not exist. */ void @@ -2016,7 +2041,7 @@ gui_bar_create_default () } /* - * gui_bar_update: update a bar on screen + * Updates a bar on screen. */ void @@ -2035,8 +2060,11 @@ gui_bar_update (const char *name) } /* - * gui_bar_scroll: scroll a bar - * return 1 if scroll is ok, 0 if error + * Scrolls a bar. + * + * Returns: + * 1: scroll OK + * 0: error */ int @@ -2151,7 +2179,7 @@ gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_window *window, } /* - * gui_bar_free: delete a bar + * Deletes a bar. */ void @@ -2195,7 +2223,7 @@ gui_bar_free (struct t_gui_bar *bar) } /* - * gui_bar_free_all: delete all bars + * Deletes all bars. */ void @@ -2208,7 +2236,7 @@ gui_bar_free_all () } /* - * gui_bar_free_bar_windows: free bar windows for a bar + * Frees bar windows for a bar. */ void @@ -2241,7 +2269,7 @@ gui_bar_free_bar_windows (struct t_gui_bar *bar) } /* - * gui_bar_hdata_bar_cb: return hdata for bar + * Returns hdata for bar. */ struct t_hdata * @@ -2275,8 +2303,11 @@ gui_bar_hdata_bar_cb (void *data, const char *hdata_name) } /* - * gui_bar_add_to_infolist: add a bar in an infolist - * return 1 if ok, 0 if error + * Adds a bar in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -2354,7 +2385,7 @@ gui_bar_add_to_infolist (struct t_infolist *infolist, } /* - * gui_bar_print_log: print bar infos in log (usually for crash dump) + * Prints bar infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index db9879506..fba3f3bfc 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -108,10 +108,10 @@ char *gui_buffer_properties_set[] = /* - * gui_buffer_get_plugin_name: get plugin name of buffer - * Note: during upgrade process (at startup after - * /upgrade), the name of plugin is retrieved - * in temporary variable "plugin_name_for_upgrade" + * Gets plugin name of buffer. + * + * Note: during upgrade process (at startup after /upgrade), the name of plugin + * is retrieved in temporary variable "plugin_name_for_upgrade". */ const char * @@ -124,9 +124,9 @@ gui_buffer_get_plugin_name (struct t_gui_buffer *buffer) } /* - * gui_buffer_get_short_name: get short name of buffer (of name if short_name - * is NULL) - * Note: this function never returns NULL + * Get short name of buffer (of name if short_name is NULL). + * + * Note: this function never returns NULL. */ const char * @@ -136,8 +136,8 @@ gui_buffer_get_short_name (struct t_gui_buffer *buffer) } /* - * gui_buffer_build_full_name: build "full_name" of buffer (for example after - * changing name or plugin_name_for_upgrade) + * Builds "full_name" of buffer (for example after changing name or + * plugin_name_for_upgrade). */ void @@ -158,7 +158,7 @@ gui_buffer_build_full_name (struct t_gui_buffer *buffer) } /* - * gui_buffer_local_var_add: add a new local variable to a buffer + * Adds a new local variable in a buffer. */ void @@ -178,7 +178,7 @@ gui_buffer_local_var_add (struct t_gui_buffer *buffer, const char *name, } /* - * gui_buffer_local_var_remove: remove a local variable in a buffer + * Removes a local variable in a buffer. */ void @@ -199,7 +199,7 @@ gui_buffer_local_var_remove (struct t_gui_buffer *buffer, const char *name) } /* - * gui_buffer_local_var_remove_all: remove all local variables in a buffer + * Removes all local variables in a buffer. */ void @@ -214,9 +214,10 @@ gui_buffer_local_var_remove_all (struct t_gui_buffer *buffer) } /* - * gui_buffer_notify_get: read a notify level in config file - * we first try with all arguments, then remove one by one - * to find notify level (from specific to general notify) + * Reads a notify level in configuration file. + * + * First tries with all arguments, then removes one by one to find notify level + * (from specific to general notify). */ int @@ -266,7 +267,7 @@ gui_buffer_notify_get (struct t_gui_buffer *buffer) } /* - * gui_buffer_notify_set: set notify value on a buffer + * Sets notify value on a buffer. */ void @@ -295,7 +296,7 @@ gui_buffer_notify_set (struct t_gui_buffer *buffer) } /* - * gui_buffer_notify_set_all: set notify values on all opened buffers + * Sets notify values on all opened buffers. */ void @@ -311,7 +312,7 @@ gui_buffer_notify_set_all () } /* - * gui_buffer_find_pos: find position for buffer in list + * Searches for position of buffer in list (to keep buffers sorted by number). */ struct t_gui_buffer * @@ -345,7 +346,8 @@ gui_buffer_find_pos (struct t_gui_buffer *buffer) } /* - * gui_buffer_insert: insert buffer in good position in list of buffers + * Inserts a buffer in good position in list of buffers (keeping sort on + * number). */ void @@ -401,8 +403,7 @@ gui_buffer_insert (struct t_gui_buffer *buffer, int automatic_merge) } /* - * gui_buffer_input_buffer_init: initialize input_buffer_* variables - * in a buffer + * Initializes input_buffer_* variables in a buffer. */ void @@ -418,7 +419,9 @@ gui_buffer_input_buffer_init (struct t_gui_buffer *buffer) } /* - * gui_buffer_new: create a new buffer in current window + * Creates a new buffer in current window. + * + * Returns pointer to new buffer, NULL if error. */ struct t_gui_buffer * @@ -596,9 +599,11 @@ gui_buffer_new (struct t_weechat_plugin *plugin, } /* - * gui_buffer_valid: check if a buffer pointer exists - * return 1 if buffer exists - * 0 if buffer is not found + * Checks if a buffer pointer is valid. + * + * Returns: + * 1: buffer exists + * 0: buffer does not exist */ int @@ -622,8 +627,9 @@ gui_buffer_valid (struct t_gui_buffer *buffer) } /* - * gui_buffer_string_replace_local_var: replace local variables ($var) in a - * string, using value of local variables + * Replaces local variables ($var) in a string, using value of local variables. + * + * Note: result must be freed after use. */ char * @@ -704,8 +710,11 @@ gui_buffer_string_replace_local_var (struct t_gui_buffer *buffer, } /* - * gui_buffer_match_list_split: return 1 if full name of buffer matches - * (split) list of buffers + * Checks if full name of buffer matches (split) list of buffers. + * + * Returns: + * 1: full name matches list of buffers + * 0: full name does not match list of buffers */ int @@ -735,16 +744,17 @@ gui_buffer_match_list_split (struct t_gui_buffer *buffer, } /* - * gui_buffer_match_list: return 1 if buffer matches list of buffers - * list is a string with list of buffers, where - * exclusion is possible with char '!', and "*" means - * all buffers - * Examples: - * "*" - * "*,!*#weechat*" - * "irc.freenode.*" - * "irc.freenode.*,irc.oftc.#channel" - * "irc.freenode.#weechat,irc.freenode.#other" + * Checks if full name of buffer marches list of buffers. + * + * List is a comma-separated list of buffers, where exclusion is possible with + * char '!', and "*" means all buffers. + * + * Examples: + * "*" + * "*,!*#weechat*" + * "irc.freenode.*" + * "irc.freenode.*,irc.oftc.#channel" + * "irc.freenode.#weechat,irc.freenode.#other" */ int @@ -769,8 +779,7 @@ gui_buffer_match_list (struct t_gui_buffer *buffer, const char *string) } /* - * gui_buffer_set_plugin_for_upgrade: set plugin pointer for buffers with a - * given name (used after /upgrade) + * Sets plugin pointer for buffers with a given name (used after /upgrade). */ void @@ -795,8 +804,11 @@ gui_buffer_set_plugin_for_upgrade (char *name, struct t_weechat_plugin *plugin) } /* - * gui_buffer_property_in_list: return 1 if buffer property name is in a list - * 0 if property is not in list + * Check if a property is in the list of properties. + * + * Returns: + * 1: property is in list + * 0: property is not in list */ int @@ -818,7 +830,7 @@ gui_buffer_property_in_list (char *properties[], char *property) } /* - * gui_buffer_get_integer: get a buffer property as integer + * Gets a buffer property as integer. */ int @@ -886,7 +898,7 @@ gui_buffer_get_integer (struct t_gui_buffer *buffer, const char *property) } /* - * gui_buffer_get_string: get a buffer property as string + * Gets a buffer property as string. */ const char * @@ -931,7 +943,7 @@ gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property) } /* - * gui_buffer_get_pointer: get a buffer property as pointer + * Gets a buffer property as pointer. */ void * @@ -949,7 +961,7 @@ gui_buffer_get_pointer (struct t_gui_buffer *buffer, const char *property) } /* - * gui_buffer_ask_chat_refresh: set "chat_refresh_needed" flag + * Sets flag "chat_refresh_needed". */ void @@ -960,7 +972,7 @@ gui_buffer_ask_chat_refresh (struct t_gui_buffer *buffer, int refresh) } /* - * gui_buffer_set_name: set name for a buffer + * Sets name for a buffer. */ void @@ -981,7 +993,7 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name) } /* - * gui_buffer_set_short_name: set short name for a buffer + * Sets short name for a buffer. */ void @@ -1004,7 +1016,7 @@ gui_buffer_set_short_name (struct t_gui_buffer *buffer, const char *short_name) } /* - * gui_buffer_set_type: set buffer type + * Sets buffer type. */ void @@ -1023,7 +1035,7 @@ gui_buffer_set_type (struct t_gui_buffer *buffer, enum t_gui_buffer_type type) } /* - * gui_buffer_set_title: set title for a buffer + * Sets title for a buffer. */ void @@ -1038,7 +1050,7 @@ gui_buffer_set_title (struct t_gui_buffer *buffer, const char *new_title) } /* - * gui_buffer_set_time_for_each_line: set flag "time for each line" for a buffer + * Sets flag "time for each line" for a buffer. */ void @@ -1050,7 +1062,7 @@ gui_buffer_set_time_for_each_line (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_nicklist: set nicklist for a buffer + * Sets nicklist for a buffer. */ void @@ -1061,7 +1073,7 @@ gui_buffer_set_nicklist (struct t_gui_buffer *buffer, int nicklist) } /* - * gui_buffer_set_nicklist_case_sensitive: set case_sensitive flag for a buffer + * Sets case_sensitive flag for a buffer. */ void @@ -1072,7 +1084,7 @@ gui_buffer_set_nicklist_case_sensitive (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_nicklist_display_groups: set display_groups flag for a buffer + * Sets flag "display_groups" for a buffer. */ void @@ -1086,7 +1098,7 @@ gui_buffer_set_nicklist_display_groups (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_highlight_words: set highlight words for a buffer + * Sets highlight words for a buffer. */ void @@ -1100,8 +1112,7 @@ gui_buffer_set_highlight_words (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_highlight_words_list: set highlight words for a buffer with a - * list + * Sets highlight words for a buffer with a list. */ void @@ -1149,7 +1160,7 @@ gui_buffer_set_highlight_words_list (struct t_gui_buffer *buffer, } /* - * gui_buffer_add_highlight_words: add highlight words for a buffer + * Adds highlight words for a buffer. */ void @@ -1194,7 +1205,7 @@ gui_buffer_add_highlight_words (struct t_gui_buffer *buffer, } /* - * gui_buffer_remove_highlight_words: remove highlight words in a buffer + * Removes highlight words in a buffer. */ void @@ -1244,7 +1255,7 @@ gui_buffer_remove_highlight_words (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_highlight_regex: set highlight regex for a buffer + * Sets highlight regex for a buffer. */ void @@ -1285,7 +1296,7 @@ gui_buffer_set_highlight_regex (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_highlight_tags: set highlight tags for a buffer + * Sets highlight tags for a buffer. */ void @@ -1317,8 +1328,7 @@ gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_hotlist_max_level_nicks: set hotlist_max_level_nicks for a - * buffer + * Sets hotlist_max_level_nicks for a buffer. */ void @@ -1359,8 +1369,7 @@ gui_buffer_set_hotlist_max_level_nicks (struct t_gui_buffer *buffer, } /* - * gui_buffer_add_hotlist_max_level_nicks: add nicks to hotlist_max_level_nicks - * for a buffer + * Adds nicks to hotlist_max_level_nicks for a buffer. */ void @@ -1398,9 +1407,7 @@ gui_buffer_add_hotlist_max_level_nicks (struct t_gui_buffer *buffer, } /* - * gui_buffer_remove_hotlist_max_level_nicks: remove nicks from - * hotlist_max_level_nicks in a - * buffer + * Removes nicks from hotlist_max_level_nicks in a buffer. */ void @@ -1428,8 +1435,7 @@ gui_buffer_remove_hotlist_max_level_nicks (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_input_get_unknown_commands: set "input_get_unknown_commands" - * flag for a buffer + * Sets flag "input_get_unknown_commands" for a buffer. */ void @@ -1440,7 +1446,7 @@ gui_buffer_set_input_get_unknown_commands (struct t_gui_buffer *buffer, } /* - * gui_buffer_set_unread: set unread marker for a buffer + * Sets unread marker for a buffer. */ void @@ -1462,7 +1468,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer) } /* - * gui_buffer_set: set a buffer property (string) + * Sets a buffer property (string). */ void @@ -1662,7 +1668,7 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, } /* - * gui_buffer_set: set a buffer property (pointer) + * Sets a buffer property (pointer). */ void @@ -1699,7 +1705,7 @@ gui_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property, } /* - * gui_buffer_compute_num_displayed: compute "num_displayed" for all buffers + * Computes "num_displayed" for all buffers. */ void @@ -1723,8 +1729,7 @@ gui_buffer_compute_num_displayed () } /* - * gui_buffer_add_value_num_displayed: add value to "num_displayed" variable - * for a buffer (value can be negative) + * Adds value to "num_displayed" variable for a buffer (value can be negative). */ void @@ -1745,7 +1750,11 @@ gui_buffer_add_value_num_displayed (struct t_gui_buffer *buffer, int value) } /* - * gui_buffer_is_main: return 1 if plugin/name of buffer is WeeChat main buffer + * Checks if a buffer is the WeeChat core buffer. + * + * Returns: + * 1: buffer is WeeChat core buffer + * 0: buffer is another buffer */ int @@ -1764,7 +1773,7 @@ gui_buffer_is_main (const char *plugin_name, const char *name) } /* - * gui_buffer_search_main: get main buffer (weechat one, created at startup) + * Gets main buffer (weechat one, created at startup). */ struct t_gui_buffer * @@ -1786,7 +1795,7 @@ gui_buffer_search_main () } /* - * gui_buffer_search_by_name: search a buffer by name + * Searches for a buffer by plugin and name. */ struct t_gui_buffer * @@ -1821,8 +1830,7 @@ gui_buffer_search_by_name (const char *plugin, const char *name) } /* - * gui_buffer_search_by_full_name: search a buffer by full name - * (example: "irc.freenode.#weechat") + * Searches for a buffer by full name (example: "irc.freenode.#weechat"). */ struct t_gui_buffer * @@ -1845,7 +1853,7 @@ gui_buffer_search_by_full_name (const char *full_name) } /* - * gui_buffer_search_by_partial_name: search a buffer by name (may be partial) + * Searches for a buffer by plugin and partial name. */ struct t_gui_buffer * @@ -1937,7 +1945,7 @@ gui_buffer_search_by_partial_name (const char *plugin, const char *name) } /* - * gui_buffer_search_by_number: search a buffer by number + * Searches for a buffer by number. */ struct t_gui_buffer * @@ -1957,7 +1965,7 @@ gui_buffer_search_by_number (int number) } /* - * gui_buffer_search_by_layout_number: search a buffer by layout number + * Searches for a buffer by layout number. */ struct t_gui_buffer * @@ -1981,8 +1989,7 @@ gui_buffer_search_by_layout_number (int layout_number, } /* - * gui_buffer_count_merged_buffers: return number of merged buffers (buffers - * with same number) + * Returns number of merged buffers (buffers with same number). */ int @@ -2004,9 +2011,12 @@ gui_buffer_count_merged_buffers (int number) } /* - * gui_buffer_is_scrolled: return 1 if all windows displaying buffer are scrolled - * (user doesn't see end of buffer) - * return 0 if at least one window is NOT scrolled + * Checks if a buffer is scrolled. + * + * Returns: + * 1: all windows displaying buffer are scrolled (user doesn't see end of + * buffer) + * 0: at least one window displaying buffer is NOT scrolled */ int @@ -2039,7 +2049,7 @@ gui_buffer_is_scrolled (struct t_gui_buffer *buffer) } /* - * gui_buffer_clear: clear buffer content + * Clears content of buffer. */ void @@ -2070,7 +2080,7 @@ gui_buffer_clear (struct t_gui_buffer *buffer) } /* - * gui_buffer_clear_all: clear all buffers content + * Clears content of all buffers. */ void @@ -2087,7 +2097,7 @@ gui_buffer_clear_all () } /* - * gui_buffer_close: close a buffer + * Closes a buffer. */ void @@ -2264,7 +2274,7 @@ gui_buffer_close (struct t_gui_buffer *buffer) } /* - * gui_buffer_switch_by_number: switch to another buffer with number + * Switches to another buffer with number. */ void @@ -2289,8 +2299,7 @@ gui_buffer_switch_by_number (struct t_gui_window *window, int number) } /* - * gui_buffer_set_active_buffer: set active buffer (when many buffers are - * merged) + * Sets active buffer (when many buffers are merged). */ void @@ -2332,8 +2341,7 @@ gui_buffer_set_active_buffer (struct t_gui_buffer *buffer) } /* - * gui_buffer_get_next_active_buffer: get next active buffer (when many buffers - * are merged) + * Gets next active buffer (when many buffers are merged). */ struct t_gui_buffer * @@ -2360,8 +2368,7 @@ gui_buffer_get_next_active_buffer (struct t_gui_buffer *buffer) } /* - * gui_buffer_get_previous_active_buffer: get previous active buffer (when many - * buffers are merged) + * Gets previous active buffer (when many buffers are merged). */ struct t_gui_buffer * @@ -2388,7 +2395,7 @@ gui_buffer_get_previous_active_buffer (struct t_gui_buffer *buffer) } /* - * gui_buffer_move_to_number: move a buffer to another number + * Moves a buffer to another number. */ void @@ -2520,7 +2527,7 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number) } /* - * gui_buffer_swap: swap two buffers + * Swaps two buffers. */ void @@ -2551,7 +2558,7 @@ gui_buffer_swap (struct t_gui_buffer *buffer1, struct t_gui_buffer *buffer2) } /* - * gui_buffer_merge: merge a buffer to another buffer + * Merges a buffer to another buffer. */ void @@ -2613,9 +2620,10 @@ gui_buffer_merge (struct t_gui_buffer *buffer, } /* - * gui_buffer_unmerge: unmerge a buffer from group of merged buffers - * if number >= 1, then buffer is moved to this number, - * otherwise it is moved to buffer->number + 1 + * Unmerges a buffer from group of merged buffers. + * + * If number >= 1, then moves buffer to this number, otherwise moves buffer to + * buffer->number + 1. */ void @@ -2734,7 +2742,7 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number) } /* - * gui_buffer_unmerge_all: unmerge all merged buffers + * Unmerges all merged buffers. */ void @@ -2759,7 +2767,7 @@ gui_buffer_unmerge_all () } /* - * gui_buffer_sort_by_layout_number: sort buffers by layout number + * Sorts buffers by layout number. */ void @@ -2781,8 +2789,7 @@ gui_buffer_sort_by_layout_number () } /* - * gui_buffer_undo_snap: do a "snapshot" of buffer input (save content and - * position) + * Makes a "snapshot" of buffer input (save content and position). */ void @@ -2804,7 +2811,7 @@ gui_buffer_undo_snap (struct t_gui_buffer *buffer) } /* - * gui_buffer_undo_snap_free: free "snapshot" of buffer input + * Frees "snapshot" of buffer input. */ void @@ -2819,9 +2826,10 @@ gui_buffer_undo_snap_free (struct t_gui_buffer *buffer) } /* - * gui_buffer_undo_add: add undo in list, with current input buffer + postion - * if before_undo is not NULL, then undo is added before - * this undo, otherwise it is added to the end of list + * Adds undo in list, with current input buffer + position. + * + * If before_undo is not NULL, then adds undo before this undo, otherwise adds + * to the end of list. */ void @@ -2829,7 +2837,7 @@ gui_buffer_undo_add (struct t_gui_buffer *buffer) { struct t_gui_input_undo *new_undo; - /* undo disabled by config */ + /* undo disabled by configuration */ if (CONFIG_INTEGER(config_look_input_undo_max) == 0) goto end; @@ -2902,7 +2910,7 @@ end: } /* - * gui_buffer_undo_free: free undo and remove it from list + * Frees undo and removes it from list. */ void @@ -2938,7 +2946,7 @@ gui_buffer_undo_free (struct t_gui_buffer *buffer, } /* - * gui_buffer_undo_free_all: free all undos of a buffer + * Frees all undos of a buffer. */ void @@ -2953,7 +2961,7 @@ gui_buffer_undo_free_all (struct t_gui_buffer *buffer) } /* - * gui_buffer_visited_search: search a visited buffer in list of visited buffers + * Searches for a visited buffer in list of visited buffers. */ struct t_gui_buffer_visited * @@ -2976,8 +2984,7 @@ gui_buffer_visited_search (struct t_gui_buffer *buffer) } /* - * gui_buffer_visited_search_by_number: search a visited buffer in list of - * visited buffers + * Searches for a visited buffer in list of visited buffers (by number). */ struct t_gui_buffer_visited * @@ -3003,7 +3010,7 @@ gui_buffer_visited_search_by_number (int number) } /* - * gui_buffer_visited_remove: remove a visited buffer from list of visited buffers + * Removes a visited buffer from list of visited buffers. */ void @@ -3032,8 +3039,7 @@ gui_buffer_visited_remove (struct t_gui_buffer_visited *buffer_visited) } /* - * gui_buffer_visited_remove_by_buffer: remove a visited buffer from list of - * visited buffers + * Removes a visited buffer from list of visited buffers. */ void @@ -3050,7 +3056,7 @@ gui_buffer_visited_remove_by_buffer (struct t_gui_buffer *buffer) } /* - * gui_buffer_visited_remove_all: remove all visited buffers from list + * Removes all visited buffers from list. */ void @@ -3063,7 +3069,7 @@ gui_buffer_visited_remove_all () } /* - * gui_buffer_visited_add: add a visited buffer to list of visited buffers + * Adds a visited buffer to list of visited buffers. */ struct t_gui_buffer_visited * @@ -3105,9 +3111,10 @@ gui_buffer_visited_add (struct t_gui_buffer *buffer) } /* - * gui_buffer_visited_get_index_previous: get index for previously visited buffer - * return -1 if there's no previously buffer - * in history, starting from current index + * Gets index for previously visited buffer. + * + * Returns -1 if there's no previously buffer in history, starting from current + * index. */ int @@ -3123,9 +3130,9 @@ gui_buffer_visited_get_index_previous () } /* - * gui_buffer_visited_get_index_next: get index for next visited buffer - * return -1 if there's no next buffer - * in history, starting from current index + * Gets index for next visited buffer. + * + * Returns -1 if there's no next buffer in history, starting from current index. */ int @@ -3139,7 +3146,7 @@ gui_buffer_visited_get_index_next () } /* - * gui_buffer_hdata_buffer_cb: return hdata for buffer + * Returns hdata for buffer. */ struct t_hdata * @@ -3228,7 +3235,7 @@ gui_buffer_hdata_buffer_cb (void *data, const char *hdata_name) } /* - * gui_buffer_hdata_input_undo_cb: return hdata for input undo + * Returns hdata for input undo. */ struct t_hdata * @@ -3252,7 +3259,7 @@ gui_buffer_hdata_input_undo_cb (void *data, const char *hdata_name) } /* - * gui_buffer_hdata_buffer_visited_cb: return hdata for buffer visited + * Returns hdata for buffer visited. */ struct t_hdata * @@ -3277,8 +3284,11 @@ gui_buffer_hdata_buffer_visited_cb (void *data, const char *hdata_name) } /* - * gui_buffer_add_to_infolist: add a buffer in an infolist - * return 1 if ok, 0 if error + * Adds a buffer in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3403,7 +3413,7 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist, } /* - * gui_buffer_dump_hexa: dump content of buffer as hexa data in log file + * Dumps content of buffer as hexa data in WeeChat log file. */ void @@ -3477,7 +3487,7 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer) } /* - * gui_buffer_print_log: print buffer infos in log (usually for crash dump) + * Prints buffer infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index a9cc190f0..d0dd74a5d 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -60,8 +60,8 @@ char *gui_chat_lines_waiting_buffer = NULL; /* lines waiting for core */ /* - * gui_chat_init: init some variables for chat area - * (called before reading WeeChat config file) + * Initializes some variables for chat area (called before reading WeeChat + * configuration file). */ void @@ -84,8 +84,7 @@ gui_chat_init () } /* - * gui_chat_prefix_build: build prefix with colors - * (called after reading WeeChat config file) + * Builds prefix with colors (called after reading WeeChat configuration file). */ void @@ -122,8 +121,11 @@ gui_chat_prefix_build () } /* - * gui_chat_utf_char_valid: return 1 if utf char is valid for screen - * otherwise return 0 + * Checks if an UTF-8 char is valid for screen. + * + * Returns: + * 1: char is valid + * 0: char is not valid */ int @@ -144,8 +146,8 @@ gui_chat_utf_char_valid (const char *utf_char) } /* - * gui_chat_strlen_screen: returns number of char needed on sreen to display a - * word special chars like color, bold, .. are ignored + * Returns number of char needed on screen to display a word (special chars like + * colors/attributes are ignored). */ int @@ -170,8 +172,8 @@ gui_chat_strlen_screen (const char *string) } /* - * gui_chat_string_add_offset: move forward N chars in a string, skipping all - * formatting chars (like colors,..) + * Moves forward N chars in a string, skipping all formatting chars (like + * colors/attributes). */ char * @@ -192,9 +194,8 @@ gui_chat_string_add_offset (const char *string, int offset) } /* - * gui_chat_string_add_offset_screen: move forward N chars (using size on screen) - * in a string, skipping all formatting chars - * (like colors,..) + * Moves forward N chars (using size on screen) in a string, skipping all + * formatting chars (like colors/attributes). */ char * @@ -218,8 +219,8 @@ gui_chat_string_add_offset_screen (const char *string, int offset_screen) } /* - * gui_chat_string_real_pos: get real position in string - * (ignoring color/bold/.. chars) + * Gets real position in string (ignoring formatting chars like + * colors/attributes). */ int @@ -255,10 +256,10 @@ gui_chat_string_real_pos (const char *string, int pos) } /* - * gui_chat_get_word_info: returns info about next word: beginning, end, length - * Note: the word_{start|end}_offset are in bytes, but - * word_length(_with_spaces) are in number of chars on - * screen. + * Returns info about next word: beginning, end, length. + * + * Note: the word_{start|end}_offset are in bytes, but word_length(_with_spaces) + * are in number of chars on screen. */ void @@ -323,7 +324,9 @@ gui_chat_get_word_info (struct t_gui_window *window, } /* - * gu_chat_get_time_string: get time string, for display (with colors) + * Gets time string, for display (with colors). + * + * Note: result must be freed after use. */ char * @@ -431,8 +434,8 @@ gui_chat_get_time_string (time_t date) } /* - * gui_chat_get_time_length: calculates time length with a time format - * (format can include color codes with format ${name}) + * Calculates time length with a time format (format can include color codes + * with format ${name}). */ int @@ -460,7 +463,7 @@ gui_chat_get_time_length () } /* - * gui_chat_change_time_format: change time format for all lines of all buffers + * Changes time format for all lines of all buffers. */ void @@ -486,7 +489,7 @@ gui_chat_change_time_format () } /* - * gui_chat_build_string_prefix_message: build a string with prefix and message + * Builds a string with prefix and message. */ char * @@ -528,7 +531,7 @@ gui_chat_build_string_prefix_message (struct t_gui_line *line) } /* - * gui_chat_build_string_prefix_message: build a string with message and tags + * Builds a string with message and tags. */ @@ -567,10 +570,10 @@ gui_chat_build_string_message_tags (struct t_gui_line *line) } /* - * gui_chat_printf_date_tags: display a message in a buffer with optional - * date and tags - * Info: this function works only with formatted - * buffers (not buffers with free content) + * Displays a message in a buffer with optional date and tags. + * + * Note: this function works only with formatted buffers (not buffers with free + * content). */ void @@ -770,9 +773,10 @@ end: } /* - * gui_chat_printf_y: display a message on a line in a buffer with free content - * Info: this function works only with free content - * buffers (not formatted buffers) + * Displays a message on a line in a buffer with free content. + * + * Note: this function works only with free content buffers (not formatted + * buffers). */ void @@ -852,7 +856,7 @@ gui_chat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...) } /* - * gui_chat_print_lines_waiting_buffer: print lines waiting for buffer + * Prints lines that are waiting for buffer. */ void @@ -886,7 +890,7 @@ gui_chat_print_lines_waiting_buffer () } /* - * gui_chat_hsignal_chat_quote_line_cb: quote a line + * Quotes a line. */ int @@ -940,7 +944,7 @@ gui_chat_hsignal_quote_line_cb (void *data, const char *signal, } /* - * gui_chat_end: free some variables allocated for chat area + * Frees some variables allocated for chat area. */ void diff --git a/src/gui/gui-color.c b/src/gui/gui-color.c index 671a3429d..8aee841af 100644 --- a/src/gui/gui-color.c +++ b/src/gui/gui-color.c @@ -54,8 +54,9 @@ struct t_weelist *gui_color_list_with_alias = NULL; /* - * gui_color_search_config: search a color with configuration option name - * return color string, NULL if not found + * Searches for a color with configuration option name. + * + * Returns color string, NULL if not found. */ const char * @@ -85,8 +86,9 @@ gui_color_search_config (const char *color_name) } /* - * gui_color_attr_get_flag: return flag for attribute char of a color - * If char is unknown, 0 is returned + * Returns flag for attribute char of a color. + * + * Returns 0 if char is unknown. */ int @@ -111,9 +113,9 @@ gui_color_attr_get_flag (char c) } /* - * gui_color_attr_build_string: build string with attributes of color - * The str_attr must be at least 5 bytes long - * (4 for attributes + final '\0') + * Builds string with attributes of color. + * + * The str_attr must be at least 6 bytes long (5 for attributes + final '\0'). */ void @@ -138,7 +140,7 @@ gui_color_attr_build_string (int color, char *str_attr) } /* - * gui_color_get_custom: get a custom color with a name (GUI dependent) + * Gets a custom color with a name. */ const char * @@ -393,13 +395,14 @@ gui_color_get_custom (const char *color_name) } /* - * gui_color_decode: parses a message and remove WeeChat color codes - * if replacement is not NULL and not empty, it is used to - * replace color codes by first char of replacement (and - * next chars in string are NOT removed) - * if replacement is NULL or empty, color codes are removed, - * with following chars if they are related to color code - * After use, string returned has to be free() + * Removes WeeChat color codes from a message. + * + * If replacement is not NULL and not empty, it is used to replace color codes + * by first char of replacement (and next chars in string are NOT removed). + * If replacement is NULL or empty, color codes are removed, with following + * chars if they are related to color code. + * + * Note: result must be freed after use. */ char * @@ -582,9 +585,9 @@ gui_color_decode (const char *string, const char *replacement) } /* - * gui_color_string_replace_colors: replace colors in string with color codes - * colors are using format: ${name} where name - * is a color name + * Replaces colors in string with color codes. + * + * Colors are using format: ${name} where name is a color name. */ char * @@ -661,7 +664,7 @@ gui_color_string_replace_colors (const char *string) } /* - * gui_color_free: free a color + * Frees a color. */ void @@ -677,8 +680,7 @@ gui_color_free (struct t_gui_color *color) } /* - * gui_color_palette_free_value_cb: callback called to free value in hashtable - * when item in hashtable is removed + * Callback called to free value in hashtable when item in hashtable is removed. */ void @@ -698,7 +700,7 @@ gui_color_palette_free_value_cb (struct t_hashtable *hashtable, } /* - * gui_color_palette_alloc_structs: allocate hashtables and lists for palette + * Allocates hashtables and lists for palette. */ void @@ -730,8 +732,9 @@ gui_color_palette_alloc_structs () } /* - * gui_color_palette_get_alias: get color pair number with alias - * return -1 if alias is not found + * Gets color pair number with alias. + * + * Returns -1 if alias is not found. */ int @@ -751,7 +754,7 @@ gui_color_palette_get_alias (const char *alias) } /* - * gui_color_palette_get: get a color palette with number + * Gets a color palette with number. */ struct t_gui_color_palette * @@ -765,7 +768,7 @@ gui_color_palette_get (int number) } /* - * gui_color_palette_add: add a color in palette + * Adds a color in palette. */ void @@ -790,7 +793,7 @@ gui_color_palette_add (int number, const char *value) } /* - * gui_color_palette_remove: remove a color in palette + * Removes a color in palette. */ void @@ -815,7 +818,7 @@ gui_color_palette_remove (int number) } /* - * gui_color_palette_free_structs: free hashtables and lists for palette + * Frees hashtables and lists for palette. */ void diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index e83c00f3b..69e1c886a 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -50,7 +50,7 @@ /* - * gui_completion_buffer_init: init completion for a buffer + * Initializes completion for a buffer. */ void @@ -82,7 +82,9 @@ gui_completion_buffer_init (struct t_gui_completion *completion, } /* - * gui_completion_partial_list_add: add an item to partial completions list + * Adds an item to partial completion list. + * + * Returns pointer to new item, NULL if error. */ struct t_gui_completion_partial * @@ -109,7 +111,7 @@ gui_completion_partial_list_add (struct t_gui_completion *completion, } /* - * gui_completion_partial_free: remove an item from partial completions list + * Removes an item from partial completion list. */ void @@ -134,7 +136,7 @@ gui_completion_partial_list_free (struct t_gui_completion *completion, } /* - * gui_completion_partial_free: remove partial completions list + * Removes partial completion list. */ void @@ -148,7 +150,7 @@ gui_completion_partial_list_free_all (struct t_gui_completion *completion) } /* - * gui_completion_free_data: free data in completion + * Frees data in completion. */ void @@ -180,7 +182,7 @@ gui_completion_free_data (struct t_gui_completion *completion) } /* - * gui_completion_free: free completion + * Frees completion. */ void @@ -191,8 +193,7 @@ gui_completion_free (struct t_gui_completion *completion) } /* - * gui_completion_stop: stop completion (for example after 1 arg of command - * with 1 arg) + * Stops completion (for example after 1 argument of command with 1 argument). */ void @@ -210,7 +211,9 @@ gui_completion_stop (struct t_gui_completion *completion, } /* - * gui_completion_search_command: search command hook + * Searches for a command hook. + * + * Returns pointer to hook found, NULL if not found. */ struct t_hook * @@ -241,8 +244,11 @@ gui_completion_search_command (struct t_weechat_plugin *plugin, } /* - * gui_completion_nick_has_ignored_chars: return 1 if nick has one or more - * ignored chars for nick comparison + * Checks if nick has one or more ignored chars (for nick comparison). + * + * Returns: + * 1: nick has one or more ignored chars + * 0: nick has no ignored chars */ int @@ -267,8 +273,9 @@ gui_completion_nick_has_ignored_chars (const char *string) } /* - * gui_completion_nick_strdup_ignore_chars: duplicate a nick and ignore some - * chars + * Duplicates a nick and ignores some chars. + * + * Note: result must be freed after use. */ char * @@ -299,8 +306,13 @@ gui_completion_nick_strdup_ignore_chars (const char *string) } /* - * gui_completion_nickncmp: locale and case independent string comparison - * with max length for nicks (alpha or digits only) + * Locale and case independent string comparison with max length for nicks + * (alpha or digits only). + * + * Returns: + * < 0: base_word < nick + * 0: base_word == nick + * > 0: base_word > nick */ int @@ -328,7 +340,7 @@ gui_completion_nickncmp (const char *base_word, const char *nick, int max) } /* - * gui_completion_list_add: add a word to completion word list + * Adds a word to completion list. */ void @@ -362,7 +374,7 @@ gui_completion_list_add (struct t_gui_completion *completion, const char *word, } /* - * gui_completion_custom: custom completion by a plugin + * Custom completion by a plugin. */ void @@ -377,7 +389,7 @@ gui_completion_custom (struct t_gui_completion *completion, } /* - * gui_completion_build_list_template: build data list according to a template + * Builds data list according to a template. */ void @@ -455,8 +467,7 @@ gui_completion_build_list_template (struct t_gui_completion *completion, } /* - * gui_completion_get_matching_template: get template matching arguments for - * command + * Gets template matching arguments for command. */ int @@ -484,8 +495,7 @@ gui_completion_get_matching_template (struct t_gui_completion *completion, } /* - * gui_completion_get_template_for_args: get template according to user - * arguments for command + * Gets template according to user arguments for command. */ char * @@ -533,8 +543,7 @@ gui_completion_get_template_for_args (struct t_gui_completion *completion, } /* - * gui_completion_build_list: build data list according to command and - * argument index + * Builds data list according to command and argument index. */ void @@ -610,7 +619,7 @@ gui_completion_build_list (struct t_gui_completion *completion) } /* - * gui_completion_find_context: find context for completion + * Finds context for completion. */ void @@ -773,14 +782,14 @@ gui_completion_find_context (struct t_gui_completion *completion, } /* - * gui_completion_common_prefix_size: find common prefix size in matching items - * (case is ignored) - * if utf_char is not null, only words - * beginning with this char are compared - * (all other words are ignored) - * for example with items: - * FlashCode, flashy, flashouille - * common prefix size is 5 ("flash") + * Finds common prefix size in matching items (case is ignored). + * + * If utf_char is not null, only words beginning with this char are compared + * (all other words are ignored). + * + * For example with items: + * FlashCode, flashy, flashouille + * => common prefix size is 5 ("flash") */ int @@ -818,8 +827,7 @@ gui_completion_common_prefix_size (struct t_weelist *list, } /* - * gui_completion_partial_build_list: build list with possible completions - * when a partial completion occurs + * Builds list with possible completions when a partial completion occurs. */ void @@ -888,7 +896,7 @@ gui_completion_partial_build_list (struct t_gui_completion *completion, } /* - * gui_completion_complete: complete word using matching items + * Completes word using matching items. */ void @@ -1059,7 +1067,7 @@ gui_completion_complete (struct t_gui_completion *completion) } /* - * gui_completion_command: complete a command + * Completes a command. */ void @@ -1087,7 +1095,7 @@ gui_completion_command (struct t_gui_completion *completion) } /* - * gui_completion_auto: auto complete: nick, filename or channel + * Auto-completes: nick, filename or channel. */ void @@ -1114,7 +1122,7 @@ gui_completion_auto (struct t_gui_completion *completion) } /* - * gui_completion_search: complete word according to context + * Completes word according to context. */ void @@ -1182,7 +1190,7 @@ gui_completion_search (struct t_gui_completion *completion, int direction, } /* - * gui_completion_get_string: get a completion property as string + * Gets a completion property as string. */ const char * @@ -1203,7 +1211,7 @@ gui_completion_get_string (struct t_gui_completion *completion, } /* - * gui_completion_hdata_completion_cb: return hdata for completion + * Returns hdata for completion. */ struct t_hdata * @@ -1242,8 +1250,7 @@ gui_completion_hdata_completion_cb (void *data, const char *hdata_name) } /* - * gui_completion_hdata_completion_partial_cb: return hdata for partial - * completion + * Returns hdata for partial completion. */ struct t_hdata * @@ -1267,7 +1274,7 @@ gui_completion_hdata_completion_partial_cb (void *data, const char *hdata_name) } /* - * gui_completion_print_log: print completion list in log (usually for crash dump) + * Prints completion list in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-cursor.c b/src/gui/gui-cursor.c index d814e0b63..5e484a722 100644 --- a/src/gui/gui-cursor.c +++ b/src/gui/gui-cursor.c @@ -48,7 +48,7 @@ int gui_cursor_y = 0; /* position of cursor in cursor mode */ /* - * gui_cursor_mode_toggle: toggle cursor mode + * Toggles cursor mode. */ void @@ -75,7 +75,7 @@ gui_cursor_mode_toggle () } /* - * gui_cursor_debug_set: set debug for cursor mode + * Sets debug for cursor mode. */ void @@ -93,7 +93,7 @@ gui_cursor_debug_set (int debug) } /* - * gui_cursor_display_debug_info: display debug info about (x,y) in input + * Displays debug info about (x,y) in input. */ void @@ -130,7 +130,7 @@ gui_cursor_display_debug_info () } /* - * gui_cursor_move_xy: set cursor at position (x,y) + * Sets cursor at position (x,y). */ void @@ -157,7 +157,7 @@ gui_cursor_move_xy (int x, int y) } /* - * gui_cursor_move_add_xy: move cursor by adding values to (x,y) + * Moves cursor by adding values to (x,y). */ void @@ -184,8 +184,7 @@ gui_cursor_move_add_xy (int add_x, int add_y) } /* - * gui_cursor_move_area_add_xy: move cursor to another area by adding values to - * (x,y) + * Moves cursor to another area by adding values to (x,y). */ void @@ -267,7 +266,7 @@ gui_cursor_move_area_add_xy (int add_x, int add_y) } /* - * gui_cursor_move_area: move cursor to another area by name + * Moves cursor to another area by name. */ void diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index 01a45c833..60cd8d2da 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -49,9 +49,12 @@ int gui_filters_enabled = 1; /* filters enabled? */ /* - * gui_filter_line_has_tag_no_filter: return 1 if line has tag "no_filter", - * which means that line should never - * been filtered (always displayed) + * Checks if a line has tag "no_filter" (which means that line should never been + * filtered: it is always displayed). + * + * Returns: + * 1: line has tag "no_filter" + * 0: line does not have tag "no_filter" */ int @@ -70,8 +73,11 @@ gui_filter_line_has_tag_no_filter (struct t_gui_line *line) } /* - * gui_filter_check_line: return 1 if a line should be displayed, or - * 0 if line is hidden (tag or regex found) + * Checks if a line must be displayed or not (filtered). + * + * Returns: + * 1: line must be displayed (not filtered) + * 0: line must be hidden (filtered) */ int @@ -126,7 +132,7 @@ gui_filter_check_line (struct t_gui_line *line) } /* - * gui_filter_buffer: filter a buffer, using message filters + * Filters a buffer, using message filters. */ void @@ -169,7 +175,7 @@ gui_filter_buffer (struct t_gui_buffer *buffer) } /* - * gui_filter_all_buffers: filter all buffers, using message filters + * Filters all buffers, using message filters. */ void @@ -185,7 +191,7 @@ gui_filter_all_buffers () } /* - * gui_filter_global_enable: enable message filtering + * Enables message filtering. */ void @@ -201,7 +207,7 @@ gui_filter_global_enable () } /* - * gui_filter_global_disable: disable message filtering + * Disables message filtering. */ void @@ -217,7 +223,9 @@ gui_filter_global_disable () } /* - * gui_filter_search_by_name: search a filter by name + * Searches for a filter by name. + * + * Returns pointer to filter found, NULL if not found. */ struct t_gui_filter * @@ -237,7 +245,9 @@ gui_filter_search_by_name (const char *name) } /* - * gui_filter_new: create a new filter + * Creates a new filter. + * + * Returns pointer to new filter, NULL if error. */ struct t_gui_filter * @@ -357,7 +367,11 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name, } /* - * gui_filter_rename: rename a filter + * Renames a filter. + * + * Returns: + * 1: OK + * 0: error */ int @@ -376,7 +390,7 @@ gui_filter_rename (struct t_gui_filter *filter, const char *new_name) } /* - * gui_filter_free: remove a filter + * Removes a filter. */ void @@ -425,7 +439,7 @@ gui_filter_free (struct t_gui_filter *filter) } /* - * gui_filter_free_all: remove all filters + * Removes all filters. */ void @@ -438,7 +452,7 @@ gui_filter_free_all () } /* - * gui_filter_hdata_filter_cb: return hdata for filter + * Returns hdata for filter. */ struct t_hdata * @@ -473,8 +487,11 @@ gui_filter_hdata_filter_cb (void *data, const char *hdata_name) } /* - * gui_filter_add_to_infolist: add a filter in an infolist - * return 1 if ok, 0 if error + * Add a filter in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -516,7 +533,7 @@ gui_filter_add_to_infolist (struct t_infolist *infolist, } /* - * gui_filter_print_log: print filter infos in log (usually for crash dump) + * Prints filter infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-focus.c b/src/gui/gui-focus.c index 9a9d3dcf1..7ea9e7847 100644 --- a/src/gui/gui-focus.c +++ b/src/gui/gui-focus.c @@ -65,7 +65,11 @@ /* - * gui_focus_get_info: get info about what is pointed by cursor at (x,y) + * Gets info about what is pointed by cursor at (x,y). + * + * Returns pointer to focus info, NULL if error. + * + * Note: focus info must be freed after use. */ struct t_gui_focus_info * @@ -105,7 +109,7 @@ gui_focus_get_info (int x, int y) } /* - * gui_focus_free_info: free a focus info structure + * Frees a focus info structure. */ void @@ -122,7 +126,7 @@ gui_focus_free_info (struct t_gui_focus_info *focus_info) } /* - * gui_focus_buffer_localvar_map_cb: add local variables of buffer in hashtable + * Adds local variables of buffer in hashtable. */ void @@ -146,7 +150,11 @@ gui_focus_buffer_localvar_map_cb (void *data, struct t_hashtable *hashtable, } /* - * gui_focus_to_hashtable: add two focus info into hashtable + * Adds two focus info into hashtable. + * + * Returns pointer to new hashtable. + * + * Note: result must be freed after use. */ struct t_hashtable * diff --git a/src/gui/gui-history.c b/src/gui/gui-history.c index 7e52947bb..98d93f081 100644 --- a/src/gui/gui-history.c +++ b/src/gui/gui-history.c @@ -50,7 +50,7 @@ int num_gui_history = 0; /* - * gui_history_buffer_add: add a text/command to buffer's history + * Adds a text/command to buffer's history. */ void @@ -97,7 +97,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string) } /* - * history_global_add: add a text/command to global history + * Adds a text/command to global history. */ void @@ -144,7 +144,7 @@ gui_history_global_add (const char *string) } /* - * gui_history_add: add a text/command to buffer's history + global history + * Adds a text/command to buffer's history + global history. */ void @@ -171,7 +171,7 @@ gui_history_add (struct t_gui_buffer *buffer, const char *string) } /* - * gui_history_global_free: free global history + * Frees global history. */ void @@ -195,7 +195,7 @@ gui_history_global_free () /* - * gui_history_buffer_free: free history for a buffer + * Frees history for a buffer. */ void @@ -218,7 +218,7 @@ gui_history_buffer_free (struct t_gui_buffer *buffer) } /* - * gui_history_hdata_history_update_cb: callback for updating history + * Callback for updating history. */ int @@ -275,7 +275,7 @@ gui_history_hdata_history_update_cb (void *data, } /* - * gui_history_hdata_history_cb: return hdata for history + * Returns hdata for history. */ struct t_hdata * @@ -300,9 +300,11 @@ gui_history_hdata_history_cb (void *data, const char *hdata_name) } /* - * gui_history_add_to_infolist: add history of commands in an infolist - * if buffer is NULL, global history is returned - * return 1 if ok, 0 if error + * Adds history in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 1837897ea..702e97e28 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -54,7 +54,7 @@ int gui_add_hotlist = 1; /* 0 is for temporarly disable */ /* - * gui_hotlist_changed_signal: send signal "hotlist_changed" + * Sends signal "hotlist_changed". */ void @@ -64,7 +64,9 @@ gui_hotlist_changed_signal () } /* - * gui_hotlist_search: find hotlist with buffer pointer + * Searches for hotlist with buffer pointer. + * + * Returns pointer to hotlist found, NULL if not found. */ struct t_gui_hotlist * @@ -82,7 +84,7 @@ gui_hotlist_search (struct t_gui_hotlist *hotlist, struct t_gui_buffer *buffer) } /* - * gui_hotlist_free: free a hotlist and remove it from hotlist queue + * Frees a hotlist and removes it from hotlist queue. */ void @@ -111,7 +113,7 @@ gui_hotlist_free (struct t_gui_hotlist **hotlist, } /* - * gui_hotlist_free_all: free all hotlists + * Frees all hotlists. */ void @@ -126,11 +128,11 @@ gui_hotlist_free_all (struct t_gui_hotlist **hotlist, } /* - * gui_hotlist_check_buffer_notify: return: 1 if buffer notify is ok according - * to priority (buffer will be added - * to hotlist) - * 0 if buffer will not be added to - * hotlist + * Checks if a buffer must be added to hotlist, according to its notify level. + * + * Returns: + * 1: buffer must be added to hotlist + * 0: buffer must not be added to hotlist */ int @@ -157,8 +159,7 @@ gui_hotlist_check_buffer_notify (struct t_gui_buffer *buffer, } /* - * gui_hotlist_find_pos: find position for a inserting in hotlist - * (for sorting hotlist) + * Searches for position of hotlist (to keep hotlist sorted). */ struct t_gui_hotlist * @@ -232,7 +233,7 @@ gui_hotlist_find_pos (struct t_gui_hotlist *hotlist, } /* - * gui_hotlist_add_hotlist: add new hotlist in list + * Adds new hotlist in list. */ void @@ -276,10 +277,12 @@ gui_hotlist_add_hotlist (struct t_gui_hotlist **hotlist, } /* - * gui_hotlist_add: add a buffer to hotlist, with priority - * if creation_time is NULL, current time is used - * return pointer to hotlist created or changed, or NULL if no - * hotlist was created/changed + * Adds a buffer to hotlist, with priority. + * + * If creation_time is NULL, current time is used. + * + * Returns pointer to hotlist created or changed, NULL if no hotlist was + * created/changed. */ struct t_gui_hotlist * @@ -367,7 +370,9 @@ gui_hotlist_add (struct t_gui_buffer *buffer, } /* - * gui_hotlist_dup: duplicate hotlist element + * Duplicates a hotlist element. + * + * Returns pointer to new hotlist, NULL if error. */ struct t_gui_hotlist * @@ -391,7 +396,7 @@ gui_hotlist_dup (struct t_gui_hotlist *hotlist) } /* - * gui_hotlist_resort: resort hotlist with new sort type + * Resorts hotlist with new sort type. */ void @@ -419,7 +424,7 @@ gui_hotlist_resort () } /* - * gui_hotlist_clear: clear hotlist + * Clears hotlist. */ void @@ -430,7 +435,7 @@ gui_hotlist_clear () } /* - * gui_hotlist_remove_buffer: remove a buffer from hotlist + * Removes a buffer from hotlist. */ void @@ -463,7 +468,7 @@ gui_hotlist_remove_buffer (struct t_gui_buffer *buffer) } /* - * gui_hotlist_hdata_hotlist_cb: return hdata for hotlist + * Returns hdata for hotlist. */ struct t_hdata * @@ -492,8 +497,11 @@ gui_hotlist_hdata_hotlist_cb (void *data, const char *hdata_name) } /* - * gui_hotlist_add_to_infolist: add a hotlist in an infolist - * return 1 if ok, 0 if error + * Adds a hotlist in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -563,7 +571,7 @@ gui_hotlist_add_to_infolist (struct t_infolist *infolist, } /* - * gui_hotlist_print_log: print hotlist in log (usually for crash dump) + * Prints hotlist in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 735d335bb..35f825a3c 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -51,8 +51,8 @@ char *gui_input_clipboard = NULL; /* clipboard content */ /* - * gui_input_optimize_size: optimize input buffer size by adding - * or deleting data block (predefined size) + * Optimizes input buffer size by adding or deleting data block (predefined + * size). */ void @@ -84,8 +84,8 @@ gui_input_optimize_size (struct t_gui_buffer *buffer) } /* - * gui_input_replace_input: replace full input by another string, trying to - * keep cursor position is new string is long enough + * Replaces full input by another string, trying to keep cursor position is new + * string is long enough. */ void @@ -119,7 +119,7 @@ gui_input_replace_input (struct t_gui_buffer *buffer, const char *new_input) } /* - * gui_input_paste_pending_signal: send signal "input_paste_pending" + * Sends signal "input_paste_pending". */ void @@ -129,8 +129,7 @@ gui_input_paste_pending_signal () } /* - * gui_input_text_changed_modifier_and_signal: send modifier and signal - * "input_text_changed" + * Sends modifier and signal "input_text_changed". */ void @@ -169,7 +168,7 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer, } /* - * gui_input_text_cursor_moved_signal: send signal "input_text_cursor_moved" + * Sends signal "input_text_cursor_moved". */ void @@ -179,7 +178,7 @@ gui_input_text_cursor_moved_signal () } /* - * gui_input_search_signal: send signal "input_search" + * Sends signal "input_search". */ void @@ -189,7 +188,7 @@ gui_input_search_signal () } /* - * gui_input_set_pos: set position in input line + * Sets position in input line. */ void @@ -205,10 +204,12 @@ gui_input_set_pos (struct t_gui_buffer *buffer, int pos) } /* - * gui_input_insert_string: insert a string into the input buffer - * if pos == -1, string is inserted at cursor position - * return: number of chars inserted - * (may be different of strlen if UTF-8 string) + * Inserts a string into the input buffer. + * + * If pos == -1, string is inserted at cursor position. + * + * Returns number of chars inserted (may be different of strlen if UTF-8 + * string). */ int @@ -256,8 +257,7 @@ gui_input_insert_string (struct t_gui_buffer *buffer, const char *string, } /* - * gui_input_move_to_buffer: move input content and undo data from - * a buffer to another buffer + * Moves input content and undo data from a buffer to another buffer. */ void @@ -323,7 +323,7 @@ gui_input_move_to_buffer (struct t_gui_buffer *from_buffer, } /* - * gui_input_clipboard_copy: copy string into clipboard + * Copies string into clipboard. */ void @@ -345,8 +345,7 @@ gui_input_clipboard_copy (const char *buffer, int size) } /* - * gui_action_clipboard_paste: paste clipboard at cursor pos in input line - * (default key: ctrl-y) + * Pastes clipboard at cursor pos in input line (default key: ctrl-Y). */ void @@ -364,7 +363,12 @@ gui_input_clipboard_paste (struct t_gui_buffer *buffer) } /* - * gui_input_return: terminate line + * Terminates line: + * - saves text in history + * - stops completion + * - frees all undos + * - sends modifier and signal + * - sends data to buffer. */ void @@ -401,7 +405,7 @@ gui_input_return (struct t_gui_buffer *buffer) } /* - * gui_input_complete: complete a word in input buffer + * Completes a word in input buffer. */ void @@ -480,7 +484,7 @@ gui_input_complete (struct t_gui_buffer *buffer) } /* - * gui_input_complete_next: complete with next word (default key: tab) + * Completes with next word (default key: tab). */ void @@ -502,7 +506,7 @@ gui_input_complete_next (struct t_gui_buffer *buffer) } /* - * gui_complete_previous: complete with previous word (default key: shift-tab) + * Completes with previous word (default key: shift-tab). */ void @@ -524,7 +528,7 @@ gui_input_complete_previous (struct t_gui_buffer *buffer) } /* - * gui_input_search_text: search text in buffer (default key: ctrl-r) + * Searches for text in buffer (default key: ctrl-R). */ void @@ -542,8 +546,7 @@ gui_input_search_text (struct t_gui_buffer *buffer) } /* - * gui_input_search_previous: search backward in buffer (default key: up during - * search) + * Searches backward in buffer (default key: up during search). */ void @@ -561,8 +564,7 @@ gui_input_search_previous (struct t_gui_buffer *buffer) } /* - * gui_input_search_next: search forward in buffer (default key: down during - * search) + * Searches forward in buffer (default key: down during search). */ void @@ -580,8 +582,7 @@ gui_input_search_next (struct t_gui_buffer *buffer) } /* - * gui_input_search_switch_case: switch case for search in buffer (default key: - * ctrl-r during search) + * Switches case for search in buffer (default key: ctrl-R during search). */ void @@ -600,7 +601,7 @@ gui_input_search_switch_case (struct t_gui_buffer *buffer) } /* - * gui_input_search_stop: stop text search (default key: return during search) + * Stops text search (default key: return during search). */ void @@ -618,7 +619,7 @@ gui_input_search_stop (struct t_gui_buffer *buffer) } /* - * gui_input_delete_previous_char: delete previous char (default key: backspace) + * Deletes previous char (default key: backspace). */ void @@ -647,7 +648,7 @@ gui_input_delete_previous_char (struct t_gui_buffer *buffer) } /* - * gui_input_delete_next_char: delete next char (default key: del) + * Deletes next char (default key: del). */ void @@ -676,7 +677,7 @@ gui_input_delete_next_char (struct t_gui_buffer *buffer) } /* - * gui_input_delete_previous_word: delete previous word (default key: ctrl-w) + * Deletes previous word (default key: ctrl-W). */ void @@ -733,7 +734,7 @@ gui_input_delete_previous_word (struct t_gui_buffer *buffer) } /* - * gui_input_delete_next_word: delete next word (default key: meta-d) + * Deletes next word (default key: meta-d). */ void @@ -773,8 +774,7 @@ gui_input_delete_next_word (struct t_gui_buffer *buffer) /* - * gui_input_delete_beginning_of_line: delete all from cursor pos to beginning of line - * (default key: ctrl-u) + * Deletes all from cursor pos to beginning of line (default key: ctrl-U). */ void @@ -806,8 +806,7 @@ gui_input_delete_beginning_of_line (struct t_gui_buffer *buffer) } /* - * gui_input_delete_end_of_line: delete all from cursor pos to end of line - * (default key: ctrl-k) + * Deletes all from cursor pos to end of line (default key: ctrl-K). */ void @@ -833,7 +832,7 @@ gui_input_delete_end_of_line (struct t_gui_buffer *buffer) } /* - * gui_input_delete_line: delete entire line (default key: meta-r) + * Deletes entire line (default key: meta-r). */ void @@ -853,8 +852,7 @@ gui_input_delete_line (struct t_gui_buffer *buffer) } /* - * gui_input_transpose_chars: transpose chars (on lth left) at cursor pos - * (default key: ctrl-t) + * Transposes chars at cursor pos (default key: ctrl-T). */ void @@ -890,7 +888,7 @@ gui_input_transpose_chars (struct t_gui_buffer *buffer) } /* - * gui_input_move_beginning_of_line: move cursor to beginning of line (default key: home) + * Moves cursor to beginning of line (default key: home). */ void @@ -904,7 +902,7 @@ gui_input_move_beginning_of_line (struct t_gui_buffer *buffer) } /* - * gui_input_move_end_of_line: move cursor to end of line (default key: end) + * Moves cursor to end of line (default key: end). */ void @@ -919,7 +917,7 @@ gui_input_move_end_of_line (struct t_gui_buffer *buffer) } /* - * gui_input_move_previous_char: move cursor to previous char (default key: left) + * Moves cursor to previous char (default key: left). */ void @@ -933,7 +931,7 @@ gui_input_move_previous_char (struct t_gui_buffer *buffer) } /* - * gui_input_move_next_char: move cursor to next char (default key: right) + * Moves cursor to next char (default key: right). */ void @@ -948,8 +946,8 @@ gui_input_move_next_char (struct t_gui_buffer *buffer) } /* - * gui_input_move_previous_word: move cursor to beginning of previous word - * (default key: meta-b or ctrl-left) + * Moves cursor to beginning of previous word (default key: meta-b or + * ctrl-left). */ void @@ -987,8 +985,8 @@ gui_input_move_previous_word (struct t_gui_buffer *buffer) } /* - * gui_input_move_next_word: move cursor to the beginning of next word - * (default key: meta-f or ctrl-right) + * Moves cursor to the beginning of next word (default key: meta-f or + * ctrl-right). */ void @@ -1032,8 +1030,7 @@ gui_input_move_next_word (struct t_gui_buffer *buffer) } /* - * gui_input_history_previous: recall previous command from local or global - * history + * Recalls previous command from local or global history. */ void @@ -1089,7 +1086,7 @@ gui_input_history_previous (struct t_gui_window *window, } /* - * gui_input_history_next: recall next command from local or global history + * Recalls next command from local or global history. */ void @@ -1164,8 +1161,7 @@ gui_input_history_next (struct t_gui_window *window, } /* - * gui_input_history_local_previous: recall previous command from local history - * (default key: up) + * Recalls previous command from local history (default key: up). */ void @@ -1183,8 +1179,7 @@ gui_input_history_local_previous (struct t_gui_buffer *buffer) } /* - * gui_input_history_local_next: recall next command from local history - * (default key: down) + * Recalls next command from local history (default key: down). */ void @@ -1202,8 +1197,7 @@ gui_input_history_local_next (struct t_gui_buffer *buffer) } /* - * gui_input_history_global_previous: recall previous command from global history - * (default key: ctrl-up) + * Recalls previous command from global history (default key: ctrl-up). */ void @@ -1221,8 +1215,7 @@ gui_input_history_global_previous (struct t_gui_buffer *buffer) } /* - * gui_history_global_next: recall next command from global history - * (default key: ctrl-down) + * Recalls next command from global history (default key: ctrl-down). */ void @@ -1240,7 +1233,7 @@ gui_input_history_global_next (struct t_gui_buffer *buffer) } /* - * gui_input_jump_smart: jump to buffer with activity (default key: alt-a) + * Jumps to buffer with activity (default key: alt-a). */ void @@ -1281,8 +1274,7 @@ gui_input_jump_smart (struct t_gui_buffer *buffer) } /* - * gui_input_jump_last_buffer: jump to last buffer - * (default key: meta-j, meta-l) + * Jumps to last buffer (default key: meta-j, meta-l). */ void @@ -1300,9 +1292,8 @@ gui_input_jump_last_buffer (struct t_gui_buffer *buffer) } /* - * gui_input_jump_last_buffer_displayed: jump to last buffer displayed (before - * last jump to a buffer) - * (default key: meta-/) + * Jumps to last buffer displayed (before last jump to a buffer) (default key: + * meta-/). */ void @@ -1321,9 +1312,8 @@ gui_input_jump_last_buffer_displayed (struct t_gui_buffer *buffer) } /* - * gui_input_jump_previously_visited_buffer: jump to previously visited buffer - * (buffer displayed before current one) - * (default key: meta-<) + * Jumps to previously visited buffer (buffer displayed before current one) + * (default key: meta-<). */ void @@ -1356,9 +1346,8 @@ gui_input_jump_previously_visited_buffer (struct t_gui_buffer *buffer) } /* - * gui_input_jump_next_visited_buffer: jump to next visited buffer - * (buffer displayed after current one) - * (default key: meta->) + * Jumps to next visited buffer (buffer displayed after current one) (default + * key: meta->). */ void @@ -1390,7 +1379,7 @@ gui_input_jump_next_visited_buffer (struct t_gui_buffer *buffer) } /* - * gui_input_hotlist_clear: clear hotlist (default key: meta-h) + * Clears hotlist (default key: meta-h). */ void @@ -1401,8 +1390,8 @@ gui_input_hotlist_clear (struct t_gui_buffer *buffer) } /* - * gui_input_grab_key: init "grab key mode" (next key will be inserted into - * input buffer) (default key: meta-k) + * Initializes "grab key mode" (next key will be inserted into input buffer) + * (default key: meta-k). */ void @@ -1413,9 +1402,8 @@ gui_input_grab_key (struct t_gui_buffer *buffer, int command, const char *delay) } /* - * gui_input_grab_mouse: init "grab mouse mode" (next mouse event will be - * inserted into input buffer) (default key: button2 of - * mouse in input bar) + * Initializes "grab mouse mode" (next mouse event will be inserted into input + * buffer) (default key: button2 of mouse in input bar). */ void @@ -1426,8 +1414,7 @@ gui_input_grab_mouse (struct t_gui_buffer *buffer, int area) } /* - * gui_input_set_unread: set unread marker for all buffers - * (default key: ctrl-s, ctrl-u) + * Sets unread marker for all buffers (default key: ctrl-S, ctrl-U). */ void @@ -1444,7 +1431,7 @@ gui_input_set_unread () } /* - * gui_input_set_unread_buffer: set unread marker for a buffer + * Sets unread marker for a buffer. */ void @@ -1454,9 +1441,8 @@ gui_input_set_unread_current (struct t_gui_buffer *buffer) } /* - * gui_input_switch_active_buffer: switch active buffer to next buffer - * (when many buffers are merged) - * (default key: ctrl-x) + * Switches active buffer to next buffer (when many buffers are merged) (default + * key: ctrl-X). */ void @@ -1476,9 +1462,7 @@ gui_input_switch_active_buffer (struct t_gui_buffer *buffer) } /* - * gui_input_switch_active_buffer_previous: switch active buffer to previous - * buffer (when many buffers are - * merged) + * Switches active buffer to previous buffer (when many buffers are merged). */ void @@ -1498,10 +1482,8 @@ gui_input_switch_active_buffer_previous (struct t_gui_buffer *buffer) } /* - * gui_input_zoom_merged_buffer: zoom on current active merged buffer, - * or display all merged buffers if zoom - * was active - * (default key: alt-x) + * Zooms on current active merged buffer, or display all merged buffers if zoom + * was active (default key: alt-x). */ void @@ -1541,8 +1523,7 @@ gui_input_zoom_merged_buffer (struct t_gui_buffer *buffer) } /* - * gui_input_insert: insert a string in command line - * (many default keys are bound to this function) + * Inserts a string in command line. */ void @@ -1562,7 +1543,7 @@ gui_input_insert (struct t_gui_buffer *buffer, const char *args) } /* - * gui_input_undo_use: use a undo: replace input with undo content + * Uses a undo: replace input with undo content. */ void @@ -1577,7 +1558,7 @@ gui_input_undo_use (struct t_gui_buffer *buffer, struct t_gui_input_undo *undo) } /* - * gui_input_undo: undo last action on input buffer + * Undoes last action on input buffer (default key: ctrl-_). */ void @@ -1608,7 +1589,7 @@ gui_input_undo (struct t_gui_buffer *buffer) } /* - * gui_input_redo: redo last action on input buffer + * Redoes last action on input buffer (default key: alt-_). */ void diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index 4a415b5ea..0b734cb2b 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -94,7 +94,7 @@ time_t gui_key_last_activity_time = 0; /* last activity time (key) */ /* - * gui_key_init: init keyboard + * Initializes keyboard. */ void @@ -127,7 +127,9 @@ gui_key_init () } /* - * gui_key_search_context: search context by name + * Searches for a context by name. + * + * Returns index of context in enum t_gui_key_context, -1 if not found. */ int @@ -146,7 +148,7 @@ gui_key_search_context (const char *context) } /* - * gui_key_get_current_context: get current context + * Gets current context. */ int @@ -163,7 +165,7 @@ gui_key_get_current_context () } /* - * gui_key_grab_init: init "grab" mode + * Initializes "grab" mode. */ void @@ -191,7 +193,7 @@ gui_key_grab_init (int grab_command, const char *delay) } /* - * gui_key_grab_end_timer_cb: insert grabbed key in input buffer + * Inserts grabbed key in input buffer. */ int @@ -260,9 +262,11 @@ gui_key_grab_end_timer_cb (void *data, int remaining_calls) } /* - * gui_key_get_internal_code: get internal code from user key name - * for example: return '\x01'+'R' for "ctrl-R" - * Note: returned value has to be free() after use + * Gets internal code from user key name. + * + * For example: returns '\x01'+'R' for "ctrl-R" + * + * Note: result must be freed after use. */ char * @@ -307,8 +311,11 @@ gui_key_get_internal_code (const char *key) } /* - * gui_key_get_expanded_name: get expanded name from internal key code - * for example: return "ctrl-R" for "\x01+R" + * Gets expanded name from internal key code. + * + * For example: return "ctrl-R" for "\x01+R". + * + * Note: result must be freed after use. */ char * @@ -352,7 +359,7 @@ gui_key_get_expanded_name (const char *key) } /* - * gui_key_find_pos: find position for a key (for sorting keys list) + * Searches for position of a key (to keep keys sorted). */ struct t_gui_key * @@ -373,7 +380,7 @@ gui_key_find_pos (struct t_gui_key *keys, struct t_gui_key *key) } /* - * gui_key_insert_sorted: insert key into sorted list + * Inserts key into sorted list. */ void @@ -421,11 +428,13 @@ gui_key_insert_sorted (struct t_gui_key **keys, } /* - * gui_key_set_area_type_name: set area type and name - * for example: "bar(nicklist)" will return: - * type: 2 (bar) - * name: "nicklist" - * Warning: if no area is found, values are NOT set + * Sets area type and name. + * + * For example: "bar(nicklist)" returns: + * type: 2 (bar) + * name: "nicklist" + * + * Warning: if no area is found, values are NOT set. */ void @@ -468,8 +477,7 @@ gui_key_set_area_type_name (const char *area, } /* - * gui_key_set_areas: set areas types (any, chat, bar or item) and names for a - * key + * Sets areas types (any, chat, bar or item) and names for a key. */ void @@ -526,9 +534,8 @@ gui_key_set_areas (struct t_gui_key *key) } /* - * gui_key_set_score: compute a score key for sorting keys - * and set it in key - * (high score == at the end of list) + * Computes a score key for sorting keys and set it in key (high score == at the + * end of list). */ void @@ -576,9 +583,12 @@ gui_key_set_score (struct t_gui_key *key) } /* - * gui_key_new: add a new key in keys list - * if buffer is not null, then key is specific to buffer - * otherwise it's general key (for most keys) + * Adds a new key in keys list. + * + * If buffer is not null, then key is specific to buffer, otherwise it's general + * key (for most keys). + * + * Returns pointer to new key, NULL if error. */ struct t_gui_key * @@ -649,7 +659,9 @@ gui_key_new (struct t_gui_buffer *buffer, int context, const char *key, } /* - * gui_key_search: search a key + * Searches for a key. + * + * Returns pointer to key found, NULL if not found. */ struct t_gui_key * @@ -668,7 +680,7 @@ gui_key_search (struct t_gui_key *keys, const char *key) } /* - * gui_key_cmp: compares 2 keys + * Compares two keys. */ int @@ -692,7 +704,9 @@ gui_key_cmp (const char *key, const char *search, int context) } /* - * gui_key_search_part: search a key (maybe part of string) + * Searches for a key (maybe part of string). + * + * Returns pointer to key found, NULL if not found. */ struct t_gui_key * @@ -719,11 +733,14 @@ gui_key_search_part (struct t_gui_buffer *buffer, int context, } /* - * gui_key_bind: bind a key to a function (command or special function) - * if buffer is not null, then key is specific to buffer - * otherwise it's general key (for most keys) - * Note: if key already exists, it is removed then added again - * with new value + * Binds a key to a function (command or special function). + * + * If buffer is not null, then key is specific to buffer otherwise it's general + * key (for most keys). + * + * If key already exists, it is removed then added again with new value. + * + * Returns pointer to new key, NULL if error. */ struct t_gui_key * @@ -739,7 +756,7 @@ gui_key_bind (struct t_gui_buffer *buffer, int context, const char *key, } /* - * gui_key_bind_plugin_hashtable_map_cb: bind keys in hashtable + * Binds keys in hashtable. */ void @@ -773,11 +790,12 @@ gui_key_bind_plugin_hashtable_map_cb (void *data, } /* - * gui_key_bind_plugin: create many keys using a hashtable - * (used by plugins only) - * return: number of keys added - * note: if key already exists, it is NOT changed (plugins - * should never overwrite user keys) + * Creates many keys using a hashtable (used by plugins only). + * + * If key already exists, it is NOT changed (plugins should never overwrite user + * keys). + * + * Returns number of keys added. */ int @@ -798,8 +816,11 @@ gui_key_bind_plugin (const char *context, struct t_hashtable *keys) } /* - * gui_key_unbind: remove one key binding - * return: 1 if key removed, 0 if not removed + * Removes one key binding. + * + * Returns: + * 1: key removed + * 0: key not removed */ int @@ -843,9 +864,9 @@ gui_key_unbind (struct t_gui_buffer *buffer, int context, const char *key) } /* - * gui_key_unbind_plugin: remove one or more key binding(s) - * (used by plugins only) - * return: number of keys removed + * Removes one or more key binding(s) (used by plugins only). + * + * Returns number of keys removed. */ int @@ -895,8 +916,11 @@ gui_key_unbind_plugin (const char *context, const char *key) } /* - * gui_key_focus_matching: return 1 if area in key is matching focus area on - * screen (cursor/mouse) + * Checks if area in key is matching focus area on screen (cursor/mouse). + * + * Returns: + * 1: area in key is matching focus area + * 0: area in key is not matching focus area */ int @@ -951,8 +975,7 @@ gui_key_focus_matching (struct t_gui_key *key, } /* - * gui_key_focus_command_replace_cb: callback for replacing values in string - * with a hashtable + * Callback for replacing values in string with a hashtable. */ char * @@ -974,8 +997,11 @@ gui_key_focus_command_replace_cb (void *data, const char *text) } /* - * gui_key_focus_command: run command according to focus - * return 1 if a command was executed, otherwise 0 + * Runs command according to focus. + * + * Returns: + * 1: command was executed + * 0: command was not executed */ int @@ -1097,9 +1123,12 @@ gui_key_focus_command (const char *key, int context, } /* - * gui_key_focus: process key pressed in cursor or mouse mode, - * looking for keys: "{area}key" in context "cursor" or "mouse" - * return 1 if a command was executed, otherwise 0 + * Processes key pressed in cursor or mouse mode, looking for keys: "{area}key" + * in context "cursor" or "mouse". + * + * Returns: + * 1: command was executed + * 0: command was not executed */ int @@ -1169,9 +1198,11 @@ end: } /* - * gui_key_pressed: process new key pressed - * return: 1 if key should be added to input buffer - * 0 otherwise + * Processes a new key pressed. + * + * Returns: + * 1: key must be added to input buffer + * 0: key must not be added to input buffer */ int @@ -1295,7 +1326,7 @@ gui_key_pressed (const char *key_str) } /* - * gui_key_free: delete a key binding + * Deletes a key binding. */ void @@ -1333,7 +1364,7 @@ gui_key_free (struct t_gui_key **keys, struct t_gui_key **last_key, } /* - * gui_key_free_all: delete all key bindings + * Deletes all key bindings. */ void @@ -1347,7 +1378,7 @@ gui_key_free_all (struct t_gui_key **keys, struct t_gui_key **last_key, } /* - * gui_key_buffer_optimize: optimize keyboard buffer size + * Optimizes keyboard buffer size. */ void @@ -1378,8 +1409,7 @@ gui_key_buffer_optimize () } /* - * gui_key_buffer_reset: reset keyboard buffer - * (create empty if never created before) + * Resets keyboard buffer (create empty if never created before). */ void @@ -1400,7 +1430,7 @@ gui_key_buffer_reset () } /* - * gui_key_buffer_add: add a key to keyboard buffer + * Adds a key to keyboard buffer. */ void @@ -1433,12 +1463,13 @@ gui_key_buffer_add (unsigned char key) } /* - * gui_key_buffer_search: search a string in gui_key_buffer (array of integers) - * start_index must be >= 0 - * if max_index is negative, the search is until end of buffer - * return index for string found in gui_key_buffer - * (not from "start_index" but from beginning of gui_key_buffer) - * or -1 if string is not found + * Searches for a string in gui_key_buffer (array of integers). + * + * Argument start_index must be >= 0. + * If max_index is negative, the search is until end of buffer. + * + * Returns index for string found in gui_key_buffer (not from "start_index" but + * from beginning of gui_key_buffer), or -1 if string is not found. */ int @@ -1479,7 +1510,7 @@ gui_key_buffer_search (int start_index, int max_index, const char *string) } /* - * gui_key_buffer_remove: remove some chars from gui_key_buffer + * Removes some chars from gui_key_buffer. */ void @@ -1495,8 +1526,7 @@ gui_key_buffer_remove (int index, int number) } /* - * gui_key_paste_remove_newline: remove final newline at enf of paste if there - * is only one line to paste + * Removes final newline at end of paste if there is only one line to paste. */ void @@ -1513,7 +1543,7 @@ gui_key_paste_remove_newline () } /* - * gui_key_paste_replace_tabs: replace tabs by spaces in paste + * Replaces tabs by spaces in paste. */ void @@ -1529,7 +1559,7 @@ gui_key_paste_replace_tabs () } /* - * gui_key_paste_start: start paste of text + * Starts paste of text. */ void @@ -1542,9 +1572,9 @@ gui_key_paste_start () } /* - * gui_key_get_paste_lines: return real number of lines in buffer - * if last key is not Return, then this is lines + 1 - * else it's lines + * Returns real number of lines in buffer. + * + * Returns number of lines (lines+1 if last key is not return). */ int @@ -1572,11 +1602,13 @@ gui_key_get_paste_lines () } /* - * gui_key_paste_check: check pasted lines: if more than N lines, then enable - * paste mode and ask confirmation to user - * (ctrl-Y=paste, ctrl-N=cancel) - * (N is option weechat.look.paste_max_lines) - * return 1 if paste mode has been enabled, 0 otherwise + * Checks pasted lines: if more than N lines, then enables paste mode and ask + * confirmation to user (ctrl-Y=paste, ctrl-N=cancel) (N is option + * weechat.look.paste_max_lines). + * + * Returns: + * 1: paste mode has been enabled + * 0: paste mode has not been enabled */ int @@ -1606,7 +1638,7 @@ gui_key_paste_check (int bracketed_paste) } /* - * gui_key_paste_bracketed_timer_cb: callback for bracketed paste timer + * Callback for bracketed paste timer. */ int @@ -1625,7 +1657,7 @@ gui_key_paste_bracketed_timer_cb (void *data, int remaining_calls) } /* - * gui_key_paste_bracketed_timer_remove: remove timer for bracketed paste + * Removes timer for bracketed paste. */ void @@ -1639,7 +1671,7 @@ gui_key_paste_bracketed_timer_remove () } /* - * gui_key_paste_bracketed_timer_add: add timer for bracketed paste + * Adds timer for bracketed paste. */ void @@ -1653,8 +1685,7 @@ gui_key_paste_bracketed_timer_add () } /* - * gui_key_paste_bracketed_start: start bracketed paste of text - * (ESC[200~ detected) + * Starts bracketed paste of text (ESC[200~ detected). */ void @@ -1665,9 +1696,8 @@ gui_key_paste_bracketed_start () } /* - * gui_key_paste_bracketed_stop: stop bracketed paste of text - * (ESC[201~ detected or timeout while waiting for - * this code) + * Stops bracketed paste of text (ESC[201~ detected or timeout while waiting for + * this code). */ void @@ -1678,7 +1708,7 @@ gui_key_paste_bracketed_stop () } /* - * gui_key_paste_accept: accept paste from user + * Accepts paste from user. */ void @@ -1701,7 +1731,7 @@ gui_key_paste_accept () } /* - * gui_key_paste_cancel: cancel paste from user (reset buffer) + * Cancels paste from user (resets buffer). */ void @@ -1713,7 +1743,7 @@ gui_key_paste_cancel () } /* - * gui_key_end: end keyboard (free some data) + * Ends keyboard (frees some data). */ void @@ -1737,7 +1767,7 @@ gui_key_end () } /* - * gui_key_hdata_key_cb: return hdata for key + * Returns hdata for key. */ struct t_hdata * @@ -1790,8 +1820,11 @@ gui_key_hdata_key_cb (void *data, const char *hdata_name) } /* - * gui_key_add_to_infolist: add a key in an infolist - * return 1 if ok, 0 if error + * Adds a key in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1835,7 +1868,7 @@ gui_key_add_to_infolist (struct t_infolist *infolist, struct t_gui_key *key) } /* - * gui_key_print_log: print a key info in log (usually for crash dump) + * Prints a key info in WeeChat log file (usually for crash dump). */ void @@ -1861,7 +1894,7 @@ gui_key_print_log_key (struct t_gui_key *key, const char *prefix) } /* - * gui_key_print_log: print key infos in log (usually for crash dump) + * Prints key infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c index f50228d5b..1267021c4 100644 --- a/src/gui/gui-layout.c +++ b/src/gui/gui-layout.c @@ -55,7 +55,7 @@ struct t_gui_window *gui_layout_ptr_current_window = NULL; /* - * gui_layout_buffer_remove: remove a buffer layout + * Removes a buffer layout. */ void @@ -83,7 +83,7 @@ gui_layout_buffer_remove (struct t_gui_layout_buffer **layout_buffers, } /* - * gui_layout_buffer_remove_all: remove all buffer layouts + * Removes all buffer layouts. */ void @@ -98,7 +98,7 @@ gui_layout_buffer_remove_all (struct t_gui_layout_buffer **layout_buffers, } /* - * gui_layout_buffer_reset: reset layout for buffers + * Resets layout for buffers. */ void @@ -117,7 +117,9 @@ gui_layout_buffer_reset (struct t_gui_layout_buffer **layout_buffers, } /* - * gui_layout_buffer_add: add a buffer layout + * Adds a buffer layout. + * + * Returns pointer to buffer layout, NULL if error. */ struct t_gui_layout_buffer * @@ -150,7 +152,7 @@ gui_layout_buffer_add (struct t_gui_layout_buffer **layout_buffers, } /* - * gui_layout_buffer_get_number: get layout number for a plugin/buffer + * Gets layout number for a plugin/buffer. */ void @@ -190,7 +192,7 @@ gui_layout_buffer_get_number (struct t_gui_layout_buffer *layout_buffers, } /* - * gui_layout_buffer_get_number_all: get layout numbers for all buffers + * Gets layout numbers for all buffers. */ void @@ -213,7 +215,7 @@ gui_layout_buffer_get_number_all (struct t_gui_layout_buffer *layout_buffers) } /* - * gui_layout_buffer_save: save current layout for buffers + * Saves current layout for buffers. */ void @@ -241,7 +243,7 @@ gui_layout_buffer_save (struct t_gui_layout_buffer **layout_buffers, } /* - * gui_layout_buffer_apply: apply a layout for buffers + * Applies a layout for buffers. */ void @@ -292,7 +294,7 @@ gui_layout_buffer_apply (struct t_gui_layout_buffer *layout_buffers) } /* - * gui_layout_window_remove: remove a window layout + * Removes a window layout. */ void @@ -314,7 +316,7 @@ gui_layout_window_remove (struct t_gui_layout_window *layout_window) } /* - * gui_layout_window_remove_all: remove all window layouts + * Removes all window layouts. */ void @@ -328,7 +330,7 @@ gui_layout_window_remove_all (struct t_gui_layout_window **layout_windows) } /* - * gui_layout_window_reset: reset layout for windows + * Resets layout for windows. */ void @@ -354,8 +356,9 @@ gui_layout_window_reset (struct t_gui_layout_window **layout_windows) } /* - * gui_layout_window_search_by_id: search a layout window by internal id - * in a layout + * Searches for a window layout by internal id in a layout. + * + * Returns pointer to window layout found, NULL if not found. */ struct t_gui_layout_window * @@ -388,7 +391,9 @@ gui_layout_window_search_by_id (struct t_gui_layout_window *layout_windows, } /* - * gui_layout_window_add: add a window layout + * Adds a window layout. + * + * Returns pointer to new window layout, NULL if not found. */ struct t_gui_layout_window * @@ -432,7 +437,7 @@ gui_layout_window_add (struct t_gui_layout_window **layout_windows, } /* - * gui_layout_window_save_tree: save tree of windows + * Saves tree of windows. */ void @@ -477,8 +482,9 @@ gui_layout_window_save_tree (struct t_gui_layout_window **layout_windows, } /* - * gui_layout_window_save: save current layout for windows - * return internal id of current window + * Saves current layout for windows. + * + * Returns internal id of current window. */ int @@ -495,7 +501,7 @@ gui_layout_window_save (struct t_gui_layout_window **layout_windows) } /* - * gui_layout_window_check_buffer: check if buffer can be assigned to one window + * Checks if buffer can be assigned to one window. */ void @@ -520,9 +526,8 @@ gui_layout_window_check_buffer (struct t_gui_buffer *buffer) } /* - * gui_layout_window_check_all_buffers: for each window, check if another - * buffer should be assigned, and if yes, - * assign it + * For each window, checks if another buffer should be assigned, and if yes, + * assigns it. */ void @@ -550,8 +555,8 @@ gui_layout_window_check_all_buffers () } /* - * gui_layout_window_apply_tree: apply tree windows (resplit screen according - * to windows tree and assing buffer to windows) + * Applies tree windows (re-splits screen according to windows tree and assigns + * buffer to windows). */ void @@ -601,7 +606,7 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window, } /* - * gui_layout_window_apply: apply current layout for windows + * Applies current layout for windows. */ void @@ -628,8 +633,7 @@ gui_layout_window_apply (struct t_gui_layout_window *layout_windows, } /* - * gui_layout_save_on_exit: save layout according to option - * "save_layout_on_exit" + * Saves layout according to option "save_layout_on_exit". */ void @@ -654,8 +658,11 @@ gui_layout_save_on_exit () } /* - * gui_layout_buffer_add_to_infolist: add a buffer layout in an infolist - * return 1 if ok, 0 if error + * Adds a buffer layout in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -682,8 +689,11 @@ gui_layout_buffer_add_to_infolist (struct t_infolist *infolist, } /* - * gui_layout_window_add_to_infolist: add a window layout in an infolist - * return 1 if ok, 0 if error + * Adds a window layout in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -724,8 +734,7 @@ gui_layout_window_add_to_infolist (struct t_infolist *infolist, } /* - * gui_layout_print_log_window: print windows layout infos in log (usually for - * crash dump) + * Prints windows layout infos in WeeChat log file (usually for crash dump). */ void @@ -755,7 +764,7 @@ gui_layout_print_log_window (struct t_gui_layout_window *layout_window, } /* - * gui_layout_print_log: print layout infos in log (usually for crash dump) + * Prints layout infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 19fed22ac..c0e6c46e1 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -50,7 +50,9 @@ /* - * gui_lines_alloc: alloc structure "t_gui_lines" and initialize it + * Allocates structure "t_gui_lines" and initializes it. + * + * Returns pointer to new lines, NULL if error. */ struct t_gui_lines * @@ -75,7 +77,7 @@ gui_lines_alloc () } /* - * gui_lines_free: free a "t_gui_lines" structure + * Frees a "t_gui_lines" structure. */ void @@ -85,9 +87,11 @@ gui_lines_free (struct t_gui_lines *lines) } /* - * gui_line_prefix_is_same_nick_as_previous: return 1 if prefix on line is a - * nick and is the same as nick on - * previour line, otherwise 0 + * Checks if prefix on line is a nick and is the same as nick on previous line. + * + * Returns: + * 1: prefix is a nick and same as nick on previous line + * 0: prefix is not a nick, or different from nick on previous line */ int @@ -137,12 +141,11 @@ gui_line_prefix_is_same_nick_as_previous (struct t_gui_line *line) } /* - * gui_line_get_prefix_for_display: get prefix and its length (for display only) - * if the prefix can be hidden (same nick as - * previous message), and if the option is - * enabled (not empty string), then this - * this function will return empty prefix or - * prefix from option + * Gets prefix and its length (for display only). + * + * If the prefix can be hidden (same nick as previous message), and if the + * option is enabled (not empty string), then returns empty prefix or prefix + * from option. */ void @@ -195,7 +198,7 @@ gui_line_get_prefix_for_display (struct t_gui_line *line, } /* - * gui_line_get_align: get alignment for a line + * Gets alignment for a line. */ int @@ -276,8 +279,11 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line, } /* - * gui_line_is_displayed: return 1 if line is displayed (no filter on line, - * or filters disabled), 0 if line is hidden + * Checks if a line is displayed (no filter on line or filters disabled). + * + * Returns: + * 1: line is displayed + * 0: line is hidden */ int @@ -292,7 +298,9 @@ gui_line_is_displayed (struct t_gui_line *line) } /* - * gui_line_get_first_displayed: get first line displayed of a buffer + * Gets the first line displayed of a buffer. + * + * Returns pointer to first line displayed, NULL if not found. */ struct t_gui_line * @@ -310,7 +318,9 @@ gui_line_get_first_displayed (struct t_gui_buffer *buffer) } /* - * gui_line_get_last_displayed: get last line displayed of a buffer + * Gets the last line displayed of a buffer. + * + * Returns pointer to last line displayed, NULL if not found. */ struct t_gui_line * @@ -328,7 +338,9 @@ gui_line_get_last_displayed (struct t_gui_buffer *buffer) } /* - * gui_line_get_prev_displayed: get previous line displayed + * Gets previous line displayed. + * + * Returns pointer to previous line displayed, NULL if not found. */ struct t_gui_line * @@ -346,7 +358,9 @@ gui_line_get_prev_displayed (struct t_gui_line *line) } /* - * gui_line_get_next_displayed: get next line displayed + * Gets next line displayed. + * + * Returns pointer to next line displayed, NULL if not found. */ struct t_gui_line * @@ -364,7 +378,11 @@ gui_line_get_next_displayed (struct t_gui_line *line) } /* - * gui_line_search_text: search for text in a line + * Searches for text in a line. + * + * Returns: + * 1: text found in line + * 0: text not found in line */ int @@ -407,8 +425,11 @@ gui_line_search_text (struct t_gui_line *line, const char *text, } /* - * gui_line_match_regex: return 1 if message matches regex - * 0 if it doesn't match + * Checks if a line matches regex. + * + * Returns: + * 1: line matches regex + * 0: line does not match regex */ int @@ -462,8 +483,11 @@ gui_line_match_regex (struct t_gui_line *line, regex_t *regex_prefix, } /* - * gui_line_match_tags: return 1 if line matches tags - * 0 if it doesn't match any tag in array + * Checks if line matches tags. + * + * Returns: + * 1: line matches tags + * 0: line does not match tags */ int @@ -494,8 +518,7 @@ gui_line_match_tags (struct t_gui_line *line, int tags_count, } /* - * gui_line_search_tag_starting_with: return pointer on tag starting with "tag", - * NULL if such tag is not found + * Returns pointer on tag starting with "tag", NULL if such tag is not found. */ const char * @@ -519,8 +542,7 @@ gui_line_search_tag_starting_with (struct t_gui_line *line, const char *tag) } /* - * gui_line_get_nick_tag: get nick in tags: return "xxx" if tag "nick_xxx" - * is found + * Gets nick in tags: returns "xxx" if tag "nick_xxx" is found. */ const char * @@ -536,8 +558,12 @@ gui_line_get_nick_tag (struct t_gui_line *line) } /* - * gui_line_has_highlight: return 1 if given message contains highlight (with - * a string in global highlight or buffer highlight) + * Checks if a line has highlight (with a string in global highlight or buffer + * highlight). + * + * Returns: + * 1: line has highlight + * 0: line has no highlight */ int @@ -634,8 +660,11 @@ gui_line_has_highlight (struct t_gui_line *line) } /* - * gui_line_has_offline_nick: return 1 if nick of line is offline - * (not in nicklist any more) + * Checks if nick of line is offline (not in nicklist any more). + * + * Returns: + * 1: nick is offline + * 0: nick is still there (in nicklist) */ int @@ -660,8 +689,7 @@ gui_line_has_offline_nick (struct t_gui_line *line) } /* - * gui_line_compute_buffer_max_length: compute "buffer_max_length" for a - * "t_gui_lines" structure + * Computes "buffer_max_length" for a "t_gui_lines" structure. */ void @@ -687,8 +715,7 @@ gui_line_compute_buffer_max_length (struct t_gui_buffer *buffer, } /* - * gui_line_compute_prefix_max_length: compute "prefix_max_length" for a - * "t_gui_lines" structure + * Computes "prefix_max_length" for a "t_gui_lines" structure. */ void @@ -708,7 +735,7 @@ gui_line_compute_prefix_max_length (struct t_gui_lines *lines) } /* - * gui_line_add_to_list: add a line to a "t_gui_lines" structure + * Adds a line to a "t_gui_lines" structure. */ void @@ -734,7 +761,7 @@ gui_line_add_to_list (struct t_gui_lines *lines, } /* - * gui_line_remove_from_list: remove a line from a "t_gui_lines" structure + * Removes a line from a "t_gui_lines" structure. */ void @@ -817,7 +844,7 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer, } /* - * gui_line_mixed_add: add line to mixed lines for a buffer + * Adds line to mixed lines for a buffer. */ void @@ -835,7 +862,7 @@ gui_line_mixed_add (struct t_gui_lines *lines, } /* - * gui_line_mixed_free_buffer: free all mixed lines matching a buffer + * Frees all mixed lines matching a buffer. */ void @@ -864,7 +891,7 @@ gui_line_mixed_free_buffer (struct t_gui_buffer *buffer) } /* - * gui_line_mixed_free_all: free all mixed lines in a buffer + * Frees all mixed lines in a buffer. */ void @@ -883,7 +910,7 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer) } /* - * gui_line_free: delete a line from a buffer + * Deletes a line from a buffer. */ void @@ -913,7 +940,7 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line) } /* - * gui_line_free_all: delete all formatted lines from a buffer + * Deletes all formatted lines from a buffer. */ void @@ -926,9 +953,10 @@ gui_line_free_all (struct t_gui_buffer *buffer) } /* - * gui_line_get_notify_level: get notify level for a line - * return -1 if "notify_none" is found (no notify - * for line) + * Gets notify level for a line. + * + * Returns notify level of line, -1 if tag "notify_none" is found (meaning no + * notify at all for line). */ int @@ -951,7 +979,7 @@ gui_line_get_notify_level (struct t_gui_line *line) } /* - * gui_line_add: add a new line for a buffer + * Adds a new line for a buffer. */ struct t_gui_line * @@ -1128,7 +1156,7 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date, } /* - * gui_line_add_y: add or update a line for a buffer with free content + * Adds or updates a line for a buffer with free content. */ void @@ -1227,8 +1255,7 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message) } /* - * gui_line_clear: clear prefix and message on a line - * (used on buffers with free content only) + * Clears prefix and message on a line (used on buffers with free content only). */ void @@ -1244,8 +1271,7 @@ gui_line_clear (struct t_gui_line *line) } /* - * gui_line_mix_buffers: mix lines of a buffer (or group of buffers) with a new - * buffer + * Mixes lines of a buffer (or group of buffers) with a new buffer. */ void @@ -1340,7 +1366,7 @@ gui_line_mix_buffers (struct t_gui_buffer *buffer) } /* - * gui_line_hdata_lines_cb: return hdata for lines + * Returns hdata for lines. */ struct t_hdata * @@ -1367,7 +1393,7 @@ gui_line_hdata_lines_cb (void *data, const char *hdata_name) } /* - * gui_line_hdata_line_cb: return hdata for line + * Returns hdata for line. */ struct t_hdata * @@ -1390,7 +1416,7 @@ gui_line_hdata_line_cb (void *data, const char *hdata_name) } /* - * gui_line_hdata_line_data_update_cb: callback for updating data of a line + * Callback for updating data of a line. */ int @@ -1474,7 +1500,7 @@ gui_line_hdata_line_data_update_cb (void *data, } /* - * gui_line_hdata_line_data_cb: return hdata for line data + * Returns hdata for line data. */ struct t_hdata * @@ -1507,8 +1533,11 @@ gui_line_hdata_line_data_cb (void *data, const char *hdata_name) } /* - * gui_line_add_to_infolist: add a line in an infolist - * return 1 if ok, 0 if error + * Adds a line in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1581,7 +1610,7 @@ gui_line_add_to_infolist (struct t_infolist *infolist, } /* - * gui_lines_print_log: print lines structure infos in log (usually for crash dump) + * Prints lines structure infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-mouse.c b/src/gui/gui-mouse.c index dd0f75c6b..a2fa2f71e 100644 --- a/src/gui/gui-mouse.c +++ b/src/gui/gui-mouse.c @@ -49,7 +49,7 @@ char gui_mouse_event_button = '#'; /* button pressed (or wheel) */ /* - * gui_mouse_debug_set: set debug for mouse events + * Sets debug for mouse events. */ void @@ -67,7 +67,7 @@ gui_mouse_debug_set (int debug) } /* - * gui_mouse_event_reset: reset event values + * Resets event values. */ void diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index ba6e32c0c..b2181397a 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -50,8 +50,7 @@ /* - * gui_nicklist_send_signal: send a signal when something has changed in - * nicklist + * Sends a signal when something has changed in nicklist. */ void @@ -83,7 +82,7 @@ gui_nicklist_send_signal (const char *signal, struct t_gui_buffer *buffer, } /* - * gui_nicklist_find_pos_group: find position for a group (for sorting nicklist) + * Searches for position of a group (to keep nicklist sorted). */ struct t_gui_nick_group * @@ -103,7 +102,7 @@ gui_nicklist_find_pos_group (struct t_gui_nick_group *groups, } /* - * gui_nicklist_insert_group_sorted: insert group into sorted list + * Inserts group into sorted list. */ void @@ -147,7 +146,9 @@ gui_nicklist_insert_group_sorted (struct t_gui_nick_group **groups, } /* - * gui_nicklist_search_group_internal: search a group in buffer nicklist + * Searches for a group in nicklist (this function must not be called directly). + * + * Returns pointer to group found, NULL if not found. */ struct t_gui_nick_group * @@ -193,7 +194,9 @@ gui_nicklist_search_group_internal (struct t_gui_buffer *buffer, } /* - * gui_nicklist_search_group: search a group in buffer nicklist + * Searches for a group in nicklist. + * + * Returns pointer to group found, NULL if not found. */ struct t_gui_nick_group * @@ -210,7 +213,9 @@ gui_nicklist_search_group (struct t_gui_buffer *buffer, } /* - * gui_nicklist_add_group: add a group to nicklist for a buffer + * Adds a group to nicklist. + * + * Returns pointer to new group, NULL if error. */ struct t_gui_nick_group * @@ -259,7 +264,7 @@ gui_nicklist_add_group (struct t_gui_buffer *buffer, } /* - * gui_nicklist_find_pos_nick: find position for a nick (for sorting nicklist) + * Searches for position of a nick (to keep nicklist sorted). */ struct t_gui_nick * @@ -282,7 +287,7 @@ gui_nicklist_find_pos_nick (struct t_gui_nick_group *group, } /* - * gui_nicklist_insert_nick_sorted: insert nick into sorted list + * Inserts nick into sorted list. */ void @@ -325,7 +330,9 @@ gui_nicklist_insert_nick_sorted (struct t_gui_nick_group *group, } /* - * gui_nicklist_search_nick: search a nick in buffer nicklist + * Searches for a nick in nicklist. + * + * Returns pointer to nick found, NULL if not found. */ struct t_gui_nick * @@ -374,7 +381,9 @@ gui_nicklist_search_nick (struct t_gui_buffer *buffer, } /* - * gui_nicklist_add_nick: add a nick to nicklist for a buffer + * Adds a nick to nicklist. + * + * Returns pointer to new nick, NULL if error. */ struct t_gui_nick * @@ -414,7 +423,7 @@ gui_nicklist_add_nick (struct t_gui_buffer *buffer, } /* - * gui_nicklist_remove_nick: remove a nick from a group + * Removes a nick from a group. */ void @@ -466,7 +475,7 @@ gui_nicklist_remove_nick (struct t_gui_buffer *buffer, } /* - * gui_nicklist_remove_group: remove a group from nicklist + * Removes a group from nicklist. */ void @@ -531,7 +540,7 @@ gui_nicklist_remove_group (struct t_gui_buffer *buffer, } /* - * gui_nicklist_remove_all: remove all nicks in nicklist + * Removes all nicks in nicklist. */ void @@ -548,7 +557,7 @@ gui_nicklist_remove_all (struct t_gui_buffer *buffer) } /* - * gui_nicklist_get_next_item: get next item (group or nick) of a group/nick + * Gets next item (group or nick) of a group/nick. */ void @@ -621,10 +630,10 @@ gui_nicklist_get_next_item (struct t_gui_buffer *buffer, } /* - * gui_nicklist_get_group_start: return first char of a group that will be - * displayed on screen: if name begins with - * some digits followed by '|', then start is - * after '|', otherwise it's beginning of name + * Returns first char of a group that will be displayed on screen. + * + * If name begins with some digits followed by '|', then start is after '|', + * otherwise it's beginning of name. */ const char * @@ -646,7 +655,7 @@ gui_nicklist_get_group_start (const char *name) } /* - * gui_nicklist_get_max_length: return longer nickname on a buffer + * Returns longer nickname in the nicklist. */ int @@ -695,8 +704,7 @@ gui_nicklist_get_max_length (struct t_gui_buffer *buffer, } /* - * gui_nicklist_compute_visible_count: compute visible_count variable for a - * buffer + * Computes visible_count variable for a nicklist. */ void @@ -728,7 +736,7 @@ gui_nicklist_compute_visible_count (struct t_gui_buffer *buffer, } /* - * gui_nicklist_group_get_integer: get a group property as integer + * Gets a group property as integer. */ int @@ -751,7 +759,7 @@ gui_nicklist_group_get_integer (struct t_gui_buffer *buffer, } /* - * gui_nicklist_group_get_string: get a group property as string + * Gets a group property as string. */ const char * @@ -774,7 +782,7 @@ gui_nicklist_group_get_string (struct t_gui_buffer *buffer, } /* - * gui_nicklist_group_get_pointer: get a group property as pointer + * Gets a group property as pointer. */ void * @@ -795,7 +803,7 @@ gui_nicklist_group_get_pointer (struct t_gui_buffer *buffer, } /* - * gui_nicklist_group_set: set a group property (string) + * Sets a group property (string). */ void @@ -836,7 +844,7 @@ gui_nicklist_group_set (struct t_gui_buffer *buffer, } /* - * gui_nicklist_nick_get_integer: get a nick property as integer + * Gets a nick property as integer. */ int @@ -857,7 +865,7 @@ gui_nicklist_nick_get_integer (struct t_gui_buffer *buffer, } /* - * gui_nicklist_nick_get_string: get a nick property as string + * Gets a nick property as string. */ const char * @@ -884,7 +892,7 @@ gui_nicklist_nick_get_string (struct t_gui_buffer *buffer, } /* - * gui_nicklist_nick_get_pointer: get a nick property as pointer + * Gets a nick property as pointer. */ void * @@ -905,7 +913,7 @@ gui_nicklist_nick_get_pointer (struct t_gui_buffer *buffer, } /* - * gui_nicklist_nick_set: set a nick property (string) + * Sets a nick property (string). */ void @@ -960,7 +968,7 @@ gui_nicklist_nick_set (struct t_gui_buffer *buffer, } /* - * gui_nicklist_hdata_nick_group_cb: return hdata for nick_group + * Returns hdata for nick_group. */ struct t_hdata * @@ -991,7 +999,7 @@ gui_nicklist_hdata_nick_group_cb (void *data, const char *hdata_name) } /* - * gui_nicklist_hdata_nick_cb: return hdata for nick + * Returns hdata for nick. */ struct t_hdata * @@ -1019,8 +1027,11 @@ gui_nicklist_hdata_nick_cb (void *data, const char *hdata_name) } /* - * gui_nicklist_add_group_to_infolist: add a group in an infolist - * return 1 if ok, 0 if error + * Adds a group in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1056,8 +1067,11 @@ gui_nicklist_add_group_to_infolist (struct t_infolist *infolist, } /* - * gui_nicklist_add_nick_to_infolist: add a nick in an infolist - * return 1 if ok, 0 if error + * Adds a nick in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1095,8 +1109,11 @@ gui_nicklist_add_nick_to_infolist (struct t_infolist *infolist, } /* - * gui_nicklist_add_to_infolist: add a nicklist in an infolist - * return 1 if ok, 0 if error + * Adds a nicklist in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1145,7 +1162,7 @@ gui_nicklist_add_to_infolist (struct t_infolist *infolist, } /* - * gui_nicklist_print_log: print nicklist infos in log (usually for crash dump) + * Prints nicklist infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 31ee5cc9a..14e59e16a 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -75,7 +75,9 @@ int gui_window_cursor_y = 0; /* cursor pos on screen */ /* - * gui_window_search_by_number: search a window by number + * Searches for a window by number. + * + * Returns pointer to window found, NULL if error. */ struct t_gui_window * @@ -94,8 +96,9 @@ gui_window_search_by_number (int number) } /* - * gui_window_search_by_xy: get pointer of window displayed at (x,y) - * return NULL if no window is found + * Gets pointer of window displayed at (x,y). + * + * Return pointer to window found, NULL if not found. */ struct t_gui_window * @@ -119,13 +122,13 @@ gui_window_search_by_xy (int x, int y) } /* - * gui_window_get_context_at_xy: return following info: - * - chat (0/1) - * - line - * - x in line - * - word at (x,y) - * - beginning of line until (x,y) - * - (x,y) until end of line + * Returns following info: + * - chat (0/1) + * - line + * - x in line + * - word at (x,y) + * - beginning of line until (x,y) + * - (x,y) until end of line. */ void @@ -265,7 +268,7 @@ gui_window_get_context_at_xy (struct t_gui_window *window, } /* - * gui_window_ask_refresh: set "gui_window_refresh_needed" flag + * Sets flag "gui_window_refresh_needed". */ void @@ -276,7 +279,11 @@ gui_window_ask_refresh (int refresh) } /* - * gui_window_tree_init: create first entry in windows tree + * Creates first entry in windows tree. + * + * Returns: + * 1: OK + * 0: error */ int @@ -295,8 +302,9 @@ gui_window_tree_init (struct t_gui_window *window) } /* - * gui_window_tree_node_to_leaf: convert a node to a leaf (free any leafs) - * Called when 2 windows are merging into one + * Converts a node to a leaf (free any leafs). + * + * Called when 2 windows are merging into one. */ void @@ -320,7 +328,7 @@ gui_window_tree_node_to_leaf (struct t_gui_window_tree *node, } /* - * gui_window_tree_free: delete entire windows tree + * Deletes entire windows tree. */ void @@ -338,7 +346,9 @@ gui_window_tree_free (struct t_gui_window_tree **tree) } /* - * gui_window_scroll_search: search a scroll with buffer pointer + * Searches for a scroll with buffer pointer. + * + * Returns pointer to window scroll, NULL if not found. */ struct t_gui_window_scroll * @@ -362,7 +372,7 @@ gui_window_scroll_search (struct t_gui_window *window, } /* - * gui_window_scroll_init: initialize a window scroll structure + * Initializes a window scroll structure. */ void @@ -382,7 +392,7 @@ gui_window_scroll_init (struct t_gui_window_scroll *window_scroll, } /* - * gui_window_scroll_free: free a scroll structure in a window + * Frees a scroll structure in a window. */ void @@ -400,7 +410,7 @@ gui_window_scroll_free (struct t_gui_window *window, } /* - * gui_window_scroll_free_all: free all scroll structures in a window + * Frees all scroll structures in a window. */ void @@ -413,11 +423,10 @@ gui_window_scroll_free_all (struct t_gui_window *window) } /* - * gui_window_scroll_remove_not_scrolled: remove all scroll structures which - * are empty (not scrolled) - * Note: the first scroll in list - * (current buffer) is NOT removed by - * this function. + * Removes all scroll structures which are empty (not scrolled). + * + * Note: the first scroll in list (current buffer) is NOT removed by this + * function. */ void @@ -449,7 +458,7 @@ gui_window_scroll_remove_not_scrolled (struct t_gui_window *window) } /* - * gui_window_scroll_switch: switch scroll to a buffer + * Switches scroll to a buffer. */ void @@ -496,7 +505,7 @@ gui_window_scroll_switch (struct t_gui_window *window, } /* - * gui_window_scroll_remove_buffer: remove buffer from scroll list in a window + * Removes buffer from scroll list in a window. */ void @@ -514,7 +523,9 @@ gui_window_scroll_remove_buffer (struct t_gui_window *window, } /* - * gui_window_new: create a new window + * Creates a new window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -663,9 +674,11 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer, } /* - * gui_window_valid: check if a buffer pointer exists - * return 1 if buffer exists - * 0 if buffer is not found + * Checks if a window pointer is valid. + * + * Returns: + * 1: window exists + * 0: window does not exist */ int @@ -688,13 +701,11 @@ gui_window_valid (struct t_gui_window *window) } /* - * gui_window_search_with_buffer: search window displaying a buffer - * return NULL if no window is displaying given - * buffer - * If many windows are displaying this buffer, - * the first window in list is returned (or - * current window if it is displaying this - * buffer) + * Searches for window displaying a buffer. + * + * Returns NULL if no window is displaying given buffer. + * If many windows are displaying this buffer, the first window in list is + * returned (or current window if it is displaying this buffer). */ struct t_gui_window * @@ -720,7 +731,7 @@ gui_window_search_with_buffer (struct t_gui_buffer *buffer) } /* - * gui_window_get_integer: get a window property as integer + * Gets a window property as integer. */ int @@ -762,7 +773,7 @@ gui_window_get_integer (struct t_gui_window *window, const char *property) } /* - * gui_window_get_string: get a window property as string + * Gets a window property as string. */ const char * @@ -776,7 +787,7 @@ gui_window_get_string (struct t_gui_window *window, const char *property) } /* - * gui_windowr_get_pointer: get a window property as pointer + * Gets a window property as pointer. */ void * @@ -798,7 +809,7 @@ gui_window_get_pointer (struct t_gui_window *window, const char *property) } /* - * gui_window_set_layout_plugin_name: set layout plugin name for window + * Sets layout plugin name for window. */ void @@ -816,7 +827,7 @@ gui_window_set_layout_plugin_name (struct t_gui_window *window, } /* - * gui_window_set_layout_buffer_name: set layout buffer name for window + * Sets layout buffer name for window. */ void @@ -834,7 +845,7 @@ gui_window_set_layout_buffer_name (struct t_gui_window *window, } /* - * gui_window_coords_init_line: initialize a line in window coordinates + * Initializes a line in window coordinates. */ void @@ -854,7 +865,7 @@ gui_window_coords_init_line (struct t_gui_window *window, int line) } /* - * gui_window_coords_alloc: allocate and initialize coordinates for window + * Allocates and initializes coordinates for window. */ void @@ -881,7 +892,7 @@ gui_window_coords_alloc (struct t_gui_window *window) } /* - * gui_window_free: delete a window + * Deletes a window. */ void @@ -955,7 +966,7 @@ gui_window_free (struct t_gui_window *window) } /* - * gui_window_switch_previous: switch to previous window + * Switches to previous window. */ void @@ -969,7 +980,7 @@ gui_window_switch_previous (struct t_gui_window *window) } /* - * gui_window_switch_next: switch to next window + * Switches to next window. */ void @@ -983,7 +994,7 @@ gui_window_switch_next (struct t_gui_window *window) } /* - * gui_window_switch_by_number: switch to window by number + * Switches to window by number. */ void @@ -1000,7 +1011,7 @@ gui_window_switch_by_number (int number) } /* - * gui_window_switch_by_buffer: switch to next window displaying a buffer + * Switches to next window displaying a buffer. */ void @@ -1024,7 +1035,7 @@ gui_window_switch_by_buffer (struct t_gui_window *window, int buffer_number) } /* - * gui_window_scroll: scroll window by # messages or time + * Scrolls window by a number of messages or time. */ void @@ -1257,7 +1268,7 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) } /* - * gui_window_scroll_horiz: horizontal scroll window + * Horizontally scrolls window. */ void @@ -1326,7 +1337,7 @@ gui_window_scroll_horiz (struct t_gui_window *window, char *scroll) } /* - * gui_window_scroll_previous_highlight: scroll to previous highlight + * Scrolls to previous highlight. */ void @@ -1361,7 +1372,7 @@ gui_window_scroll_previous_highlight (struct t_gui_window *window) } /* - * gui_window_scroll_next_highlight: scroll to next highlight + * Scrolls to next highlight. */ void @@ -1396,7 +1407,7 @@ gui_window_scroll_next_highlight (struct t_gui_window *window) } /* - * gui_window_scroll_unread: scroll to first unread line of buffer + * Scrolls to first unread line of buffer. */ void @@ -1429,8 +1440,11 @@ gui_window_scroll_unread (struct t_gui_window *window) } /* - * gui_window_search_text: search text in a buffer - * return 1 if line has been found with text, otherwise 0 + * Searches for text in a buffer. + * + * Returns: + * 1: line has been found with text + * 0: no line found with text */ int @@ -1492,7 +1506,7 @@ gui_window_search_text (struct t_gui_window *window) } /* - * gui_window_search_start: start search in a buffer + * Starts search in a buffer. */ void @@ -1513,8 +1527,7 @@ gui_window_search_start (struct t_gui_window *window) } /* - * gui_window_search_restart: restart search (after input changes or exact - * flag (un)set) + * Restarts search (after input changes or exact flag (un)set). */ void @@ -1538,7 +1551,7 @@ gui_window_search_restart (struct t_gui_window *window) } /* - * gui_window_search_stop: stop search in a buffer + * Stops search in a buffer. */ void @@ -1562,8 +1575,7 @@ gui_window_search_stop (struct t_gui_window *window) } /* - * gui_window_zoom: zoom window (maximize it or restore layout before previous - * zoom) + * Zooms window (maximize it or restore layout before previous zoom). */ void @@ -1598,7 +1610,7 @@ gui_window_zoom (struct t_gui_window *window) } /* - * gui_window_hdata_window_cb: return hdata for window + * Returns hdata for window. */ struct t_hdata * @@ -1645,7 +1657,7 @@ gui_window_hdata_window_cb (void *data, const char *hdata_name) } /* - * gui_window_hdata_window_scroll_cb: return hdata for window scroll + * Returns hdata for window scroll. */ struct t_hdata * @@ -1675,7 +1687,7 @@ gui_window_hdata_window_scroll_cb (void *data, const char *hdata_name) } /* - * gui_window_hdata_window_tree_cb: return hdata for window tree + * Returns hdata for window tree. */ struct t_hdata * @@ -1701,8 +1713,11 @@ gui_window_hdata_window_tree_cb (void *data, const char *hdata_name) } /* - * gui_window_add_to_infolist: add a window in an infolist - * return 1 if ok, 0 if error + * Adds a window in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1757,7 +1772,7 @@ gui_window_add_to_infolist (struct t_infolist *infolist, } /* - * gui_window_print_log: print window infos in log (usually for crash dump) + * Prints window infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/alias/alias-config.c b/src/plugins/alias/alias-config.c index 630981abc..d07d090dc 100644 --- a/src/plugins/alias/alias-config.c +++ b/src/plugins/alias/alias-config.c @@ -70,8 +70,7 @@ char *alias_default_list[][2] = /* - * alias_config_cmd_change_cb: callback called when alias option is modified - * in section "cmd" (command) + * Callback for changes on options in section "cmd" (command). */ void @@ -93,8 +92,7 @@ alias_config_cmd_change_cb (void *data, struct t_config_option *option) } /* - * alias_config_cmd_delete_cb: callback called when alias option is deleted - * in section "cmd" (command) + * Callback called when an option is deleted in section "cmd" (command). */ void @@ -119,8 +117,7 @@ alias_config_cmd_delete_cb (void *data, struct t_config_option *option) } /* - * alias_config_completion_change_cb: callback called when alias completion is - * modified in section "completion" + * Callback for changes on options in section "completion". */ void @@ -140,8 +137,7 @@ alias_config_completion_change_cb (void *data, struct t_config_option *option) } /* - * alias_config_completion_delete_cb: callback called when alias completion is - * deleted in section "completion" + * Callback called when an option is deleted in section "completion". */ void @@ -160,7 +156,7 @@ alias_config_completion_delete_cb (void *data, struct t_config_option *option) } /* - * alias_config_reload: reload alias configuration file + * Reloads alias configuration file. */ int @@ -177,8 +173,7 @@ alias_config_reload (void *data, struct t_config_file *config_file) } /* - * alias_config_cmd_write_default_cb: write default aliases in configuration - * file in section "cmd" (command) + * Writes default aliases in configuration file in section "cmd" (command). */ int @@ -206,7 +201,7 @@ alias_config_cmd_write_default_cb (void *data, } /* - * alias_config_cmd_new_option: create new option in section "cmd" (command) + * Creates a new option in section "cmd" (command). */ void @@ -221,8 +216,7 @@ alias_config_cmd_new_option (const char *name, const char *command) } /* - * alias_config_cmd_create_option_cb: create an alias in section "cmd" - * (command) + * Callback called when an option is created in section "cmd" (command). */ int @@ -239,7 +233,7 @@ alias_config_cmd_create_option_cb (void *data, (void) config_file; (void) section; - /* create config option */ + /* create configuration option */ alias_config_cmd_new_option (option_name, value); /* create alias */ @@ -264,7 +258,7 @@ alias_config_cmd_create_option_cb (void *data, } /* - * alias_config_completion_new_option: create new option in section "completion" + * Creates a new option in section "completion". */ void @@ -280,8 +274,7 @@ alias_config_completion_new_option (const char *name, const char *completion) } /* - * alias_config_completion_create_option_cb: create a completion for an alias - * in section "completion" + * Callback called when an option is created in section "completion". */ int @@ -309,7 +302,7 @@ alias_config_completion_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } - /* create config option */ + /* create configuration option */ alias_config_completion_new_option (option_name, value); /* create/update completion in alias */ @@ -319,8 +312,11 @@ alias_config_completion_create_option_cb (void *data, } /* - * alias_config_init: init alias configuration file - * return: 1 if ok, 0 if error + * Initializes alias configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -367,7 +363,7 @@ alias_config_init () } /* - * alias_config_read: read alias configuration file + * Reads alias configuration file. */ int @@ -377,7 +373,7 @@ alias_config_read () } /* - * alias_config_write: write alias configuration file + * Writes alias configuration file. */ int diff --git a/src/plugins/alias/alias-info.c b/src/plugins/alias/alias-info.c index 405491cee..1244c65d9 100644 --- a/src/plugins/alias/alias-info.c +++ b/src/plugins/alias/alias-info.c @@ -28,7 +28,7 @@ /* - * alias_info_get_infolist_cb: callback called when alias infolist is asked + * Returns infolist with alias info. */ struct t_infolist * @@ -88,13 +88,12 @@ alias_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * alias_info_init: initialize info and infolist hooks for alias plugin + * Hooks infolist for alias plugin. */ void alias_info_init () { - /* alias infolist hooks */ weechat_hook_infolist ("alias", N_("list of aliases"), N_("alias pointer (optional)"), N_("alias name (can start or end with \"*\" as wildcard) (optional)"), diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 108426b1f..c319383fe 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -47,9 +47,11 @@ struct t_alias *last_alias = NULL; /* - * alias_valid: check if an alias pointer exists - * return 1 if alias exists - * 0 if alias is not found + * Checks if an alias pointer is valid. + * + * Returns: + * 1: alias exists + * 0; alias does not exist */ int @@ -72,7 +74,9 @@ alias_valid (struct t_alias *alias) } /* - * alias_search: search an alias + * Searches for an alias by name. + * + * Returns pointer to alias found, NULL if not found. */ struct t_alias * @@ -90,7 +94,7 @@ alias_search (const char *alias_name) } /* - * alias_string_add_word: add word to string and increment length + * Adds a word to string and increments length. */ void @@ -130,8 +134,7 @@ alias_string_add_word (char **alias, int *length, const char *word) } /* - * alias_string_add_word_range: add word (in range) to string and increment - * length + * Adds word (in range) to string and increments length. */ void @@ -149,8 +152,7 @@ alias_string_add_word_range (char **alias, int *length, const char *start, } /* - * alias_string_add_arguments: add some arguments to string and increment - * length + * Adds some arguments to string and increments length. */ void @@ -168,15 +170,15 @@ alias_string_add_arguments (char **alias, int *length, char **argv, int start, } /* - * alias_replace_args: replace arguments in alias - * arguments are: - * $n argument n - * $-m arguments from 1 to m - * $n- arguments from n to last - * $n-m arguments from n to m - * $* all arguments - * $~ last argument - * with n and m in 1..9 + * Replaces arguments in alias. + * + * Arguments replaced are (n and m in 1..9): + * $n argument n + * $-m arguments from 1 to m + * $n- arguments from n to last + * $n-m arguments from n to m + * $* all arguments + * $~ last argument */ char * @@ -298,8 +300,7 @@ alias_replace_args (const char *alias_args, const char *user_args) } /* - * alias_run_command: replace local buffer variables in string, then run - * command on buffer + * Replaces local buffer variables in string, then runs command on buffer. */ void @@ -330,7 +331,7 @@ alias_run_command (struct t_gui_buffer **buffer, const char *command) } /* - * alias_cb: callback for alias (called when user uses an alias) + * Callback for alias: called when user uses an alias. */ int @@ -433,7 +434,7 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, } /* - * alias_free: free an alias and remove it from list + * Frees an alias and remove it from list. */ void @@ -469,7 +470,7 @@ alias_free (struct t_alias *alias) } /* - * alias_free_all: free all alias + * Frees all aliases. */ void @@ -482,7 +483,7 @@ alias_free_all () } /* - * alias_find_pos: find position for an alias (for sorting aliases) + * Searches for position of alias (to keep aliases sorted by name). */ struct t_alias * @@ -501,8 +502,7 @@ alias_find_pos (const char *name) } /* - * alias_hook_command: call weehat_hook_command() for an alias and store result - * in variable "hook" of alias + * Hooks command for an alias. */ void @@ -552,7 +552,7 @@ alias_hook_command (struct t_alias *alias) } /* - * alias_update_completion: update completion for an alias + * Updates completion for an alias. */ void @@ -570,7 +570,9 @@ alias_update_completion (struct t_alias *alias, const char *completion) } /* - * alias_new: create new alias and add it to alias list + * Creates a new alias and adds it to alias list. + * + * Returns pointer to new alias, NULL if error. */ struct t_alias * @@ -637,7 +639,7 @@ alias_new (const char *name, const char *command, const char *completion) } /* - * alias_get_final_command: get final command pointed by an alias + * Gets final command pointer by an alias. */ char * @@ -670,7 +672,7 @@ alias_get_final_command (struct t_alias *alias) } /* - * alias_command_cb: display or create alias + * Callback for command "/alias": displays or creates alias. */ int @@ -719,7 +721,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_OK; } - /* create config option for command */ + /* create configuration option for command */ ptr_option = weechat_config_search_option (alias_config_file, alias_config_section_cmd, ptr_alias_name); @@ -727,7 +729,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, weechat_config_option_free (ptr_option); alias_config_cmd_new_option (ptr_alias_name, ptr_command); - /* create config option for completion */ + /* create configuration option for completion */ ptr_option = weechat_config_search_option (alias_config_file, alias_config_section_completion, ptr_alias_name); @@ -800,7 +802,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * unalias_command_cb: remove an alias + * Callback for command "/unalias": removes an alias. */ int @@ -858,7 +860,7 @@ unalias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * alias_completion_cb: callback for completion with list of aliases + * Adds list of aliases to completion list. */ int @@ -884,7 +886,7 @@ alias_completion_cb (void *data, const char *completion_item, } /* - * alias_value_completion_cb: callback for completion with value of an alias + * Adds value of an alias to completion list. */ int @@ -928,8 +930,11 @@ alias_value_completion_cb (void *data, const char *completion_item, } /* - * alias_add_to_infolist: add an alias in an infolist - * return 1 if ok, 0 if error + * Adds an alias in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -959,7 +964,7 @@ alias_add_to_infolist (struct t_infolist *infolist, struct t_alias *alias) } /* - * weechat_plugin_init: initialize alias plugin + * Initializes alias plugin. */ int @@ -1037,7 +1042,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end alias plugin + * Ends alias plugin. */ int diff --git a/src/plugins/aspell/weechat-aspell-bar-item.c b/src/plugins/aspell/weechat-aspell-bar-item.c index 528eb154a..db968b6cb 100644 --- a/src/plugins/aspell/weechat-aspell-bar-item.c +++ b/src/plugins/aspell/weechat-aspell-bar-item.c @@ -31,8 +31,8 @@ /* - * weechat_aspell_bar_item_dict: bar item with aspell dictionary used on - * current buffer + * Returns content of bar item "aspell_dict": aspell dictionary used on current + * buffer. */ char * @@ -61,7 +61,7 @@ weechat_aspell_bar_item_dict (void *data, struct t_gui_bar_item *item, } /* - * weechat_aspell_bar_item_suggest: bar item with aspell suggestions + * Returns content of bar item "aspell_suggest": aspell suggestions. */ char * @@ -104,7 +104,7 @@ weechat_aspell_bar_item_suggest (void *data, struct t_gui_bar_item *item, } /* - * weechat_aspell_bar_item_init: initialize aspell bar items + * Initializes aspell bar items. */ void diff --git a/src/plugins/aspell/weechat-aspell-config.c b/src/plugins/aspell/weechat-aspell-config.c index b710f1e95..68c356eb1 100644 --- a/src/plugins/aspell/weechat-aspell-config.c +++ b/src/plugins/aspell/weechat-aspell-config.c @@ -56,8 +56,7 @@ int *weechat_aspell_length_commands_to_check = NULL; /* - * weechat_aspell_config_change_commands: called when list of commands is - * changed + * Callback for changes on option "aspell.check.commands". */ void @@ -102,8 +101,7 @@ weechat_aspell_config_change_commands (void *data, } /* - * weechat_aspell_config_change_default_dict: called when default dictionary - * is changed + * Callback for changes on option "aspell.check.default_dict". */ void @@ -118,7 +116,7 @@ weechat_aspell_config_change_default_dict (void *data, } /* - * weechat_aspell_config_change_enabled: called when aspell state is changed + * Callback for changes on option "aspell.check.enabled". */ void @@ -135,8 +133,7 @@ weechat_aspell_config_change_enabled (void *data, struct t_config_option *option } /* - * weechat_aspell_config_change_suggestions: called when number of suggestions - * is changed + * Callback for changes on option "aspell.check.suggestions". */ void @@ -151,7 +148,7 @@ weechat_aspell_config_change_suggestions (void *data, } /* - * weechat_aspell_config_dict_change: called when a dictionary is changed + * Callback for changes on a dictionary. */ void @@ -166,7 +163,7 @@ weechat_aspell_config_dict_change (void *data, } /* - * weechat_aspell_config_dict_delete_option: delete option in "dict" section + * Callback called when an option is deleted in section "dict". */ int @@ -188,7 +185,7 @@ weechat_aspell_config_dict_delete_option (void *data, } /* - * weechat_aspell_config_dict_create_option: create option in "dict" section + * Creates an option in section "dict". */ int @@ -257,7 +254,7 @@ weechat_aspell_config_dict_create_option (void *data, } /* - * weechat_aspell_config_option_change: called when an aspell option is changed + * Callback for changes on an aspell option. */ void @@ -273,7 +270,7 @@ weechat_aspell_config_option_change (void *data, } /* - * weechat_aspell_config_option_delete_option: delete option in "option" section + * Callback called when an option is deleted in section "option". */ int @@ -296,7 +293,7 @@ weechat_aspell_config_option_delete_option (void *data, } /* - * weechat_aspell_config_option_create_option: create option in "option" section + * Callback called when an option is created in section "option". */ int @@ -366,7 +363,7 @@ weechat_aspell_config_option_create_option (void *data, } /* - * weechat_aspell_config_get_dict: get a dictionary list for a buffer + * Gets a list of dictionaries for a buffer. */ struct t_config_option * @@ -378,7 +375,7 @@ weechat_aspell_config_get_dict (const char *name) } /* - * weechat_aspell_config_set_dict: set a dictionary list for a buffer + * Sets a list of dictionaries for a buffer. */ int @@ -392,8 +389,11 @@ weechat_aspell_config_set_dict (const char *name, const char *value) } /* - * weechat_aspell_config_init: init aspell configuration file - * return: 1 if ok, 0 if error + * Initializes aspell configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -519,7 +519,7 @@ weechat_aspell_config_init () } /* - * weechat_aspell_config_read: read aspell configuration file + * Reads aspell configuration file. */ int @@ -538,7 +538,7 @@ weechat_aspell_config_read () } /* - * weechat_aspell_config_write: write aspell configuration file + * Writes aspell configuration file. */ int @@ -548,7 +548,7 @@ weechat_aspell_config_write () } /* - * aspell_config_free: free aspell configuration + * Frees aspell configuration. */ void diff --git a/src/plugins/aspell/weechat-aspell-speller.c b/src/plugins/aspell/weechat-aspell-speller.c index 15e7e54cc..b295bd2ec 100644 --- a/src/plugins/aspell/weechat-aspell-speller.c +++ b/src/plugins/aspell/weechat-aspell-speller.c @@ -35,8 +35,11 @@ struct t_aspell_speller *last_weechat_aspell_speller = NULL; /* - * weechat_aspell_speller_exists: return 1 if an aspell dict exists for a lang, - * 0 otherwise + * Checks if an aspell dictionary exists for a lang. + * + * Returns: + * 1: aspell dict exists for the lang + * 0: aspell dict does not exist for the lang */ int @@ -70,9 +73,10 @@ weechat_aspell_speller_exists (const char *lang) } /* - * weechat_aspell_speller_check_dictionaries: check dictionaries (called when - * user creates/changes dictionaries - * for a buffer) + * Checks if dictionaries are valid (called when user creates/changes + * dictionaries for a buffer). + * + * An error is displayed for each invalid dictionary found. */ void @@ -102,7 +106,9 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list) } /* - * weechat_aspell_speller_search: search a speller + * Searches for a speller by lang. + * + * Returns pointer to speller found, NULL if not found. */ struct t_aspell_speller * @@ -122,7 +128,9 @@ weechat_aspell_speller_search (const char *lang) } /* - * weechat_aspell_speller_new: create and add a new speller instance + * Creates and adds a new speller instance. + * + * Returns pointer to new speller, NULL if error. */ struct t_aspell_speller * @@ -195,14 +203,14 @@ weechat_aspell_speller_new (const char *lang) weechat_aspell_spellers = new_speller; last_weechat_aspell_speller = new_speller; - /* free config */ + /* free configuration */ delete_aspell_config (config); return new_speller; } /* - * weechat_aspell_speller_free: remove a speller instance + * Removes a speller instance. */ void @@ -241,7 +249,7 @@ weechat_aspell_speller_free (struct t_aspell_speller *speller) } /* - * weechat_aspell_speller_free_all: free all spellers + * Frees all spellers. */ void diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c index cab034910..85cb228d7 100644 --- a/src/plugins/aspell/weechat-aspell.c +++ b/src/plugins/aspell/weechat-aspell.c @@ -175,7 +175,9 @@ char *aspell_url_prefix[] = /* - * weechat_aspell_build_option_name: build option name with a buffer + * Builds full name of buffer. + * + * Note: result must be freed after use. */ char * @@ -202,9 +204,10 @@ weechat_aspell_build_option_name (struct t_gui_buffer *buffer) } /* - * weechat_aspell_get_dict: get dictionary list for a buffer - * we first try with all arguments, then remove one by - * one to find dict (from specific to general dict) + * Gets dictionary list for a buffer. + * + * First tries with all arguments, then removes one by one to find dict (from + * specific to general dict). */ const char * @@ -259,7 +262,7 @@ weechat_aspell_get_dict (struct t_gui_buffer *buffer) } /* - * weechat_aspell_set_dict: set a dictionary list for a buffer + * Sets a list of dictionaries for a buffer. */ void @@ -285,9 +288,11 @@ weechat_aspell_set_dict (struct t_gui_buffer *buffer, const char *value) } /* - * weechat_aspell_spellers_already_ok: check if current spellers are already ok - * return 1 if already ok, 0 if spellers - * must be free then created again + * Checks if current spellers are already OK. + * + * Returns: + * 1: already OK + * 0: spellers must be changed */ int @@ -332,7 +337,7 @@ weechat_aspell_spellers_already_ok (const char *dict_list) } /* - * weechat_aspell_create_spellers: create spellers for a buffer + * Creates spellers for a buffer. */ void @@ -366,9 +371,9 @@ weechat_aspell_create_spellers (struct t_gui_buffer *buffer) } /* - * weechat_aspell_iso_to_lang: convert an aspell iso lang code in its english - * full name + * Converts an aspell ISO lang code in its English full name. * + * Note: result must be freed after use. */ char * @@ -387,8 +392,9 @@ weechat_aspell_iso_to_lang (const char *code) } /* - * weechat_aspell_iso_to_country: convert an aspell iso country code in its - * english full name + * Converts an aspell ISO country code in its English full name. + * + * Note: result must be freed after use. */ char * @@ -407,8 +413,7 @@ weechat_aspell_iso_to_country (const char *code) } /* - * weechat_aspell_speller_list_dicts: list all aspell dict installed on system - * and display them + * Displays list of aspell dictionaries installed on system. */ void @@ -486,7 +491,7 @@ weechat_aspell_speller_list_dicts () } /* - * weechat_aspell_add_word : add a word in personal dictionary + * Adds a word in personal dictionary. */ void @@ -533,8 +538,11 @@ weechat_aspell_add_word (const char *lang, const char *word) } /* - * weechat_aspell_command_authorized: return 1 if command is authorized for - * spell checking, otherwise 0 + * Checks if command is authorized for spell checking. + * + * Returns: + * 1: command authorized + * 0: command not authorized */ int @@ -563,7 +571,11 @@ weechat_aspell_command_authorized (const char *command) } /* - * weechat_aspell_string_is_url: detect if a word is an url + * Checks if a word is an URL. + * + * Returns: + * 1: word is an URL + * 0: word is not an URL */ int @@ -583,8 +595,11 @@ weechat_aspell_string_is_url (const char *word) } /* - * weechat_aspell_string_is_simili_number: detect if a word is made of chars and - * punctuation + * Checks if a word is made of digits and punctuation. + * + * Returns: + * 1: word has only digits and punctuation + * 0: word has some other chars (not digits neither punctuation) */ int @@ -603,13 +618,16 @@ weechat_aspell_string_is_simili_number (const char *word) word = weechat_utf8_next_char (word); } - /* there's only digit or punctuation */ + /* there are only digits or punctuation */ return 1; } /* - * weechat_aspell_check_word: spell check a word - * return 1 if word is ok, 0 if word is misspelled + * Spell checks a word. + * + * Returns: + * 1: word is OK + * 0: word is misspelled */ int @@ -653,11 +671,11 @@ weechat_aspell_check_word (struct t_gui_buffer *buffer, const char *word) } /* - * weechat_aspell_get_suggestions: get suggestions for a word - * A string is returned with format: - * "suggest1,suggest2,suggest3" - * Note: result (if not NULL) must be free() - * after use. + * Gets suggestions for a word. + * + * Returns a string with format: "suggest1,suggest2,suggest3". + * + * Note: result (if not NULL) must be freed after use. */ char * @@ -721,7 +739,7 @@ weechat_aspell_get_suggestions (const char *word) } /* - * weechat_aspell_modifier_cb: modifier for input text + * Updates input text by adding color for misspelled words. */ char * @@ -1009,7 +1027,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier, } /* - * weechat_aspell_command_cb: callback for /aspell command + * Callback for command "/aspell". */ int @@ -1148,7 +1166,7 @@ weechat_aspell_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_aspell_completion_langs_cb: completion with aspell langs + * Adds aspell langs to completion list. */ int @@ -1174,7 +1192,7 @@ weechat_aspell_completion_langs_cb (void *data, const char *completion_item, } /* - * weechat_aspell_buffer_switch_cb: called on "buffer_switch" signal + * Refreshes bar items on signal "buffer_switch". */ int @@ -1195,7 +1213,7 @@ weechat_aspell_buffer_switch_cb (void *data, const char *signal, } /* - * weechat_aspell_window_switch_cb: called on "window_switch" signal + * Refreshes bar items on signal "window_switch". */ int @@ -1216,7 +1234,7 @@ weechat_aspell_window_switch_cb (void *data, const char *signal, } /* - * weechat_plugin_init : init aspell plugin + * Initializes aspell plugin. */ int @@ -1292,7 +1310,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end : end aspell plugin + * Ends aspell plugin. */ int diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index 1b132f895..dc3d403f6 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -57,7 +57,7 @@ const char *charset_internal = NULL; /* - * charset_config_reaload: reload charset configuration file + * Reloads charset configuration file. */ int @@ -74,10 +74,12 @@ charset_config_reload (void *data, struct t_config_file *config_file) } /* - * charset_decode_is_allowed: check if charset (decode) is allowed (different - * from "UTF-8", which is the internal charset) - * return 1 if charset is allowed, otherwise 0 - * (and error is displayed) + * Checks if a decoding charset is allowed (different from "UTF-8", which is the + * internal charset). + * + * Returns: + * 1: charset is allowed + * 0: charset not allowed */ int @@ -99,8 +101,11 @@ charset_decode_is_allowed (const char *charset) } /* - * charset_check_charset_decode_cb: callback called to check the charset value - * (for decoding only) + * Checks the validity of a decoding charset. + * + * Returns: + * 1: valid + * 0: invalid */ int @@ -115,7 +120,7 @@ charset_check_charset_decode_cb (void *data, struct t_config_option *option, } /* - * charset_config_create_option: set a charset + * Sets a charset. */ int @@ -179,8 +184,11 @@ charset_config_create_option (void *data, struct t_config_file *config_file, } /* - * charset_config_init: init charset configuration file - * return: 1 if ok, 0 if error + * Initializes charset configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -257,7 +265,7 @@ charset_config_init () } /* - * charset_config_read: read charset configuration file + * Reads charset configuration file. */ int @@ -267,7 +275,7 @@ charset_config_read () } /* - * charset_config_write: write charset configuration file + * Writes charset configuration file. */ int @@ -277,8 +285,11 @@ charset_config_write () } /* - * charset_check: check if a charset is valid - * return 1 if charset is valid, 0 if not valid + * Checks if a charset is valid. + * + * Returns: + * 1: charset is valid + * 0: charset is not valid */ int @@ -298,9 +309,10 @@ charset_check (const char *charset) } /* - * charset_get: read a charset in config file - * we first try with all arguments, then remove one by one - * to find charset (from specific to general charset) + * Reads a charset in configuration file. + * + * First tries with all arguments, then removes one by one to find charset (from + * specific to general charset). */ const char * @@ -352,7 +364,7 @@ charset_get (struct t_config_section *section, const char *name, } /* - * charset_decode_cb: decode a string with a charset to internal charset + * Decodes a string with a charset to internal charset (UTF-8). */ char * @@ -381,7 +393,7 @@ charset_decode_cb (void *data, const char *modifier, const char *modifier_data, } /* - * charset_encode_cb: encode a string from internal charset to another one + * Encodes a string from internal charset (UTF-8) to another charset. */ char * @@ -410,7 +422,7 @@ charset_encode_cb (void *data, const char *modifier, const char *modifier_data, } /* - * charset_set: set a charset + * Sets a charset. */ void @@ -433,7 +445,7 @@ charset_set (struct t_config_section *section, const char *type, } /* - * charset_display_charsets: display charsets + * Displays terminal and internal charsets. */ void @@ -445,7 +457,7 @@ charset_display_charsets () } /* - * charset_command_cb: callback for /charset command + * Callback for command "/charset". */ int @@ -549,7 +561,7 @@ charset_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * weechat_plugin_init: init charset plugin + * Initializes charset plugin. */ int @@ -598,7 +610,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end charset plugin + * Ends charset plugin. */ int diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index b99fb8d51..48626a94b 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -46,7 +46,7 @@ struct t_weechat_plugin *weechat_demo_plugin = NULL; /* - * demo_printf_command_cb: demo command for printf + * Callback for command "/demo_printf". */ int @@ -80,7 +80,7 @@ demo_printf_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * demo_buffer_input_data_cb: callback for input data on buffer + * Callback for input data on buffer. */ int @@ -101,7 +101,7 @@ demo_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, } /* - * demo_buffer_close_cb: callback for buffer closed + * Callback called when buffer is closed. */ int @@ -122,7 +122,7 @@ demo_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * demo_buffer_command_cb: demo command for creatig new buffer + * Callback for command "/demo_buffer". */ int @@ -153,7 +153,7 @@ demo_buffer_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * demo_infolist_print: display an infolist + * Displays an infolist. */ void @@ -226,7 +226,7 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name) } /* - * demo_info_command_cb: demo command for info_get + * Callback for command "/demo_info". */ int @@ -256,7 +256,8 @@ demo_info_command_cb (void *data, struct t_gui_buffer *buffer, int argc, weechat_printf (NULL, " %s: %s", weechat_infolist_string (infolist, "info_name"), - weechat_gettext (weechat_infolist_string (infolist, "description"))); + weechat_gettext (weechat_infolist_string (infolist, + "description"))); } weechat_infolist_free (infolist); } @@ -266,7 +267,7 @@ demo_info_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * demo_infolist_command_cb: demo command for list + * Callback for command "/demo_infolist". */ int @@ -311,7 +312,7 @@ demo_infolist_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * demo_signal_cb: callback for signal hook + * Callback for a signal hooked. */ int @@ -357,7 +358,7 @@ demo_signal_cb (void *data, const char *signal, const char *type_data, } /* - * weechat_plugin_init: initialize demo plugin + * Initializes demo plugin. */ int @@ -409,7 +410,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end demo plugin + * Ends demo plugin. */ int diff --git a/src/plugins/fifo/fifo-info.c b/src/plugins/fifo/fifo-info.c index 4d90cfc07..02e62a435 100644 --- a/src/plugins/fifo/fifo-info.c +++ b/src/plugins/fifo/fifo-info.c @@ -28,7 +28,7 @@ /* - * fifo_info_get_info_cb: callback called when fifo info is asked + * Returns info about FIFO pipe. */ const char * @@ -48,13 +48,12 @@ fifo_info_get_info_cb (void *data, const char *info_name, } /* - * fifo_info_init: initialize info and infolist hooks for fifo plugin + * Hooks info for fifo plugin. */ void fifo_info_init () { - /* fifo info hooks */ weechat_hook_info ("fifo_filename", N_("name of FIFO pipe"), NULL, &fifo_info_get_info_cb, NULL); } diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 1f4c404a3..104a00e49 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -63,7 +63,7 @@ int fifo_read(); /* - * fifo_remove_old_pipes: remove old fifo pipes in directory + * Removes old FIFO pipes in directory. */ void @@ -114,7 +114,7 @@ fifo_remove_old_pipes () } /* - * fifo_create: create FIFO pipe for remote control + * Creates FIFO pipe for remote control. */ void @@ -187,7 +187,7 @@ fifo_create () } /* - * fifo_remove: remove FIFO pipe + * Removes FIFO pipe. */ void @@ -231,7 +231,7 @@ fifo_remove () } /* - * fifo_exec: execute a command/text received by FIFO pipe + * Executes a command/text received in FIFO pipe. */ void @@ -301,16 +301,20 @@ fifo_exec (const char *text) } /* - * fifo_read: read data in FIFO pipe + * Reads data in FIFO pipe. */ int -fifo_read () +fifo_read (void *data, int fd) { static char buffer[4096 + 2]; char *buf2, *pos, *ptr_buf, *next_ptr_buf; int num_read; + /* make C compiler happy */ + (void) data; + (void) fd; + num_read = read (fifo_fd, buffer, sizeof (buffer) - 2); if (num_read > 0) { @@ -402,7 +406,7 @@ fifo_read () } /* - * fifo_config_cb: fifo config callback (called when fifo option is changed) + * Callback for changes on option "plugins.var.fifo.fifo". */ int @@ -427,7 +431,7 @@ fifo_config_cb (void *data, const char *option, const char *value) } /* - * weechat_plugin_init: initialize fifo plugin + * Initializes fifo plugin. */ int @@ -453,7 +457,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end fifo plugin + * Ends fifo plugin. */ int diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c index f2267b19d..c553ef445 100644 --- a/src/plugins/guile/weechat-guile-api.c +++ b/src/plugins/guile/weechat-guile-api.c @@ -83,7 +83,7 @@ /* - * weechat_guile_api_register: startup function for all WeeChat Guile scripts + * Registers a guile script. */ SCM @@ -156,8 +156,10 @@ weechat_guile_api_register (SCM name, SCM author, SCM version, SCM license, } /* - * weechat_guile_api_plugin_get_name: get name of plugin (return "core" for - * WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ SCM @@ -174,10 +176,6 @@ weechat_guile_api_plugin_get_name (SCM plugin) API_RETURN_STRING(result); } -/* - * weechat_guile_api_charset_set: set script charset - */ - SCM weechat_guile_api_charset_set (SCM charset) { @@ -190,10 +188,6 @@ weechat_guile_api_charset_set (SCM charset) API_RETURN_OK; } -/* - * weechat_guile_api_iconv_to_internal: convert string to internal WeeChat charset - */ - SCM weechat_guile_api_iconv_to_internal (SCM charset, SCM string) { @@ -210,11 +204,6 @@ weechat_guile_api_iconv_to_internal (SCM charset, SCM string) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_iconv_from_internal: convert string from WeeChat internal - * charset to another one - */ - SCM weechat_guile_api_iconv_from_internal (SCM charset, SCM string) { @@ -231,10 +220,6 @@ weechat_guile_api_iconv_from_internal (SCM charset, SCM string) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_gettext: get translated string - */ - SCM weechat_guile_api_gettext (SCM string) { @@ -249,10 +234,6 @@ weechat_guile_api_gettext (SCM string) API_RETURN_STRING(result); } -/* - * weechat_guile_api_ngettext: get translated string with plural form - */ - SCM weechat_guile_api_ngettext (SCM single, SCM plural, SCM count) { @@ -270,12 +251,6 @@ weechat_guile_api_ngettext (SCM single, SCM plural, SCM count) API_RETURN_STRING(result); } -/* - * weechat_guile_api_string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" - * are allowed inside mask - */ - SCM weechat_guile_api_string_match (SCM string, SCM mask, SCM case_sensitive) { @@ -293,14 +268,6 @@ weechat_guile_api_string_match (SCM string, SCM mask, SCM case_sensitive) API_RETURN_INT(value); } -/* - * weechat_guile_api_string_has_highlight: return 1 if string contains a - * highlight (using list of words to - * highlight) - * return 0 if no highlight is found in - * string - */ - SCM weechat_guile_api_string_has_highlight (SCM string, SCM highlight_words) { @@ -316,14 +283,6 @@ weechat_guile_api_string_has_highlight (SCM string, SCM highlight_words) API_RETURN_INT(value); } -/* - * weechat_guile_api_string_has_highlight_regex: return 1 if string contains a - * highlight (using regular - * expression) - * return 0 if no highlight is - * found in string - */ - SCM weechat_guile_api_string_has_highlight_regex (SCM string, SCM regex) { @@ -339,13 +298,6 @@ weechat_guile_api_string_has_highlight_regex (SCM string, SCM regex) API_RETURN_INT(value); } -/* - * weechat_guile_api_string_mask_to_regex: convert a mask (string with only - * "*" as wildcard) to a regex, paying - * attention to special chars in a - * regex - */ - SCM weechat_guile_api_string_mask_to_regex (SCM mask) { @@ -361,10 +313,6 @@ weechat_guile_api_string_mask_to_regex (SCM mask) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_string_remove_color: remove WeeChat color codes from string - */ - SCM weechat_guile_api_string_remove_color (SCM string, SCM replacement) { @@ -381,11 +329,6 @@ weechat_guile_api_string_remove_color (SCM string, SCM replacement) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_string_is_command_char: check if first char of string is a - * command char - */ - SCM weechat_guile_api_string_is_command_char (SCM string) { @@ -400,12 +343,6 @@ weechat_guile_api_string_is_command_char (SCM string) API_RETURN_INT(value); } -/* - * weechat_guile_api_string_input_for_buffer: return string with input text - * for buffer or empty string if - * it's a command - */ - SCM weechat_guile_api_string_input_for_buffer (SCM string) { @@ -420,11 +357,6 @@ weechat_guile_api_string_input_for_buffer (SCM string) API_RETURN_STRING(result); } -/* - * weechat_guile_api_string_eval_expression: evaluate an expression and return - * result - */ - SCM weechat_guile_api_string_eval_expression (SCM expr, SCM pointers, SCM extra_vars) @@ -458,10 +390,6 @@ weechat_guile_api_string_eval_expression (SCM expr, SCM pointers, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_mkdir_home: create a directory in WeeChat home - */ - SCM weechat_guile_api_mkdir_home (SCM directory, SCM mode) { @@ -475,10 +403,6 @@ weechat_guile_api_mkdir_home (SCM directory, SCM mode) API_RETURN_ERROR; } -/* - * weechat_guile_api_mkdir: create a directory - */ - SCM weechat_guile_api_mkdir (SCM directory, SCM mode) { @@ -492,11 +416,6 @@ weechat_guile_api_mkdir (SCM directory, SCM mode) API_RETURN_ERROR; } -/* - * weechat_guile_api_mkdir_parents: create a directory and make parent - * directories as needed - */ - SCM weechat_guile_api_mkdir_parents (SCM directory, SCM mode) { @@ -510,10 +429,6 @@ weechat_guile_api_mkdir_parents (SCM directory, SCM mode) API_RETURN_ERROR; } -/* - * weechat_guile_api_list_new: create a new list - */ - SCM weechat_guile_api_list_new () { @@ -526,10 +441,6 @@ weechat_guile_api_list_new () API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_add: add a string to list - */ - SCM weechat_guile_api_list_add (SCM weelist, SCM data, SCM where, SCM user_data) { @@ -548,10 +459,6 @@ weechat_guile_api_list_add (SCM weelist, SCM data, SCM where, SCM user_data) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_search: search a string in list - */ - SCM weechat_guile_api_list_search (SCM weelist, SCM data) { @@ -567,10 +474,6 @@ weechat_guile_api_list_search (SCM weelist, SCM data) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_search_pos: search position of a string in list - */ - SCM weechat_guile_api_list_search_pos (SCM weelist, SCM data) { @@ -586,10 +489,6 @@ weechat_guile_api_list_search_pos (SCM weelist, SCM data) API_RETURN_INT(pos); } -/* - * weechat_guile_api_list_casesearch: search a string in list (ignore case) - */ - SCM weechat_guile_api_list_casesearch (SCM weelist, SCM data) { @@ -605,11 +504,6 @@ weechat_guile_api_list_casesearch (SCM weelist, SCM data) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_casesearch_pos: search position of a string in list - * (ignore case) - */ - SCM weechat_guile_api_list_casesearch_pos (SCM weelist, SCM data) { @@ -625,10 +519,6 @@ weechat_guile_api_list_casesearch_pos (SCM weelist, SCM data) API_RETURN_INT(pos); } -/* - * weechat_guile_api_list_get: get item by position - */ - SCM weechat_guile_api_list_get (SCM weelist, SCM position) { @@ -644,10 +534,6 @@ weechat_guile_api_list_get (SCM weelist, SCM position) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_set: set new value for item - */ - SCM weechat_guile_api_list_set (SCM item, SCM new_value) { @@ -661,10 +547,6 @@ weechat_guile_api_list_set (SCM item, SCM new_value) API_RETURN_OK; } -/* - * weechat_guile_api_list_next: get next item - */ - SCM weechat_guile_api_list_next (SCM item) { @@ -679,10 +561,6 @@ weechat_guile_api_list_next (SCM item) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_prev: get previous item - */ - SCM weechat_guile_api_list_prev (SCM item) { @@ -697,10 +575,6 @@ weechat_guile_api_list_prev (SCM item) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_string: get string value of item - */ - SCM weechat_guile_api_list_string (SCM item) { @@ -715,10 +589,6 @@ weechat_guile_api_list_string (SCM item) API_RETURN_STRING(result); } -/* - * weechat_guile_api_list_size: get number of elements in list - */ - SCM weechat_guile_api_list_size (SCM weelist) { @@ -733,10 +603,6 @@ weechat_guile_api_list_size (SCM weelist) API_RETURN_INT(size); } -/* - * weechat_guile_api_list_remove: remove item from list - */ - SCM weechat_guile_api_list_remove (SCM weelist, SCM item) { @@ -750,10 +616,6 @@ weechat_guile_api_list_remove (SCM weelist, SCM item) API_RETURN_OK; } -/* - * weechat_guile_api_list_remove_all: remove all items from list - */ - SCM weechat_guile_api_list_remove_all (SCM weelist) { @@ -766,10 +628,6 @@ weechat_guile_api_list_remove_all (SCM weelist) API_RETURN_OK; } -/* - * weechat_guile_api_list_free: free list - */ - SCM weechat_guile_api_list_free (SCM weelist) { @@ -782,10 +640,6 @@ weechat_guile_api_list_free (SCM weelist) API_RETURN_OK; } -/* - * weechat_guile_api_config_reload_cb: callback for config reload - */ - int weechat_guile_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -823,10 +677,6 @@ weechat_guile_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat_guile_api_config_new: create a new configuration file - */ - SCM weechat_guile_api_config_new (SCM name, SCM function, SCM data) { @@ -848,10 +698,6 @@ weechat_guile_api_config_new (SCM name, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_read_cb: callback for reading option in section - */ - int weechat_guile_api_config_read_cb (void *data, struct t_config_file *config_file, @@ -896,10 +742,6 @@ weechat_guile_api_config_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_guile_api_config_section_write_cb: callback for writing section - */ - int weechat_guile_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -939,11 +781,6 @@ weechat_guile_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_guile_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_guile_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -983,11 +820,6 @@ weechat_guile_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_guile_api_config_section_create_option_cb: callback to create an - * option - */ - int weechat_guile_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1033,11 +865,6 @@ weechat_guile_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_guile_api_config_section_delete_option_cb: callback to delete an - * option - */ - int weechat_guile_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1083,10 +910,6 @@ weechat_guile_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat_guile_api_config_new_section: create a new section in configuration file - */ - SCM weechat_guile_api_config_new_section (SCM args) { @@ -1150,10 +973,6 @@ weechat_guile_api_config_new_section (SCM args) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_search_section: search section in configuration file - */ - SCM weechat_guile_api_config_search_section (SCM config_file, SCM section_name) { @@ -1170,11 +989,6 @@ weechat_guile_api_config_search_section (SCM config_file, SCM section_name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_option_check_value_cb: callback for checking new - * value for option - */ - int weechat_guile_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1214,10 +1028,6 @@ weechat_guile_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_guile_api_config_option_change_cb: callback for option changed - */ - void weechat_guile_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1247,10 +1057,6 @@ weechat_guile_api_config_option_change_cb (void *data, } } -/* - * weechat_guile_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_guile_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1280,10 +1086,6 @@ weechat_guile_api_config_option_delete_cb (void *data, } } -/* - * weechat_guile_api_config_new_option: create a new option in section - */ - SCM weechat_guile_api_config_new_option (SCM args) { @@ -1354,11 +1156,6 @@ weechat_guile_api_config_new_option (SCM args) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_search_option: search option in configuration file - * or section - */ - SCM weechat_guile_api_config_search_option (SCM config_file, SCM section, SCM option_name) @@ -1378,10 +1175,6 @@ weechat_guile_api_config_search_option (SCM config_file, SCM section, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_string_to_boolean: return boolean value of a string - */ - SCM weechat_guile_api_config_string_to_boolean (SCM text) { @@ -1396,10 +1189,6 @@ weechat_guile_api_config_string_to_boolean (SCM text) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_option_reset: reset option with default value - */ - SCM weechat_guile_api_config_option_reset (SCM option, SCM run_callback) { @@ -1415,10 +1204,6 @@ weechat_guile_api_config_option_reset (SCM option, SCM run_callback) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_option_set: set new value for option - */ - SCM weechat_guile_api_config_option_set (SCM option, SCM new_value, SCM run_callback) @@ -1437,11 +1222,6 @@ weechat_guile_api_config_option_set (SCM option, SCM new_value, API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_option_set_null: set null (undefined) value for - * option - */ - SCM weechat_guile_api_config_option_set_null (SCM option, SCM run_callback) { @@ -1457,10 +1237,6 @@ weechat_guile_api_config_option_set_null (SCM option, SCM run_callback) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_option_unset: unset an option - */ - SCM weechat_guile_api_config_option_unset (SCM option) { @@ -1475,10 +1251,6 @@ weechat_guile_api_config_option_unset (SCM option) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_option_rename: rename an option - */ - SCM weechat_guile_api_config_option_rename (SCM option, SCM new_name) { @@ -1492,10 +1264,6 @@ weechat_guile_api_config_option_rename (SCM option, SCM new_name) API_RETURN_OK; } -/* - * weechat_guile_api_config_option_is_null: return 1 if value of option is null - */ - SCM weechat_guile_api_config_option_is_null (SCM option) { @@ -1510,11 +1278,6 @@ weechat_guile_api_config_option_is_null (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_option_default_is_null: return 1 if value of option - * is null - */ - SCM weechat_guile_api_config_option_default_is_null (SCM option) { @@ -1529,10 +1292,6 @@ weechat_guile_api_config_option_default_is_null (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_boolean: return boolean value of option - */ - SCM weechat_guile_api_config_boolean (SCM option) { @@ -1547,10 +1306,6 @@ weechat_guile_api_config_boolean (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_boolean_default: return default boolean value of option - */ - SCM weechat_guile_api_config_boolean_default (SCM option) { @@ -1565,10 +1320,6 @@ weechat_guile_api_config_boolean_default (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_integer: return integer value of option - */ - SCM weechat_guile_api_config_integer (SCM option) { @@ -1583,10 +1334,6 @@ weechat_guile_api_config_integer (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_integer_default: return default integer value of option - */ - SCM weechat_guile_api_config_integer_default (SCM option) { @@ -1601,10 +1348,6 @@ weechat_guile_api_config_integer_default (SCM option) API_RETURN_INT(value); } -/* - * weechat_guile_api_config_string: return string value of option - */ - SCM weechat_guile_api_config_string (SCM option) { @@ -1619,10 +1362,6 @@ weechat_guile_api_config_string (SCM option) API_RETURN_STRING(result); } -/* - * weechat_guile_api_config_string_default: return default string value of option - */ - SCM weechat_guile_api_config_string_default (SCM option) { @@ -1637,10 +1376,6 @@ weechat_guile_api_config_string_default (SCM option) API_RETURN_STRING(result); } -/* - * weechat_guile_api_config_color: return color value of option - */ - SCM weechat_guile_api_config_color (SCM option) { @@ -1655,10 +1390,6 @@ weechat_guile_api_config_color (SCM option) API_RETURN_STRING(result); } -/* - * weechat_guile_api_config_color_default: return default color value of option - */ - SCM weechat_guile_api_config_color_default (SCM option) { @@ -1673,10 +1404,6 @@ weechat_guile_api_config_color_default (SCM option) API_RETURN_STRING(result); } -/* - * weechat_guile_api_config_write_option: write an option in configuration file - */ - SCM weechat_guile_api_config_write_option (SCM config_file, SCM option) { @@ -1690,10 +1417,6 @@ weechat_guile_api_config_write_option (SCM config_file, SCM option) API_RETURN_OK; } -/* - * weechat_guile_api_config_write_line: write a line in configuration file - */ - SCM weechat_guile_api_config_write_line (SCM config_file, SCM option_name, SCM value) @@ -1710,10 +1433,6 @@ weechat_guile_api_config_write_line (SCM config_file, API_RETURN_OK; } -/* - * weechat_guile_api_config_write: write configuration file - */ - SCM weechat_guile_api_config_write (SCM config_file) { @@ -1728,10 +1447,6 @@ weechat_guile_api_config_write (SCM config_file) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_read: read configuration file - */ - SCM weechat_guile_api_config_read (SCM config_file) { @@ -1746,10 +1461,6 @@ weechat_guile_api_config_read (SCM config_file) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_reload: reload configuration file - */ - SCM weechat_guile_api_config_reload (SCM config_file) { @@ -1764,10 +1475,6 @@ weechat_guile_api_config_reload (SCM config_file) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_option_free: free an option in configuration file - */ - SCM weechat_guile_api_config_option_free (SCM option) { @@ -1782,11 +1489,6 @@ weechat_guile_api_config_option_free (SCM option) API_RETURN_OK; } -/* - * weechat_guile_api_config_section_free_options: free all options of a section - * in configuration file - */ - SCM weechat_guile_api_config_section_free_options (SCM section) { @@ -1801,10 +1503,6 @@ weechat_guile_api_config_section_free_options (SCM section) API_RETURN_OK; } -/* - * weechat_guile_api_config_section_free: free section in configuration file - */ - SCM weechat_guile_api_config_section_free (SCM section) { @@ -1819,10 +1517,6 @@ weechat_guile_api_config_section_free (SCM section) API_RETURN_OK; } -/* - * weechat_guile_api_config_free: free configuration file - */ - SCM weechat_guile_api_config_free (SCM config_file) { @@ -1837,10 +1531,6 @@ weechat_guile_api_config_free (SCM config_file) API_RETURN_OK; } -/* - * weechat_guile_api_config_get: get config option - */ - SCM weechat_guile_api_config_get (SCM option) { @@ -1856,10 +1546,6 @@ weechat_guile_api_config_get (SCM option) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_config_get_plugin: get value of a plugin option - */ - SCM weechat_guile_api_config_get_plugin (SCM option) { @@ -1876,10 +1562,6 @@ weechat_guile_api_config_get_plugin (SCM option) API_RETURN_STRING(result); } -/* - * weechat_guile_api_config_is_set_plugin: check if a plugin option is set - */ - SCM weechat_guile_api_config_is_set_plugin (SCM option) { @@ -1896,10 +1578,6 @@ weechat_guile_api_config_is_set_plugin (SCM option) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_set_plugin: set value of a plugin option - */ - SCM weechat_guile_api_config_set_plugin (SCM option, SCM value) { @@ -1917,10 +1595,6 @@ weechat_guile_api_config_set_plugin (SCM option, SCM value) API_RETURN_INT(rc); } -/* - * weechat_guile_api_config_set_desc_plugin: set description of a plugin option - */ - SCM weechat_guile_api_config_set_desc_plugin (SCM option, SCM description) { @@ -1936,10 +1610,6 @@ weechat_guile_api_config_set_desc_plugin (SCM option, SCM description) API_RETURN_OK; } -/* - * weechat_guile_api_config_unset_plugin: unset plugin option - */ - SCM weechat_guile_api_config_unset_plugin (SCM option) { @@ -1956,10 +1626,6 @@ weechat_guile_api_config_unset_plugin (SCM option) API_RETURN_INT(rc); } -/* - * weechat_guile_api_key_bind: bind key(s) - */ - SCM weechat_guile_api_key_bind (SCM context, SCM keys) { @@ -1983,10 +1649,6 @@ weechat_guile_api_key_bind (SCM context, SCM keys) API_RETURN_INT(num_keys); } -/* - * weechat_guile_api_key_unbind: unbind key(s) - */ - SCM weechat_guile_api_key_unbind (SCM context, SCM key) { @@ -2002,10 +1664,6 @@ weechat_guile_api_key_unbind (SCM context, SCM key) API_RETURN_INT(num_keys); } -/* - * weechat_guile_api_prefix: get a prefix, used for display - */ - SCM weechat_guile_api_prefix (SCM prefix) { @@ -2020,10 +1678,6 @@ weechat_guile_api_prefix (SCM prefix) API_RETURN_STRING(result); } -/* - * weechat_guile_api_color: get a color code, used for display - */ - SCM weechat_guile_api_color (SCM color) { @@ -2038,10 +1692,6 @@ weechat_guile_api_color (SCM color) API_RETURN_STRING(result); } -/* - * weechat_guile_api_print: print message in a buffer - */ - SCM weechat_guile_api_print (SCM buffer, SCM message) { @@ -2057,11 +1707,6 @@ weechat_guile_api_print (SCM buffer, SCM message) API_RETURN_OK; } -/* - * weechat_guile_api_print_date_tags: print message in a buffer with optional - * date and tags - */ - SCM weechat_guile_api_print_date_tags (SCM buffer, SCM date, SCM tags, SCM message) { @@ -2080,10 +1725,6 @@ weechat_guile_api_print_date_tags (SCM buffer, SCM date, SCM tags, SCM message) API_RETURN_OK; } -/* - * weechat_guile_api_print_y: print message in a buffer with free content - */ - SCM weechat_guile_api_print_y (SCM buffer, SCM y, SCM message) { @@ -2101,10 +1742,6 @@ weechat_guile_api_print_y (SCM buffer, SCM y, SCM message) API_RETURN_OK; } -/* - * weechat_guile_api_log_print: print message in WeeChat log file - */ - SCM weechat_guile_api_log_print (SCM message) { @@ -2119,10 +1756,6 @@ weechat_guile_api_log_print (SCM message) API_RETURN_OK; } -/* - * weechat_guile_api_hook_command_cb: callback for command hooked - */ - int weechat_guile_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2164,10 +1797,6 @@ weechat_guile_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_command: hook a command - */ - SCM weechat_guile_api_hook_command (SCM command, SCM description, SCM args, SCM args_description, SCM completion, @@ -2197,10 +1826,6 @@ weechat_guile_api_hook_command (SCM command, SCM description, SCM args, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_guile_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2239,10 +1864,6 @@ weechat_guile_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_command_run: hook a command_run - */ - SCM weechat_guile_api_hook_command_run (SCM command, SCM function, SCM data) { @@ -2264,10 +1885,6 @@ weechat_guile_api_hook_command_run (SCM command, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_timer_cb: callback for timer hooked - */ - int weechat_guile_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2305,10 +1922,6 @@ weechat_guile_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_timer: hook a timer - */ - SCM weechat_guile_api_hook_timer (SCM interval, SCM align_second, SCM max_calls, SCM function, SCM data) @@ -2334,10 +1947,6 @@ weechat_guile_api_hook_timer (SCM interval, SCM align_second, SCM max_calls, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_fd_cb: callback for fd hooked - */ - int weechat_guile_api_hook_fd_cb (void *data, int fd) { @@ -2374,10 +1983,6 @@ weechat_guile_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_fd: hook a fd - */ - SCM weechat_guile_api_hook_fd (SCM fd, SCM read, SCM write, SCM exception, SCM function, SCM data) @@ -2404,10 +2009,6 @@ weechat_guile_api_hook_fd (SCM fd, SCM read, SCM write, SCM exception, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_process_cb: callback for process hooked - */ - int weechat_guile_api_hook_process_cb (void *data, const char *command, int return_code, @@ -2447,10 +2048,6 @@ weechat_guile_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_process: hook a process - */ - SCM weechat_guile_api_hook_process (SCM command, SCM timeout, SCM function, SCM data) @@ -2474,11 +2071,6 @@ weechat_guile_api_hook_process (SCM command, SCM timeout, SCM function, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_process_hashtable: hook a process with options in a - * hashtable - */ - SCM weechat_guile_api_hook_process_hashtable (SCM command, SCM options, SCM timeout, SCM function, SCM data) @@ -2513,10 +2105,6 @@ weechat_guile_api_hook_process_hashtable (SCM command, SCM options, SCM timeout, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_connect_cb: callback for connect hooked - */ - int weechat_guile_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -2562,10 +2150,6 @@ weechat_guile_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_connect: hook a connection - */ - SCM weechat_guile_api_hook_connect (SCM proxy, SCM address, SCM port, SCM ipv6, SCM retry, SCM local_hostname, SCM function, @@ -2600,10 +2184,6 @@ weechat_guile_api_hook_connect (SCM proxy, SCM address, SCM port, SCM ipv6, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_print_cb: callback for print hooked - */ - int weechat_guile_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -2664,10 +2244,6 @@ weechat_guile_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_print: hook a print - */ - SCM weechat_guile_api_hook_print (SCM buffer, SCM tags, SCM message, SCM strip_colors, SCM function, SCM data) @@ -2694,10 +2270,6 @@ weechat_guile_api_hook_print (SCM buffer, SCM tags, SCM message, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_signal_cb: callback for signal hooked - */ - int weechat_guile_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -2754,10 +2326,6 @@ weechat_guile_api_hook_signal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_signal: hook a signal - */ - SCM weechat_guile_api_hook_signal (SCM signal, SCM function, SCM data) { @@ -2778,10 +2346,6 @@ weechat_guile_api_hook_signal (SCM signal, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_signal_send: send a signal - */ - SCM weechat_guile_api_hook_signal_send (SCM signal, SCM type_data, SCM signal_data) @@ -2824,10 +2388,6 @@ weechat_guile_api_hook_signal_send (SCM signal, SCM type_data, API_RETURN_ERROR; } -/* - * weechat_guile_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_guile_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -2864,10 +2424,6 @@ weechat_guile_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_hsignal: hook a hsignal - */ - SCM weechat_guile_api_hook_hsignal (SCM signal, SCM function, SCM data) { @@ -2889,10 +2445,6 @@ weechat_guile_api_hook_hsignal (SCM signal, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_hsignal_send: send a hsignal - */ - SCM weechat_guile_api_hook_hsignal_send (SCM signal, SCM hashtable) { @@ -2915,10 +2467,6 @@ weechat_guile_api_hook_hsignal_send (SCM signal, SCM hashtable) API_RETURN_OK; } -/* - * weechat_guile_api_hook_config_cb: callback for config option hooked - */ - int weechat_guile_api_hook_config_cb (void *data, const char *option, const char *value) { @@ -2954,10 +2502,6 @@ weechat_guile_api_hook_config_cb (void *data, const char *option, const char *va return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_config: hook a config option - */ - SCM weechat_guile_api_hook_config (SCM option, SCM function, SCM data) { @@ -2979,10 +2523,6 @@ weechat_guile_api_hook_config (SCM option, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_completion_cb: callback for completion hooked - */ - int weechat_guile_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3025,10 +2565,6 @@ weechat_guile_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_hook_completion: hook a completion - */ - SCM weechat_guile_api_hook_completion (SCM completion, SCM description, SCM function, SCM data) @@ -3052,10 +2588,6 @@ weechat_guile_api_hook_completion (SCM completion, SCM description, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_completion_list_add: add a word to list for a completion - */ - SCM weechat_guile_api_hook_completion_list_add (SCM completion, SCM word, SCM nick_completion, SCM where) @@ -3073,10 +2605,6 @@ weechat_guile_api_hook_completion_list_add (SCM completion, SCM word, API_RETURN_OK; } -/* - * weechat_guile_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_guile_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, const char *string) @@ -3103,10 +2631,6 @@ weechat_guile_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat_guile_api_hook_modifier: hook a modifier - */ - SCM weechat_guile_api_hook_modifier (SCM modifier, SCM function, SCM data) { @@ -3128,10 +2652,6 @@ weechat_guile_api_hook_modifier (SCM modifier, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_modifier_exec: execute a modifier hook - */ - SCM weechat_guile_api_hook_modifier_exec (SCM modifier, SCM modifier_data, SCM string) @@ -3151,10 +2671,6 @@ weechat_guile_api_hook_modifier_exec (SCM modifier, SCM modifier_data, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_info_cb: callback for info hooked - */ - const char * weechat_guile_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3180,10 +2696,6 @@ weechat_guile_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_guile_api_hook_info: hook an info - */ - SCM weechat_guile_api_hook_info (SCM info_name, SCM description, SCM args_description, SCM function, SCM data) @@ -3209,10 +2721,6 @@ weechat_guile_api_hook_info (SCM info_name, SCM description, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_guile_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3238,10 +2746,6 @@ weechat_guile_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_guile_api_hook_info_hashtable: hook an info_hashtable - */ - SCM weechat_guile_api_hook_info_hashtable (SCM info_name, SCM description, SCM args_description, @@ -3270,10 +2774,6 @@ weechat_guile_api_hook_info_hashtable (SCM info_name, SCM description, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_guile_api_hook_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -3306,10 +2806,6 @@ weechat_guile_api_hook_infolist_cb (void *data, const char *infolist_name, return NULL; } -/* - * weechat_guile_api_hook_infolist: hook an infolist - */ - SCM weechat_guile_api_hook_infolist (SCM infolist_name, SCM description, SCM pointer_description, SCM args_description, @@ -3337,10 +2833,6 @@ weechat_guile_api_hook_infolist (SCM infolist_name, SCM description, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_guile_api_hook_focus_cb (void *data, struct t_hashtable *info) { @@ -3364,10 +2856,6 @@ weechat_guile_api_hook_focus_cb (void *data, struct t_hashtable *info) return NULL; } -/* - * weechat_guile_api_hook_focus: hook a focus - */ - SCM weechat_guile_api_hook_focus (SCM area, SCM function, SCM data) { @@ -3389,10 +2877,6 @@ weechat_guile_api_hook_focus (SCM area, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_unhook: unhook something - */ - SCM weechat_guile_api_unhook (SCM hook) { @@ -3407,10 +2891,6 @@ weechat_guile_api_unhook (SCM hook) API_RETURN_OK; } -/* - * weechat_guile_api_unhook_all: unhook all for script - */ - SCM weechat_guile_api_unhook_all () { @@ -3421,10 +2901,6 @@ weechat_guile_api_unhook_all () API_RETURN_OK; } -/* - * weechat_guile_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_guile_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -3463,10 +2939,6 @@ weechat_guile_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_buffer_close_cb: callback for closed buffer - */ - int weechat_guile_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -3503,10 +2975,6 @@ weechat_guile_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_buffer_new: create a new buffer - */ - SCM weechat_guile_api_buffer_new (SCM name, SCM function_input, SCM data_input, SCM function_close, SCM data_close) @@ -3533,10 +3001,6 @@ weechat_guile_api_buffer_new (SCM name, SCM function_input, SCM data_input, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_buffer_search: search a buffer - */ - SCM weechat_guile_api_buffer_search (SCM plugin, SCM name) { @@ -3553,10 +3017,6 @@ weechat_guile_api_buffer_search (SCM plugin, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_buffer_search_main: search main buffer (WeeChat core buffer) - */ - SCM weechat_guile_api_buffer_search_main () { @@ -3570,10 +3030,6 @@ weechat_guile_api_buffer_search_main () API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_current_buffer: get current buffer - */ - SCM weechat_guile_api_current_buffer () { @@ -3587,10 +3043,6 @@ weechat_guile_api_current_buffer () API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_buffer_clear: clear a buffer - */ - SCM weechat_guile_api_buffer_clear (SCM buffer) { @@ -3603,10 +3055,6 @@ weechat_guile_api_buffer_clear (SCM buffer) API_RETURN_OK; } -/* - * weechat_guile_api_buffer_close: close a buffer - */ - SCM weechat_guile_api_buffer_close (SCM buffer) { @@ -3621,10 +3069,6 @@ weechat_guile_api_buffer_close (SCM buffer) API_RETURN_OK; } -/* - * weechat_guile_api_buffer_merge: merge a buffer to another buffer - */ - SCM weechat_guile_api_buffer_merge (SCM buffer, SCM target_buffer) { @@ -3638,11 +3082,6 @@ weechat_guile_api_buffer_merge (SCM buffer, SCM target_buffer) API_RETURN_OK; } -/* - * weechat_guile_api_buffer_unmerge: unmerge a buffer from a group of merged - * buffers - */ - SCM weechat_guile_api_buffer_unmerge (SCM buffer, SCM number) { @@ -3656,10 +3095,6 @@ weechat_guile_api_buffer_unmerge (SCM buffer, SCM number) API_RETURN_OK; } -/* - * weechat_guile_api_buffer_get_integer: get a buffer property as integer - */ - SCM weechat_guile_api_buffer_get_integer (SCM buffer, SCM property) { @@ -3675,10 +3110,6 @@ weechat_guile_api_buffer_get_integer (SCM buffer, SCM property) API_RETURN_INT(value); } -/* - * weechat_guile_api_buffer_get_string: get a buffer property as string - */ - SCM weechat_guile_api_buffer_get_string (SCM buffer, SCM property) { @@ -3694,10 +3125,6 @@ weechat_guile_api_buffer_get_string (SCM buffer, SCM property) API_RETURN_STRING(result); } -/* - * weechat_guile_api_buffer_get_pointer: get a buffer property as pointer - */ - SCM weechat_guile_api_buffer_get_pointer (SCM buffer, SCM property) { @@ -3714,10 +3141,6 @@ weechat_guile_api_buffer_get_pointer (SCM buffer, SCM property) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_buffer_set: set a buffer property - */ - SCM weechat_guile_api_buffer_set (SCM buffer, SCM property, SCM value) { @@ -3733,12 +3156,6 @@ weechat_guile_api_buffer_set (SCM buffer, SCM property, SCM value) API_RETURN_OK; } -/* - * weechat_guile_api_buffer_string_replace_local_var: replace local variables - * ($var) in a string, using - * value of local variables - */ - SCM weechat_guile_api_buffer_string_replace_local_var (SCM buffer, SCM string) { @@ -3755,10 +3172,6 @@ weechat_guile_api_buffer_string_replace_local_var (SCM buffer, SCM string) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_buffer_match_list: return 1 if buffer matches list of buffers - */ - SCM weechat_guile_api_buffer_match_list (SCM buffer, SCM string) { @@ -3774,10 +3187,6 @@ weechat_guile_api_buffer_match_list (SCM buffer, SCM string) API_RETURN_INT(value); } -/* - * weechat_guile_api_current_window: get current window - */ - SCM weechat_guile_api_current_window () { @@ -3791,11 +3200,6 @@ weechat_guile_api_current_window () API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_window_search_with_buffer: search a window with buffer - * pointer - */ - SCM weechat_guile_api_window_search_with_buffer (SCM buffer) { @@ -3811,10 +3215,6 @@ weechat_guile_api_window_search_with_buffer (SCM buffer) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_window_get_integer: get a window property as integer - */ - SCM weechat_guile_api_window_get_integer (SCM window, SCM property) { @@ -3830,10 +3230,6 @@ weechat_guile_api_window_get_integer (SCM window, SCM property) API_RETURN_INT(value); } -/* - * weechat_guile_api_window_get_string: get a window property as string - */ - SCM weechat_guile_api_window_get_string (SCM window, SCM property) { @@ -3849,10 +3245,6 @@ weechat_guile_api_window_get_string (SCM window, SCM property) API_RETURN_STRING(result); } -/* - * weechat_guile_api_window_get_pointer: get a window property as pointer - */ - SCM weechat_guile_api_window_get_pointer (SCM window, SCM property) { @@ -3869,10 +3261,6 @@ weechat_guile_api_window_get_pointer (SCM window, SCM property) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_window_set_title: set window title - */ - SCM weechat_guile_api_window_set_title (SCM title) { @@ -3885,10 +3273,6 @@ weechat_guile_api_window_set_title (SCM title) API_RETURN_OK; } -/* - * weechat_guile_api_nicklist_add_group: add a group in nicklist - */ - SCM weechat_guile_api_nicklist_add_group (SCM buffer, SCM parent_group, SCM name, SCM color, SCM visible) @@ -3911,10 +3295,6 @@ weechat_guile_api_nicklist_add_group (SCM buffer, SCM parent_group, SCM name, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_search_group: search a group in nicklist - */ - SCM weechat_guile_api_nicklist_search_group (SCM buffer, SCM from_group, SCM name) { @@ -3933,10 +3313,6 @@ weechat_guile_api_nicklist_search_group (SCM buffer, SCM from_group, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_add_nick: add a nick in nicklist - */ - SCM weechat_guile_api_nicklist_add_nick (SCM buffer, SCM group, SCM name, SCM color, SCM prefix, SCM prefix_color, @@ -3963,10 +3339,6 @@ weechat_guile_api_nicklist_add_nick (SCM buffer, SCM group, SCM name, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_search_nick: search a nick in nicklist - */ - SCM weechat_guile_api_nicklist_search_nick (SCM buffer, SCM from_group, SCM name) { @@ -3985,10 +3357,6 @@ weechat_guile_api_nicklist_search_nick (SCM buffer, SCM from_group, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_remove_group: remove a group from nicklist - */ - SCM weechat_guile_api_nicklist_remove_group (SCM buffer, SCM group) { @@ -4002,10 +3370,6 @@ weechat_guile_api_nicklist_remove_group (SCM buffer, SCM group) API_RETURN_OK; } -/* - * weechat_guile_api_nicklist_remove_nick: remove a nick from nicklist - */ - SCM weechat_guile_api_nicklist_remove_nick (SCM buffer, SCM nick) { @@ -4019,10 +3383,6 @@ weechat_guile_api_nicklist_remove_nick (SCM buffer, SCM nick) API_RETURN_OK; } -/* - * weechat_guile_api_nicklist_remove_all: remove all groups/nicks from nicklist - */ - SCM weechat_guile_api_nicklist_remove_all (SCM buffer) { @@ -4035,10 +3395,6 @@ weechat_guile_api_nicklist_remove_all (SCM buffer) API_RETURN_OK; } -/* - * weechat_guile_api_nicklist_group_get_integer: get a group property as integer - */ - SCM weechat_guile_api_nicklist_group_get_integer (SCM buffer, SCM group, SCM property) @@ -4057,10 +3413,6 @@ weechat_guile_api_nicklist_group_get_integer (SCM buffer, SCM group, API_RETURN_INT(value); } -/* - * weechat_guile_api_nicklist_group_get_string: get a group property as string - */ - SCM weechat_guile_api_nicklist_group_get_string (SCM buffer, SCM group, SCM property) @@ -4079,10 +3431,6 @@ weechat_guile_api_nicklist_group_get_string (SCM buffer, SCM group, API_RETURN_STRING(result); } -/* - * weechat_guile_api_nicklist_group_get_pointer: get a group property as pointer - */ - SCM weechat_guile_api_nicklist_group_get_pointer (SCM buffer, SCM group, SCM property) @@ -4102,10 +3450,6 @@ weechat_guile_api_nicklist_group_get_pointer (SCM buffer, SCM group, API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_group_set: set a group property - */ - SCM weechat_guile_api_nicklist_group_set (SCM buffer, SCM group, SCM property, SCM value) @@ -4122,10 +3466,6 @@ weechat_guile_api_nicklist_group_set (SCM buffer, SCM group, SCM property, API_RETURN_OK; } -/* - * weechat_guile_api_nicklist_nick_get_integer: get a nick property as integer - */ - SCM weechat_guile_api_nicklist_nick_get_integer (SCM buffer, SCM nick, SCM property) { @@ -4143,10 +3483,6 @@ weechat_guile_api_nicklist_nick_get_integer (SCM buffer, SCM nick, SCM property) API_RETURN_INT(value); } -/* - * weechat_guile_api_nicklist_nick_get_string: get a nick property as string - */ - SCM weechat_guile_api_nicklist_nick_get_string (SCM buffer, SCM nick, SCM property) { @@ -4164,10 +3500,6 @@ weechat_guile_api_nicklist_nick_get_string (SCM buffer, SCM nick, SCM property) API_RETURN_STRING(result); } -/* - * weechat_guile_api_nicklist_nick_get_pointer: get a nick property as pointer - */ - SCM weechat_guile_api_nicklist_nick_get_pointer (SCM buffer, SCM nick, SCM property) { @@ -4186,10 +3518,6 @@ weechat_guile_api_nicklist_nick_get_pointer (SCM buffer, SCM nick, SCM property) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_nicklist_nick_set: set a nick property - */ - SCM weechat_guile_api_nicklist_nick_set (SCM buffer, SCM nick, SCM property, SCM value) @@ -4207,10 +3535,6 @@ weechat_guile_api_nicklist_nick_set (SCM buffer, SCM nick, SCM property, API_RETURN_OK; } -/* - * weechat_guile_api_bar_item_search: search a bar item - */ - SCM weechat_guile_api_bar_item_search (SCM name) { @@ -4226,10 +3550,6 @@ weechat_guile_api_bar_item_search (SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_guile_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -4262,10 +3582,6 @@ weechat_guile_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat_guile_api_bar_item_new: add a new bar item - */ - SCM weechat_guile_api_bar_item_new (SCM name, SCM function, SCM data) { @@ -4287,10 +3603,6 @@ weechat_guile_api_bar_item_new (SCM name, SCM function, SCM data) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_bar_item_update: update a bar item on screen - */ - SCM weechat_guile_api_bar_item_update (SCM name) { @@ -4303,10 +3615,6 @@ weechat_guile_api_bar_item_update (SCM name) API_RETURN_OK; } -/* - * weechat_guile_api_bar_item_remove: remove a bar item - */ - SCM weechat_guile_api_bar_item_remove (SCM item) { @@ -4321,10 +3629,6 @@ weechat_guile_api_bar_item_remove (SCM item) API_RETURN_OK; } -/* - * weechat_guile_api_bar_search: search a bar - */ - SCM weechat_guile_api_bar_search (SCM name) { @@ -4340,10 +3644,6 @@ weechat_guile_api_bar_search (SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_bar_new: add a new bar - */ - SCM weechat_guile_api_bar_new (SCM args) { @@ -4402,10 +3702,6 @@ weechat_guile_api_bar_new (SCM args) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_bar_set: set a bar property - */ - SCM weechat_guile_api_bar_set (SCM bar, SCM property, SCM value) { @@ -4421,10 +3717,6 @@ weechat_guile_api_bar_set (SCM bar, SCM property, SCM value) API_RETURN_OK; } -/* - * weechat_guile_api_bar_update: update a bar on screen - */ - SCM weechat_guile_api_bar_update (SCM name) { @@ -4437,10 +3729,6 @@ weechat_guile_api_bar_update (SCM name) API_RETURN_OK; } -/* - * weechat_guile_api_bar_remove: remove a bar - */ - SCM weechat_guile_api_bar_remove (SCM bar) { @@ -4453,10 +3741,6 @@ weechat_guile_api_bar_remove (SCM bar) API_RETURN_OK; } -/* - * weechat_guile_api_command: send command to server - */ - SCM weechat_guile_api_command (SCM buffer, SCM command) { @@ -4472,10 +3756,6 @@ weechat_guile_api_command (SCM buffer, SCM command) API_RETURN_OK; } -/* - * weechat_guile_api_info_get: get info (as string) - */ - SCM weechat_guile_api_info_get (SCM info_name, SCM arguments) { @@ -4491,10 +3771,6 @@ weechat_guile_api_info_get (SCM info_name, SCM arguments) API_RETURN_STRING(result); } -/* - * weechat_guile_api_info_get_hashtable: get info (as hashtable) - */ - SCM weechat_guile_api_info_get_hashtable (SCM info_name, SCM hash) { @@ -4522,10 +3798,6 @@ weechat_guile_api_info_get_hashtable (SCM info_name, SCM hash) return result_alist; } -/* - * weechat_guile_api_infolist_new: create new infolist - */ - SCM weechat_guile_api_infolist_new () { @@ -4539,10 +3811,6 @@ weechat_guile_api_infolist_new () API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_new_item: create new item in infolist - */ - SCM weechat_guile_api_infolist_new_item (SCM infolist) { @@ -4558,11 +3826,6 @@ weechat_guile_api_infolist_new_item (SCM infolist) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_new_var_integer: create new integer variable in - * infolist - */ - SCM weechat_guile_api_infolist_new_var_integer (SCM infolist, SCM name, SCM value) { @@ -4581,11 +3844,6 @@ weechat_guile_api_infolist_new_var_integer (SCM infolist, SCM name, SCM value) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_new_var_string: create new string variable in - * infolist - */ - SCM weechat_guile_api_infolist_new_var_string (SCM infolist, SCM name, SCM value) { @@ -4604,11 +3862,6 @@ weechat_guile_api_infolist_new_var_string (SCM infolist, SCM name, SCM value) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_new_var_pointer: create new pointer variable in - * infolist - */ - SCM weechat_guile_api_infolist_new_var_pointer (SCM infolist, SCM name, SCM value) { @@ -4627,10 +3880,6 @@ weechat_guile_api_infolist_new_var_pointer (SCM infolist, SCM name, SCM value) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_new_var_time: create new time variable in infolist - */ - SCM weechat_guile_api_infolist_new_var_time (SCM infolist, SCM name, SCM value) { @@ -4649,10 +3898,6 @@ weechat_guile_api_infolist_new_var_time (SCM infolist, SCM name, SCM value) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_get: get list with infos - */ - SCM weechat_guile_api_infolist_get (SCM name, SCM pointer, SCM arguments) { @@ -4671,10 +3916,6 @@ weechat_guile_api_infolist_get (SCM name, SCM pointer, SCM arguments) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_next: move item pointer to next item in infolist - */ - SCM weechat_guile_api_infolist_next (SCM infolist) { @@ -4689,11 +3930,6 @@ weechat_guile_api_infolist_next (SCM infolist) API_RETURN_INT(value); } -/* - * weechat_guile_api_infolist_prev: move item pointer to previous item in - * infolist - */ - SCM weechat_guile_api_infolist_prev (SCM infolist) { @@ -4708,11 +3944,6 @@ weechat_guile_api_infolist_prev (SCM infolist) API_RETURN_INT(value); } -/* - * weechat_guile_api_infolist_reset_item_cursor: reset pointer to current item - * in infolist - */ - SCM weechat_guile_api_infolist_reset_item_cursor (SCM infolist) { @@ -4725,10 +3956,6 @@ weechat_guile_api_infolist_reset_item_cursor (SCM infolist) API_RETURN_OK; } -/* - * weechat_guile_api_infolist_fields: get list of fields for current item of infolist - */ - SCM weechat_guile_api_infolist_fields (SCM infolist) { @@ -4743,11 +3970,6 @@ weechat_guile_api_infolist_fields (SCM infolist) API_RETURN_STRING(result); } -/* - * weechat_guile_api_infolist_integer: get integer value of a variable in - * infolist - */ - SCM weechat_guile_api_infolist_integer (SCM infolist, SCM variable) { @@ -4763,10 +3985,6 @@ weechat_guile_api_infolist_integer (SCM infolist, SCM variable) API_RETURN_INT(value); } -/* - * weechat_guile_api_infolist_string: get string value of a variable in infolist - */ - SCM weechat_guile_api_infolist_string (SCM infolist, SCM variable) { @@ -4782,11 +4000,6 @@ weechat_guile_api_infolist_string (SCM infolist, SCM variable) API_RETURN_STRING(result); } -/* - * weechat_guile_api_infolist_pointer: get pointer value of a variable in - * infolist - */ - SCM weechat_guile_api_infolist_pointer (SCM infolist, SCM variable) { @@ -4803,10 +4016,6 @@ weechat_guile_api_infolist_pointer (SCM infolist, SCM variable) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_time: get time value of a variable in infolist - */ - SCM weechat_guile_api_infolist_time (SCM infolist, SCM variable) { @@ -4830,10 +4039,6 @@ weechat_guile_api_infolist_time (SCM infolist, SCM variable) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_infolist_free: free infolist - */ - SCM weechat_guile_api_infolist_free (SCM infolist) { @@ -4846,10 +4051,6 @@ weechat_guile_api_infolist_free (SCM infolist) API_RETURN_OK; } -/* - * weechat_guile_api_hdata_get: get hdata - */ - SCM weechat_guile_api_hdata_get (SCM name) { @@ -4865,10 +4066,6 @@ weechat_guile_api_hdata_get (SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hdata_get_var_offset: get offset of variable in hdata - */ - SCM weechat_guile_api_hdata_get_var_offset (SCM hdata, SCM name) { @@ -4884,11 +4081,6 @@ weechat_guile_api_hdata_get_var_offset (SCM hdata, SCM name) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_get_var_type_string: get type of variable as string - * in hdata - */ - SCM weechat_guile_api_hdata_get_var_type_string (SCM hdata, SCM name) { @@ -4904,11 +4096,6 @@ weechat_guile_api_hdata_get_var_type_string (SCM hdata, SCM name) API_RETURN_STRING(result); } -/* - * weechat_guile_api_hdata_get_var_array_size: get array size for variable in - * hdata - */ - SCM weechat_guile_api_hdata_get_var_array_size (SCM hdata, SCM pointer, SCM name) { @@ -4926,11 +4113,6 @@ weechat_guile_api_hdata_get_var_array_size (SCM hdata, SCM pointer, SCM name) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_get_var_array_size_string: get array size for variable - * in hdata (as string) - */ - SCM weechat_guile_api_hdata_get_var_array_size_string (SCM hdata, SCM pointer, SCM name) @@ -4949,10 +4131,6 @@ weechat_guile_api_hdata_get_var_array_size_string (SCM hdata, SCM pointer, API_RETURN_STRING(result); } -/* - * weechat_guile_api_hdata_get_var_hdata: get hdata for variable in hdata - */ - SCM weechat_guile_api_hdata_get_var_hdata (SCM hdata, SCM name) { @@ -4968,10 +4146,6 @@ weechat_guile_api_hdata_get_var_hdata (SCM hdata, SCM name) API_RETURN_STRING(result); } -/* - * weechat_guile_api_hdata_get_list: get list pointer in hdata - */ - SCM weechat_guile_api_hdata_get_list (SCM hdata, SCM name) { @@ -4988,10 +4162,6 @@ weechat_guile_api_hdata_get_list (SCM hdata, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hdata_check_pointer: check pointer with hdata/list - */ - SCM weechat_guile_api_hdata_check_pointer (SCM hdata, SCM list, SCM pointer) { @@ -5009,10 +4179,6 @@ weechat_guile_api_hdata_check_pointer (SCM hdata, SCM list, SCM pointer) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_move: move pointer to another element in list - */ - SCM weechat_guile_api_hdata_move (SCM hdata, SCM pointer, SCM count) { @@ -5031,11 +4197,6 @@ weechat_guile_api_hdata_move (SCM hdata, SCM pointer, SCM count) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hdata_char: get char value of a variable in structure - * using hdata - */ - SCM weechat_guile_api_hdata_char (SCM hdata, SCM pointer, SCM name) { @@ -5053,11 +4214,6 @@ weechat_guile_api_hdata_char (SCM hdata, SCM pointer, SCM name) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_integer: get integer value of a variable in structure - * using hdata - */ - SCM weechat_guile_api_hdata_integer (SCM hdata, SCM pointer, SCM name) { @@ -5075,11 +4231,6 @@ weechat_guile_api_hdata_integer (SCM hdata, SCM pointer, SCM name) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_long: get long value of a variable in structure using - * hdata - */ - SCM weechat_guile_api_hdata_long (SCM hdata, SCM pointer, SCM name) { @@ -5097,11 +4248,6 @@ weechat_guile_api_hdata_long (SCM hdata, SCM pointer, SCM name) API_RETURN_LONG(value); } -/* - * weechat_guile_api_hdata_string: get string value of a variable in structure - * using hdata - */ - SCM weechat_guile_api_hdata_string (SCM hdata, SCM pointer, SCM name) { @@ -5119,11 +4265,6 @@ weechat_guile_api_hdata_string (SCM hdata, SCM pointer, SCM name) API_RETURN_STRING(result); } -/* - * weechat_guile_api_hdata_pointer: get pointer value of a variable in structure - * using hdata - */ - SCM weechat_guile_api_hdata_pointer (SCM hdata, SCM pointer, SCM name) { @@ -5142,11 +4283,6 @@ weechat_guile_api_hdata_pointer (SCM hdata, SCM pointer, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hdata_time: get time value of a variable in structure using - * hdata - */ - SCM weechat_guile_api_hdata_time (SCM hdata, SCM pointer, SCM name) { @@ -5168,11 +4304,6 @@ weechat_guile_api_hdata_time (SCM hdata, SCM pointer, SCM name) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_hdata_hashtable: get hashtable value of a variable in - * structure using hdata - */ - SCM weechat_guile_api_hdata_hashtable (SCM hdata, SCM pointer, SCM name) { @@ -5191,10 +4322,6 @@ weechat_guile_api_hdata_hashtable (SCM hdata, SCM pointer, SCM name) return result_alist; } -/* - * weechat_guile_api_hdata_update: update data in a hdata - */ - SCM weechat_guile_api_hdata_update (SCM hdata, SCM pointer, SCM hashtable) { @@ -5220,10 +4347,6 @@ weechat_guile_api_hdata_update (SCM hdata, SCM pointer, SCM hashtable) API_RETURN_INT(value); } -/* - * weechat_guile_api_hdata_get_string: get hdata property as string - */ - SCM weechat_guile_api_hdata_get_string (SCM hdata, SCM property) { @@ -5239,10 +4362,6 @@ weechat_guile_api_hdata_get_string (SCM hdata, SCM property) API_RETURN_STRING(result); } -/* - * weechat_guile_api_upgrade_new: create an upgrade file - */ - SCM weechat_guile_api_upgrade_new (SCM filename, SCM write) { @@ -5259,10 +4378,6 @@ weechat_guile_api_upgrade_new (SCM filename, SCM write) API_RETURN_STRING_FREE(result); } -/* - * weechat_guile_api_upgrade_write_object: write object in upgrade file - */ - SCM weechat_guile_api_upgrade_write_object (SCM upgrade_file, SCM object_id, SCM infolist) @@ -5281,11 +4396,6 @@ weechat_guile_api_upgrade_write_object (SCM upgrade_file, SCM object_id, API_RETURN_INT(rc); } -/* - * weechat_guile_api_upgrade_read_cb: callback for reading object in upgrade - * file - */ - int weechat_guile_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -5331,10 +4441,6 @@ weechat_guile_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_guile_api_upgrade_read: read upgrade file - */ - SCM weechat_guile_api_upgrade_read (SCM upgrade_file, SCM function, SCM data) { @@ -5355,10 +4461,6 @@ weechat_guile_api_upgrade_read (SCM upgrade_file, SCM function, SCM data) API_RETURN_INT(rc); } -/* - * weechat_guile_api_upgrade_close: close upgrade file - */ - SCM weechat_guile_api_upgrade_close (SCM upgrade_file) { @@ -5372,7 +4474,7 @@ weechat_guile_api_upgrade_close (SCM upgrade_file) } /* - * weechat_guile_api_module_init: init main module with API + * Initializes guile functions and constants. */ void diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index a46093167..f65b3e0bb 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -77,7 +77,7 @@ char *guile_action_remove_list = NULL; /* - * weechat_guile_stdout_flush: flush stdout + * Flushes stdout. */ void @@ -94,8 +94,7 @@ weechat_guile_stdout_flush () } /* - * weechat_guile_catch: execute scheme procedure with internal catch - * and return value + * Executes scheme procedure with internal catch and returns value. */ SCM @@ -112,7 +111,7 @@ weechat_guile_catch (void *procedure, void *data) } /* - * weechat_guile_scm_call_1: encapsulate call to scm_call_1 (to give arguments) + * Encapsulates call to scm_call_1 (to give arguments). */ SCM @@ -126,8 +125,7 @@ weechat_guile_scm_call_1 (void *proc) } /* - * weechat_guile_exec_function: execute scheme function (with optional args) - * and return value + * Executes scheme function (with optional args) and returns value. */ SCM @@ -154,8 +152,7 @@ weechat_guile_exec_function (const char *function, SCM args) } /* - * weechat_guile_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -179,7 +176,7 @@ weechat_guile_hashtable_map_cb (void *data, } /* - * weechat_guile_hashtable_to_alist: get Guile alist with a WeeChat hashtable + * Gets guile alist with a WeeChat hashtable. */ SCM @@ -197,9 +194,9 @@ weechat_guile_hashtable_to_alist (struct t_hashtable *hashtable) } /* - * weechat_guile_alist_to_hashtable: get WeeChat hashtable with Guile alist - * Note: hashtable has to be released after - * use with call to weechat_hashtable_free() + * Gets WeeChat hashtable with guile alist. + * + * Note: hashtable must be free after use. */ struct t_hashtable * @@ -246,7 +243,7 @@ weechat_guile_alist_to_hashtable (SCM alist, int size, const char *type_keys, } /* - * weechat_guile_exec: execute a Guile function + * Executes a guile function. */ void * @@ -345,7 +342,7 @@ weechat_guile_exec (struct t_plugin_script *script, } /* - * weechat_guile_module_init_script: init Guile module for script + * Initializes guile module for script. */ void @@ -372,7 +369,11 @@ weechat_guile_module_init_script (void *data) } /* - * weechat_guile_load: load a Guile script + * Loads a guile script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -433,7 +434,7 @@ weechat_guile_load (const char *filename) } /* - * weechat_guile_load_cb: callback for script_auto_load() function + * Callback for script_auto_load() function. */ void @@ -446,7 +447,7 @@ weechat_guile_load_cb (void *data, const char *filename) } /* - * weechat_guile_unload: unload a Guile script + * Unloads a guile script. */ void @@ -491,7 +492,7 @@ weechat_guile_unload (struct t_plugin_script *script) } /* - * weechat_guile_unload_name: unload a Guile script by name + * Unloads a guile script by name. */ void @@ -519,7 +520,7 @@ weechat_guile_unload_name (const char *name) } /* - * weechat_guile_unload_all: unload all Guile scripts + * Unloads all guile scripts. */ void @@ -532,7 +533,7 @@ weechat_guile_unload_all () } /* - * weechat_guile_reload_name: reload a Guile script by name + * Reloads a guile script by name. */ void @@ -567,7 +568,7 @@ weechat_guile_reload_name (const char *name) } /* - * weechat_guile_cmd: callback for "/guile" command + * Callback for command "/guile". */ int @@ -640,7 +641,7 @@ weechat_guile_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Guile script */ + /* load guile script */ path_script = plugin_script_search_path (weechat_guile_plugin, ptr_name); weechat_guile_load ((path_script) ? path_script : ptr_name); @@ -649,19 +650,19 @@ weechat_guile_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Guile script */ + /* reload one guile script */ weechat_guile_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Guile script */ + /* unload guile script */ weechat_guile_unload_name (ptr_name); } guile_quiet = 0; } else if (weechat_strcasecmp (argv[1], "eval") == 0) { - /* eval Guile code */ + /* eval guile code */ value = weechat_guile_catch (scm_c_eval_string, argv_eol[2]); if (!SCM_EQ_P (value, SCM_UNDEFINED) && !SCM_EQ_P (value, SCM_UNSPECIFIED)) @@ -684,7 +685,7 @@ weechat_guile_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_guile_completion_cb: callback for script completion + * Adds guile scripts to completion list. */ int @@ -703,7 +704,7 @@ weechat_guile_completion_cb (void *data, const char *completion_item, } /* - * weechat_guile_hdata_cb: callback for hdata + * Returns hdata for guile scripts. */ struct t_hdata * @@ -718,7 +719,7 @@ weechat_guile_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_guile_infolist_cb: callback for infolist + * Returns infolist with guile scripts. */ struct t_infolist * @@ -742,8 +743,7 @@ weechat_guile_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_guile_signal_debug_dump_cb: dump Guile plugin data in WeeChat log - * file + * Dumps guile plugin data in WeeChat log file. */ int @@ -765,8 +765,7 @@ weechat_guile_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_guile_signal_buffer_closed_cb: callback called when a buffer is - * closed + * Callback called when a buffer is closed. */ int @@ -786,7 +785,7 @@ weechat_guile_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_guile_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -820,8 +819,7 @@ weechat_guile_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_guile_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -856,7 +854,7 @@ weechat_guile_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_guile_port_fill_input: fill input + * Fills input. */ int @@ -869,7 +867,7 @@ weechat_guile_port_fill_input (SCM port) } /* - * weechat_guile_port_write: write + * Write. */ void @@ -911,7 +909,7 @@ weechat_guile_port_write (SCM port, const void *data, size_t size) } /* - * weechat_plugin_init: initialize Guile plugin + * Initializes guile plugin. */ int @@ -952,7 +950,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: shutdown Guile interface + * Ends guile plugin. */ int diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 48f647d63..8ca00a302 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -36,7 +36,7 @@ /* - * irc_bar_item_away: bar item with away indicator + * Returns content of bar item "away": bar item with away indicator. */ char * @@ -93,7 +93,7 @@ irc_bar_item_away (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_buffer_title: bar item with buffer title + * Returns content of bar item "buffer_title": bar item with buffer title. */ char * @@ -130,7 +130,7 @@ irc_bar_item_buffer_title (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_buffer_plugin: bar item with buffer plugin + * Returns content of bar item "buffer_plugin": bar item with buffer plugin. */ char * @@ -185,7 +185,7 @@ irc_bar_item_buffer_plugin (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_buffer_name: bar item with buffer name + * Returns content of bar item "buffer_name": bar item with buffer name. */ char * @@ -266,7 +266,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_buffer_modes: bar item with buffer modes + * Returns content of bar item "buffer_modes": bar item with buffer modes. */ char * @@ -330,7 +330,8 @@ irc_bar_item_buffer_modes (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_channel: bar item with channel name (without modes) + * Returns content of bar item "irc_channel": bar item with channel name + * (without modes). */ char * @@ -411,7 +412,7 @@ irc_bar_item_channel (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_lag: bar item with lag value + * Returns content of bar item "lag": bar item with lag value. */ char * @@ -453,7 +454,7 @@ irc_bar_item_lag (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_input_prompt: bar item with input prompt + * Returns content of bar item "input_prompt": bar item with input prompt. */ char * @@ -535,7 +536,7 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item, } /* - * irc_bar_item_focus_buffer_nicklist: focus on nicklist + * Focus on nicklist. */ struct t_hashtable * @@ -581,8 +582,7 @@ irc_bar_item_focus_buffer_nicklist (void *data, } /* - * irc_bar_item_buffer_switch: called on "buffer_switch" signal: refresh irc - * bar items (for root bars) + * Callback for signal "buffer_switch": refreshes irc bar items (for root bars). */ int @@ -607,7 +607,7 @@ irc_bar_item_buffer_switch (void *data, const char *signal, } /* - * irc_bar_item_init: initialize IRC bar items + * Initializes IRC bar items. */ void diff --git a/src/plugins/irc/irc-buffer.c b/src/plugins/irc/irc-buffer.c index a23145d4a..c87a784ea 100644 --- a/src/plugins/irc/irc-buffer.c +++ b/src/plugins/irc/irc-buffer.c @@ -37,9 +37,8 @@ /* - * irc_buffer_get_server_and_channel: get IRC server and channel pointers with - * a buffer pointer - * (buffer may be a server or a channel) + * Gets IRC server and channel pointers with a buffer pointer (buffer may be a + * server or a channel). */ void @@ -87,7 +86,7 @@ irc_buffer_get_server_and_channel (struct t_gui_buffer *buffer, } /* - * irc_buffer_build_name: build buffer name with a server and a channel + * Builds buffer name with a server and a channel. */ char * @@ -110,7 +109,7 @@ irc_buffer_build_name (const char *server, const char *channel) } /* - * irc_buffer_close_cb: callback called when a buffer is closed + * Callback called when a buffer is closed. */ int @@ -162,12 +161,14 @@ irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * irc_buffer_nickcmp_cb: callback for comparing nick in nicklist - * (called when searching a nick in nicklist) - * Return (according to casemapping of irc server): - * 0 if nick1 == nick2 - * -1 if nick1 < nick2 - * +1 if nick1 > nick2 + * Callback for comparing two nicks in nicklist (called when searching a nick in + * nicklist). + * The "casemapping" of server is used in comparison. + * + * Returns: + * -1: nick1 < nick2 + * 0: nick1 == nick2 + * 1: nick2 > nick2 */ int @@ -185,9 +186,10 @@ irc_buffer_nickcmp_cb (void *data, } /* - * irc_buffer_search_first_for_all_servers: search first server buffer that - * will be used to merge all IRC - * server buffers + * Searches for first server buffer that will be used to merge all IRC server + * buffers. + * + * Returns pointer to buffer found, NULL if not found. */ struct t_gui_buffer * diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 3b58896ce..67e971817 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -41,9 +41,11 @@ /* - * irc_channel_valid: check if a channel pointer exists for a server - * return 1 if channel exists - * 0 if channel is not found + * Checks if a channel pointer is valid for a server. + * + * Returns: + * 1: channel exists for server + * 0: channel does not exist for server */ int @@ -66,7 +68,7 @@ irc_channel_valid (struct t_irc_server *server, struct t_irc_channel *channel) } /* - * irc_channel_move_near_server: move new channel/pv buffer near server + * Moves new channel/pv buffer near server. */ void @@ -140,8 +142,9 @@ irc_channel_move_near_server (struct t_irc_server *server, int channel_type, } /* - * irc_channel_new: allocate a new channel for a server and add it to channels - * list + * Creates a new channel in a server. + * + * Returns pointer to new channel, NULL if error. */ struct t_irc_channel * @@ -353,7 +356,7 @@ irc_channel_new (struct t_irc_server *server, int channel_type, } /* - * irc_channel_set_topic: set topic for a channel + * Sets topic for a channel. */ void @@ -368,7 +371,7 @@ irc_channel_set_topic (struct t_irc_channel *channel, const char *topic) } /* - * irc_channel_set_modes: set modes for a channel + * Sets modes for a channel. */ void @@ -381,7 +384,9 @@ irc_channel_set_modes (struct t_irc_channel *channel, const char *modes) } /* - * irc_channel_search: returns pointer on a channel with name + * Searches for a channel by name. + * + * Returns pointer to channel found, NULL if not found. */ struct t_irc_channel * @@ -402,7 +407,11 @@ irc_channel_search (struct t_irc_server *server, const char *channel_name) } /* - * irc_channel_is_channel: returns 1 if string is a channel for given server + * Checks if a string is a valid channel name. + * + * Returns: + * 1: string is a channel name + * 0: string is not a channel name */ int @@ -422,7 +431,7 @@ irc_channel_is_channel (struct t_irc_server *server, const char *string) } /* - * irc_channel_remove_away: remove away for all nicks on a channel + * Removes away for all nicks on a channel. */ void @@ -441,7 +450,7 @@ irc_channel_remove_away (struct t_irc_server *server, } /* - * irc_channel_check_away: check for away on a channel + * Checks for away on a channel. */ void @@ -464,7 +473,7 @@ irc_channel_check_away (struct t_irc_server *server, } /* - * irc_channel_set_away: set/unset away status for a channel + * Sets/unsets away status for a channel. */ void @@ -483,7 +492,7 @@ irc_channel_set_away (struct t_irc_server *server, } /* - * irc_channel_nick_speaking_add_to_list: add a nick speaking on a channel + * Adds a nick speaking on a channel. */ void @@ -522,7 +531,7 @@ irc_channel_nick_speaking_add_to_list (struct t_irc_channel *channel, } /* - * irc_channel_nick_speaking_add: add a nick speaking on a channel + * Adds a nick speaking on a channel. */ void @@ -540,7 +549,7 @@ irc_channel_nick_speaking_add (struct t_irc_channel *channel, } /* - * irc_channel_nick_speaking_rename: rename a nick speaking on a channel + * Renames a nick speaking on a channel. */ void @@ -563,8 +572,9 @@ irc_channel_nick_speaking_rename (struct t_irc_channel *channel, } /* - * irc_channel_nick_speaking_time_search: search a nick speaking time on a - * channel + * Searches for a nick speaking time on a channel. + * + * Returns pointer to nick speaking time, NULL if not found. */ struct t_irc_channel_speaking * @@ -595,7 +605,7 @@ irc_channel_nick_speaking_time_search (struct t_irc_server *server, } /* - * irc_channel_nick_speaking_time_free: free a nick speaking on a channel + * Frees a nick speaking on a channel. */ void @@ -620,7 +630,7 @@ irc_channel_nick_speaking_time_free (struct t_irc_channel *channel, } /* - * irc_channel_nick_speaking_time_free_all: free all nick speaking on a channel + * Frees all nick speaking on a channel. */ void @@ -634,7 +644,7 @@ irc_channel_nick_speaking_time_free_all (struct t_irc_channel *channel) } /* - * irc_channel_nick_speaking_time_remove_old: remove old nicks speaking + * Removes old nicks speaking. */ void @@ -656,7 +666,7 @@ irc_channel_nick_speaking_time_remove_old (struct t_irc_channel *channel) } /* - * irc_channel_nick_speaking_time_add: add a nick speaking time on a channel + * Adds a nick speaking time on a channel. */ void @@ -690,8 +700,7 @@ irc_channel_nick_speaking_time_add (struct t_irc_server *server, } /* - * irc_channel_nick_speaking_time_rename: rename a nick speaking time on a - * channel + * Renames a nick speaking time on a channel. */ void @@ -714,7 +723,7 @@ irc_channel_nick_speaking_time_rename (struct t_irc_server *server, } /* - * irc_channel_rejoin: rejoin a channel (for example after kick) + * Rejoins a channel (for example after kick). */ void @@ -731,7 +740,7 @@ irc_channel_rejoin (struct t_irc_server *server, struct t_irc_channel *channel) } /* - * irc_channel_autorejoin_cb: callback for autorejoin on a channel + * Callback for autorejoin on a channel. */ int @@ -770,9 +779,8 @@ irc_channel_autorejoin_cb (void *data, int remaining_calls) } /* - * irc_channel_display_nick_back_in_pv: display a message in pv buffer if nick - * is back and if private has flag - * "has_quit_server" + * Displays a message in pv buffer if nick is back and if private has flag + * "has_quit_server". */ void @@ -813,7 +821,7 @@ irc_channel_display_nick_back_in_pv (struct t_irc_server *server, } /* - * irc_channel_free: free a channel and remove it from channels list + * Frees a channel and remove it from channels list. */ void @@ -870,7 +878,7 @@ irc_channel_free (struct t_irc_server *server, struct t_irc_channel *channel) } /* - * irc_channel_free_all: free all allocated channels for a server + * Frees all channels for a server. */ void @@ -883,7 +891,7 @@ irc_channel_free_all (struct t_irc_server *server) } /* - * irc_channel_hdata_channel_cb: return hdata for channel + * Returns hdata for channel. */ struct t_hdata * @@ -928,7 +936,7 @@ irc_channel_hdata_channel_cb (void *data, const char *hdata_name) } /* - * irc_channel_hdata_channel_speaking_cb: return hdata for channel_speaking + * Returns hdata for channel_speaking. */ struct t_hdata * @@ -952,8 +960,11 @@ irc_channel_hdata_channel_speaking_cb (void *data, const char *hdata_name) } /* - * irc_channel_add_to_infolist: add a channel in an infolist - * return 1 if ok, 0 if error + * Adds a channel in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1055,7 +1066,7 @@ irc_channel_add_to_infolist (struct t_infolist *infolist, } /* - * irc_channel_print_log: print channel infos in log (usually for crash dump) + * Prints channel infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c index 510dec15a..a3ffb19c1 100644 --- a/src/plugins/irc/irc-color.c +++ b/src/plugins/irc/irc-color.c @@ -53,10 +53,12 @@ char *irc_color_to_weechat[IRC_NUM_COLORS] = /* - * irc_color_decode: replace IRC colors by WeeChat colors - * if keep_colors == 0: remove any color/style in message - * otherwise: keep colors - * Note: after use, string returned has to be free() + * Replaces IRC colors by WeeChat colors. + * + * If keep_colors == 0: removes any color/style in message otherwise keeps + * colors. + * + * Note: result must be freed after use. */ char * @@ -261,9 +263,9 @@ irc_color_decode (const char *string, int keep_colors) } /* - * irc_color_decode_for_user_entry: parses a message (coming from IRC server), - * and replaces colors/bold/.. by ^C, ^B, .. - * Note: after use, string returned has to be free() + * Replaces IRC color codes by codes for command line. + * + * Note: result must be freed after use. */ char * @@ -327,11 +329,12 @@ irc_color_decode_for_user_entry (const char *string) } /* - * irc_color_encode: parses a message (entered by user), and - * encode special chars (^Cb, ^Cc, ..) in IRC colors - * if keep_colors == 0: remove any color/style in message - * otherwise: keep colors - * Note: after use, string returned has to be free() + * Replaces color codes in command line by IRC color codes. + * + * If keep_colors == 0, remove any color/style in message, otherwise keeps + * colors. + * + * Note: result must be freed after use. */ char * @@ -422,10 +425,10 @@ irc_color_encode (const char *string, int keep_colors) } /* - * irc_color_modifier_cb: callback for modifiers "irc_color_decode" and - * "irc_color_encode" - * This modifier can be used by other plugins to - * decode/encode IRC colors in messages + * Callback for modifiers "irc_color_decode" and "irc_color_encode". + * + * This modifier can be used by other plugins to decode/encode IRC colors in + * messages. */ char * @@ -450,8 +453,9 @@ irc_color_modifier_cb (void *data, const char *modifier, } /* - * irc_color_for_tags: return color name for tags (replace "," by ":") - * Note: result must be freed after use + * Returns color name for tags (replace "," by ":"). + * + * Note: result must be freed after use. */ char * diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 396b7e257..2a8327e85 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -51,7 +51,7 @@ /* - * irc_command_mode_nicks: send mode change for many nicks on a channel + * Sends mode change for many nicks on a channel. */ void @@ -83,7 +83,8 @@ irc_command_mode_nicks (struct t_irc_server *server, const char *channel, } /* - * irc_command_admin: find information about the administrator of the server + * Callback for command "/admin": finds information about the administrator of + * the server. */ int @@ -112,9 +113,9 @@ irc_command_admin (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_exec_all_channels: execute a command on all channels - * if server is NULL, command is executed on all - * channels of all connected servers + * Executes a command on all channels. + * + * If server is NULL, executes command on all channels of all connected servers. */ void @@ -186,8 +187,8 @@ irc_command_exec_all_channels (struct t_irc_server *server, } /* - * irc_command_allchan: execute a command on all channels of all connected - * servers + * Callback for command "/allchan": executes a command on all channels of all + * connected servers. */ int @@ -236,7 +237,7 @@ irc_command_allchan (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_exec_all_servers: execute a command on all connected channels + * Executes a command on all connected channels. */ void @@ -295,7 +296,7 @@ irc_command_exec_all_servers (const char *exclude_servers, const char *command) } /* - * irc_command_allserv: execute a command on all connected servers + * Callback for command "/allserv": executes a command on all connected servers. */ int @@ -335,7 +336,7 @@ irc_command_allserv (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_me_channel_display: display a ctcp action on channel + * Displays a ctcp action on a channel. */ void @@ -367,7 +368,7 @@ irc_command_me_channel_display (struct t_irc_server *server, } /* - * irc_command_me_channel: send a ctcp action to a channel + * Sends a ctcp action to a channel. */ void @@ -403,7 +404,7 @@ irc_command_me_channel (struct t_irc_server *server, } /* - * irc_command_me_all_channels: send a ctcp action to all channels of a server + * Sends a ctcp action to all channels of a server. */ void @@ -420,7 +421,7 @@ irc_command_me_all_channels (struct t_irc_server *server, const char *arguments) } /* - * irc_command_away_server: toggle away status for one server + * Toggles away status for one server. */ void @@ -558,7 +559,7 @@ irc_command_away_server (struct t_irc_server *server, const char *arguments, } /* - * irc_command_away: toggle away status + * Callback for command "/away": toggles away status. */ int @@ -599,7 +600,7 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_run_away: catch command /away when it is run + * Callback for command /away when it's run ("command_run" hooked). */ int @@ -626,7 +627,7 @@ irc_command_run_away (void *data, struct t_gui_buffer *buffer, } /* - * irc_command_ban: bans nicks or hosts + * Callback for command "/ban": bans nicks or hosts. */ int @@ -708,8 +709,11 @@ irc_command_ban (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_connect_one_server: connect to one server - * return 0 if error, 1 if ok + * Connects to one server. + * + * Returns: + * 1: OK + * 0: error */ int @@ -755,7 +759,7 @@ irc_command_connect_one_server (struct t_irc_server *server, } /* - * irc_command_connect: connect to server(s) + * Callback for command "/connect": connects to server(s). */ int @@ -934,7 +938,7 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_ctcp: send a ctcp message + * Callback for command "/ctcp": sends a ctcp message. */ int @@ -1014,7 +1018,7 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_cycle: leave and rejoin a channel + * Callback for command "/cycle": leaves and rejoins a channel. */ int @@ -1118,7 +1122,7 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_dcc: DCC control (file or chat) + * Callback for command "/dcc": DCC control (file or chat). */ int @@ -1227,7 +1231,8 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_dehalfop: remove half operator privileges from nickname(s) + * Callback for command "/dehalfop": removes half operator privileges from + * nickname(s). */ int @@ -1268,7 +1273,7 @@ irc_command_dehalfop (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_deop: remove operator privileges from nickname(s) + * Callback for command "/deop": removes operator privileges from nickname(s). */ int @@ -1309,7 +1314,7 @@ irc_command_deop (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_devoice: remove voice from nickname(s) + * Callback for command "/devoice": removes voice from nickname(s). */ int @@ -1350,7 +1355,7 @@ irc_command_devoice (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_die: shutdown the server + * Callback for command "/die": shutdowns the server. */ int @@ -1379,7 +1384,7 @@ irc_command_die (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_quit_server: send QUIT to a server + * Sends QUIT to a server. */ void @@ -1414,8 +1419,11 @@ irc_command_quit_server (struct t_irc_server *server, const char *arguments) } /* - * irc_command_disconnect_one_server: disconnect from a server - * return 0 if error, 1 if ok + * Disconnects from a server. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1451,7 +1459,7 @@ irc_command_disconnect_one_server (struct t_irc_server *server, } /* - * irc_command_disconnect: disconnect from server(s) + * Callback for command "/disconnect": disconnects from server(s). */ int @@ -1527,7 +1535,8 @@ irc_command_disconnect (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_halfop: give half operator privileges to nickname(s) + * Callback for command "/halfop": gives half operator privileges to + * nickname(s). */ int @@ -1568,7 +1577,7 @@ irc_command_halfop (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_ignore_display: display an ignore + * Displays an ignore. */ void @@ -1594,7 +1603,7 @@ irc_command_ignore_display (struct t_irc_ignore *ignore) } /* - * irc_command_ignore: add or remove ignore + * Callback for command "/ignore": adds or removes ignore. */ int @@ -1754,7 +1763,7 @@ irc_command_ignore (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_info: get information describing the server + * Callback for command "/info": gets information describing the server. */ int @@ -1783,7 +1792,7 @@ irc_command_info (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_invite: invite a nick on a channel + * Callback for command "/invite": invites a nick on a channel. */ int @@ -1846,7 +1855,7 @@ error: } /* - * irc_command_ison: check if a nickname is currently on IRC + * Callback for command "/ison": checks if a nickname is currently on IRC. */ int @@ -1874,7 +1883,7 @@ irc_command_ison (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_join_server: send JOIN command on a server + * Sends JOIN command to a server. */ void @@ -2008,7 +2017,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, } /* - * irc_command_join: join a new channel + * Callback for command "/join": joins a new channel. */ int @@ -2077,7 +2086,7 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_kick: forcibly remove a user from a channel + * Callback for command "/kick": forcibly removes a user from a channel. */ int @@ -2150,7 +2159,8 @@ irc_command_kick (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_kickban: forcibly remove a user from a channel and ban it + * Callback for command "/kickban": forcibly removes a user from a channel and + * bans it. */ int @@ -2265,7 +2275,7 @@ irc_command_kickban (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_kill: close client-server connection + * Callback for command "/kill": closes client-server connection. */ int @@ -2292,8 +2302,8 @@ irc_command_kill (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_links: list all servernames which are known by the server - * answering the query + * Callback for command "/links": lists all server names which are known by the + * server answering the query. */ int @@ -2322,7 +2332,7 @@ irc_command_links (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_list: close client-server connection + * Callback for command "/list": lists channels and their topic. */ int @@ -2420,7 +2430,8 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_lusers: get statistics about ths size of the IRC network + * Callback for command "/lusers": gets statistics about the size of the IRC + * network. */ int @@ -2449,7 +2460,7 @@ irc_command_lusers (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_map: show a graphical map of the IRC network + * Callback for command "/map": shows a graphical map of the IRC network. */ int @@ -2478,7 +2489,7 @@ irc_command_map (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_me: send a ctcp action to the current channel + * Callback for command "/me": sends a ctcp action to the current channel. */ int @@ -2507,7 +2518,7 @@ irc_command_me (void *data, struct t_gui_buffer *buffer, int argc, char **argv, } /* - * irc_command_mode_server: send MODE command on a server + * Sends MODE command on a server. */ void @@ -2533,7 +2544,7 @@ irc_command_mode_server (struct t_irc_server *server, } /* - * irc_command_mode: change mode for channel/nickname + * Callback for command "/mode": changes mode for channel/nickname. */ int @@ -2588,7 +2599,7 @@ irc_command_mode (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_motd: get the "Message Of The Day" + * Callback for command "/motd": gets the "Message Of The Day". */ int @@ -2617,7 +2628,7 @@ irc_command_motd (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_msg: send a message to a nick or channel + * Callback for command "/msg": sends a message to a nick or channel. */ int @@ -2815,7 +2826,7 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_names: list nicknames on channels + * Callback for command "/names": lists nicknames on channels. */ int @@ -2856,7 +2867,7 @@ irc_command_names (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_send_nick_server: change nickname on a server + * Changes nickname on a server. */ void @@ -2875,7 +2886,7 @@ irc_send_nick_server (struct t_irc_server *server, const char *nickname) } /* - * irc_command_nick: change nickname + * Callback for command "/nick": changes nickname. */ int @@ -2918,7 +2929,7 @@ irc_command_nick (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_notice: send notice message + * Callback for command "/notice": sends notice message. */ int @@ -3009,7 +3020,7 @@ irc_command_notice (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_notify: add or remove notify + * Callback for command "/notify": adds or removes notify. */ int @@ -3190,7 +3201,7 @@ irc_command_notify (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_op: give operator privileges to nickname(s) + * Callback for command "/op": gives operator privileges to nickname(s). */ int @@ -3231,7 +3242,7 @@ irc_command_op (void *data, struct t_gui_buffer *buffer, int argc, char **argv, } /* - * irc_command_oper: get oper privileges + * Callback for command "/oper": gets oper privileges. */ int @@ -3259,7 +3270,7 @@ irc_command_oper (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_part_channel: send a part message for a channel + * Sends a part message for a channel. */ void @@ -3293,7 +3304,7 @@ irc_command_part_channel (struct t_irc_server *server, const char *channel_name, } /* - * irc_command_part: leave a channel or close a private window + * Callback for command "/part": leaves a channel or close a private window. */ int @@ -3357,7 +3368,7 @@ irc_command_part (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_ping: ping a server + * Callback for command "/ping": pings a server. */ int @@ -3385,7 +3396,7 @@ irc_command_ping (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_pong: send pong answer to a daemon + * Callback for command "/pong": sends pong answer to a daemon. */ int @@ -3413,7 +3424,7 @@ irc_command_pong (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_query: start private conversation with a nick + * Callback for command "/query": starts private conversation with a nick. */ int @@ -3484,7 +3495,7 @@ irc_command_query (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_quiet: quiet nicks or hosts + * Callback for command "/quiet": quiets nicks or hosts. */ int @@ -3566,7 +3577,7 @@ irc_command_quiet (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_quote: send raw data to server + * Callback for command "/quote": sends raw data to server. */ int @@ -3606,8 +3617,11 @@ irc_command_quote (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_reconnect_one_server: reconnect to a server - * return 0 if error, 1 if ok + * Reconnects to a server. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3646,7 +3660,7 @@ irc_command_reconnect_one_server (struct t_irc_server *server, } /* - * irc_command_reconnect: reconnect to server(s) + * Callback for command "/reconnect": reconnects to server(s). */ int @@ -3738,7 +3752,7 @@ irc_command_reconnect (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_rehash: tell the server to reload its config file + * Callback for command "/rehash": tells the server to reload its config file. */ int @@ -3767,7 +3781,7 @@ irc_command_rehash (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_restart: tell the server to restart itself + * Callback for command "/restart": tells the server to restart itself. */ int @@ -3796,7 +3810,7 @@ irc_command_restart (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_sajoin: forces a user to join channel(s) + * Callback for command "/sajoin": forces a user to join channel(s). */ int @@ -3823,7 +3837,8 @@ irc_command_sajoin (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_samode: change mode on channel, without having operator status + * Callback for command "/samode": changes mode on channel, without having + * operator status. */ int @@ -3850,7 +3865,7 @@ irc_command_samode (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_sanick: forces a user to use another nick + * Callback for command "/sanick": forces a user to use another nick. */ int @@ -3877,7 +3892,7 @@ irc_command_sanick (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_sapart: forces a user to leave channel(s) + * Callback for command "/sapart": forces a user to leave channel(s). */ int @@ -3904,7 +3919,7 @@ irc_command_sapart (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_saquit: forces a user to quit server with a reason + * Callback for command "/saquit": forces a user to quit server with a reason. */ int @@ -3931,7 +3946,7 @@ irc_command_saquit (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_server: manage IRC servers + * Callback for command "/server": manages IRC servers. */ int @@ -4306,7 +4321,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_service: register a new service + * Callback for command "/service": registers a new service. */ int @@ -4334,7 +4349,8 @@ irc_command_service (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_servlist: list services currently connected to the network + * Callback for command "/servlist": lists services currently connected to the + * network. */ int @@ -4363,7 +4379,7 @@ irc_command_servlist (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_squery: deliver a message to a service + * Callback for command "/squery": delivers a message to a service. */ int @@ -4398,7 +4414,7 @@ irc_command_squery (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_squit: disconnect server links + * Callback for command "/squit": disconnects server links. */ int @@ -4423,7 +4439,7 @@ irc_command_squit (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_stats: query statistics about server + * Callback for command "/stats": queries statistics about server. */ int @@ -4452,8 +4468,8 @@ irc_command_stats (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_summon: give users who are on a host running an IRC server - * a message asking them to please join IRC + * Callback for command "/summon": gives users who are on a host running an IRC + * server a message asking them to please join IRC. */ int @@ -4481,7 +4497,7 @@ irc_command_summon (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_time: query local time from server + * Callback for command "/time": queries local time from server. */ int @@ -4510,7 +4526,7 @@ irc_command_time (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_topic: get/set topic for a channel + * Callback for command "/topic": gets/sets topic for a channel. */ int @@ -4581,7 +4597,7 @@ irc_command_topic (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_trace: find the route to specific server + * Callback for command "/trace": finds the route to specific server. */ int @@ -4610,7 +4626,7 @@ irc_command_trace (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_unban: unbans nicks or hosts + * Callback for command "/unban": unbans nicks or hosts. */ int @@ -4677,7 +4693,8 @@ irc_command_unban (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_userhost: return a list of information about nicknames + * Callback for command "/userhost": returns a list of information about + * nicknames. */ int @@ -4705,7 +4722,7 @@ irc_command_userhost (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_users: list of users logged into the server + * Callback for command "/users": list of users logged into the server. */ int @@ -4734,8 +4751,8 @@ irc_command_users (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_version: gives the version info of nick or server (current or - * specified) + * Callback for command "/version": gives the version info of nick or server + * (current or specified). */ int @@ -4773,7 +4790,7 @@ irc_command_version (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_voice: give voice to nickname(s) + * Callback for command "/voice": gives voice to nickname(s). */ int @@ -4813,7 +4830,7 @@ irc_command_voice (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_wallchops: send a notice to channel ops + * Callback for command "/wallchops": sends a notice to channel ops. */ int @@ -4928,8 +4945,8 @@ irc_command_wallchops (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_wallops: send a message to all currently connected users who - * have set the 'w' user mode for themselves + * Callback for command "/wallops": sends a message to all currently connected + * users who have set the 'w' user mode for themselves. */ int @@ -4957,7 +4974,8 @@ irc_command_wallops (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_who: generate a query which returns a list of information + * Callback for command "/who": generates a query which returns a list of + * information. */ int @@ -4986,7 +5004,7 @@ irc_command_who (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_whois: query information about user(s) + * Callback for command "/whois": queries information about user(s). */ int @@ -5039,7 +5057,8 @@ irc_command_whois (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_whowas: ask for information about a nickname which no longer exists + * Callback for command "/whowas": asks for information about a nickname which + * no longer exists. */ int @@ -5067,7 +5086,7 @@ irc_command_whowas (void *data, struct t_gui_buffer *buffer, int argc, } /* - * irc_command_init: init IRC commands (create hooks) + * Hooks IRC commands. */ void diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c index b22c29391..c98e4f083 100644 --- a/src/plugins/irc/irc-completion.c +++ b/src/plugins/irc/irc-completion.c @@ -39,7 +39,7 @@ /* - * irc_completion_server_cb: callback for completion with current server + * Adds current server to completion list. */ int @@ -63,8 +63,7 @@ irc_completion_server_cb (void *data, const char *completion_item, } /* - * irc_completion_server_nick_cb: callback for completion with self nick - * of current server + * Adds self nick of current server to completion list. */ int @@ -88,8 +87,7 @@ irc_completion_server_nick_cb (void *data, const char *completion_item, } /* - * irc_completion_server_channels_cb: callback for completion with channels - * of current server + * Adds channels of current server to completion list. */ int @@ -123,8 +121,7 @@ irc_completion_server_channels_cb (void *data, const char *completion_item, } /* - * irc_completion_server_privates_cb: callback for completion with privates - * of current server + * Adds privates of current server to completion list. */ int @@ -158,8 +155,7 @@ irc_completion_server_privates_cb (void *data, const char *completion_item, } /* - * irc_completion_server_nicks_cb: callback for completion with nicks - * of current server + * Adds nicks of current server to completion list. */ int @@ -201,7 +197,7 @@ irc_completion_server_nicks_cb (void *data, const char *completion_item, } /* - * irc_completion_servers_cb: callback for completion with servers + * Adds servers to completion list. */ int @@ -227,7 +223,7 @@ irc_completion_servers_cb (void *data, const char *completion_item, } /* - * irc_completion_channel_cb: callback for completion with current channel + * Adds current channel to completion list. */ int @@ -251,8 +247,7 @@ irc_completion_channel_cb (void *data, const char *completion_item, } /* - * irc_completion_channel_nicks_add_speakers: add recent speakers to completion - * list + * Adds recent speakers to completion list. */ void @@ -282,8 +277,7 @@ irc_completion_channel_nicks_add_speakers (struct t_gui_completion *completion, } /* - * irc_completion_channel_nicks_cb: callback for completion with nicks - * of current channel + * Adds nicks of current channel to completion list. */ int @@ -348,8 +342,7 @@ irc_completion_channel_nicks_cb (void *data, const char *completion_item, } /* - * irc_completion_channel_nicks_hosts_cb: callback for completion with nicks - * and hosts of current channel + * Adds nicks and hosts of current channel to completion list. */ int @@ -410,8 +403,7 @@ irc_completion_channel_nicks_hosts_cb (void *data, const char *completion_item, } /* - * irc_completion_channel_topic_cb: callback for completion with topic of - * current channel + * Adds topic of current channel to completion list. */ int @@ -466,8 +458,7 @@ irc_completion_channel_topic_cb (void *data, const char *completion_item, } /* - * irc_completion_channels_cb: callback for completion with channels - * of all servers + * Adds channels of all servers to completion list. */ int @@ -501,8 +492,7 @@ irc_completion_channels_cb (void *data, const char *completion_item, } /* - * irc_completion_privates_cb: callback for completion with privates - * of all servers + * Adds privates of all servers to completion list. */ int @@ -536,7 +526,7 @@ irc_completion_privates_cb (void *data, const char *completion_item, } /* - * irc_completion_msg_part_cb: callback for completion with default part message + * Adds default part message to completion list. */ int @@ -567,8 +557,7 @@ irc_completion_msg_part_cb (void *data, const char *completion_item, } /* - * irc_completion_ignores_numbers_cb: callback for completion with ignores - * numbers + * Adds ignore numbers to completion list. */ int @@ -596,8 +585,7 @@ irc_completion_ignores_numbers_cb (void *data, const char *completion_item, } /* - * irc_completion_notify_nicks_cb: callback for completion with nicks in notify - * list + * Adds nicks in notify list to completion list. */ int @@ -640,7 +628,7 @@ irc_completion_notify_nicks_cb (void *data, const char *completion_item, } /* - * irc_completion_init: init completion for IRC plugin + * Hooks completions. */ void diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 8539a35c0..d94c4ff96 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -148,6 +148,10 @@ struct t_hashtable *irc_config_hashtable_color_mirc_remap = NULL; int irc_config_write_temp_servers = 0; +/* + * Gets server pointer with name of option. + */ + struct t_irc_server * irc_config_get_server_from_option_name (const char *name) { @@ -174,8 +178,7 @@ irc_config_get_server_from_option_name (const char *name) } /* - * irc_config_compute_nick_colors: compute nick colors for all servers and - * channels + * Computes nick colors for all servers and channels. */ void @@ -216,8 +219,7 @@ irc_config_compute_nick_colors () } /* - * irc_config_set_nick_colors: set nick colors using option - * "weechat.color.chat_nick_colors" + * Sets nick colors using option "weechat.color.chat_nick_colors". */ void @@ -237,8 +239,7 @@ irc_config_set_nick_colors () } /* - * irc_config_change_nick_colors_cb: callback called when option - * "weechat.color.chat_nick_colors" is changed + * Callback for changes on option "weechat.color.chat_nick_colors". */ int @@ -257,9 +258,7 @@ irc_config_change_nick_colors_cb (void *data, const char *option, } /* - * irc_config_change_look_color_nicks_in_nicklist: called when the - * "color nicks in nicklist" - * option is changed + * Callback for changes on option "irc.look.color_nicks_in_nicklist". */ void @@ -274,8 +273,7 @@ irc_config_change_look_color_nicks_in_nicklist (void *data, } /* - * irc_config_change_look_server_buffer: called when the "one server buffer" - * option is changed + * Callback for changes on option "irc.look.server_buffer". */ void @@ -321,8 +319,7 @@ irc_config_change_look_server_buffer (void *data, } /* - * irc_config_change_look_item_away_message: called when the "item - * away message" option is changed + * Callback for changes on option "irc.look.item_away_message". */ void @@ -337,10 +334,7 @@ irc_config_change_look_item_away_message (void *data, } /* - * irc_config_change_look_item_channel_modes_hide_key: called when the - * "display channel modes - * hide key" option is - * changed + * Callback for changes on option "irc.look.item_channel_modes_hide_key". */ void @@ -355,8 +349,7 @@ irc_config_change_look_item_channel_modes_hide_key (void *data, } /* - * irc_config_change_look_item_nick_modes: called when the "display nick modes" - * option is changed + * Callback for changes on option "irc.look.item_nick_modes". */ void @@ -371,8 +364,7 @@ irc_config_change_look_item_nick_modes (void *data, } /* - * irc_config_change_look_item_nick_prefix: called when the "display nick - * prefix" option is changed + * Callback for changes on option "irc.look.item_nick_prefix". */ void @@ -387,8 +379,7 @@ irc_config_change_look_item_nick_prefix (void *data, } /* - * irc_config_change_look_highlight_tags: called when the "highlight tags" - * option is changed + * Callback for changes on option "irc.look.highlight_tags". */ void @@ -423,8 +414,7 @@ irc_config_change_look_highlight_tags (void *data, } /* - * irc_config_change_look_nick_color_force: called when the "nick color force" - * option is changed + * Callback for changes on option "irc.look.nick_color_force". */ void @@ -471,8 +461,7 @@ irc_config_change_look_nick_color_force (void *data, } /* - * irc_config_change_look_nick_color_stop_chars: called when the "nick color - * stop chars" option is changed + * Callback for changes on option "irc.look.nick_color_stop_chars". */ void @@ -487,9 +476,7 @@ irc_config_change_look_nick_color_stop_chars (void *data, } /* - * irc_config_change_look_item_display_server: called when the - * "item_display_server" option is - * changed + * Callback for changes on option "irc.look.item_display_server". */ void @@ -505,8 +492,7 @@ irc_config_change_look_item_display_server (void *data, } /* - * irc_config_change_look_topic_strip_colors: called when the "topic strip colors" - * option is changed + * Callback for changes on option "irc.look.topic_strip_colors". */ void @@ -521,8 +507,7 @@ irc_config_change_look_topic_strip_colors (void *data, } /* - * irc_config_change_color_input_nick: called when the color of input nick is - * changed + * Callback for changes on option "irc.color.input_nick". */ void @@ -537,8 +522,7 @@ irc_config_change_color_input_nick (void *data, } /* - * irc_config_change_color_item_away: called when the color of away item is - * changed + * Callback for changes on option "irc.color.item_away". */ void @@ -553,13 +537,12 @@ irc_config_change_color_item_away (void *data, } /* - * irc_config_change_color_item_buffer_modes: called when the color of buffer - * modes is changed + * Callback for changes on option "irc.color.item_channel_modes". */ void -irc_config_change_color_item_buffer_modes (void *data, - struct t_config_option *option) +irc_config_change_color_item_channel_modes (void *data, + struct t_config_option *option) { /* make C compiler happy */ (void) data; @@ -569,8 +552,8 @@ irc_config_change_color_item_buffer_modes (void *data, } /* - * irc_config_change_color_item_lag: called when the color of lag item is - * changed + * Callback for changes on options "irc.color.item_lag_counting" and + * "irc.color.item_lag_finished". */ void @@ -585,8 +568,7 @@ irc_config_change_color_item_lag (void *data, } /* - * irc_config_change_color_mirc_remap: called when the "mirc remap" option is - * changed + * Callback for changes on option "irc.color.mirc_remap". */ void @@ -630,8 +612,7 @@ irc_config_change_color_mirc_remap (void *data, struct t_config_option *option) } /* - * irc_config_change_color_nick_prefixes: called when the string with color of - * nick prefixes is changed + * Callback for changes on option "irc.color.nick_prefixes". */ void @@ -681,7 +662,7 @@ irc_config_change_color_nick_prefixes (void *data, } /* - * irc_config_change_network_lag_check: called when lag check is changed + * Callback for changes on option "irc.network.lag_check". */ void @@ -707,7 +688,7 @@ irc_config_change_network_lag_check (void *data, } /* - * irc_config_change_network_lag_min_show: called when lag min show is changed + * Callback for changes on option "irc.network.lag_min_show". */ void @@ -722,8 +703,7 @@ irc_config_change_network_lag_min_show (void *data, } /* - * irc_config_change_network_notify_check_ison: called when notify check ison - * is changed + * Callback for changes on option "irc.network.notify_check_ison". */ void @@ -738,8 +718,7 @@ irc_config_change_network_notify_check_ison (void *data, } /* - * irc_config_change_network_notify_check_whois: called when notify check whois - * is changed + * Callback for changes on option "irc.network.notify_check_whois". */ void @@ -754,8 +733,7 @@ irc_config_change_network_notify_check_whois (void *data, } /* - * irc_config_change_network_send_unknown_commands: called when "send_unknown_commands" - * is changed + * Callback for changes on option "irc.network.send_unknown_commands". */ void @@ -800,8 +778,7 @@ irc_config_change_network_send_unknown_commands (void *data, } /* - * irc_config_server_default_change_cb: callback called when a default server - * option is modified + * Callback called when a default server option is modified. */ void @@ -847,9 +824,9 @@ irc_config_server_default_change_cb (void *data, struct t_config_option *option) } /* - * irc_config_check_gnutls_priorities: check string with GnuTLS priorities - * return NULL if ok, or pointer to char - * with error in string + * Checks string with GnuTLS priorities. + * + * Returns NULL if OK, or pointer to char with error in string. */ const char * @@ -878,8 +855,7 @@ irc_config_check_gnutls_priorities (const char *priorities) } /* - * irc_config_server_check_value_cb: callback called to check a server option - * when it is modified + * Callback called to check a server option when it is modified. */ int @@ -917,7 +893,7 @@ irc_config_server_check_value_cb (void *data, } /* - * irc_config_server_change_cb: callback called when a server option is modified + * Callback called when a server option is modified. */ void @@ -962,11 +938,15 @@ irc_config_server_change_cb (void *data, struct t_config_option *option) } /* - * irc_config_server_default_check_notify: calback called when "notify" option - * from "server_default" section is - * changed: return 0 if a value is set - * This option is not used, only values - * in servers are used for notify. + * Callback called when "notify" option from "server_default" section is + * changed. + * + * This function is used to reject any value in the option (this option is not + * used, only values in servers are used for notify). + * + * Returns: + * 1: value is not set + * 0: value is set */ int @@ -985,7 +965,7 @@ irc_config_server_default_check_notify (void *data, } /* - * irc_config_reload: reload IRC configuration file + * Reloads IRC configuration file. */ int @@ -1041,7 +1021,7 @@ irc_config_reload (void *data, struct t_config_file *config_file) } /* - * irc_config_msgbuffer_create_option: set a message target buffer + * Sets a message target buffer. */ int @@ -1103,7 +1083,7 @@ irc_config_msgbuffer_create_option (void *data, } /* - * irc_config_ctcp_create_option: set a ctcp reply format + * Sets a ctcp reply format. */ int @@ -1182,8 +1162,11 @@ irc_config_ctcp_create_option (void *data, struct t_config_file *config_file, } /* - * irc_config_ignore_read_cb: read ignore option from configuration file - * return 1 if ok, 0 if error + * Reads ignore option from configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1221,7 +1204,7 @@ irc_config_ignore_read_cb (void *data, } /* - * irc_config_ignore_write_cb: write ignore section in configuration file + * Writes ignore section in IRC configuration file. */ int @@ -1252,8 +1235,7 @@ irc_config_ignore_write_cb (void *data, struct t_config_file *config_file, } /* - * irc_config_server_write_default_cb: write default server section in - * configuration file + * Writes default server section in IRC configuration file. */ int @@ -1296,7 +1278,9 @@ irc_config_server_write_default_cb (void *data, } /* - * irc_config_server_new_option: create a new option for a server + * Creates a new option for a server. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -1772,7 +1756,7 @@ irc_config_server_new_option (struct t_config_file *config_file, } /* - * irc_config_server_read_cb: read server option in configuration file + * Reads server option in IRC configuration file. */ int @@ -1848,7 +1832,7 @@ irc_config_server_read_cb (void *data, struct t_config_file *config_file, } /* - * irc_config_server_write_cb: write server section in configuration file + * Writes server section in IRC configuration file. */ int @@ -1882,7 +1866,7 @@ irc_config_server_write_cb (void *data, struct t_config_file *config_file, } /* - * irc_config_server_create_default_options: create default options for servers + * Creates default options for servers. */ void @@ -1960,8 +1944,11 @@ irc_config_server_create_default_options (struct t_config_section *section) } /* - * irc_config_init: init IRC configuration file - * return: 1 if ok, 0 if error + * Initializes IRC configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -2430,7 +2417,7 @@ irc_config_init () "item_channel_modes", "color", N_("color for channel modes, near channel name"), NULL, -1, 0, "default", NULL, 0, NULL, NULL, - &irc_config_change_color_item_buffer_modes, NULL, NULL, NULL); + &irc_config_change_color_item_channel_modes, NULL, NULL, NULL); irc_config_color_item_lag_counting = weechat_config_new_option ( irc_config_file, ptr_section, "item_lag_counting", "color", @@ -2639,7 +2626,7 @@ irc_config_init () } /* - * irc_config_read: read IRC configuration file + * Reads IRC configuration file. */ int @@ -2661,7 +2648,7 @@ irc_config_read () } /* - * irc_config_write: write IRC configuration file + * Writes IRC configuration file. */ int @@ -2673,7 +2660,7 @@ irc_config_write (int write_temp_servers) } /* - * irc_config_free: free IRC configuration + * Frees IRC configuration. */ void diff --git a/src/plugins/irc/irc-ctcp.c b/src/plugins/irc/irc-ctcp.c index 29c5bc6ac..bf9d2b7c3 100644 --- a/src/plugins/irc/irc-ctcp.c +++ b/src/plugins/irc/irc-ctcp.c @@ -53,8 +53,9 @@ struct t_irc_ctcp_reply irc_ctcp_default_reply[] = /* - * irc_ctcp_get_default_reply: get default reply for a CTCP query - * return NULL if CTCP is unknown + * Gets default reply for a CTCP query. + * + * Returns NULL if CTCP is unknown. */ const char * @@ -73,7 +74,7 @@ irc_ctcp_get_default_reply (const char *ctcp) } /* - * irc_ctcp_get_reply: get reply for a CTCP query + * Gets reply for a CTCP query. */ const char * @@ -84,14 +85,14 @@ irc_ctcp_get_reply (struct t_irc_server *server, const char *ctcp) snprintf (option_name, sizeof (option_name), "%s.%s", server->name, ctcp); - /* search for CTCP in config file, for server */ + /* search for CTCP in configuration file, for server */ ptr_option = weechat_config_search_option (irc_config_file, irc_config_section_ctcp, option_name); if (ptr_option) return weechat_config_string (ptr_option); - /* search for CTCP in config file */ + /* search for CTCP in configuration file */ ptr_option = weechat_config_search_option (irc_config_file, irc_config_section_ctcp, ctcp); @@ -106,7 +107,7 @@ irc_ctcp_get_reply (struct t_irc_server *server, const char *ctcp) } /* - * irc_ctcp_display_request: display CTCP requested by a nick + * Displays CTCP requested by a nick. */ void @@ -142,7 +143,7 @@ irc_ctcp_display_request (struct t_irc_server *server, } /* - * irc_ctcp_display_reply_from_nick: display reply from a nick to a CTCP query + * Displays reply from a nick to a CTCP query. */ void @@ -265,7 +266,7 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server, time_t date, } /* - * irc_ctcp_reply_to_nick: display CTCP replied to a nick + * Displays CTCP replied to a nick. */ void @@ -327,7 +328,7 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server, } /* - * irc_ctcp_replace_variables: replace variables in CTCP format + * Replaces variables in CTCP format. */ char * @@ -430,8 +431,7 @@ irc_ctcp_replace_variables (struct t_irc_server *server, const char *format) } /* - * irc_ctcp_dcc_filename_without_quotes: return filename for DCC, without - * double quotes + * Returns filename for DCC, without double quotes. */ char * @@ -449,7 +449,7 @@ irc_ctcp_dcc_filename_without_quotes (const char *filename) } /* - * irc_ctcp_recv_dcc: parse CTCP DCC + * Parses CTCP DCC. */ void @@ -896,7 +896,7 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick, } /* - * irc_ctcp_recv: receive a CTCP and if needed reply to query + * Receives a CTCP and if needed replies to query. */ void diff --git a/src/plugins/irc/irc-debug.c b/src/plugins/irc/irc-debug.c index 6c5706e4f..248a4ff31 100644 --- a/src/plugins/irc/irc-debug.c +++ b/src/plugins/irc/irc-debug.c @@ -33,7 +33,7 @@ /* - * irc_debug_signal_debug_dump_cb: dump IRC data in WeeChat log file + * Dumps IRC data in WeeChat log file. */ int @@ -65,7 +65,7 @@ irc_debug_signal_debug_dump_cb (void *data, const char *signal, } /* - * irc_debug_init: initialize debug for IRC plugin + * Initializes debug for IRC plugin. */ void diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index 223a629b6..acb7dd1bb 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -38,7 +38,7 @@ /* - * irc_display_hide_password: hide IRC password(s) in a string + * Hides IRC password(s) in a string. */ void @@ -102,7 +102,7 @@ irc_display_hide_password (char *string, int look_for_nickserv) } /* - * irc_display_away: display away on all channels of all servers + * Displays away on all channels of all servers. */ void @@ -131,7 +131,7 @@ irc_display_away (struct t_irc_server *server, const char *string1, } /* - * irc_display_server: display server infos + * Displays server options. */ void diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c index b13a3c23e..37c43ab85 100644 --- a/src/plugins/irc/irc-ignore.c +++ b/src/plugins/irc/irc-ignore.c @@ -37,9 +37,11 @@ struct t_irc_ignore *last_irc_ignore = NULL; /* last ignore in list */ /* - * irc_ignore_valid: check if an ignore pointer exists - * return 1 if ignore exists - * 0 if ignore is not found + * Checks if an ignore pointer is valid. + * + * Returns: + * 1: ignore exists + * 0: ignore does not exist */ int @@ -62,7 +64,9 @@ irc_ignore_valid (struct t_irc_ignore *ignore) } /* - * irc_ignore_search: search an ignore + * Searches for an ignore. + * + * Returns pointer to ignore found, NULL if not found. */ struct t_irc_ignore * @@ -92,7 +96,9 @@ irc_ignore_search (const char *mask, const char *server, const char *channel) } /* - * irc_ignore_search_by_number: search an ignore by number (first is #1) + * Searches for an ignore by number (first is #1). + * + * Returns pointer to ignore found, NULL if not found. */ struct t_irc_ignore * @@ -112,7 +118,9 @@ irc_ignore_search_by_number (int number) } /* - * irc_ignore_new: add new ignore + * Adds a new ignore. + * + * Returns pointer to new ignore, NULL if error. */ struct t_irc_ignore * @@ -179,10 +187,11 @@ irc_ignore_new (const char *mask, const char *server, const char *channel) } /* - * irc_ignore_check: check if a message (from an IRC server) should be ignored - * or not - * return: 1 if message will be ignored - * 0 if message will be displayed (NOT ignored) + * Checks if a message (from an IRC server) should be ignored or not. + * + * Returns: + * 1: message must be ignored + * 0: message must not be ignored */ int @@ -246,7 +255,7 @@ irc_ignore_check (struct t_irc_server *server, const char *channel, } /* - * irc_ignore_free: remove an ignore + * Removes an ignore. */ void @@ -294,7 +303,7 @@ irc_ignore_free (struct t_irc_ignore *ignore) } /* - * irc_ignore_free_all: remove all ignore + * Removes all ignores. */ void @@ -307,7 +316,7 @@ irc_ignore_free_all () } /* - * irc_ignore_hdata_ignore_cb: return hdata for ignore + * Returns hdata for ignore. */ struct t_hdata * @@ -336,8 +345,11 @@ irc_ignore_hdata_ignore_cb (void *data, const char *hdata_name) } /* - * irc_ignore_add_to_infolist: add an ignore in an infolist - * return 1 if ok, 0 if error + * Adds an ignore in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -364,7 +376,7 @@ irc_ignore_add_to_infolist (struct t_infolist *infolist, } /* - * irc_ignore_print_log: print ignore infos in log (usually for crash dump) + * Prints ignore infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index d6ac145cb..fc9be774b 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -39,8 +39,7 @@ /* - * irc_info_create_string_with_pointer: create a string with a pointer inside - * an IRC structure + * Creates a string with a pointer inside an IRC structure. */ void @@ -62,7 +61,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer) } /* - * irc_info_get_info_cb: callback called when IRC info is asked + * Returns IRC info. */ const char * @@ -243,8 +242,7 @@ irc_info_get_info_cb (void *data, const char *info_name, } /* - * irc_info_get_info_hashtable_cb: callback called when IRC info_hashtable is - * asked + * Returns IRC info with hashtable. */ struct t_hashtable * @@ -288,7 +286,7 @@ irc_info_get_info_hashtable_cb (void *data, const char *info_name, } /* - * irc_info_get_infolist_cb: callback called when IRC infolist is asked + * Returns infolist with IRC info. */ struct t_infolist * @@ -572,7 +570,7 @@ irc_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * irc_info_init: initialize info and infolist hooks for IRC plugin + * Hooks info, infolist, hdata IRC plugin. */ void diff --git a/src/plugins/irc/irc-input.c b/src/plugins/irc/irc-input.c index 1c745d756..063fae8d2 100644 --- a/src/plugins/irc/irc-input.c +++ b/src/plugins/irc/irc-input.c @@ -38,7 +38,7 @@ /* - * irc_input_user_message_display: display user message + * Displays user message. */ void @@ -84,10 +84,9 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text) } /* - * irc_input_send_user_message: send a PRIVMSG message, and split it if message - * size is > 512 bytes - * Warning: this function makes temporarirly - * changes in "message" + * Sends a PRIVMSG message, and split it if message size is > 512 bytes. + * + * Warning: this function makes temporary changes in "message". */ void @@ -132,7 +131,7 @@ irc_input_send_user_message (struct t_gui_buffer *buffer, int flags, } /* - * irc_input_data: input data in a buffer + * Input data in a buffer. */ int @@ -195,7 +194,7 @@ irc_input_data (struct t_gui_buffer *buffer, const char *input_data, int flags) } /* - * irc_input_data_cb: callback for input data in a buffer + * Callback for input data in a buffer. */ int @@ -209,17 +208,17 @@ irc_input_data_cb (void *data, struct t_gui_buffer *buffer, } /* - * irc_input_send_cb: callback for "irc_input_send" signal - * This signal can be used by other plugins/scripts, it - * simulates input or command from user on an IRC buffer - * (it is used for example by Relay plugin) - * Format of signal_data (string) is: - * "server;channel;flags;tags;text" - * - server: server name (required) - * - channel: channel name (optional) - * - flags: flags for irc_server_sendf() (optional) - * - tags: tags for irc_server_sendf() (optional) - * - text: text or command (required) + * Callback for signal "irc_input_send" signal. + * + * This signal can be used by other plugins/scripts, it simulates input or + * command from user on an IRC buffer (it is used for example by Relay plugin). + * + * Format of signal_data (string) is "server;channel;flags;tags;text" + * server: server name (required) + * channel: channel name (optional) + * flags: flags for irc_server_sendf() (optional) + * tags: tags for irc_server_sendf() (optional) + * text: text or command (required). */ int diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index fc59d8e24..2d6870649 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -32,9 +32,14 @@ /* - * irc_message_parse: parse IRC message and return pointer to tags, message - * without tags, host, command, channel, target nick and - * arguments (if any) + * Parses an IRC message and returns pointers to: + * - tags + * - message without tags + * - host + * - command + * - channel + * - target nick + * - arguments (if any) */ void @@ -197,10 +202,16 @@ irc_message_parse (struct t_irc_server *server, const char *message, } /* - * irc_message_parse_to_hashtable: parse IRC message and return hashtable with - * keys: nick, host, command, channel, arguments - * Note: hashtable has to be free() - * after use + * Parses an IRC message and returns hashtable with keys: + * - tags + * - message_without_tags + * - nick + * - host + * - command + * - channel + * - arguments + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -250,7 +261,7 @@ irc_message_parse_to_hashtable (struct t_irc_server *server, } /* - * irc_message_get_nick_from_host: get nick from host in an IRC message + * Gets nick from host in an IRC message. */ const char * @@ -299,7 +310,7 @@ irc_message_get_nick_from_host (const char *host) } /* - * irc_message_get_address_from_host: get address from host in an IRC message + * Gets address from host in an IRC message. */ const char * @@ -339,9 +350,9 @@ irc_message_get_address_from_host (const char *host) } /* - * irc_message_replace_vars: replace special IRC vars ($nick, $channel, - * $server) in a string - * Note: result has to be free() after use + * Replaces special IRC vars ($nick, $channel, $server) in a string. + * + * Note: result must be freed after use. */ char * @@ -381,7 +392,7 @@ irc_message_replace_vars (struct t_irc_server *server, } /* - * irc_message_split_add: add a message + arguments in hashtable + * Adds a message + arguments in hashtable. */ void @@ -428,11 +439,35 @@ irc_message_split_add (struct t_hashtable *hashtable, int number, } /* - * irc_message_split_string: split "arguments" using delimiter and max length - * messages added to hashtable are: - * host + command + target + XXX + suffix - * (where XXX is part of "arguments") - * return 1 if split ok, 0 if error + * Splits "arguments" using delimiter and max length. + * + * Examples of arguments for this function: + * + * message..: :nick!user@host.com PRIVMSG #channel :Hello world! + * arguments: + * host : ":nick!user@host.com" + * command : "PRIVMSG" + * target : "#channel" + * prefix : ":" + * arguments: "Hello world!" + * suffix : "" + * + * message..: :nick!user@host.com PRIVMSG #channel :\01ACTION is eating\01 + * arguments: + * host : ":nick!user@host.com" + * command : "PRIVMSG" + * target : "#channel" + * prefix : ":\01ACTION " + * arguments: "is eating" + * suffix : "\01" + * + * Messages added to hashtable are: + * host + command + target + prefix + XXX + suffix + * (where XXX is part of "arguments") + * + * Returns: + * 1: OK + * 0: error */ int @@ -451,28 +486,6 @@ irc_message_split_string (struct t_hashtable *hashtable, char message[1024], *dup_arguments; int max_length, number; - /* - * Examples of arguments for this function: - * - * message..: :nick!user@host.com PRIVMSG #channel :Hello world! - * arguments: - * host : ":nick!user@host.com" - * command : "PRIVMSG" - * target : "#channel" - * prefix : ":" - * arguments: "Hello world!" - * suffix : "" - * - * message..: :nick!user@host.com PRIVMSG #channel :\01ACTION is eating\01 - * arguments: - * host : ":nick!user@host.com" - * command : "PRIVMSG" - * target : "#channel" - * prefix : ":\01ACTION " - * arguments: "is eating" - * suffix : "\01" - */ - max_length = 510; if (max_length_host >= 0) max_length -= max_length_host; @@ -556,9 +569,12 @@ irc_message_split_string (struct t_hashtable *hashtable, } /* - * irc_message_split_join: split a JOIN message, taking care of keeping - * channel keys with channel names - * return 1 if split ok, 0 if error + * Splits a JOIN message, taking care of keeping channel keys with channel + * names. + * + * Returns: + * 1: OK + * 0: error */ int @@ -663,10 +679,12 @@ irc_message_split_join (struct t_hashtable *hashtable, } /* - * irc_message_split_privmsg_notice: split a PRIVMSG or NOTICE message, taking - * care of keeping the '\01' char used in - * CTCP messages - * return 1 if split ok, 0 if error + * Splits a PRIVMSG or NOTICE message, taking care of keeping the '\01' char + * used in CTCP messages. + * + * Returns: + * 1: OK + * 0: error */ int @@ -718,8 +736,11 @@ irc_message_split_privmsg_notice (struct t_hashtable *hashtable, } /* - * irc_message_split_005: split a 005 message (isupport) - * return 1 if split ok, 0 if error + * Splits a 005 message (isupport). + * + * Returns: + * 1: OK + * 0: error */ int @@ -751,20 +772,27 @@ irc_message_split_005 (struct t_hashtable *hashtable, } /* - * irc_message_split: split an IRC message about to be sent to IRC server - * The maximum length of an IRC message is 510 bytes for - * user data + final "\r\n", so full size is 512 bytes - * (the user data does not include the optional tags before - * the host). - * The split takes care about type of message to do a split - * at best place in message. - * The hashtable returned contains keys "msg1", "msg2", ..., - * "msgN" with split of message (these messages do not - * include the final "\r\n"). - * Hashtable contains "args1", "args2", ..., "argsN" with - * split of arguments only (no host/command here). - * Each message in hashtable has command and arguments, and - * then is ready to be sent to IRC server. + * Splits an IRC message about to be sent to IRC server. + * + * The maximum length of an IRC message is 510 bytes for user data + final + * "\r\n", so full size is 512 bytes (the user data does not include the + * optional tags before the host). + * + * The split takes care about type of message to do a split at best place in + * message. + * + * The hashtable returned contains keys "msg1", "msg2", ..., "msgN" with split + * of message (these messages do not include the final "\r\n"). + * + * Hashtable contains "args1", "args2", ..., "argsN" with split of arguments + * only (no host/command here). + * + * Each message ("msgN") in hashtable has command and arguments, and then is + * ready to be sent to IRC server. + * + * Returns hashtable with split message. + * + * Note: result must be freed after use. */ struct t_hashtable * diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c index 6ca1efef2..dd496ce13 100644 --- a/src/plugins/irc/irc-mode.c +++ b/src/plugins/irc/irc-mode.c @@ -34,22 +34,24 @@ /* - * irc_mode_get_chanmode_type: get type of channel mode, which is a letter from - * 'A' to 'D': - * A = Mode that adds or removes a nick or address to a list. Always has a parameter. - * B = Mode that changes a setting and always has a parameter. - * C = Mode that changes a setting and only has a parameter when set. - * D = Mode that changes a setting and never has a parameter. - * Example: - * CHANMODES=beI,k,l,imnpstaqr - * A = { b, e, I } - * B = { k } - * C = { l } - * D = { i, m, n, p, s, t, a, q, r } - * Note: Modes of type A return the list when there is no parameter present. - * Note: Some clients assumes that any mode not listed is of type D. - * Note: Modes in PREFIX are not listed but could be considered type B. - * More info: http://www.irc.org/tech_docs/005.html + * Gets type of channel mode, which is a letter from 'A' to 'D': + * A = Mode that adds or removes a nick or address to a list. Always has a + * parameter. + * B = Mode that changes a setting and always has a parameter. + * C = Mode that changes a setting and only has a parameter when set. + * D = Mode that changes a setting and never has a parameter. + * + * Example: + * CHANMODES=beI,k,l,imnpstaqr ==> A = { b, e, I } + * B = { k } + * C = { l } + * D = { i, m, n, p, s, t, a, q, r } + * + * Note1: modes of type A return the list when there is no parameter present. + * Note2: some clients assumes that any mode not listed is of type D. + * Note3: modes in PREFIX are not listed but could be considered type B. + * + * More info: http://www.irc.org/tech_docs/005.html */ char @@ -88,15 +90,16 @@ irc_mode_get_chanmode_type (struct t_irc_server *server, char chanmode) } /* - * irc_mode_channel_update: update channel modes using the mode and argument - * Example: - * if channel modes are "+tn" and that we have: - * - set_flag = '+' - * - chanmode = 'k' - * - chanmode_type = 'B' - * - argument = 'password' - * then channel modes become: - * "+tnk password" + * Updates channel modes using the mode and argument. + * + * Example: + * if channel modes are "+tn" and that we have: + * - set_flag = '+' + * - chanmode = 'k' + * - chanmode_type = 'B' + * - argument = 'password' + * then channel modes become: + * "+tnk password" */ void @@ -261,8 +264,8 @@ irc_mode_channel_update (struct t_irc_server *server, } /* - * irc_mode_channel_set: set channel modes using CHANMODES (from message 005) - * and update channel modes if needed + * Sets channel modes using CHANMODES (from message 005) and update channel + * modes if needed. */ void @@ -411,7 +414,7 @@ irc_mode_channel_set (struct t_irc_server *server, } /* - * irc_mode_user_add: add a user mode + * Adds a user mode. */ void @@ -451,7 +454,7 @@ irc_mode_user_add (struct t_irc_server *server, char mode) } /* - * irc_mode_user_remove: remove a user mode + * Removes a user mode. */ void @@ -476,7 +479,7 @@ irc_mode_user_remove (struct t_irc_server *server, char mode) } /* - * irc_mode_user_set: set user modes + * Sets user modes. */ void diff --git a/src/plugins/irc/irc-msgbuffer.c b/src/plugins/irc/irc-msgbuffer.c index 9a0fe2765..a65b5b6de 100644 --- a/src/plugins/irc/irc-msgbuffer.c +++ b/src/plugins/irc/irc-msgbuffer.c @@ -37,7 +37,9 @@ /* - * irc_msgbuffer_get_option: get pointer to option with IRC message + * Gets pointer to option with IRC message. + * + * Returns pointer to option found, NULL if not found. */ struct t_config_option * @@ -51,7 +53,7 @@ irc_msgbuffer_get_option (struct t_irc_server *server, const char *message) snprintf (option_name, sizeof (option_name), "%s.%s", server->name, message); - /* search for msgbuffer in config file, for server */ + /* search for msgbuffer in configuration file, for server */ ptr_option = weechat_config_search_option (irc_config_file, irc_config_section_msgbuffer, option_name); @@ -59,27 +61,28 @@ irc_msgbuffer_get_option (struct t_irc_server *server, const char *message) return ptr_option; } - /* search for msgbuffer in config file */ + /* search for msgbuffer in configuration file */ ptr_option = weechat_config_search_option (irc_config_file, irc_config_section_msgbuffer, message); if (ptr_option) return ptr_option; - /* no msgbuffer found in config */ + /* no msgbuffer found in configuration */ return NULL; } /* - * irc_msgbuffer_get_target_buffer: get target for IRC message - * message is IRC message - * (for example: "invite", "312") - * alias is optional alias for message - * (for example "whois") - * default_buffer is used if no target is - * defined (optional, by default server - * buffer is used) + * Gets target for IRC message. + * + * Arguments: + * message: IRC message (for example: "invite", "312") + * alias: optional alias for message (for example "whois") + * default_buffer: used if no target is defined (optional, by default server + * buffer is used). + * + * Returns pointer to buffer found, NULL if not found. */ struct t_gui_buffer * diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 2ea99207d..0e2b21485 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -38,9 +38,11 @@ /* - * irc_nick_valid: check if a nick pointer exists for a channel - * return 1 if nick exists - * 0 if nick is not found + * Checks if a nick pointer is valid. + * + * Returns: + * 1: nick exists in channel + * 0: nick does not exist in channel */ int @@ -62,9 +64,11 @@ irc_nick_valid (struct t_irc_channel *channel, struct t_irc_nick *nick) } /* - * irc_nick_is_nick: check if string is a valid nick string (RFC 1459) - * return 1 if string valid nick - * 0 if not a valid nick + * Checks if string is a valid nick string (RFC 1459). + * + * Returns: + * 1: string is a valid nick + * 0: string is not a valid nick */ int @@ -91,8 +95,8 @@ irc_nick_is_nick (const char *string) } /* - * irc_nick_strdup_for_color: duplicate a nick and stop at first char in list - * (using option irc.look.nick_color_stop_chars) + * Duplicates a nick and stops at first char in list (using option + * irc.look.nick_color_stop_chars). */ char * @@ -133,9 +137,10 @@ irc_nick_strdup_for_color (const char *nickname) } /* - * irc_nick_hash_color: hash a nickname to find color - * return a number which is the index of color in the - * nicks colors of option weechat.color.chat_nick_colors + * Hashes a nickname to find color. + * + * Returns a number which is the index of color in the nicks colors of option + * "weechat.color.chat_nick_colors". */ int @@ -162,9 +167,10 @@ irc_nick_hash_color (const char *nickname) } /* - * irc_nick_get_forced_color: get forced color for a nick - * (NULL if no color is forced for nick) - * return name of color (example: "green") + * Gets forced color for a nick. + * + * Returns the name of color (for example: "green"), NULL if no color is forced + * for nick. */ const char * @@ -194,9 +200,9 @@ irc_nick_get_forced_color (const char *nickname) } /* - * irc_nick_find_color: find a color code for a nick - * (according to nick letters) - * return a WeeChat color code + * Finds a color code for a nick (according to nick letters). + * + * Returns a WeeChat color code (that can be used for display). */ const char * @@ -233,9 +239,9 @@ irc_nick_find_color (const char *nickname) } /* - * irc_nick_find_color_name: find a color name for a nick - * (according to nick letters) - * return name of color (example: "green") + * Finds a color name for a nick (according to nick letters). + * + * Returns the name of a color (for example: "green"). */ const char * @@ -268,8 +274,7 @@ irc_nick_find_color_name (const char *nickname) } /* - * irc_nick_set_current_prefix: set current prefix, using higher prefix set in - * prefixes + * Sets current prefix, using higher prefix set in prefixes. */ void @@ -289,9 +294,10 @@ irc_nick_set_current_prefix (struct t_irc_nick *nick) } /* - * irc_nick_set_prefix: set or unset a prefix in prefixes - * if set == 1, prefix is set (prefix is used) - * 0, prefix is unset (space is used) + * Sets/unsets a prefix in prefixes. + * + * If set == 1, sets prefix (prefix is used). + * If set == 0, unsets prefix (space is used). */ void @@ -309,7 +315,7 @@ irc_nick_set_prefix (struct t_irc_server *server, struct t_irc_nick *nick, } /* - * irc_nick_set_prefixes: set prefixes for nick + * Sets prefixes for nick. */ void @@ -335,8 +341,12 @@ irc_nick_set_prefixes (struct t_irc_server *server, struct t_irc_nick *nick, } /* - * irc_nick_is_op: return 1 is nick is "op" (or better than "op", for example - * channel admin or channel owner) + * Checks if nick is "op" (or better than "op", for example channel admin or + * channel owner). + * + * Returns: + * 1: nick is "op" (or better) + * 0: nick is not op */ int @@ -355,10 +365,13 @@ irc_nick_is_op (struct t_irc_server *server, struct t_irc_nick *nick) } /* - * irc_nick_has_prefix_mode: return 1 if nick prefixes contains prefix - * for a mode given - * for example if mode is 'o', we'll search for '@' - * in nick prefixes + * Checks if nick prefixes contains prefix for a given mode. + * + * For example if prefix_mode is 'o', searches for '@' in nick prefixes. + * + * Returns: + * 1: prefixes contains prefix for the given mode + * 0: prefixes does not contain prefix for the given mode. */ int @@ -375,7 +388,7 @@ irc_nick_has_prefix_mode (struct t_irc_server *server, struct t_irc_nick *nick, } /* - * irc_nick_get_nicklist_group: get nicklist group for a nick + * Gets nicklist group for a nick. */ struct t_gui_nick_group * @@ -410,7 +423,7 @@ irc_nick_get_nicklist_group (struct t_irc_server *server, } /* - * irc_nick_get_prefix_color_name: return name of prefix color for a nick + * Gets name of prefix color for a nick. */ const char * @@ -455,7 +468,7 @@ irc_nick_get_prefix_color_name (struct t_irc_server *server, } /* - * irc_nick_get_color_for_nicklist: get nick color for nicklist + * Gets nick color for nicklist. */ const char * @@ -481,7 +494,7 @@ irc_nick_get_color_for_nicklist (struct t_irc_server *server, } /* - * irc_nick_nicklist_add: add nick to buffer nicklist + * Adds a nick to buffer nicklist. */ void @@ -501,7 +514,7 @@ irc_nick_nicklist_add (struct t_irc_server *server, } /* - * irc_nick_nicklist_remove: remove nick from buffer nicklist + * Removes a nick from buffer nicklist. */ void @@ -519,7 +532,7 @@ irc_nick_nicklist_remove (struct t_irc_server *server, } /* - * irc_nick_nicklist_set: set a property for nick in buffer nicklist + * Sets a property for nick in buffer nicklist. */ void @@ -537,8 +550,7 @@ irc_nick_nicklist_set (struct t_irc_channel *channel, } /* - * irc_nick_nicklist_set_prefix_color_all: set nick prefix colors in nicklist - * for all servers/channels + * Sets nick prefix colors in nicklist for all servers/channels. */ void @@ -566,8 +578,7 @@ irc_nick_nicklist_set_prefix_color_all () } /* - * irc_nick_nicklist_set_color_all: set nick colors in nicklist for all - * servers/channels + * Sets nick colors in nicklist for all servers/channels. */ void @@ -595,7 +606,9 @@ irc_nick_nicklist_set_color_all () } /* - * irc_nick_new: allocate a new nick for a channel and add it to the nick list + * Adds a new nick in channel. + * + * Returns pointer to new nick, NULL if error. */ struct t_irc_nick * @@ -666,7 +679,7 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_change: change nickname + * Changes nickname. */ void @@ -699,7 +712,7 @@ irc_nick_change (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_set_mode: set a mode for a nick + * Sets a mode for a nick. */ void @@ -728,7 +741,7 @@ irc_nick_set_mode (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_free: free a nick and remove it from nicks list + * Removes a nick from a channel. */ void @@ -776,7 +789,7 @@ irc_nick_free (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_free_all: free all allocated nicks for a channel + * Removes all nicks from a channel. */ void @@ -796,7 +809,9 @@ irc_nick_free_all (struct t_irc_server *server, struct t_irc_channel *channel) } /* - * irc_nick_search: search nick in a channel + * Searches for a nick in a channel. + * + * Returns pointer to nick found, NULL if error. */ struct t_irc_nick * @@ -820,7 +835,7 @@ irc_nick_search (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_count: returns number of nicks (total, op, halfop, voice) on a channel + * Returns number of nicks (total, op, halfop, voice, normal) on a channel. */ void @@ -857,7 +872,7 @@ irc_nick_count (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_set_away: set/unset away status for a channel + * Sets/unsets away status for a nick. */ void @@ -879,10 +894,10 @@ irc_nick_set_away (struct t_irc_server *server, struct t_irc_channel *channel, } /* - * irc_nick_mode_for_display: get nick mode for display (color + mode) - * if prefix == 1, return string for display in - * prefix, otherwise return string for display in - * action message (/me) + * Gets nick mode for display (color + mode). + * + * If prefix == 1, returns string for display in prefix, otherwise returns + * string for display in action message (/me). */ const char * @@ -930,8 +945,8 @@ irc_nick_mode_for_display (struct t_irc_server *server, struct t_irc_nick *nick, } /* - * irc_nick_as_prefix: return string with nick to display as prefix on buffer - * (string will end by a tab) + * Returns string with nick to display as prefix on buffer (returned string ends + * by a tab). */ const char * @@ -961,7 +976,7 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick, } /* - * irc_nick_color_for_message: return WeeChat color code for a nick + * Returns WeeChat color code for a nick. */ const char * @@ -986,8 +1001,7 @@ irc_nick_color_for_message (struct t_irc_server *server, } /* - * irc_nick_color_for_server_message: return WeeChat color code for a nick - * (used in a server message) + * Returns WeeChat color code for a nick (used in a server message). */ const char * @@ -1002,7 +1016,7 @@ irc_nick_color_for_server_message (struct t_irc_server *server, } /* - * irc_nick_color_for_pv: return string with color of nick for private + * Returns string with color of nick for private. */ const char * @@ -1020,7 +1034,7 @@ irc_nick_color_for_pv (struct t_irc_channel *channel, const char *nickname) } /* - * irc_nick_hdata_nick_cb: return hdata for nick + * Returns hdata for nick. */ struct t_hdata * @@ -1048,8 +1062,11 @@ irc_nick_hdata_nick_cb (void *data, const char *hdata_name) } /* - * irc_nick_add_to_infolist: add a nick in an infolist - * return 1 if ok, 0 if error + * Adds a nick in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1082,7 +1099,7 @@ irc_nick_add_to_infolist (struct t_infolist *infolist, } /* - * irc_nick_print_log: print nick infos in log (usually for crash dump) + * Prints nick infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c index d51ead139..2af2b2e65 100644 --- a/src/plugins/irc/irc-notify.c +++ b/src/plugins/irc/irc-notify.c @@ -46,10 +46,13 @@ struct t_hook *irc_notify_hsignal = NULL; /* - * irc_notify_valid: check if a notify pointer exists for a server - * if server is NULL, search in all servers - * return 1 if notify exists - * 0 if notify is not found + * Checks if a notify pointer is valid. + * + * If server is NULL, searches in all servers. + * + * Returns: + * 1: notify exists + * 0: notify does not exist */ int @@ -89,7 +92,9 @@ irc_notify_valid (struct t_irc_server *server, struct t_irc_notify *notify) } /* - * irc_notify_search: search a notify + * Searches for a notify. + * + * Returns pointer to notify found, NULL if not found. */ struct t_irc_notify * @@ -112,8 +117,7 @@ irc_notify_search (struct t_irc_server *server, const char *nick) } /* - * irc_notify_set_server_option: set server option "notify" with notify - * list on server + * Sets server option "notify" with notify list on server. */ void @@ -177,7 +181,9 @@ irc_notify_set_server_option (struct t_irc_server *server) } /* - * irc_notify_new: add new notify + * Adds a new notify. + * + * Returns pointer to new notify, NULL if error. */ struct t_irc_notify * @@ -212,8 +218,7 @@ irc_notify_new (struct t_irc_server *server, const char *nick, int check_away) } /* - * irc_notify_check_now: check now ison/whois for a notify (called when a - * notify is added) + * Checks now ison/whois for a notify (called when a notify is added). */ void @@ -241,8 +246,7 @@ irc_notify_check_now (struct t_irc_notify *notify) } /* - * irc_notify_new_for_server: create notify list for server with option - * "irc.server.xxx.notify" + * Creates a notify list for server with option "irc.server.xxx.notify". */ void @@ -294,8 +298,7 @@ irc_notify_new_for_server (struct t_irc_server *server) } /* - * irc_notify_new_for_all_servers: create notify list for all servers with - * option "irc.server.xxx.notify" + * Creates a notify list for all servers with option "irc.server.xxx.notify". */ void @@ -311,7 +314,7 @@ irc_notify_new_for_all_servers () } /* - * irc_notify_free: remove a notify on a server + * Removes a notify on a server. */ void @@ -343,7 +346,7 @@ irc_notify_free (struct t_irc_server *server, struct t_irc_notify *notify) } /* - * irc_notify_free_all: remove all notify on a server + * Removes all notify on a server. */ void @@ -356,7 +359,7 @@ irc_notify_free_all (struct t_irc_server *server) } /* - * irc_notify_display: display a notify + * Displays a notify. */ void @@ -404,8 +407,7 @@ irc_notify_display (struct t_irc_server *server, struct t_gui_buffer *buffer, } /* - * irc_notify_display_list: display notify list for a server - * (or all servers if server is NULL) + * Displays notify list for a server (or all servers if server is NULL). */ void @@ -464,8 +466,8 @@ irc_notify_display_list (struct t_irc_server *server) } /* - * irc_notify_get_tags: get tags for message displayed - * (concatenation of "irc_notify" and tags from option) + * Gets tags for message displayed (concatenation of "irc_notify" and tags from + * option). */ const char * @@ -487,7 +489,7 @@ irc_notify_get_tags (struct t_config_option *option, const char *type, } /* - * irc_notify_send_signal: send signal on notify event + * Sends a signal on a notify event. */ void @@ -519,8 +521,8 @@ irc_notify_send_signal (struct t_irc_notify *notify, } /* - * irc_notify_set_is_on_server: set flag "is_on_server" for a notify - * and display message if user was not on server + * Sets flag "is_on_server" for a notify and display message if user was not on + * server. */ void @@ -558,8 +560,8 @@ irc_notify_set_is_on_server (struct t_irc_notify *notify, } /* - * irc_notify_set_away_message: set away message for a notify - * and display message if away status has changed + * Sets away message for a notify and display message if away status has + * changed. */ void @@ -629,8 +631,7 @@ irc_notify_set_away_message (struct t_irc_notify *notify, } /* - * irc_notify_hsignal_cb: callback for hsignal on redirected commands - * "ison" and "whois" + * Callback for hsignal on redirected commands "ison" and "whois". */ int @@ -819,7 +820,7 @@ irc_notify_hsignal_cb (void *data, const char *signal, } /* - * irc_notify_timer_ison_cb: timer called to send "ison" command to servers + * Timer called to send "ison" command to servers. */ int @@ -906,7 +907,7 @@ irc_notify_timer_ison_cb (void *data, int remaining_calls) } /* - * irc_notify_timer_whois_cb: timer called to send "whois" command to servers + * Timer called to send "whois" command to servers. */ int @@ -952,7 +953,7 @@ irc_notify_timer_whois_cb (void *data, int remaining_calls) } /* - * irc_notify_hdata_notify_cb: return hdata for notify + * Returns hdata for notify. */ struct t_hdata * @@ -980,8 +981,11 @@ irc_notify_hdata_notify_cb (void *data, const char *hdata_name) } /* - * irc_notify_add_to_infolist: add a notify in an infolist - * return 1 if ok, 0 if error + * Adds a notify in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1014,7 +1018,7 @@ irc_notify_add_to_infolist (struct t_infolist *infolist, } /* - * irc_notify_print_log: print notify infos in log (usually for crash dump) + * Prints notify infos in WeeChat log file (usually for crash dump). */ void @@ -1039,7 +1043,7 @@ irc_notify_print_log (struct t_irc_server *server) } /* - * irc_notify_hook_timer_ison: hook timer to send "ison" command + * Hooks timer to send "ison" command. */ void @@ -1054,7 +1058,7 @@ irc_notify_hook_timer_ison () } /* - * irc_notify_hook_timer_whois: hook timer to send "whois" command + * Hooks timer to send "whois" command. */ void @@ -1069,7 +1073,7 @@ irc_notify_hook_timer_whois () } /* - * irc_notify_init: hook timers and hsignals + * Hooks timers and hsignal. */ void @@ -1084,7 +1088,7 @@ irc_notify_init () } /* - * irc_notify_end: remove timers and hsignals + * Removes timers and hsignal. */ void diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index d726c4897..9eb236005 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -58,7 +58,11 @@ /* - * irc_protocol_is_numeric_command: return 1 if given string is 100% numeric + * Checks if a command is numeric. + * + * Returns: + * 1: all chars are numeric + * 0: command has other chars (not numeric) */ int @@ -74,7 +78,7 @@ irc_protocol_is_numeric_command (const char *str) } /* - * irc_protocol_log_level_for_command: get log level for IRC command + * Gets log level for IRC command. */ int @@ -99,8 +103,7 @@ irc_protocol_log_level_for_command (const char *command) } /* - * irc_protocol_tags: build tags list with IRC command and optional tags and - * nick + * Builds tags list with IRC command and optional tags and nick. */ const char * @@ -139,7 +142,11 @@ irc_protocol_tags (const char *command, const char *tags, const char *nick) } /* - * irc_protocol_cb_authenticate: 'authenticate' message received + * Callback for the IRC message "AUTHENTICATE". + * + * Message looks like: + * AUTHENTICATE + + * AUTHENTICATE QQDaUzXAmVffxuzFy77XWBGwABBQAgdinelBrKZaR3wE7nsIETuTVY= */ IRC_PROTOCOL_CALLBACK(authenticate) @@ -148,12 +155,6 @@ IRC_PROTOCOL_CALLBACK(authenticate) const char *sasl_username, *sasl_password; char *answer; - /* - * AUTHENTICATE message looks like: - * AUTHENTICATE + - * AUTHENTICATE QQDaUzXAmVffxuzFy77XWBGwABBQAgdinelBrKZaR3wE7nsIETuTVY= - */ - IRC_PROTOCOL_MIN_ARGS(2); if (irc_server_sasl_enabled (server)) @@ -201,7 +202,12 @@ IRC_PROTOCOL_CALLBACK(authenticate) } /* - * irc_protocol_cb_cap: 'cap' message received (client capability) + * Callback for the IRC message "CAP": client capability. + * + * Message looks like: + * :server CAP * LS :identify-msg multi-prefix sasl + * :server CAP * ACK :sasl + * :server CAP * NAK :sasl */ IRC_PROTOCOL_CALLBACK(cap) @@ -211,13 +217,6 @@ IRC_PROTOCOL_CALLBACK(cap) int num_caps_supported, num_caps_requested, sasl_requested, sasl_to_do; int i, j, timeout, length; - /* - * CAP message looks like: - * :server CAP * LS :identify-msg multi-prefix sasl - * :server CAP * ACK :sasl - * :server CAP * NAK :sasl - */ - IRC_PROTOCOL_MIN_ARGS(4); if (strcmp (argv[3], "LS") == 0) @@ -379,18 +378,16 @@ IRC_PROTOCOL_CALLBACK(cap) } /* - * irc_protocol_cb_error: error received from server + * Callback for the IRC message "ERROR". + * + * Message looks like: + * ERROR :Closing Link: irc.server.org (Bad Password) */ IRC_PROTOCOL_CALLBACK(error) { char *ptr_args; - /* - * ERROR message looks like: - * ERROR :Closing Link: irc.server.org (Bad Password) - */ - IRC_PROTOCOL_MIN_ARGS(2); ptr_args = (argv_eol[1][0] == ':') ? argv_eol[1] + 1 : argv_eol[1]; @@ -413,8 +410,11 @@ IRC_PROTOCOL_CALLBACK(error) } /* - * irc_protocol_cb_generic_error: generic error (callback used by many error - * messages, but not for message "ERROR") + * Callback for an IRC error message (used by many error messages, but not for + * message "ERROR"). + * + * Example of error: + * :server 404 nick #channel :Cannot send to channel */ IRC_PROTOCOL_CALLBACK(generic_error) @@ -424,11 +424,6 @@ IRC_PROTOCOL_CALLBACK(generic_error) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * example of error: - * :server 404 nick #channel :Cannot send to channel - */ - IRC_PROTOCOL_MIN_ARGS(4); first_arg = (irc_server_strcasecmp (server, argv[2], server->nick) == 0) ? 3 : 2; @@ -472,16 +467,14 @@ IRC_PROTOCOL_CALLBACK(generic_error) } /* - * irc_protocol_cb_invite: 'invite' message received + * Callback for the IRC message "INVITE". + * + * Message looks like: + * :nick!user@host INVITE mynick :#channel */ IRC_PROTOCOL_CALLBACK(invite) { - /* - * INVITE message looks like: - * :nick!user@host INVITE mynick :#channel - */ - IRC_PROTOCOL_MIN_ARGS(4); IRC_PROTOCOL_CHECK_HOST; @@ -506,7 +499,10 @@ IRC_PROTOCOL_CALLBACK(invite) } /* - * irc_protocol_cb_join: 'join' message received + * Callback for the IRC message "JOIN". + * + * Message looks like: + * :nick!user@host JOIN :#channel */ IRC_PROTOCOL_CALLBACK(join) @@ -517,11 +513,6 @@ IRC_PROTOCOL_CALLBACK(join) char *pos_channel; int local_join, display_host; - /* - * JOIN message looks like: - * :nick!user@host JOIN :#channel - */ - IRC_PROTOCOL_MIN_ARGS(3); IRC_PROTOCOL_CHECK_HOST; @@ -625,7 +616,10 @@ IRC_PROTOCOL_CALLBACK(join) } /* - * irc_protocol_cb_kick: 'kick' message received + * Callback for the IRC message "KICK". + * + * Message looks like: + * :nick1!user@host KICK #channel nick2 :kick reason */ IRC_PROTOCOL_CALLBACK(kick) @@ -636,11 +630,6 @@ IRC_PROTOCOL_CALLBACK(kick) struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick, *ptr_nick_kicked; - /* - * KICK message looks like: - * :nick1!user@host KICK #channel nick2 :kick reason - */ - IRC_PROTOCOL_MIN_ARGS(4); IRC_PROTOCOL_CHECK_HOST; @@ -743,7 +732,10 @@ IRC_PROTOCOL_CALLBACK(kick) } /* - * irc_protocol_cb_kill: 'kill' message received + * Callback for the IRC message "KILL". + * + * Message looks like: + * :nick1!user@host KILL mynick :kill reason */ IRC_PROTOCOL_CALLBACK(kill) @@ -752,11 +744,6 @@ IRC_PROTOCOL_CALLBACK(kill) struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick, *ptr_nick_killed; - /* - * KILL message looks like: - * :nick1!user@host KILL mynick :kill reason - */ - IRC_PROTOCOL_MIN_ARGS(3); IRC_PROTOCOL_CHECK_HOST; @@ -825,7 +812,10 @@ IRC_PROTOCOL_CALLBACK(kill) } /* - * irc_protocol_cb_mode: 'mode' message received + * Callback for the IRC message "MODE". + * + * Message looks like: + * :nick!user@host MODE #test +o nick */ IRC_PROTOCOL_CALLBACK(mode) @@ -835,11 +825,6 @@ IRC_PROTOCOL_CALLBACK(mode) struct t_irc_nick *ptr_nick; struct t_gui_buffer *ptr_buffer; - /* - * MODE message looks like: - * :nick!user@host MODE #test +o nick - */ - IRC_PROTOCOL_MIN_ARGS(4); IRC_PROTOCOL_CHECK_HOST; @@ -892,7 +877,10 @@ IRC_PROTOCOL_CALLBACK(mode) } /* - * irc_protocol_cb_nick: 'nick' message received + * Callback for the IRC message "NICK". + * + * Message looks like: + * :oldnick!user@host NICK :newnick */ IRC_PROTOCOL_CALLBACK(nick) @@ -903,11 +891,6 @@ IRC_PROTOCOL_CALLBACK(nick) int local_nick; struct t_irc_channel_speaking *ptr_nick_speaking; - /* - * NICK message looks like: - * :oldnick!user@host NICK :newnick - */ - IRC_PROTOCOL_MIN_ARGS(3); IRC_PROTOCOL_CHECK_HOST; @@ -1024,7 +1007,12 @@ IRC_PROTOCOL_CALLBACK(nick) } /* - * irc_protocol_cb_notice: 'notice' message received + * Callback for the IRC message "NOTICE". + * + * Message looks like: + * NOTICE AUTH :*** Looking up your hostname... + * :nick!user@host NOTICE mynick :notice text + * :nick!user@host NOTICE #channel :notice text */ IRC_PROTOCOL_CALLBACK(notice) @@ -1035,13 +1023,6 @@ IRC_PROTOCOL_CALLBACK(notice) int notify_private, is_channel, notice_op, notice_voice; struct t_gui_buffer *ptr_buffer; - /* - * NOTICE message looks like: - * NOTICE AUTH :*** Looking up your hostname... - * :nick!user@host NOTICE mynick :notice text - * :nick!user@host NOTICE #channel :notice text - */ - IRC_PROTOCOL_MIN_ARGS(3); if (ignored) @@ -1254,7 +1235,14 @@ IRC_PROTOCOL_CALLBACK(notice) } /* - * irc_protocol_cb_part: 'part' message received + * Callback for the IRC message "PART". + * + * Message looks like: + * :nick!user@host PART #channel :part message + * + * On undernet server, it can be: + * :nick!user@host PART :#channel + * :nick!user@host PART #channel :part message */ IRC_PROTOCOL_CALLBACK(part) @@ -1265,14 +1253,6 @@ IRC_PROTOCOL_CALLBACK(part) struct t_irc_nick *ptr_nick; struct t_irc_channel_speaking *ptr_nick_speaking; - /* - * PART message looks like: - * :nick!user@host PART #channel :part message - * On undernet server, it can be: - * :nick!user@host PART :#channel - * :nick!user@host PART #channel :part message - */ - IRC_PROTOCOL_MIN_ARGS(3); IRC_PROTOCOL_CHECK_HOST; @@ -1410,16 +1390,14 @@ IRC_PROTOCOL_CALLBACK(part) } /* - * irc_protocol_cb_ping: 'ping' command received + * Callback for the IRC message "PING". + * + * Message looks like: + * PING :arguments */ IRC_PROTOCOL_CALLBACK(ping) { - /* - * PING message looks like: - * PING :server - */ - IRC_PROTOCOL_MIN_ARGS(2); irc_server_sendf (server, 0, NULL, "PONG :%s", @@ -1429,7 +1407,10 @@ IRC_PROTOCOL_CALLBACK(ping) } /* - * irc_protocol_cb_pong: 'pong' command received + * Callback for the IRC message "PONG". + * + * Message looks like: + * :server PONG server :arguments */ IRC_PROTOCOL_CALLBACK(pong) @@ -1460,7 +1441,16 @@ IRC_PROTOCOL_CALLBACK(pong) } /* - * irc_protocol_cb_privmsg: 'privmsg' command received + * Callback for the IRC message "PRIVMSG". + * + * Message looks like: + * :nick!user@host PRIVMSG #channel :message for channel here + * :nick!user@host PRIVMSG mynick :message for private here + * :nick!user@host PRIVMSG #channel :\01ACTION is testing action\01 + * :nick!user@host PRIVMSG mynick :\01ACTION is testing action\01 + * :nick!user@host PRIVMSG #channel :\01VERSION\01 + * :nick!user@host PRIVMSG mynick :\01VERSION\01 + * :nick!user@host PRIVMSG mynick :\01DCC SEND file.txt 1488915698 50612 128\01 */ IRC_PROTOCOL_CALLBACK(privmsg) @@ -1471,17 +1461,6 @@ IRC_PROTOCOL_CALLBACK(privmsg) struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; - /* - * PRIVMSG message looks like: - * :nick!user@host PRIVMSG #channel :message for channel here - * :nick!user@host PRIVMSG mynick :message for private here - * :nick!user@host PRIVMSG #channel :\01ACTION is testing action\01 - * :nick!user@host PRIVMSG mynick :\01ACTION is testing action\01 - * :nick!user@host PRIVMSG #channel :\01VERSION\01 - * :nick!user@host PRIVMSG mynick :\01VERSION\01 - * :nick!user@host PRIVMSG mynick :\01DCC SEND file.txt 1488915698 50612 128\01 - */ - IRC_PROTOCOL_MIN_ARGS(4); IRC_PROTOCOL_CHECK_HOST; @@ -1655,7 +1634,10 @@ IRC_PROTOCOL_CALLBACK(privmsg) } /* - * irc_protocol_cb_quit: 'quit' command received + * Callback for the IRC message "QUIT". + * + * Message looks like: + * :nick!user@host QUIT :quit message */ IRC_PROTOCOL_CALLBACK(quit) @@ -1666,11 +1648,6 @@ IRC_PROTOCOL_CALLBACK(quit) struct t_irc_channel_speaking *ptr_nick_speaking; int local_quit, display_host; - /* - * QUIT message looks like: - * :nick!user@host QUIT :quit message - */ - IRC_PROTOCOL_MIN_ARGS(2); IRC_PROTOCOL_CHECK_HOST; @@ -1773,8 +1750,7 @@ IRC_PROTOCOL_CALLBACK(quit) } /* - * irc_protocol_cb_server_mode_reason: command received from server (numeric), - * format: "mode :reason" + * Callback for an IRC message with mode and reason (numeric). */ IRC_PROTOCOL_CALLBACK(server_mode_reason) @@ -1809,7 +1785,7 @@ IRC_PROTOCOL_CALLBACK(server_mode_reason) } /* - * irc_protocol_cb_numeric: numeric command received from server + * Callback for a numeric IRC message. */ IRC_PROTOCOL_CALLBACK(numeric) @@ -1841,7 +1817,10 @@ IRC_PROTOCOL_CALLBACK(numeric) } /* - * irc_protocol_cb_topic: 'topic' command received + * Callback for the IRC message "TOPIC". + * + * Message looks like: + * :nick!user@host TOPIC #channel :new topic for channel */ IRC_PROTOCOL_CALLBACK(topic) @@ -1851,11 +1830,6 @@ IRC_PROTOCOL_CALLBACK(topic) struct t_irc_nick *ptr_nick; struct t_gui_buffer *ptr_buffer; - /* - * TOPIC message looks like: - * :nick!user@host TOPIC #channel :new topic for channel - */ - IRC_PROTOCOL_MIN_ARGS(3); if (!irc_channel_is_channel (server, argv[2])) @@ -1980,16 +1954,14 @@ IRC_PROTOCOL_CALLBACK(topic) } /* - * irc_protocol_cb_wallops: 'wallops' command received + * Callback for the IRC message "WALLOPS". + * + * Message looks like: + * :nick!user@host WALLOPS :message from admin */ IRC_PROTOCOL_CALLBACK(wallops) { - /* - * WALLOPS message looks like: - * :nick!user@host WALLOPS :message from admin - */ - IRC_PROTOCOL_MIN_ARGS(3); if (ignored) @@ -2015,7 +1987,10 @@ IRC_PROTOCOL_CALLBACK(wallops) } /* - * irc_protocol_cb_001: '001' command (connected to irc server) + * Callback for the IRC message "001": connected to irc server. + * + * Message looks like: + * :server 001 mynick :Welcome to the dancer-ircd Network */ IRC_PROTOCOL_CALLBACK(001) @@ -2024,11 +1999,6 @@ IRC_PROTOCOL_CALLBACK(001) char *away_msg; const char *ptr_command; - /* - * 001 message looks like: - * :server 001 mynick :Welcome to the dancer-ircd Network - */ - IRC_PROTOCOL_MIN_ARGS(3); if (irc_server_strcasecmp (server, server->nick, argv[2]) != 0) @@ -2097,7 +2067,13 @@ IRC_PROTOCOL_CALLBACK(001) } /* - * irc_protocol_cb_005: '005' command (some infos from server) + * Callback for the IRC message "005": some infos from server. + * + * Message looks like: + * :server 005 mynick MODES=4 CHANLIMIT=#:20 NICKLEN=16 USERLEN=10 + * HOSTLEN=63 TOPICLEN=450 KICKLEN=450 CHANNELLEN=30 KEYLEN=23 + * CHANTYPES=# PREFIX=(ov)@+ CASEMAPPING=ascii CAPAB IRCD=dancer + * :are available on this server */ IRC_PROTOCOL_CALLBACK(005) @@ -2105,14 +2081,6 @@ IRC_PROTOCOL_CALLBACK(005) char *pos, *pos2, *pos_start, *error, *isupport2; int length_isupport, length, nick_max_length, casemapping; - /* - * 005 message looks like: - * :server 005 mynick MODES=4 CHANLIMIT=#:20 NICKLEN=16 USERLEN=10 - * HOSTLEN=63 TOPICLEN=450 KICKLEN=450 CHANNELLEN=30 KEYLEN=23 - * CHANTYPES=# PREFIX=(ov)@+ CASEMAPPING=ascii CAPAB IRCD=dancer - * :are available on this server - */ - IRC_PROTOCOL_MIN_ARGS(4); irc_protocol_cb_numeric (server, @@ -2227,16 +2195,14 @@ IRC_PROTOCOL_CALLBACK(005) } /* - * irc_protocol_cb_221: '221' command (user mode string) + * Callback for the IRC message "221": user mode string. + * + * Message looks like: + * :server 221 nick :+s */ IRC_PROTOCOL_CALLBACK(221) { - /* - * 221 message looks like: - * :server 221 nick :+s - */ - IRC_PROTOCOL_MIN_ARGS(4); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[2], @@ -2265,9 +2231,13 @@ IRC_PROTOCOL_CALLBACK(221) } /* - * irc_protocol_cb_301: '301' command (away message) - * received when we are talking to a user in private - * and that remote user is away (we receive away message) + * Callback for the IRC message "301": away message. + * + * Message is received when we are talking to a user in private and that remote + * user is away (we receive away message). + * + * Message looks like: + * :server 301 mynick nick :away message for nick */ IRC_PROTOCOL_CALLBACK(301) @@ -2276,11 +2246,6 @@ IRC_PROTOCOL_CALLBACK(301) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 301 message looks like: - * :server 301 mynick nick :away message for nick - */ - IRC_PROTOCOL_MIN_ARGS(3); if (argc > 4) @@ -2323,16 +2288,14 @@ IRC_PROTOCOL_CALLBACK(301) } /* - * irc_protocol_cb_303: '303' command (ison) + * Callback for the IRC message "303": ison. + * + * Message looks like: + * :server 303 mynick :nick1 nick2 */ IRC_PROTOCOL_CALLBACK(303) { - /* - * 303 message looks like: - * :server 303 mynick :nick1 nick2 - */ - IRC_PROTOCOL_MIN_ARGS(4); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, NULL, @@ -2348,16 +2311,14 @@ IRC_PROTOCOL_CALLBACK(303) } /* - * irc_protocol_cb_305: '305' command (unaway) + * Callback for the IRC message "305": unaway. + * + * Message looks like: + * :server 305 mynick :Does this mean you're really back? */ IRC_PROTOCOL_CALLBACK(305) { - /* - * 305 message looks like: - * :server 305 mynick :Does this mean you're really back? - */ - IRC_PROTOCOL_MIN_ARGS(3); if (argc > 3) @@ -2381,16 +2342,14 @@ IRC_PROTOCOL_CALLBACK(305) } /* - * irc_protocol_cb_306: '306' command (now away) + * Callback for the IRC message "306": now away. + * + * Message looks like: + * :server 306 mynick :We'll miss you */ IRC_PROTOCOL_CALLBACK(306) { - /* - * 306 message looks like: - * :server 306 mynick :We'll miss you - */ - IRC_PROTOCOL_MIN_ARGS(3); if (argc > 3) @@ -2414,16 +2373,14 @@ IRC_PROTOCOL_CALLBACK(306) } /* - * irc_protocol_cb_whois_nick_msg: a whois command with nick and message + * Callback for the whois messages with nick and message. + * + * Message looks like: + * :server 319 flashy FlashCode :some text here */ IRC_PROTOCOL_CALLBACK(whois_nick_msg) { - /* - * messages look like: - * :server 319 flashy FlashCode :some text here - */ - IRC_PROTOCOL_MIN_ARGS(5); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -2445,16 +2402,14 @@ IRC_PROTOCOL_CALLBACK(whois_nick_msg) } /* - * irc_protocol_cb_whowas_nick_msg: a whowas command with nick and message + * Callback for the whowas messages with nick and message. + * + * Message looks like: + * :server 369 flashy FlashCode :some text here */ IRC_PROTOCOL_CALLBACK(whowas_nick_msg) { - /* - * messages look like: - * :server 369 flashy FlashCode :some text here - */ - IRC_PROTOCOL_MIN_ARGS(5); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -2476,16 +2431,14 @@ IRC_PROTOCOL_CALLBACK(whowas_nick_msg) } /* - * irc_protocol_cb_311: '311' command (whois, user) + * Callback for the IRC message "311": whois, user. + * + * Message looks like: + * :server 311 mynick nick user host * :realname here */ IRC_PROTOCOL_CALLBACK(311) { - /* - * 311 message looks like: - * :server 311 mynick nick user host * :realname here - */ - IRC_PROTOCOL_MIN_ARGS(8); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -2511,16 +2464,14 @@ IRC_PROTOCOL_CALLBACK(311) } /* - * irc_protocol_cb_312: '312' command (whois, server) + * Callback for the IRC message "312": whois, server. + * + * Message looks like: + * :server 312 mynick nick irc.freenode.net :http://freenode.net/ */ IRC_PROTOCOL_CALLBACK(312) { - /* - * 312 message looks like: - * :server 312 mynick nick irc.freenode.net :http://freenode.net/ - */ - IRC_PROTOCOL_MIN_ARGS(6); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -2546,16 +2497,14 @@ IRC_PROTOCOL_CALLBACK(312) } /* - * irc_protocol_cb_314: '314' command (whowas) + * Callback for the IRC message "314": whowas. + * + * Message looks like: + * :server 314 mynick nick user host * :realname here */ IRC_PROTOCOL_CALLBACK(314) { - /* - * 314 message looks like: - * :server 314 mynick nick user host * :realname here - */ - IRC_PROTOCOL_MIN_ARGS(8); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -2581,18 +2530,16 @@ IRC_PROTOCOL_CALLBACK(314) } /* - * irc_protocol_cb_315: '315' command (end of /who) + * Callback for the IRC message "315": end of /who. + * + * Message looks like: + * :server 315 mynick #channel :End of /WHO list. */ IRC_PROTOCOL_CALLBACK(315) { struct t_irc_channel *ptr_channel; - /* - * 315 message looks like: - * :server 315 mynick #channel :End of /WHO list. - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -2621,7 +2568,10 @@ IRC_PROTOCOL_CALLBACK(315) } /* - * irc_protocol_cb_317: '317' command (whois, idle) + * Callback for the IRC message "317": whois, idle. + * + * Message looks like: + * :server 317 mynick nick 122877 1205327880 :seconds idle, signon time */ IRC_PROTOCOL_CALLBACK(317) @@ -2630,11 +2580,6 @@ IRC_PROTOCOL_CALLBACK(317) time_t datetime; struct t_gui_buffer *ptr_buffer; - /* - * 317 message looks like: - * :server 317 mynick nick 122877 1205327880 :seconds idle, signon time - */ - IRC_PROTOCOL_MIN_ARGS(6); idle_time = atoi (argv[4]); @@ -2717,18 +2662,16 @@ IRC_PROTOCOL_CALLBACK(317) } /* - * irc_protocol_cb_321: '321' command (/list start) + * Callback for the IRC message "321": /list start. + * + * Message looks like: + * :server 321 mynick Channel :Users Name */ IRC_PROTOCOL_CALLBACK(321) { char *pos_args; - /* - * 321 message looks like: - * :server 321 mynick Channel :Users Name - */ - IRC_PROTOCOL_MIN_ARGS(4); pos_args = (argc > 4) ? @@ -2749,18 +2692,16 @@ IRC_PROTOCOL_CALLBACK(321) } /* - * irc_protocol_cb_322: '322' command (channel for /list) + * Callback for the IRC message "322": channel for /list. + * + * Message looks like: + * :server 322 mynick #channel 3 :topic of channel */ IRC_PROTOCOL_CALLBACK(322) { char *pos_topic; - /* - * 322 message looks like: - * :server 322 mynick #channel 3 :topic of channel - */ - IRC_PROTOCOL_MIN_ARGS(5); pos_topic = (argc > 5) ? @@ -2791,18 +2732,16 @@ IRC_PROTOCOL_CALLBACK(322) } /* - * irc_protocol_cb_323: '323' command (end of /list) + * Callback for the IRC message "323": end of /list. + * + * Message looks like: + * :server 323 mynick :End of /LIST */ IRC_PROTOCOL_CALLBACK(323) { char *pos_args; - /* - * 323 message looks like: - * :server 323 mynick :End of /LIST - */ - IRC_PROTOCOL_MIN_ARGS(3); pos_args = (argc > 3) ? @@ -2821,18 +2760,16 @@ IRC_PROTOCOL_CALLBACK(323) } /* - * irc_protocol_cb_324: '324' command (channel mode) + * Callback for the IRC message "324": channel mode. + * + * Message looks like: + * :server 324 mynick #channel +nt */ IRC_PROTOCOL_CALLBACK(324) { struct t_irc_channel *ptr_channel; - /* - * 324 message looks like: - * :server 324 mynick #channel +nt - */ - IRC_PROTOCOL_MIN_ARGS(4); ptr_channel = irc_channel_search (server, argv[3]); @@ -2864,7 +2801,10 @@ IRC_PROTOCOL_CALLBACK(324) } /* - * irc_protocol_cb_327: '327' command (whois, host) + * Callback for the IRC message "327": whois, host. + * + * Message looks like: + * :server 327 mynick nick host ip :real hostname/ip */ IRC_PROTOCOL_CALLBACK(327) @@ -2872,11 +2812,6 @@ IRC_PROTOCOL_CALLBACK(327) char *pos_realname; struct t_gui_buffer *ptr_buffer; - /* - * 327 message looks like: - * :server 327 mynick nick host ip :real hostname/ip - */ - IRC_PROTOCOL_MIN_ARGS(6); pos_realname = (argc > 6) ? @@ -2926,18 +2861,16 @@ IRC_PROTOCOL_CALLBACK(327) } /* - * irc_protocol_cb_328: '328' channel URL + * Callback for the IRC message "328": channel URL. + * + * Message looks like: + * :server 328 mynick #channel :http://sample.url.com/ */ IRC_PROTOCOL_CALLBACK(328) { struct t_irc_channel *ptr_channel; - /* - * 328 message looks like: - * :server 328 mynick #channel :http://sample.url.com/ - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -2961,7 +2894,10 @@ IRC_PROTOCOL_CALLBACK(328) } /* - * irc_protocol_cb_329: '329' command received (channel creation date) + * Callback for the IRC message "329": channel creation date. + * + * Message looks like: + * :server 329 mynick #channel 1205327894 */ IRC_PROTOCOL_CALLBACK(329) @@ -2969,11 +2905,6 @@ IRC_PROTOCOL_CALLBACK(329) struct t_irc_channel *ptr_channel; time_t datetime; - /* - * 329 message looks like: - * :server 329 mynick #channel 1205327894 - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -3013,8 +2944,13 @@ IRC_PROTOCOL_CALLBACK(329) } /* - * irc_protocol_cb_330_343: '330' command (whois, is logged in as), - * '343' command (whois, is opered as) + * Callback for the IRC messages "330" (whois, is logged in as), and "343" + * (whois, is opered as). + * + * Messages look like: + * :server 330 mynick nick1 nick2 :is logged in as + * :server 330 mynick #channel http://sample.url.com/ + * :server 343 mynick nick1 nick2 :is opered as */ IRC_PROTOCOL_CALLBACK(330_343) @@ -3022,15 +2958,6 @@ IRC_PROTOCOL_CALLBACK(330_343) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 330 message looks like: - * :server 330 mynick nick1 nick2 :is logged in as - * or: - * :server 330 mynick #channel http://sample.url.com/ - * 343 message looks like: - * :server 343 mynick nick1 nick2 :is opered as - */ - IRC_PROTOCOL_MIN_ARGS(5); if (argc >= 6) @@ -3078,7 +3005,10 @@ IRC_PROTOCOL_CALLBACK(330_343) } /* - * irc_protocol_cb_331: '331' command received (no topic for channel) + * Callback for the IRC message "331": no topic for channel. + * + * Message looks like: + * :server 331 mynick #channel :There isn't a topic. */ IRC_PROTOCOL_CALLBACK(331) @@ -3086,11 +3016,6 @@ IRC_PROTOCOL_CALLBACK(331) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 331 message looks like: - * :server 331 mynick #channel :There isn't a topic. - */ - IRC_PROTOCOL_MIN_ARGS(4); ptr_channel = irc_channel_search (server, argv[3]); @@ -3109,7 +3034,10 @@ IRC_PROTOCOL_CALLBACK(331) } /* - * irc_protocol_cb_332: '332' command received (topic of channel) + * Callback for the IRC message "332": topic of channel. + * + * Message looks like: + * :server 332 mynick #channel :topic of channel */ IRC_PROTOCOL_CALLBACK(332) @@ -3118,11 +3046,6 @@ IRC_PROTOCOL_CALLBACK(332) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 332 message looks like: - * :server 332 mynick #channel :topic of channel - */ - IRC_PROTOCOL_MIN_ARGS(4); pos_topic = NULL; @@ -3172,7 +3095,11 @@ IRC_PROTOCOL_CALLBACK(332) } /* - * irc_protocol_cb_333: '333' command received (infos about topic (nick / date)) + * Callback for the IRC message "333": infos about topic (nick / date). + * + * Message looks like: + * :server 333 mynick #channel nick!user@host 1205428096 + * :server 333 mynick #channel 1205428096 */ IRC_PROTOCOL_CALLBACK(333) @@ -3183,13 +3110,6 @@ IRC_PROTOCOL_CALLBACK(333) const char *topic_nick, *topic_address; int arg_date; - /* - * 333 message looks like: - * :server 333 mynick #channel nick!user@host 1205428096 - * or: - * :server 333 mynick #channel 1205428096 - */ - IRC_PROTOCOL_MIN_ARGS(5); topic_nick = (argc > 5) ? irc_message_get_nick_from_host (argv[4]) : NULL; @@ -3290,16 +3210,14 @@ IRC_PROTOCOL_CALLBACK(333) } /* - * irc_protocol_cb_338: '338' command (whois, host) + * Callback for the IRC message "338": whois, host. + * + * Message looks like: + * :server 338 mynick nick host :actually using host */ IRC_PROTOCOL_CALLBACK(338) { - /* - * 338 message looks like: - * :server 338 mynick nick host :actually using host - */ - IRC_PROTOCOL_MIN_ARGS(6); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -3323,16 +3241,14 @@ IRC_PROTOCOL_CALLBACK(338) } /* - * irc_protocol_cb_341: '341' command received (inviting) + * Callback for the IRC message "341": inviting. + * + * Message looks like: + * :server 341 mynick nick #channel */ IRC_PROTOCOL_CALLBACK(341) { - /* - * 341 message looks like: - * :server 341 mynick nick #channel - */ - IRC_PROTOCOL_MIN_ARGS(5); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[2], @@ -3357,16 +3273,14 @@ IRC_PROTOCOL_CALLBACK(341) } /* - * irc_protocol_cb_344: '344' command (channel reop) + * Callback for the IRC message "344": channel reop. + * + * Message looks like: + * :server 344 mynick #channel nick!user@host */ IRC_PROTOCOL_CALLBACK(344) { - /* - * 344 message looks like: - * :server 344 mynick #channel nick!user@host - */ - IRC_PROTOCOL_MIN_ARGS(5); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, NULL, @@ -3386,16 +3300,14 @@ IRC_PROTOCOL_CALLBACK(344) } /* - * irc_protocol_cb_345: '345' command (end of channel reop) + * Callback for the IRC message "345": end of channel reop. + * + * Message looks like: + * :server 345 mynick #channel :End of Channel Reop List */ IRC_PROTOCOL_CALLBACK(345) { - /* - * 345 message looks like: - * :server 345 mynick #channel :End of Channel Reop List - */ - IRC_PROTOCOL_MIN_ARGS(5); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, NULL, @@ -3414,7 +3326,11 @@ IRC_PROTOCOL_CALLBACK(345) } /* - * irc_protocol_cb_346: '346' command received (channel invite list) + * Callback for the IRC message "346": channel invite list. + * + * Message looks like: + * :server 346 mynick #channel invitemask nick!user@host 1205590879 + * :server 346 mynick #channel invitemask */ IRC_PROTOCOL_CALLBACK(346) @@ -3424,13 +3340,6 @@ IRC_PROTOCOL_CALLBACK(346) time_t datetime; const char *invite_nick, *invite_address; - /* - * 346 message looks like: - * :server 346 mynick #channel invitemask nick!user@host 1205590879 - * or: - * :server 346 mynick #channel invitemask - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -3517,7 +3426,10 @@ IRC_PROTOCOL_CALLBACK(346) } /* - * irc_protocol_cb_347: '347' command received (end of channel invite list) + * Callback for the IRC message "347": end of channel invite list. + * + * Message looks like: + * :server 347 mynick #channel :End of Channel Invite List */ IRC_PROTOCOL_CALLBACK(347) @@ -3526,11 +3438,6 @@ IRC_PROTOCOL_CALLBACK(347) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 347 message looks like: - * :server 347 mynick #channel :End of Channel Invite List - */ - IRC_PROTOCOL_MIN_ARGS(4); pos_args = (argc > 4) ? @@ -3558,7 +3465,11 @@ IRC_PROTOCOL_CALLBACK(347) } /* - * irc_protocol_cb_348: '348' command received (channel exception list) + * Callback for the IRC message "348": channel exception list. + * + * Message looks like: + * :server 348 mynick #channel nick1!user1@host1 nick2!user2@host2 1205585109 + * (nick2 is nick who set exception on nick1) */ IRC_PROTOCOL_CALLBACK(348) @@ -3568,12 +3479,6 @@ IRC_PROTOCOL_CALLBACK(348) time_t datetime; const char *exception_nick, *exception_address; - /* - * 348 message looks like: - * :server 348 mynick #channel nick1!user1@host1 nick2!user2@host2 1205585109 - * (nick2 is nick who set exception on nick1) - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -3633,7 +3538,10 @@ IRC_PROTOCOL_CALLBACK(348) } /* - * irc_protocol_cb_349: '349' command received (end of channel exception list) + * Callback for the IRC message "349": end of channel exception list. + * + * Message looks like: + * :server 349 mynick #channel :End of Channel Exception List */ IRC_PROTOCOL_CALLBACK(349) @@ -3642,11 +3550,6 @@ IRC_PROTOCOL_CALLBACK(349) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 349 message looks like: - * :server 349 mynick #channel :End of Channel Exception List - */ - IRC_PROTOCOL_MIN_ARGS(4); pos_args = (argc > 4) ? @@ -3674,18 +3577,16 @@ IRC_PROTOCOL_CALLBACK(349) } /* - * irc_protocol_cb_351: '351' command received (server version) + * Callback for the IRC message "351": server version. + * + * Message looks like: + * :server 351 mynick dancer-ircd-1.0.36(2006/07/23_13:11:50). server :iMZ dncrTS/v4 */ IRC_PROTOCOL_CALLBACK(351) { struct t_gui_buffer *ptr_buffer; - /* - * 351 message looks like: - * :server 351 mynick dancer-ircd-1.0.36(2006/07/23_13:11:50). server :iMZ dncrTS/v4 - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_buffer = irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, @@ -3717,7 +3618,10 @@ IRC_PROTOCOL_CALLBACK(351) } /* - * irc_protocol_cb_352: '352' command (who) + * Callback for the IRC message "352": who. + * + * Message looks like: + * :server 352 mynick #channel user host server nick (*) (H/G) :0 flashcode */ IRC_PROTOCOL_CALLBACK(352) @@ -3727,11 +3631,6 @@ IRC_PROTOCOL_CALLBACK(352) struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; - /* - * 352 message looks like: - * :server 352 mynick #channel user host server nick (*) (H/G) :0 flashcode - */ - IRC_PROTOCOL_MIN_ARGS(5); /* silently ignore malformed 352 message (missing infos) */ @@ -3816,7 +3715,10 @@ IRC_PROTOCOL_CALLBACK(352) } /* - * irc_protocol_cb_353: '353' command received (list of users on a channel) + * Callback for the IRC message "353": list of users on a channel. + * + * Message looks like: + * :server 353 mynick = #channel :mynick nick1 @nick2 +nick3 */ IRC_PROTOCOL_CALLBACK(353) @@ -3827,11 +3729,6 @@ IRC_PROTOCOL_CALLBACK(353) struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; - /* - * 353 message looks like: - * :server 353 mynick = #channel :mynick nick1 @nick2 +nick3 - */ - IRC_PROTOCOL_MIN_ARGS(5); if (irc_channel_is_channel (server, argv[3])) @@ -3916,7 +3813,10 @@ IRC_PROTOCOL_CALLBACK(353) } /* - * irc_protocol_cb_366: '366' command received (end of /names list) + * Callback for the IRC message "366": end of /names list. + * + * Message looks like: + * :server 366 mynick #channel :End of /NAMES list. */ IRC_PROTOCOL_CALLBACK(366) @@ -3928,11 +3828,6 @@ IRC_PROTOCOL_CALLBACK(366) char *string; const char *prefix, *prefix_color, *nickname; - /* - * 366 message looks like: - * :server 366 mynick #channel :End of /NAMES list. - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -4093,7 +3988,10 @@ IRC_PROTOCOL_CALLBACK(366) } /* - * irc_protocol_cb_367: '367' command received (banlist) + * Callback for the IRC message "367": banlist. + * + * Message looks like: + * :server 367 mynick #channel banmask nick!user@host 1205590879 */ IRC_PROTOCOL_CALLBACK(367) @@ -4102,11 +4000,6 @@ IRC_PROTOCOL_CALLBACK(367) struct t_gui_buffer *ptr_buffer; time_t datetime; - /* - * 367 message looks like: - * :server 367 mynick #channel banmask nick!user@host 1205590879 - */ - IRC_PROTOCOL_MIN_ARGS(5); ptr_channel = irc_channel_search (server, argv[3]); @@ -4171,7 +4064,10 @@ IRC_PROTOCOL_CALLBACK(367) } /* - * irc_protocol_cb_368: '368' command received (end of banlist) + * Callback for the IRC message "368": end of banlist. + * + * Message looks like: + * :server 368 mynick #channel :End of Channel Ban List */ IRC_PROTOCOL_CALLBACK(368) @@ -4180,11 +4076,6 @@ IRC_PROTOCOL_CALLBACK(368) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 368 message looks like: - * :server 368 mynick #channel :End of Channel Ban List - */ - IRC_PROTOCOL_MIN_ARGS(4); pos_args = (argc > 4) ? @@ -4212,7 +4103,10 @@ IRC_PROTOCOL_CALLBACK(368) } /* - * irc_protocol_cb_432: '432' command received (erroneous nickname) + * Callback for the IRC message "432": erroneous nickname. + * + * Message looks like: + * :server 432 * mynick :Erroneous Nickname */ IRC_PROTOCOL_CALLBACK(432) @@ -4220,11 +4114,6 @@ IRC_PROTOCOL_CALLBACK(432) const char *alternate_nick; struct t_gui_buffer *ptr_buffer; - /* - * 432 message looks like: - * :server 432 * mynick :Erroneous Nickname - */ - irc_protocol_cb_generic_error (server, date, nick, address, host, command, ignored, argc, argv, argv_eol); @@ -4262,7 +4151,10 @@ IRC_PROTOCOL_CALLBACK(432) } /* - * irc_protocol_cb_433: '433' command received (nickname already in use) + * Callback for the IRC message "433": nickname already in use. + * + * Message looks like: + * :server 433 * mynick :Nickname is already in use. */ IRC_PROTOCOL_CALLBACK(433) @@ -4270,11 +4162,6 @@ IRC_PROTOCOL_CALLBACK(433) const char *alternate_nick; struct t_gui_buffer *ptr_buffer; - /* - * 433 message looks like: - * :server 433 * mynick :Nickname is already in use. - */ - if (!server->is_connected) { ptr_buffer = irc_msgbuffer_get_target_buffer (server, NULL, @@ -4315,8 +4202,10 @@ IRC_PROTOCOL_CALLBACK(433) } /* - * irc_protocol_cb_437: '437' command received (nick/channel temporarily - * unavailable) + * Callback for the IRC message "437": nick/channel temporarily unavailable. + * + * Message looks like: + * :server 437 * mynick :Nick/channel is temporarily unavailable */ IRC_PROTOCOL_CALLBACK(437) @@ -4324,11 +4213,6 @@ IRC_PROTOCOL_CALLBACK(437) const char *alternate_nick; struct t_gui_buffer *ptr_buffer; - /* - * 437 message looks like: - * :server 437 * mynick :Nick/channel is temporarily unavailable - */ - irc_protocol_cb_generic_error (server, date, nick, address, host, command, ignored, argc, argv, argv_eol); @@ -4370,19 +4254,16 @@ IRC_PROTOCOL_CALLBACK(437) } /* - * irc_protocol_cb_438: '438' command received (not authorized to change - * nickname) + * Callback for the IRC message "438": not authorized to change nickname. + * + * Message looks like: + * :server 438 mynick newnick :Nick change too fast. Please wait 30 seconds. */ IRC_PROTOCOL_CALLBACK(438) { struct t_gui_buffer *ptr_buffer; - /* - * 438 message looks like: - * :server 438 mynick newnick :Nick change too fast. Please wait 30 seconds. - */ - IRC_PROTOCOL_MIN_ARGS(4); ptr_buffer = irc_msgbuffer_get_target_buffer (server, NULL, @@ -4414,7 +4295,10 @@ IRC_PROTOCOL_CALLBACK(438) } /* - * irc_protocol_cb_728: '728' command received (quietlist) + * Callback for the IRC message "728": quietlist. + * + * Message looks like: + * :server 728 mynick #channel mode quietmask nick!user@host 1351350090 */ IRC_PROTOCOL_CALLBACK(728) @@ -4423,11 +4307,6 @@ IRC_PROTOCOL_CALLBACK(728) struct t_gui_buffer *ptr_buffer; time_t datetime; - /* - * 728 message looks like: - * :server 728 mynick #channel mode quietmask nick!user@host 1351350090 - */ - IRC_PROTOCOL_MIN_ARGS(6); ptr_channel = irc_channel_search (server, argv[3]); @@ -4492,7 +4371,10 @@ IRC_PROTOCOL_CALLBACK(728) } /* - * irc_protocol_cb_729: '729' command received (end of quietlist) + * Callback for the IRC message "729": end of quietlist. + * + * Message looks like: + * :server 729 mynick #channel mode :End of Channel Quiet List */ IRC_PROTOCOL_CALLBACK(729) @@ -4501,11 +4383,6 @@ IRC_PROTOCOL_CALLBACK(729) struct t_irc_channel *ptr_channel; struct t_gui_buffer *ptr_buffer; - /* - * 729 message looks like: - * :server 729 mynick #channel mode :End of Channel Quiet List - */ - IRC_PROTOCOL_MIN_ARGS(5); pos_args = (argc > 5) ? @@ -4533,16 +4410,14 @@ IRC_PROTOCOL_CALLBACK(729) } /* - * irc_protocol_cb_900: '900' command (logged in as (SASL)) + * Callback for the IRC message "900": logged in as (SASL). + * + * Message looks like: + * :server 900 mynick nick!user@host mynick :You are now logged in as mynick */ IRC_PROTOCOL_CALLBACK(900) { - /* - * 900 message looks like: - * :server 900 mynick nick!user@host mynick :You are now logged in as mynick - */ - IRC_PROTOCOL_MIN_ARGS(6); weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, argv[3], @@ -4562,16 +4437,14 @@ IRC_PROTOCOL_CALLBACK(900) } /* - * irc_protocol_cb_901: '901' command received (you are now logged in) + * Callback for the IRC message "901": you are now logged in. + * + * Message looks like: + * :server 901 mynick nick user host :You are now logged in. (id nick, username user, hostname host) */ IRC_PROTOCOL_CALLBACK(901) { - /* - * 901 message looks like: - * :server 901 mynick nick user host :You are now logged in. (id nick, username user, hostname host) - */ - IRC_PROTOCOL_MIN_ARGS(6); if (argc >= 7) @@ -4596,18 +4469,15 @@ IRC_PROTOCOL_CALLBACK(901) } /* - * irc_protocol_cb_sasl_end: '903' to '907' command received + * Callback for the IRC messages "903" to "907". + * + * Messages look like: + * :server 903 nick :SASL authentication successful + * :server 904 nick :SASL authentication failed */ IRC_PROTOCOL_CALLBACK(sasl_end) { - /* - * 903 message looks like: - * :server 903 nick :SASL authentication successful - * 904 message looks like: - * :server 904 nick :SASL authentication failed - */ - irc_protocol_cb_numeric (server, date, nick, address, host, command, ignored, argc, argv, argv_eol); @@ -4619,12 +4489,14 @@ IRC_PROTOCOL_CALLBACK(sasl_end) } /* - * irc_protocol_get_message_tags: return hashtable with tags for an IRC message - * example, if tags == "aaa=bbb;ccc;example.com/ddd=eee" - * hashtable will have following keys/values: - * "aaa" => "bbb" - * "ccc" => NULL - * "example.com/ddd" => "eee" + * Returns hashtable with tags for an IRC message. + * + * Example: + * if tags == "aaa=bbb;ccc;example.com/ddd=eee", + * hashtable will have following keys/values: + * "aaa" => "bbb" + * "ccc" => NULL + * "example.com/ddd" => "eee" */ struct t_hashtable * @@ -4674,9 +4546,9 @@ irc_protocol_get_message_tags (const char *tags) } /* - * irc_protocol_get_message_tag_time: get value of time in tags - * if no tag "time" is in tags, value 0 is - * returned + * Gets value of time in tags. + * + * Returns value of tag "time", 0 if not found. */ time_t @@ -4724,9 +4596,9 @@ irc_protocol_get_message_tag_time (struct t_hashtable *tags) } /* - * irc_protocol_recv_command: execute action when an IRC message is received - * Argument "irc_message" is the full message - * without optional tags. + * Executes action when an IRC message is received. + * + * Argument "irc_message" is the full message without optional tags. */ void diff --git a/src/plugins/irc/irc-raw.c b/src/plugins/irc/irc-raw.c index 6d1ae545a..095d0db3e 100644 --- a/src/plugins/irc/irc-raw.c +++ b/src/plugins/irc/irc-raw.c @@ -43,7 +43,7 @@ struct t_irc_raw_message *last_irc_raw_message = NULL; /* - * irc_raw_message_print: print an irc raw message + * Prints an irc raw message. */ void @@ -60,7 +60,7 @@ irc_raw_message_print (struct t_irc_raw_message *raw_message) } /* - * irc_raw_open: open IRC raw buffer + * Opens IRC raw buffer. */ void @@ -112,7 +112,7 @@ irc_raw_open (int switch_to_buffer) } /* - * irc_raw_message_free: free a raw message and remove it from list + * Frees a raw message and removes it from list. */ void @@ -148,7 +148,7 @@ irc_raw_message_free (struct t_irc_raw_message *raw_message) } /* - * irc_raw_message_free_all: free all raw messages + * Frees all raw messages. */ void @@ -161,7 +161,7 @@ irc_raw_message_free_all () } /* - * irc_raw_message_remove_old: remove old raw messages if limit has been reached + * Removes old raw messages if limit has been reached. */ void @@ -177,7 +177,9 @@ irc_raw_message_remove_old () } /* - * irc_raw_message_add_to_list: add new message to list + * Adds a new raw message to list. + * + * Returns pointer to new raw message, NULL if error. */ struct t_irc_raw_message * @@ -214,7 +216,9 @@ irc_raw_message_add_to_list (time_t date, const char *prefix, } /* - * irc_raw_message_add: add new message to list + * Adds a new raw message to list. + * + * Returns pointer to new raw message, NULL if error. */ struct t_irc_raw_message * @@ -305,7 +309,7 @@ irc_raw_message_add (struct t_irc_server *server, int flags, } /* - * irc_raw_print: print a message on IRC raw buffer + * Prints a message on IRC raw buffer. */ void @@ -332,8 +336,11 @@ irc_raw_print (struct t_irc_server *server, int flags, } /* - * irc_raw_add_to_infolist: add a raw message in an infolist - * return 1 if ok, 0 if error + * Adds a raw message in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index c938a5b57..d77861f25 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -242,7 +242,9 @@ struct t_irc_redirect_pattern irc_redirect_patterns_default[] = /* - * irc_redirect_pattern_search: search a redirect pattern in list of patterns + * Searches for a redirect pattern in list of patterns. + * + * Returns pointer to redirect pattern found, NULL if not found. */ struct t_irc_redirect_pattern * @@ -265,7 +267,9 @@ irc_redirect_pattern_search (const char *name) } /* - * irc_redirect_pattern_new: create a new redirect pattern + * Creates a new redirect pattern. + * + * Returns pointer to new redirect pattern, NULL if error. */ struct t_irc_redirect_pattern * @@ -323,7 +327,7 @@ irc_redirect_pattern_new (const char *name, int temp_pattern, int timeout, } /* - * irc_redirect_pattern_free: free a redirect pattern and remove it from list + * Frees a redirect pattern and removes it from list. */ void @@ -364,7 +368,7 @@ irc_redirect_pattern_free (struct t_irc_redirect_pattern *redirect_pattern) } /* - * irc_redirect_pattern_free_all: free all redirect patterns + * Frees all redirect patterns. */ void @@ -377,9 +381,10 @@ irc_redirect_pattern_free_all () } /* - * irc_redirect_new_with_commands: create a new redirect for a command on a - * server (with start/stop/extra commands in - * arguments) + * Creates a new redirect for a command on a server (with start/stop/extra + * commands in arguments). + * + * Returns pointer to new redirect, NULL if error. */ struct t_irc_redirect * @@ -482,7 +487,9 @@ irc_redirect_new_with_commands (struct t_irc_server *server, } /* - * irc_redirect_new: create a new redirect for a command on a server + * Creates a new redirect for a command on a server. + * + * Returns pointer to new redirect, NULL if error. */ struct t_irc_redirect * @@ -544,7 +551,9 @@ irc_redirect_new (struct t_irc_server *server, } /* - * irc_redirect_search_available: search first redirect available for server + * Searches for first redirect available for server. + * + * Returns pointer to redirect found, NULL if not found. */ struct t_irc_redirect * @@ -567,8 +576,7 @@ irc_redirect_search_available (struct t_irc_server *server) } /* - * irc_redirect_init_command: initalize a redirect with IRC command sent to - * server + * Initializes a redirect with IRC command sent to server. */ void @@ -609,8 +617,11 @@ irc_redirect_init_command (struct t_irc_redirect *redirect, } /* - * irc_redirect_message_match_hash: return 1 if a message matches hashtable - * with commands, 0 if it doesn't match + * Checks if a message matches hashtable with commands. + * + * Returns: + * 1: message matches hashtable + * 0: message does not match hashtable */ int @@ -642,7 +653,7 @@ irc_redirect_message_match_hash (struct t_irc_redirect *redirect, } /* - * irc_redirect_message_add: add a message to redirect output + * Adds a message to redirect output. */ void @@ -686,8 +697,8 @@ irc_redirect_message_add (struct t_irc_redirect *redirect, const char *message, } /* - * irc_redirect_stop: end of a redirection: send data to callback and free - * redirect (if count has been reached) + * Ends a redirection: sends data to callback and frees redirect (if count has + * been reached). */ void @@ -747,12 +758,12 @@ irc_redirect_stop (struct t_irc_redirect *redirect, const char *error) } /* - * irc_redirect_message: try to redirect a received message (from IRC server) - * to a redirect in server - * return: 1 if message has been redirected - * 0 if no matching redirect was found - * if message has been redirected, irc plugin will - * discard it (do not display anything) + * Tries to redirect a received message (from IRC server) to a redirect in + * server. + * + * Returns: + * 1: message has been redirected (irc plugin will discard message) + * 0: no matching redirect was found */ int @@ -884,7 +895,7 @@ end: } /* - * irc_redirect_free: free a redirect and remove it from list + * Frees a redirect and removes it from list. */ void @@ -951,7 +962,7 @@ irc_redirect_free (struct t_irc_redirect *redirect) } /* - * irc_redirect_free_all: free all redirects in list + * Frees all redirects in list. */ void @@ -964,7 +975,7 @@ irc_redirect_free_all (struct t_irc_server *server) } /* - * irc_redirect_hdata_redirect_pattern_cb: return hdata for redirect pattern + * Returns hdata for redirect pattern. */ struct t_hdata * @@ -994,7 +1005,7 @@ irc_redirect_hdata_redirect_pattern_cb (void *data, const char *hdata_name) } /* - * irc_redirect_hdata_redirect_cb: return hdata for redirect + * Returns hdata for redirect. */ struct t_hdata * @@ -1034,8 +1045,11 @@ irc_redirect_hdata_redirect_cb (void *data, const char *hdata_name) } /* - * irc_redirect_pattern_add_to_infolist: add a redirect pattern in an infolist - * return 1 if ok, 0 if error + * Adds a redirect pattern in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1068,8 +1082,11 @@ irc_redirect_pattern_add_to_infolist (struct t_infolist *infolist, } /* - * irc_redirect_add_to_infolist: add a redirect in an infolist - * return 1 if ok, 0 if error + * Adds a redirect in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1128,8 +1145,7 @@ irc_redirect_add_to_infolist (struct t_infolist *infolist, } /* - * irc_redirect_pattern_print_log: print redirect infos in log (usually for - * crash dump) + * Prints redirect infos in WeeChat log file (usually for crash dump). */ void @@ -1154,7 +1170,7 @@ irc_redirect_pattern_print_log () } /* - * irc_redirect_print_log: print redirect infos in log (usually for crash dump) + * Prints redirect infos in WeeChat log file (usually for crash dump). */ void @@ -1200,10 +1216,10 @@ irc_redirect_print_log (struct t_irc_server *server) } /* - * irc_redirect_pattern_hsignal_cb: callback for hsignal "irc_redirect_pattern" - * It is called when other plugins/scripts are - * creating a redirect pattern (irc plugin - * itself does not use this function) + * Callback for hsignal "irc_redirect_pattern". + * + * It is called when other plugins/scripts are creating a redirect pattern (irc + * plugin itself does not use this function). */ int @@ -1264,10 +1280,10 @@ irc_redirect_pattern_hsignal_cb (void *data, const char *signal, } /* - * irc_redirect_command_hsignal_cb: callback for hsignal "irc_redirect_command" - * It is called when other plugins/scripts are - * redirecting an IRC command (irc plugin - * itself does not use this function) + * Callback for hsignal "irc_redirect_command". + * + * It is called when other plugins/scripts are redirecting an IRC command (irc + * plugin itself does not use this function). */ int @@ -1334,7 +1350,7 @@ irc_redirect_command_hsignal_cb (void *data, const char *signal, } /* - * irc_redirect_init: create default redirect patterns + * Creates default redirect patterns. */ void @@ -1354,7 +1370,7 @@ irc_redirect_init () } /* - * irc_redirect_end: free all redirect patterns + * Frees all redirect patterns. */ void diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c index 7e5057ade..fe38e16ab 100644 --- a/src/plugins/irc/irc-sasl.c +++ b/src/plugins/irc/irc-sasl.c @@ -38,9 +38,9 @@ char *irc_sasl_mechanism_string[IRC_NUM_SASL_MECHANISMS] = /* - * irc_sasl_mechanism_plain: build answer for SASL authentication, using - * mechanism "PLAIN" - * Note: result must be freed after use + * Builds answer for SASL authentication, using mechanism "PLAIN". + * + * Note: result must be freed after use. */ char * @@ -71,16 +71,15 @@ irc_sasl_mechanism_plain (const char *sasl_username, const char *sasl_password) } /* - * irc_sasl_mechanism_dh_blowfish: build answer for SASL authentication, using - * mechanism "DH-BLOWFISH" - * Note: result must be freed after use + * Builds answer for SASL authentication, using mechanism "DH-BLOWFISH". + * + * Argument data_base64 is a concatenation of 3 strings, each string is composed + * of 2 bytes (length of string), followed by content of string: + * 1. a prime number + * 2. a generator number + * 3. server-generated public key * - * data_base64 is a concatenation of 3 strings, - * each string is composed of 2 bytes (length - * of string), followed by content of string: - * 1. a prime number - * 2. a generator number - * 3. server-generated public key + * Note: result must be freed after use. */ char * diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 4e625f276..426615ceb 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -115,9 +115,11 @@ void irc_server_free_data (struct t_irc_server *server); /* - * irc_server_valid: check if a server pointer exists - * return 1 if server exists - * 0 if server is not found + * Checks if a server pointer is valid. + * + * Returns: + * 1: server exists + * 0: server does not exist */ int @@ -140,7 +142,9 @@ irc_server_valid (struct t_irc_server *server) } /* - * irc_server_search: return pointer on a server with a name + * Searches for a server by name. + * + * Returns pointer to server found, NULL if not found. */ struct t_irc_server * @@ -163,8 +167,9 @@ irc_server_search (const char *server_name) } /* - * irc_server_casesearch: return pointer on a server with a name - * (case insensitive search) + * Searches for a server by name (case insensitive). + * + * Returns pointer to server found, NULL if not found. */ struct t_irc_server * @@ -187,10 +192,9 @@ irc_server_casesearch (const char *server_name) } /* - * irc_server_search_option: search a server option name - * return index of option in array - * "irc_server_option_string", or -1 if - * not found + * Searches for a server option name. + * + * Returns index of option in array "irc_server_option_string", -1 if not found. */ int @@ -213,7 +217,10 @@ irc_server_search_option (const char *option_name) } /* - * irc_server_search_casemapping: search casemapping with string + * Searches for a casemapping. + * + * Returns index of casemapping in array "irc_server_casemapping_string", -1 if + * not found. */ int @@ -232,8 +239,12 @@ irc_server_search_casemapping (const char *casemapping) } /* - * irc_server_strcasecmp: case insensitive string comparison on server - * (depends on casemapping) + * Compares two strings on server (case insensitive, depends on casemapping). + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -263,8 +274,13 @@ irc_server_strcasecmp (struct t_irc_server *server, } /* - * irc_server_strncasecmp: case insensitive string comparison on server for max - * chars (depends on casemapping) + * Compares two strings on server (case insensitive, depends on casemapping) for + * max chars. + * + * Returns: + * < 0: string1 < string2 + * 0: string1 == string2 + * > 0: string1 > string2 */ int @@ -294,8 +310,11 @@ irc_server_strncasecmp (struct t_irc_server *server, } /* - * irc_server_sasl_enabled: return 1 if SASL is enabled on server - * 0 if SASL is NOT enabled on server + * Checks if SASL is enabled on server. + * + * Returns: + * 1: SASL is enabled + * 0: SASL is disabled */ int @@ -321,8 +340,9 @@ irc_server_sasl_enabled (struct t_irc_server *server) } /* - * irc_server_get_name_without_port: get name of server without port - * (ends before first '/' if found) + * Gets name of server without port (ends before first '/' if found). + * + * Note: result must be freed after use. */ char * @@ -341,7 +361,7 @@ irc_server_get_name_without_port (const char *name) } /* - * irc_server_set_addresses: set addresses for server + * Sets addresses for server. */ void @@ -399,7 +419,7 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses) } /* - * irc_server_set_index_current_address: set index of current address for server + * Sets index of current address for server. */ void @@ -428,7 +448,7 @@ irc_server_set_index_current_address (struct t_irc_server *server, int index) } /* - * irc_server_set_nicks: set nicks for server + * Sets nicks for server. */ void @@ -449,7 +469,7 @@ irc_server_set_nicks (struct t_irc_server *server, const char *nicks) } /* - * irc_server_set_nick: set nickname for a server + * Sets nickname for server. */ void @@ -473,9 +493,10 @@ irc_server_set_nick (struct t_irc_server *server, const char *nick) } /* - * irc_server_get_nick_index: get index of nick in array "nicks_array" - * return -1 if nick is not set or not found in - * "nicks_array" + * Gets index of nick in array "nicks_array". + * + * Returns index of nick in array, -1 if nick is not set or not found in + * "nicks_array". */ int @@ -499,26 +520,28 @@ irc_server_get_nick_index (struct t_irc_server *server) } /* - * irc_server_get_alternate_nick: get an alternate nick when the nick is - * already used on server - * We first try all declared nicks, then we - * build nicks by adding "_", until length of 9. - * If all nicks are still used, build 99 - * alternate nicks by using number at the end. - * Example: nicks = "abcde,fghi,jkl" - * Nicks tried: abcde - * fghi - * jkl - * abcde_ - * abcde__ - * abcde___ - * abcde____ - * abcde___1 - * abcde___2 - * ... - * abcde__99 - * Return NULL if no more alternate nick is - * available + * Gets an alternate nick when the nick is already used on server. + * + * First tries all declared nicks, then builds nicks by adding "_", until + * length of 9. + * + * If all nicks are still used, builds 99 alternate nicks by using number at the + * end. + * + * Example: nicks = "abcde,fghi,jkl" + * => nicks tried: abcde + * fghi + * jkl + * abcde_ + * abcde__ + * abcde___ + * abcde____ + * abcde___1 + * abcde___2 + * ... + * abcde__99 + * + * Returns NULL if no more alternate nick is available. */ const char * @@ -596,11 +619,10 @@ irc_server_get_alternate_nick (struct t_irc_server *server) } /* - * irc_server_get_isupport_value: return value of an item in "isupport" (copy - * of IRC message 005) - * if feature is found but has no value, empty - * string is returned - * if feature is not found, NULL is returned + * Gets value of a feature item in "isupport" (copy of IRC message 005). + * + * Returns value of feature (empty string if feature has no value, NULL if + * feature is not found). */ const char * @@ -647,12 +669,12 @@ irc_server_get_isupport_value (struct t_irc_server *server, const char *feature) } /* - * irc_server_set_prefix_modes_chars: set "prefix_modes" and "prefix_chars" in - * server using value of PREFIX in IRC - * message 005 - * for example, if prefix is "(ohv)@%+", - * prefix_modes = "ohv" - * prefix_chars = "@%+" + * Sets "prefix_modes" and "prefix_chars" in server using value of PREFIX in IRC + * message 005. + * + * For example, if prefix is "(ohv)@%+": + * prefix_modes is set to "ohv" + * prefix_chars is set to "@%+". */ void @@ -707,8 +729,9 @@ irc_server_set_prefix_modes_chars (struct t_irc_server *server, } /* - * irc_server_get_prefix_modes: get prefix_modes for server (return default - * modes if prefix_modes is not set) + * Gets prefix_modes for server. + * + * Returns default modes if prefix_modes is not set in server. */ const char * @@ -719,8 +742,9 @@ irc_server_get_prefix_modes (struct t_irc_server *server) } /* - * irc_server_get_prefix_chars: get prefix_chars for server (return default - * chars if prefix_chars is not set) + * Gets prefix_chars for server. + * + * Returns default chars if prefix_chars is not set in server. */ const char * @@ -731,8 +755,9 @@ irc_server_get_prefix_chars (struct t_irc_server *server) } /* - * irc_server_get_prefix_mode_index: get index of mode in prefix_modes - * return -1 if mode does not exist in server + * Gets index of mode in prefix_modes. + * + * Returns -1 if mode does not exist in server. */ int @@ -753,9 +778,9 @@ irc_server_get_prefix_mode_index (struct t_irc_server *server, char mode) } /* - * irc_server_get_prefix_char_index: get index of prefix_char in prefix_chars - * return -1 if prefix_char does not exist in - * server + * Gets index of prefix_char in prefix_chars. + * + * Returns -1 if prefix_char does not exist in server. */ int @@ -777,9 +802,9 @@ irc_server_get_prefix_char_index (struct t_irc_server *server, } /* - * irc_server_get_prefix_mode_for_char: get mode for prefix char - * return ' ' (space) if prefix char is - * not found + * Gets mode for prefix char. + * + * Returns ' ' (space) if prefix char is not found. */ char @@ -801,8 +826,9 @@ irc_server_get_prefix_mode_for_char (struct t_irc_server *server, } /* - * irc_server_get_prefix_mode_for_char: get prefix char for mode - * return ' ' (space) if mode is not found + * Gets prefix char for mode. + * + * Returns return ' ' (space) if mode is not found. */ char @@ -823,8 +849,9 @@ irc_server_get_prefix_char_for_mode (struct t_irc_server *server, char mode) } /* - * irc_server_get_chanmodes: get chanmodes for server (return default chanmodes - * if chanmodes is not set) + * Gets chanmodes for server. + * + * Returns default chanmodes if chanmodes is not set in server. */ const char * @@ -835,7 +862,9 @@ irc_server_get_chanmodes (struct t_irc_server *server) } /* - * irc_server_alloc: allocate a new server and add it to the servers queue + * Allocates a new server and adds it to the servers queue. + * + * Returns pointer to new server, NULL if error. */ struct t_irc_server * @@ -984,9 +1013,9 @@ irc_server_alloc (const char *name) } /* - * irc_server_alloc_with_url: init a server with url of this form: - * irc://nick:pass@irc.toto.org:6667 - * return server pointer, or NULL if error + * Initializes a server with URL of this form: irc://nick:pass@irc.toto.org:6667 + * + * Returns pointer to new server, NULL if error. */ struct t_irc_server * @@ -1184,13 +1213,9 @@ irc_server_alloc_with_url (const char *irc_url) } /* - * irc_server_apply_command_line_options: apply options on command line to a - * server - * for example: - * -ssl - * -nossl - * -password=test - * -proxy=myproxy + * Applies command line options to a server. + * + * For example: -ssl -nossl -password=test -proxy=myproxy */ void @@ -1241,7 +1266,7 @@ irc_server_apply_command_line_options (struct t_irc_server *server, } /* - * irc_server_outqueue_add: add a message in out queue + * Adds a message in out queue. */ void @@ -1273,7 +1298,7 @@ irc_server_outqueue_add (struct t_irc_server *server, int priority, } /* - * irc_server_outqueue_free: free a message in out queue + * Frees a message in out queue. */ void @@ -1313,7 +1338,7 @@ irc_server_outqueue_free (struct t_irc_server *server, } /* - * irc_server_outqueue_free_all: free all outqueued messages + * Frees all messages in out queue. */ void @@ -1327,7 +1352,7 @@ irc_server_outqueue_free_all (struct t_irc_server *server, int priority) } /* - * irc_server_free_data: free server data + * Frees server data. */ void @@ -1408,7 +1433,7 @@ irc_server_free_data (struct t_irc_server *server) } /* - * irc_server_free: free a server and remove it from servers queue + * Frees a server and remove it from list of servers. */ void @@ -1447,7 +1472,7 @@ irc_server_free (struct t_irc_server *server) } /* - * irc_server_free_all: free all allocated servers + * Frees all servers. */ void @@ -1461,8 +1486,9 @@ irc_server_free_all () } /* - * irc_server_copy: copy a server - * return: pointer to new server, NULL if error + * Copies a server. + * + * Returns pointer to new server, NULL if error. */ struct t_irc_server * @@ -1517,8 +1543,11 @@ irc_server_copy (struct t_irc_server *server, const char *new_name) } /* - * irc_server_rename: rename server (internal name) - * return: 1 if ok, 0 if error + * Renames a server (internal name). + * + * Returns: + * 1: OK + * 0: error */ int @@ -1611,7 +1640,7 @@ irc_server_rename (struct t_irc_server *server, const char *new_server_name) } /* - * irc_server_send_signal: send a signal for an IRC message (received or sent) + * Sends a signal for an IRC message (received or sent). */ void @@ -1652,8 +1681,9 @@ irc_server_send_signal (struct t_irc_server *server, const char *signal, } /* - * irc_server_send: send data to IRC server - * return number of bytes sent, -1 if error + * Sends data to IRC server. + * + * Returns number of bytes sent, -1 if error. */ int @@ -1712,7 +1742,7 @@ irc_server_send (struct t_irc_server *server, const char *buffer, int size_buf) } /* - * irc_server_set_send_default_tags: set default tags used when sending message + * Sets default tags used when sending message. */ void @@ -1722,10 +1752,10 @@ irc_server_set_send_default_tags (const char *tags) } /* - * irc_server_get_tags_to_send: get tags to send by concatenation of tags - * and irc_server_send_default_tags (if set) - * If returned value is not NULL, then it must be - * free() after use. + * Gets tags to send by concatenation of tags and irc_server_send_default_tags + * (if set). + * + * Note: result must be freed after use. */ char * @@ -1752,7 +1782,7 @@ irc_server_get_tags_to_send (const char *tags) } /* - * irc_server_outqueue_send: send a message from outqueue + * Sends a message from out queue. */ void @@ -1838,15 +1868,17 @@ irc_server_outqueue_send (struct t_irc_server *server) } /* - * irc_server_send_one_msg: send one message to IRC server - * if flag contains outqueue priority value, then - * messages are in a queue and sent slowly (to be sure - * there will not be any "excess flood"), value of - * queue_msg is priority: - * 1 = higher priority, for user messages - * 2 = lower priority, for other messages (like - * auto reply to CTCP queries) - * return: 1 if ok, 0 if error + * Sends one message to IRC server. + * + * If flag contains outqueue priority value, then messages are in a queue and + * sent slowly (to be sure there will not be any "excess flood"), value of + * queue_msg is priority: + * 1 = higher priority, for user messages + * 2 = lower priority, for other messages (like auto reply to CTCP queries) + * + * Returns: + * 1: OK + * 0: error */ int @@ -2031,12 +2063,15 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags, } /* - * irc_server_sendf: send formatted data to IRC server - * many messages may be sent, separated by '\n' - * if flags contains "IRC_SERVER_SEND_RETURN_HASHTABLE", then - * hashtable with split of message is returned - * (see function irc_message_split() in irc-message.c) - * note: hashtable must be freed after use + * Sends formatted data to IRC server. + * + * Many messages may be sent, separated by '\n'. + * + * If flags contains "IRC_SERVER_SEND_RETURN_HASHTABLE", then a hashtable with + * split of message is returned (see function irc_message_split() in + * irc-message.c) + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -2158,7 +2193,7 @@ irc_server_sendf (struct t_irc_server *server, int flags, const char *tags, } /* - * irc_server_msgq_add_msg: add a message to received messages queue (at the end) + * Adds a message to received messages queue (at the end). */ void @@ -2214,7 +2249,7 @@ irc_server_msgq_add_msg (struct t_irc_server *server, const char *msg) } /* - * irc_server_msgq_add_unterminated: add an unterminated message to queue + * Adds an unterminated message to queue. */ void @@ -2256,7 +2291,7 @@ irc_server_msgq_add_unterminated (struct t_irc_server *server, const char *strin } /* - * irc_server_msgq_add_buffer: split received buffer, creating queued messages + * Splits received buffer, creating queued messages. */ void @@ -2294,7 +2329,7 @@ irc_server_msgq_add_buffer (struct t_irc_server *server, const char *buffer) } /* - * irc_server_msgq_flush: flush message queue + * Flushes message queue. */ void @@ -2507,7 +2542,7 @@ irc_server_msgq_flush () } /* - * irc_server_recv_cb: receive data from an irc server + * Receives data from a server. */ int @@ -2585,9 +2620,8 @@ irc_server_recv_cb (void *data, int fd) } /* - * irc_server_timer_connection_cb: callback for server connection - * it is called if WeeChat is TCP-connected to - * server, but did not receive message 001 + * Callback for server connection: it is called if WeeChat is TCP-connected to + * server, but did not receive message 001. */ int @@ -2617,12 +2651,9 @@ irc_server_timer_connection_cb (void *data, int remaining_calls) } /* - * irc_server_timer_sasl_cb: callback for SASL authentication timer - * it is called if there is a timeout with SASL - * authentication - * (if SASL authentication is ok or failed, then - * hook timer is removed before this callback is - * called) + * Callback for SASL authentication timer: it is called if there is a timeout + * with SASL authentication (if SASL authentication is ok or failed, then hook + * timer is removed before this callback is called). */ int @@ -2652,9 +2683,8 @@ irc_server_timer_sasl_cb (void *data, int remaining_calls) } /* - * irc_server_check_join_manual_cb: callback called for each manual join of a - * server, it will delete old channels in - * this hashtable + * Callback called for each manual join of a server: deletes old channels in the + * hashtable. */ void @@ -2672,9 +2702,8 @@ irc_server_check_join_manual_cb (void *data, struct t_hashtable *hashtable, } /* - * irc_server_check_join_noswitch_cb: callback called for each join without - * switch of a server, it will delete old - * channels in this hashtable + * Callback called for each join without switch of a server: deletes old channel + * in the hashtable. */ void @@ -2692,8 +2721,7 @@ irc_server_check_join_noswitch_cb (void *data, struct t_hashtable *hashtable, } /* - * irc_server_timer_cb: timer called each second to perform some operations - * on servers + * Timer called each second to perform some operations on servers. */ int @@ -2827,7 +2855,7 @@ irc_server_timer_cb (void *data, int remaining_calls) } /* - * irc_server_close_connection: close server connection + * Closes server connection. */ void @@ -2910,7 +2938,7 @@ irc_server_close_connection (struct t_irc_server *server) } /* - * irc_server_reconnect_schedule: schedule reconnect for a server + * Schedules reconnection on server. */ void @@ -2971,7 +2999,7 @@ irc_server_reconnect_schedule (struct t_irc_server *server) } /* - * irc_server_login: login to IRC server + * Logins to server. */ void @@ -3026,8 +3054,8 @@ irc_server_login (struct t_irc_server *server) } /* - * irc_server_switch_address: switch address and try another - * (called if connection failed with an address/port) + * Switches address and tries another (called if connection failed with an + * address/port). */ void @@ -3059,7 +3087,7 @@ irc_server_switch_address (struct t_irc_server *server, int connection) } /* - * irc_server_connect_cb: read connection status + * Reads connection status. */ int @@ -3274,7 +3302,7 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc, int sock, } /* - * irc_server_set_buffer_title: set title for a server buffer + * Sets the title for a server buffer. */ void @@ -3309,7 +3337,9 @@ irc_server_set_buffer_title (struct t_irc_server *server) } /* - * irc_server_create_buffer: create a buffer for an IRC server + * Creates a buffer for a server. + * + * Returns pointer to buffer, NULL if error. */ struct t_gui_buffer * @@ -3386,7 +3416,7 @@ irc_server_create_buffer (struct t_irc_server *server) #ifdef HAVE_GNUTLS /* - * irc_server_gnutls_callback: gnutls callback called during handshake + * GnuTLS callback called during handshake. * */ int @@ -3672,9 +3702,11 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session, #endif /* - * irc_server_connect: connect to an IRC server - * Return: 1 if ok - * 0 if error + * Connects to a server. + * + * Returns: + * 1: OK + * 0: error */ int @@ -3881,7 +3913,7 @@ irc_server_connect (struct t_irc_server *server) } /* - * irc_server_reconnect: reconnect to a server (after disconnection) + * Reconnects to a server (after disconnection). */ void @@ -3901,11 +3933,10 @@ irc_server_reconnect (struct t_irc_server *server) } /* - * irc_server_auto_connect: auto-connect to servers (called at startup) - * if auto_connect = 1, auto connect to all servers - * with flag "autoconnect" - * = 0, auto connect to temp servers - * only (created with "irc://..") + * Auto-connects to servers (called at startup). + * + * If auto_connect == 1, auto-connects to all servers with flag "autoconnect". + * If auto_connect == 0, auto-connect to temporary servers only. */ void @@ -3926,7 +3957,7 @@ irc_server_auto_connect (int auto_connect) } /* - * irc_server_disconnect: disconnect from an irc server + * Disconnects from a server. */ void @@ -4016,7 +4047,7 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address, } /* - * irc_server_disconnect_all: disconnect from all irc servers + * Disconnects from all servers. */ void @@ -4032,7 +4063,7 @@ irc_server_disconnect_all () } /* - * irc_server_autojoin_channels: autojoin (or rejoin) channels + * Autojoins (or auto-rejoins) channels. */ void @@ -4080,7 +4111,7 @@ irc_server_autojoin_channels (struct t_irc_server *server) } /* - * irc_server_get_number_connected: returns number of connected server + * Returns number of connected servers. */ int @@ -4099,8 +4130,7 @@ irc_server_get_number_connected () } /* - * irc_server_get_number_buffer: returns position of a server and total number of - * buffers with a buffer + * Returns position of a server and total number of servers with a buffer. */ void @@ -4124,7 +4154,7 @@ irc_server_get_number_buffer (struct t_irc_server *server, } /* - * irc_server_get_channel_count: return number of channels for server + * Returns number of channels for server. */ int @@ -4144,7 +4174,7 @@ irc_server_get_channel_count (struct t_irc_server *server) } /* - * irc_server_get_pv_count: return number of pv for server + * Returns number of pv for server. */ int @@ -4164,7 +4194,7 @@ irc_server_get_pv_count (struct t_irc_server *server) } /* - * irc_server_remove_away: remove away for all chans/nicks (for all servers) + * Removes away for all channels/nicks (for all servers). */ void @@ -4185,7 +4215,7 @@ irc_server_remove_away (struct t_irc_server *server) } /* - * irc_server_check_away: check for away on all channels of a server + * Checks for away on all channels of a server. */ void @@ -4206,7 +4236,7 @@ irc_server_check_away (struct t_irc_server *server) } /* - * irc_server_set_away: set/unset away status for a server (all channels) + * Sets/unsets away status for a server (all channels). */ void @@ -4250,11 +4280,11 @@ irc_server_set_away (struct t_irc_server *server, const char *nick, int is_away) } /* - * irc_server_xfer_send_ready_cb: callback called when user send (file or chat) - * to someone and that xfer plugin successfully - * initialized xfer and is ready for sending - * in that case, irc plugin send message to - * remote nick and wait for "accept" reply + * Callback called when user sends (file or chat) to someone and that xfer + * plugin successfully initialized xfer and is ready for sending. + * + * In that case, irc plugin sends message to remote nick and wait for "accept" + * reply. */ int @@ -4321,11 +4351,10 @@ irc_server_xfer_send_ready_cb (void *data, const char *signal, } /* - * irc_server_xfer_resume_ready_cb: callback called when user receives a file - * and that resume is possible (file is partially - * received) - * in that case, irc plugin send message to - * remote nick with resume position + * Callback called when user receives a file and that resume is possible (file + * is partially received). + * + * In that case, irc plugin sends message to remote nick with resume position. */ int @@ -4374,11 +4403,10 @@ irc_server_xfer_resume_ready_cb (void *data, const char *signal, } /* - * irc_server_xfer_send_accept_resume_cb: callback called when xfer plugin - * accepted resume request from receiver - * in that case, irc plugin send accept - * message to remote nick with resume - * position + * Callback called when xfer plugin accepted resume request from receiver. + * + * In that case, irc plugin sends accept message to remote nick with resume + * position. */ int @@ -4428,7 +4456,7 @@ irc_server_xfer_send_accept_resume_cb (void *data, const char *signal, } /* - * irc_server_hdata_server_cb: return hdata for server + * Returns hdata for server. */ struct t_hdata * @@ -4521,8 +4549,11 @@ irc_server_hdata_server_cb (void *data, const char *hdata_name) } /* - * irc_server_add_to_infolist: add a server in an infolist - * return 1 if ok, 0 if error + * Adds a server in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -4721,7 +4752,7 @@ irc_server_add_to_infolist (struct t_infolist *infolist, } /* - * irc_server_print_log: print server infos in log (usually for crash dump) + * Prints server infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/irc/irc-upgrade.c b/src/plugins/irc/irc-upgrade.c index 83eff4d8d..94ff03340 100644 --- a/src/plugins/irc/irc-upgrade.c +++ b/src/plugins/irc/irc-upgrade.c @@ -44,7 +44,11 @@ struct t_irc_channel *irc_upgrade_current_channel = NULL; /* - * irc_upgrade_save_all_data: save servers/channels/nicks info to upgrade file + * Saves servers/channels/nicks info to irc upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -209,8 +213,11 @@ irc_upgrade_save_all_data (struct t_upgrade_file *upgrade_file) } /* - * irc_upgrade_save: save upgrade file - * return 1 if ok, 0 if error + * Saves irc upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -231,8 +238,8 @@ irc_upgrade_save () } /* - * irc_upgrade_set_buffer_callbacks: restore buffers callbacks (input and - * close) for buffers created by IRC plugin + * Restores buffers callbacks (input and close) for buffers created by irc + * plugin. */ void @@ -270,7 +277,7 @@ irc_upgrade_set_buffer_callbacks () } /* - * irc_upgrade_read_cb: read callback for upgrade + * Reads callback for irc upgrade. */ int @@ -633,8 +640,11 @@ irc_upgrade_read_cb (void *data, } /* - * irc_upgrade_load: load upgrade file - * return 1 if ok, 0 if error + * Loads irc upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index 730eed169..be16b6828 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -61,7 +61,7 @@ int irc_signal_upgrade_received = 0; /* signal "upgrade" received ? */ /* - * irc_signal_quit_cb: callback for "quit" signal + * Callback for signal "quit". */ int @@ -88,7 +88,7 @@ irc_signal_quit_cb (void *data, const char *signal, const char *type_data, } /* - * irc_signal_upgrade_cb: callback for "upgrade" signal + * Callback for signal "upgrade". */ int @@ -152,7 +152,7 @@ irc_signal_upgrade_cb (void *data, const char *signal, const char *type_data, } /* - * weechat_plugin_init: initialize IRC plugin + * Initializes IRC plugin. */ int @@ -248,7 +248,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end IRC plugin + * Ends IRC plugin. */ int diff --git a/src/plugins/logger/logger-buffer.c b/src/plugins/logger/logger-buffer.c index da4122256..19f63ac67 100644 --- a/src/plugins/logger/logger-buffer.c +++ b/src/plugins/logger/logger-buffer.c @@ -39,9 +39,11 @@ struct t_logger_buffer *last_logger_buffer = NULL; /* - * logger_buffer_valid: check if a logger buffer pointer exists - * return 1 if logger buffer exists - * 0 if logger buffer is not found + * Checks if a logger buffer pointer is valid. + * + * Returns: + * 1: logger buffer exists + * 0: logger buffer does not exist */ int @@ -64,7 +66,9 @@ logger_buffer_valid (struct t_logger_buffer *logger_buffer) } /* - * logger_buffer_add: add a new buffer for logging + * Adds a new buffer for logging. + * + * Returns pointer to new logger buffer, NULL if error. */ struct t_logger_buffer * @@ -108,7 +112,9 @@ logger_buffer_add (struct t_gui_buffer *buffer, int log_level) } /* - * logger_buffer_search_buffer: search a logger buffer by buffer pointer + * Searches for logger buffer by buffer pointer. + * + * Returns pointer to logger buffer found, NULL if not found. */ struct t_logger_buffer * @@ -128,7 +134,9 @@ logger_buffer_search_buffer (struct t_gui_buffer *buffer) } /* - * logger_buffer_search_log_filename: search a logger buffer by log filename + * Searches for a logger buffer by log filename. + * + * Returns pointer to logger buffer found, NULL if not found. */ struct t_logger_buffer * @@ -154,7 +162,7 @@ logger_buffer_search_log_filename (const char *log_filename) } /* - * logger_buffer_free: remove a logger buffer from list + * Removes a logger buffer from list. */ void @@ -200,8 +208,11 @@ logger_buffer_free (struct t_logger_buffer *logger_buffer) } /* - * logger_buffer_add_to_infolist: add a logger buffer in an infolist - * return 1 if ok, 0 if error + * Adds a logger buffer in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c index e8e526f04..f0778a5b5 100644 --- a/src/plugins/logger/logger-config.c +++ b/src/plugins/logger/logger-config.c @@ -57,9 +57,8 @@ struct t_config_option *logger_config_file_time_format; /* - * logger_config_change_file_option_restart_log: called when a file option is - * changed and that logging must - * be restarted for all buffers + * Callback for changes on option that require a restart of logging for all + * buffers. */ void @@ -75,7 +74,7 @@ logger_config_change_file_option_restart_log (void *data, } /* - * logger_config_flush_delay_change: called when flush delay is changed + * Callback for changes on option "logger.file.flush_delay". */ void @@ -118,7 +117,7 @@ logger_config_flush_delay_change (void *data, } /* - * logger_config_level_change: called when a level option is changed + * Callback for changes on a level option. */ void @@ -134,7 +133,7 @@ logger_config_level_change (void *data, } /* - * logger_config_level_delete_option: delete option in "level" section + * Callback called when an option is deleted in section "level". */ int @@ -156,7 +155,7 @@ logger_config_level_delete_option (void *data, } /* - * logger_config_level_create_option: create option in "level" section + * Callback called when an option is created in section "level". */ int @@ -215,7 +214,7 @@ logger_config_level_create_option (void *data, } /* - * logger_config_get_level: get a level option + * Gets a level option. */ struct t_config_option * @@ -227,7 +226,7 @@ logger_config_get_level (const char *name) } /* - * logger_config_set_level: set a level option + * Sets a level option. */ int @@ -241,7 +240,7 @@ logger_config_set_level (const char *name, const char *value) } /* - * logger_config_mask_change: called when a mask option is changed + * Callback for changes on a mask option. */ void @@ -257,7 +256,7 @@ logger_config_mask_change (void *data, } /* - * logger_config_mask_delete_option: delete option in "mask" section + * Callback called when an option is deleted in section "mask". */ int @@ -279,7 +278,7 @@ logger_config_mask_delete_option (void *data, } /* - * logger_config_mask_create_option: create option in "mask" section + * Callback called when an option is created in section "mask". */ int @@ -338,7 +337,7 @@ logger_config_mask_create_option (void *data, } /* - * logger_config_get_mask: get a mask option + * Gets a mask option. */ struct t_config_option * @@ -350,8 +349,11 @@ logger_config_get_mask (const char *name) } /* - * logger_config_init: init logger configuration file - * return: 1 if ok, 0 if error + * Initializes logger configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -509,7 +511,7 @@ logger_config_init () } /* - * logger_config_read: read logger configuration file + * Reads logger configuration file. */ int @@ -527,7 +529,7 @@ logger_config_read () } /* - * logger_config_write: write logger configuration file + * Writes logger configuration file. */ int @@ -537,7 +539,7 @@ logger_config_write () } /* - * logger_config_free: free logger configuration + * Frees logger configuration. */ void diff --git a/src/plugins/logger/logger-info.c b/src/plugins/logger/logger-info.c index 681c108f2..42b7d3f0c 100644 --- a/src/plugins/logger/logger-info.c +++ b/src/plugins/logger/logger-info.c @@ -30,7 +30,7 @@ /* - * logger_info_get_infolist_cb: callback called when logger infolist is asked + * Returns infolist with logger info. */ struct t_infolist * @@ -87,13 +87,12 @@ logger_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * logger_info_init: initialize info and infolist hooks for logger plugin + * Hooks infolist for logger plugin. */ void logger_info_init () { - /* logger infolist hooks */ weechat_hook_infolist ("logger_buffer", N_("list of logger buffers"), N_("logger pointer (optional)"), NULL, diff --git a/src/plugins/logger/logger-tail.c b/src/plugins/logger/logger-tail.c index 7b47d8ecb..077ab5f25 100644 --- a/src/plugins/logger/logger-tail.c +++ b/src/plugins/logger/logger-tail.c @@ -40,7 +40,7 @@ /* - * logger_tail_last_eol: find last eol in a string + * Searches for last EOL in a string. */ char * @@ -58,7 +58,9 @@ logger_tail_last_eol (const char *string_start, const char *string_ptr) } /* - * logger_tail_file: return last lines of a file + * Returns last lines of a file. + * + * Note: result must be freed with function "logger_tail_free". */ struct t_logger_line * @@ -210,7 +212,7 @@ logger_tail_file (const char *filename, int n_lines) } /* - * logger_tail_free: free structure returned by "logger_tail_file" function + * Frees structure returned by function "logger_tail_file". */ void diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index 4a0d9fd1d..48b4604b8 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -59,11 +59,14 @@ struct t_hook *logger_timer = NULL; /* timer to flush log files */ /* - * logger_get_file_path: get logger file path option, special vars are replaced: - * - "%h" (at beginning of string): WeeChat home - * - "~": user home - * - date/time specifiers (see man strftime) - * note: returned value has to be free() after use + * Gets logger file path option. + * + * Special vars are replaced: + * - "%h" (at beginning of string): WeeChat home + * - "~": user home + * - date/time specifiers (see man strftime) + * + * Note: returned value must freed after use. */ char * @@ -129,9 +132,11 @@ end: } /* - * logger_create_directory: create logger directory - * return 1 if success (directory created or already - * exists), 0 if failed + * Creates logger directory. + * + * Returns: + * 1: OK + * 0: error */ int @@ -156,7 +161,9 @@ logger_create_directory () } /* - * logger_build_option_name: build option name with a buffer + * Builds full name of buffer. + * + * Note: value must be freed after use. */ char * @@ -183,7 +190,9 @@ logger_build_option_name (struct t_gui_buffer *buffer) } /* - * logger_get_level_for_buffer: get logging level for buffer (0 = disabled, 1..9) + * Gets logging level for buffer. + * + * Returns level between 0 and 9 (0 = logging disabled). */ int @@ -239,9 +248,10 @@ logger_get_level_for_buffer (struct t_gui_buffer *buffer) } /* - * logger_get_mask_for_buffer: get filename mask for a buffer - * we first try with all arguments, then remove one by - * one to find mask (from specific to general mask) + * Gets filename mask for a buffer. + * + * First tries with all arguments, then removes one by one to find mask (from + * specific to general mask). */ const char * @@ -296,11 +306,13 @@ logger_get_mask_for_buffer (struct t_gui_buffer *buffer) } /* - * logger_get_mask_expanded: get expanded mask for a buffer, special vars are - * replaced: - * - local variables of buffer ($plugin, $name, ..) - * - date/time specifiers (see man strftime) - * note: returned value has to be free() after use + * Gets expanded mask for a buffer. + * + * Special vars are replaced: + * - local variables of buffer ($plugin, $name, ..) + * - date/time specifiers (see man strftime) + * + * Note: result must be freed after use. */ char * @@ -386,7 +398,7 @@ end: } /* - * logger_get_filename: build log filename for a buffer + * Builds log filename for a buffer. */ char * @@ -451,7 +463,7 @@ end: } /* - * logger_set_log_filename: set log filename for a logger buffer + * Sets log filename for a logger buffer. */ void @@ -508,7 +520,7 @@ logger_set_log_filename (struct t_logger_buffer *logger_buffer) } /* - * logger_write_line: write a line to log file + * Writes a line to log file. */ void @@ -609,7 +621,7 @@ logger_write_line (struct t_logger_buffer *logger_buffer, } /* - * logger_stop: stop log for a logger buffer + * Stops log for a logger buffer. */ void @@ -646,7 +658,7 @@ logger_stop (struct t_logger_buffer *logger_buffer, int write_info_line) } /* - * logger_stop_all: end log for all buffers + * Ends log for all buffers. */ void @@ -659,7 +671,7 @@ logger_stop_all (int write_info_line) } /* - * logger_start_buffer: start a log for a buffer + * Starts logging for a buffer. */ void @@ -711,7 +723,7 @@ logger_start_buffer (struct t_gui_buffer *buffer, int write_info_line) } /* - * logger_start_buffer_all: start log buffer for all buffers + * Starts logging for all buffers. */ void @@ -733,7 +745,7 @@ logger_start_buffer_all (int write_info_line) } /* - * logger_list: show logging status for buffers + * Displays logging status for buffers. */ void @@ -790,7 +802,7 @@ logger_list () } /* - * logger_set_buffer: enable/disable log on a buffer + * Enables/disables logging on a buffer. */ void @@ -818,7 +830,7 @@ logger_set_buffer (struct t_gui_buffer *buffer, const char *value) } /* - * logger_command_cb: callback for /logger command + * Callback for command "/logger". */ int @@ -855,7 +867,7 @@ logger_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * logger_buffer_opened_signal_cb: callback for "buffer_opened" signal + * Callback for signal "buffer_opened". */ int @@ -873,7 +885,7 @@ logger_buffer_opened_signal_cb (void *data, const char *signal, } /* - * logger_buffer_closing_signal_cb: callback for "buffer_closing" signal + * Callback for signal "buffer_closing". */ int @@ -891,7 +903,7 @@ logger_buffer_closing_signal_cb (void *data, const char *signal, } /* - * logger_buffer_renamed_signal_cb: callback for "buffer_closing" signal + * Callback for signal "buffer_renamed". */ int @@ -910,7 +922,7 @@ logger_buffer_renamed_signal_cb (void *data, const char *signal, } /* - * logger_backlog: display backlog for a buffer (by reading end of log file) + * Displays backlog for a buffer (by reading end of log file). */ void @@ -1020,7 +1032,7 @@ logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines) } /* - * logger_backlog_signal_cb: callback for "logger_backlog" signal + * Callback for signal "logger_backlog". */ int @@ -1059,7 +1071,7 @@ logger_backlog_signal_cb (void *data, const char *signal, } /* - * logger_start_signal_cb: callback for "logger_start" signal + * Callback for signal "logger_start". */ int @@ -1077,7 +1089,7 @@ logger_start_signal_cb (void *data, const char *signal, const char *type_data, } /* - * logger_stop_signal_cb: callback for "logger_stop" signal + * Callback for signal "logger_stop". */ int @@ -1099,9 +1111,10 @@ logger_stop_signal_cb (void *data, const char *signal, const char *type_data, } /* - * logger_adjust_log_filenames: adjust log filenames for all buffers - * filename can change if config option is changed, - * or if day of system date has changed + * Adjusts log filenames for all buffers. + * + * Filename can change if configuration option is changed, or if day of system + * date has changed. */ void @@ -1142,7 +1155,7 @@ logger_adjust_log_filenames () } /* - * logger_day_changed_signal_cb: callback for "day_changed" signal + * Callback for signal "day_changed". */ int @@ -1161,7 +1174,7 @@ logger_day_changed_signal_cb (void *data, const char *signal, } /* - * logger_line_log_level: get log level for a line (with its tags) + * Gets log level for a line (using its tags). */ int @@ -1190,7 +1203,7 @@ logger_line_log_level (int tags_count, const char **tags) } /* - * logger_print_cb: callback for print hook + * Callback for print hooked. */ int @@ -1239,7 +1252,7 @@ logger_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, } /* - * logger_timer_cb: callback for logger timer + * Callback for logger timer. */ int @@ -1273,7 +1286,7 @@ logger_timer_cb (void *data, int remaining_calls) } /* - * weechat_plugin_init: initialize logger plugin + * Initializes logger plugin. */ int @@ -1348,7 +1361,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end logger plugin + * Ends logger plugin. */ int diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c index 6c1f83537..9460b563f 100644 --- a/src/plugins/lua/weechat-lua-api.c +++ b/src/plugins/lua/weechat-lua-api.c @@ -88,7 +88,7 @@ /* - * weechat_lua_api_register: startup function for all WeeChat Lua scripts + * Registers a lua script. */ static int @@ -164,8 +164,10 @@ weechat_lua_api_register (lua_State *L) } /* - * weechat_lua_api_plugin_get_name: get name of plugin (return "core" for - * WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ static int @@ -184,10 +186,6 @@ weechat_lua_api_plugin_get_name (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_charset_set: set script charset - */ - static int weechat_lua_api_charset_set (lua_State *L) { @@ -205,10 +203,6 @@ weechat_lua_api_charset_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_iconv_to_internal: convert string to internal WeeChat charset - */ - static int weechat_lua_api_iconv_to_internal (lua_State *L) { @@ -227,11 +221,6 @@ weechat_lua_api_iconv_to_internal (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_iconv_from_internal: convert string from WeeChat internal - * charset to another one - */ - static int weechat_lua_api_iconv_from_internal (lua_State *L) { @@ -250,10 +239,6 @@ weechat_lua_api_iconv_from_internal (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_gettext: get translated string - */ - static int weechat_lua_api_gettext (lua_State *L) { @@ -270,10 +255,6 @@ weechat_lua_api_gettext (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_ngettext: get translated string with plural form - */ - static int weechat_lua_api_ngettext (lua_State *L) { @@ -293,12 +274,6 @@ weechat_lua_api_ngettext (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" - * are allowed inside mask - */ - static int weechat_lua_api_string_match (lua_State *L) { @@ -318,14 +293,6 @@ weechat_lua_api_string_match (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_string_has_highlight: return 1 if string contains a - * highlight (using list of words to - * highlight) - * return 0 if no highlight is found in - * string - */ - static int weechat_lua_api_string_has_highlight (lua_State *L) { @@ -344,14 +311,6 @@ weechat_lua_api_string_has_highlight (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_string_has_highlight_regex: return 1 if string contains a - * highlight (using regular - * expression) - * return 0 if no highlight is - * found in string - */ - static int weechat_lua_api_string_has_highlight_regex (lua_State *L) { @@ -370,13 +329,6 @@ weechat_lua_api_string_has_highlight_regex (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_string_mask_to_regex: convert a mask (string with only - * "*" as wildcard) to a regex, paying - * attention to special chars in a - * regex - */ - static int weechat_lua_api_string_mask_to_regex (lua_State *L) { @@ -394,10 +346,6 @@ weechat_lua_api_string_mask_to_regex (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_string_remove_color: remove WeeChat color codes from string - */ - static int weechat_lua_api_string_remove_color (lua_State *L) { @@ -416,11 +364,6 @@ weechat_lua_api_string_remove_color (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_string_is_command_char: check if first char of string is a - * command char - */ - static int weechat_lua_api_string_is_command_char (lua_State *L) { @@ -438,12 +381,6 @@ weechat_lua_api_string_is_command_char (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_string_input_for_buffer: return string with input text - * for buffer or empty string if - * it's a command - */ - static int weechat_lua_api_string_input_for_buffer (lua_State *L) { @@ -460,11 +397,6 @@ weechat_lua_api_string_input_for_buffer (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_string_eval_expression: evaluate an expression and return - * result - */ - static int weechat_lua_api_string_eval_expression (lua_State *L) { @@ -496,10 +428,6 @@ weechat_lua_api_string_eval_expression (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_mkdir_home: create a directory in WeeChat home - */ - static int weechat_lua_api_mkdir_home (lua_State *L) { @@ -519,10 +447,6 @@ weechat_lua_api_mkdir_home (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_mkdir: create a directory - */ - static int weechat_lua_api_mkdir (lua_State *L) { @@ -542,11 +466,6 @@ weechat_lua_api_mkdir (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_mkdir_parents: create a directory and make parent - * directories as needed - */ - static int weechat_lua_api_mkdir_parents (lua_State *L) { @@ -566,10 +485,6 @@ weechat_lua_api_mkdir_parents (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_list_new: create a new list - */ - static int weechat_lua_api_list_new (lua_State *L) { @@ -582,10 +497,6 @@ weechat_lua_api_list_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_add: add a string to list - */ - static int weechat_lua_api_list_add (lua_State *L) { @@ -609,10 +520,6 @@ weechat_lua_api_list_add (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_search: search a string in list - */ - static int weechat_lua_api_list_search (lua_State *L) { @@ -632,10 +539,6 @@ weechat_lua_api_list_search (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_search_pos: search position of a string in list - */ - static int weechat_lua_api_list_search_pos (lua_State *L) { @@ -654,10 +557,6 @@ weechat_lua_api_list_search_pos (lua_State *L) API_RETURN_INT(pos); } -/* - * weechat_lua_api_list_casesearch: search a string in list (ignore case) - */ - static int weechat_lua_api_list_casesearch (lua_State *L) { @@ -677,11 +576,6 @@ weechat_lua_api_list_casesearch (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_casesearch_pos: search position of a string in list - * (ignore case) - */ - static int weechat_lua_api_list_casesearch_pos (lua_State *L) { @@ -700,10 +594,6 @@ weechat_lua_api_list_casesearch_pos (lua_State *L) API_RETURN_INT(pos); } -/* - * weechat_lua_api_list_get: get item by position - */ - static int weechat_lua_api_list_get (lua_State *L) { @@ -724,10 +614,6 @@ weechat_lua_api_list_get (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_set: set new value for item - */ - static int weechat_lua_api_list_set (lua_State *L) { @@ -746,10 +632,6 @@ weechat_lua_api_list_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_list_next: get next item - */ - static int weechat_lua_api_list_next (lua_State *L) { @@ -767,10 +649,6 @@ weechat_lua_api_list_next (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_prev: get previous item - */ - static int weechat_lua_api_list_prev (lua_State *L) { @@ -788,10 +666,6 @@ weechat_lua_api_list_prev (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_list_string: get string value of item - */ - static int weechat_lua_api_list_string (lua_State *L) { @@ -808,10 +682,6 @@ weechat_lua_api_list_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_list_size: get number of elements in list - */ - static int weechat_lua_api_list_size (lua_State *L) { @@ -829,10 +699,6 @@ weechat_lua_api_list_size (lua_State *L) API_RETURN_INT(size); } -/* - * weechat_lua_api_list_remove: remove item from list - */ - static int weechat_lua_api_list_remove (lua_State *L) { @@ -851,10 +717,6 @@ weechat_lua_api_list_remove (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_list_remove_all: remove all items from list - */ - static int weechat_lua_api_list_remove_all (lua_State *L) { @@ -871,10 +733,6 @@ weechat_lua_api_list_remove_all (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_list_free: free list - */ - static int weechat_lua_api_list_free (lua_State *L) { @@ -891,10 +749,6 @@ weechat_lua_api_list_free (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_reload_cb: callback for ccnfig reload - */ - int weechat_lua_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -932,10 +786,6 @@ weechat_lua_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat_lua_api_config_new: create a new configuration file - */ - static int weechat_lua_api_config_new (lua_State *L) { @@ -960,10 +810,6 @@ weechat_lua_api_config_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_read_cb: callback for reading option in section - */ - int weechat_lua_api_config_read_cb (void *data, struct t_config_file *config_file, @@ -1008,10 +854,6 @@ weechat_lua_api_config_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_lua_api_config_section_write_cb: callback for writing section - */ - int weechat_lua_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -1051,11 +893,6 @@ weechat_lua_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_lua_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_lua_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -1095,10 +932,6 @@ weechat_lua_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_lua_api_config_section_create_option_cb: callback to create an option - */ - int weechat_lua_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1144,10 +977,6 @@ weechat_lua_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_lua_api_config_section_delete_option_cb: callback to delete an option - */ - int weechat_lua_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1193,10 +1022,6 @@ weechat_lua_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat_lua_api_config_new_section: create a new section in configuration file - */ - static int weechat_lua_api_config_new_section (lua_State *L) { @@ -1252,10 +1077,6 @@ weechat_lua_api_config_new_section (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_search_section: search a section in configuration file - */ - static int weechat_lua_api_config_search_section (lua_State *L) { @@ -1275,11 +1096,6 @@ weechat_lua_api_config_search_section (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_option_check_value_cb: callback for checking new - * value for option - */ - int weechat_lua_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1319,10 +1135,6 @@ weechat_lua_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_lua_api_config_option_change_cb: callback for option changed - */ - void weechat_lua_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1352,10 +1164,6 @@ weechat_lua_api_config_option_change_cb (void *data, } } -/* - * weechat_lua_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_lua_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1385,10 +1193,6 @@ weechat_lua_api_config_option_delete_cb (void *data, } } -/* - * weechat_lua_api_config_new_option: create a new option in section - */ - static int weechat_lua_api_config_new_option (lua_State *L) { @@ -1447,10 +1251,6 @@ weechat_lua_api_config_new_option (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_search_option: search option in configuration file or section - */ - static int weechat_lua_api_config_search_option (lua_State *L) { @@ -1472,10 +1272,6 @@ weechat_lua_api_config_search_option (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_string_to_boolean: return boolean value of a string - */ - static int weechat_lua_api_config_string_to_boolean (lua_State *L) { @@ -1493,10 +1289,6 @@ weechat_lua_api_config_string_to_boolean (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_option_reset: reset option with default value - */ - static int weechat_lua_api_config_option_reset (lua_State *L) { @@ -1516,10 +1308,6 @@ weechat_lua_api_config_option_reset (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_option_set: set new value for option - */ - static int weechat_lua_api_config_option_set (lua_State *L) { @@ -1541,11 +1329,6 @@ weechat_lua_api_config_option_set (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_option_set_null: set null (undefined) value for - * option - */ - static int weechat_lua_api_config_option_set_null (lua_State *L) { @@ -1565,10 +1348,6 @@ weechat_lua_api_config_option_set_null (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_option_unset: unset an option - */ - static int weechat_lua_api_config_option_unset (lua_State *L) { @@ -1586,10 +1365,6 @@ weechat_lua_api_config_option_unset (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_option_rename: rename an option - */ - static int weechat_lua_api_config_option_rename (lua_State *L) { @@ -1608,10 +1383,6 @@ weechat_lua_api_config_option_rename (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_option_is_null: return 1 if value of option is null - */ - static int weechat_lua_api_config_option_is_null (lua_State *L) { @@ -1629,11 +1400,6 @@ weechat_lua_api_config_option_is_null (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_option_default_is_null: return 1 if default value of - * option is null - */ - static int weechat_lua_api_config_option_default_is_null (lua_State *L) { @@ -1651,10 +1417,6 @@ weechat_lua_api_config_option_default_is_null (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_boolean: return boolean value of option - */ - static int weechat_lua_api_config_boolean (lua_State *L) { @@ -1672,10 +1434,6 @@ weechat_lua_api_config_boolean (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_boolean_default: return default boolean value of option - */ - static int weechat_lua_api_config_boolean_default (lua_State *L) { @@ -1693,10 +1451,6 @@ weechat_lua_api_config_boolean_default (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_integer: return integer value of option - */ - static int weechat_lua_api_config_integer (lua_State *L) { @@ -1714,10 +1468,6 @@ weechat_lua_api_config_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_integer_default: return default integer value of option - */ - static int weechat_lua_api_config_integer_default (lua_State *L) { @@ -1735,10 +1485,6 @@ weechat_lua_api_config_integer_default (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_config_string: return string value of option - */ - static int weechat_lua_api_config_string (lua_State *L) { @@ -1755,10 +1501,6 @@ weechat_lua_api_config_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_config_string_default: return default string value of option - */ - static int weechat_lua_api_config_string_default (lua_State *L) { @@ -1775,10 +1517,6 @@ weechat_lua_api_config_string_default (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_config_color: return color value of option - */ - static int weechat_lua_api_config_color (lua_State *L) { @@ -1795,10 +1533,6 @@ weechat_lua_api_config_color (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_config_color_default: return default color value of option - */ - static int weechat_lua_api_config_color_default (lua_State *L) { @@ -1815,10 +1549,6 @@ weechat_lua_api_config_color_default (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_config_write_option: write an option in configuration file - */ - static int weechat_lua_api_config_write_option (lua_State *L) { @@ -1837,10 +1567,6 @@ weechat_lua_api_config_write_option (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_write_line: write a line in configuration file - */ - static int weechat_lua_api_config_write_line (lua_State *L) { @@ -1862,10 +1588,6 @@ weechat_lua_api_config_write_line (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_write: write configuration file - */ - static int weechat_lua_api_config_write (lua_State *L) { @@ -1883,10 +1605,6 @@ weechat_lua_api_config_write (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_read: read configuration file - */ - static int weechat_lua_api_config_read (lua_State *L) { @@ -1904,10 +1622,6 @@ weechat_lua_api_config_read (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_reload: reload configuration file - */ - static int weechat_lua_api_config_reload (lua_State *L) { @@ -1925,10 +1639,6 @@ weechat_lua_api_config_reload (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_option_free: free an option in configuration file - */ - static int weechat_lua_api_config_option_free (lua_State *L) { @@ -1947,11 +1657,6 @@ weechat_lua_api_config_option_free (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_section_free_options: free all options of a section - * in configuration file - */ - static int weechat_lua_api_config_section_free_options (lua_State *L) { @@ -1970,10 +1675,6 @@ weechat_lua_api_config_section_free_options (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_section_free: free section in configuration file - */ - static int weechat_lua_api_config_section_free (lua_State *L) { @@ -1992,10 +1693,6 @@ weechat_lua_api_config_section_free (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_free: free configuration file - */ - static int weechat_lua_api_config_free (lua_State *L) { @@ -2014,10 +1711,6 @@ weechat_lua_api_config_free (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_get: get config option - */ - static int weechat_lua_api_config_get (lua_State *L) { @@ -2035,10 +1728,6 @@ weechat_lua_api_config_get (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_config_get_plugin: get value of a plugin option - */ - static int weechat_lua_api_config_get_plugin (lua_State *L) { @@ -2057,10 +1746,6 @@ weechat_lua_api_config_get_plugin (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_config_is_set_plugin: check if a plugin option is set - */ - static int weechat_lua_api_config_is_set_plugin (lua_State *L) { @@ -2080,10 +1765,6 @@ weechat_lua_api_config_is_set_plugin (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_set_plugin: set value of a plugin option - */ - static int weechat_lua_api_config_set_plugin (lua_State *L) { @@ -2105,10 +1786,6 @@ weechat_lua_api_config_set_plugin (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_config_set_desc_plugin: set description of a plugin option - */ - static int weechat_lua_api_config_set_desc_plugin (lua_State *L) { @@ -2129,10 +1806,6 @@ weechat_lua_api_config_set_desc_plugin (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_config_unset_plugin: unset plugin option - */ - static int weechat_lua_api_config_unset_plugin (lua_State *L) { @@ -2152,10 +1825,6 @@ weechat_lua_api_config_unset_plugin (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_key_bind: bind key(s) - */ - static int weechat_lua_api_key_bind (lua_State *L) { @@ -2181,10 +1850,6 @@ weechat_lua_api_key_bind (lua_State *L) API_RETURN_INT(num_keys); } -/* - * weechat_lua_api_key_unbind: unbind key(s) - */ - static int weechat_lua_api_key_unbind (lua_State *L) { @@ -2203,10 +1868,6 @@ weechat_lua_api_key_unbind (lua_State *L) API_RETURN_INT(num_keys); } -/* - * weechat_lua_api_prefix: get a prefix, used for display - */ - static int weechat_lua_api_prefix (lua_State *L) { @@ -2223,10 +1884,6 @@ weechat_lua_api_prefix (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_color: get a color code, used for display - */ - static int weechat_lua_api_color (lua_State *L) { @@ -2243,10 +1900,6 @@ weechat_lua_api_color (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_print: print message in a buffer - */ - static int weechat_lua_api_print (lua_State *L) { @@ -2267,11 +1920,6 @@ weechat_lua_api_print (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_print_date_tags: print message in a buffer with optional - * date and tags - */ - static int weechat_lua_api_print_date_tags (lua_State *L) { @@ -2297,10 +1945,6 @@ weechat_lua_api_print_date_tags (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_print_y: print message in a buffer with free content - */ - static int weechat_lua_api_print_y (lua_State *L) { @@ -2324,10 +1968,6 @@ weechat_lua_api_print_y (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_log_print: print message in WeeChat log file - */ - static int weechat_lua_api_log_print (lua_State *L) { @@ -2346,10 +1986,6 @@ weechat_lua_api_log_print (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_hook_command_cb: callback for command hooked - */ - int weechat_lua_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2391,10 +2027,6 @@ weechat_lua_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_command: hook a command - */ - static int weechat_lua_api_hook_command (lua_State *L) { @@ -2428,10 +2060,6 @@ weechat_lua_api_hook_command (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_lua_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2470,10 +2098,6 @@ weechat_lua_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_command_run: hook a command_run - */ - static int weechat_lua_api_hook_command_run (lua_State *L) { @@ -2498,10 +2122,6 @@ weechat_lua_api_hook_command_run (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_timer_cb: callback for timer hooked - */ - int weechat_lua_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2539,10 +2159,6 @@ weechat_lua_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_timer: hook a timer - */ - static int weechat_lua_api_hook_timer (lua_State *L) { @@ -2572,10 +2188,6 @@ weechat_lua_api_hook_timer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_fd_cb: callback for fd hooked - */ - int weechat_lua_api_hook_fd_cb (void *data, int fd) { @@ -2612,10 +2224,6 @@ weechat_lua_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_fd: hook a fd - */ - static int weechat_lua_api_hook_fd (lua_State *L) { @@ -2647,10 +2255,6 @@ weechat_lua_api_hook_fd (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_process_cb: callback for process hooked - */ - int weechat_lua_api_hook_process_cb (void *data, const char *command, int return_code, @@ -2690,10 +2294,6 @@ weechat_lua_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_process: hook a process - */ - static int weechat_lua_api_hook_process (lua_State *L) { @@ -2721,11 +2321,6 @@ weechat_lua_api_hook_process (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_process_hashtable: hook a process with options in - * a hashtable - */ - static int weechat_lua_api_hook_process_hashtable (lua_State *L) { @@ -2762,10 +2357,6 @@ weechat_lua_api_hook_process_hashtable (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_connect_cb: callback for connect hooked - */ - int weechat_lua_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -2811,10 +2402,6 @@ weechat_lua_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_connect: hook a connection - */ - static int weechat_lua_api_hook_connect (lua_State *L) { @@ -2854,10 +2441,6 @@ weechat_lua_api_hook_connect (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_print_cb: callback for print hooked - */ - int weechat_lua_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -2918,10 +2501,6 @@ weechat_lua_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_print: hook a print - */ - static int weechat_lua_api_hook_print (lua_State *L) { @@ -2953,10 +2532,6 @@ weechat_lua_api_hook_print (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_signal_cb: callback for signal hooked - */ - int weechat_lua_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -3013,10 +2588,6 @@ weechat_lua_api_hook_signal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_signal: hook a signal - */ - static int weechat_lua_api_hook_signal (lua_State *L) { @@ -3041,10 +2612,6 @@ weechat_lua_api_hook_signal (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_signal_send: send a signal - */ - static int weechat_lua_api_hook_signal_send (lua_State *L) { @@ -3083,10 +2650,6 @@ weechat_lua_api_hook_signal_send (lua_State *L) API_RETURN_ERROR; } -/* - * weechat_lua_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_lua_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -3123,10 +2686,6 @@ weechat_lua_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_hsignal: hook a hsignal - */ - static int weechat_lua_api_hook_hsignal (lua_State *L) { @@ -3151,10 +2710,6 @@ weechat_lua_api_hook_hsignal (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_hsignal_send: send a hsignal - */ - static int weechat_lua_api_hook_hsignal_send (lua_State *L) { @@ -3179,10 +2734,6 @@ weechat_lua_api_hook_hsignal_send (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_hook_config_cb: callback for config option hooked - */ - int weechat_lua_api_hook_config_cb (void *data, const char *option, const char *value) @@ -3219,10 +2770,6 @@ weechat_lua_api_hook_config_cb (void *data, const char *option, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_config: hook a config option - */ - static int weechat_lua_api_hook_config (lua_State *L) { @@ -3247,10 +2794,6 @@ weechat_lua_api_hook_config (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_completion_cb: callback for completion hooked - */ - int weechat_lua_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3293,10 +2836,6 @@ weechat_lua_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_hook_completion: hook a completion - */ - static int weechat_lua_api_hook_completion (lua_State *L) { @@ -3323,10 +2862,6 @@ weechat_lua_api_hook_completion (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_completion_list_add: add a word to list for a completion - */ - static int weechat_lua_api_hook_completion_list_add (lua_State *L) { @@ -3350,10 +2885,6 @@ weechat_lua_api_hook_completion_list_add (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_lua_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, @@ -3381,10 +2912,6 @@ weechat_lua_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat_lua_api_hook_modifier: hook a modifier - */ - static int weechat_lua_api_hook_modifier (lua_State *L) { @@ -3409,10 +2936,6 @@ weechat_lua_api_hook_modifier (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_modifier_exec: execute a modifier hook - */ - static int weechat_lua_api_hook_modifier_exec (lua_State *L) { @@ -3432,10 +2955,6 @@ weechat_lua_api_hook_modifier_exec (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_info_cb: callback for info hooked - */ - const char * weechat_lua_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3461,10 +2980,6 @@ weechat_lua_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_lua_api_hook_info: hook an info - */ - static int weechat_lua_api_hook_info (lua_State *L) { @@ -3493,10 +3008,6 @@ weechat_lua_api_hook_info (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_lua_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3522,10 +3033,6 @@ weechat_lua_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_lua_api_hook_info_hashtable: hook an info_hashtable - */ - static int weechat_lua_api_hook_info_hashtable (lua_State *L) { @@ -3557,10 +3064,6 @@ weechat_lua_api_hook_info_hashtable (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_lua_api_hook_infolist_cb (void *data, const char *info_name, void *pointer, const char *arguments) @@ -3593,10 +3096,6 @@ weechat_lua_api_hook_infolist_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_lua_api_hook_infolist: hook an infolist - */ - static int weechat_lua_api_hook_infolist (lua_State *L) { @@ -3628,10 +3127,6 @@ weechat_lua_api_hook_infolist (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_lua_api_hook_focus_cb (void *data, struct t_hashtable *info) @@ -3656,10 +3151,6 @@ weechat_lua_api_hook_focus_cb (void *data, return NULL; } -/* - * weechat_lua_api_hook_focus: hook a focus - */ - static int weechat_lua_api_hook_focus (lua_State *L) { @@ -3684,10 +3175,6 @@ weechat_lua_api_hook_focus (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_unhook: unhook something - */ - static int weechat_lua_api_unhook (lua_State *L) { @@ -3706,10 +3193,6 @@ weechat_lua_api_unhook (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_unhook_all: unhook all for script - */ - static int weechat_lua_api_unhook_all (lua_State *L) { @@ -3720,10 +3203,6 @@ weechat_lua_api_unhook_all (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_lua_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -3762,10 +3241,6 @@ weechat_lua_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_buffer_close_cb: callback for buffer closed - */ - int weechat_lua_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -3802,10 +3277,6 @@ weechat_lua_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_buffer_new: create a new buffer - */ - static int weechat_lua_api_buffer_new (lua_State *L) { @@ -3836,10 +3307,6 @@ weechat_lua_api_buffer_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_buffer_search: search a buffer - */ - static int weechat_lua_api_buffer_search (lua_State *L) { @@ -3858,10 +3325,6 @@ weechat_lua_api_buffer_search (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_buffer_search_main: search main buffer (WeeChat core buffer) - */ - static int weechat_lua_api_buffer_search_main (lua_State *L) { @@ -3874,10 +3337,6 @@ weechat_lua_api_buffer_search_main (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_current_buffer: get current buffer - */ - static int weechat_lua_api_current_buffer (lua_State *L) { @@ -3890,10 +3349,6 @@ weechat_lua_api_current_buffer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_buffer_clear: clear a buffer - */ - static int weechat_lua_api_buffer_clear (lua_State *L) { @@ -3910,10 +3365,6 @@ weechat_lua_api_buffer_clear (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_close: close a buffer - */ - static int weechat_lua_api_buffer_close (lua_State *L) { @@ -3932,10 +3383,6 @@ weechat_lua_api_buffer_close (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_merge: merge a buffer to another buffer - */ - static int weechat_lua_api_buffer_merge (lua_State *L) { @@ -3954,11 +3401,6 @@ weechat_lua_api_buffer_merge (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_unmerge: unmerge a buffer from a group of merged - * buffers - */ - static int weechat_lua_api_buffer_unmerge (lua_State *L) { @@ -3977,10 +3419,6 @@ weechat_lua_api_buffer_unmerge (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_get_integer: get a buffer property as integer - */ - static int weechat_lua_api_buffer_get_integer (lua_State *L) { @@ -4000,10 +3438,6 @@ weechat_lua_api_buffer_get_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_buffer_get_string: get a buffer property as string - */ - static int weechat_lua_api_buffer_get_string (lua_State *L) { @@ -4022,10 +3456,6 @@ weechat_lua_api_buffer_get_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_buffer_get_pointer: get a buffer property as pointer - */ - static int weechat_lua_api_buffer_get_pointer (lua_State *L) { @@ -4045,10 +3475,6 @@ weechat_lua_api_buffer_get_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_buffer_set: set a buffer property - */ - static int weechat_lua_api_buffer_set (lua_State *L) { @@ -4067,11 +3493,6 @@ weechat_lua_api_buffer_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_buffer_string_replace_local_var: replace local variables ($var) in a string, - * using value of local variables - */ - static int weechat_lua_api_buffer_string_replace_local_var (lua_State *L) { @@ -4090,10 +3511,6 @@ weechat_lua_api_buffer_string_replace_local_var (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_buffer_match_list: return 1 if buffer matches list of buffers - */ - static int weechat_lua_api_buffer_match_list (lua_State *L) { @@ -4113,10 +3530,6 @@ weechat_lua_api_buffer_match_list (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_current_window: get current window - */ - static int weechat_lua_api_current_window (lua_State *L) { @@ -4129,11 +3542,6 @@ weechat_lua_api_current_window (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_window_search_with_buffer: search a window with buffer - * pointer - */ - static int weechat_lua_api_window_search_with_buffer (lua_State *L) { @@ -4151,10 +3559,6 @@ weechat_lua_api_window_search_with_buffer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_window_get_integer: get a window property as integer - */ - static int weechat_lua_api_window_get_integer (lua_State *L) { @@ -4174,10 +3578,6 @@ weechat_lua_api_window_get_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_window_get_string: get a window property as string - */ - static int weechat_lua_api_window_get_string (lua_State *L) { @@ -4196,10 +3596,6 @@ weechat_lua_api_window_get_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_window_get_pointer: get a window property as pointer - */ - static int weechat_lua_api_window_get_pointer (lua_State *L) { @@ -4219,10 +3615,6 @@ weechat_lua_api_window_get_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_window_set_title: set window title - */ - static int weechat_lua_api_window_set_title (lua_State *L) { @@ -4239,10 +3631,6 @@ weechat_lua_api_window_set_title (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_nicklist_add_group: add a group in nicklist - */ - static int weechat_lua_api_nicklist_add_group (lua_State *L) { @@ -4269,10 +3657,6 @@ weechat_lua_api_nicklist_add_group (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_search_group: search a group in nicklist - */ - static int weechat_lua_api_nicklist_search_group (lua_State *L) { @@ -4294,10 +3678,6 @@ weechat_lua_api_nicklist_search_group (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_add_nick: add a nick in nicklist - */ - static int weechat_lua_api_nicklist_add_nick (lua_State *L) { @@ -4328,10 +3708,6 @@ weechat_lua_api_nicklist_add_nick (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_search_nick: search a nick in nicklist - */ - static int weechat_lua_api_nicklist_search_nick (lua_State *L) { @@ -4353,10 +3729,6 @@ weechat_lua_api_nicklist_search_nick (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_remove_group: remove a group from nicklist - */ - static int weechat_lua_api_nicklist_remove_group (lua_State *L) { @@ -4375,10 +3747,6 @@ weechat_lua_api_nicklist_remove_group (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_nicklist_remove_nick: remove a nick from nicklist - */ - static int weechat_lua_api_nicklist_remove_nick (lua_State *L) { @@ -4397,10 +3765,6 @@ weechat_lua_api_nicklist_remove_nick (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_nicklist_remove_all: remove all groups/nicks from nicklist - */ - static int weechat_lua_api_nicklist_remove_all (lua_State *L) { @@ -4417,10 +3781,6 @@ weechat_lua_api_nicklist_remove_all (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_nicklist_group_get_integer: get a group property as integer - */ - static int weechat_lua_api_nicklist_group_get_integer (lua_State *L) { @@ -4442,10 +3802,6 @@ weechat_lua_api_nicklist_group_get_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_nicklist_group_get_string: get a group property as string - */ - static int weechat_lua_api_nicklist_group_get_string (lua_State *L) { @@ -4466,10 +3822,6 @@ weechat_lua_api_nicklist_group_get_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_nicklist_group_get_pointer: get a group property as pointer - */ - static int weechat_lua_api_nicklist_group_get_pointer (lua_State *L) { @@ -4491,10 +3843,6 @@ weechat_lua_api_nicklist_group_get_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_group_set: set a group property - */ - static int weechat_lua_api_nicklist_group_set (lua_State *L) { @@ -4517,10 +3865,6 @@ weechat_lua_api_nicklist_group_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_nicklist_nick_get_integer: get a nick property as integer - */ - static int weechat_lua_api_nicklist_nick_get_integer (lua_State *L) { @@ -4542,10 +3886,6 @@ weechat_lua_api_nicklist_nick_get_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_nicklist_nick_get_string: get a nick property as string - */ - static int weechat_lua_api_nicklist_nick_get_string (lua_State *L) { @@ -4566,10 +3906,6 @@ weechat_lua_api_nicklist_nick_get_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_nicklist_nick_get_pointer: get a nick property as pointer - */ - static int weechat_lua_api_nicklist_nick_get_pointer (lua_State *L) { @@ -4591,10 +3927,6 @@ weechat_lua_api_nicklist_nick_get_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_nicklist_nick_set: set a nick property - */ - static int weechat_lua_api_nicklist_nick_set (lua_State *L) { @@ -4617,10 +3949,6 @@ weechat_lua_api_nicklist_nick_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_bar_item_search: search a bar item - */ - static int weechat_lua_api_bar_item_search (lua_State *L) { @@ -4638,10 +3966,6 @@ weechat_lua_api_bar_item_search (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_lua_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -4674,10 +3998,6 @@ weechat_lua_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat_lua_api_bar_item_new: add a new bar item - */ - static int weechat_lua_api_bar_item_new (lua_State *L) { @@ -4702,10 +4022,6 @@ weechat_lua_api_bar_item_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_bar_item_update: update a bar item on screen - */ - static int weechat_lua_api_bar_item_update (lua_State *L) { @@ -4722,10 +4038,6 @@ weechat_lua_api_bar_item_update (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_bar_item_remove: remove a bar item - */ - static int weechat_lua_api_bar_item_remove (lua_State *L) { @@ -4744,10 +4056,6 @@ weechat_lua_api_bar_item_remove (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_bar_search: search a bar - */ - static int weechat_lua_api_bar_search (lua_State *L) { @@ -4765,10 +4073,6 @@ weechat_lua_api_bar_search (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_bar_new: add a new bar - */ - static int weechat_lua_api_bar_new (lua_State *L) { @@ -4816,10 +4120,6 @@ weechat_lua_api_bar_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_bar_set: set a bar property - */ - static int weechat_lua_api_bar_set (lua_State *L) { @@ -4840,10 +4140,6 @@ weechat_lua_api_bar_set (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_bar_update: update a bar on screen - */ - static int weechat_lua_api_bar_update (lua_State *L) { @@ -4860,10 +4156,6 @@ weechat_lua_api_bar_update (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_bar_remove: remove a bar - */ - static int weechat_lua_api_bar_remove (lua_State *L) { @@ -4880,10 +4172,6 @@ weechat_lua_api_bar_remove (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_command: send command to server - */ - static int weechat_lua_api_command (lua_State *L) { @@ -4904,10 +4192,6 @@ weechat_lua_api_command (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_info_get: get info (as string) - */ - static int weechat_lua_api_info_get (lua_State *L) { @@ -4925,10 +4209,6 @@ weechat_lua_api_info_get (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_info_get_hashtable: get info (as hashtable) - */ - static int weechat_lua_api_info_get_hashtable (lua_State *L) { @@ -4957,10 +4237,6 @@ weechat_lua_api_info_get_hashtable (lua_State *L) return 1; } -/* - * weechat_lua_api_infolist_new: create new infolist - */ - static int weechat_lua_api_infolist_new (lua_State *L) { @@ -4973,10 +4249,6 @@ weechat_lua_api_infolist_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_new_item: create new item in infolist - */ - static int weechat_lua_api_infolist_new_item (lua_State *L) { @@ -4994,11 +4266,6 @@ weechat_lua_api_infolist_new_item (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_new_var_integer: create new integer variable in - * infolist - */ - static int weechat_lua_api_infolist_new_var_integer (lua_State *L) { @@ -5021,11 +4288,6 @@ weechat_lua_api_infolist_new_var_integer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_new_var_string: create new string variable in - * infolist - */ - static int weechat_lua_api_infolist_new_var_string (lua_State *L) { @@ -5047,11 +4309,6 @@ weechat_lua_api_infolist_new_var_string (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_new_var_pointer: create new pointer variable in - * infolist - */ - static int weechat_lua_api_infolist_new_var_pointer (lua_State *L) { @@ -5073,10 +4330,6 @@ weechat_lua_api_infolist_new_var_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_new_var_time: create new time variable in infolist - */ - static int weechat_lua_api_infolist_new_var_time (lua_State *L) { @@ -5099,10 +4352,6 @@ weechat_lua_api_infolist_new_var_time (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_get: get list with infos - */ - static int weechat_lua_api_infolist_get (lua_State *L) { @@ -5124,10 +4373,6 @@ weechat_lua_api_infolist_get (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_next: move item pointer to next item in infolist - */ - static int weechat_lua_api_infolist_next (lua_State *L) { @@ -5145,10 +4390,6 @@ weechat_lua_api_infolist_next (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_infolist_prev: move item pointer to previous item in infolist - */ - static int weechat_lua_api_infolist_prev (lua_State *L) { @@ -5166,11 +4407,6 @@ weechat_lua_api_infolist_prev (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_infolist_reset_item_cursor: reset pointer to current item in - * infolist - */ - static int weechat_lua_api_infolist_reset_item_cursor (lua_State *L) { @@ -5187,10 +4423,6 @@ weechat_lua_api_infolist_reset_item_cursor (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_infolist_fields: get list of fields for current item of infolist - */ - static int weechat_lua_api_infolist_fields (lua_State *L) { @@ -5207,10 +4439,6 @@ weechat_lua_api_infolist_fields (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_infolist_integer: get integer value of a variable in infolist - */ - static int weechat_lua_api_infolist_integer (lua_State *L) { @@ -5230,10 +4458,6 @@ weechat_lua_api_infolist_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_infolist_string: get string value of a variable in infolist - */ - static int weechat_lua_api_infolist_string (lua_State *L) { @@ -5252,10 +4476,6 @@ weechat_lua_api_infolist_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_infolist_pointer: get pointer value of a variable in infolist - */ - static int weechat_lua_api_infolist_pointer (lua_State *L) { @@ -5275,10 +4495,6 @@ weechat_lua_api_infolist_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_time: get time value of a variable in infolist - */ - static int weechat_lua_api_infolist_time (lua_State *L) { @@ -5305,10 +4521,6 @@ weechat_lua_api_infolist_time (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_infolist_free: free infolist - */ - static int weechat_lua_api_infolist_free (lua_State *L) { @@ -5325,10 +4537,6 @@ weechat_lua_api_infolist_free (lua_State *L) API_RETURN_OK; } -/* - * weechat_lua_api_hdata_get: get hdata - */ - static int weechat_lua_api_hdata_get (lua_State *L) { @@ -5346,10 +4554,6 @@ weechat_lua_api_hdata_get (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hdata_get_var_offset: get offset of variable in hdata - */ - static int weechat_lua_api_hdata_get_var_offset (lua_State *L) { @@ -5368,11 +4572,6 @@ weechat_lua_api_hdata_get_var_offset (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_get_var_type_string: get type of variable as string in - * hdata - */ - static int weechat_lua_api_hdata_get_var_type_string (lua_State *L) { @@ -5390,11 +4589,6 @@ weechat_lua_api_hdata_get_var_type_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_hdata_get_var_array_size: get array size for variable in - * hdata - */ - static int weechat_lua_api_hdata_get_var_array_size (lua_State *L) { @@ -5416,11 +4610,6 @@ weechat_lua_api_hdata_get_var_array_size (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_get_var_array_size_string: get array size for variable - * in hdata (as string) - */ - static int weechat_lua_api_hdata_get_var_array_size_string (lua_State *L) { @@ -5441,10 +4630,6 @@ weechat_lua_api_hdata_get_var_array_size_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_hdata_get_var_hdata: get hdata for variable in hdata - */ - static int weechat_lua_api_hdata_get_var_hdata (lua_State *L) { @@ -5462,10 +4647,6 @@ weechat_lua_api_hdata_get_var_hdata (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_hdata_get_list: get list pointer in hdata - */ - static int weechat_lua_api_hdata_get_list (lua_State *L) { @@ -5485,10 +4666,6 @@ weechat_lua_api_hdata_get_list (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hdata_check_pointer: check pointer with hdata/list - */ - static int weechat_lua_api_hdata_check_pointer (lua_State *L) { @@ -5510,10 +4687,6 @@ weechat_lua_api_hdata_check_pointer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_move: move pointer to another element in list - */ - static int weechat_lua_api_hdata_move (lua_State *L) { @@ -5536,11 +4709,6 @@ weechat_lua_api_hdata_move (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hdata_char: get char value of a variable in structure using - * hdata - */ - static int weechat_lua_api_hdata_char (lua_State *L) { @@ -5562,11 +4730,6 @@ weechat_lua_api_hdata_char (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_integer: get integer value of a variable in structure - * using hdata - */ - static int weechat_lua_api_hdata_integer (lua_State *L) { @@ -5588,11 +4751,6 @@ weechat_lua_api_hdata_integer (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_long: get long value of a variable in structure using - * hdata - */ - static int weechat_lua_api_hdata_long (lua_State *L) { @@ -5614,11 +4772,6 @@ weechat_lua_api_hdata_long (lua_State *L) API_RETURN_LONG(value); } -/* - * weechat_lua_api_hdata_string: get string value of a variable in structure - * using hdata - */ - static int weechat_lua_api_hdata_string (lua_State *L) { @@ -5639,11 +4792,6 @@ weechat_lua_api_hdata_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_hdata_pointer: get pointer value of a variable in structure - * using hdata - */ - static int weechat_lua_api_hdata_pointer (lua_State *L) { @@ -5665,11 +4813,6 @@ weechat_lua_api_hdata_pointer (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hdata_time: get time value of a variable in structure using - * hdata - */ - static int weechat_lua_api_hdata_time (lua_State *L) { @@ -5695,11 +4838,6 @@ weechat_lua_api_hdata_time (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_hdata_hashtable: get hashtable value of a variable in - * structure using hdata - */ - static int weechat_lua_api_hdata_hashtable (lua_State *L) { @@ -5721,10 +4859,6 @@ weechat_lua_api_hdata_hashtable (lua_State *L) return 1; } -/* - * weechat_lua_api_hdata_update: update data in a hdata - */ - static int weechat_lua_api_hdata_update (lua_State *L) { @@ -5753,10 +4887,6 @@ weechat_lua_api_hdata_update (lua_State *L) API_RETURN_INT(value); } -/* - * weechat_lua_api_hdata_get_string: get hdata property as string - */ - static int weechat_lua_api_hdata_get_string (lua_State *L) { @@ -5774,10 +4904,6 @@ weechat_lua_api_hdata_get_string (lua_State *L) API_RETURN_STRING(result); } -/* - * weechat_lua_api_upgrade_new: create an upgrade file - */ - static int weechat_lua_api_upgrade_new (lua_State *L) { @@ -5797,10 +4923,6 @@ weechat_lua_api_upgrade_new (lua_State *L) API_RETURN_STRING_FREE(result); } -/* - * weechat_lua_api_upgrade_write_object: write object in upgrade file - */ - static int weechat_lua_api_upgrade_write_object (lua_State *L) { @@ -5822,10 +4944,6 @@ weechat_lua_api_upgrade_write_object (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_upgrade_read_cb: callback for reading object in upgrade file - */ - int weechat_lua_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -5871,10 +4989,6 @@ weechat_lua_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_lua_api_upgrade_read: read upgrade file - */ - static int weechat_lua_api_upgrade_read (lua_State *L) { @@ -5899,10 +5013,6 @@ weechat_lua_api_upgrade_read (lua_State *L) API_RETURN_INT(rc); } -/* - * weechat_lua_api_upgrade_close: close upgrade file - */ - static int weechat_lua_api_upgrade_close (lua_State *L) { @@ -6324,7 +5434,7 @@ weechat_lua_api_constant_weechat_hook_signal_pointer (lua_State *L) } /* - * Lua subroutines + * Initializes lua functions and constants. */ const struct luaL_Reg weechat_lua_api_funcs[] = { diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index 8711eead1..86d43d576 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -70,8 +70,7 @@ char *lua_action_remove_list = NULL; /* - * weechat_lua_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -93,7 +92,7 @@ weechat_lua_hashtable_map_cb (void *data, } /* - * weechat_lua_pushhashtable: put a WeeChat hashtable on lua stack, as lua table + * Puts a WeeChat hashtable on lua stack, as lua table. */ void @@ -107,9 +106,9 @@ weechat_lua_pushhashtable (lua_State *interpreter, struct t_hashtable *hashtable } /* - * weechat_lua_hash_to_hashtable: get WeeChat hashtable with lua hash (on stack) - * Note: hashtable has to be released after use - * with call to weechat_hashtable_free() + * Gets WeeChat hashtable with lua hash (on stack). + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -151,7 +150,7 @@ weechat_lua_tohashtable (lua_State *interpreter, int index, int size, } /* - * weechat_lua_exec: execute a lua function + * Executes a lua function. */ void * @@ -238,7 +237,7 @@ weechat_lua_exec (struct t_plugin_script *script, int ret_type, } /* - * weechat_lua_register_lib: register a library to use inside Lua script + * Registers a library to use inside lua script. */ void weechat_lua_register_lib (lua_State *L, const char *libname, @@ -260,7 +259,11 @@ void weechat_lua_register_lib (lua_State *L, const char *libname, } /* - * weechat_lua_load: load a Lua script + * Loads a lua script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -402,7 +405,7 @@ weechat_lua_load (const char *filename) } /* - * weechat_lua_load_cb: callback for weechat_script_auto_load() function + * Callback for weechat_script_auto_load() function. */ void @@ -415,7 +418,7 @@ weechat_lua_load_cb (void *data, const char *filename) } /* - * weechat_lua_unload: unload a Lua script + * Unloads a lua script. */ void @@ -461,7 +464,7 @@ weechat_lua_unload (struct t_plugin_script *script) } /* - * weechat_lua_unload_name: unload a Lua script by name + * Unloads a lua script by name. */ void @@ -489,7 +492,7 @@ weechat_lua_unload_name (const char *name) } /* - * weechat_lua_reload_name: reload a Lua script by name + * Reloads a lua script by name. */ void @@ -524,7 +527,7 @@ weechat_lua_reload_name (const char *name) } /* - * weechat_lua_unload_all: unload all Lua scripts + * Unloads all lua scripts. */ void @@ -537,7 +540,7 @@ weechat_lua_unload_all () } /* - * weechat_lua_command_cb: callback for "/lua" command + * Callback for command "/lua". */ int @@ -609,7 +612,7 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Lua script */ + /* load lua script */ path_script = plugin_script_search_path (weechat_lua_plugin, ptr_name); weechat_lua_load ((path_script) ? path_script : ptr_name); @@ -618,12 +621,12 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Lua script */ + /* reload one lua script */ weechat_lua_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Lua script */ + /* unload lua script */ weechat_lua_unload_name (ptr_name); } lua_quiet = 0; @@ -641,7 +644,7 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_lua_completion_cb: callback for script completion + * Adds lua scripts to completion list. */ int @@ -660,7 +663,7 @@ weechat_lua_completion_cb (void *data, const char *completion_item, } /* - * weechat_lua_hdata_cb: callback for hdata + * Returns hdata for lua scripts. */ struct t_hdata * @@ -675,7 +678,7 @@ weechat_lua_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_lua_infolist_cb: callback for infolist + * Returns infolist with lua scripts. */ struct t_infolist * @@ -699,7 +702,7 @@ weechat_lua_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_lua_signal_debug_dump_cb: dump Lua plugin data in WeeChat log file + * Dumps lua plugin data in WeeChat log file. */ int @@ -721,7 +724,7 @@ weechat_lua_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_lua_signal_buffer_closed_cb: callback called when a buffer is closed + * Callback called when a buffer is closed. */ int @@ -740,7 +743,7 @@ weechat_lua_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_lua_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -774,8 +777,7 @@ weechat_lua_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_lua_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -810,7 +812,7 @@ weechat_lua_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_plugin_init: initialize Lua plugin + * Initializes lua plugin. */ int @@ -841,7 +843,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: shutdown Lua interface + * Ends lua plugin. */ int diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index d182bbb04..6cb56d87d 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -98,7 +98,7 @@ extern void boot_DynaLoader (pTHX_ CV* cv); /* - * weechat::register: startup function for all WeeChat Perl scripts + * Registers a perl script. */ XS (XS_weechat_api_register) @@ -173,7 +173,10 @@ XS (XS_weechat_api_register) } /* - * weechat::plugin_get_name: get name of plugin (return "core" for WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ XS (XS_weechat_api_plugin_get_name) @@ -190,10 +193,6 @@ XS (XS_weechat_api_plugin_get_name) API_RETURN_STRING(result); } -/* - * weechat::charser_set: set script charset - */ - XS (XS_weechat_api_charset_set) { dXSARGS; @@ -208,10 +207,6 @@ XS (XS_weechat_api_charset_set) API_RETURN_OK; } -/* - * weechat::iconv_to_internal: convert string to internal WeeChat charset - */ - XS (XS_weechat_api_iconv_to_internal) { char *result, *charset, *string; @@ -229,11 +224,6 @@ XS (XS_weechat_api_iconv_to_internal) API_RETURN_STRING_FREE(result); } -/* - * weechat::iconv_from_internal: convert string from WeeChat inernal charset - * to another one - */ - XS (XS_weechat_api_iconv_from_internal) { char *result, *charset, *string; @@ -251,10 +241,6 @@ XS (XS_weechat_api_iconv_from_internal) API_RETURN_STRING_FREE(result); } -/* - * weechat::gettext: get translated string - */ - XS (XS_weechat_api_gettext) { const char *result; @@ -269,10 +255,6 @@ XS (XS_weechat_api_gettext) API_RETURN_STRING(result); } -/* - * weechat::ngettext: get translated string with plural form - */ - XS (XS_weechat_api_ngettext) { char *single, *plural; @@ -292,12 +274,6 @@ XS (XS_weechat_api_ngettext) API_RETURN_STRING(result); } -/* - * weechat::string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" - * are allowed inside mask - */ - XS (XS_weechat_api_string_match) { int value; @@ -314,12 +290,6 @@ XS (XS_weechat_api_string_match) API_RETURN_INT(value); } -/* - * weechat::string_has_highlight: return 1 if string contains a highlight - * (using list of words to highlight) - * return 0 if no highlight is found in string - */ - XS (XS_weechat_api_string_has_highlight) { int value; @@ -335,13 +305,6 @@ XS (XS_weechat_api_string_has_highlight) API_RETURN_INT(value); } -/* - * weechat::string_has_highlight_regex: return 1 if string contains a highlight - * (using regular expression) - * return 0 if no highlight is found in - * string - */ - XS (XS_weechat_api_string_has_highlight_regex) { int value; @@ -357,12 +320,6 @@ XS (XS_weechat_api_string_has_highlight_regex) API_RETURN_INT(value); } -/* - * weechat::string_mask_to_regex: convert a mask (string with only "*" as - * wildcard) to a regex, paying attention to - * special chars in a regex - */ - XS (XS_weechat_api_string_mask_to_regex) { char *result; @@ -377,10 +334,6 @@ XS (XS_weechat_api_string_mask_to_regex) API_RETURN_STRING_FREE(result); } -/* - * weechat::string_remove_color: remove WeeChat color codes from string - */ - XS (XS_weechat_api_string_remove_color) { char *result, *string, *replacement; @@ -398,11 +351,6 @@ XS (XS_weechat_api_string_remove_color) API_RETURN_STRING_FREE(result); } -/* - * weechat::string_is_command_char: check if first char of string is a command - * char - */ - XS (XS_weechat_api_string_is_command_char) { int value; @@ -417,11 +365,6 @@ XS (XS_weechat_api_string_is_command_char) API_RETURN_INT(value); } -/* - * weechat::string_input_for_buffer: return string with input text for buffer - * or empty string if it's a command - */ - XS (XS_weechat_api_string_input_for_buffer) { const char *result; @@ -436,10 +379,6 @@ XS (XS_weechat_api_string_input_for_buffer) API_RETURN_STRING(result); } -/* - * weechat::string_eval_expression: evaluate expression and return result - */ - XS (XS_weechat_api_string_eval_expression) { char *expr, *result; @@ -470,10 +409,6 @@ XS (XS_weechat_api_string_eval_expression) API_RETURN_STRING_FREE(result); } -/* - * weechat::mkdir_home: create a directory in WeeChat home - */ - XS (XS_weechat_api_mkdir_home) { dXSARGS; @@ -489,10 +424,6 @@ XS (XS_weechat_api_mkdir_home) API_RETURN_ERROR; } -/* - * weechat::mkdir: create a directory - */ - XS (XS_weechat_api_mkdir) { dXSARGS; @@ -508,11 +439,6 @@ XS (XS_weechat_api_mkdir) API_RETURN_ERROR; } -/* - * weechat::mkdir_parents: create a directory and make parent directories as - * needed - */ - XS (XS_weechat_api_mkdir_parents) { dXSARGS; @@ -528,10 +454,6 @@ XS (XS_weechat_api_mkdir_parents) API_RETURN_ERROR; } -/* - * weechat::list_new: create a new list - */ - XS (XS_weechat_api_list_new) { char *result; @@ -548,10 +470,6 @@ XS (XS_weechat_api_list_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_add: add a string to list - */ - XS (XS_weechat_api_list_add) { char *result, *weelist, *data, *where, *user_data; @@ -574,10 +492,6 @@ XS (XS_weechat_api_list_add) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_search: search a string in list - */ - XS (XS_weechat_api_list_search) { char *result, *weelist, *data; @@ -596,10 +510,6 @@ XS (XS_weechat_api_list_search) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_search_pos: search position of a string in list - */ - XS (XS_weechat_api_list_search_pos) { char *weelist, *data; @@ -618,10 +528,6 @@ XS (XS_weechat_api_list_search_pos) API_RETURN_INT(pos); } -/* - * weechat::list_casesearch: search a string in list (ignore case) - */ - XS (XS_weechat_api_list_casesearch) { char *result, *weelist, *data; @@ -640,11 +546,6 @@ XS (XS_weechat_api_list_casesearch) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_casesearch_pos: search position of a string in list - * (ignore case) - */ - XS (XS_weechat_api_list_casesearch_pos) { char *weelist, *data; @@ -663,10 +564,6 @@ XS (XS_weechat_api_list_casesearch_pos) API_RETURN_INT(pos); } -/* - * weechat::list_get: get item by position - */ - XS (XS_weechat_api_list_get) { char *result; @@ -682,10 +579,6 @@ XS (XS_weechat_api_list_get) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_set: set new value for item - */ - XS (XS_weechat_api_list_set) { char *item, *new_value; @@ -703,10 +596,6 @@ XS (XS_weechat_api_list_set) API_RETURN_OK; } -/* - * weechat::list_next: get next item - */ - XS (XS_weechat_api_list_next) { char *result; @@ -721,10 +610,6 @@ XS (XS_weechat_api_list_next) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_prev: get previous item - */ - XS (XS_weechat_api_list_prev) { char *result; @@ -739,10 +624,6 @@ XS (XS_weechat_api_list_prev) API_RETURN_STRING_FREE(result); } -/* - * weechat::list_string: get string value of item - */ - XS (XS_weechat_api_list_string) { const char *result; @@ -757,10 +638,6 @@ XS (XS_weechat_api_list_string) API_RETURN_STRING(result); } -/* - * weechat::list_size: get number of elements in list - */ - XS (XS_weechat_api_list_size) { int size; @@ -775,10 +652,6 @@ XS (XS_weechat_api_list_size) API_RETURN_INT(size); } -/* - * weechat::list_remove: remove item from list - */ - XS (XS_weechat_api_list_remove) { char *weelist, *item; @@ -797,10 +670,6 @@ XS (XS_weechat_api_list_remove) API_RETURN_OK; } -/* - * weechat::list_remove_all: remove all items from list - */ - XS (XS_weechat_api_list_remove_all) { dXSARGS; @@ -814,10 +683,6 @@ XS (XS_weechat_api_list_remove_all) API_RETURN_OK; } -/* - * weechat::list_free: free list - */ - XS (XS_weechat_api_list_free) { dXSARGS; @@ -831,10 +696,6 @@ XS (XS_weechat_api_list_free) API_RETURN_OK; } -/* - * weechat_perl_api_config_reload_cb: callback for config reload - */ - int weechat_perl_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -872,10 +733,6 @@ weechat_perl_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat::config_new: create a new configuration file - */ - XS (XS_weechat_api_config_new) { char *result, *name, *function, *data; @@ -899,10 +756,6 @@ XS (XS_weechat_api_config_new) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_config_section_read_cb: callback for reading option in section - */ - int weechat_perl_api_config_section_read_cb (void *data, struct t_config_file *config_file, @@ -948,10 +801,6 @@ weechat_perl_api_config_section_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_perl_api_config_section_write_cb: callback for writing section - */ - int weechat_perl_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -991,11 +840,6 @@ weechat_perl_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_perl_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_perl_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -1035,10 +879,6 @@ weechat_perl_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_perl_api_config_section_create_option_cb: callback to create an option - */ - int weechat_perl_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1084,10 +924,6 @@ weechat_perl_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_perl_api_config_section_delete_option_cb: callback to delete an option - */ - int weechat_perl_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1133,10 +969,6 @@ weechat_perl_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat::config_new_section: create a new section in configuration file - */ - XS (XS_weechat_api_config_new_section) { char *result, *cfg_file, *name, *function_read, *data_read; @@ -1188,10 +1020,6 @@ XS (XS_weechat_api_config_new_section) API_RETURN_STRING_FREE(result); } -/* - * weechat::config_search_section: search section in configuration file - */ - XS (XS_weechat_api_config_search_section) { char *result, *config_file, *section_name; @@ -1210,11 +1038,6 @@ XS (XS_weechat_api_config_search_section) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_config_option_check_value_cb: callback for checking new - * value for option - */ - int weechat_perl_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1254,10 +1077,6 @@ weechat_perl_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_perl_api_config_option_change_cb: callback for option changed - */ - void weechat_perl_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1287,10 +1106,6 @@ weechat_perl_api_config_option_change_cb (void *data, } } -/* - * weechat_perl_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_perl_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1320,10 +1135,6 @@ weechat_perl_api_config_option_delete_cb (void *data, } } -/* - * weechat::config_new_option: create a new option in section - */ - XS (XS_weechat_api_config_new_option) { char *result, *config_file, *section, *name, *type; @@ -1377,10 +1188,6 @@ XS (XS_weechat_api_config_new_option) API_RETURN_STRING_FREE(result); } -/* - * weechat::config_search_option: search option in configuration file or section - */ - XS (XS_weechat_api_config_search_option) { char *result, *config_file, *section, *option_name; @@ -1401,10 +1208,6 @@ XS (XS_weechat_api_config_search_option) API_RETURN_STRING_FREE(result); } -/* - * weechat::config_string_to_boolean: return boolean value of a string - */ - XS (XS_weechat_api_config_string_to_boolean) { int value; @@ -1419,10 +1222,6 @@ XS (XS_weechat_api_config_string_to_boolean) API_RETURN_INT(value); } -/* - * weechat::config_option_reset: reset an option with default value - */ - XS (XS_weechat_api_config_option_reset) { int rc; @@ -1441,10 +1240,6 @@ XS (XS_weechat_api_config_option_reset) API_RETURN_INT(rc); } -/* - * weechat::config_option_set: set new value for option - */ - XS (XS_weechat_api_config_option_set) { int rc; @@ -1465,10 +1260,6 @@ XS (XS_weechat_api_config_option_set) API_RETURN_INT(rc); } -/* - * weechat::config_option_set_null: set null (undefined) value for option - */ - XS (XS_weechat_api_config_option_set_null) { int rc; @@ -1487,10 +1278,6 @@ XS (XS_weechat_api_config_option_set_null) API_RETURN_INT(rc); } -/* - * weechat::config_option_unset: unset an option - */ - XS (XS_weechat_api_config_option_unset) { int rc; @@ -1508,10 +1295,6 @@ XS (XS_weechat_api_config_option_unset) API_RETURN_INT(rc); } -/* - * weechat::config_option_rename: rename an option - */ - XS (XS_weechat_api_config_option_rename) { char *option, *new_name; @@ -1530,10 +1313,6 @@ XS (XS_weechat_api_config_option_rename) API_RETURN_OK; } -/* - * weechat::config_option_is_null: return 1 if value of option is null - */ - XS (XS_weechat_api_config_option_is_null) { int value; @@ -1548,11 +1327,6 @@ XS (XS_weechat_api_config_option_is_null) API_RETURN_INT(value); } -/* - * weechat::config_option_default_is_null: return 1 if default value of option - * is null - */ - XS (XS_weechat_api_config_option_default_is_null) { int value; @@ -1567,10 +1341,6 @@ XS (XS_weechat_api_config_option_default_is_null) API_RETURN_INT(value); } -/* - * weechat::config_boolean: return boolean value of option - */ - XS (XS_weechat_api_config_boolean) { int value; @@ -1585,10 +1355,6 @@ XS (XS_weechat_api_config_boolean) API_RETURN_INT(value); } -/* - * weechat::config_boolean_default: return default boolean value of option - */ - XS (XS_weechat_api_config_boolean_default) { int value; @@ -1603,10 +1369,6 @@ XS (XS_weechat_api_config_boolean_default) API_RETURN_INT(value); } -/* - * weechat::config_integer: return integer value of option - */ - XS (XS_weechat_api_config_integer) { int value; @@ -1621,10 +1383,6 @@ XS (XS_weechat_api_config_integer) API_RETURN_INT(value); } -/* - * weechat::config_integer_default: return default integer value of option - */ - XS (XS_weechat_api_config_integer_default) { int value; @@ -1639,10 +1397,6 @@ XS (XS_weechat_api_config_integer_default) API_RETURN_INT(value); } -/* - * weechat::config_string: return string value of option - */ - XS (XS_weechat_api_config_string) { const char *result; @@ -1657,10 +1411,6 @@ XS (XS_weechat_api_config_string) API_RETURN_STRING(result); } -/* - * weechat::config_string_default: return default string value of option - */ - XS (XS_weechat_api_config_string_default) { const char *result; @@ -1675,10 +1425,6 @@ XS (XS_weechat_api_config_string_default) API_RETURN_STRING(result); } -/* - * weechat::config_color: return color value of option - */ - XS (XS_weechat_api_config_color) { const char *result; @@ -1693,10 +1439,6 @@ XS (XS_weechat_api_config_color) API_RETURN_STRING(result); } -/* - * weechat::config_color_default: return default color value of option - */ - XS (XS_weechat_api_config_color_default) { const char *result; @@ -1711,10 +1453,6 @@ XS (XS_weechat_api_config_color_default) API_RETURN_STRING(result); } -/* - * weechat::config_write_option: write an option in configuration file - */ - XS (XS_weechat_api_config_write_option) { char *config_file, *option; @@ -1733,10 +1471,6 @@ XS (XS_weechat_api_config_write_option) API_RETURN_OK; } -/* - * weechat::config_write_line: write a line in configuration file - */ - XS (XS_weechat_api_config_write_line) { char *config_file, *option_name, *value; @@ -1756,10 +1490,6 @@ XS (XS_weechat_api_config_write_line) API_RETURN_OK; } -/* - * weechat::config_write: write configuration file - */ - XS (XS_weechat_api_config_write) { int rc; @@ -1774,10 +1504,6 @@ XS (XS_weechat_api_config_write) API_RETURN_INT(rc); } -/* - * weechat::config_read: read configuration file - */ - XS (XS_weechat_api_config_read) { int rc; @@ -1792,10 +1518,6 @@ XS (XS_weechat_api_config_read) API_RETURN_INT(rc); } -/* - * weechat::config_reload: reload configuration file - */ - XS (XS_weechat_api_config_reload) { int rc; @@ -1810,10 +1532,6 @@ XS (XS_weechat_api_config_reload) API_RETURN_INT(rc); } -/* - * weechat::config_option_free: free an option in configuration file - */ - XS (XS_weechat_api_config_option_free) { dXSARGS; @@ -1829,11 +1547,6 @@ XS (XS_weechat_api_config_option_free) API_RETURN_OK; } -/* - * weechat::config_section_free_options: free options of a section in - * configuration file - */ - XS (XS_weechat_api_config_section_free_options) { dXSARGS; @@ -1849,10 +1562,6 @@ XS (XS_weechat_api_config_section_free_options) API_RETURN_OK; } -/* - * weechat::config_section_free: free section in configuration file - */ - XS (XS_weechat_api_config_section_free) { dXSARGS; @@ -1868,10 +1577,6 @@ XS (XS_weechat_api_config_section_free) API_RETURN_OK; } -/* - * weechat::config_free: free configuration file - */ - XS (XS_weechat_api_config_free) { dXSARGS; @@ -1887,10 +1592,6 @@ XS (XS_weechat_api_config_free) API_RETURN_OK; } -/* - * weechat::config_get: get config option - */ - XS (XS_weechat_api_config_get) { char *result; @@ -1905,10 +1606,6 @@ XS (XS_weechat_api_config_get) API_RETURN_STRING_FREE(result); } -/* - * weechat::config_get_plugin: get value of a plugin option - */ - XS (XS_weechat_api_config_get_plugin) { const char *result; @@ -1925,10 +1622,6 @@ XS (XS_weechat_api_config_get_plugin) API_RETURN_STRING(result); } -/* - * weechat::config_is_set_plugin: check if a plugin option is set - */ - XS (XS_weechat_api_config_is_set_plugin) { char *option; @@ -1948,10 +1641,6 @@ XS (XS_weechat_api_config_is_set_plugin) API_RETURN_INT(rc); } -/* - * weechat::config_set_plugin: set value of a plugin option - */ - XS (XS_weechat_api_config_set_plugin) { char *option, *value; @@ -1973,10 +1662,6 @@ XS (XS_weechat_api_config_set_plugin) API_RETURN_INT(rc); } -/* - * weechat::config_set_desc_plugin: set description of a plugin option - */ - XS (XS_weechat_api_config_set_desc_plugin) { char *option, *description; @@ -1997,10 +1682,6 @@ XS (XS_weechat_api_config_set_desc_plugin) API_RETURN_OK; } -/* - * weechat::config_unset_plugin: unset a plugin option - */ - XS (XS_weechat_api_config_unset_plugin) { char *option; @@ -2020,10 +1701,6 @@ XS (XS_weechat_api_config_unset_plugin) API_RETURN_INT(rc); } -/* - * weechat::key_bind: bind key(s) - */ - XS (XS_weechat_api_key_bind) { char *context; @@ -2049,10 +1726,6 @@ XS (XS_weechat_api_key_bind) API_RETURN_INT(num_keys); } -/* - * weechat::key_unbind: unbind key(s) - */ - XS (XS_weechat_api_key_unbind) { char *context, *key; @@ -2071,10 +1744,6 @@ XS (XS_weechat_api_key_unbind) API_RETURN_INT(num_keys); } -/* - * weechat::prefix: get a prefix, used for display - */ - XS (XS_weechat_api_prefix) { const char *result; @@ -2089,10 +1758,6 @@ XS (XS_weechat_api_prefix) API_RETURN_STRING(result); } -/* - * weechat::color: get a color code, used for display - */ - XS (XS_weechat_api_color) { const char *result; @@ -2107,10 +1772,6 @@ XS (XS_weechat_api_color) API_RETURN_STRING(result); } -/* - * weechat::print: print message in a buffer - */ - XS (XS_weechat_api_print) { char *buffer, *message; @@ -2131,11 +1792,6 @@ XS (XS_weechat_api_print) API_RETURN_OK; } -/* - * weechat::print_date_tags: print message in a buffer with optional date and - * tags - */ - XS (XS_weechat_api_print_date_tags) { char *buffer, *tags, *message; @@ -2159,10 +1815,6 @@ XS (XS_weechat_api_print_date_tags) API_RETURN_OK; } -/* - * weechat::print_y: print message in a buffer with free content - */ - XS (XS_weechat_api_print_y) { char *buffer, *message; @@ -2184,10 +1836,6 @@ XS (XS_weechat_api_print_y) API_RETURN_OK; } -/* - * weechat::log_print: print message in WeeChat log file - */ - XS (XS_weechat_api_log_print) { dXSARGS; @@ -2204,10 +1852,6 @@ XS (XS_weechat_api_log_print) API_RETURN_OK; } -/* - * weechat_perl_api_hook_command_cb: callback for command hooked - */ - int weechat_perl_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2249,10 +1893,6 @@ weechat_perl_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_command: hook a command - */ - XS (XS_weechat_api_hook_command) { char *result, *command, *description, *args, *args_description; @@ -2285,10 +1925,6 @@ XS (XS_weechat_api_hook_command) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_perl_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2327,10 +1963,6 @@ weechat_perl_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_command_run: hook a command_run - */ - XS (XS_weechat_api_hook_command_run) { char *result, *command, *function, *data; @@ -2354,10 +1986,6 @@ XS (XS_weechat_api_hook_command_run) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_timer_cb: callback for timer hooked - */ - int weechat_perl_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2395,10 +2023,6 @@ weechat_perl_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat::hook_timer: hook a timer - */ - XS (XS_weechat_api_hook_timer) { char *result; @@ -2420,10 +2044,6 @@ XS (XS_weechat_api_hook_timer) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_fd_cb: callback for fd hooked - */ - int weechat_perl_api_hook_fd_cb (void *data, int fd) { @@ -2460,10 +2080,6 @@ weechat_perl_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat::hook_fd: hook a fd - */ - XS (XS_weechat_api_hook_fd) { char *result; @@ -2486,10 +2102,6 @@ XS (XS_weechat_api_hook_fd) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_process_cb: callback for process hooked - */ - int weechat_perl_api_hook_process_cb (void *data, const char *command, int return_code, @@ -2529,10 +2141,6 @@ weechat_perl_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_process: hook a process - */ - XS (XS_weechat_api_hook_process) { char *command, *function, *data, *result; @@ -2557,10 +2165,6 @@ XS (XS_weechat_api_hook_process) API_RETURN_STRING_FREE(result); } -/* - * weechat::hook_process_hashtable: hook a process with options in a hashtable - */ - XS (XS_weechat_api_hook_process_hashtable) { char *command, *function, *data, *result; @@ -2594,10 +2198,6 @@ XS (XS_weechat_api_hook_process_hashtable) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_connect_cb: callback for connect hooked - */ - int weechat_perl_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -2643,10 +2243,6 @@ weechat_perl_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_connect: hook a connection - */ - XS (XS_weechat_api_hook_connect) { char *proxy, *address, *local_hostname, *function, *data, *result; @@ -2681,10 +2277,6 @@ XS (XS_weechat_api_hook_connect) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_print_cb: callback for print hooked - */ - int weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -2745,10 +2337,6 @@ weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_print: hook a print - */ - XS (XS_weechat_api_hook_print) { char *result, *buffer, *tags, *message, *function, *data; @@ -2777,10 +2365,6 @@ XS (XS_weechat_api_hook_print) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_signal_cb: callback for signal hooked - */ - int weechat_perl_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -2837,10 +2421,6 @@ weechat_perl_api_hook_signal_cb (void *data, const char *signal, const char *typ return WEECHAT_RC_ERROR; } -/* - * weechat::hook_signal: hook a signal - */ - XS (XS_weechat_api_hook_signal) { char *result, *signal, *function, *data; @@ -2864,10 +2444,6 @@ XS (XS_weechat_api_hook_signal) API_RETURN_STRING_FREE(result); } -/* - * weechat::hook_signal_send: send a signal - */ - XS (XS_weechat_api_hook_signal_send) { char *signal, *type_data; @@ -2906,10 +2482,6 @@ XS (XS_weechat_api_hook_signal_send) API_RETURN_ERROR; } -/* - * weechat_perl_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_perl_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -2946,10 +2518,6 @@ weechat_perl_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_hsignal: hook a hsignal - */ - XS (XS_weechat_api_hook_hsignal) { char *result, *signal, *function, *data; @@ -2973,10 +2541,6 @@ XS (XS_weechat_api_hook_hsignal) API_RETURN_STRING_FREE(result); } -/* - * weechat::hook_hsignal_send: send a hsignal - */ - XS (XS_weechat_api_hook_hsignal_send) { char *signal; @@ -3001,10 +2565,6 @@ XS (XS_weechat_api_hook_hsignal_send) API_RETURN_OK; } -/* - * weechat_perl_api_hook_config_cb: callback for config option hooked - */ - int weechat_perl_api_hook_config_cb (void *data, const char *option, const char *value) { @@ -3040,10 +2600,6 @@ weechat_perl_api_hook_config_cb (void *data, const char *option, const char *val return WEECHAT_RC_ERROR; } -/* - * weechat::hook_config: hook a config option - */ - XS (XS_weechat_api_hook_config) { char *result, *option, *function, *data; @@ -3067,10 +2623,6 @@ XS (XS_weechat_api_hook_config) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_completion_cb: callback for completion hooked - */ - int weechat_perl_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3113,10 +2665,6 @@ weechat_perl_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat::hook_completion: hook a completion - */ - XS (XS_weechat_api_hook_completion) { char *result, *completion, *description, *function, *data; @@ -3142,10 +2690,6 @@ XS (XS_weechat_api_hook_completion) API_RETURN_STRING_FREE(result); } -/* - * weechat::hook_completion_list_add: add a word to list for a completion - */ - XS (XS_weechat_api_hook_completion_list_add) { char *completion, *word, *where; @@ -3167,10 +2711,6 @@ XS (XS_weechat_api_hook_completion_list_add) API_RETURN_OK; } -/* - * weechat_perl_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_perl_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, const char *string) @@ -3197,10 +2737,6 @@ weechat_perl_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat::hook_modifier: hook a modifier - */ - XS (XS_weechat_api_hook_modifier) { char *result, *modifier, *function, *data; @@ -3224,10 +2760,6 @@ XS (XS_weechat_api_hook_modifier) API_RETURN_STRING_FREE(result); } -/* - * weechat::hook_modifier_exec: execute a modifier hook - */ - XS (XS_weechat_api_hook_modifier_exec) { char *result, *modifier, *modifier_data, *string; @@ -3246,10 +2778,6 @@ XS (XS_weechat_api_hook_modifier_exec) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_info_cb: callback for info hooked - */ - const char * weechat_perl_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3275,10 +2803,6 @@ weechat_perl_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat::hook_info: hook an info - */ - XS (XS_weechat_api_hook_info) { char *result, *info_name, *description, *args_description, *function, *data; @@ -3306,10 +2830,6 @@ XS (XS_weechat_api_hook_info) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_perl_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3335,10 +2855,6 @@ weechat_perl_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat::hook_info_hashtable: hook an info_hashtable - */ - XS (XS_weechat_api_hook_info_hashtable) { char *result, *info_name, *description, *args_description; @@ -3369,10 +2885,6 @@ XS (XS_weechat_api_hook_info_hashtable) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_perl_api_hook_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -3405,10 +2917,6 @@ weechat_perl_api_hook_infolist_cb (void *data, const char *infolist_name, return NULL; } -/* - * weechat::hook_infolist: hook an infolist - */ - XS (XS_weechat_api_hook_infolist) { char *result, *infolist_name, *description, *pointer_description; @@ -3439,10 +2947,6 @@ XS (XS_weechat_api_hook_infolist) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_perl_api_hook_focus_cb (void *data, struct t_hashtable *info) @@ -3467,10 +2971,6 @@ weechat_perl_api_hook_focus_cb (void *data, return NULL; } -/* - * weechat::hook_focus: hook a focus - */ - XS (XS_weechat_api_hook_focus) { char *result, *area, *function, *data; @@ -3494,10 +2994,6 @@ XS (XS_weechat_api_hook_focus) API_RETURN_STRING_FREE(result); } -/* - * weechat::unhook: unhook something - */ - XS (XS_weechat_api_unhook) { dXSARGS; @@ -3513,10 +3009,6 @@ XS (XS_weechat_api_unhook) API_RETURN_OK; } -/* - * weechat::unhook_all: unhook all for script - */ - XS (XS_weechat_api_unhook_all) { dXSARGS; @@ -3532,10 +3024,6 @@ XS (XS_weechat_api_unhook_all) API_RETURN_OK; } -/* - * weechat_perl_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_perl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -3573,10 +3061,6 @@ weechat_perl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_perl_api_buffer_close_cb: callback for buffer closed - */ - int weechat_perl_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -3612,10 +3096,6 @@ weechat_perl_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat::buffer_new: create a new buffer - */ - XS (XS_weechat_api_buffer_new) { char *result, *name, *function_input, *data_input, *function_close; @@ -3645,10 +3125,6 @@ XS (XS_weechat_api_buffer_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::buffer_search: search a buffer - */ - XS (XS_weechat_api_buffer_search) { char *result, *plugin, *name; @@ -3666,10 +3142,6 @@ XS (XS_weechat_api_buffer_search) API_RETURN_STRING_FREE(result); } -/* - * weechat::buffer_search_main: search main buffer (WeeChat core buffer) - */ - XS (XS_weechat_api_buffer_search_main) { char *result; @@ -3686,10 +3158,6 @@ XS (XS_weechat_api_buffer_search_main) API_RETURN_STRING_FREE(result); } -/* - * weechat::current_buffer: get current buffer - */ - XS (XS_weechat_api_current_buffer) { char *result; @@ -3706,10 +3174,6 @@ XS (XS_weechat_api_current_buffer) API_RETURN_STRING_FREE(result); } -/* - * weechat::buffer_clear: clear a buffer - */ - XS (XS_weechat_api_buffer_clear) { dXSARGS; @@ -3723,10 +3187,6 @@ XS (XS_weechat_api_buffer_clear) API_RETURN_OK; } -/* - * weechat::buffer_close: close a buffer - */ - XS (XS_weechat_api_buffer_close) { dXSARGS; @@ -3742,10 +3202,6 @@ XS (XS_weechat_api_buffer_close) API_RETURN_OK; } -/* - * weechat::buffer_merge: merge a buffer to another buffer - */ - XS (XS_weechat_api_buffer_merge) { dXSARGS; @@ -3760,10 +3216,6 @@ XS (XS_weechat_api_buffer_merge) API_RETURN_OK; } -/* - * weechat::buffer_unmerge: unmerge a buffer from group of merged buffers - */ - XS (XS_weechat_api_buffer_unmerge) { dXSARGS; @@ -3778,10 +3230,6 @@ XS (XS_weechat_api_buffer_unmerge) API_RETURN_OK; } -/* - * weechat::buffer_get_integer: get a buffer property as integer - */ - XS (XS_weechat_api_buffer_get_integer) { char *buffer, *property; @@ -3800,10 +3248,6 @@ XS (XS_weechat_api_buffer_get_integer) API_RETURN_INT(value); } -/* - * weechat::buffer_get_string: get a buffer property as string - */ - XS (XS_weechat_api_buffer_get_string) { char *buffer, *property; @@ -3822,10 +3266,6 @@ XS (XS_weechat_api_buffer_get_string) API_RETURN_STRING(result); } -/* - * weechat::buffer_get_pointer: get a buffer property as pointer - */ - XS (XS_weechat_api_buffer_get_pointer) { char *result, *buffer, *property; @@ -3844,10 +3284,6 @@ XS (XS_weechat_api_buffer_get_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::buffer_set: set a buffer property - */ - XS (XS_weechat_api_buffer_set) { char *buffer, *property, *value; @@ -3866,11 +3302,6 @@ XS (XS_weechat_api_buffer_set) API_RETURN_OK; } -/* - * weechat::buffer_string_replace_local_var: replace local variables ($var) in a string, - * using value of local variables - */ - XS (XS_weechat_api_buffer_string_replace_local_var) { char *buffer, *string, *result; @@ -3888,10 +3319,6 @@ XS (XS_weechat_api_buffer_string_replace_local_var) API_RETURN_STRING_FREE(result); } -/* - * weechat::buffer_match_list: return 1 if buffer matches list of buffers - */ - XS (XS_weechat_api_buffer_match_list) { char *buffer, *string; @@ -3910,10 +3337,6 @@ XS (XS_weechat_api_buffer_match_list) API_RETURN_INT(value); } -/* - * weechat::current_window: get current window - */ - XS (XS_weechat_api_current_window) { char *result; @@ -3930,10 +3353,6 @@ XS (XS_weechat_api_current_window) API_RETURN_STRING_FREE(result); } -/* - * weechat::window_search_with_buffer: search a window with buffer pointer - */ - XS (XS_weechat_api_window_search_with_buffer) { char *result; @@ -3949,10 +3368,6 @@ XS (XS_weechat_api_window_search_with_buffer) } -/* - * weechat::window_get_integer: get a window property as integer - */ - XS (XS_weechat_api_window_get_integer) { char *window, *property; @@ -3971,10 +3386,6 @@ XS (XS_weechat_api_window_get_integer) API_RETURN_INT(value); } -/* - * weechat::window_get_string: get a window property as string - */ - XS (XS_weechat_api_window_get_string) { char *window, *property; @@ -3993,10 +3404,6 @@ XS (XS_weechat_api_window_get_string) API_RETURN_STRING(result); } -/* - * weechat::window_get_pointer: get a window property as pointer - */ - XS (XS_weechat_api_window_get_pointer) { char *result, *window, *property; @@ -4015,10 +3422,6 @@ XS (XS_weechat_api_window_get_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::window_set_title: set window title - */ - XS (XS_weechat_api_window_set_title) { dXSARGS; @@ -4032,10 +3435,6 @@ XS (XS_weechat_api_window_set_title) API_RETURN_OK; } -/* - * weechat::nicklist_add_group: add a group in nicklist - */ - XS (XS_weechat_api_nicklist_add_group) { char *result, *buffer, *parent_group, *name, *color; @@ -4059,10 +3458,6 @@ XS (XS_weechat_api_nicklist_add_group) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_search_group: search a group in nicklist - */ - XS (XS_weechat_api_nicklist_search_group) { char *result, *buffer, *from_group, *name; @@ -4083,10 +3478,6 @@ XS (XS_weechat_api_nicklist_search_group) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_add_nick: add a nick in nicklist - */ - XS (XS_weechat_api_nicklist_add_nick) { char *result, *buffer, *group, *name, *color, *prefix, *prefix_color; @@ -4114,10 +3505,6 @@ XS (XS_weechat_api_nicklist_add_nick) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_search_nick: search a nick in nicklist - */ - XS (XS_weechat_api_nicklist_search_nick) { char *result, *buffer, *from_group, *name; @@ -4138,10 +3525,6 @@ XS (XS_weechat_api_nicklist_search_nick) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_remove_group: remove a group from nicklist - */ - XS (XS_weechat_api_nicklist_remove_group) { char *buffer, *group; @@ -4160,10 +3543,6 @@ XS (XS_weechat_api_nicklist_remove_group) API_RETURN_OK; } -/* - * weechat::nicklist_remove_nick: remove a nick from nicklist - */ - XS (XS_weechat_api_nicklist_remove_nick) { char *buffer, *nick; @@ -4182,10 +3561,6 @@ XS (XS_weechat_api_nicklist_remove_nick) API_RETURN_OK; } -/* - * weechat::nicklist_remove_all: remove all groups/nicks from nicklist - */ - XS (XS_weechat_api_nicklist_remove_all) { dXSARGS; @@ -4199,10 +3574,6 @@ XS (XS_weechat_api_nicklist_remove_all) API_RETURN_OK; } -/* - * weechat::nicklist_group_get_integer: get a group property as integer - */ - XS (XS_weechat_api_nicklist_group_get_integer) { char *buffer, *group, *property; @@ -4224,10 +3595,6 @@ XS (XS_weechat_api_nicklist_group_get_integer) API_RETURN_INT(value); } -/* - * weechat::nicklist_group_get_string: get a group property as string - */ - XS (XS_weechat_api_nicklist_group_get_string) { char *buffer, *group, *property; @@ -4249,10 +3616,6 @@ XS (XS_weechat_api_nicklist_group_get_string) API_RETURN_STRING(result); } -/* - * weechat::nicklist_group_get_pointer: get a group property as pointer - */ - XS (XS_weechat_api_nicklist_group_get_pointer) { char *result, *buffer, *group, *property; @@ -4273,10 +3636,6 @@ XS (XS_weechat_api_nicklist_group_get_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_group_set: set a group property - */ - XS (XS_weechat_api_nicklist_group_set) { char *buffer, *group, *property, *value; @@ -4299,10 +3658,6 @@ XS (XS_weechat_api_nicklist_group_set) API_RETURN_OK; } -/* - * weechat::nicklist_nick_get_integer: get a nick property as integer - */ - XS (XS_weechat_api_nicklist_nick_get_integer) { char *buffer, *nick, *property; @@ -4324,10 +3679,6 @@ XS (XS_weechat_api_nicklist_nick_get_integer) API_RETURN_INT(value); } -/* - * weechat::nicklist_nick_get_string: get a nick property as string - */ - XS (XS_weechat_api_nicklist_nick_get_string) { char *buffer, *nick, *property; @@ -4349,10 +3700,6 @@ XS (XS_weechat_api_nicklist_nick_get_string) API_RETURN_STRING(result); } -/* - * weechat::nicklist_nick_get_pointer: get a nick property as pointer - */ - XS (XS_weechat_api_nicklist_nick_get_pointer) { char *result, *buffer, *nick, *property; @@ -4373,10 +3720,6 @@ XS (XS_weechat_api_nicklist_nick_get_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::nicklist_nick_set: set a nick property - */ - XS (XS_weechat_api_nicklist_nick_set) { char *buffer, *nick, *property, *value; @@ -4399,10 +3742,6 @@ XS (XS_weechat_api_nicklist_nick_set) API_RETURN_OK; } -/* - * weechat::bar_item_search: search a bar item - */ - XS (XS_weechat_api_bar_item_search) { char *result; @@ -4417,10 +3756,6 @@ XS (XS_weechat_api_bar_item_search) API_RETURN_STRING_FREE(result); } -/* - * weechat_perl_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_perl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -4453,10 +3788,6 @@ weechat_perl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat::bar_item_new: add a new bar item - */ - XS (XS_weechat_api_bar_item_new) { char *result, *name, *function, *data; @@ -4480,10 +3811,6 @@ XS (XS_weechat_api_bar_item_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::bar_item_update: update a bar item on screen - */ - XS (XS_weechat_api_bar_item_update) { dXSARGS; @@ -4497,10 +3824,6 @@ XS (XS_weechat_api_bar_item_update) API_RETURN_OK; } -/* - * weechat::bar_item_remove: remove a bar item - */ - XS (XS_weechat_api_bar_item_remove) { dXSARGS; @@ -4516,10 +3839,6 @@ XS (XS_weechat_api_bar_item_remove) API_RETURN_OK; } -/* - * weechat::bar_search: search a bar - */ - XS (XS_weechat_api_bar_search) { char *result; @@ -4534,10 +3853,6 @@ XS (XS_weechat_api_bar_search) API_RETURN_STRING_FREE(result); } -/* - * weechat::bar_new: add a new bar - */ - XS (XS_weechat_api_bar_new) { char *result, *name, *hidden, *priority, *type, *conditions, *position; @@ -4584,10 +3899,6 @@ XS (XS_weechat_api_bar_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::bar_set: set a bar property - */ - XS (XS_weechat_api_bar_set) { char *bar, *property, *value; @@ -4606,10 +3917,6 @@ XS (XS_weechat_api_bar_set) API_RETURN_OK; } -/* - * weechat::bar_update: update a bar on screen - */ - XS (XS_weechat_api_bar_update) { dXSARGS; @@ -4623,10 +3930,6 @@ XS (XS_weechat_api_bar_update) API_RETURN_OK; } -/* - * weechat::bar_remove: remove a bar - */ - XS (XS_weechat_api_bar_remove) { dXSARGS; @@ -4640,10 +3943,6 @@ XS (XS_weechat_api_bar_remove) API_RETURN_OK; } -/* - * weechat::command: execute a command on a buffer - */ - XS (XS_weechat_api_command) { char *buffer, *command; @@ -4664,10 +3963,6 @@ XS (XS_weechat_api_command) API_RETURN_OK; } -/* - * weechat::info_get: get info (as string) - */ - XS (XS_weechat_api_info_get) { char *info_name, *arguments; @@ -4686,10 +3981,6 @@ XS (XS_weechat_api_info_get) API_RETURN_STRING(result); } -/* - * weechat::info_get_hashtable: get info (as hashtable) - */ - XS (XS_weechat_api_info_get_hashtable) { char *info_name; @@ -4718,10 +4009,6 @@ XS (XS_weechat_api_info_get_hashtable) API_RETURN_OBJ(result_hash); } -/* - * weechat::infolist_new: create new infolist - */ - XS (XS_weechat_api_infolist_new) { char *result; @@ -4738,10 +4025,6 @@ XS (XS_weechat_api_infolist_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_new_item: create new item in infolist - */ - XS (XS_weechat_api_infolist_new_item) { char *infolist, *result; @@ -4758,10 +4041,6 @@ XS (XS_weechat_api_infolist_new_item) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_new_var_integer: create new integer variable in infolist - */ - XS (XS_weechat_api_infolist_new_var_integer) { char *infolist, *name, *result; @@ -4781,10 +4060,6 @@ XS (XS_weechat_api_infolist_new_var_integer) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_new_var_string: create new string variable in infolist - */ - XS (XS_weechat_api_infolist_new_var_string) { char *infolist, *name, *value, *result; @@ -4805,10 +4080,6 @@ XS (XS_weechat_api_infolist_new_var_string) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_new_var_pointer: create new pointer variable in infolist - */ - XS (XS_weechat_api_infolist_new_var_pointer) { char *infolist, *name, *value, *result; @@ -4829,10 +4100,6 @@ XS (XS_weechat_api_infolist_new_var_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_new_var_time: create new time variable in infolist - */ - XS (XS_weechat_api_infolist_new_var_time) { char *infolist, *name, *result; @@ -4852,10 +4119,6 @@ XS (XS_weechat_api_infolist_new_var_time) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_get: get list with infos - */ - XS (XS_weechat_api_infolist_get) { char *result, *name, *pointer, *arguments; @@ -4876,10 +4139,6 @@ XS (XS_weechat_api_infolist_get) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_next: move item pointer to next item in infolist - */ - XS (XS_weechat_api_infolist_next) { int value; @@ -4894,10 +4153,6 @@ XS (XS_weechat_api_infolist_next) API_RETURN_INT(value); } -/* - * weechat::infolist_prev: move item pointer to previous item in infolist - */ - XS (XS_weechat_api_infolist_prev) { int value; @@ -4912,11 +4167,6 @@ XS (XS_weechat_api_infolist_prev) API_RETURN_INT(value); } -/* - * weechat::infolist_reset_item_cursor: reset pointer to current item in - * infolist - */ - XS (XS_weechat_api_infolist_reset_item_cursor) { dXSARGS; @@ -4930,10 +4180,6 @@ XS (XS_weechat_api_infolist_reset_item_cursor) API_RETURN_OK; } -/* - * weechat::infolist_fields: get list of fields for current item of infolist - */ - XS (XS_weechat_api_infolist_fields) { const char *result; @@ -4948,10 +4194,6 @@ XS (XS_weechat_api_infolist_fields) API_RETURN_STRING(result); } -/* - * weechat::infolist_integer: get integer value of a variable in infolist - */ - XS (XS_weechat_api_infolist_integer) { char *infolist, *variable; @@ -4970,10 +4212,6 @@ XS (XS_weechat_api_infolist_integer) API_RETURN_INT(value); } -/* - * weechat::infolist_string: get string value of a variable in infolist - */ - XS (XS_weechat_api_infolist_string) { char *infolist, *variable; @@ -4992,10 +4230,6 @@ XS (XS_weechat_api_infolist_string) API_RETURN_STRING(result); } -/* - * weechat::infolist_pointer: get pointer value of a variable in infolist - */ - XS (XS_weechat_api_infolist_pointer) { char *infolist, *variable; @@ -5014,10 +4248,6 @@ XS (XS_weechat_api_infolist_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_time: get time value of a variable in infolist - */ - XS (XS_weechat_api_infolist_time) { time_t time; @@ -5042,10 +4272,6 @@ XS (XS_weechat_api_infolist_time) API_RETURN_STRING_FREE(result); } -/* - * weechat::infolist_free: free infolist - */ - XS (XS_weechat_api_infolist_free) { dXSARGS; @@ -5059,10 +4285,6 @@ XS (XS_weechat_api_infolist_free) API_RETURN_OK; } -/* - * weechat::hdata_get: get hdata - */ - XS (XS_weechat_api_hdata_get) { char *result, *name; @@ -5079,10 +4301,6 @@ XS (XS_weechat_api_hdata_get) API_RETURN_STRING_FREE(result); } -/* - * weechat::hdata_get_var_offset: get offset of variable in hdata - */ - XS (XS_weechat_api_hdata_get_var_offset) { char *hdata, *name; @@ -5101,10 +4319,6 @@ XS (XS_weechat_api_hdata_get_var_offset) API_RETURN_INT(value); } -/* - * weechat::hdata_get_var_type_string: get type of variable as string in hdata - */ - XS (XS_weechat_api_hdata_get_var_type_string) { const char *result; @@ -5123,10 +4337,6 @@ XS (XS_weechat_api_hdata_get_var_type_string) API_RETURN_STRING(result); } -/* - * weechat::hdata_get_var_array_size: get array size for variable in hdata - */ - XS (XS_weechat_api_hdata_get_var_array_size) { char *hdata, *pointer, *name; @@ -5148,11 +4358,6 @@ XS (XS_weechat_api_hdata_get_var_array_size) API_RETURN_INT(value); } -/* - * weechat::hdata_get_var_array_size_string: get array size for variable in - * hdata (as string) - */ - XS (XS_weechat_api_hdata_get_var_array_size_string) { const char *result; @@ -5174,10 +4379,6 @@ XS (XS_weechat_api_hdata_get_var_array_size_string) API_RETURN_STRING(result); } -/* - * weechat::hdata_get_var_hdata: get hdata for variable in hdata - */ - XS (XS_weechat_api_hdata_get_var_hdata) { const char *result; @@ -5196,10 +4397,6 @@ XS (XS_weechat_api_hdata_get_var_hdata) API_RETURN_STRING(result); } -/* - * weechat::hdata_get_list: get list pointer in hdata - */ - XS (XS_weechat_api_hdata_get_list) { char *hdata, *name; @@ -5219,10 +4416,6 @@ XS (XS_weechat_api_hdata_get_list) API_RETURN_STRING_FREE(result); } -/* - * weechat::hdata_check_pointer: check pointer with hdata/list - */ - XS (XS_weechat_api_hdata_check_pointer) { char *hdata, *list, *pointer; @@ -5244,10 +4437,6 @@ XS (XS_weechat_api_hdata_check_pointer) API_RETURN_INT(value); } -/* - * weechat::hdata_move: move pointer to another element in list - */ - XS (XS_weechat_api_hdata_move) { char *result, *hdata, *pointer; @@ -5269,10 +4458,6 @@ XS (XS_weechat_api_hdata_move) API_RETURN_STRING_FREE(result); } -/* - * weechat::hdata_char: get char value of a variable in structure using hdata - */ - XS (XS_weechat_api_hdata_char) { char *hdata, *pointer, *name; @@ -5294,11 +4479,6 @@ XS (XS_weechat_api_hdata_char) API_RETURN_INT(value); } -/* - * weechat::hdata_integer: get integer value of a variable in structure using - * hdata - */ - XS (XS_weechat_api_hdata_integer) { char *hdata, *pointer, *name; @@ -5320,10 +4500,6 @@ XS (XS_weechat_api_hdata_integer) API_RETURN_INT(value); } -/* - * weechat::hdata_long: get long value of a variable in structure using hdata - */ - XS (XS_weechat_api_hdata_long) { char *hdata, *pointer, *name; @@ -5345,11 +4521,6 @@ XS (XS_weechat_api_hdata_long) API_RETURN_LONG(value); } -/* - * weechat::hdata_string: get string value of a variable in structure using - * hdata - */ - XS (XS_weechat_api_hdata_string) { char *hdata, *pointer, *name; @@ -5371,11 +4542,6 @@ XS (XS_weechat_api_hdata_string) API_RETURN_STRING(result); } -/* - * weechat::hdata_pointer: get pointer value of a variable in structure using - * hdata - */ - XS (XS_weechat_api_hdata_pointer) { char *hdata, *pointer, *name; @@ -5397,10 +4563,6 @@ XS (XS_weechat_api_hdata_pointer) API_RETURN_STRING_FREE(result); } -/* - * weechat::hdata_time: get time value of a variable in structure using hdata - */ - XS (XS_weechat_api_hdata_time) { time_t time; @@ -5425,11 +4587,6 @@ XS (XS_weechat_api_hdata_time) API_RETURN_STRING_FREE(result); } -/* - * weechat::hdata_hashtable: get hashtable value of a variable in structure - * using hdata - */ - XS (XS_weechat_api_hdata_hashtable) { char *hdata, *pointer, *name; @@ -5452,10 +4609,6 @@ XS (XS_weechat_api_hdata_hashtable) API_RETURN_OBJ(result_hash); } -/* - * weechat::hdata_update: update data in a hdata - */ - XS (XS_weechat_api_hdata_update) { char *hdata, *pointer; @@ -5484,10 +4637,6 @@ XS (XS_weechat_api_hdata_update) API_RETURN_INT(value); } -/* - * weechat::hdata_get_string: get hdata property as string - */ - XS (XS_weechat_api_hdata_get_string) { char *hdata, *property; @@ -5506,10 +4655,6 @@ XS (XS_weechat_api_hdata_get_string) API_RETURN_STRING(result); } -/* - * weechat::upgrade_new: create an upgrade file - */ - XS (XS_weechat_api_upgrade_new) { char *result, *filename; @@ -5527,10 +4672,6 @@ XS (XS_weechat_api_upgrade_new) API_RETURN_STRING_FREE(result); } -/* - * weechat::upgrade_write_object: write object in upgrade file - */ - XS (XS_weechat_api_upgrade_write_object) { char *upgrade_file, *infolist; @@ -5551,10 +4692,6 @@ XS (XS_weechat_api_upgrade_write_object) API_RETURN_INT(rc); } -/* - * weechat_perl_api_upgrade_read_cb: callback for reading object in upgrade file - */ - int weechat_perl_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -5600,10 +4737,6 @@ weechat_perl_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat::config_upgrade_read: read upgrade file - */ - XS (XS_weechat_api_upgrade_read) { char *upgrade_file, *function, *data; @@ -5628,10 +4761,6 @@ XS (XS_weechat_api_upgrade_read) API_RETURN_INT(rc); } -/* - * weechat::upgrade_close: close upgrade file - */ - XS (XS_weechat_api_upgrade_close) { char *upgrade_file; @@ -5649,7 +4778,7 @@ XS (XS_weechat_api_upgrade_close) } /* - * weechat_perl_api_init: initialize subroutines + * Initializes perl functions and constants. */ void diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index 63ab186bd..c4c67ba08 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -127,8 +127,7 @@ char *perl_weechat_code = /* - * weechat_perl_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -148,7 +147,7 @@ weechat_perl_hashtable_map_cb (void *data, } /* - * weechat_perl_hashtable_to_hash: get perl hash with a WeeChat hashtable + * Gets perl hash with a WeeChat hashtable. */ HV * @@ -168,9 +167,9 @@ weechat_perl_hashtable_to_hash (struct t_hashtable *hashtable) } /* - * weechat_perl_hash_to_hashtable: get WeeChat hashtable with perl hash - * Note: hashtable has to be released after use - * with call to weechat_hashtable_free() + * Gets WeeChat hashtable with perl hash. + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -213,7 +212,7 @@ weechat_perl_hash_to_hashtable (SV *hash, int size, const char *type_keys, } /* - * weechat_perl_exec: execute a perl function + * Executes a perl function. */ void * @@ -363,7 +362,11 @@ weechat_perl_exec (struct t_plugin_script *script, } /* - * weechat_perl_load: load a Perl script + * Loads a perl script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -547,7 +550,7 @@ weechat_perl_load (const char *filename) } /* - * weechat_perl_load_cb: callback for weechat_script_auto_load() function + * Callback for weechat_script_auto_load() function. */ void @@ -560,7 +563,7 @@ weechat_perl_load_cb (void *data, const char *filename) } /* - * weechat_perl_unload: unload a Perl script + * Unloads a perl script. */ void @@ -623,7 +626,7 @@ weechat_perl_unload (struct t_plugin_script *script) } /* - * weechat_perl_unload_name: unload a Perl script by name + * Unloads a perl script by name. */ void @@ -651,7 +654,7 @@ weechat_perl_unload_name (const char *name) } /* - * weechat_perl_unload_all: unload all Perl scripts + * Unloads all perl scripts. */ void @@ -664,7 +667,7 @@ weechat_perl_unload_all () } /* - * weechat_perl_reload_name: reload a Perl script by name + * Reloads a perl script by name. */ void @@ -699,7 +702,7 @@ weechat_perl_reload_name (const char *name) } /* - * weechat_perl_command_cb: callback for "/perl" command + * Callback for command "/perl". */ int @@ -771,7 +774,7 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Perl script */ + /* load perl script */ path_script = plugin_script_search_path (weechat_perl_plugin, ptr_name); weechat_perl_load ((path_script) ? path_script : ptr_name); @@ -780,12 +783,12 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Perl script */ + /* reload one perl script */ weechat_perl_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Perl script */ + /* unload perl script */ weechat_perl_unload_name (ptr_name); } perl_quiet = 0; @@ -803,7 +806,7 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_perl_completion_cb: callback for script completion + * Adds perl scripts to completion list. */ int @@ -822,7 +825,7 @@ weechat_perl_completion_cb (void *data, const char *completion_item, } /* - * weechat_perl_hdata_cb: callback for hdata + * Returns hdata for perl scripts. */ struct t_hdata * @@ -837,7 +840,7 @@ weechat_perl_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_perl_infolist_cb: callback for infolist + * Returns infolist with perl scripts. */ struct t_infolist * @@ -861,7 +864,7 @@ weechat_perl_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_perl_signal_debug_dump_cb: dump Perl plugin data in WeeChat log file + * Dumps perl plugin data in WeeChat log file. */ int @@ -883,7 +886,7 @@ weechat_perl_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_perl_signal_buffer_closed_cb: callback called when a buffer is closed + * Callback called when a buffer is closed. */ int @@ -902,7 +905,7 @@ weechat_perl_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_perl_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -936,8 +939,7 @@ weechat_perl_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_perl_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -972,8 +974,7 @@ weechat_perl_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_perl_signal_quit_upgrade_cb: callback called when exiting or - * upgrading WeeChat + * Callback called when exiting or upgrading WeeChat. */ int @@ -993,7 +994,7 @@ weechat_perl_signal_quit_upgrade_cb (void *data, const char *signal, } /* - * weechat_plugin_init: initialize Perl plugin + * Initializes perl plugin. */ int @@ -1056,7 +1057,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end Perl plugin + * Ends perl plugin. */ int diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index ede44e2e4..7205db6ff 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -66,7 +66,7 @@ /* - * plugin_api_charset_set: set plugin charset + * Sets plugin charset. */ void @@ -82,7 +82,7 @@ plugin_api_charset_set (struct t_weechat_plugin *plugin, const char *charset) } /* - * plugin_api_gettext: translate a string using gettext + * Translates a string using gettext. */ const char * @@ -92,7 +92,7 @@ plugin_api_gettext (const char *string) } /* - * plugin_api_ngettext: translate a string using gettext + * Translates a string using gettext (with plural form). */ const char * @@ -106,7 +106,7 @@ plugin_api_ngettext (const char *single, const char *plural, int count) } /* - * plugin_api_config_get: get value of an option + * Gets pointer on an option. */ struct t_config_option * @@ -120,7 +120,7 @@ plugin_api_config_get (const char *option_name) } /* - * plugin_api_config_get_plugin: get value of a plugin config option + * Gets value of a plugin option. */ const char * @@ -141,7 +141,11 @@ plugin_api_config_get_plugin (struct t_weechat_plugin *plugin, } /* - * plugin_api_config_is_set_plugin: return 1 if plugin option is set, otherwise 0 + * Checks if a plugin option is set. + * + * Returns: + * 1: plugin option is set + * 0: plugin option does not exist */ int @@ -161,7 +165,7 @@ plugin_api_config_is_set_plugin (struct t_weechat_plugin *plugin, } /* - * plugin_api_config_set_plugin: set value of a plugin config option + * Sets value of a plugin option. */ int @@ -175,7 +179,7 @@ plugin_api_config_set_plugin (struct t_weechat_plugin *plugin, } /* - * plugin_api_config_set_desc_plugin: set description of a plugin config option + * Sets description of a plugin option. */ void @@ -188,7 +192,7 @@ plugin_api_config_set_desc_plugin (struct t_weechat_plugin *plugin, } /* - * plugin_api_config_unset_plugin: unset plugin config option + * Unsets a plugin option. */ int @@ -208,7 +212,7 @@ plugin_api_config_unset_plugin (struct t_weechat_plugin *plugin, } /* - * plugin_api_prefix: return a prefix for display with printf + * Returns a prefix for display with printf. */ const char * @@ -232,7 +236,7 @@ plugin_api_prefix (const char *prefix) } /* - * plugin_api_color: return a WeeChat color for display with printf + * Returns a WeeChat color for display with printf. */ const char * @@ -252,7 +256,7 @@ plugin_api_color (const char *color_name) } /* - * plugin_api_command: execute a command (simulate user entry) + * Executes a command on a buffer (simulates user entry). */ void @@ -273,7 +277,7 @@ plugin_api_command (struct t_weechat_plugin *plugin, } /* - * plugin_api_info_get_inernal: get info about WeeChat + * Gets info about WeeChat. */ const char * @@ -384,10 +388,9 @@ plugin_api_info_get_internal (void *data, const char *info_name, } /* - * plugin_api_infolist_get_internal: get list with infos about WeeChat structures - * WARNING: caller has to free string returned - * by this function after use, with - * weechat_infolist_free() + * Gets infolist about WeeChat. + * + * Note: result must be freed with function "weechat_infolist_free". */ struct t_infolist * @@ -872,9 +875,11 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name, } /* - * plugin_api_infolist_next: move item pointer to next item in a list - * return 1 if pointer is still ok - * 0 if end of list was reached + * Moves item pointer to next item in an infolist. + * + * Returns: + * 1: pointer is still OK + * 0: end of infolist was reached */ int @@ -887,9 +892,11 @@ plugin_api_infolist_next (struct t_infolist *infolist) } /* - * plugin_api_infolist_prev: move item pointer to previous item in a list - * return 1 if pointer is still ok - * 0 if beginning of list was reached + * Moves pointer to previous item in an infolist. + * + * Returns: + * 1: pointer is still OK + * 0: beginning of infolist was reached */ int @@ -902,7 +909,7 @@ plugin_api_infolist_prev (struct t_infolist *infolist) } /* - * plugin_api_infolist_reset_item_cursor: reset item cursor in infolist + * Resets item cursor in infolist. */ void @@ -915,7 +922,7 @@ plugin_api_infolist_reset_item_cursor (struct t_infolist *infolist) } /* - * plugin_api_infolist_fields: get list of fields for current list item + * Gets list of fields for current infolist item. */ const char * @@ -928,7 +935,7 @@ plugin_api_infolist_fields (struct t_infolist *infolist) } /* - * plugin_api_infolist_integer: get an integer variable value in current list item + * Gets integer value for a variable in current infolist item. */ int @@ -941,7 +948,7 @@ plugin_api_infolist_integer (struct t_infolist *infolist, const char *var) } /* - * plugin_api_infolist_string: get a string variable value in current list item + * Gets string value for a variable in current infolist item. */ const char * @@ -954,7 +961,7 @@ plugin_api_infolist_string (struct t_infolist *infolist, const char *var) } /* - * plugin_api_infolist_pointer: get a pointer variable value in current list item + * Gets pointer value for a variable in current infolist item. */ void * @@ -967,7 +974,9 @@ plugin_api_infolist_pointer (struct t_infolist *infolist, const char *var) } /* - * plugin_api_infolist_buffer: get a buffer variable value in current list item + * Gets buffer value for a variable in current infolist item. + * + * Argument "size" is set with the size of buffer. */ void * @@ -981,7 +990,7 @@ plugin_api_infolist_buffer (struct t_infolist *infolist, const char *var, } /* - * plugin_api_infolist_time: get a time variable value in current list item + * Gets time value for a variable in current infolist item. */ time_t @@ -994,7 +1003,7 @@ plugin_api_infolist_time (struct t_infolist *infolist, const char *var) } /* - * plugin_api_infolist_free: free an infolist + * Frees an infolist. */ void @@ -1005,7 +1014,7 @@ plugin_api_infolist_free (struct t_infolist *infolist) } /* - * plugin_api_init: init plugin API + * Initializes plugin API. */ void diff --git a/src/plugins/plugin-config.c b/src/plugins/plugin-config.c index 9e17fd7d1..30a48f23f 100644 --- a/src/plugins/plugin-config.c +++ b/src/plugins/plugin-config.c @@ -47,7 +47,7 @@ struct t_config_section *plugin_config_section_desc = NULL; /* - * plugin_config_search: search a plugin option + * Searches for a plugin option. */ struct t_config_option * @@ -75,8 +75,7 @@ plugin_config_search (const char *plugin_name, const char *option_name) } /* - * plugin_config_set_internal: set value for a plugin option (internal function) - * This function should not be called directly. + * Sets value for a plugin option (this function must not be called directly). */ int @@ -105,7 +104,7 @@ plugin_config_set_internal (const char *option, const char *value) } /* - * plugin_config_set: set value for a plugin option (create it if not found) + * Sets value for a plugin option (option is created if not found). */ int @@ -132,8 +131,7 @@ plugin_config_set (const char *plugin_name, const char *option_name, } /* - * plugin_config_desc_changed_cb: called when description of an option is - * changed + * Callback for changes on a description option. */ void @@ -160,9 +158,8 @@ plugin_config_desc_changed_cb (void *data, struct t_config_option *option) } /* - * plugin_config_set_desc_internal: set description for a plugin option - * (internal function) - * This function should not be called directly. + * Sets description for a plugin option (this function must not be called + * directly). */ void @@ -191,7 +188,7 @@ plugin_config_set_desc_internal (const char *option, const char *value) } /* - * plugin_config_set_desc: set description for a plugin option + * Sets description for a plugin option. */ void @@ -214,7 +211,7 @@ plugin_config_set_desc (const char *plugin_name, const char *option_name, } /* - * plugin_config_reload: reload plugins configuration file + * Reloads plugins configuration file. */ int @@ -227,12 +224,12 @@ plugin_config_reload (void *data, struct t_config_file *config_file) config_file_section_free_options (plugin_config_section_var); config_file_section_free_options (plugin_config_section_desc); - /* reload plugins config file */ + /* reload plugins configuration file */ return config_file_reload (config_file); } /* - * plugin_config_create_option: set plugin option + * Sets a plugin option. */ int @@ -260,7 +257,7 @@ plugin_config_create_option (void *data, struct t_config_file *config_file, } /* - * plugin_config_create_desc: set plugin option description + * Sets a plugin option description. */ int @@ -298,7 +295,7 @@ plugin_config_create_desc (void *data, struct t_config_file *config_file, } /* - * plugin_config_delete_desc: delete plugin option description + * Deletes a plugin option description. */ int @@ -328,7 +325,7 @@ plugin_config_delete_desc (void *data, struct t_config_file *config_file, } /* - * plugin_config_init: init plugins config structure + * Initializes plugins configuration structure. */ void @@ -361,7 +358,7 @@ plugin_config_init () } /* - * plugin_config_read: read plugins configuration file + * Reads plugins configuration file. */ int @@ -371,7 +368,7 @@ plugin_config_read () } /* - * plugin_config_write: write plugins configuration file + * Writes plugins configuration file. */ int @@ -381,13 +378,13 @@ plugin_config_write () } /* - * plugin_config_end: end plugin config + * Ends plugin configuration. */ void plugin_config_end () { - /* free all plugin config options and descriptions */ + /* free all plugin configuration options and descriptions */ config_file_section_free_options (plugin_config_section_var); config_file_section_free_options (plugin_config_section_desc); } diff --git a/src/plugins/plugin-script-api.c b/src/plugins/plugin-script-api.c index 567ae43e5..91c7745a1 100644 --- a/src/plugins/plugin-script-api.c +++ b/src/plugins/plugin-script-api.c @@ -34,7 +34,7 @@ /* - * plugin_script_api_charset_set: set charset for script + * Sets charset for script. */ void @@ -48,8 +48,9 @@ plugin_script_api_charset_set (struct t_plugin_script *script, } /* - * plugin_script_api_config_new: create a new configuration file - * return new configuration file, NULL if error + * Creates a new configuration file. + * + * Returns pointer to new configuration file, NULL if error. */ struct t_config_file * @@ -79,9 +80,9 @@ plugin_script_api_config_new (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_new_section: create a new section in configuration - * file - * return new section, NULL if error + * Creates a new section in configuration file. + * + * Returns pointer to new section, NULL if error. */ struct t_config_section * @@ -188,8 +189,9 @@ plugin_script_api_config_new_section (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_new_option: create a new option in section - * return new option, NULL if error + * Creates a new option in section. + * + * Returns pointer to new option, NULL if error. */ struct t_config_option * @@ -268,7 +270,7 @@ plugin_script_api_config_new_option (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_option_free: free an option in configuration file + * Frees an option in configuration file. */ void @@ -296,8 +298,7 @@ plugin_script_api_config_option_free (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_section_free_options: free all options of a section in - * configuration file + * Frees all option of a section in configuration file. */ void @@ -326,7 +327,7 @@ plugin_script_api_config_section_free_options (struct t_weechat_plugin *weechat_ } /* - * plugin_script_api_config_section_free: free a section in configuration file + * Frees a section in configuration file. */ void @@ -354,7 +355,7 @@ plugin_script_api_config_section_free (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_free: free configuration file + * Frees a configuration file. */ void @@ -382,7 +383,7 @@ plugin_script_api_config_free (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_printf: print a message + * Prints a message. */ void @@ -406,8 +407,7 @@ plugin_script_api_printf (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_printf_date_tags: print a message with optional date and - * tags + * Prints a message with optional date and tags. */ void @@ -434,7 +434,7 @@ plugin_script_api_printf_date_tags (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_printf_y: print a message on a buffer with free content + * Prints a message on a buffer with free content. */ void @@ -459,7 +459,7 @@ plugin_script_api_printf_y (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_log_printf: add a message in WeeChat log file + * Prints a message in WeeChat log file. */ void @@ -483,8 +483,9 @@ plugin_script_api_log_printf (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_command: hook a command - * return new hook, NULL if error + * Hooks a command. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -522,8 +523,9 @@ plugin_script_api_hook_command (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_command_run: hook a command_run - * return new hook, NULL if error + * Hooks a command when it's run by WeeChat. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -557,8 +559,9 @@ plugin_script_api_hook_command_run (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_timer: hook a timer - * return new hook, NULL if error + * Hooks a timer. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -591,8 +594,9 @@ plugin_script_api_hook_timer (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_fd: hook a fd - * return new hook, NULL if error + * Hooks a fd event. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -625,8 +629,9 @@ plugin_script_api_hook_fd (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_process_hashtable: hook a process - * return new hook, NULL if error + * Hooks a process (using fork) with options in hashtable. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -664,8 +669,9 @@ plugin_script_api_hook_process_hashtable (struct t_weechat_plugin *weechat_plugi } /* - * plugin_script_api_hook_process: hook a process - * return new hook, NULL if error + * Hooks a process (using fork). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -687,8 +693,9 @@ plugin_script_api_hook_process (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_connect: hook a connection - * return new hook, NULL if error + * Hooks a connection to a peer (using fork). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -730,8 +737,9 @@ plugin_script_api_hook_connect (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_print: hook a print - * return new hook, NULL if error + * Hooks a message printed by WeeChat. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -771,8 +779,9 @@ plugin_script_api_hook_print (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_signal: hook a signal - * return new hook, NULL if error + * Hooks a signal. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -805,8 +814,9 @@ plugin_script_api_hook_signal (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_hsignal: hook a hsignal - * return new hook, NULL if error + * Hooks a hsignal (signal with hashtable). + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -838,8 +848,9 @@ plugin_script_api_hook_hsignal (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_config: hook a config option - * return new hook, NULL if error + * Hooks a configuration option. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -871,8 +882,9 @@ plugin_script_api_hook_config (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_completion: hook a completion - * return new hook, NULL if error + * Hooks a completion. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -908,8 +920,9 @@ plugin_script_api_hook_completion (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_modifier: hook a modifier - * return new hook, NULL if error + * Hooks a modifier. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -942,8 +955,9 @@ plugin_script_api_hook_modifier (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_info: hook an info - * return new hook, NULL if error + * Hooks an info. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -979,8 +993,9 @@ plugin_script_api_hook_info (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_info_hashtable: hook an info_hashtable - * return new hook, NULL if error + * Hooks an info using hashtable. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1019,8 +1034,9 @@ plugin_script_api_hook_info_hashtable (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_infolist: hook an infolist - * return new hook, NULL if error + * Hooks an infolist. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1059,8 +1075,9 @@ plugin_script_api_hook_infolist (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_hook_focus: hook a focus - * return new hook, NULL if error + * Hooks a focus. + * + * Returns pointer to new hook, NULL if error. */ struct t_hook * @@ -1092,7 +1109,7 @@ plugin_script_api_hook_focus (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_unhook: unhook something + * Unhooks something. */ void @@ -1120,7 +1137,7 @@ plugin_script_api_unhook (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_unhook_all: remove all hooks from a script + * Unhooks everything for a script. */ void @@ -1145,7 +1162,7 @@ plugin_script_api_unhook_all (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_buffer_new: create a new buffer + * Creates a new buffer. */ struct t_gui_buffer * @@ -1204,7 +1221,7 @@ plugin_script_api_buffer_new (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_buffer_close: close a buffer + * Closes a buffer. */ void @@ -1232,7 +1249,9 @@ plugin_script_api_buffer_close (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_bar_item_new: add a new bar item + * Adds a new bar item. + * + * Returns pointer to new bar item, NULL if error. */ struct t_gui_bar_item * @@ -1264,7 +1283,7 @@ plugin_script_api_bar_item_new (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_bar_item_remove: remove a bar item + * Removes a bar item. */ void @@ -1292,7 +1311,7 @@ plugin_script_api_bar_item_remove (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_command: execute a command (simulate user entry) + * Executes a command on a buffer (simulates user entry). */ void @@ -1312,8 +1331,7 @@ plugin_script_api_command (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_get_plugin: get a value of a script option - * format in file is "plugin.script.option" + * Gets value of a script option (format in file is "plugin.script.option"). */ const char * @@ -1340,7 +1358,11 @@ plugin_script_api_config_get_plugin (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_is_set_plugin: check if a script option is set + * Checks if a script option is set. + * + * Returns: + * 1: script option is set + * 0: script option does not exist */ int @@ -1367,8 +1389,7 @@ plugin_script_api_config_is_set_plugin (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_set_plugin: set value of a script config option - * format in file is "plugin.script.option" + * Sets value of a script option (format in file is "plugin.script.option"). */ int @@ -1395,8 +1416,7 @@ plugin_script_api_config_set_plugin (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_config_set_plugin: set value of a script config option - * format in file is "plugin.script.option" + * Sets description of a script option. */ void @@ -1420,8 +1440,7 @@ plugin_script_api_config_set_desc_plugin (struct t_weechat_plugin *weechat_plugi } /* - * plugin_script_api_config_unset_plugin: unset script config option - * format in file is "plugin.script.option" + * Unsets a script option. */ int @@ -1448,8 +1467,11 @@ plugin_script_api_config_unset_plugin (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_api_upgrade_read: read upgrade file - * return 1 if ok, 0 if error + * Reads upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/plugin-script-callback.c b/src/plugins/plugin-script-callback.c index d32296299..d3ca8b8cf 100644 --- a/src/plugins/plugin-script-callback.c +++ b/src/plugins/plugin-script-callback.c @@ -31,7 +31,7 @@ /* - * plugin_script_callback_alloc: allocate a new callback and initializes it + * Allocates a new callback and initializes it. */ struct t_plugin_script_cb * @@ -59,9 +59,9 @@ plugin_script_callback_alloc () } /* - * plugin_script_callback_add: allocate a new callback, initialize it - * (script/function/data) and add it to list - * return pointer to new callback or NULL if error + * Adds a callback to list of callbacks. + * + * Returns pointer to new callback, NULL if error. */ struct t_plugin_script_cb * @@ -93,7 +93,7 @@ plugin_script_callback_add (struct t_plugin_script *script, } /* - * plugin_script_callback_free_data: free data of a script callback + * Frees data of a script callback. */ void @@ -106,7 +106,7 @@ plugin_script_callback_free_data (struct t_plugin_script_cb *script_callback) } /* - * plugin_script_callback_remove: remove a callback from a script + * Removes a callback from a script. */ void @@ -129,7 +129,7 @@ plugin_script_callback_remove (struct t_plugin_script *script, } /* - * plugin_script_callback_remove_all: remove all callbacks from a script + * Removes all callbacks from a script. */ void @@ -142,7 +142,7 @@ plugin_script_callback_remove_all (struct t_plugin_script *script) } /* - * plugin_script_callback_print_log: print callback infos in log (usually for crash dump) + * Prints callbacks in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c index fa5348869..9ca16f430 100644 --- a/src/plugins/plugin-script.c +++ b/src/plugins/plugin-script.c @@ -44,7 +44,7 @@ int script_option_check_license = 0; /* - * plugin_script_config_read: read script configuration + * Reads script configuration. */ void @@ -65,7 +65,7 @@ plugin_script_config_read (struct t_weechat_plugin *weechat_plugin) } /* - * plugin_script_config_cb: callback called when config option is changed + * Callback for changes on configuration option. */ int @@ -81,7 +81,13 @@ plugin_script_config_cb (void *data, const char *option, const char *value) } /* - * plugin_script_init: initialize script plugin + * Initializes script plugin: + * - reads configuration + * - hooks config + * - creates directories in WeeChat home + * - hooks command, completion, hdata, infolist, signals + * - parses arguments + * - auto-loads scripts. */ void @@ -96,7 +102,7 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin, /* read script configuration */ plugin_script_config_read (weechat_plugin); - /* add hook for config option */ + /* add hook for configuration option */ length = strlen (weechat_plugin->name) + 64; string = malloc (length); if (string) @@ -217,9 +223,11 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_valid: check if a script pointer exists - * return 1 if script exists - * 0 if script is not found + * Checks if a script pointer is valid. + * + * Returns: + * 1: script exists + * 0: script is not found */ int @@ -243,9 +251,11 @@ plugin_script_valid (struct t_plugin_script *scripts, } /* - * plugin_script_ptr2str: convert pointer to string for usage in a script - * (any language) - * WARNING: result has to be free() after use + * Converts a pointer to a string for usage in a script. + * + * Returns string with format "0x12345678". + * + * Note: result must be freed after use. */ char * @@ -263,7 +273,9 @@ plugin_script_ptr2str (void *pointer) } /* - * plugin_script_str2ptr: convert string to pointer for usage outside script + * Converts a string to pointer for usage outside a script. + * + * Format of "str_pointer" is "0x12345678". */ void * @@ -304,7 +316,7 @@ invalid: } /* - * plugin_script_auto_load: auto-load all scripts in a directory + * Auto-loads all scripts in a directory. */ void @@ -332,7 +344,9 @@ plugin_script_auto_load (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_search: search a script in list (by registered name) + * Searches for a script by registered name (example: "iset"). + * + * Returns pointer to script, NULL if not found. */ struct t_plugin_script * @@ -353,8 +367,9 @@ plugin_script_search (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_search_by_full_name: search a script in list (by full name, - * for example "weeget.py") + * Searches for a script by full name (example: "iset.pl"). + * + * Returns pointer to script, NULL if not found. */ struct t_plugin_script * @@ -377,7 +392,7 @@ plugin_script_search_by_full_name (struct t_plugin_script *scripts, } /* - * plugin_script_search_path: search path name of a script + * Searches for path name of a script. */ char * @@ -456,7 +471,7 @@ plugin_script_search_path (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_find_pos: find position for a script (for sorting scripts list) + * Searches for position of script in list (to keep list sorted on name). */ struct t_plugin_script * @@ -475,7 +490,7 @@ plugin_script_find_pos (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_insert_sorted: insert a script in list, keeping sort on name + * Inserts a script in list (keeping list sorted on name). */ void @@ -521,7 +536,9 @@ plugin_script_insert_sorted (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_add: add a script to list of scripts + * Adds a script to list of scripts. + * + * Returns pointer to new script, NULL if error. */ struct t_plugin_script * @@ -585,9 +602,8 @@ plugin_script_add (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_set_buffer_callbacks: restore buffers callbacks (input and - * close) for buffers created by script - * plugin + * Restores buffers callbacks (input and close) for buffers created by script + * plugin. */ void @@ -673,8 +689,7 @@ plugin_script_set_buffer_callbacks (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_remove_buffer_callbacks: remove callbacks for a buffer (called - * when a buffer is closed by user) + * Removes callbacks for a buffer (called when a buffer is closed by user). */ void @@ -708,7 +723,7 @@ plugin_script_remove_buffer_callbacks (struct t_plugin_script *scripts, } /* - * plugin_script_remove: remove a script from list of scripts + * Removes a script from list of scripts. */ void @@ -724,7 +739,7 @@ plugin_script_remove (struct t_weechat_plugin *weechat_plugin, for (ptr_script_cb = script->callbacks; ptr_script_cb; ptr_script_cb = ptr_script_cb->next_callback) { - /* free config file */ + /* free configuration file */ if (ptr_script_cb->config_file) { if (weechat_config_boolean (weechat_config_get ("weechat.plugin.save_config_on_unload"))) @@ -804,7 +819,7 @@ plugin_script_remove (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_completion: complete with list of scripts + * Adds list of scripts to completion list. */ void @@ -823,7 +838,7 @@ plugin_script_completion (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_action_add: add script name for a plugin action + * Adds script name for a plugin action. */ void @@ -857,7 +872,7 @@ plugin_script_action_add (char **action_list, const char *name) } /* - * plugin_script_remove_file: remove script file(s) from disk + * Removes script file(s) from disk. */ void @@ -912,15 +927,14 @@ plugin_script_remove_file (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_action_install: install some scripts (using comma separated - * list) - * this function does following tasks: - * 1. unload script (if script is loaded) - * 2. remove script file(s) - * 3. move script file from "install" dir to - * language dir - * 4. make link in autoload dir - * 5. load script + * Installs some scripts (using comma separated list). + * + * This function does following tasks: + * 1. unloads script (if script is loaded) + * 2. removes script file(s) + * 3. moves script file from "install" dir to language dir + * 4. makes link in autoload dir + * 5. loads script. */ void @@ -1043,10 +1057,11 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_action_remove: remove some scripts (using comma separated list) - * this function does following tasks: - * 1. unload script (if script is loaded) - * 2. remove script file(s) + * Removes some scripts (using comma separated list). + * + * This function does following tasks: + * 1. unloads script (if script is loaded) + * 2. removes script file(s). */ void @@ -1099,7 +1114,7 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_display_list: print list of scripts + * Displays list of scripts. */ void @@ -1146,7 +1161,7 @@ plugin_script_display_list (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_display_short_list: print list of scripts on one line + * Displays list of scripts on one line. */ void @@ -1191,7 +1206,7 @@ plugin_script_display_short_list (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_hdata_script: return hdata for script + * Gets hdata for script. */ struct t_hdata * @@ -1226,8 +1241,11 @@ plugin_script_hdata_script (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_add_to_infolist: add a script in an infolist - * return 1 if ok, 0 if error + * Adds a script in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1271,7 +1289,7 @@ plugin_script_add_to_infolist (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_infolist_list_scripts: build infolist with list of scripts + * Builds infolist with list of scripts. */ struct t_infolist * @@ -1325,7 +1343,7 @@ plugin_script_infolist_list_scripts (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_end: end script plugin + * Ends script plugin. */ void @@ -1347,7 +1365,7 @@ plugin_script_end (struct t_weechat_plugin *weechat_plugin, } /* - * plugin_script_print_log: print script infos in log (usually for crash dump) + * Prints scripts in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 0f0fa7faa..63a788dba 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -84,9 +84,11 @@ void plugin_remove (struct t_weechat_plugin *plugin); /* - * plugin_valid: check if a plugin pointer exists - * return 1 if plugin exists - * 0 if plugin is not found + * Checks if a plugin pointer is valid. + * + * Returns: + * 1: plugin exists + * 0: plugin does not exist */ int @@ -109,7 +111,9 @@ plugin_valid (struct t_weechat_plugin *plugin) } /* - * plugin_search: search a plugin by name + * Searches for a plugin by name. + * + * Returns pointer to plugin found, NULL if not found. */ struct t_weechat_plugin * @@ -132,7 +136,7 @@ plugin_search (const char *name) } /* - * plugin_get_name: get name of plugin with a pointer + * Gets name of a plugin with a pointer. */ const char * @@ -144,8 +148,12 @@ plugin_get_name (struct t_weechat_plugin *plugin) } /* - * plugin_check_extension_allowed: check if extension of filename is allowed - * by option "weechat.plugin.extension" + * Checks if extension of filename is allowed by option + * "weechat.plugin.extension". + * + * Returns: + * 1: extension allowed + * 0: extension not allowed */ int @@ -177,11 +185,13 @@ plugin_check_extension_allowed (const char *filename) } /* - * plugin_check_autoload: check if a plugin can be autoloaded or not - * return 1 if plugin can be autoloaded - * 0 if plugin can NOT be autoloaded - * list of autoloaded plugins is set in option - * "weechat.plugin.autoload" + * Checks if a plugin can be autoloaded. + * + * List of autoloaded plugins is set in option "weechat.plugin.autoload". + * + * Returns: + * 1: plugin can be autoloaded + * 0: plugin can not be autoloaded */ int @@ -273,7 +283,7 @@ plugin_check_autoload (const char *filename) } /* - * plugin_find_pos: find position for a plugin (for sorting plugins list) + * Searches for position of plugin (to keep list sorted). */ struct t_weechat_plugin * @@ -291,8 +301,9 @@ plugin_find_pos (struct t_weechat_plugin *plugin) } /* - * plugin_load: load a WeeChat plugin (a dynamic library) - * return: pointer to new WeeChat plugin, NULL if error + * Loads a WeeChat plugin (a dynamic library). + * + * Returns a pointer to new WeeChat plugin, NULL if error. */ struct t_weechat_plugin * @@ -857,8 +868,8 @@ plugin_load (const char *filename, int argc, char **argv) } /* - * plugin_auto_load_file: load a file found by plugin_auto_load, - * but only it this is really a dynamic library + * Loads a file found by function plugin_auto_load, but only if this is really a + * dynamic library. */ void @@ -873,8 +884,7 @@ plugin_auto_load_file (void *args, const char *filename) } /* - * plugin_auto_load: auto-load WeeChat plugins, from user and system - * directories + * Auto-loads WeeChat plugins, from user and system directories. */ void @@ -938,7 +948,7 @@ plugin_auto_load (int argc, char **argv) } /* - * plugin_remove: remove a WeeChat plugin + * Removes a WeeChat plugin. */ void @@ -973,7 +983,7 @@ plugin_remove (struct t_weechat_plugin *plugin) if (plugin->next_plugin) (plugin->next_plugin)->prev_plugin = plugin->prev_plugin; - /* remove all config files */ + /* remove all configuration files */ config_file_free_all_plugin (plugin); /* remove all hooks */ @@ -1012,7 +1022,7 @@ plugin_remove (struct t_weechat_plugin *plugin) } /* - * plugin_unload: unload a WeeChat plugin + * Unloads a WeeChat plugin. */ void @@ -1041,7 +1051,7 @@ plugin_unload (struct t_weechat_plugin *plugin) } /* - * plugin_unload_name: unload a WeeChat plugin by name + * Unloads a WeeChat plugin by name. */ void @@ -1062,7 +1072,7 @@ plugin_unload_name (const char *name) } /* - * plugin_unload_all: unload all WeeChat plugins + * Unloads all WeeChat plugins. */ void @@ -1086,7 +1096,7 @@ plugin_unload_all () } /* - * plugin_reload_name: reload a WeeChat plugin by name + * Reloads a WeeChat plugin by name. */ void @@ -1116,7 +1126,7 @@ plugin_reload_name (const char *name, int argc, char **argv) } /* - * plugin_display_short_list: print list of plugins on one line + * Displays list of loaded plugins on one line. */ void @@ -1167,7 +1177,7 @@ plugin_display_short_list () } /* - * plugin_init: init plugin support + * Initializes plugin support. */ void @@ -1191,13 +1201,13 @@ plugin_init (int auto_load, int argc, char *argv[]) } /* - * plugin_end: end plugin support + * Ends plugin support. */ void plugin_end () { - /* write plugins config options */ + /* write plugins configuration options */ plugin_config_write (); /* unload all plugins */ @@ -1208,7 +1218,7 @@ plugin_end () } /* - * plugin_hdata_plugin_cb: return hdata for plugin + * Gets hdata for plugin. */ struct t_hdata * @@ -1241,8 +1251,11 @@ plugin_hdata_plugin_cb (void *data, const char *hdata_name) } /* - * plugin_add_to_infolist: add a plugin in an infolist - * return 1 if ok, 0 if error + * Adds a plugin in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1287,7 +1300,7 @@ plugin_add_to_infolist (struct t_infolist *infolist, } /* - * plugin_print_log: print plugin infos in log (usually for crash dump) + * Prints plugins in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c index f450f556b..a11e82712 100644 --- a/src/plugins/python/weechat-python-api.c +++ b/src/plugins/python/weechat-python-api.c @@ -84,7 +84,7 @@ /* - * weechat_python_api_register: startup function for all WeeChat Python scripts + * Registers a python script. */ static PyObject * @@ -155,8 +155,10 @@ weechat_python_api_register (PyObject *self, PyObject *args) } /* - * weechat_python_api_plugin_get_name: get name of plugin (return "core" for - * WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ static PyObject * @@ -175,10 +177,6 @@ weechat_python_api_plugin_get_name (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_charset_set: set script charset - */ - static PyObject * weechat_python_api_charset_set (PyObject *self, PyObject *args) { @@ -195,10 +193,6 @@ weechat_python_api_charset_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_iconv_to_internal: convert string to internal WeeChat charset - */ - static PyObject * weechat_python_api_iconv_to_internal (PyObject *self, PyObject *args) { @@ -216,11 +210,6 @@ weechat_python_api_iconv_to_internal (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_iconv_from_internal: convert string from WeeChat internal - * charset to another one - */ - static PyObject * weechat_python_api_iconv_from_internal (PyObject *self, PyObject *args) { @@ -238,10 +227,6 @@ weechat_python_api_iconv_from_internal (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_gettext: get translated string - */ - static PyObject * weechat_python_api_gettext (PyObject *self, PyObject *args) { @@ -258,10 +243,6 @@ weechat_python_api_gettext (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_ngettext: get translated string with plural form - */ - static PyObject * weechat_python_api_ngettext (PyObject *self, PyObject *args) { @@ -281,12 +262,6 @@ weechat_python_api_ngettext (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other - * "*" are allowed inside mask - */ - static PyObject * weechat_python_api_string_match (PyObject *self, PyObject *args) { @@ -305,14 +280,6 @@ weechat_python_api_string_match (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_string_has_highlight: return 1 if string contains a - * highlight (using list of words to - * highlight) - * return 0 if no highlight is found - * in string - */ - static PyObject * weechat_python_api_string_has_highlight (PyObject *self, PyObject *args) { @@ -330,14 +297,6 @@ weechat_python_api_string_has_highlight (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_string_has_highlight_regex: return 1 if string contains a - * highlight (using regular - * expression) - * return 0 if no highlight is - * found in string - */ - static PyObject * weechat_python_api_string_has_highlight_regex (PyObject *self, PyObject *args) { @@ -355,13 +314,6 @@ weechat_python_api_string_has_highlight_regex (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_string_mask_to_regex: convert a mask (string with only - * "*" as wildcard) to a regex, paying - * attention to special chars in a - * regex - */ - static PyObject * weechat_python_api_string_mask_to_regex (PyObject *self, PyObject *args) { @@ -378,11 +330,6 @@ weechat_python_api_string_mask_to_regex (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_string_remove_color: remove WeeChat color codes from - * string - */ - static PyObject * weechat_python_api_string_remove_color (PyObject *self, PyObject *args) { @@ -400,11 +347,6 @@ weechat_python_api_string_remove_color (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_string_is_command_char: check if first char of string is - * a command char - */ - static PyObject * weechat_python_api_string_is_command_char (PyObject *self, PyObject *args) { @@ -421,12 +363,6 @@ weechat_python_api_string_is_command_char (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_string_input_for_buffer: return string with input text - * for buffer or empty string if - * it's a command - */ - static PyObject * weechat_python_api_string_input_for_buffer (PyObject *self, PyObject *args) { @@ -443,11 +379,6 @@ weechat_python_api_string_input_for_buffer (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_string_eval_expression: evaluate expression and return - * result - */ - static PyObject * weechat_python_api_string_eval_expression (PyObject *self, PyObject *args) { @@ -480,10 +411,6 @@ weechat_python_api_string_eval_expression (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_mkdir_home: create a directory in WeeChat home - */ - static PyObject * weechat_python_api_mkdir_home (PyObject *self, PyObject *args) { @@ -502,10 +429,6 @@ weechat_python_api_mkdir_home (PyObject *self, PyObject *args) API_RETURN_ERROR; } -/* - * weechat_python_api_mkdir: create a directory - */ - static PyObject * weechat_python_api_mkdir (PyObject *self, PyObject *args) { @@ -524,11 +447,6 @@ weechat_python_api_mkdir (PyObject *self, PyObject *args) API_RETURN_ERROR; } -/* - * weechat_python_api_mkdir_parents: create a directory and make parent - * directories as needed - */ - static PyObject * weechat_python_api_mkdir_parents (PyObject *self, PyObject *args) { @@ -547,10 +465,6 @@ weechat_python_api_mkdir_parents (PyObject *self, PyObject *args) API_RETURN_ERROR; } -/* - * weechat_python_api_list_new: create a new list - */ - static PyObject * weechat_python_api_list_new (PyObject *self, PyObject *args) { @@ -567,10 +481,6 @@ weechat_python_api_list_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_add: add a string to list - */ - static PyObject * weechat_python_api_list_add (PyObject *self, PyObject *args) { @@ -593,10 +503,6 @@ weechat_python_api_list_add (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_search: search a string in list - */ - static PyObject * weechat_python_api_list_search (PyObject *self, PyObject *args) { @@ -615,10 +521,6 @@ weechat_python_api_list_search (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_search_pos: search position of a string in list - */ - static PyObject * weechat_python_api_list_search_pos (PyObject *self, PyObject *args) { @@ -636,10 +538,6 @@ weechat_python_api_list_search_pos (PyObject *self, PyObject *args) API_RETURN_INT(pos); } -/* - * weechat_python_api_list_casesearch: search a string in list (ignore case) - */ - static PyObject * weechat_python_api_list_casesearch (PyObject *self, PyObject *args) { @@ -658,11 +556,6 @@ weechat_python_api_list_casesearch (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_casesearch_pos: search position of a string in list - * (ignore case) - */ - static PyObject * weechat_python_api_list_casesearch_pos (PyObject *self, PyObject *args) { @@ -680,10 +573,6 @@ weechat_python_api_list_casesearch_pos (PyObject *self, PyObject *args) API_RETURN_INT(pos); } -/* - * weechat_python_api_list_get: get item by position - */ - static PyObject * weechat_python_api_list_get (PyObject *self, PyObject *args) { @@ -702,10 +591,6 @@ weechat_python_api_list_get (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_set: set new value for item - */ - static PyObject * weechat_python_api_list_set (PyObject *self, PyObject *args) { @@ -723,10 +608,6 @@ weechat_python_api_list_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_list_next: get next item - */ - static PyObject * weechat_python_api_list_next (PyObject *self, PyObject *args) { @@ -743,10 +624,6 @@ weechat_python_api_list_next (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_prev: get previous item - */ - static PyObject * weechat_python_api_list_prev (PyObject *self, PyObject *args) { @@ -763,10 +640,6 @@ weechat_python_api_list_prev (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_list_string: get string value of item - */ - static PyObject * weechat_python_api_list_string (PyObject *self, PyObject *args) { @@ -783,10 +656,6 @@ weechat_python_api_list_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_list_size: get number of elements in list - */ - static PyObject * weechat_python_api_list_size (PyObject *self, PyObject *args) { @@ -803,10 +672,6 @@ weechat_python_api_list_size (PyObject *self, PyObject *args) API_RETURN_INT(size); } -/* - * weechat_python_api_list_remove: remove item from list - */ - static PyObject * weechat_python_api_list_remove (PyObject *self, PyObject *args) { @@ -824,10 +689,6 @@ weechat_python_api_list_remove (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_list_remove_all: remove all items from list - */ - static PyObject * weechat_python_api_list_remove_all (PyObject *self, PyObject *args) { @@ -843,10 +704,6 @@ weechat_python_api_list_remove_all (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_list_free: free list - */ - static PyObject * weechat_python_api_list_free (PyObject *self, PyObject *args) { @@ -862,10 +719,6 @@ weechat_python_api_list_free (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_reload_cb: callback for config reload - */ - int weechat_python_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -903,10 +756,6 @@ weechat_python_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat_python_api_config_new: create a new configuration file - */ - static PyObject * weechat_python_api_config_new (PyObject *self, PyObject *args) { @@ -930,10 +779,6 @@ weechat_python_api_config_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_read_cb: callback for reading option in section - */ - int weechat_python_api_config_read_cb (void *data, struct t_config_file *config_file, @@ -978,10 +823,6 @@ weechat_python_api_config_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_python_api_config_section_write_cb: callback for writing section - */ - int weechat_python_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -1021,11 +862,6 @@ weechat_python_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_python_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_python_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -1065,10 +901,6 @@ weechat_python_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_python_api_config_section_create_option_cb: callback to create an option - */ - int weechat_python_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1114,10 +946,6 @@ weechat_python_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_python_api_config_section_delete_option_cb: callback to delete an option - */ - int weechat_python_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1163,10 +991,6 @@ weechat_python_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat_python_api_config_new_section: create a new section in configuration file - */ - static PyObject * weechat_python_api_config_new_section (PyObject *self, PyObject *args) { @@ -1226,10 +1050,6 @@ weechat_python_api_config_new_section (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_search_section: search section in configuration file - */ - static PyObject * weechat_python_api_config_search_section (PyObject *self, PyObject *args) { @@ -1248,11 +1068,6 @@ weechat_python_api_config_search_section (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_option_check_cb: callback for checking new value - * for option - */ - int weechat_python_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1292,10 +1107,6 @@ weechat_python_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_python_api_config_option_change_cb: callback for option changed - */ - void weechat_python_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1325,10 +1136,6 @@ weechat_python_api_config_option_change_cb (void *data, } } -/* - * weechat_python_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_python_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1358,10 +1165,6 @@ weechat_python_api_config_option_delete_cb (void *data, } } -/* - * weechat_python_api_config_new_option: create a new option in section - */ - static PyObject * weechat_python_api_config_new_option (PyObject *self, PyObject *args) { @@ -1421,10 +1224,6 @@ weechat_python_api_config_new_option (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_search_option: search option in configuration file or section - */ - static PyObject * weechat_python_api_config_search_option (PyObject *self, PyObject *args) { @@ -1445,10 +1244,6 @@ weechat_python_api_config_search_option (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_string_to_boolean: return boolean value of a string - */ - static PyObject * weechat_python_api_config_string_to_boolean (PyObject *self, PyObject *args) { @@ -1465,10 +1260,6 @@ weechat_python_api_config_string_to_boolean (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_option_reset: reset an option with default value - */ - static PyObject * weechat_python_api_config_option_reset (PyObject *self, PyObject *args) { @@ -1487,10 +1278,6 @@ weechat_python_api_config_option_reset (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_option_set: set new value for option - */ - static PyObject * weechat_python_api_config_option_set (PyObject *self, PyObject *args) { @@ -1511,11 +1298,6 @@ weechat_python_api_config_option_set (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_option_set_null: set null (undefined) value for - * option - */ - static PyObject * weechat_python_api_config_option_set_null (PyObject *self, PyObject *args) { @@ -1534,10 +1316,6 @@ weechat_python_api_config_option_set_null (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_option_unset: unset an option - */ - static PyObject * weechat_python_api_config_option_unset (PyObject *self, PyObject *args) { @@ -1554,10 +1332,6 @@ weechat_python_api_config_option_unset (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_option_rename: rename an option - */ - static PyObject * weechat_python_api_config_option_rename (PyObject *self, PyObject *args) { @@ -1575,10 +1349,6 @@ weechat_python_api_config_option_rename (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_option_is_null: return 1 if value of option is null - */ - static PyObject * weechat_python_api_config_option_is_null (PyObject *self, PyObject *args) { @@ -1595,11 +1365,6 @@ weechat_python_api_config_option_is_null (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_option_default_is_null: return 1 if default value - * of option is null - */ - static PyObject * weechat_python_api_config_option_default_is_null (PyObject *self, PyObject *args) { @@ -1616,10 +1381,6 @@ weechat_python_api_config_option_default_is_null (PyObject *self, PyObject *args API_RETURN_INT(value); } -/* - * weechat_python_api_config_boolean: return boolean value of option - */ - static PyObject * weechat_python_api_config_boolean (PyObject *self, PyObject *args) { @@ -1636,10 +1397,6 @@ weechat_python_api_config_boolean (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_boolean_default: return default boolean value of option - */ - static PyObject * weechat_python_api_config_boolean_default (PyObject *self, PyObject *args) { @@ -1656,10 +1413,6 @@ weechat_python_api_config_boolean_default (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_integer: return integer value of option - */ - static PyObject * weechat_python_api_config_integer (PyObject *self, PyObject *args) { @@ -1676,10 +1429,6 @@ weechat_python_api_config_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_integer_default: return default integer value of option - */ - static PyObject * weechat_python_api_config_integer_default (PyObject *self, PyObject *args) { @@ -1696,10 +1445,6 @@ weechat_python_api_config_integer_default (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_config_string: return string value of option - */ - static PyObject * weechat_python_api_config_string (PyObject *self, PyObject *args) { @@ -1716,10 +1461,6 @@ weechat_python_api_config_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_config_string_default: return default string value of option - */ - static PyObject * weechat_python_api_config_string_default (PyObject *self, PyObject *args) { @@ -1736,10 +1477,6 @@ weechat_python_api_config_string_default (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_config_color: return color value of option - */ - static PyObject * weechat_python_api_config_color (PyObject *self, PyObject *args) { @@ -1756,10 +1493,6 @@ weechat_python_api_config_color (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_config_color_default: return default color value of option - */ - static PyObject * weechat_python_api_config_color_default (PyObject *self, PyObject *args) { @@ -1776,10 +1509,6 @@ weechat_python_api_config_color_default (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_config_write_option: write an option in configuration file - */ - static PyObject * weechat_python_api_config_write_option (PyObject *self, PyObject *args) { @@ -1797,10 +1526,6 @@ weechat_python_api_config_write_option (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_write_line: write a line in configuration file - */ - static PyObject * weechat_python_api_config_write_line (PyObject *self, PyObject *args) { @@ -1821,10 +1546,6 @@ weechat_python_api_config_write_line (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_write: write configuration file - */ - static PyObject * weechat_python_api_config_write (PyObject *self, PyObject *args) { @@ -1841,10 +1562,6 @@ weechat_python_api_config_write (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_read: read configuration file - */ - static PyObject * weechat_python_api_config_read (PyObject *self, PyObject *args) { @@ -1861,10 +1578,6 @@ weechat_python_api_config_read (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_reload: reload configuration file - */ - static PyObject * weechat_python_api_config_reload (PyObject *self, PyObject *args) { @@ -1881,10 +1594,6 @@ weechat_python_api_config_reload (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_option_free: free an option in configuration file - */ - static PyObject * weechat_python_api_config_option_free (PyObject *self, PyObject *args) { @@ -1902,11 +1611,6 @@ weechat_python_api_config_option_free (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_section_free_options: free all options of a section - * in configuration file - */ - static PyObject * weechat_python_api_config_section_free_options (PyObject *self, PyObject *args) { @@ -1924,10 +1628,6 @@ weechat_python_api_config_section_free_options (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_section_free: free section in configuration file - */ - static PyObject * weechat_python_api_config_section_free (PyObject *self, PyObject *args) { @@ -1945,10 +1645,6 @@ weechat_python_api_config_section_free (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_free: free configuration file - */ - static PyObject * weechat_python_api_config_free (PyObject *self, PyObject *args) { @@ -1966,10 +1662,6 @@ weechat_python_api_config_free (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_get: get config option - */ - static PyObject * weechat_python_api_config_get (PyObject *self, PyObject *args) { @@ -1986,10 +1678,6 @@ weechat_python_api_config_get (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_config_get_plugin: get value of a plugin option - */ - static PyObject * weechat_python_api_config_get_plugin (PyObject *self, PyObject *args) { @@ -2008,10 +1696,6 @@ weechat_python_api_config_get_plugin (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_config_is_set_plugin: check if a plugin option is set - */ - static PyObject * weechat_python_api_config_is_set_plugin (PyObject *self, PyObject *args) { @@ -2030,10 +1714,6 @@ weechat_python_api_config_is_set_plugin (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_set_plugin: set value of a plugin option - */ - static PyObject * weechat_python_api_config_set_plugin (PyObject *self, PyObject *args) { @@ -2054,10 +1734,6 @@ weechat_python_api_config_set_plugin (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_config_set_desc_plugin: set description of a plugin option - */ - static PyObject * weechat_python_api_config_set_desc_plugin (PyObject *self, PyObject *args) { @@ -2077,10 +1753,6 @@ weechat_python_api_config_set_desc_plugin (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_config_unset_plugin: unset plugin option - */ - static PyObject * weechat_python_api_config_unset_plugin (PyObject *self, PyObject *args) { @@ -2099,10 +1771,6 @@ weechat_python_api_config_unset_plugin (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_key_bind: bind key(s) - */ - static PyObject * weechat_python_api_key_bind (PyObject *self, PyObject *args) { @@ -2130,10 +1798,6 @@ weechat_python_api_key_bind (PyObject *self, PyObject *args) API_RETURN_INT(num_keys); } -/* - * weechat_python_api_key_unbind: unbind key(s) - */ - static PyObject * weechat_python_api_key_unbind (PyObject *self, PyObject *args) { @@ -2151,10 +1815,6 @@ weechat_python_api_key_unbind (PyObject *self, PyObject *args) API_RETURN_INT(num_keys); } -/* - * weechat_python_api_prefix: get a prefix, used for display - */ - static PyObject * weechat_python_api_prefix (PyObject *self, PyObject *args) { @@ -2171,10 +1831,6 @@ weechat_python_api_prefix (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_color: get a color code, used for display - */ - static PyObject * weechat_python_api_color (PyObject *self, PyObject *args) { @@ -2191,10 +1847,6 @@ weechat_python_api_color (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_prnt: print message in a buffer - */ - static PyObject * weechat_python_api_prnt (PyObject *self, PyObject *args) { @@ -2214,11 +1866,6 @@ weechat_python_api_prnt (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_prnt_date_tags: print message in a buffer with optional - * date and tags - */ - static PyObject * weechat_python_api_prnt_date_tags (PyObject *self, PyObject *args) { @@ -2243,10 +1890,6 @@ weechat_python_api_prnt_date_tags (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_prnt_y: print message in a buffer with free content - */ - static PyObject * weechat_python_api_prnt_y (PyObject *self, PyObject *args) { @@ -2269,10 +1912,6 @@ weechat_python_api_prnt_y (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_log_print: print message in WeeChat log file - */ - static PyObject * weechat_python_api_log_print (PyObject *self, PyObject *args) { @@ -2290,10 +1929,6 @@ weechat_python_api_log_print (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_hook_command_cb: callback for command hooked - */ - int weechat_python_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2335,10 +1970,6 @@ weechat_python_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_command: hook a command - */ - static PyObject * weechat_python_api_hook_command (PyObject *self, PyObject *args) { @@ -2372,10 +2003,6 @@ weechat_python_api_hook_command (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_python_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2414,10 +2041,6 @@ weechat_python_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_command_run: hook a command_run - */ - static PyObject * weechat_python_api_hook_command_run (PyObject *self, PyObject *args) { @@ -2441,10 +2064,6 @@ weechat_python_api_hook_command_run (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_timer_cb: callback for timer hooked - */ - int weechat_python_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2482,10 +2101,6 @@ weechat_python_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_timer: hook a timer - */ - static PyObject * weechat_python_api_hook_timer (PyObject *self, PyObject *args) { @@ -2515,10 +2130,6 @@ weechat_python_api_hook_timer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_fd_cb: callback for fd hooked - */ - int weechat_python_api_hook_fd_cb (void *data, int fd) { @@ -2555,10 +2166,6 @@ weechat_python_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_fd: hook a fd - */ - static PyObject * weechat_python_api_hook_fd (PyObject *self, PyObject *args) { @@ -2590,10 +2197,6 @@ weechat_python_api_hook_fd (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_process_cb: callback for process hooked - */ - int weechat_python_api_hook_process_cb (void *data, const char *command, int return_code, @@ -2637,10 +2240,6 @@ weechat_python_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_process: hook a process - */ - static PyObject * weechat_python_api_hook_process (PyObject *self, PyObject *args) { @@ -2667,11 +2266,6 @@ weechat_python_api_hook_process (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_process_hashtable: hook a process with options in - * a hashtable - */ - static PyObject * weechat_python_api_hook_process_hashtable (PyObject *self, PyObject *args) { @@ -2710,10 +2304,6 @@ weechat_python_api_hook_process_hashtable (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_connect_cb: callback for connect hooked - */ - int weechat_python_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -2758,10 +2348,6 @@ weechat_python_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_connect: hook a connection - */ - static PyObject * weechat_python_api_hook_connect (PyObject *self, PyObject *args) { @@ -2801,10 +2387,6 @@ weechat_python_api_hook_connect (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_print_cb: callback for print hooked - */ - int weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -2865,10 +2447,6 @@ weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_print: hook a print - */ - static PyObject * weechat_python_api_hook_print (PyObject *self, PyObject *args) { @@ -2900,10 +2478,6 @@ weechat_python_api_hook_print (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_signal_cb: callback for signal hooked - */ - int weechat_python_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -2960,10 +2534,6 @@ weechat_python_api_hook_signal_cb (void *data, const char *signal, const char *t return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_signal: hook a signal - */ - static PyObject * weechat_python_api_hook_signal (PyObject *self, PyObject *args) { @@ -2987,10 +2557,6 @@ weechat_python_api_hook_signal (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_signal_send: send a signal - */ - static PyObject * weechat_python_api_hook_signal_send (PyObject *self, PyObject *args) { @@ -3029,10 +2595,6 @@ weechat_python_api_hook_signal_send (PyObject *self, PyObject *args) API_RETURN_ERROR; } -/* - * weechat_python_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_python_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -3073,10 +2635,6 @@ weechat_python_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_hsignal: hook a hsignal - */ - static PyObject * weechat_python_api_hook_hsignal (PyObject *self, PyObject *args) { @@ -3100,10 +2658,6 @@ weechat_python_api_hook_hsignal (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_hsignal_send: send a hsignal - */ - static PyObject * weechat_python_api_hook_hsignal_send (PyObject *self, PyObject *args) { @@ -3130,10 +2684,6 @@ weechat_python_api_hook_hsignal_send (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_hook_config_cb: callback for config option hooked - */ - int weechat_python_api_hook_config_cb (void *data, const char *option, const char *value) { @@ -3169,10 +2719,6 @@ weechat_python_api_hook_config_cb (void *data, const char *option, const char *v return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_config: hook a config option - */ - static PyObject * weechat_python_api_hook_config (PyObject *self, PyObject *args) { @@ -3196,10 +2742,6 @@ weechat_python_api_hook_config (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_completion_cb: callback for completion hooked - */ - int weechat_python_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3242,10 +2784,6 @@ weechat_python_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_hook_completion: hook a completion - */ - static PyObject * weechat_python_api_hook_completion (PyObject *self, PyObject *args) { @@ -3272,10 +2810,6 @@ weechat_python_api_hook_completion (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_completion_list_add: add a word to list for a completion - */ - static PyObject * weechat_python_api_hook_completion_list_add (PyObject *self, PyObject *args) { @@ -3299,10 +2833,6 @@ weechat_python_api_hook_completion_list_add (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_python_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, const char *string) @@ -3329,10 +2859,6 @@ weechat_python_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat_python_api_hook_modifier: hook a modifier - */ - static PyObject * weechat_python_api_hook_modifier (PyObject *self, PyObject *args) { @@ -3356,10 +2882,6 @@ weechat_python_api_hook_modifier (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_modifier_exec: execute a modifier hook - */ - static PyObject * weechat_python_api_hook_modifier_exec (PyObject *self, PyObject *args) { @@ -3378,10 +2900,6 @@ weechat_python_api_hook_modifier_exec (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_info_cb: callback for info hooked - */ - const char * weechat_python_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3407,10 +2925,6 @@ weechat_python_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_python_api_hook_info: hook an info - */ - static PyObject * weechat_python_api_hook_info (PyObject *self, PyObject *args) { @@ -3439,10 +2953,6 @@ weechat_python_api_hook_info (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_python_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3476,10 +2986,6 @@ weechat_python_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_python_api_hook_info_hashtable: hook an info_hashtable - */ - static PyObject * weechat_python_api_hook_info_hashtable (PyObject *self, PyObject *args) { @@ -3512,10 +3018,6 @@ weechat_python_api_hook_info_hashtable (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_python_api_hook_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -3548,10 +3050,6 @@ weechat_python_api_hook_infolist_cb (void *data, const char *infolist_name, return NULL; } -/* - * weechat_python_api_hook_infolist: hook an infolist - */ - static PyObject * weechat_python_api_hook_infolist (PyObject *self, PyObject *args) { @@ -3584,10 +3082,6 @@ weechat_python_api_hook_infolist (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_python_api_hook_focus_cb (void *data, struct t_hashtable *info) @@ -3619,10 +3113,6 @@ weechat_python_api_hook_focus_cb (void *data, return NULL; } -/* - * weechat_python_api_hook_focus: hook a focus - */ - static PyObject * weechat_python_api_hook_focus (PyObject *self, PyObject *args) { @@ -3646,10 +3136,6 @@ weechat_python_api_hook_focus (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_unhook: unhook something - */ - static PyObject * weechat_python_api_unhook (PyObject *self, PyObject *args) { @@ -3667,10 +3153,6 @@ weechat_python_api_unhook (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_unhook_all: unhook all for script - */ - static PyObject * weechat_python_api_unhook_all (PyObject *self, PyObject *args) { @@ -3684,10 +3166,6 @@ weechat_python_api_unhook_all (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_python_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -3725,10 +3203,6 @@ weechat_python_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_buffer_close_cb: callback for buffer closed - */ - int weechat_python_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -3764,10 +3238,6 @@ weechat_python_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_buffer_new: create a new buffer - */ - static PyObject * weechat_python_api_buffer_new (PyObject *self, PyObject *args) { @@ -3798,10 +3268,6 @@ weechat_python_api_buffer_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_buffer_search: search a buffer - */ - static PyObject * weechat_python_api_buffer_search (PyObject *self, PyObject *args) { @@ -3820,10 +3286,6 @@ weechat_python_api_buffer_search (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_buffer_search_main: search main buffer (WeeChat core buffer) - */ - static PyObject * weechat_python_api_buffer_search_main (PyObject *self, PyObject *args) { @@ -3840,10 +3302,6 @@ weechat_python_api_buffer_search_main (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_current_buffer: get current buffer - */ - static PyObject * weechat_python_api_current_buffer (PyObject *self, PyObject *args) { @@ -3860,10 +3318,6 @@ weechat_python_api_current_buffer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_buffer_clear: clear a buffer - */ - static PyObject * weechat_python_api_buffer_clear (PyObject *self, PyObject *args) { @@ -3879,10 +3333,6 @@ weechat_python_api_buffer_clear (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_close: close a buffer - */ - static PyObject * weechat_python_api_buffer_close (PyObject *self, PyObject *args) { @@ -3900,10 +3350,6 @@ weechat_python_api_buffer_close (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_merge: merge a buffer to another buffer - */ - static PyObject * weechat_python_api_buffer_merge (PyObject *self, PyObject *args) { @@ -3921,11 +3367,6 @@ weechat_python_api_buffer_merge (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_unmerge: unmerge a buffer from group of merged - * buffers - */ - static PyObject * weechat_python_api_buffer_unmerge (PyObject *self, PyObject *args) { @@ -3943,10 +3384,6 @@ weechat_python_api_buffer_unmerge (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_get_integer: get a buffer property as integer - */ - static PyObject * weechat_python_api_buffer_get_integer (PyObject *self, PyObject *args) { @@ -3964,10 +3401,6 @@ weechat_python_api_buffer_get_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_buffer_get_string: get a buffer property as string - */ - static PyObject * weechat_python_api_buffer_get_string (PyObject *self, PyObject *args) { @@ -3985,10 +3418,6 @@ weechat_python_api_buffer_get_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_buffer_get_pointer: get a buffer property as pointer - */ - static PyObject * weechat_python_api_buffer_get_pointer (PyObject *self, PyObject *args) { @@ -4007,10 +3436,6 @@ weechat_python_api_buffer_get_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_buffer_set: set a buffer property - */ - static PyObject * weechat_python_api_buffer_set (PyObject *self, PyObject *args) { @@ -4030,11 +3455,6 @@ weechat_python_api_buffer_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_buffer_string_replace_local_var: replace local variables ($var) in a string, - * using value of local variables - */ - static PyObject * weechat_python_api_buffer_string_replace_local_var (PyObject *self, PyObject *args) { @@ -4052,11 +3472,6 @@ weechat_python_api_buffer_string_replace_local_var (PyObject *self, PyObject *ar API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_buffer_match_list: return 1 if buffer matches list of - * buffers - */ - static PyObject * weechat_python_api_buffer_match_list (PyObject *self, PyObject *args) { @@ -4074,10 +3489,6 @@ weechat_python_api_buffer_match_list (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_current_window: get current window - */ - static PyObject * weechat_python_api_current_window (PyObject *self, PyObject *args) { @@ -4094,11 +3505,6 @@ weechat_python_api_current_window (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_window_search_with_buffer: search a window with buffer - * pointer - */ - static PyObject * weechat_python_api_window_search_with_buffer (PyObject *self, PyObject *args) { @@ -4115,10 +3521,6 @@ weechat_python_api_window_search_with_buffer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_window_get_integer get a window property as integer - */ - static PyObject * weechat_python_api_window_get_integer (PyObject *self, PyObject *args) { @@ -4136,10 +3538,6 @@ weechat_python_api_window_get_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_window_get_string: get a window property as string - */ - static PyObject * weechat_python_api_window_get_string (PyObject *self, PyObject *args) { @@ -4157,10 +3555,6 @@ weechat_python_api_window_get_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_window_get_pointer: get a window property as pointer - */ - static PyObject * weechat_python_api_window_get_pointer (PyObject *self, PyObject *args) { @@ -4179,10 +3573,6 @@ weechat_python_api_window_get_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_window_set_title: set window title - */ - static PyObject * weechat_python_api_window_set_title (PyObject *self, PyObject *args) { @@ -4198,10 +3588,6 @@ weechat_python_api_window_set_title (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_nicklist_add_group: add a group in nicklist - */ - static PyObject * weechat_python_api_nicklist_add_group (PyObject *self, PyObject *args) { @@ -4228,10 +3614,6 @@ weechat_python_api_nicklist_add_group (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_search_group: search a group in nicklist - */ - static PyObject * weechat_python_api_nicklist_search_group (PyObject *self, PyObject *args) { @@ -4252,10 +3634,6 @@ weechat_python_api_nicklist_search_group (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_add_nick: add a nick in nicklist - */ - static PyObject * weechat_python_api_nicklist_add_nick (PyObject *self, PyObject *args) { @@ -4286,10 +3664,6 @@ weechat_python_api_nicklist_add_nick (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_search_nick: search a nick in nicklist - */ - static PyObject * weechat_python_api_nicklist_search_nick (PyObject *self, PyObject *args) { @@ -4310,10 +3684,6 @@ weechat_python_api_nicklist_search_nick (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_remove_group: remove a group from nicklist - */ - static PyObject * weechat_python_api_nicklist_remove_group (PyObject *self, PyObject *args) { @@ -4331,10 +3701,6 @@ weechat_python_api_nicklist_remove_group (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_nicklist_remove_nick: remove a nick from nicklist - */ - static PyObject * weechat_python_api_nicklist_remove_nick (PyObject *self, PyObject *args) { @@ -4352,10 +3718,6 @@ weechat_python_api_nicklist_remove_nick (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_nicklist_remove_all: remove all groups/nicks from nicklist - */ - static PyObject * weechat_python_api_nicklist_remove_all (PyObject *self, PyObject *args) { @@ -4371,10 +3733,6 @@ weechat_python_api_nicklist_remove_all (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_nicklist_group_get_integer get a group property as integer - */ - static PyObject * weechat_python_api_nicklist_group_get_integer (PyObject *self, PyObject *args) { @@ -4395,10 +3753,6 @@ weechat_python_api_nicklist_group_get_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_nicklist_group_get_string: get a group property as string - */ - static PyObject * weechat_python_api_nicklist_group_get_string (PyObject *self, PyObject *args) { @@ -4419,10 +3773,6 @@ weechat_python_api_nicklist_group_get_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_nicklist_group_get_pointer: get a group property as pointer - */ - static PyObject * weechat_python_api_nicklist_group_get_pointer (PyObject *self, PyObject *args) { @@ -4443,10 +3793,6 @@ weechat_python_api_nicklist_group_get_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_group_set: set a group property - */ - static PyObject * weechat_python_api_nicklist_group_set (PyObject *self, PyObject *args) { @@ -4468,10 +3814,6 @@ weechat_python_api_nicklist_group_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_nicklist_nick_get_integer get a nick property as integer - */ - static PyObject * weechat_python_api_nicklist_nick_get_integer (PyObject *self, PyObject *args) { @@ -4492,10 +3834,6 @@ weechat_python_api_nicklist_nick_get_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_nicklist_nick_get_string: get a nick property as string - */ - static PyObject * weechat_python_api_nicklist_nick_get_string (PyObject *self, PyObject *args) { @@ -4516,10 +3854,6 @@ weechat_python_api_nicklist_nick_get_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_nicklist_nick_get_pointer: get a nick property as pointer - */ - static PyObject * weechat_python_api_nicklist_nick_get_pointer (PyObject *self, PyObject *args) { @@ -4540,10 +3874,6 @@ weechat_python_api_nicklist_nick_get_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_nicklist_nick_set: set a nick property - */ - static PyObject * weechat_python_api_nicklist_nick_set (PyObject *self, PyObject *args) { @@ -4565,10 +3895,6 @@ weechat_python_api_nicklist_nick_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_bar_item_search: search a bar item - */ - static PyObject * weechat_python_api_bar_item_search (PyObject *self, PyObject *args) { @@ -4585,10 +3911,6 @@ weechat_python_api_bar_item_search (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_python_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -4621,10 +3943,6 @@ weechat_python_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat_python_api_bar_item_new: add a new bar item - */ - static PyObject * weechat_python_api_bar_item_new (PyObject *self, PyObject *args) { @@ -4648,10 +3966,6 @@ weechat_python_api_bar_item_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_bar_item_update: update a bar item on screen - */ - static PyObject * weechat_python_api_bar_item_update (PyObject *self, PyObject *args) { @@ -4667,10 +3981,6 @@ weechat_python_api_bar_item_update (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_bar_item_remove: remove a bar item - */ - static PyObject * weechat_python_api_bar_item_remove (PyObject *self, PyObject *args) { @@ -4688,10 +3998,6 @@ weechat_python_api_bar_item_remove (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_bar_search: search a bar - */ - static PyObject * weechat_python_api_bar_search (PyObject *self, PyObject *args) { @@ -4708,10 +4014,6 @@ weechat_python_api_bar_search (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_bar_new: add a new bar - */ - static PyObject * weechat_python_api_bar_new (PyObject *self, PyObject *args) { @@ -4761,10 +4063,6 @@ weechat_python_api_bar_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_bar_set: set a bar property - */ - static PyObject * weechat_python_api_bar_set (PyObject *self, PyObject *args) { @@ -4784,10 +4082,6 @@ weechat_python_api_bar_set (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_bar_update: update a bar on screen - */ - static PyObject * weechat_python_api_bar_update (PyObject *self, PyObject *args) { @@ -4803,10 +4097,6 @@ weechat_python_api_bar_update (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_bar_remove: remove a bar - */ - static PyObject * weechat_python_api_bar_remove (PyObject *self, PyObject *args) { @@ -4822,10 +4112,6 @@ weechat_python_api_bar_remove (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_command: send command to server - */ - static PyObject * weechat_python_api_command (PyObject *self, PyObject *args) { @@ -4845,10 +4131,6 @@ weechat_python_api_command (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_info_get: get info (as string) - */ - static PyObject * weechat_python_api_info_get (PyObject *self, PyObject *args) { @@ -4866,10 +4148,6 @@ weechat_python_api_info_get (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_info_get_hashtable: get info (as hashtable) - */ - static PyObject * weechat_python_api_info_get_hashtable (PyObject *self, PyObject *args) { @@ -4898,10 +4176,6 @@ weechat_python_api_info_get_hashtable (PyObject *self, PyObject *args) return result_dict; } -/* - * weechat_python_api_infolist_new: create new infolist - */ - static PyObject * weechat_python_api_infolist_new (PyObject *self, PyObject *args) { @@ -4917,10 +4191,6 @@ weechat_python_api_infolist_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_new_item: create new item in infolist - */ - static PyObject * weechat_python_api_infolist_new_item (PyObject *self, PyObject *args) { @@ -4937,11 +4207,6 @@ weechat_python_api_infolist_new_item (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_new_var_integer: create new integer variable in - * infolist - */ - static PyObject * weechat_python_api_infolist_new_var_integer (PyObject *self, PyObject *args) { @@ -4963,11 +4228,6 @@ weechat_python_api_infolist_new_var_integer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_new_var_string: create new string variable in - * infolist - */ - static PyObject * weechat_python_api_infolist_new_var_string (PyObject *self, PyObject *args) { @@ -4988,11 +4248,6 @@ weechat_python_api_infolist_new_var_string (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_new_var_pointer: create new pointer variable in - * infolist - */ - static PyObject * weechat_python_api_infolist_new_var_pointer (PyObject *self, PyObject *args) { @@ -5013,11 +4268,6 @@ weechat_python_api_infolist_new_var_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_new_var_time: create new time variable in - * infolist - */ - static PyObject * weechat_python_api_infolist_new_var_time (PyObject *self, PyObject *args) { @@ -5039,10 +4289,6 @@ weechat_python_api_infolist_new_var_time (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_get: get list with infos - */ - static PyObject * weechat_python_api_infolist_get (PyObject *self, PyObject *args) { @@ -5063,10 +4309,6 @@ weechat_python_api_infolist_get (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_next: move item pointer to next item in infolist - */ - static PyObject * weechat_python_api_infolist_next (PyObject *self, PyObject *args) { @@ -5083,10 +4325,6 @@ weechat_python_api_infolist_next (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_infolist_prev: move item pointer to previous item in infolist - */ - static PyObject * weechat_python_api_infolist_prev (PyObject *self, PyObject *args) { @@ -5103,11 +4341,6 @@ weechat_python_api_infolist_prev (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_infolist_reset_item_cursor: reset pointer to current item - * in infolist - */ - static PyObject * weechat_python_api_infolist_reset_item_cursor (PyObject *self, PyObject *args) { @@ -5123,10 +4356,6 @@ weechat_python_api_infolist_reset_item_cursor (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_infolist_fields: get list of fields for current item of infolist - */ - static PyObject * weechat_python_api_infolist_fields (PyObject *self, PyObject *args) { @@ -5143,10 +4372,6 @@ weechat_python_api_infolist_fields (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_infolist_integer: get integer value of a variable in infolist - */ - static PyObject * weechat_python_api_infolist_integer (PyObject *self, PyObject *args) { @@ -5165,10 +4390,6 @@ weechat_python_api_infolist_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_infolist_string: get string value of a variable in infolist - */ - static PyObject * weechat_python_api_infolist_string (PyObject *self, PyObject *args) { @@ -5187,10 +4408,6 @@ weechat_python_api_infolist_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_infolist_pointer: get pointer value of a variable in infolist - */ - static PyObject * weechat_python_api_infolist_pointer (PyObject *self, PyObject *args) { @@ -5209,10 +4426,6 @@ weechat_python_api_infolist_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_time: get time value of a variable in infolist - */ - static PyObject * weechat_python_api_infolist_time (PyObject *self, PyObject *args) { @@ -5238,10 +4451,6 @@ weechat_python_api_infolist_time (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_infolist_free: free infolist - */ - static PyObject * weechat_python_api_infolist_free (PyObject *self, PyObject *args) { @@ -5257,10 +4466,6 @@ weechat_python_api_infolist_free (PyObject *self, PyObject *args) API_RETURN_OK; } -/* - * weechat_python_api_hdata_get: get hdata - */ - static PyObject * weechat_python_api_hdata_get (PyObject *self, PyObject *args) { @@ -5277,10 +4482,6 @@ weechat_python_api_hdata_get (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hdata_get_var_offset: get offset of variable in hdata - */ - static PyObject * weechat_python_api_hdata_get_var_offset (PyObject *self, PyObject *args) { @@ -5298,11 +4499,6 @@ weechat_python_api_hdata_get_var_offset (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_get_var_type_string: get type of variable as string - * in hdata - */ - static PyObject * weechat_python_api_hdata_get_var_type_string (PyObject *self, PyObject *args) { @@ -5320,11 +4516,6 @@ weechat_python_api_hdata_get_var_type_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_hdata_get_var_array_size: get array size for variable in - * hdata - */ - static PyObject * weechat_python_api_hdata_get_var_array_size (PyObject *self, PyObject *args) { @@ -5345,11 +4536,6 @@ weechat_python_api_hdata_get_var_array_size (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_get_var_array_size_string: get array size for variable - * in hdata (as string) - */ - static PyObject * weechat_python_api_hdata_get_var_array_size_string (PyObject *self, PyObject *args) @@ -5371,10 +4557,6 @@ weechat_python_api_hdata_get_var_array_size_string (PyObject *self, API_RETURN_STRING(result); } -/* - * weechat_python_api_hdata_get_var_hdata: get hdata for variable in hdata - */ - static PyObject * weechat_python_api_hdata_get_var_hdata (PyObject *self, PyObject *args) { @@ -5392,10 +4574,6 @@ weechat_python_api_hdata_get_var_hdata (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_hdata_get_list: get list pointer in hdata - */ - static PyObject * weechat_python_api_hdata_get_list (PyObject *self, PyObject *args) { @@ -5414,10 +4592,6 @@ weechat_python_api_hdata_get_list (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hdata_check_pointer: check pointer with hdata/list - */ - static PyObject * weechat_python_api_hdata_check_pointer (PyObject *self, PyObject *args) { @@ -5438,10 +4612,6 @@ weechat_python_api_hdata_check_pointer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_move: move pointer to another element in list - */ - static PyObject * weechat_python_api_hdata_move (PyObject *self, PyObject *args) { @@ -5463,11 +4633,6 @@ weechat_python_api_hdata_move (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hdata_char: get char value of a variable in structure - * using hdata - */ - static PyObject * weechat_python_api_hdata_char (PyObject *self, PyObject *args) { @@ -5488,11 +4653,6 @@ weechat_python_api_hdata_char (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_integer: get integer value of a variable in - * structure using hdata - */ - static PyObject * weechat_python_api_hdata_integer (PyObject *self, PyObject *args) { @@ -5513,11 +4673,6 @@ weechat_python_api_hdata_integer (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_long: get long value of a variable in structure - * using hdata - */ - static PyObject * weechat_python_api_hdata_long (PyObject *self, PyObject *args) { @@ -5538,11 +4693,6 @@ weechat_python_api_hdata_long (PyObject *self, PyObject *args) API_RETURN_LONG(value); } -/* - * weechat_python_api_hdata_string: get string value of a variable in structure - * using hdata - */ - static PyObject * weechat_python_api_hdata_string (PyObject *self, PyObject *args) { @@ -5563,11 +4713,6 @@ weechat_python_api_hdata_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_hdata_pointer: get pointer value of a variable in - * structure using hdata - */ - static PyObject * weechat_python_api_hdata_pointer (PyObject *self, PyObject *args) { @@ -5588,11 +4733,6 @@ weechat_python_api_hdata_pointer (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_hdata_time: get time value of a variable in structure - * using hdata - */ - static PyObject * weechat_python_api_hdata_time (PyObject *self, PyObject *args) { @@ -5613,11 +4753,6 @@ weechat_python_api_hdata_time (PyObject *self, PyObject *args) API_RETURN_LONG(time); } -/* - * weechat_python_api_hdata_hashtable: get hashtable value of a variable in - * structure using hdata - */ - static PyObject * weechat_python_api_hdata_hashtable (PyObject *self, PyObject *args) { @@ -5639,10 +4774,6 @@ weechat_python_api_hdata_hashtable (PyObject *self, PyObject *args) return result_dict; } -/* - * weechat_python_api_hdata_update: updata data in a hdata - */ - static PyObject * weechat_python_api_hdata_update (PyObject *self, PyObject *args) { @@ -5672,10 +4803,6 @@ weechat_python_api_hdata_update (PyObject *self, PyObject *args) API_RETURN_INT(value); } -/* - * weechat_python_api_hdata_get_string: get hdata property as string - */ - static PyObject * weechat_python_api_hdata_get_string (PyObject *self, PyObject *args) { @@ -5693,10 +4820,6 @@ weechat_python_api_hdata_get_string (PyObject *self, PyObject *args) API_RETURN_STRING(result); } -/* - * weechat_python_api_upgrade_new: create an upgrade file - */ - static PyObject * weechat_python_api_upgrade_new (PyObject *self, PyObject *args) { @@ -5715,10 +4838,6 @@ weechat_python_api_upgrade_new (PyObject *self, PyObject *args) API_RETURN_STRING_FREE(result); } -/* - * weechat_python_api_upgrade_write_object: write object in upgrade file - */ - static PyObject * weechat_python_api_upgrade_write_object (PyObject *self, PyObject *args) { @@ -5739,10 +4858,6 @@ weechat_python_api_upgrade_write_object (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_upgrade_read_cb: callback for reading object in upgrade file - */ - int weechat_python_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -5788,10 +4903,6 @@ weechat_python_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_python_api_upgrade_read: read upgrade file - */ - static PyObject * weechat_python_api_upgrade_read (PyObject *self, PyObject *args) { @@ -5815,10 +4926,6 @@ weechat_python_api_upgrade_read (PyObject *self, PyObject *args) API_RETURN_INT(rc); } -/* - * weechat_python_api_upgrade_close: close upgrade file - */ - static PyObject * weechat_python_api_upgrade_close (PyObject *self, PyObject *args) { @@ -5835,7 +4942,7 @@ weechat_python_api_upgrade_close (PyObject *self, PyObject *args) } /* - * Python subroutines + * Initializes python functions. */ PyMethodDef weechat_python_funcs[] = diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index d1a6d4185..244a0b355 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -106,7 +106,7 @@ char python_buffer_output[128]; /* - * weechat_python_set_python2_bin: set path to python 2.x interpreter + * Sets path to python 2.x interpreter. */ void @@ -154,9 +154,9 @@ weechat_python_set_python2_bin () } /* - * weechat_python_unicode_to_string: convert a python unicode to a C UTF-8 - * string - * Note: result has to be freed after use + * Converts a python unicode to a C UTF-8 string. + * + * Note: result must be freed after use. */ char * @@ -179,8 +179,7 @@ weechat_python_unicode_to_string (PyObject *obj) } /* - * weechat_python_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -206,8 +205,7 @@ weechat_python_hashtable_map_cb (void *data, } /* - * weechat_python_hashtable_to_dict: get python dictionary with a WeeChat - * hashtable + * Gets python dictionary with a WeeChat hashtable. */ PyObject * @@ -230,10 +228,9 @@ weechat_python_hashtable_to_dict (struct t_hashtable *hashtable) } /* - * weechat_python_dict_to_hashtable: get WeeChat hashtable with python - * dictionary - * Note: hashtable has to be released after - * use with call to weechat_hashtable_free() + * Gets WeeChat hashtable with python dictionary. + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -297,7 +294,7 @@ weechat_python_dict_to_hashtable (PyObject *dict, int size, } /* - * weechat_python_exec: execute a python function + * Executes a python function. */ void * @@ -429,7 +426,7 @@ weechat_python_exec (struct t_plugin_script *script, } /* - * weechat_python_output: redirection for stdout and stderr + * Redirection for stdout and stderr. */ static PyObject * @@ -485,7 +482,7 @@ weechat_python_output (PyObject *self, PyObject *args) } /* - * weechat_python_init_module_weechat: initialize the "weechat" module + * Initializes the "weechat" module. */ #if PY_MAJOR_VERSION >= 3 @@ -572,7 +569,11 @@ void weechat_python_init_module_weechat () } /* - * weechat_python_load: load a Python script + * Loads a python script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -761,7 +762,7 @@ weechat_python_load (const char *filename) } /* - * weechat_python_load_cb: callback for script_auto_load() function + * Callback for script_auto_load() function. */ void @@ -774,7 +775,7 @@ weechat_python_load_cb (void *data, const char *filename) } /* - * weechat_python_unload: unload a Python script + * Unloads a python script. */ void @@ -827,7 +828,7 @@ weechat_python_unload (struct t_plugin_script *script) } /* - * weechat_python_unload_name: unload a Python script by name + * Unloads a python script by name. */ void @@ -855,7 +856,7 @@ weechat_python_unload_name (const char *name) } /* - * weechat_python_unload_all: unload all Python scripts + * Unloads all python scripts. */ void @@ -868,7 +869,7 @@ weechat_python_unload_all () } /* - * weechat_python_reload_name: reload a Python script by name + * Reloads a python script by name. */ void @@ -903,7 +904,7 @@ weechat_python_reload_name (const char *name) } /* - * weechat_python_cmd: callback for "/python" command + * Callback for command "/python". */ int @@ -975,7 +976,7 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Python script */ + /* load python script */ path_script = plugin_script_search_path (weechat_python_plugin, ptr_name); weechat_python_load ((path_script) ? path_script : ptr_name); @@ -984,12 +985,12 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Python script */ + /* reload one python script */ weechat_python_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Python script */ + /* unload python script */ weechat_python_unload_name (ptr_name); } python_quiet = 0; @@ -1008,7 +1009,7 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_python_completion_cb: callback for script completion + * Adds python scripts to completion list. */ int @@ -1027,7 +1028,7 @@ weechat_python_completion_cb (void *data, const char *completion_item, } /* - * weechat_python_info_cb: callback for info + * Returns python info. */ const char * @@ -1059,7 +1060,7 @@ weechat_python_info_cb (void *data, const char *info_name, } /* - * weechat_python_hdata_cb: callback for hdata + * Returns hdata for python scripts. */ struct t_hdata * @@ -1074,7 +1075,7 @@ weechat_python_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_python_infolist_cb: callback for infolist + * Returns infolist with python scripts. */ struct t_infolist * @@ -1098,8 +1099,7 @@ weechat_python_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_python_signal_debug_dump_cb: dump Python plugin data in WeeChat log - * file + * Dumps python plugin data in WeeChat log file. */ int @@ -1121,8 +1121,7 @@ weechat_python_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_python_signal_buffer_closed_cb: callback called when a buffer is - * closed + * Callback called when a buffer is closed. */ int @@ -1142,7 +1141,7 @@ weechat_python_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_python_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -1176,8 +1175,7 @@ weechat_python_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_python_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -1212,7 +1210,7 @@ weechat_python_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_plugin_init: initialize Python plugin + * Initializes python plugin. */ int @@ -1283,7 +1281,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: shutdown Python interface + * Ends python plugin. */ int @@ -1294,7 +1292,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) plugin_script_end (plugin, &python_scripts, &weechat_python_unload_all); python_quiet = 0; - /* free Python interpreter */ + /* free python interpreter */ if (python_mainThreadState != NULL) { /* PyEval_AcquireLock (); */ diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index 0ea308269..e163069dc 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -45,8 +45,11 @@ char *relay_irc_ignore_commands[] = { "pong", "quit", NULL }; /* - * relay_irc_command_relayed: return 1 if IRC command has to be relayed to - * client, or 0 if command must NOT be relayed + * Checks if IRC command has to be relayed to client. + * + * Returns: + * 1: command must be relayed + * 0: command must not be relayed */ int @@ -68,8 +71,11 @@ relay_irc_command_relayed (const char *irc_command) } /* - * relay_irc_command_ignored: return 1 if IRC command from client has to be - * ignored + * Checks if an IRC command from client must be ignored. + * + * Returns: + * 1: command must be ignored + * 0: command must not be ignored */ int @@ -91,7 +97,9 @@ relay_irc_command_ignored (const char *irc_command) } /* - * relay_irc_message_parse: parse IRC message + * Parses an IRC message. + * + * Returns hashtable with parsed message, NULL if error. */ struct t_hashtable * @@ -133,7 +141,7 @@ end: } /* - * relay_irc_sendf: send formatted data to client + * Sends formatted data to client. */ void @@ -198,10 +206,10 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...) } /* - * relay_irc_signal_irc_in2_cb: callback for "irc_in2" signal - * It is called when something is received on IRC - * server, and message can be relayed (or not) to - * client. + * Callback for signal "irc_in2". + * + * This is called when something is received on IRC server, and message can be + * relayed (or not) to client. */ int @@ -267,11 +275,9 @@ relay_irc_signal_irc_in2_cb (void *data, const char *signal, } /* - * relay_irc_tag_relay_client_id: get id of client by looking for tag - * "relay_client_NNN" in list of tags - * (comma separated list) - * Return number found, or -1 if tag is not - * found. + * Gets id of client by looking for tag "relay_client_NNN" in list of tags (comma separated list). + * + * Returns number found (NNN), -1 if not found. */ int @@ -309,10 +315,10 @@ relay_irc_tag_relay_client_id (const char *tags) } /* - * relay_irc_signal_irc_outtags_cb: callback for "irc_out" signal - * It is called when a message is sent to IRC - * server (by irc plugin or any other - * plugin/script). + * Callback for signal "irc_out". + * + * This is called when a message is sent to IRC server (by irc plugin or any + * other plugin/script). */ int @@ -424,9 +430,9 @@ end: } /* - * relay_irc_signal_irc_disc_cb: callback for "irc_disconnected" signal - * It is called when connection to a server is - * lost. + * Callback for signal "irc_disconnected". + * + * This is called when connection to an IRC server is lost. */ int @@ -451,8 +457,9 @@ relay_irc_signal_irc_disc_cb (void *data, const char *signal, } /* - * relay_irc_hsignal_irc_redir_cb: callback for "irc_redirection_*" hsignals - * It is called when a command is redirected. + * Callback for hsignals "irc_redirection_*". + * + * This is called when an IRC command is redirected. */ int @@ -494,7 +501,7 @@ relay_irc_hsignal_irc_redir_cb (void *data, const char *signal, } /* - * relay_irc_send_join: send join for a channel to client + * Sends IRC "JOIN" for a channel to client. */ void @@ -613,7 +620,7 @@ relay_irc_send_join (struct t_relay_client *client, } /* - * relay_irc_send_join_channels: send join for all channels of server to client + * Sends IRC "JOIN" for all channels of an IRC server to client. */ void @@ -639,7 +646,7 @@ relay_irc_send_join_channels (struct t_relay_client *client) } /* - * relay_irc_input_send: send text or command on an IRC buffer + * Sends text or command on an IRC buffer. */ void @@ -684,7 +691,7 @@ relay_irc_input_send (struct t_relay_client *client, const char *irc_channel, } /* - * relay_irc_hook_signals: hook signals for a client + * Hooks signals for a client. */ void @@ -735,7 +742,7 @@ relay_irc_hook_signals (struct t_relay_client *client) } /* - * relay_irc_recv_one_msg: read one message from client + * Reads one message from client. */ void @@ -1141,7 +1148,7 @@ end: } /* - * relay_irc_recv: read data from client + * Reads data from a client. */ void @@ -1162,7 +1169,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data) } /* - * relay_irc_close_connection: called when connection with client is closed + * Closes connection with client. */ void @@ -1192,7 +1199,7 @@ relay_irc_close_connection (struct t_relay_client *client) } /* - * relay_irc_alloc: init relay data specific to IRC protocol + * Initializes relay data specific to IRC protocol. */ void @@ -1219,8 +1226,9 @@ relay_irc_alloc (struct t_relay_client *client) } /* - * relay_irc_alloc_with_infolist: init relay data specific to IRC protocol - * using an infolist + * Initializes relay data specific to IRC protocol using an infolist. + * + * This is called after /upgrade. */ void @@ -1255,7 +1263,7 @@ relay_irc_alloc_with_infolist (struct t_relay_client *client, } /* - * relay_irc_free: free relay data specific to IRC protocol + * Frees relay data specific to IRC protocol. */ void @@ -1283,8 +1291,11 @@ relay_irc_free (struct t_relay_client *client) } /* - * relay_irc_add_to_infolist: add client irc data in an infolist item - * return 1 if ok, 0 if error + * Adds client IRC data in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1317,7 +1328,7 @@ relay_irc_add_to_infolist (struct t_infolist_item *item, } /* - * relay_irc_print_log: print IRC client infos in log (usually for crash dump) + * Prints client IRC data in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/relay/relay-buffer.c b/src/plugins/relay/relay-buffer.c index f0a32d563..fbd412a8f 100644 --- a/src/plugins/relay/relay-buffer.c +++ b/src/plugins/relay/relay-buffer.c @@ -39,8 +39,7 @@ int relay_buffer_selected_line = 0; /* - * relay_buffer_refresh: update a client in buffer and update hotlist for - * relay buffer + * Updates a client in buffer and updates hotlist for relay buffer. */ void @@ -151,8 +150,7 @@ relay_buffer_refresh (const char *hotlist) } /* - * relay_buffer_input_cb: callback called when user send data to client list - * buffer + * Callback for input data in relay buffer. */ int @@ -215,7 +213,7 @@ relay_buffer_input_cb (void *data, struct t_gui_buffer *buffer, } /* - * relay_buffer_close_cb: callback called when relay buffer is closed + * Callback called when relay buffer is closed. */ int @@ -237,7 +235,7 @@ relay_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * relay_buffer_open: open relay buffer (to display list of clients) + * Opens relay buffer. */ void diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c index aa54c72da..ac5ee65e3 100644 --- a/src/plugins/relay/relay-client.c +++ b/src/plugins/relay/relay-client.c @@ -57,9 +57,11 @@ int relay_client_count = 0; /* number of clients */ /* - * relay_client_valid: check if a client pointer exists - * return 1 if client exists - * 0 if client is not found + * Checks if a client pointer is valid. + * + * Returns: + * 1: client exists + * 0: client does not exist */ int @@ -82,7 +84,9 @@ relay_client_valid (struct t_relay_client *client) } /* - * relay_client_search_by_number: search a client by number (first client is 0) + * Searches for a client by number (first client is 0). + * + * Returns pointer to client found, NULL if not found. */ struct t_relay_client * @@ -105,7 +109,9 @@ relay_client_search_by_number (int number) } /* - * relay_client_search_by_id: search a client by id + * Searches for a client by id. + * + * Returns pointer to client found, NULL if not found. */ struct t_relay_client * @@ -125,7 +131,7 @@ relay_client_search_by_id (int id) } /* - * relay_client_set_desc: set description for client + * Sets description for a client. */ void @@ -149,8 +155,7 @@ relay_client_set_desc (struct t_relay_client *client) } /* - * relay_client_handshake_timer_cb: timer called to do the handshake with the - * client (for SSL connection only) + * Timer callback for handshake with client (for SSL connection only). */ #ifdef HAVE_GNUTLS @@ -214,7 +219,7 @@ relay_client_handshake_timer_cb (void *data, int remaining_calls) #endif /* - * relay_client_recv_cb: read data from a client + * Reads data from a client. */ int @@ -303,7 +308,7 @@ relay_client_recv_cb (void *arg_client, int fd) } /* - * relay_client_outqueue_add: add a message in out queue + * Adds a message in out queue. */ void @@ -338,7 +343,7 @@ relay_client_outqueue_add (struct t_relay_client *client, const char *data, } /* - * relay_client_outqueue_free: free a message in out queue + * Frees a message in out queue. */ void @@ -371,7 +376,7 @@ relay_client_outqueue_free (struct t_relay_client *client, } /* - * relay_client_outqueue_free_all: free all outqueued messages + * Frees all messages in out queue. */ void @@ -384,9 +389,9 @@ relay_client_outqueue_free_all (struct t_relay_client *client) } /* - * relay_client_send: send data to client (add in outqueue if it's impossible - * to send now) - * return number of bytes sent to client + * Sends data to client (adds in out queue if it's impossible to send now). + * + * Returns number of bytes sent to client, -1 if error. */ int @@ -487,8 +492,7 @@ relay_client_send (struct t_relay_client *client, const char *data, } /* - * relay_client_timer_cb: timer called each second to perform some operations - * on clients + * Timer callback, called each second. */ int @@ -618,7 +622,9 @@ relay_client_timer_cb (void *data, int remaining_calls) } /* - * relay_client_new: create a new client + * Creates a new client. + * + * Returns pointer to new client, NULL if error. */ struct t_relay_client * @@ -763,7 +769,9 @@ relay_client_new (int sock, const char *address, struct t_relay_server *server) } /* - * relay_client_new_with_infolist: create a new client using an infolist + * Creates a new client using an infolist. + * + * This is called to restore clients after /upgrade. */ struct t_relay_client * @@ -839,7 +847,7 @@ relay_client_new_with_infolist (struct t_infolist *infolist) } /* - * relay_client_set_status: set status for a client + * Sets status for a client. */ void @@ -912,7 +920,7 @@ relay_client_set_status (struct t_relay_client *client, } /* - * relay_client_free: remove a client + * Removes a client. */ void @@ -976,7 +984,7 @@ relay_client_free (struct t_relay_client *client) } /* - * relay_client_free_all: remove all clients + * Removes all clients. */ void @@ -989,7 +997,7 @@ relay_client_free_all () } /* - * relay_client_disconnect: disconnect one client + * Disconnects one client. */ void @@ -1002,7 +1010,7 @@ relay_client_disconnect (struct t_relay_client *client) } /* - * relay_client_disconnect_all: disconnect from all clients + * Disconnects all clients. */ void @@ -1018,8 +1026,11 @@ relay_client_disconnect_all () } /* - * relay_client_add_to_infolist: add a client in an infolist - * return 1 if ok, 0 if error + * Adds a client in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1093,7 +1104,7 @@ relay_client_add_to_infolist (struct t_infolist *infolist, } /* - * relay_client_print_log: print client infos in log (usually for crash dump) + * Prints clients in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c index 8de921e6e..a530ad32a 100644 --- a/src/plugins/relay/relay-command.c +++ b/src/plugins/relay/relay-command.c @@ -36,7 +36,7 @@ /* - * relay_command_client_list: list clients + * Displays list of clients. */ void @@ -120,8 +120,7 @@ relay_command_client_list (int full) } /* - * relay_command_server_list: list servers (list of port on which we are - * listening) + * Displays list of servers (list of ports on which we are listening). */ void @@ -166,7 +165,7 @@ relay_command_server_list () } /* - * relay_command_relay: command /relay + * Callback for command "/relay". */ int @@ -304,7 +303,7 @@ relay_command_relay (void *data, struct t_gui_buffer *buffer, int argc, } /* - * relay_command_init: add /relay command + * Hooks command. */ void diff --git a/src/plugins/relay/relay-completion.c b/src/plugins/relay/relay-completion.c index 6e5874c6f..fa1bdb9aa 100644 --- a/src/plugins/relay/relay-completion.c +++ b/src/plugins/relay/relay-completion.c @@ -31,8 +31,7 @@ /* - * relay_completion_protocol_name_cb: callback for completion with protocol and - * name + * Adds protocol and name to completion list. */ int @@ -74,8 +73,7 @@ relay_completion_protocol_name_cb (void *data, const char *completion_item, } /* - * relay_completion_relays_cb: callback for completion with protocol and name - * of current relays + * Adds protocol and name of current relays to completion list. */ int @@ -102,7 +100,7 @@ relay_completion_relays_cb (void *data, const char *completion_item, } /* - * relay_completion_free_port_cb: callback for completion with a free port + * Adds free ports to completion list. */ int @@ -137,7 +135,7 @@ relay_completion_free_port_cb (void *data, const char *completion_item, } /* - * relay_completion_init: init completion for relay plugin + * Hooks completions. */ void diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index 33a14666e..12db7d0f6 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -66,8 +66,7 @@ regex_t *relay_config_regex_allowed_ips = NULL; /* - * relay_config_refresh_cb: callback called when user changes relay option that - * needs a refresh of relay list + * Callback for changes on options that require a refresh of relay list. */ void @@ -82,7 +81,7 @@ relay_config_refresh_cb (void *data, struct t_config_option *option) } /* - * relay_config_change_network_allowed_ips: called when allowed ips changes + * Callback for changes on option "relay.network.allowed_ips". */ void @@ -120,9 +119,7 @@ relay_config_change_network_allowed_ips (void *data, } /* - * relay_config_change_network_bind_address_cb: callback called when user - * changes network bind address - * option + * Callback for changes on option "relay.network.bind_address". */ void @@ -144,8 +141,7 @@ relay_config_change_network_bind_address_cb (void *data, } /* - * relay_config_change_network_ipv6_cb: callback called when user changes ipv6 - * option + * Callback for changes on option "relay.network.ipv6". */ void @@ -169,7 +165,7 @@ relay_config_change_network_ipv6_cb (void *data, struct t_config_option *option) } /* - * relay_config_change_network_ssl_cert_key: called when ssl_cert_key is changed + * Callback for changes on option "relay.network.ssl_cert_key". */ void @@ -185,8 +181,11 @@ relay_config_change_network_ssl_cert_key (void *data, } /* - * relay_config_change_port_cb: callback called when relay port option is - * modified + * Checks if a port is valid. + * + * Returns: + * 1: port is valid + * 0: port is not valid */ int @@ -216,8 +215,7 @@ relay_config_check_port_cb (void *data, struct t_config_option *option, } /* - * relay_config_change_port_cb: callback called when relay port option is - * modified + * Callback for changes on options in section "port". */ void @@ -237,8 +235,7 @@ relay_config_change_port_cb (void *data, struct t_config_option *option) } /* - * relay_config_delete_port_cb: callback called when relay port option is - * deleted + * Callback called when an option is deleted in section "port". */ void @@ -255,7 +252,7 @@ relay_config_delete_port_cb (void *data, struct t_config_option *option) } /* - * relay_config_create_option_port: create a relay for a port + * Callback called when an option is created in section "port". */ int @@ -353,7 +350,7 @@ relay_config_create_option_port (void *data, if (relay_server_new (option_name, protocol_number, protocol_args, port, ipv4, ipv6, ssl)) { - /* create config option */ + /* create configuration option */ weechat_config_new_option ( config_file, section, option_name, "integer", NULL, @@ -376,7 +373,7 @@ relay_config_create_option_port (void *data, } /* - * relay_config_reload: reload relay configuration file + * Reloads relay configuration file. */ int @@ -389,8 +386,11 @@ relay_config_reload (void *data, struct t_config_file *config_file) } /* - * relay_config_init: init relay configuration file - * return: 1 if ok, 0 if error + * Initializes relay configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -576,7 +576,7 @@ relay_config_init () } /* - * relay_config_read: read relay configuration file + * Reads relay configuration file. */ int @@ -586,7 +586,7 @@ relay_config_read () } /* - * relay_config_write: write relay configuration file + * Writes relay configuration file. */ int diff --git a/src/plugins/relay/relay-info.c b/src/plugins/relay/relay-info.c index f497d42ed..fdd05fa65 100644 --- a/src/plugins/relay/relay-info.c +++ b/src/plugins/relay/relay-info.c @@ -30,7 +30,7 @@ /* - * relay_info_get_infolist_cb: callback called when relay infolist is asked + * Returns infolist with relay info. */ struct t_infolist * @@ -86,13 +86,12 @@ relay_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * relay_info_init: initialize info and infolist hooks for relay plugin + * Hooks infolist for relay plugin. */ void relay_info_init () { - /* relay infolist hooks */ weechat_hook_infolist ("relay", N_("list of relay clients"), N_("relay pointer (optional)"), NULL, diff --git a/src/plugins/relay/relay-network.c b/src/plugins/relay/relay-network.c index d63ade548..48606f0eb 100644 --- a/src/plugins/relay/relay-network.c +++ b/src/plugins/relay/relay-network.c @@ -44,10 +44,10 @@ gnutls_dh_params_t *relay_gnutls_dh_params = NULL; /* - * relay_network_set_ssl_cert_key: set SSL certificate/key file - * if verbose == 1, a message is displayed if - * successful, otherwise a warning (if no - * cert/key found in file) + * Sets SSL certificate/key file. + * + * If verbose == 1, a message is displayed if successful, otherwise a warning + * (if no cert/key found in file). */ void @@ -106,7 +106,7 @@ relay_network_set_ssl_cert_key (int verbose) } /* - * relay_network_init: init network for relay + * Initializes network for relay. */ void @@ -137,7 +137,7 @@ relay_network_init () } /* - * relay_network_end: end network for relay + * Ends network for relay. */ void diff --git a/src/plugins/relay/relay-raw.c b/src/plugins/relay/relay-raw.c index 2b186c616..b689d7c31 100644 --- a/src/plugins/relay/relay-raw.c +++ b/src/plugins/relay/relay-raw.c @@ -43,7 +43,7 @@ struct t_relay_raw_message *last_relay_raw_message = NULL; /* - * relay_raw_message_print: print a relay raw message + * Prints a relay raw message. */ void @@ -60,7 +60,7 @@ relay_raw_message_print (struct t_relay_raw_message *raw_message) } /* - * relay_raw_open: open Relay raw buffer + * Opens relay raw buffer. */ void @@ -112,7 +112,7 @@ relay_raw_open (int switch_to_buffer) } /* - * relay_raw_message_free: free a raw message and remove it from list + * Frees a raw message and remove it from list. */ void @@ -148,7 +148,7 @@ relay_raw_message_free (struct t_relay_raw_message *raw_message) } /* - * relay_raw_message_free_all: free all raw messages + * Frees all raw messages. */ void @@ -161,8 +161,7 @@ relay_raw_message_free_all () } /* - * relay_raw_message_remove_old: remove old raw messages if limit has been - * reached + * Removes old raw messages if limit has been reached. */ void @@ -178,7 +177,9 @@ relay_raw_message_remove_old () } /* - * relay_raw_message_add_to_list: add new message to list + * Adds a new raw message to list. + * + * Returns pointer to new raw message, NULL if error. */ struct t_relay_raw_message * @@ -215,7 +216,9 @@ relay_raw_message_add_to_list (time_t date, const char *prefix, } /* - * relay_raw_message_add: add new message to list + * Adds a new raw message to list. + * + * Returns pointer to new raw message, NULL if error. */ struct t_relay_raw_message * @@ -312,7 +315,7 @@ relay_raw_message_add (struct t_relay_client *client, int flags, } /* - * relay_raw_print: print a message on Relay raw buffer + * Prints a message on relay raw buffer. */ void @@ -342,8 +345,11 @@ relay_raw_print (struct t_relay_client *client, int flags, } /* - * relay_raw_add_to_infolist: add a raw message in an infolist - * return 1 if ok, 0 if error + * Adds a raw message in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c index 8723c5878..e7cc36dbe 100644 --- a/src/plugins/relay/relay-server.c +++ b/src/plugins/relay/relay-server.c @@ -45,20 +45,24 @@ struct t_relay_server *last_relay_server = NULL; /* - * relay_server_get_protocol_args: get protocol, arguments and options - * from a string with format - * "options.protocol.args", examples: - * irc.freenode - * ssl.irc.freenode - * ipv4.irc.freenode - * ipv6.irc.freenode - * ipv4.ipv6.irc.freenode - * ipv6.ssl.irc.freenode - * weechat - * ssl.weechat - * ipv6.ssl.weechat - * Note: *protocol and *protocol_args must be - * freed after use + * Extracts protocol, arguments and options from a string with format + * "options.protocol.args". + * + * Examples: + * + * string ipv4 ipv6 ssl protocol protocol_args + * --------------------------------------------------------------- + * irc.freenode 1 1 0 irc freenode + * ssl.irc.freenode 1 1 1 irc freenode + * ipv4.irc.freenode 1 0 0 irc freenode + * ipv6.irc.freenode 0 1 0 irc freenode + * ipv4.ipv6.irc.freenode 1 1 0 irc freenode + * ipv6.ssl.irc.freenode 0 1 1 irc freenode + * weechat 1 1 0 weechat + * ssl.weechat 1 1 1 weechat + * ipv6.ssl.weechat 0 1 1 weechat + * + * Note: *protocol and *protocol_args must be freed after use. */ void @@ -142,7 +146,9 @@ relay_server_get_protocol_args (const char *protocol_and_args, } /* - * relay_server_search: search server by protocol.args + * Searches for a server by protocol.args. + * + * Returns pointer to server, NULL if not found. */ struct t_relay_server * @@ -161,7 +167,9 @@ relay_server_search (const char *protocol_and_args) } /* - * relay_server_search_port: search server by port + * Searches for a server by port. + * + * Returns pointer to new server, NULL if not found. */ struct t_relay_server * @@ -181,7 +189,7 @@ relay_server_search_port (int port) } /* - * relay_server_close_socket: close socket for a relay server + * Closes socket for a relay server. */ void @@ -208,7 +216,7 @@ relay_server_close_socket (struct t_relay_server *server) } /* - * relay_server_sock_cb: read data from a client which is connecting on socket + * Reads data from a client which is connecting on socket. */ int @@ -316,7 +324,11 @@ relay_server_sock_cb (void *data, int fd) } /* - * relay_server_create_socket: create socket and server on port + * Creates socket and server on port. + * + * Returns: + * 1: OK + * 0: error */ int @@ -454,7 +466,9 @@ relay_server_create_socket (struct t_relay_server *server) } /* - * relay_server_new: add a socket relaying on a port + * Adds a socket relaying on a port. + * + * Returns pointer to new server, NULL if error. */ struct t_relay_server * @@ -519,7 +533,7 @@ relay_server_new (const char *protocol_string, enum t_relay_protocol protocol, } /* - * relay_server_update_port: update port in a server + * Updates port in a server. */ void @@ -534,7 +548,7 @@ relay_server_update_port (struct t_relay_server *server, int port) } /* - * relay_server_free: remove a server + * Removes a server. */ void @@ -571,7 +585,7 @@ relay_server_free (struct t_relay_server *server) } /* - * relay_server_free_all: remove all servers + * Removes all servers. */ void @@ -584,7 +598,7 @@ relay_server_free_all () } /* - * relay_server_print_log: print server infos in log (usually for crash dump) + * Prints servers in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/relay/relay-upgrade.c b/src/plugins/relay/relay-upgrade.c index 30f60c553..f18a18a90 100644 --- a/src/plugins/relay/relay-upgrade.c +++ b/src/plugins/relay/relay-upgrade.c @@ -34,7 +34,11 @@ /* - * relay_upgrade_save_all_data: save relay data to upgrade file + * Saves relay data in relay upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -89,8 +93,11 @@ relay_upgrade_save_all_data (struct t_upgrade_file *upgrade_file) } /* - * relay_upgrade_save: save upgrade file - * return 1 if ok, 0 if error + * Saves relay upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -111,8 +118,8 @@ relay_upgrade_save () } /* - * relay_upgrade_set_buffer_callbacks: restore buffers callbacks (input and - * close) for buffers created by relay plugin + * Restores buffer callbacks (input and close) for buffers created by relay + * plugin. */ void @@ -148,7 +155,7 @@ relay_upgrade_set_buffer_callbacks () } /* - * relay_upgrade_read_cb: read callback for relay upgrade file + * Reads relay upgrade file. */ int @@ -181,8 +188,11 @@ relay_upgrade_read_cb (void *data, } /* - * relay_upgrade_load: load upgrade file - * return 1 if ok, 0 if error + * Loads relay upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index a60be6d04..2d73ddc5a 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -56,7 +56,10 @@ struct t_hook *relay_hook_timer = NULL; /* - * relay_protocol_search: search a protocol by name + * Searches for a protocol. + * + * Returns index of protocol in enum t_relay_protocol, -1 if protocol is not + * found. */ int @@ -75,7 +78,7 @@ relay_protocol_search (const char *name) } /* - * relay_signal_upgrade_cb: callback for "upgrade" signal + * Callback for signal "upgrade". */ int @@ -144,7 +147,7 @@ relay_signal_upgrade_cb (void *data, const char *signal, const char *type_data, } /* - * relay_debug_dump_cb: callback for "debug_dump" signal + * Callback for signal "debug_dump". */ int @@ -175,7 +178,7 @@ relay_debug_dump_cb (void *data, const char *signal, const char *type_data, } /* - * weechat_plugin_init: initialize relay plugin + * Initializes relay plugin. */ int @@ -227,7 +230,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end relay plugin + * Ends relay plugin. */ int diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c index 8994ac430..f550074da 100644 --- a/src/plugins/relay/weechat/relay-weechat-msg.c +++ b/src/plugins/relay/weechat/relay-weechat-msg.c @@ -43,7 +43,9 @@ /* - * relay_weechat_msg_new: build a new message (for sending to client) + * Builds a new message (for sending to client). + * + * Returns pointer to new message, NULL if error. */ struct t_relay_weechat_msg * @@ -76,7 +78,7 @@ relay_weechat_msg_new (const char *id) } /* - * relay_weechat_msg_add_bytes: add some bytes to a message + * Adds some bytes to a message. */ void @@ -108,7 +110,7 @@ relay_weechat_msg_add_bytes (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_set_bytes: set some bytes in a message + * Sets some bytes in a message. */ void @@ -122,7 +124,7 @@ relay_weechat_msg_set_bytes (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_type: add type to a message + * Adds type to a message. */ void @@ -133,7 +135,7 @@ relay_weechat_msg_add_type (struct t_relay_weechat_msg *msg, const char *string) } /* - * relay_weechat_msg_add_char: add a char to a message + * Adds a char to a message. */ void @@ -143,7 +145,7 @@ relay_weechat_msg_add_char (struct t_relay_weechat_msg *msg, char c) } /* - * relay_weechat_msg_add_int: add an integer to a message + * Adds an integer to a message. */ void @@ -156,7 +158,7 @@ relay_weechat_msg_add_int (struct t_relay_weechat_msg *msg, int value) } /* - * relay_weechat_msg_add_long: add a long integer to a message + * Adds a long integer to a message. */ void @@ -172,7 +174,7 @@ relay_weechat_msg_add_long (struct t_relay_weechat_msg *msg, long value) } /* - * relay_weechat_msg_add_string: add length + string to a message + * Adds length + string to a message. */ void @@ -195,7 +197,7 @@ relay_weechat_msg_add_string (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_buffer: add buffer (length + data) to a message + * Adds buffer (length + data) to a message. */ void @@ -215,7 +217,7 @@ relay_weechat_msg_add_buffer (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_pointer: add a pointer to a message + * Adds a pointer to a message. */ void @@ -232,7 +234,7 @@ relay_weechat_msg_add_pointer (struct t_relay_weechat_msg *msg, void *pointer) } /* - * relay_weechat_msg_add_time: add a time to a message + * Adds a time to a message. */ void @@ -248,8 +250,7 @@ relay_weechat_msg_add_time (struct t_relay_weechat_msg *msg, time_t time) } /* - * relay_weechat_msg_hashtable_map_cb: callback used to add hashtable items in - * message + * Adds items of hashtable to a message. */ void @@ -283,7 +284,7 @@ relay_weechat_msg_hashtable_map_cb (void *data, struct t_hashtable *hashtable, } /* - * relay_weechat_msg_add_hashtable: add a hashtable to a message + * Adds a hashtable to a message. */ void @@ -319,9 +320,9 @@ relay_weechat_msg_add_hashtable (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_hdata_path: recursively add hdata for a path - * return number of hdata objects added in - * message + * Adds recursively hdata for a path to a message. + * + * Returns the number of hdata objects added to message. */ int @@ -531,14 +532,14 @@ relay_weechat_msg_add_hdata_path (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_hdata: add a hdata to a message - * path has format: - * hdata_head:ptr->var->var->...->var - * where ptr can be a list name or a - * pointer (0x12345) - * keys is optional: if not NULL, - * comma-separated list of keys to return - * for hdata + * Adds a hdata to a message. + * + * Argument path has format: + * hdata_head:ptr->var->var->...->var + * where ptr can be a list name or a pointer (0x12345) + * + * Argument keys is optional: if not NULL, comma-separated list of keys to + * return for hdata. */ void @@ -719,7 +720,7 @@ end: } /* - * relay_weechat_msg_add_infolist: add an infolist to a message + * Adds an infolist to a message. */ void @@ -821,10 +822,9 @@ relay_weechat_msg_add_infolist (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_nicklist_buffer: add nicklist for a buffer, as hdata - * object - * return number of nicks+groups added - * in message + * Adds nicklist for a buffer, as hdata object. + * + * Returns the number of nicks+groups added to message. */ int @@ -909,8 +909,7 @@ relay_weechat_msg_add_nicklist_buffer (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_add_nicklist: add nicklist for one or all buffers, as - * hdata object + * Adds nicklist for one or all buffers, as hdata object. */ void @@ -952,7 +951,7 @@ relay_weechat_msg_add_nicklist (struct t_relay_weechat_msg *msg, } /* - * relay_weechat_msg_send: send a message + * Sends a message. */ void @@ -1023,7 +1022,7 @@ relay_weechat_msg_send (struct t_relay_client *client, } /* - * relay_weechat_msg_free: free a message + * Frees a message. */ void diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index 464974dc7..b3f79b257 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -36,10 +36,12 @@ /* - * relay_weechat_protocol_get_buffer: get buffer pointer with argument from a - * command, which can be a pointer - * ("0x12345") or a full name - * ("irc.freenode.#weechat") + * Gets buffer pointer with argument from a command. + * + * The argument "arg" can be a pointer ("0x12345678") or a full name + * ("irc.freenode.#weechat"). + * + * Returns pointer to buffer found, NULL if not found. */ struct t_gui_buffer * @@ -88,7 +90,7 @@ relay_weechat_protocol_get_buffer (const char *arg) } /* - * relay_weechat_protocol_cb_init: 'init' command from client + * Callback for command "init" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(init) @@ -131,7 +133,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(init) } /* - * relay_weechat_protocol_cb_hdata: 'hdata' command from client + * Callback for command "hdata" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(hdata) @@ -153,7 +155,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(hdata) } /* - * relay_weechat_protocol_cb_info: 'info' command from client + * Callback for command "info" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(info) @@ -179,7 +181,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(info) } /* - * relay_weechat_protocol_cb_infolist: 'infolist' command from client + * Callback for command "infolist" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(infolist) @@ -213,7 +215,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(infolist) } /* - * relay_weechat_protocol_cb_nicklist: 'nicklist' command from client + * Callback for command "nicklist" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(nicklist) @@ -244,7 +246,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(nicklist) } /* - * relay_weechat_protocol_cb_input: 'input' command from client + * Callback for command "input" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(input) @@ -266,7 +268,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(input) } /* - * relay_weechat_protocol_signal_buffer_cb: callback for "buffer_*" signals + * Callback for signals "buffers_*". */ int @@ -485,10 +487,8 @@ relay_weechat_protocol_signal_buffer_cb (void *data, const char *signal, } /* - * relay_weechat_protocol_nicklist_map_cb: callback for entries in hashtable - * "buffers_nicklist" of client - * (send nicklist for each buffer in - * this hashtable) + * Callback for entries in hashtable "buffers_nicklist" of client (sends + * nicklist for each buffer in this hashtable). */ void @@ -532,7 +532,7 @@ relay_weechat_protocol_nicklist_map_cb (void *data, } /* - * relay_weechat_protocol_timer_nicklist_cb: callback for nicklist timer + * Callback for nicklist timer. */ int @@ -559,7 +559,7 @@ relay_weechat_protocol_timer_nicklist_cb (void *data, int remaining_calls) } /* - * relay_weechat_protocol_signal_nicklist_cb: callback for "nicklist_*" signals + * Callback for signals "nicklist_*". */ int @@ -600,7 +600,7 @@ relay_weechat_protocol_signal_nicklist_cb (void *data, const char *signal, } /* - * relay_weechat_protocol_signal_upgrade_cb: callback for "upgrade*" signals + * Callback for signals "upgrade*". */ int @@ -637,7 +637,7 @@ relay_weechat_protocol_signal_upgrade_cb (void *data, const char *signal, } /* - * relay_weechat_protocol_cb_sync: 'sync' command from client + * Callback for command "sync" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(sync) @@ -711,7 +711,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(sync) } /* - * relay_weechat_protocol_cb_desync: 'desync' command from client + * Callback for command "desync" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(desync) @@ -796,7 +796,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(desync) } /* - * relay_weechat_protocol_cb_test: 'test' command from client + * Callback for command "test" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(test) @@ -872,7 +872,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(test) } /* - * relay_weechat_protocol_cb_quit: 'quit' command from client + * Callback for command "quit" (from client). */ RELAY_WEECHAT_PROTOCOL_CALLBACK(quit) @@ -885,7 +885,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(quit) } /* - * relay_weechat_protocol_recv: read a command from client + * Reads a command from a client. */ void diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c index 5728b8055..6453697f2 100644 --- a/src/plugins/relay/weechat/relay-weechat.c +++ b/src/plugins/relay/weechat/relay-weechat.c @@ -48,7 +48,10 @@ char *relay_weechat_partial_message = NULL; /* - * relay_weechat_compression_search: search a compression by name + * Searches for a compression. + * + * Returns index of compression in enum t_relay_weechat_compression, -1 if + * compression is not found. */ int @@ -67,7 +70,7 @@ relay_weechat_compression_search (const char *compression) } /* - * relay_weechat_hook_signals: hook signals for a client + * Hooks signals for a client. */ void @@ -88,7 +91,7 @@ relay_weechat_hook_signals (struct t_relay_client *client) } /* - * relay_weechat_unhook_signals: unhook signals for a client + * Unhooks signals for a client. */ void @@ -112,7 +115,7 @@ relay_weechat_unhook_signals (struct t_relay_client *client) } /* - * relay_weechat_hook_timer_nicklist: timer to update nicklists for a client + * Hooks timer to update nicklist. */ void @@ -125,7 +128,7 @@ relay_weechat_hook_timer_nicklist (struct t_relay_client *client) } /* - * relay_weechat_recv: read data from client + * Reads data from a client. */ void @@ -176,7 +179,7 @@ relay_weechat_recv (struct t_relay_client *client, const char *data) } /* - * relay_weechat_close_connection: called when connection with client is closed + * Closes connection with a client. */ void @@ -186,7 +189,7 @@ relay_weechat_close_connection (struct t_relay_client *client) } /* - * relay_weechat_alloc: init relay data specific to weechat protocol + * Initializes relay data specific to WeeChat protocol. */ void @@ -222,8 +225,9 @@ relay_weechat_alloc (struct t_relay_client *client) } /* - * relay_weechat_alloc_with_infolist: init relay data specific to weechat - * protocol with an infolist + * Initializes relay data specific to WeeChat protocol with an infolist. + * + * This is called after /upgrade. */ void @@ -297,7 +301,7 @@ relay_weechat_alloc_with_infolist (struct t_relay_client *client, } /* - * relay_weechat_free: free relay data specific to weechat protocol + * Frees relay data specific to WeeChat protocol. */ void @@ -323,8 +327,11 @@ relay_weechat_free (struct t_relay_client *client) } /* - * relay_weechat_add_to_infolist: add client weechat data in an infolist item - * return 1 if ok, 0 if error + * Adds client WeeChat data in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -347,8 +354,7 @@ relay_weechat_add_to_infolist (struct t_infolist_item *item, } /* - * relay_weechat_print_log: print weechat client infos in log (usually for - * crash dump) + * Prints client WeeChat data in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c index 18990f9d0..6a4bfd470 100644 --- a/src/plugins/rmodifier/rmodifier-command.c +++ b/src/plugins/rmodifier/rmodifier-command.c @@ -30,7 +30,7 @@ /* - * rmodifier_command_print: print a rmodifier + * Displays a rmodifier. */ void @@ -55,7 +55,7 @@ rmodifier_command_print (const char *name, const char *modifiers, } /* - * rmodifier_command_list: list rmodifiers + * Displays list of rmodifiers. */ void @@ -81,7 +81,7 @@ rmodifier_command_list (const char *message) } /* - * rmodifier_command_cb: manage rmodifiers + * Callback for command "/rmodifier": manages rmodifiers. */ int @@ -139,7 +139,7 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc, argv[2]); return WEECHAT_RC_OK; } - /* create config option */ + /* create configuration option */ ptr_option = weechat_config_search_option (rmodifier_config_file, rmodifier_config_section_modifier, argv[2]); @@ -226,7 +226,7 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } /* - * rmodifier_command_init: add /rmodifier command + * Hooks command. */ void diff --git a/src/plugins/rmodifier/rmodifier-completion.c b/src/plugins/rmodifier/rmodifier-completion.c index 43defadf6..cbf4feb88 100644 --- a/src/plugins/rmodifier/rmodifier-completion.c +++ b/src/plugins/rmodifier/rmodifier-completion.c @@ -29,7 +29,7 @@ /* - * rmodifier_completion_cb: callback for completion with list of rmodifiers + * Adds list of rmodifiers to completion list. */ int @@ -55,7 +55,7 @@ rmodifier_completion_cb (void *data, const char *completion_item, } /* - * rmodifier_completion_init: initialize rmodifier plugin + * Hooks completion. */ void diff --git a/src/plugins/rmodifier/rmodifier-config.c b/src/plugins/rmodifier/rmodifier-config.c index 2609b132b..d3842a180 100644 --- a/src/plugins/rmodifier/rmodifier-config.c +++ b/src/plugins/rmodifier/rmodifier-config.c @@ -58,7 +58,7 @@ char *rmodifier_config_default_list[][4] = /* - * rmodifier_config_reload: reload rmodifier configuration file + * Reloads rmodifier configuration file. */ int @@ -74,8 +74,7 @@ rmodifier_config_reload (void *data, struct t_config_file *config_file) } /* - * rmodifier_config_modifier_change_cb: callback called when a rmodifier is - * modified in section "modifier" + * Callback for changes on options in section "modifier". */ void @@ -89,8 +88,7 @@ rmodifier_config_modifier_change_cb (void *data, struct t_config_option *option) } /* - * rmodifier_config_modifier_delete_cb: callback called when rmodifier option - * is deleted in section "modifier" + * Callback called when a rmodifier option is deleted in section "modifier". */ void @@ -108,9 +106,7 @@ rmodifier_config_modifier_delete_cb (void *data, struct t_config_option *option) } /* - * rmodifier_config_modifier_write_default_cb: write default rmodifiers in - * configuration file in section - * "modifier" + * Writes default rmodifiers in in section "modifier". */ int @@ -141,7 +137,7 @@ rmodifier_config_modifier_write_default_cb (void *data, } /* - * rmodifier_config_modifier_new_option: create new option in section "modifier" + * Creates a new option in section "modifier". */ void @@ -171,8 +167,7 @@ rmodifier_config_modifier_new_option (const char *name, const char *modifiers, } /* - * rmodifier_config_modifier_create_option_cb: callback to create option in - * "modifier" section + * Callback called when an option is created in section "modifier". */ int @@ -225,8 +220,11 @@ rmodifier_config_modifier_create_option_cb (void *data, } /* - * rmodifier_config_init: init rmodifier configuration file - * return: 1 if ok, 0 if error + * Initializes rmodifier configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -276,7 +274,7 @@ rmodifier_config_init () } /* - * rmodifier_config_read: read rmodifier configuration file + * Reads rmodifier configuration file. */ int @@ -286,7 +284,7 @@ rmodifier_config_read () } /* - * rmodifier_config_write: write rmodifier configuration file + * Writes rmodifier configuration file. */ int diff --git a/src/plugins/rmodifier/rmodifier-debug.c b/src/plugins/rmodifier/rmodifier-debug.c index d55cf3759..9be70c560 100644 --- a/src/plugins/rmodifier/rmodifier-debug.c +++ b/src/plugins/rmodifier/rmodifier-debug.c @@ -30,7 +30,7 @@ /* - * rmodifier_debug_signal_debug_dump_cb: dump rmodifier data in WeeChat log file + * Dumps rmodifier data in WeeChat log file. */ int @@ -60,7 +60,7 @@ rmodifier_debug_signal_debug_dump_cb (void *data, const char *signal, } /* - * rmodifier_debug_init: initialize debug for rmodifier plugin + * Initializes debug for rmodifier plugin. */ void diff --git a/src/plugins/rmodifier/rmodifier-info.c b/src/plugins/rmodifier/rmodifier-info.c index b36b57253..21eadfee1 100644 --- a/src/plugins/rmodifier/rmodifier-info.c +++ b/src/plugins/rmodifier/rmodifier-info.c @@ -29,8 +29,7 @@ /* - * rmodifier_info_get_infolist_cb: callback called when rmodifier infolist is - * asked + * Returns infolist with rmodifier info. */ struct t_infolist * @@ -90,13 +89,12 @@ rmodifier_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * rmodifier_info_init: initialize info and infolist hooks for rmodifier plugin + * Hooks infolist. */ void rmodifier_info_init () { - /* rmodifier infolist hooks */ weechat_hook_infolist ("rmodifier", N_("list of rmodifiers"), N_("rmodifier pointer (optional)"), N_("rmodifier name (can start or end with \"*\" as " diff --git a/src/plugins/rmodifier/rmodifier.c b/src/plugins/rmodifier/rmodifier.c index 92a5cbd1b..76853a81d 100644 --- a/src/plugins/rmodifier/rmodifier.c +++ b/src/plugins/rmodifier/rmodifier.c @@ -51,9 +51,11 @@ struct t_weelist *rmodifier_hook_list = NULL; /* - * rmodifier_valid: check if a rmodifier pointer exists - * return 1 if rmodifier exists - * 0 if rmodifier is not found + * Checks if a rmodifier pointer is valid. + * + * Returns: + * 1: rmodifier exists + * 0: rmodifier does not exist */ int @@ -76,7 +78,9 @@ rmodifier_valid (struct t_rmodifier *rmodifier) } /* - * rmodifier_search: search a rmodifier + * Searches for a rmodifier by name. + * + * Returns pointer to rmodifier found, NULL if not found. */ struct t_rmodifier * @@ -94,8 +98,9 @@ rmodifier_search (const char *name) } /* - * rmodifier_hide_string: hide a string (using char defined in option - * "rmodifier.look.hide_char") + * Hides a string (using char defined in option "rmodifier.look.hide_char"). + * + * Note: result must be freed after use. */ char * @@ -122,8 +127,7 @@ rmodifier_hide_string (const char *string) } /* - * rmodifier_replace_groups: replace groups in a string, using regex_match - * found by call to regexec() + * Replaces groups in a string, using regex_match found by call to regexec(). */ char * @@ -183,7 +187,7 @@ rmodifier_replace_groups (const char *string, regmatch_t regex_match[], } /* - * rmodifier_modifier_cb: callback for a modifier + * Callback for a modifier. */ char * @@ -218,7 +222,7 @@ rmodifier_modifier_cb (void *data, const char *modifier, } /* - * rmodifier_hook_modifiers: hook modifiers for a rmodifier + * Hooks modifiers for a rmodifier. */ void @@ -253,7 +257,9 @@ rmodifier_hook_modifiers (struct t_rmodifier *rmodifier) } /* - * rmodifier_new: create new rmodifier and add it to rmodifier list + * Creates a new rmodifier and adds it to rmodifier list. + * + * Returns pointer to new rmodifier, NULL if error. */ struct t_rmodifier * @@ -324,8 +330,10 @@ rmodifier_new (const char *name, const char *modifiers, const char *str_regex, } /* - * rmodifier_new_with_string: create a rmodifier with a single string, which - * contains: "modifiers;regex;groups" + * Creates a rmodifier with a single string, which contains: + * "modifiers;regex;groups". + * + * Returns pointer to new rmodifier, NULL if error. */ struct t_rmodifier * @@ -357,7 +365,7 @@ rmodifier_new_with_string (const char *name, const char *value) } /* - * rmodifer_create_default: create default rmodifiers + * Creates default rmodifiers. */ void @@ -381,7 +389,7 @@ rmodifier_create_default () } /* - * rmodifier_free: free a rmodifier and remove it from list + * Frees a rmodifier and removes it from list. */ void @@ -433,7 +441,7 @@ rmodifier_free (struct t_rmodifier *rmodifier) } /* - * rmodifier_free_all: free all rmodifier + * Frees all rmodifiers. */ void @@ -446,8 +454,11 @@ rmodifier_free_all () } /* - * rmodifier_add_to_infolist: add a rmodifier in an infolist - * return 1 if ok, 0 if error + * Adds a rmodifier in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -489,7 +500,7 @@ rmodifier_add_to_infolist (struct t_infolist *infolist, } /* - * rmodifier_print_log: print rmodifiers in log (usually for crash dump) + * Prints rmodifiers in WeeChat log file (usually for crash dump). */ void @@ -519,7 +530,7 @@ rmodifier_print_log () } /* - * weechat_plugin_init: initialize rmodifier plugin + * Initializes rmodifier plugin. */ int @@ -555,7 +566,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end rmodifier plugin + * Ends rmodifier plugin. */ int diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c index a0911bfe9..f59ee3ded 100644 --- a/src/plugins/ruby/weechat-ruby-api.c +++ b/src/plugins/ruby/weechat-ruby-api.c @@ -83,7 +83,7 @@ /* - * weechat_ruby_api_register: startup function for all WeeChat Ruby scripts + * Registers a ruby script. */ static VALUE @@ -168,8 +168,10 @@ weechat_ruby_api_register (VALUE class, VALUE name, VALUE author, } /* - * weechat_ruby_api_plugin_get_name: get name of plugin (return "core" for - * WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ static VALUE @@ -191,10 +193,6 @@ weechat_ruby_api_plugin_get_name (VALUE class, VALUE plugin) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_charset_set: set script charset - */ - static VALUE weechat_ruby_api_charset_set (VALUE class, VALUE charset) { @@ -213,10 +211,6 @@ weechat_ruby_api_charset_set (VALUE class, VALUE charset) API_RETURN_OK; } -/* - * weechat_ruby_api_iconv_to_internal: convert string to internal WeeChat charset - */ - static VALUE weechat_ruby_api_iconv_to_internal (VALUE class, VALUE charset, VALUE string) { @@ -238,11 +232,6 @@ weechat_ruby_api_iconv_to_internal (VALUE class, VALUE charset, VALUE string) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_iconv_from_internal: convert string from WeeChat internal - * charset to another one - */ - static VALUE weechat_ruby_api_iconv_from_internal (VALUE class, VALUE charset, VALUE string) { @@ -264,10 +253,6 @@ weechat_ruby_api_iconv_from_internal (VALUE class, VALUE charset, VALUE string) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_gettext: get translated string - */ - static VALUE weechat_ruby_api_gettext (VALUE class, VALUE string) { @@ -287,10 +272,6 @@ weechat_ruby_api_gettext (VALUE class, VALUE string) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_ngettext: get translated string with plural form - */ - static VALUE weechat_ruby_api_ngettext (VALUE class, VALUE single, VALUE plural, VALUE count) @@ -316,12 +297,6 @@ weechat_ruby_api_ngettext (VALUE class, VALUE single, VALUE plural, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" - * are allowed inside mask - */ - static VALUE weechat_ruby_api_string_match (VALUE class, VALUE string, VALUE mask, VALUE case_sensitive) @@ -346,14 +321,6 @@ weechat_ruby_api_string_match (VALUE class, VALUE string, VALUE mask, API_RETURN_INT(value); } -/* - * weechat_ruby_api_string_has_highlight: return 1 if string contains a - * highlight (using list of words to - * highlight) - * return 0 if no highlight is found in - * string - */ - static VALUE weechat_ruby_api_string_has_highlight (VALUE class, VALUE string, VALUE highlight_words) @@ -376,14 +343,6 @@ weechat_ruby_api_string_has_highlight (VALUE class, VALUE string, API_RETURN_INT(value); } -/* - * weechat_ruby_api_string_has_highlight_regex: return 1 if string contains a - * highlight (using regular - * expression) - * return 0 if no highlight is - * found in string - */ - static VALUE weechat_ruby_api_string_has_highlight_regex (VALUE class, VALUE string, VALUE regex) @@ -406,13 +365,6 @@ weechat_ruby_api_string_has_highlight_regex (VALUE class, VALUE string, API_RETURN_INT(value); } -/* - * weechat_ruby_api_string_mask_to_regex: convert a mask (string with only - * "*" as wildcard) to a regex, paying - * attention to special chars in a - * regex - */ - static VALUE weechat_ruby_api_string_mask_to_regex (VALUE class, VALUE mask) { @@ -432,10 +384,6 @@ weechat_ruby_api_string_mask_to_regex (VALUE class, VALUE mask) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_string_remove_color: remove WeeChat color codes from string - */ - static VALUE weechat_ruby_api_string_remove_color (VALUE class, VALUE string, VALUE replacement) @@ -458,11 +406,6 @@ weechat_ruby_api_string_remove_color (VALUE class, VALUE string, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_string_is_command_char: check if first char of string is a - * command char - */ - static VALUE weechat_ruby_api_string_is_command_char (VALUE class, VALUE string) { @@ -482,12 +425,6 @@ weechat_ruby_api_string_is_command_char (VALUE class, VALUE string) API_RETURN_INT(value); } -/* - * weechat_ruby_api_string_input_for_buffer: return string with input text - * for buffer or empty string if - * it's a command - */ - static VALUE weechat_ruby_api_string_input_for_buffer (VALUE class, VALUE string) { @@ -507,11 +444,6 @@ weechat_ruby_api_string_input_for_buffer (VALUE class, VALUE string) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_string_eval_expression: evaluate an expression and return - * result - */ - static VALUE weechat_ruby_api_string_eval_expression (VALUE class, VALUE expr, VALUE pointers, VALUE extra_vars) @@ -548,10 +480,6 @@ weechat_ruby_api_string_eval_expression (VALUE class, VALUE expr, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_mkdir_home: create a directory in WeeChat home - */ - static VALUE weechat_ruby_api_mkdir_home (VALUE class, VALUE directory, VALUE mode) { @@ -574,10 +502,6 @@ weechat_ruby_api_mkdir_home (VALUE class, VALUE directory, VALUE mode) API_RETURN_ERROR; } -/* - * weechat_ruby_api_mkdir: create a directory - */ - static VALUE weechat_ruby_api_mkdir (VALUE class, VALUE directory, VALUE mode) { @@ -600,11 +524,6 @@ weechat_ruby_api_mkdir (VALUE class, VALUE directory, VALUE mode) API_RETURN_ERROR; } -/* - * weechat_ruby_api_mkdir_parents: create a directory and make parent - * directories as needed - */ - static VALUE weechat_ruby_api_mkdir_parents (VALUE class, VALUE directory, VALUE mode) { @@ -627,10 +546,6 @@ weechat_ruby_api_mkdir_parents (VALUE class, VALUE directory, VALUE mode) API_RETURN_ERROR; } -/* - * weechat_ruby_api_list_new: create a new list - */ - static VALUE weechat_ruby_api_list_new (VALUE class) { @@ -643,10 +558,6 @@ weechat_ruby_api_list_new (VALUE class) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_add: add a string to list - */ - static VALUE weechat_ruby_api_list_add (VALUE class, VALUE weelist, VALUE data, VALUE where, VALUE user_data) @@ -675,10 +586,6 @@ weechat_ruby_api_list_add (VALUE class, VALUE weelist, VALUE data, VALUE where, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_search: search a string in list - */ - static VALUE weechat_ruby_api_list_search (VALUE class, VALUE weelist, VALUE data) { @@ -700,10 +607,6 @@ weechat_ruby_api_list_search (VALUE class, VALUE weelist, VALUE data) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_search_pos: search position of a string in list - */ - static VALUE weechat_ruby_api_list_search_pos (VALUE class, VALUE weelist, VALUE data) { @@ -725,10 +628,6 @@ weechat_ruby_api_list_search_pos (VALUE class, VALUE weelist, VALUE data) API_RETURN_INT(pos); } -/* - * weechat_ruby_api_list_casesearch: search a string in list (ignore case) - */ - static VALUE weechat_ruby_api_list_casesearch (VALUE class, VALUE weelist, VALUE data) { @@ -750,11 +649,6 @@ weechat_ruby_api_list_casesearch (VALUE class, VALUE weelist, VALUE data) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_casesearch_pos: search position of a string in list - * (ignore case) - */ - static VALUE weechat_ruby_api_list_casesearch_pos (VALUE class, VALUE weelist, VALUE data) { @@ -776,10 +670,6 @@ weechat_ruby_api_list_casesearch_pos (VALUE class, VALUE weelist, VALUE data) API_RETURN_INT(pos); } -/* - * weechat_ruby_api_list_get: get item by position - */ - static VALUE weechat_ruby_api_list_get (VALUE class, VALUE weelist, VALUE position) { @@ -802,10 +692,6 @@ weechat_ruby_api_list_get (VALUE class, VALUE weelist, VALUE position) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_set: set new value for item - */ - static VALUE weechat_ruby_api_list_set (VALUE class, VALUE item, VALUE new_value) { @@ -827,10 +713,6 @@ weechat_ruby_api_list_set (VALUE class, VALUE item, VALUE new_value) API_RETURN_OK; } -/* - * weechat_ruby_api_list_next: get next item - */ - static VALUE weechat_ruby_api_list_next (VALUE class, VALUE item) { @@ -849,10 +731,6 @@ weechat_ruby_api_list_next (VALUE class, VALUE item) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_prev: get previous item - */ - static VALUE weechat_ruby_api_list_prev (VALUE class, VALUE item) { @@ -871,10 +749,6 @@ weechat_ruby_api_list_prev (VALUE class, VALUE item) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_string: get string value of item - */ - static VALUE weechat_ruby_api_list_string (VALUE class, VALUE item) { @@ -894,10 +768,6 @@ weechat_ruby_api_list_string (VALUE class, VALUE item) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_list_size: get number of elements in list - */ - static VALUE weechat_ruby_api_list_size (VALUE class, VALUE weelist) { @@ -917,10 +787,6 @@ weechat_ruby_api_list_size (VALUE class, VALUE weelist) API_RETURN_INT(size); } -/* - * weechat_ruby_api_list_remove: remove item from list - */ - static VALUE weechat_ruby_api_list_remove (VALUE class, VALUE weelist, VALUE item) { @@ -942,10 +808,6 @@ weechat_ruby_api_list_remove (VALUE class, VALUE weelist, VALUE item) API_RETURN_OK; } -/* - * weechat_ruby_api_list_remove_all: remove all items from list - */ - static VALUE weechat_ruby_api_list_remove_all (VALUE class, VALUE weelist) { @@ -964,10 +826,6 @@ weechat_ruby_api_list_remove_all (VALUE class, VALUE weelist) API_RETURN_OK; } -/* - * weechat_ruby_api_list_free: free list - */ - static VALUE weechat_ruby_api_list_free (VALUE class, VALUE weelist) { @@ -986,10 +844,6 @@ weechat_ruby_api_list_free (VALUE class, VALUE weelist) API_RETURN_OK; } -/* - * weechat_ruby_api_config_reload_cb: callback for config reload - */ - int weechat_ruby_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -1027,10 +881,6 @@ weechat_ruby_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat_ruby_api_config_new: create a new configuration file - */ - static VALUE weechat_ruby_api_config_new (VALUE class, VALUE name, VALUE function, VALUE data) @@ -1060,10 +910,6 @@ weechat_ruby_api_config_new (VALUE class, VALUE name, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_read_cb: callback for reading option in section - */ - int weechat_ruby_api_config_read_cb (void *data, struct t_config_file *config_file, @@ -1108,10 +954,6 @@ weechat_ruby_api_config_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_ruby_api_config_section_write_cb: callback for writing section - */ - int weechat_ruby_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -1151,11 +993,6 @@ weechat_ruby_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_ruby_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_ruby_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -1195,10 +1032,6 @@ weechat_ruby_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_ruby_api_config_section_create_option_cb: callback to create an option - */ - int weechat_ruby_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1244,10 +1077,6 @@ weechat_ruby_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_ruby_api_config_section_delete_option_cb: callback to delete an option - */ - int weechat_ruby_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1293,10 +1122,6 @@ weechat_ruby_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat_ruby_api_config_new_section: create a new section in configuration file - */ - static VALUE weechat_ruby_api_config_new_section (VALUE class, VALUE config_file, VALUE name, VALUE user_can_add_options, @@ -1384,10 +1209,6 @@ weechat_ruby_api_config_new_section (VALUE class, VALUE config_file, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_search_section: search section in configuration file - */ - static VALUE weechat_ruby_api_config_search_section (VALUE class, VALUE config_file, VALUE section_name) @@ -1411,11 +1232,6 @@ weechat_ruby_api_config_search_section (VALUE class, VALUE config_file, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_option_check_value_cb: callback for checking new - * value for option - */ - int weechat_ruby_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1455,10 +1271,6 @@ weechat_ruby_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_ruby_api_config_option_change_cb: callback for option changed - */ - void weechat_ruby_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1488,10 +1300,6 @@ weechat_ruby_api_config_option_change_cb (void *data, } } -/* - * weechat_ruby_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_ruby_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1521,10 +1329,6 @@ weechat_ruby_api_config_option_delete_cb (void *data, } } -/* - * weechat_ruby_api_config_new_option: create a new option in section - */ - static VALUE weechat_ruby_api_config_new_option (VALUE class, VALUE config_file, VALUE section, VALUE name, VALUE type, @@ -1617,10 +1421,6 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_search_option: search option in configuration file or section - */ - static VALUE weechat_ruby_api_config_search_option (VALUE class, VALUE config_file, VALUE section, VALUE option_name) @@ -1647,10 +1447,6 @@ weechat_ruby_api_config_search_option (VALUE class, VALUE config_file, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_string_to_boolean: return boolean value of a string - */ - static VALUE weechat_ruby_api_config_string_to_boolean (VALUE class, VALUE text) { @@ -1670,10 +1466,6 @@ weechat_ruby_api_config_string_to_boolean (VALUE class, VALUE text) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_option_reset: reset option with default value - */ - static VALUE weechat_ruby_api_config_option_reset (VALUE class, VALUE option, VALUE run_callback) @@ -1697,10 +1489,6 @@ weechat_ruby_api_config_option_reset (VALUE class, VALUE option, API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_option_set: set new value for option - */ - static VALUE weechat_ruby_api_config_option_set (VALUE class, VALUE option, VALUE new_value, VALUE run_callback) @@ -1727,11 +1515,6 @@ weechat_ruby_api_config_option_set (VALUE class, VALUE option, VALUE new_value, API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_option_set_null: set null (undefined) value for - * option - */ - static VALUE weechat_ruby_api_config_option_set_null (VALUE class, VALUE option, VALUE run_callback) @@ -1755,10 +1538,6 @@ weechat_ruby_api_config_option_set_null (VALUE class, VALUE option, API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_option_unset: unset an option - */ - static VALUE weechat_ruby_api_config_option_unset (VALUE class, VALUE option) { @@ -1778,10 +1557,6 @@ weechat_ruby_api_config_option_unset (VALUE class, VALUE option) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_option_rename: rename an option - */ - static VALUE weechat_ruby_api_config_option_rename (VALUE class, VALUE option, VALUE new_name) @@ -1804,10 +1579,6 @@ weechat_ruby_api_config_option_rename (VALUE class, VALUE option, API_RETURN_OK; } -/* - * weechat_ruby_api_config_option_is_null: return 1 if value of option is null - */ - static VALUE weechat_ruby_api_config_option_is_null (VALUE class, VALUE option) { @@ -1827,10 +1598,6 @@ weechat_ruby_api_config_option_is_null (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_option_default_is_null: return 1 if value of option is null - */ - static VALUE weechat_ruby_api_config_option_default_is_null (VALUE class, VALUE option) { @@ -1850,10 +1617,6 @@ weechat_ruby_api_config_option_default_is_null (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_boolean: return boolean value of option - */ - static VALUE weechat_ruby_api_config_boolean (VALUE class, VALUE option) { @@ -1873,10 +1636,6 @@ weechat_ruby_api_config_boolean (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_boolean_default: return default boolean value of option - */ - static VALUE weechat_ruby_api_config_boolean_default (VALUE class, VALUE option) { @@ -1896,10 +1655,6 @@ weechat_ruby_api_config_boolean_default (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_integer: return integer value of option - */ - static VALUE weechat_ruby_api_config_integer (VALUE class, VALUE option) { @@ -1919,10 +1674,6 @@ weechat_ruby_api_config_integer (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_integer_default: return default integer value of option - */ - static VALUE weechat_ruby_api_config_integer_default (VALUE class, VALUE option) { @@ -1942,10 +1693,6 @@ weechat_ruby_api_config_integer_default (VALUE class, VALUE option) API_RETURN_INT(value); } -/* - * weechat_ruby_api_config_string: return string value of option - */ - static VALUE weechat_ruby_api_config_string (VALUE class, VALUE option) { @@ -1965,10 +1712,6 @@ weechat_ruby_api_config_string (VALUE class, VALUE option) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_config_string_default: return default string value of option - */ - static VALUE weechat_ruby_api_config_string_default (VALUE class, VALUE option) { @@ -1988,10 +1731,6 @@ weechat_ruby_api_config_string_default (VALUE class, VALUE option) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_config_color: return color value of option - */ - static VALUE weechat_ruby_api_config_color (VALUE class, VALUE option) { @@ -2011,10 +1750,6 @@ weechat_ruby_api_config_color (VALUE class, VALUE option) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_config_color_default: return default color value of option - */ - static VALUE weechat_ruby_api_config_color_default (VALUE class, VALUE option) { @@ -2034,10 +1769,6 @@ weechat_ruby_api_config_color_default (VALUE class, VALUE option) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_config_write_option: write an option in configuration file - */ - static VALUE weechat_ruby_api_config_write_option (VALUE class, VALUE config_file, VALUE option) @@ -2060,10 +1791,6 @@ weechat_ruby_api_config_write_option (VALUE class, VALUE config_file, API_RETURN_OK; } -/* - * weechat_ruby_api_config_write_line: write a line in configuration file - */ - static VALUE weechat_ruby_api_config_write_line (VALUE class, VALUE config_file, VALUE option_name, VALUE value) @@ -2090,10 +1817,6 @@ weechat_ruby_api_config_write_line (VALUE class, VALUE config_file, API_RETURN_OK; } -/* - * weechat_ruby_api_config_write: write configuration file - */ - static VALUE weechat_ruby_api_config_write (VALUE class, VALUE config_file) { @@ -2113,10 +1836,6 @@ weechat_ruby_api_config_write (VALUE class, VALUE config_file) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_read: read configuration file - */ - static VALUE weechat_ruby_api_config_read (VALUE class, VALUE config_file) { @@ -2136,10 +1855,6 @@ weechat_ruby_api_config_read (VALUE class, VALUE config_file) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_reload: reload configuration file - */ - static VALUE weechat_ruby_api_config_reload (VALUE class, VALUE config_file) { @@ -2159,10 +1874,6 @@ weechat_ruby_api_config_reload (VALUE class, VALUE config_file) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_option_free: free an option in configuration file - */ - static VALUE weechat_ruby_api_config_option_free (VALUE class, VALUE option) { @@ -2183,11 +1894,6 @@ weechat_ruby_api_config_option_free (VALUE class, VALUE option) API_RETURN_OK; } -/* - * weechat_ruby_api_config_section_free_options: free all options of a section - * in configuration file - */ - static VALUE weechat_ruby_api_config_section_free_options (VALUE class, VALUE section) { @@ -2208,10 +1914,6 @@ weechat_ruby_api_config_section_free_options (VALUE class, VALUE section) API_RETURN_OK; } -/* - * weechat_ruby_api_config_section_free: free section in configuration file - */ - static VALUE weechat_ruby_api_config_section_free (VALUE class, VALUE section) { @@ -2232,10 +1934,6 @@ weechat_ruby_api_config_section_free (VALUE class, VALUE section) API_RETURN_OK; } -/* - * weechat_ruby_api_config_free: free configuration file - */ - static VALUE weechat_ruby_api_config_free (VALUE class, VALUE config_file) { @@ -2256,10 +1954,6 @@ weechat_ruby_api_config_free (VALUE class, VALUE config_file) API_RETURN_OK; } -/* - * weechat_ruby_api_config_get: get config option - */ - static VALUE weechat_ruby_api_config_get (VALUE class, VALUE option) { @@ -2279,10 +1973,6 @@ weechat_ruby_api_config_get (VALUE class, VALUE option) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_config_get_plugin: get value of a plugin option - */ - static VALUE weechat_ruby_api_config_get_plugin (VALUE class, VALUE option) { @@ -2304,10 +1994,6 @@ weechat_ruby_api_config_get_plugin (VALUE class, VALUE option) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_config_is_set_plugin: check if a plugin option is set - */ - static VALUE weechat_ruby_api_config_is_set_plugin (VALUE class, VALUE option) { @@ -2329,10 +2015,6 @@ weechat_ruby_api_config_is_set_plugin (VALUE class, VALUE option) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_set_plugin: set value of a plugin option - */ - static VALUE weechat_ruby_api_config_set_plugin (VALUE class, VALUE option, VALUE value) { @@ -2357,10 +2039,6 @@ weechat_ruby_api_config_set_plugin (VALUE class, VALUE option, VALUE value) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_config_set_desc_plugin: set description of a plugin option - */ - static VALUE weechat_ruby_api_config_set_desc_plugin (VALUE class, VALUE option, VALUE description) @@ -2385,10 +2063,6 @@ weechat_ruby_api_config_set_desc_plugin (VALUE class, VALUE option, API_RETURN_OK; } -/* - * weechat_ruby_api_config_unset_plugin: unset plugin option - */ - static VALUE weechat_ruby_api_config_unset_plugin (VALUE class, VALUE option) { @@ -2410,10 +2084,6 @@ weechat_ruby_api_config_unset_plugin (VALUE class, VALUE option) API_RETURN_INT(rc); } -/* - * weechat_ruby_api_key_bind: bind key(s) - */ - static VALUE weechat_ruby_api_key_bind (VALUE class, VALUE context, VALUE keys) { @@ -2442,10 +2112,6 @@ weechat_ruby_api_key_bind (VALUE class, VALUE context, VALUE keys) API_RETURN_INT(num_keys); } -/* - * weechat_ruby_api_key_unbind: unbind key(s) - */ - static VALUE weechat_ruby_api_key_unbind (VALUE class, VALUE context, VALUE key) { @@ -2467,10 +2133,6 @@ weechat_ruby_api_key_unbind (VALUE class, VALUE context, VALUE key) API_RETURN_INT(num_keys); } -/* - * weechat_ruby_api_prefix: get a prefix, used for display - */ - static VALUE weechat_ruby_api_prefix (VALUE class, VALUE prefix) { @@ -2490,10 +2152,6 @@ weechat_ruby_api_prefix (VALUE class, VALUE prefix) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_color: get a color code, used for display - */ - static VALUE weechat_ruby_api_color (VALUE class, VALUE color) { @@ -2513,10 +2171,6 @@ weechat_ruby_api_color (VALUE class, VALUE color) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_print: print message in a buffer - */ - static VALUE weechat_ruby_api_print (VALUE class, VALUE buffer, VALUE message) { @@ -2540,11 +2194,6 @@ weechat_ruby_api_print (VALUE class, VALUE buffer, VALUE message) API_RETURN_OK; } -/* - * weechat_ruby_api_print_date_tags: print message in a buffer with optional - * date and tags - */ - static VALUE weechat_ruby_api_print_date_tags (VALUE class, VALUE buffer, VALUE date, VALUE tags, VALUE message) @@ -2576,10 +2225,6 @@ weechat_ruby_api_print_date_tags (VALUE class, VALUE buffer, VALUE date, API_RETURN_OK; } -/* - * weechat_ruby_api_print_y: print message in a buffer with free content - */ - static VALUE weechat_ruby_api_print_y (VALUE class, VALUE buffer, VALUE y, VALUE message) { @@ -2607,10 +2252,6 @@ weechat_ruby_api_print_y (VALUE class, VALUE buffer, VALUE y, VALUE message) API_RETURN_OK; } -/* - * weechat_ruby_api_log_print: print message in WeeChat log file - */ - static VALUE weechat_ruby_api_log_print (VALUE class, VALUE message) { @@ -2631,10 +2272,6 @@ weechat_ruby_api_log_print (VALUE class, VALUE message) API_RETURN_OK; } -/* - * weechat_ruby_api_hook_command_cb: callback for command hooked - */ - int weechat_ruby_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2676,10 +2313,6 @@ weechat_ruby_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_command: hook a command - */ - static VALUE weechat_ruby_api_hook_command (VALUE class, VALUE command, VALUE description, VALUE args, VALUE args_description, @@ -2725,10 +2358,6 @@ weechat_ruby_api_hook_command (VALUE class, VALUE command, VALUE description, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_ruby_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2767,10 +2396,6 @@ weechat_ruby_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_command_run: hook a command_run - */ - static VALUE weechat_ruby_api_hook_command_run (VALUE class, VALUE command, VALUE function, VALUE data) @@ -2800,10 +2425,6 @@ weechat_ruby_api_hook_command_run (VALUE class, VALUE command, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_timer_cb: callback for timer hooked - */ - int weechat_ruby_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2841,10 +2462,6 @@ weechat_ruby_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_timer: hook a timer - */ - static VALUE weechat_ruby_api_hook_timer (VALUE class, VALUE interval, VALUE align_second, VALUE max_calls, VALUE function, VALUE data) @@ -2882,10 +2499,6 @@ weechat_ruby_api_hook_timer (VALUE class, VALUE interval, VALUE align_second, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_fd_cb: callback for fd hooked - */ - int weechat_ruby_api_hook_fd_cb (void *data, int fd) { @@ -2922,10 +2535,6 @@ weechat_ruby_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_fd: hook a fd - */ - static VALUE weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write, VALUE exception, VALUE function, VALUE data) @@ -2966,10 +2575,6 @@ weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_process_cb: callback for process hooked - */ - int weechat_ruby_api_hook_process_cb (void *data, const char *command, int return_code, @@ -3009,10 +2614,6 @@ weechat_ruby_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_process: hook a process - */ - static VALUE weechat_ruby_api_hook_process (VALUE class, VALUE command, VALUE timeout, VALUE function, VALUE data) @@ -3046,11 +2647,6 @@ weechat_ruby_api_hook_process (VALUE class, VALUE command, VALUE timeout, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_process_hashtable: hook a process with options in - * a hashtable - */ - static VALUE weechat_ruby_api_hook_process_hashtable (VALUE class, VALUE command, VALUE options, VALUE timeout, @@ -3096,10 +2692,6 @@ weechat_ruby_api_hook_process_hashtable (VALUE class, VALUE command, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_connect_cb: callback for connect hooked - */ - int weechat_ruby_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -3145,10 +2737,6 @@ weechat_ruby_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_connect: hook a connection - */ - static VALUE weechat_ruby_api_hook_connect (VALUE class, VALUE proxy, VALUE address, VALUE port, VALUE ipv6, VALUE retry, @@ -3202,10 +2790,6 @@ weechat_ruby_api_hook_connect (VALUE class, VALUE proxy, VALUE address, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_print_cb: callback for print hooked - */ - int weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -3266,10 +2850,6 @@ weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_print: hook a print - */ - static VALUE weechat_ruby_api_hook_print (VALUE class, VALUE buffer, VALUE tags, VALUE message, VALUE strip_colors, VALUE function, @@ -3311,10 +2891,6 @@ weechat_ruby_api_hook_print (VALUE class, VALUE buffer, VALUE tags, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_signal_cb: callback for signal hooked - */ - int weechat_ruby_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -3371,10 +2947,6 @@ weechat_ruby_api_hook_signal_cb (void *data, const char *signal, const char *typ return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_signal: hook a signal - */ - static VALUE weechat_ruby_api_hook_signal (VALUE class, VALUE signal, VALUE function, VALUE data) @@ -3404,10 +2976,6 @@ weechat_ruby_api_hook_signal (VALUE class, VALUE signal, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_signal_send: send a signal - */ - static VALUE weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data, VALUE signal_data) @@ -3451,10 +3019,6 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data, API_RETURN_ERROR; } -/* - * weechat_ruby_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_ruby_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -3491,10 +3055,6 @@ weechat_ruby_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_hsignal: hook a hsignal - */ - static VALUE weechat_ruby_api_hook_hsignal (VALUE class, VALUE signal, VALUE function, VALUE data) @@ -3524,10 +3084,6 @@ weechat_ruby_api_hook_hsignal (VALUE class, VALUE signal, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_hsignal_send: send a hsignal - */ - static VALUE weechat_ruby_api_hook_hsignal_send (VALUE class, VALUE signal, VALUE hashtable) { @@ -3555,10 +3111,6 @@ weechat_ruby_api_hook_hsignal_send (VALUE class, VALUE signal, VALUE hashtable) API_RETURN_OK; } -/* - * weechat_ruby_api_hook_config_cb: callback for config option hooked - */ - int weechat_ruby_api_hook_config_cb (void *data, const char *option, const char *value) { @@ -3594,10 +3146,6 @@ weechat_ruby_api_hook_config_cb (void *data, const char *option, const char *val return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_config: hook a config option - */ - static VALUE weechat_ruby_api_hook_config (VALUE class, VALUE option, VALUE function, VALUE data) @@ -3627,10 +3175,6 @@ weechat_ruby_api_hook_config (VALUE class, VALUE option, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_completion_cb: callback for completion hooked - */ - int weechat_ruby_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3673,10 +3217,6 @@ weechat_ruby_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_hook_completion: hook a completion - */ - static VALUE weechat_ruby_api_hook_completion (VALUE class, VALUE completion, VALUE description, VALUE function, @@ -3711,10 +3251,6 @@ weechat_ruby_api_hook_completion (VALUE class, VALUE completion, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_completion_list_add: add a word to list for a completion - */ - static VALUE weechat_ruby_api_hook_completion_list_add (VALUE class, VALUE completion, VALUE word, VALUE nick_completion, @@ -3746,10 +3282,6 @@ weechat_ruby_api_hook_completion_list_add (VALUE class, VALUE completion, API_RETURN_OK; } -/* - * weechat_ruby_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_ruby_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, const char *string) @@ -3776,10 +3308,6 @@ weechat_ruby_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat_ruby_api_hook_modifier: hook a modifier - */ - static VALUE weechat_ruby_api_hook_modifier (VALUE class, VALUE modifier, VALUE function, VALUE data) @@ -3809,10 +3337,6 @@ weechat_ruby_api_hook_modifier (VALUE class, VALUE modifier, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_modifier_exec: execute a modifier hook - */ - static VALUE weechat_ruby_api_hook_modifier_exec (VALUE class, VALUE modifier, VALUE modifier_data, VALUE string) @@ -3837,10 +3361,6 @@ weechat_ruby_api_hook_modifier_exec (VALUE class, VALUE modifier, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_info_cb: callback for info hooked - */ - const char * weechat_ruby_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3866,10 +3386,6 @@ weechat_ruby_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_ruby_api_hook_info: hook an info - */ - static VALUE weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE description, VALUE args_description, VALUE function, VALUE data) @@ -3907,10 +3423,6 @@ weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE description, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_ruby_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3936,10 +3448,6 @@ weechat_ruby_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_ruby_api_hook_info_hashtable: hook an info_hashtable - */ - static VALUE weechat_ruby_api_hook_info_hashtable (VALUE class, VALUE info_name, VALUE description, @@ -3984,10 +3492,6 @@ weechat_ruby_api_hook_info_hashtable (VALUE class, VALUE info_name, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_ruby_api_hook_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -4020,10 +3524,6 @@ weechat_ruby_api_hook_infolist_cb (void *data, const char *infolist_name, return NULL; } -/* - * weechat_ruby_api_hook_infolist: hook an infolist - */ - static VALUE weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name, VALUE description, VALUE pointer_description, @@ -4067,10 +3567,6 @@ weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_ruby_api_hook_focus_cb (void *data, struct t_hashtable *info) { @@ -4094,10 +3590,6 @@ weechat_ruby_api_hook_focus_cb (void *data, struct t_hashtable *info) return NULL; } -/* - * weechat_ruby_api_hook_focus: hook a focus - */ - static VALUE weechat_ruby_api_hook_focus (VALUE class, VALUE area, VALUE function, VALUE data) @@ -4127,10 +3619,6 @@ weechat_ruby_api_hook_focus (VALUE class, VALUE area, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_unhook: unhook something - */ - static VALUE weechat_ruby_api_unhook (VALUE class, VALUE hook) { @@ -4151,10 +3639,6 @@ weechat_ruby_api_unhook (VALUE class, VALUE hook) API_RETURN_OK; } -/* - * weechat_ruby_api_unhook_all: unhook all for script - */ - static VALUE weechat_ruby_api_unhook_all (VALUE class) { @@ -4165,10 +3649,6 @@ weechat_ruby_api_unhook_all (VALUE class) API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_ruby_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -4207,10 +3687,6 @@ weechat_ruby_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_buffer_close_cb: callback for closed buffer - */ - int weechat_ruby_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -4247,10 +3723,6 @@ weechat_ruby_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_buffer_new: create a new buffer - */ - static VALUE weechat_ruby_api_buffer_new (VALUE class, VALUE name, VALUE function_input, VALUE data_input, VALUE function_close, @@ -4290,10 +3762,6 @@ weechat_ruby_api_buffer_new (VALUE class, VALUE name, VALUE function_input, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_buffer_search: search a buffer - */ - static VALUE weechat_ruby_api_buffer_search (VALUE class, VALUE plugin, VALUE name) { @@ -4315,10 +3783,6 @@ weechat_ruby_api_buffer_search (VALUE class, VALUE plugin, VALUE name) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_buffer_search_main: search main buffer (WeeChat core buffer) - */ - static VALUE weechat_ruby_api_buffer_search_main (VALUE class) { @@ -4332,10 +3796,6 @@ weechat_ruby_api_buffer_search_main (VALUE class) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_current_buffer: get current buffer - */ - static VALUE weechat_ruby_api_current_buffer (VALUE class) { @@ -4349,10 +3809,6 @@ weechat_ruby_api_current_buffer (VALUE class) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_buffer_clear: clear a buffer - */ - static VALUE weechat_ruby_api_buffer_clear (VALUE class, VALUE buffer) { @@ -4371,10 +3827,6 @@ weechat_ruby_api_buffer_clear (VALUE class, VALUE buffer) API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_close: close a buffer - */ - static VALUE weechat_ruby_api_buffer_close (VALUE class, VALUE buffer) { @@ -4395,10 +3847,6 @@ weechat_ruby_api_buffer_close (VALUE class, VALUE buffer) API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_merge: merge a buffer to another buffer - */ - static VALUE weechat_ruby_api_buffer_merge (VALUE class, VALUE buffer, VALUE target_buffer) { @@ -4420,11 +3868,6 @@ weechat_ruby_api_buffer_merge (VALUE class, VALUE buffer, VALUE target_buffer) API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_unmerge: unmerge a buffer from a group of merged - * buffers - */ - static VALUE weechat_ruby_api_buffer_unmerge (VALUE class, VALUE buffer, VALUE number) { @@ -4446,10 +3889,6 @@ weechat_ruby_api_buffer_unmerge (VALUE class, VALUE buffer, VALUE number) API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_get_integer: get a buffer property as integer - */ - static VALUE weechat_ruby_api_buffer_get_integer (VALUE class, VALUE buffer, VALUE property) { @@ -4472,10 +3911,6 @@ weechat_ruby_api_buffer_get_integer (VALUE class, VALUE buffer, VALUE property) API_RETURN_INT(value); } -/* - * weechat_ruby_api_buffer_get_string: get a buffer property as string - */ - static VALUE weechat_ruby_api_buffer_get_string (VALUE class, VALUE buffer, VALUE property) { @@ -4498,10 +3933,6 @@ weechat_ruby_api_buffer_get_string (VALUE class, VALUE buffer, VALUE property) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_buffer_get_pointer: get a buffer property as pointer - */ - static VALUE weechat_ruby_api_buffer_get_pointer (VALUE class, VALUE buffer, VALUE property) { @@ -4524,10 +3955,6 @@ weechat_ruby_api_buffer_get_pointer (VALUE class, VALUE buffer, VALUE property) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_buffer_set: set a buffer property - */ - static VALUE weechat_ruby_api_buffer_set (VALUE class, VALUE buffer, VALUE property, VALUE value) @@ -4553,11 +3980,6 @@ weechat_ruby_api_buffer_set (VALUE class, VALUE buffer, VALUE property, API_RETURN_OK; } -/* - * weechat_ruby_api_buffer_string_replace_local_var: replace local variables ($var) in a string, - * using value of local variables - */ - static VALUE weechat_ruby_api_buffer_string_replace_local_var (VALUE class, VALUE buffer, VALUE string) { @@ -4579,10 +4001,6 @@ weechat_ruby_api_buffer_string_replace_local_var (VALUE class, VALUE buffer, VAL API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_buffer_match_list: return 1 if buffer matches list of buffers - */ - static VALUE weechat_ruby_api_buffer_match_list (VALUE class, VALUE buffer, VALUE string) { @@ -4605,10 +4023,6 @@ weechat_ruby_api_buffer_match_list (VALUE class, VALUE buffer, VALUE string) API_RETURN_INT(value); } -/* - * weechat_ruby_api_current_window: get current window - */ - static VALUE weechat_ruby_api_current_window (VALUE class) { @@ -4622,11 +4036,6 @@ weechat_ruby_api_current_window (VALUE class) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_window_search_with_buffer: search a window with buffer - * pointer - */ - static VALUE weechat_ruby_api_window_search_with_buffer (VALUE class, VALUE buffer) { @@ -4646,10 +4055,6 @@ weechat_ruby_api_window_search_with_buffer (VALUE class, VALUE buffer) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_window_get_integer: get a window property as integer - */ - static VALUE weechat_ruby_api_window_get_integer (VALUE class, VALUE window, VALUE property) { @@ -4672,10 +4077,6 @@ weechat_ruby_api_window_get_integer (VALUE class, VALUE window, VALUE property) API_RETURN_INT(value); } -/* - * weechat_ruby_api_window_get_string: get a window property as string - */ - static VALUE weechat_ruby_api_window_get_string (VALUE class, VALUE window, VALUE property) { @@ -4698,10 +4099,6 @@ weechat_ruby_api_window_get_string (VALUE class, VALUE window, VALUE property) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_window_get_pointer: get a window property as pointer - */ - static VALUE weechat_ruby_api_window_get_pointer (VALUE class, VALUE window, VALUE property) { @@ -4724,10 +4121,6 @@ weechat_ruby_api_window_get_pointer (VALUE class, VALUE window, VALUE property) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_window_set_title: set window title - */ - static VALUE weechat_ruby_api_window_set_title (VALUE class, VALUE title) { @@ -4746,10 +4139,6 @@ weechat_ruby_api_window_set_title (VALUE class, VALUE title) API_RETURN_OK; } -/* - * weechat_ruby_api_nicklist_add_group: add a group in nicklist - */ - static VALUE weechat_ruby_api_nicklist_add_group (VALUE class, VALUE buffer, VALUE parent_group, VALUE name, @@ -4785,10 +4174,6 @@ weechat_ruby_api_nicklist_add_group (VALUE class, VALUE buffer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_search_group: search a group in nicklist - */ - static VALUE weechat_ruby_api_nicklist_search_group (VALUE class, VALUE buffer, VALUE from_group, VALUE name) @@ -4815,10 +4200,6 @@ weechat_ruby_api_nicklist_search_group (VALUE class, VALUE buffer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_add_nick: add a nick in nicklist - */ - static VALUE weechat_ruby_api_nicklist_add_nick (VALUE class, VALUE buffer, VALUE group, VALUE name, VALUE color, VALUE prefix, @@ -4861,10 +4242,6 @@ weechat_ruby_api_nicklist_add_nick (VALUE class, VALUE buffer, VALUE group, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_search_nick: search a nick in nicklist - */ - static VALUE weechat_ruby_api_nicklist_search_nick (VALUE class, VALUE buffer, VALUE from_group, VALUE name) @@ -4891,10 +4268,6 @@ weechat_ruby_api_nicklist_search_nick (VALUE class, VALUE buffer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_remove_group: remove a group from nicklist - */ - static VALUE weechat_ruby_api_nicklist_remove_group (VALUE class, VALUE buffer, VALUE group) { @@ -4916,10 +4289,6 @@ weechat_ruby_api_nicklist_remove_group (VALUE class, VALUE buffer, VALUE group) API_RETURN_OK; } -/* - * weechat_ruby_api_nicklist_remove_nick: remove a nick from nicklist - */ - static VALUE weechat_ruby_api_nicklist_remove_nick (VALUE class, VALUE buffer, VALUE nick) { @@ -4941,10 +4310,6 @@ weechat_ruby_api_nicklist_remove_nick (VALUE class, VALUE buffer, VALUE nick) API_RETURN_OK; } -/* - * weechat_ruby_api_nicklist_remove_all: remove all groups/nicks from nicklist - */ - static VALUE weechat_ruby_api_nicklist_remove_all (VALUE class, VALUE buffer) { @@ -4963,10 +4328,6 @@ weechat_ruby_api_nicklist_remove_all (VALUE class, VALUE buffer) API_RETURN_OK; } -/* - * weechat_ruby_api_nicklist_group_get_integer: get a group property as integer - */ - static VALUE weechat_ruby_api_nicklist_group_get_integer (VALUE class, VALUE buffer, VALUE group, VALUE property) @@ -4993,10 +4354,6 @@ weechat_ruby_api_nicklist_group_get_integer (VALUE class, VALUE buffer, API_RETURN_INT(value); } -/* - * weechat_ruby_api_nicklist_group_get_string: get a group property as string - */ - static VALUE weechat_ruby_api_nicklist_group_get_string (VALUE class, VALUE buffer, VALUE group, VALUE property) @@ -5023,10 +4380,6 @@ weechat_ruby_api_nicklist_group_get_string (VALUE class, VALUE buffer, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_nicklist_group_get_pointer: get a group property as pointer - */ - static VALUE weechat_ruby_api_nicklist_group_get_pointer (VALUE class, VALUE buffer, VALUE group, VALUE property) @@ -5053,10 +4406,6 @@ weechat_ruby_api_nicklist_group_get_pointer (VALUE class, VALUE buffer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_group_set: set a group property - */ - static VALUE weechat_ruby_api_nicklist_group_set (VALUE class, VALUE buffer, VALUE group, VALUE property, VALUE value) @@ -5085,10 +4434,6 @@ weechat_ruby_api_nicklist_group_set (VALUE class, VALUE buffer, VALUE group, API_RETURN_OK; } -/* - * weechat_ruby_api_nicklist_nick_get_integer: get a nick property as integer - */ - static VALUE weechat_ruby_api_nicklist_nick_get_integer (VALUE class, VALUE buffer, VALUE nick, VALUE property) @@ -5115,10 +4460,6 @@ weechat_ruby_api_nicklist_nick_get_integer (VALUE class, VALUE buffer, API_RETURN_INT(value); } -/* - * weechat_ruby_api_nicklist_nick_get_string: get a nick property as string - */ - static VALUE weechat_ruby_api_nicklist_nick_get_string (VALUE class, VALUE buffer, VALUE nick, VALUE property) @@ -5145,10 +4486,6 @@ weechat_ruby_api_nicklist_nick_get_string (VALUE class, VALUE buffer, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_nicklist_nick_get_pointer: get a nick property as pointer - */ - static VALUE weechat_ruby_api_nicklist_nick_get_pointer (VALUE class, VALUE buffer, VALUE nick, VALUE property) @@ -5175,10 +4512,6 @@ weechat_ruby_api_nicklist_nick_get_pointer (VALUE class, VALUE buffer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_nicklist_nick_set: set a nick property - */ - static VALUE weechat_ruby_api_nicklist_nick_set (VALUE class, VALUE buffer, VALUE nick, VALUE property, VALUE value) @@ -5207,10 +4540,6 @@ weechat_ruby_api_nicklist_nick_set (VALUE class, VALUE buffer, VALUE nick, API_RETURN_OK; } -/* - * weechat_ruby_api_bar_item_search: search a bar item - */ - static VALUE weechat_ruby_api_bar_item_search (VALUE class, VALUE name) { @@ -5230,10 +4559,6 @@ weechat_ruby_api_bar_item_search (VALUE class, VALUE name) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_ruby_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -5266,10 +4591,6 @@ weechat_ruby_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat_ruby_api_bar_item_new: add a new bar item - */ - static VALUE weechat_ruby_api_bar_item_new (VALUE class, VALUE name, VALUE function, VALUE data) @@ -5299,10 +4620,6 @@ weechat_ruby_api_bar_item_new (VALUE class, VALUE name, VALUE function, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_bar_item_update: update a bar item on screen - */ - static VALUE weechat_ruby_api_bar_item_update (VALUE class, VALUE name) { @@ -5321,10 +4638,6 @@ weechat_ruby_api_bar_item_update (VALUE class, VALUE name) API_RETURN_OK; } -/* - * weechat_ruby_api_bar_item_remove: remove a bar item - */ - static VALUE weechat_ruby_api_bar_item_remove (VALUE class, VALUE item) { @@ -5345,10 +4658,6 @@ weechat_ruby_api_bar_item_remove (VALUE class, VALUE item) API_RETURN_OK; } -/* - * weechat_ruby_api_bar_search: search a bar - */ - static VALUE weechat_ruby_api_bar_search (VALUE class, VALUE name) { @@ -5368,10 +4677,6 @@ weechat_ruby_api_bar_search (VALUE class, VALUE name) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_bar_new: add a new bar - */ - static VALUE weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden, VALUE priority, VALUE type, VALUE conditions, @@ -5445,10 +4750,6 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_bar_set: set a bar property - */ - static VALUE weechat_ruby_api_bar_set (VALUE class, VALUE bar, VALUE property, VALUE value) { @@ -5473,10 +4774,6 @@ weechat_ruby_api_bar_set (VALUE class, VALUE bar, VALUE property, VALUE value) API_RETURN_OK; } -/* - * weechat_ruby_api_bar_update: update a bar on screen - */ - static VALUE weechat_ruby_api_bar_update (VALUE class, VALUE name) { @@ -5495,10 +4792,6 @@ weechat_ruby_api_bar_update (VALUE class, VALUE name) API_RETURN_OK; } -/* - * weechat_ruby_api_bar_remove: remove a bar - */ - static VALUE weechat_ruby_api_bar_remove (VALUE class, VALUE bar) { @@ -5517,10 +4810,6 @@ weechat_ruby_api_bar_remove (VALUE class, VALUE bar) API_RETURN_OK; } -/* - * weechat_ruby_api_command: send command to server - */ - static VALUE weechat_ruby_api_command (VALUE class, VALUE buffer, VALUE command) { @@ -5544,10 +4833,6 @@ weechat_ruby_api_command (VALUE class, VALUE buffer, VALUE command) API_RETURN_OK; } -/* - * weechat_ruby_api_info_get: get info (as string) - */ - static VALUE weechat_ruby_api_info_get (VALUE class, VALUE info_name, VALUE arguments) { @@ -5569,10 +4854,6 @@ weechat_ruby_api_info_get (VALUE class, VALUE info_name, VALUE arguments) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_info_get_hashtable: get info (as hashtable) - */ - static VALUE weechat_ruby_api_info_get_hashtable (VALUE class, VALUE info_name, VALUE hash) @@ -5605,10 +4886,6 @@ weechat_ruby_api_info_get_hashtable (VALUE class, VALUE info_name, return result_hash; } -/* - * weechat_ruby_api_infolist_new: create new infolist - */ - static VALUE weechat_ruby_api_infolist_new (VALUE class) { @@ -5622,10 +4899,6 @@ weechat_ruby_api_infolist_new (VALUE class) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_new_item: create new item in infolist - */ - static VALUE weechat_ruby_api_infolist_new_item (VALUE class, VALUE infolist) { @@ -5645,11 +4918,6 @@ weechat_ruby_api_infolist_new_item (VALUE class, VALUE infolist) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_new_var_integer: create new integer variable in - * infolist - */ - static VALUE weechat_ruby_api_infolist_new_var_integer (VALUE class, VALUE infolist, VALUE name, VALUE value) @@ -5677,11 +4945,6 @@ weechat_ruby_api_infolist_new_var_integer (VALUE class, VALUE infolist, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_new_var_string: create new string variable in - * infolist - */ - static VALUE weechat_ruby_api_infolist_new_var_string (VALUE class, VALUE infolist, VALUE name, VALUE value) @@ -5708,11 +4971,6 @@ weechat_ruby_api_infolist_new_var_string (VALUE class, VALUE infolist, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_new_var_pointer: create new pointer variable in - * infolist - */ - static VALUE weechat_ruby_api_infolist_new_var_pointer (VALUE class, VALUE infolist, VALUE name, VALUE value) @@ -5739,10 +4997,6 @@ weechat_ruby_api_infolist_new_var_pointer (VALUE class, VALUE infolist, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_new_var_time: create new time variable in infolist - */ - static VALUE weechat_ruby_api_infolist_new_var_time (VALUE class, VALUE infolist, VALUE name, VALUE value) @@ -5770,10 +5024,6 @@ weechat_ruby_api_infolist_new_var_time (VALUE class, VALUE infolist, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_get: get list with infos - */ - static VALUE weechat_ruby_api_infolist_get (VALUE class, VALUE name, VALUE pointer, VALUE arguments) @@ -5800,10 +5050,6 @@ weechat_ruby_api_infolist_get (VALUE class, VALUE name, VALUE pointer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_next: move item pointer to next item in infolist - */ - static VALUE weechat_ruby_api_infolist_next (VALUE class, VALUE infolist) { @@ -5823,10 +5069,6 @@ weechat_ruby_api_infolist_next (VALUE class, VALUE infolist) API_RETURN_INT(value); } -/* - * weechat_ruby_api_infolist_prev: move item pointer to previous item in infolist - */ - static VALUE weechat_ruby_api_infolist_prev (VALUE class, VALUE infolist) { @@ -5846,11 +5088,6 @@ weechat_ruby_api_infolist_prev (VALUE class, VALUE infolist) API_RETURN_INT(value); } -/* - * weechat_ruby_api_infolist_reset_item_cursor: reset pointer to current item - * in infolist - */ - static VALUE weechat_ruby_api_infolist_reset_item_cursor (VALUE class, VALUE infolist) { @@ -5869,10 +5106,6 @@ weechat_ruby_api_infolist_reset_item_cursor (VALUE class, VALUE infolist) API_RETURN_OK; } -/* - * weechat_ruby_api_infolist_fields: get list of fields for current item of infolist - */ - static VALUE weechat_ruby_api_infolist_fields (VALUE class, VALUE infolist) { @@ -5892,10 +5125,6 @@ weechat_ruby_api_infolist_fields (VALUE class, VALUE infolist) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_infolist_integer: get integer value of a variable in infolist - */ - static VALUE weechat_ruby_api_infolist_integer (VALUE class, VALUE infolist, VALUE variable) { @@ -5917,10 +5146,6 @@ weechat_ruby_api_infolist_integer (VALUE class, VALUE infolist, VALUE variable) API_RETURN_INT(value); } -/* - * weechat_ruby_api_infolist_string: get string value of a variable in infolist - */ - static VALUE weechat_ruby_api_infolist_string (VALUE class, VALUE infolist, VALUE variable) { @@ -5942,10 +5167,6 @@ weechat_ruby_api_infolist_string (VALUE class, VALUE infolist, VALUE variable) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_infolist_pointer: get pointer value of a variable in infolist - */ - static VALUE weechat_ruby_api_infolist_pointer (VALUE class, VALUE infolist, VALUE variable) { @@ -5967,10 +5188,6 @@ weechat_ruby_api_infolist_pointer (VALUE class, VALUE infolist, VALUE variable) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_time: get time value of a variable in infolist - */ - static VALUE weechat_ruby_api_infolist_time (VALUE class, VALUE infolist, VALUE variable) { @@ -5999,10 +5216,6 @@ weechat_ruby_api_infolist_time (VALUE class, VALUE infolist, VALUE variable) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_infolist_free: free infolist - */ - static VALUE weechat_ruby_api_infolist_free (VALUE class, VALUE infolist) { @@ -6021,10 +5234,6 @@ weechat_ruby_api_infolist_free (VALUE class, VALUE infolist) API_RETURN_OK; } -/* - * weechat_ruby_api_hdata_get: get hdata - */ - static VALUE weechat_ruby_api_hdata_get (VALUE class, VALUE name) { @@ -6044,10 +5253,6 @@ weechat_ruby_api_hdata_get (VALUE class, VALUE name) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hdata_get_var_offset: get offset of variable in hdata - */ - static VALUE weechat_ruby_api_hdata_get_var_offset (VALUE class, VALUE hdata, VALUE name) { @@ -6069,11 +5274,6 @@ weechat_ruby_api_hdata_get_var_offset (VALUE class, VALUE hdata, VALUE name) API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_get_var_type_string: get type of variable as string - * in hdata - */ - static VALUE weechat_ruby_api_hdata_get_var_type_string (VALUE class, VALUE hdata, VALUE name) @@ -6096,10 +5296,6 @@ weechat_ruby_api_hdata_get_var_type_string (VALUE class, VALUE hdata, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_hdata_get_var_array_size: get array size for variable in hdata - */ - static VALUE weechat_ruby_api_hdata_get_var_array_size (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6126,11 +5322,6 @@ weechat_ruby_api_hdata_get_var_array_size (VALUE class, VALUE hdata, VALUE point API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_get_var_array_size_string: get array size for variable - * in hdata (as string) - */ - static VALUE weechat_ruby_api_hdata_get_var_array_size_string (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6157,10 +5348,6 @@ weechat_ruby_api_hdata_get_var_array_size_string (VALUE class, VALUE hdata, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_hdata_get_var_hdata: get hdata for variable in hdata - */ - static VALUE weechat_ruby_api_hdata_get_var_hdata (VALUE class, VALUE hdata, VALUE name) { @@ -6182,10 +5369,6 @@ weechat_ruby_api_hdata_get_var_hdata (VALUE class, VALUE hdata, VALUE name) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_hdata_get_list: get list pointer in hdata - */ - static VALUE weechat_ruby_api_hdata_get_list (VALUE class, VALUE hdata, VALUE name) { @@ -6208,10 +5391,6 @@ weechat_ruby_api_hdata_get_list (VALUE class, VALUE hdata, VALUE name) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hdata_check_pointer: check pointer with hdata/list - */ - static VALUE weechat_ruby_api_hdata_check_pointer (VALUE class, VALUE hdata, VALUE list, VALUE pointer) @@ -6238,10 +5417,6 @@ weechat_ruby_api_hdata_check_pointer (VALUE class, VALUE hdata, VALUE list, API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_move: move pointer to another element in list - */ - static VALUE weechat_ruby_api_hdata_move (VALUE class, VALUE hdata, VALUE pointer, VALUE count) @@ -6269,11 +5444,6 @@ weechat_ruby_api_hdata_move (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hdata_char: get char value of a variable in structure using - * hdata - */ - static VALUE weechat_ruby_api_hdata_char (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6300,11 +5470,6 @@ weechat_ruby_api_hdata_char (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_integer: get integer value of a variable in structure - * using hdata - */ - static VALUE weechat_ruby_api_hdata_integer (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6331,11 +5496,6 @@ weechat_ruby_api_hdata_integer (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_long: get long value of a variable in structure using - * hdata - */ - static VALUE weechat_ruby_api_hdata_long (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6362,11 +5522,6 @@ weechat_ruby_api_hdata_long (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_LONG(value); } -/* - * weechat_ruby_api_hdata_string: get string value of a variable in structure - * using hdata - */ - static VALUE weechat_ruby_api_hdata_string (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6393,11 +5548,6 @@ weechat_ruby_api_hdata_string (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_STRING(result); } -/* - * weechat_ruby_api_hdata_pointer: get pointer value of a variable in structure - * using hdata - */ - static VALUE weechat_ruby_api_hdata_pointer (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6424,11 +5574,6 @@ weechat_ruby_api_hdata_pointer (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hdata_time: get time value of a variable in structure using - * hdata - */ - static VALUE weechat_ruby_api_hdata_time (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6459,11 +5604,6 @@ weechat_ruby_api_hdata_time (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_hdata_hashtable: get hashtable value of a variable in - * structure using hdata - */ - static VALUE weechat_ruby_api_hdata_hashtable (VALUE class, VALUE hdata, VALUE pointer, VALUE name) @@ -6491,10 +5631,6 @@ weechat_ruby_api_hdata_hashtable (VALUE class, VALUE hdata, VALUE pointer, return result_hash; } -/* - * weechat_ruby_api_hdata_update: update data in a hdata - */ - static VALUE weechat_ruby_api_hdata_update (VALUE class, VALUE hdata, VALUE pointer, VALUE hashtable) @@ -6528,10 +5664,6 @@ weechat_ruby_api_hdata_update (VALUE class, VALUE hdata, VALUE pointer, API_RETURN_INT(value); } -/* - * weechat_ruby_api_hdata_get_string: get hdata property as string - */ - static VALUE weechat_ruby_api_hdata_get_string (VALUE class, VALUE hdata, VALUE property) { @@ -6554,10 +5686,6 @@ weechat_ruby_api_hdata_get_string (VALUE class, VALUE hdata, VALUE property) API_RETURN_STRING(result); } -/* - * weechat_ruby_api_upgrade_new: create an upgrade file - */ - static VALUE weechat_ruby_api_upgrade_new (VALUE class, VALUE filename, VALUE write) { @@ -6581,10 +5709,6 @@ weechat_ruby_api_upgrade_new (VALUE class, VALUE filename, VALUE write) API_RETURN_STRING_FREE(result); } -/* - * weechat_ruby_api_upgrade_write_object: write object in upgrade file - */ - static VALUE weechat_ruby_api_upgrade_write_object (VALUE class, VALUE upgrade_file, VALUE object_id, VALUE infolist) @@ -6611,10 +5735,6 @@ weechat_ruby_api_upgrade_write_object (VALUE class, VALUE upgrade_file, API_RETURN_INT(rc); } -/* - * weechat_ruby_api_upgrade_read_cb: callback for reading object in upgrade file - */ - int weechat_ruby_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -6660,10 +5780,6 @@ weechat_ruby_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_ruby_api_upgrade_read: read upgrade file - */ - static VALUE weechat_ruby_api_upgrade_read (VALUE class, VALUE upgrade_file, VALUE function, VALUE data) @@ -6693,10 +5809,6 @@ weechat_ruby_api_upgrade_read (VALUE class, VALUE upgrade_file, API_RETURN_INT(rc); } -/* - * weechat_ruby_api_upgrade_close: close upgrade file - */ - static VALUE weechat_ruby_api_upgrade_close (VALUE class, VALUE upgrade_file) { @@ -6716,7 +5828,7 @@ weechat_ruby_api_upgrade_close (VALUE class, VALUE upgrade_file) } /* - * weechat_ruby_api_init: init Ruby API: add variables and functions + * Initializes ruby functions and constants. */ void diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index e2b68db58..efea7116c 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -103,8 +103,7 @@ typedef struct protect_call_arg { /* - * weechat_ruby_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -124,7 +123,7 @@ weechat_ruby_hashtable_map_cb (void *data, } /* - * weechat_ruby_hashtable_to_hash: get ruby hash with a WeeChat hashtable + * Gets ruby hash with a WeeChat hashtable. */ VALUE @@ -143,6 +142,10 @@ weechat_ruby_hashtable_to_hash (struct t_hashtable *hashtable) return hash; } +/* + * Callback called for each key/value in a hashtable. + */ + int weechat_ruby_hash_foreach_cb (VALUE key, VALUE value, void *arg) { @@ -170,9 +173,9 @@ weechat_ruby_hash_foreach_cb (VALUE key, VALUE value, void *arg) } /* - * weechat_ruby_hash_to_hashtable: get WeeChat hashtable with ruby hashtable - * Note: hashtable has to be released after use - * with call to weechat_hashtable_free() + * Gets WeeChat hashtable with ruby hashtable. + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -196,7 +199,7 @@ weechat_ruby_hash_to_hashtable (VALUE hash, int size, const char *type_keys, } /* - * protect_funcall0 : used to protect a function call + * Used to protect a function call. */ static VALUE @@ -209,7 +212,7 @@ protect_funcall0 (VALUE arg) } /* - * rb_protect_funcall: function call in protect mode + * Calls function in protected mode. */ VALUE @@ -225,7 +228,7 @@ rb_protect_funcall (VALUE recv, ID mid, int *state, int argc, VALUE *argv) } /* - * weechat_ruby_print_exception: display ruby exception + * Displays ruby exception. */ int @@ -306,7 +309,7 @@ weechat_ruby_print_exception (VALUE err) } /* - * weechat_ruby_exec: execute a ruby function + * Executes a ruby function. */ void * @@ -416,7 +419,7 @@ weechat_ruby_exec (struct t_plugin_script *script, } /* - * weechat_ruby_output: redirection for stdout and stderr + * Redirection for stdout and stderr. */ static VALUE @@ -466,7 +469,7 @@ weechat_ruby_output (VALUE self, VALUE str) } /* - * weechat_ruby_output_flush: just for compatibility + * Function used for compatibility. */ static VALUE @@ -479,7 +482,11 @@ weechat_ruby_output_flush (VALUE self) } /* - * weechat_ruby_load: load a Ruby script + * Loads a ruby script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -615,7 +622,7 @@ weechat_ruby_load (const char *filename) } /* - * weechat_ruby_load_cb: callback for weechat_script_auto_load() function + * Callback for weechat_script_auto_load() function. */ void @@ -628,7 +635,7 @@ weechat_ruby_load_cb (void *data, const char *filename) } /* - * weechat_ruby_unload: unload a Ruby script + * Unloads a ruby script. */ void @@ -675,7 +682,7 @@ weechat_ruby_unload (struct t_plugin_script *script) } /* - * weechat_ruby_unload_name: unload a Ruby script by name + * Unloads a ruby script by name. */ void @@ -703,7 +710,7 @@ weechat_ruby_unload_name (const char *name) } /* - * weechat_ruby_reload_name: reload a Ruby script by name + * Reloads a ruby script by name. */ void @@ -738,7 +745,7 @@ weechat_ruby_reload_name (const char *name) } /* - * weechat_ruby_unload_all: unload all Ruby scripts + * Unloads all ruby scripts. */ void @@ -751,7 +758,7 @@ weechat_ruby_unload_all () } /* - * weechat_ruby_command_cb: callback for "/ruby" command + * Callback for command "/ruby". */ int @@ -823,7 +830,7 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Ruby script */ + /* load ruby script */ path_script = plugin_script_search_path (weechat_ruby_plugin, ptr_name); weechat_ruby_load ((path_script) ? path_script : ptr_name); @@ -832,12 +839,12 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Ruby script */ + /* reload one ruby script */ weechat_ruby_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Ruby script */ + /* unload ruby script */ weechat_ruby_unload_name (ptr_name); } ruby_quiet = 0; @@ -855,7 +862,7 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_ruby_completion_cb: callback for script completion + * Adds ruby scripts to completion list. */ int @@ -874,7 +881,7 @@ weechat_ruby_completion_cb (void *data, const char *completion_item, } /* - * weechat_ruby_hdata_cb: callback for hdata + * Returns hdata for ruby scripts. */ struct t_hdata * @@ -889,7 +896,7 @@ weechat_ruby_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_ruby_infolist_cb: callback for infolist + * Returns infolist with ruby scripts. */ struct t_infolist * @@ -913,7 +920,7 @@ weechat_ruby_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_ruby_signal_debug_dump_cb: dump Ruby plugin data in WeeChat log file + * Dumps ruby plugin data in WeeChat log file. */ int @@ -935,7 +942,7 @@ weechat_ruby_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_ruby_signal_buffer_closed_cb: callback called when a buffer is closed + * Callback called when a buffer is closed. */ int @@ -954,7 +961,7 @@ weechat_ruby_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_ruby_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -988,8 +995,7 @@ weechat_ruby_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_ruby_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -1024,7 +1030,7 @@ weechat_ruby_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_plugin_init: initialize Ruby plugin + * Initializes ruby plugin. */ int @@ -1153,7 +1159,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: shutdown Ruby interface + * Ends ruby plugin. */ int @@ -1165,7 +1171,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) ruby_quiet = 0; /* - * Do not cleanup Ruby because this causes a crash when plugin is reloaded + * Do not cleanup ruby because this causes a crash when plugin is reloaded * again. This causes a memory leak, but I don't know better solution to * this problem :( */ diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c index 2f8ebab50..546bc0ec2 100644 --- a/src/plugins/script/script-action.c +++ b/src/plugins/script/script-action.c @@ -44,7 +44,7 @@ void script_action_install (int quiet); /* - * script_action_list: list loaded scripts (all languages) + * Lists loaded scripts (all languages). */ void @@ -95,8 +95,9 @@ script_action_list () } /* - * script_action_list_input: list loaded scripts (all languages) in input - * (send it to buffer if send_to_buffer == 1) + * Lists loaded scripts (all languages) in input. + * + * Sends input to buffer if send_to_buffer == 1. */ void @@ -154,7 +155,7 @@ script_action_list_input (int send_to_buffer) } /* - * script_action_load: load a script + * Loads a script. */ void @@ -197,7 +198,7 @@ script_action_load (const char *name, int quiet) } /* - * script_action_unload: unload a script + * Unloads a script. */ void @@ -303,7 +304,7 @@ script_action_unload (const char *name, int quiet) } /* - * script_action_reload: reload a script + * Reloads a script. */ void @@ -409,7 +410,7 @@ script_action_reload (const char *name, int quiet) } /* - * script_action_installnext_timer_cb: callback called to install next script + * Installs next script. */ int @@ -424,8 +425,7 @@ script_action_installnext_timer_cb (void *data, int remaining_calls) } /* - * script_action_install_process_cb: callback called when script is downloaded - * (for installing it) + * Installs script (after download of script). */ int @@ -494,9 +494,7 @@ script_action_install_process_cb (void *data, const char *command, } /* - * script_action_get_next_script_to_install: get next script to install - * according to "install_order" in - * script + * Gets next script to install according to "install_order" in scripts. */ struct t_script_repo * @@ -521,7 +519,7 @@ script_action_get_next_script_to_install () } /* - * script_action_install: install script(s) marked for install + * Installs scrip(s) marked for install. */ void @@ -594,7 +592,7 @@ script_action_install (int quiet) } /* - * script_action_remove: remove a script + * Removes a script. */ void @@ -672,8 +670,11 @@ script_action_remove (const char *name, int quiet) } /* - * script_action_hold: (un)hold a script - * return 1 if ok, 0 if error + * Un(hold)s a script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -722,9 +723,8 @@ script_action_hold (const char *name, int quiet) } /* - * script_action_show_diff_process_cb: callback called when script is - * downloaded (for showing source code - * below script detail) + * Shows a diff between script installed and script in repository (after + * download of script). */ int @@ -814,9 +814,7 @@ script_action_show_diff_process_cb (void *data, const char *command, } /* - * script_action_show_source_process_cb: callback called when script is - * downloaded (for showing source code - * below script detail) + * Shows source code of script (after download of script). */ int @@ -951,7 +949,7 @@ script_action_show_source_process_cb (void *data, const char *command, } /* - * script_action_show: show detailed info on a script + * Shows detailed info on a script. */ void @@ -1029,7 +1027,7 @@ script_action_show (const char *name, int quiet) } /* - * script_action_showdiff: jump to diff on buffer with detail of script + * Jumps to diff on buffer with detail of script. */ void @@ -1066,8 +1064,11 @@ script_action_showdiff () } /* - * script_action_run: run planned actions - * return 1 if an action was executed, otherwise 0 + * Runs planned actions. + * + * Returns: + * 1: at least an action was executed + * 0: no action executed */ int @@ -1304,7 +1305,7 @@ script_action_run () /* - * script_action_add: add an action to list of actions + * Adds an action to list of actions. */ void @@ -1332,9 +1333,10 @@ script_action_add (const char *action) } /* - * script_action_schedule: schedule action - * if "need_repository" is 1, then the action will be - * executed only when the repository file is up-to-date + * Schedules an action. + * + * If "need_repository" is 1, then the action will be executed only when the + * repository file is up-to-date. */ void diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index 4192b6c73..61f3e32c4 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -41,7 +41,7 @@ int script_buffer_detail_script_line_diff = -1; /* - * script_buffer_display_line_script: display a line with script + * Displays a line with script. */ void @@ -332,8 +332,9 @@ script_buffer_display_line_script (int line, struct t_script_repo *script) } /* - * script_buffer_detail_label: get header of a line for detail of script - * The returned string is aligned on the right + * Gets header of a line for detail of script. + * + * Returns a string aligned on the right. */ const char * @@ -355,7 +356,7 @@ script_buffer_detail_label (const char *text, int max_length) } /* - * script_buffer_display_detail_script: display detail on a script + * Displays detail on a script. */ void @@ -481,7 +482,7 @@ script_buffer_display_detail_script (struct t_script_repo *script) } /* - * script_buffer_refresh: update list of scripts in script buffer + * Updates list of scripts in script buffer. */ void @@ -543,7 +544,7 @@ script_buffer_refresh (int clear) } /* - * script_buffer_set_current_line: set current selected line in script buffer + * Sets current selected line. */ void @@ -564,7 +565,7 @@ script_buffer_set_current_line (int line) } /* - * script_buffer_show_detail_script: show detailed info on a script + * Shows detailed info on a script. */ void @@ -586,7 +587,7 @@ script_buffer_show_detail_script (struct t_script_repo *script) } /* - * script_buffer_get_window_info: get infos about window + * Gets info about a window. */ void @@ -622,8 +623,11 @@ script_buffer_get_window_info (struct t_gui_window *window, } /* - * script_buffer_check_line_outside_window: check if current line is outside - * window + * Checks if current line is outside window. + * + * Returns: + * 1: line is outside window + * 0: line is inside window */ void @@ -653,8 +657,7 @@ script_buffer_check_line_outside_window () } /* - * script_buffer_window_scrolled_cb: called when signal "window_scrolled" is - * received + * Callback for signal "window_scrolled". */ int @@ -698,8 +701,7 @@ script_buffer_window_scrolled_cb (void *data, const char *signal, } /* - * script_buffer_input_cb: callback called when user send data to script list - * buffer + * Callback for user data in script buffer. */ int @@ -771,7 +773,7 @@ script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, } /* - * script_buffer_close_cb: callback called when script buffer is closed + * Callback called when script buffer is closed. */ int @@ -789,8 +791,8 @@ script_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * script_buffer_set_callbacks: restore buffers callbacks (input and close) for - * buffer created by script plugin + * Restore buffer callbacks (input and close) for buffer created by script + * plugin. */ void @@ -808,7 +810,7 @@ script_buffer_set_callbacks () } /* - * script_buffer_set_keys: set keys on script buffer + * Sets keys on script buffer. */ void @@ -845,7 +847,7 @@ script_buffer_set_keys () } /* - * script_buffer_open: open script buffer (to display list of scripts) + * Opens script buffer. */ void diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c index b8c230967..c874ab02f 100644 --- a/src/plugins/script/script-command.c +++ b/src/plugins/script/script-command.c @@ -35,7 +35,7 @@ /* - * script_command_action: run action + * Runs an action. */ void @@ -119,7 +119,7 @@ script_command_action (struct t_gui_buffer *buffer, const char *action, } /* - * script_command_script: command to manage scripts + * Callback for command "/script": manages scripts. */ int @@ -269,7 +269,7 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc, } /* - * scrit_command_init: init script commands (create hooks) + * Hook command. */ void diff --git a/src/plugins/script/script-completion.c b/src/plugins/script/script-completion.c index 3c0db35cd..a4e080c00 100644 --- a/src/plugins/script/script-completion.c +++ b/src/plugins/script/script-completion.c @@ -32,8 +32,7 @@ /* - * script_completion_scripts_cb: callback for completion with scripts in - * repository + * Adds scripts to completion list. */ int @@ -60,8 +59,7 @@ script_completion_scripts_cb (void *data, const char *completion_item, } /* - * script_completion_scripts_installed_cb: callback for completion with scripts - * installed + * Adds installed scripts to completion list. */ int @@ -91,8 +89,7 @@ script_completion_scripts_installed_cb (void *data, const char *completion_item, } /* - * script_completion_exec_file_cb: callback called for each file in script - * directories + * Adds files in script directories to completion list. */ void @@ -125,8 +122,7 @@ script_completion_exec_file_cb (void *data, const char *filename) } /* - * script_completion_scripts_files_cb: callback for completion with files in - * script directories + * Adds files in script directories to completion list. */ int @@ -174,8 +170,7 @@ script_completion_scripts_files_cb (void *data, const char *completion_item, } /* - * script_completion_tags_cb: callback for completion with tags from scripts in - * repository + * Adds tags from scripts in repository to completion list. */ int @@ -216,7 +211,7 @@ script_completion_tags_cb (void *data, const char *completion_item, } /* - * script_completion_init: init completion for script plugin + * Hooks completions. */ void diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c index b2997df4b..a8519241b 100644 --- a/src/plugins/script/script-config.c +++ b/src/plugins/script/script-config.c @@ -89,10 +89,11 @@ struct t_config_option *script_config_scripts_url; /* - * script_config_get_diff_command: get diff command - * if option is "auto", try to find git, and - * fallbacks on "diff" if not found - * return NULL if no diff command is set + * Gets the diff command (option "script.look.diff_command"). + * + * If option is "auto", try to find git, and fallbacks on "diff" if not found. + * + * Returns NULL if no diff command is set. */ const char * @@ -142,8 +143,9 @@ script_config_get_diff_command () } /* - * script_config_get_dir: get local directory for script - * Note: result must be freed after use + * Gets local directory for script. + * + * Note: result must be freed after use. */ char * @@ -173,9 +175,10 @@ script_config_get_dir () } /* - * script_config_get_xml_filename: get filename with scripts (by default - * "/home/xxx/.weechat/script/plugins.xml.gz") - * Note: result must be freed after use + * Gets filename with script + * (by default "/home/xxx/.weechat/script/plugins.xml.gz"). + * + * Note: result must be freed after use. */ char * @@ -194,13 +197,13 @@ script_config_get_xml_filename () } /* - * script_config_get_script_download_filename: get filename for a script to - * download, for eample: - * "/home/xxx/.weechat/script/iset.pl" - * (if suffix is not NULL, it is - * added to filename) - * Note: result must be freed after - * use + * Gets filename for a script to download. + * + * If suffix is not NULL, it is added to filename. + * + * Example: "/home/xxx/.weechat/script/iset.pl" + * + * Note: result must be freed after use. */ char * @@ -227,8 +230,7 @@ script_config_get_script_download_filename (struct t_script_repo *script, } /* - * script_config_refresh_cb: callback called when script buffer needs to be - * refreshed + * Callback for changes on options that require a refresh of script buffer. */ void @@ -243,8 +245,8 @@ script_config_refresh_cb (void *data, struct t_config_option *option) } /* - * script_config_reload_scripts_cb: callback called list of scripts must be - * reloaded from file (plugins.xml.gz) + * Callback for changes on options that require a reload of list of scripts + * (file plugins.xml.gz). */ void @@ -263,8 +265,7 @@ script_config_reload_scripts_cb (void *data, struct t_config_option *option) } /* - * script_config_change_use_keys_cb: callback called when option "use_keys" is - * changed + * Callback for changes on option "script.look.use_keys". */ void @@ -279,8 +280,7 @@ script_config_change_use_keys_cb (void *data, struct t_config_option *option) } /* - * script_config_change_hold_cb: callback called when list of scripts to "hold" - * is changed + * Callback for changes on option "script.scripts.hold". */ void @@ -296,9 +296,10 @@ script_config_change_hold_cb (void *data, struct t_config_option *option) } /* - * script_config_hold: hold a script - * Note: the option is changed, but the status "held" - * in script is NOT updated by this function + * Holds a script. + * + * Note: the option is changed, but the status "held" in script is NOT updated + * by this function. */ void @@ -339,9 +340,10 @@ script_config_hold (const char *name_with_extension) } /* - * script_config_unhold: unhold a script - * Note: the option is changed, but the status "held" - * in script is NOT updated by this function + * Unholds a script. + * + * Note: the option is changed, but the status "held" in script is NOT updated + * by this function. */ void @@ -378,7 +380,7 @@ script_config_unhold (const char *name_with_extension) } /* - * script_config_reaload: reload script configuration file + * Reloads script configuration file. */ int @@ -391,8 +393,11 @@ script_config_reload (void *data, struct t_config_file *config_file) } /* - * script_config_init: init script configuration file - * return: 1 if ok, 0 if error + * Initializes script configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -699,7 +704,7 @@ script_config_init () } /* - * script_config_read: read script configuration file + * Reads script configuration file. */ int @@ -709,7 +714,7 @@ script_config_read () } /* - * script_config_write: write script configuration file + * Writes script configuration file. */ int @@ -719,7 +724,7 @@ script_config_write () } /* - * script_config_free: free script configuration file + * Frees script configuration file. */ void diff --git a/src/plugins/script/script-info.c b/src/plugins/script/script-info.c index 2b08216ed..aed5b487c 100644 --- a/src/plugins/script/script-info.c +++ b/src/plugins/script/script-info.c @@ -31,7 +31,7 @@ /* - * script_info_get_infolist_cb: callback called when script infolist is asked + * Returns infolist with script info. */ struct t_infolist * @@ -91,7 +91,7 @@ script_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * script_info_init: initialize info, infolist and hdata hooks for script plugin + * Hooks infolist and hdata. */ void diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index fd3ae7ee0..f22462c9e 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -57,9 +57,11 @@ char *script_repo_filter = NULL; /* - * script_repo_script_valid: check if a script pointer exists - * return 1 if script exists - * 0 if script is not found + * Checks if a script pointer is valid. + * + * Returns: + * 1: script exists + * 0: script does not exist */ int @@ -82,8 +84,9 @@ script_repo_script_valid (struct t_script_repo *script) } /* - * script_repo_search_displayed_by_number: search a script displayed by number - * (first script displayed is 0) + * Searches for a script displayed by number (first script displayed is 0). + * + * Returns pointer to script found, NULL if not found. */ struct t_script_repo * @@ -112,8 +115,9 @@ script_repo_search_displayed_by_number (int number) } /* - * script_repo_search_by_name: search a script by name - * (example: "iset") + * Searches for a script by name (example: "iset"). + * + * Returns pointer to script found, NULL if not found. */ struct t_script_repo * @@ -133,8 +137,9 @@ script_repo_search_by_name (const char *name) } /* - * script_repo_search_by_name_ext: search a script by name/extension - * (example: "iset.pl") + * Searches for a script by name/extension (example: "iset.pl"). + * + * Returns pointer to script found, NULL if not found. */ struct t_script_repo * @@ -154,10 +159,10 @@ script_repo_search_by_name_ext (const char *name_with_extension) } /* - * script_repo_get_filename_loaded: get filename of a loaded script - * (it returns name of file and not the link, - * if there is a symbolic to file) - * Note: result has to be free() after use + * Gets filename of a loaded script (returns name of file and not the link, if + * there is a symbolic to file). + * + * Note: result must be freed after use. */ char * @@ -209,9 +214,16 @@ script_repo_get_filename_loaded (struct t_script_repo *script) } /* - * script_repo_get_status_for_display: get status for display - * list is the codes of status to display - * (exemple: "*iaHrN" for all status) + * Gets status for display. + * + * Argument "list" is the codes of status to display: + * * popular + * i installed + * a autoloaded + * ? unknown + * H held + * r running + * N obsolete */ const char * @@ -267,9 +279,10 @@ script_repo_get_status_for_display (struct t_script_repo *script, } /* - * script_repo_get_status_desc_for_display: get status description for display - * (exemple of string returned: - * "popular installed autoloaded loaded") + * Gets status description for display. + * + * Argument "list" is the codes of status to display (see function + * script_repo_get_status_for_display() above). */ const char * @@ -349,7 +362,9 @@ script_repo_get_status_desc_for_display (struct t_script_repo *script, } /* - * script_repo_alloc: allocate a script structure + * Allocates a script structure. + * + * Returns pointer to new script, NULL if error. */ struct t_script_repo * @@ -389,8 +404,12 @@ script_repo_alloc () } /* - * script_repo_compare_scripts: compare two scripts using sort key(s) - * (from option script.look.sort) + * Compares two script using sort key(s) (from option script.look.sort). + * + * Returns: + * < 0: script1 < script2 + * 0: script1 == script2 + * > 0: script1 > script2 */ int @@ -487,7 +506,7 @@ script_repo_compare_scripts (struct t_script_repo *script1, } /* - * script_repo_find_pos: find position for script in list + * Searches for position for script in list (to keep list sorted). */ struct t_script_repo * @@ -507,8 +526,7 @@ script_repo_find_pos (struct t_script_repo *script) } /* - * script_repo_set_max_length_field: set max length for a field in hashtable - * "script_repo_max_length_field" + * Sets max length for a field in hashtable "script_repo_max_length_field". */ void @@ -522,7 +540,7 @@ script_repo_set_max_length_field (const char *field, int length) } /* - * script_repo_add: add script to list of scripts + * Adds a script to list of scripts. */ void @@ -589,7 +607,7 @@ script_repo_add (struct t_script_repo *script) } /* - * script_repo_free: free data in script + * Frees data in a script. */ void @@ -628,7 +646,7 @@ script_repo_free (struct t_script_repo *script) } /* - * script_repo_remove: remove a script from list + * Removes a script from list. */ void @@ -666,7 +684,7 @@ script_repo_remove (struct t_script_repo *script) } /* - * script_repo_remove_all: remove all scripts from list + * Removes all scripts from list. */ void @@ -684,7 +702,11 @@ script_repo_remove_all () } /* - * script_repo_script_is_held: return 1 if script is held, 0 otherwise + * Checks if a script is held. + * + * Returns: + * 1: script is held + * 0: script is not held */ int @@ -713,8 +735,9 @@ script_repo_script_is_held (struct t_script_repo *script) } /* - * script_repo_md5sum_file: return MD5 checksum for content of a file - * Note: result has to be free() after use + * Computes MD5 checksum for the content of a file. + * + * Note: result has to be freed after use. */ char * @@ -763,10 +786,10 @@ script_repo_md5sum_file (const char *filename) } /* - * script_repo_update_status: update status of a script, which are: - * - script installed? - * - script running? - * - new version available? + * Updates following status of a script: + * - script installed? + * - script running? + * - new version available? */ void @@ -856,7 +879,7 @@ script_repo_update_status (struct t_script_repo *script) } /* - * script_repo_update_status_all: update status of all scripts + * Updates status of all scripts. */ void @@ -872,7 +895,7 @@ script_repo_update_status_all () } /* - * script_repo_set_filter: set filter for scripts + * Sets filter for scripts. */ void @@ -884,8 +907,11 @@ script_repo_set_filter (const char *filter) } /* - * script_repo_match_filter: return 1 if script is matching filter string, - * otherwise 0 + * Checks if a script is matching a filter string. + * + * Returns: + * 1: script is matching filter string + * 0: script does not match filter string */ int @@ -954,10 +980,8 @@ script_repo_match_filter (struct t_script_repo *script) } /* - * script_repo_filter_scripts: filter scripts (search string in - * name/description/tags) and mark scripts found as - * "displayed" (0 in displayed for non-matching - * scripts) + * Filters scripts (search string in name/description/tags) and marks scripts + * found as "displayed" (0 in displayed for non-matching scripts). */ void @@ -981,8 +1005,11 @@ script_repo_filter_scripts (const char *search) } /* - * script_repo_file_exists: return 1 if repository file (plugins.xml.gz) exists - * otherwise 0 + * Checks if repository file (plugins.xml.gz) exists. + * + * Returns: + * 1: repository file exists + * 0: repository file does not exist */ int @@ -1006,9 +1033,13 @@ script_repo_file_exists () } /* - * script_repo_file_is_uptodate: return 1 if repository file (plugins.xml.gz) - * is up-to-date (file exists and is not outdated) - * otherwise 0 (file has to be downloaded) + * Checks if repository file (plugins.xml.gz) is up-to-date (file exists and it + * not outdated). + * + * Returns: + * 1: repository file is up-to-date + * 0: repository file does not exist or is outdated + * (file has to be downloaded) */ int @@ -1067,8 +1098,11 @@ script_repo_file_is_uptodate () } /* - * script_repo_file_read: read scripts in repository file (plugins.xml.gz) - * return 1 if ok, 0 if error + * Reads scripts in repository file (plugins.xml.gz). + * + * Returns: + * 1: OK + * 0: error */ int @@ -1368,8 +1402,7 @@ script_repo_file_read (int quiet) } /* - * script_repo_file_update_process_cb: callback called when list of scripts is - * downloaded + * Callback called when list of scripts is downloaded. */ int @@ -1409,7 +1442,7 @@ script_repo_file_update_process_cb (void *data, const char *command, } /* - * script_repo_file_update: update repository file, and read it + * Updates repository file and reads it. */ void @@ -1458,7 +1491,7 @@ script_repo_file_update (int quiet) } /* - * script_repo_hdata_script_cb: return hdata for script + * Returns hdata for script. */ struct t_hdata * @@ -1503,8 +1536,11 @@ script_repo_hdata_script_cb (void *data, const char *hdata_name) } /* - * script_repo_add_to_infolist: add a script in an infolist - * return 1 if ok, 0 if error + * Adds a script in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1567,7 +1603,7 @@ script_repo_add_to_infolist (struct t_infolist *infolist, } /* - * script_repo_print_log: print script infos in log (usually for crash dump) + * Prints scripts in WeeChat log file (usually for crash dump). */ void diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c index ab8afc52b..df827263e 100644 --- a/src/plugins/script/script.c +++ b/src/plugins/script/script.c @@ -56,8 +56,9 @@ struct t_hook *script_timer_refresh = NULL; /* - * script_language_search: search language and return index - * return -1 if not found + * Searches for a language. + * + * Returns index of language, -1 if not found. */ int @@ -76,9 +77,9 @@ script_language_search (const char *language) } /* - * script_language_search_by_extension: search language by extension and return - * index - * return -1 if not found + * Searches for a language by extension. + * + * Returns index of language, -1 if not found. */ int @@ -97,8 +98,7 @@ script_language_search_by_extension (const char *extension) } /* - * script_get_loaded_plugins_and_scripts: get loaded plugins (in array of - * integers) and scripts (in hashtable) + * Gets loaded plugins (in array of integers) and scripts (in hashtable). */ void @@ -167,7 +167,7 @@ script_get_loaded_plugins_and_scripts () } /* - * script_debug_dump_cb: callback for "debug_dump" signal + * Callback for signal "debug_dump". */ int @@ -197,7 +197,7 @@ script_debug_dump_cb (void *data, const char *signal, const char *type_data, } /* - * script_timer_refresh_cb: callback for timer used to refresh list of scripts + * Callback for timer to refresh list of scripts. */ int @@ -217,8 +217,7 @@ script_timer_refresh_cb (void *data, int remaining_calls) } /* - * script_signal_plugin_cb: callback for signals "plugin_loaded" and - * "plugin_unloaded" + * Callback for signals "plugin_loaded" and "plugin_unloaded". */ int @@ -246,8 +245,7 @@ script_signal_plugin_cb (void *data, const char *signal, const char *type_data, } /* - * script_signal_script_cb: callback for signals "xxx_script_yyy" - * (example: "python_script_loaded") + * Callback for signals "xxx_script_yyy" (example: "python_script_loaded"). */ int @@ -275,7 +273,7 @@ script_signal_script_cb (void *data, const char *signal, const char *type_data, } /* - * script_focus_chat_cb: callback called when a mouse action occurs in chat area + * Callback called when a mouse action occurs in chat area. */ struct t_hashtable * @@ -352,7 +350,7 @@ script_focus_chat_cb (void *data, struct t_hashtable *info) } /* - * weechat_plugin_init: initialize script plugin + * Initializes script plugin. */ int @@ -407,7 +405,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end script plugin + * Ends script plugin. */ int diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 5e89aa3f3..5a0ed7454 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -209,7 +209,7 @@ /* - * weechat_tcl_api_register: startup function for all WeeChat Tcl scripts + * Registers a tcl script. */ static int @@ -285,8 +285,10 @@ weechat_tcl_api_register (ClientData clientData, Tcl_Interp *interp, int objc, } /* - * weechat_tcl_api_plugin_get_name: get name of plugin (return "core" for - * WeeChat core) + * Wrappers for functions in scripting API. + * + * For more info about these functions, look at their implementation in WeeChat + * core. */ static int @@ -309,10 +311,6 @@ weechat_tcl_api_plugin_get_name (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_charset_set: set script charset - */ - static int weechat_tcl_api_charset_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -330,11 +328,6 @@ weechat_tcl_api_charset_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_iconv_to_internal: convert string to internal WeeChat - * charset - */ - static int weechat_tcl_api_iconv_to_internal (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -355,11 +348,6 @@ weechat_tcl_api_iconv_to_internal (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_iconv_from_internal: convert string from WeeChat inernal - * charset to another one - */ - static int weechat_tcl_api_iconv_from_internal (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -380,10 +368,6 @@ weechat_tcl_api_iconv_from_internal (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_gettext: get translated string - */ - static int weechat_tcl_api_gettext (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -401,10 +385,6 @@ weechat_tcl_api_gettext (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_ngettext: get translated string with plural form - */ - static int weechat_tcl_api_ngettext (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -429,12 +409,6 @@ weechat_tcl_api_ngettext (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_string_match: return 1 if string matches a mask - * mask can begin or end with "*", no other "*" - * are allowed inside mask - */ - static int weechat_tcl_api_string_match (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -458,14 +432,6 @@ weechat_tcl_api_string_match (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_string_has_highlight: return 1 if string contains a - * highlight (using list of words to - * highlight) - * return 0 if no highlight is found in - * string - */ - static int weechat_tcl_api_string_has_highlight (ClientData clientData, Tcl_Interp *interp, @@ -487,14 +453,6 @@ weechat_tcl_api_string_has_highlight (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_string_has_highlight_regex: return 1 if string contains a - * highlight (using a regular - * expression) - * return 0 if no highlight is - * found in string - */ - static int weechat_tcl_api_string_has_highlight_regex (ClientData clientData, Tcl_Interp *interp, @@ -516,13 +474,6 @@ weechat_tcl_api_string_has_highlight_regex (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_string_mask_to_regex: convert a mask (string with only - * "*" as wildcard) to a regex, paying - * attention to special chars in a - * regex - */ - static int weechat_tcl_api_string_mask_to_regex (ClientData clientData, Tcl_Interp *interp, @@ -543,10 +494,6 @@ weechat_tcl_api_string_mask_to_regex (ClientData clientData, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_string_remove_color: remove WeeChat color codes from string - */ - static int weechat_tcl_api_string_remove_color (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -567,11 +514,6 @@ weechat_tcl_api_string_remove_color (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_string_is_command_char: check if first char of string is a - * command char - */ - static int weechat_tcl_api_string_is_command_char (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -588,12 +530,6 @@ weechat_tcl_api_string_is_command_char (ClientData clientData, Tcl_Interp *inter API_RETURN_INT(result); } -/* - * weechat_tcl_api_string_input_for_buffer: return string with input text - * for buffer or empty string if - * it's a command - */ - static int weechat_tcl_api_string_input_for_buffer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -611,11 +547,6 @@ weechat_tcl_api_string_input_for_buffer (ClientData clientData, Tcl_Interp *inte API_RETURN_STRING(result); } -/* - * weechat_tcl_api_string_eval_expression: evaluate an expression and return - * result - */ - static int weechat_tcl_api_string_eval_expression (ClientData clientData, Tcl_Interp *interp, @@ -650,10 +581,6 @@ weechat_tcl_api_string_eval_expression (ClientData clientData, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_mkdir_home: create a directory in WeeChat home - */ - static int weechat_tcl_api_mkdir_home (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -675,10 +602,6 @@ weechat_tcl_api_mkdir_home (ClientData clientData, Tcl_Interp *interp, API_RETURN_ERROR; } -/* - * weechat_tcl_api_mkdir: create a directory - */ - static int weechat_tcl_api_mkdir (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -700,11 +623,6 @@ weechat_tcl_api_mkdir (ClientData clientData, Tcl_Interp *interp, API_RETURN_ERROR; } -/* - * weechat_tcl_api_mkdir_parents: create a directory and make parent - * directories as needed - */ - static int weechat_tcl_api_mkdir_parents (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -726,10 +644,6 @@ weechat_tcl_api_mkdir_parents (ClientData clientData, Tcl_Interp *interp, API_RETURN_ERROR; } -/* - * weechat_tcl_api_list_new: create a new list - */ - static int weechat_tcl_api_list_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -749,10 +663,6 @@ weechat_tcl_api_list_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_add: add a string to list - */ - static int weechat_tcl_api_list_add (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -779,10 +689,6 @@ weechat_tcl_api_list_add (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_search: search a string in list - */ - static int weechat_tcl_api_list_search (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -804,10 +710,6 @@ weechat_tcl_api_list_search (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_search_pos: search position of a string in list - */ - static int weechat_tcl_api_list_search_pos (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -828,10 +730,6 @@ weechat_tcl_api_list_search_pos (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(pos); } -/* - * weechat_tcl_api_list_casesearch: search a string in list (ignore case) - */ - static int weechat_tcl_api_list_casesearch (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -853,11 +751,6 @@ weechat_tcl_api_list_casesearch (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_casesearch_pos: search position of a string in list - * (ignore case) - */ - static int weechat_tcl_api_list_casesearch_pos (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -878,10 +771,6 @@ weechat_tcl_api_list_casesearch_pos (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(pos); } -/* - * weechat_tcl_api_list_get: get item by position - */ - static int weechat_tcl_api_list_get (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -903,10 +792,6 @@ weechat_tcl_api_list_get (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_set: set new value for item - */ - static int weechat_tcl_api_list_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -927,10 +812,6 @@ weechat_tcl_api_list_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_list_next: get next item - */ - static int weechat_tcl_api_list_next (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -948,10 +829,6 @@ weechat_tcl_api_list_next (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_prev: get previous item - */ - static int weechat_tcl_api_list_prev (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -969,10 +846,6 @@ weechat_tcl_api_list_prev (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_list_string: get string value of item - */ - static int weechat_tcl_api_list_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -990,10 +863,6 @@ weechat_tcl_api_list_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_list_size: get number of elements in list - */ - static int weechat_tcl_api_list_size (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1011,10 +880,6 @@ weechat_tcl_api_list_size (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(size); } -/* - * weechat_tcl_api_list_remove: remove item from list - */ - static int weechat_tcl_api_list_remove (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1036,10 +901,6 @@ weechat_tcl_api_list_remove (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_list_remove_all: remove all items from list - */ - static int weechat_tcl_api_list_remove_all (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1058,10 +919,6 @@ weechat_tcl_api_list_remove_all (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_list_free: free list - */ - static int weechat_tcl_api_list_free (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1078,10 +935,6 @@ weechat_tcl_api_list_free (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_reload_cb: callback for config reload - */ - int weechat_tcl_api_config_reload_cb (void *data, struct t_config_file *config_file) @@ -1120,10 +973,6 @@ weechat_tcl_api_config_reload_cb (void *data, return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; } -/* - * weechat_tcl_api_config_new: create a new configuration file - */ - static int weechat_tcl_api_config_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1150,11 +999,6 @@ weechat_tcl_api_config_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_config_section_read_cb: callback for reading option in - * section - */ - int weechat_tcl_api_config_section_read_cb (void *data, struct t_config_file *config_file, @@ -1199,10 +1043,6 @@ weechat_tcl_api_config_section_read_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_tcl_api_config_section_write_cb: callback for writing section - */ - int weechat_tcl_api_config_section_write_cb (void *data, struct t_config_file *config_file, @@ -1242,11 +1082,6 @@ weechat_tcl_api_config_section_write_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_tcl_api_config_section_write_default_cb: callback for writing - * default values for section - */ - int weechat_tcl_api_config_section_write_default_cb (void *data, struct t_config_file *config_file, @@ -1286,11 +1121,6 @@ weechat_tcl_api_config_section_write_default_cb (void *data, return WEECHAT_CONFIG_WRITE_ERROR; } -/* - * weechat_tcl_api_config_section_create_option_cb: callback to create an - * option - */ - int weechat_tcl_api_config_section_create_option_cb (void *data, struct t_config_file *config_file, @@ -1336,11 +1166,6 @@ weechat_tcl_api_config_section_create_option_cb (void *data, return WEECHAT_CONFIG_OPTION_SET_ERROR; } -/* - * weechat_tcl_api_config_section_delete_option_cb: callback to delete an - * option - */ - int weechat_tcl_api_config_section_delete_option_cb (void *data, struct t_config_file *config_file, @@ -1386,11 +1211,6 @@ weechat_tcl_api_config_section_delete_option_cb (void *data, return WEECHAT_CONFIG_OPTION_UNSET_ERROR; } -/* - * weechat_tcl_api_config_new_section: create a new section in configuration - * file - */ - static int weechat_tcl_api_config_new_section (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1451,10 +1271,6 @@ weechat_tcl_api_config_new_section (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_config_search_section: search section in configuration file - */ - static int weechat_tcl_api_config_search_section (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1477,11 +1293,6 @@ weechat_tcl_api_config_search_section (ClientData clientData, Tcl_Interp *interp } -/* - * weechat_tcl_api_config_option_check_value_cb: callback for checking new - * value for option - */ - int weechat_tcl_api_config_option_check_value_cb (void *data, struct t_config_option *option, @@ -1521,10 +1332,6 @@ weechat_tcl_api_config_option_check_value_cb (void *data, return 0; } -/* - * weechat_tcl_api_config_option_change_cb: callback for option changed - */ - void weechat_tcl_api_config_option_change_cb (void *data, struct t_config_option *option) @@ -1554,10 +1361,6 @@ weechat_tcl_api_config_option_change_cb (void *data, } } -/* - * weechat_tcl_api_config_option_delete_cb: callback when option is deleted - */ - void weechat_tcl_api_config_option_delete_cb (void *data, struct t_config_option *option) @@ -1587,10 +1390,6 @@ weechat_tcl_api_config_option_delete_cb (void *data, } } -/* - * weechat_tcl_api_config_new_option: create a new option in section - */ - static int weechat_tcl_api_config_new_option (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1652,11 +1451,6 @@ weechat_tcl_api_config_new_option (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_config_search_option: search option in configuration file or - * section - */ - static int weechat_tcl_api_config_search_option (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1680,10 +1474,6 @@ weechat_tcl_api_config_search_option (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_config_string_to_boolean: return boolean value of a string - */ - static int weechat_tcl_api_config_string_to_boolean (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1700,10 +1490,6 @@ weechat_tcl_api_config_string_to_boolean (ClientData clientData, Tcl_Interp *int API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_option_reset: reset an option with default value - */ - static int weechat_tcl_api_config_option_reset (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1728,10 +1514,6 @@ weechat_tcl_api_config_option_reset (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_option_set: set new value for option - */ - static int weechat_tcl_api_config_option_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1758,10 +1540,6 @@ weechat_tcl_api_config_option_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_option_set_null: set null (undefined)value for option - */ - static int weechat_tcl_api_config_option_set_null (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1786,10 +1564,6 @@ weechat_tcl_api_config_option_set_null (ClientData clientData, Tcl_Interp *inter API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_option_unset: unset an option - */ - static int weechat_tcl_api_config_option_unset (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1810,10 +1584,6 @@ weechat_tcl_api_config_option_unset (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_option_rename: rename an option - */ - static int weechat_tcl_api_config_option_rename (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1835,10 +1605,6 @@ weechat_tcl_api_config_option_rename (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_option_is_null: return 1 if value of option is null - */ - static int weechat_tcl_api_config_option_is_null (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1855,11 +1621,6 @@ weechat_tcl_api_config_option_is_null (ClientData clientData, Tcl_Interp *interp API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_option_default_is_null: return 1 if default value of - * option is null - */ - static int weechat_tcl_api_config_option_default_is_null (ClientData clientData, Tcl_Interp *interp, @@ -1877,10 +1638,6 @@ weechat_tcl_api_config_option_default_is_null (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_boolean: return boolean value of option - */ - static int weechat_tcl_api_config_boolean (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1897,10 +1654,6 @@ weechat_tcl_api_config_boolean (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_boolean_default: return default boolean value of option - */ - static int weechat_tcl_api_config_boolean_default (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1917,10 +1670,6 @@ weechat_tcl_api_config_boolean_default (ClientData clientData, Tcl_Interp *inter API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_integer: return integer value of option - */ - static int weechat_tcl_api_config_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1937,10 +1686,6 @@ weechat_tcl_api_config_integer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_integer_default: return default integer value of option - */ - static int weechat_tcl_api_config_integer_default (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1957,10 +1702,6 @@ weechat_tcl_api_config_integer_default (ClientData clientData, Tcl_Interp *inter API_RETURN_INT(result); } -/* - * weechat_tcl_api_config_string: return string value of option - */ - static int weechat_tcl_api_config_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1978,10 +1719,6 @@ weechat_tcl_api_config_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_config_string_default: return default string value of option - */ - static int weechat_tcl_api_config_string_default (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -1999,10 +1736,6 @@ weechat_tcl_api_config_string_default (ClientData clientData, Tcl_Interp *interp API_RETURN_STRING(result); } -/* - * weechat_tcl_api_config_color: return color value of option - */ - static int weechat_tcl_api_config_color (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2020,10 +1753,6 @@ weechat_tcl_api_config_color (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_config_color_default: return default color value of option - */ - static int weechat_tcl_api_config_color_default (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2041,10 +1770,6 @@ weechat_tcl_api_config_color_default (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_config_write_option: write an option in configuration file - */ - static int weechat_tcl_api_config_write_option (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2066,10 +1791,6 @@ weechat_tcl_api_config_write_option (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_write_line: write a line in configuration file - */ - static int weechat_tcl_api_config_write_line (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2092,10 +1813,6 @@ weechat_tcl_api_config_write_line (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_write: write configuration file - */ - static int weechat_tcl_api_config_write (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2113,10 +1830,6 @@ weechat_tcl_api_config_write (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_read: read configuration file - */ - static int weechat_tcl_api_config_read (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2134,10 +1847,6 @@ weechat_tcl_api_config_read (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_reload: reload configuration file - */ - static int weechat_tcl_api_config_reload (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2155,10 +1864,6 @@ weechat_tcl_api_config_reload (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_option_free: free an option in configuration file - */ - static int weechat_tcl_api_config_option_free (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2177,11 +1882,6 @@ weechat_tcl_api_config_option_free (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_section_free_options: free all options of a section - * in configuration file - */ - static int weechat_tcl_api_config_section_free_options (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2200,10 +1900,6 @@ weechat_tcl_api_config_section_free_options (ClientData clientData, Tcl_Interp * API_RETURN_OK; } -/* - * weechat_tcl_api_config_section_free: free section in configuration file - */ - static int weechat_tcl_api_config_section_free (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2222,10 +1918,6 @@ weechat_tcl_api_config_section_free (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_free: free configuration file - */ - static int weechat_tcl_api_config_free (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2244,10 +1936,6 @@ weechat_tcl_api_config_free (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_config_get: get config option - */ - static int weechat_tcl_api_config_get (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2265,10 +1953,6 @@ weechat_tcl_api_config_get (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_config_get_plugin: get value of a plugin option - */ - static int weechat_tcl_api_config_get_plugin (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2288,10 +1972,6 @@ weechat_tcl_api_config_get_plugin (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_config_is_set_plugin: check if a plugin option is set - */ - static int weechat_tcl_api_config_is_set_plugin (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2313,10 +1993,6 @@ weechat_tcl_api_config_is_set_plugin (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_set_plugin: set value of a plugin option - */ - static int weechat_tcl_api_config_set_plugin (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2340,10 +2016,6 @@ weechat_tcl_api_config_set_plugin (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_config_set_desc_plugin: set description of a plugin option - */ - static int weechat_tcl_api_config_set_desc_plugin (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2367,10 +2039,6 @@ weechat_tcl_api_config_set_desc_plugin (ClientData clientData, Tcl_Interp *inter API_RETURN_OK; } -/* - * weechat_tcl_api_config_set_plugin: unset plugin option - */ - static int weechat_tcl_api_config_unset_plugin (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2392,10 +2060,6 @@ weechat_tcl_api_config_unset_plugin (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_key_bind: bind key(s) - */ - static int weechat_tcl_api_key_bind (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2423,10 +2087,6 @@ weechat_tcl_api_key_bind (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(num_keys); } -/* - * weechat_tcl_api_key_unbind: unbind key(s) - */ - static int weechat_tcl_api_key_unbind (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2447,10 +2107,6 @@ weechat_tcl_api_key_unbind (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(num_keys); } -/* - * weechat_tcl_api_prefix: get a prefix, used for display - */ - static int weechat_tcl_api_prefix (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2468,10 +2124,6 @@ weechat_tcl_api_prefix (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_color: get a color code, used for display - */ - static int weechat_tcl_api_color (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2489,10 +2141,6 @@ weechat_tcl_api_color (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_print: print message in a buffer - */ - static int weechat_tcl_api_print (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2516,11 +2164,6 @@ weechat_tcl_api_print (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_print_date_tags: print message in a buffer with optional - * date and tags - */ - static int weechat_tcl_api_print_date_tags (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2550,10 +2193,6 @@ weechat_tcl_api_print_date_tags (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_print_y: print message in a buffer with free content - */ - static int weechat_tcl_api_print_y (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2581,10 +2220,6 @@ weechat_tcl_api_print_y (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_log_print: print message in WeeChat log file - */ - static int weechat_tcl_api_log_print (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2607,10 +2242,6 @@ weechat_tcl_api_log_print (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_hook_command_cb: callback for command hooked - */ - int weechat_tcl_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -2652,10 +2283,6 @@ weechat_tcl_api_hook_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_command: hook a command - */ - static int weechat_tcl_api_hook_command (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2691,10 +2318,6 @@ weechat_tcl_api_hook_command (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_command_run_cb: callback for command_run hooked - */ - int weechat_tcl_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -2733,10 +2356,6 @@ weechat_tcl_api_hook_command_run_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_command_run: hook a command_run - */ - static int weechat_tcl_api_hook_command_run (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2763,10 +2382,6 @@ weechat_tcl_api_hook_command_run (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_timer_cb: callback for timer hooked - */ - int weechat_tcl_api_hook_timer_cb (void *data, int remaining_calls) { @@ -2804,10 +2419,6 @@ weechat_tcl_api_hook_timer_cb (void *data, int remaining_calls) return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_timer: hook a timer - */ - static int weechat_tcl_api_hook_timer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2838,10 +2449,6 @@ weechat_tcl_api_hook_timer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_fd_cb: callback for fd hooked - */ - int weechat_tcl_api_hook_fd_cb (void *data, int fd) { @@ -2878,10 +2485,6 @@ weechat_tcl_api_hook_fd_cb (void *data, int fd) return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_fd: hook a fd - */ - static int weechat_tcl_api_hook_fd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2913,10 +2516,6 @@ weechat_tcl_api_hook_fd (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_process_cb: callback for process hooked - */ - int weechat_tcl_api_hook_process_cb (void *data, const char *command, int return_code, @@ -2956,10 +2555,6 @@ weechat_tcl_api_hook_process_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_process: hook a process - */ - static int weechat_tcl_api_hook_process (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -2990,11 +2585,6 @@ weechat_tcl_api_hook_process (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_process_hashtable: hook a process with options in - * a hashtable - */ - static int weechat_tcl_api_hook_process_hashtable (ClientData clientData, Tcl_Interp *interp, @@ -3035,10 +2625,6 @@ weechat_tcl_api_hook_process_hashtable (ClientData clientData, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_connect_cb: callback for connect hooked - */ - int weechat_tcl_api_hook_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, @@ -3084,10 +2670,6 @@ weechat_tcl_api_hook_connect_cb (void *data, int status, int gnutls_rc, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_connect: hook a connection - */ - static int weechat_tcl_api_hook_connect (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3130,10 +2712,6 @@ weechat_tcl_api_hook_connect (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_print_cb: callback for print hooked - */ - int weechat_tcl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, @@ -3194,10 +2772,6 @@ weechat_tcl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_print: hook a print - */ - static int weechat_tcl_api_hook_print (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3232,10 +2806,6 @@ weechat_tcl_api_hook_print (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_signal_cb: callback for signal hooked - */ - int weechat_tcl_api_hook_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -3292,10 +2862,6 @@ weechat_tcl_api_hook_signal_cb (void *data, const char *signal, const char *type return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_signal: hook a signal - */ - static int weechat_tcl_api_hook_signal (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3322,10 +2888,6 @@ weechat_tcl_api_hook_signal (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_signal_send: send a signal - */ - static int weechat_tcl_api_hook_signal_send (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3370,10 +2932,6 @@ weechat_tcl_api_hook_signal_send (ClientData clientData, Tcl_Interp *interp, API_RETURN_ERROR; } -/* - * weechat_tcl_api_hook_hsignal_cb: callback for hsignal hooked - */ - int weechat_tcl_api_hook_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) @@ -3410,10 +2968,6 @@ weechat_tcl_api_hook_hsignal_cb (void *data, const char *signal, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_hsignal: hook a hsignal - */ - static int weechat_tcl_api_hook_hsignal (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3440,10 +2994,6 @@ weechat_tcl_api_hook_hsignal (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_hsignal_send: send a hsignal - */ - static int weechat_tcl_api_hook_hsignal_send (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3471,10 +3021,6 @@ weechat_tcl_api_hook_hsignal_send (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_hook_config_cb: callback for config option hooked - */ - int weechat_tcl_api_hook_config_cb (void *data, const char *option, const char *value) { @@ -3510,10 +3056,6 @@ weechat_tcl_api_hook_config_cb (void *data, const char *option, const char *valu return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_config: hook a config option - */ - static int weechat_tcl_api_hook_config (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3540,10 +3082,6 @@ weechat_tcl_api_hook_config (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_completion_cb: callback for completion hooked - */ - int weechat_tcl_api_hook_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -3586,10 +3124,6 @@ weechat_tcl_api_hook_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_hook_completion: hook a completion - */ - static int weechat_tcl_api_hook_completion (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3618,10 +3152,6 @@ weechat_tcl_api_hook_completion (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_completion_list_add: add a word to list for a completion - */ - static int weechat_tcl_api_hook_completion_list_add (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3649,10 +3179,6 @@ weechat_tcl_api_hook_completion_list_add (ClientData clientData, Tcl_Interp *int API_RETURN_OK; } -/* - * weechat_tcl_api_hook_modifier_cb: callback for modifier hooked - */ - char * weechat_tcl_api_hook_modifier_cb (void *data, const char *modifier, const char *modifier_data, const char *string) @@ -3679,10 +3205,6 @@ weechat_tcl_api_hook_modifier_cb (void *data, const char *modifier, return NULL; } -/* - * weechat_tcl_api_hook_modifier: hook a modifier - */ - static int weechat_tcl_api_hook_modifier (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3709,10 +3231,6 @@ weechat_tcl_api_hook_modifier (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_modifier_exec: execute a modifier hook - */ - static int weechat_tcl_api_hook_modifier_exec (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3734,10 +3252,6 @@ weechat_tcl_api_hook_modifier_exec (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_info_cb: callback for info hooked - */ - const char * weechat_tcl_api_hook_info_cb (void *data, const char *info_name, const char *arguments) @@ -3763,10 +3277,6 @@ weechat_tcl_api_hook_info_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_tcl_api_hook_info: hook an info - */ - static int weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3797,10 +3307,6 @@ weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_info_hashtable_cb: callback for info_hashtable hooked - */ - struct t_hashtable * weechat_tcl_api_hook_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) @@ -3826,10 +3332,6 @@ weechat_tcl_api_hook_info_hashtable_cb (void *data, const char *info_name, return NULL; } -/* - * weechat_tcl_api_hook_info_hashtable: hook an info_hashtable - */ - static int weechat_tcl_api_hook_info_hashtable (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3863,10 +3365,6 @@ weechat_tcl_api_hook_info_hashtable (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_infolist_cb: callback for infolist hooked - */ - struct t_infolist * weechat_tcl_api_hook_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -3899,10 +3397,6 @@ weechat_tcl_api_hook_infolist_cb (void *data, const char *infolist_name, return NULL; } -/* - * weechat_tcl_api_hook_infolist: hook an infolist - */ - static int weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3936,10 +3430,6 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hook_focus_cb: callback for focus hooked - */ - struct t_hashtable * weechat_tcl_api_hook_focus_cb (void *data, struct t_hashtable *info) @@ -3964,10 +3454,6 @@ weechat_tcl_api_hook_focus_cb (void *data, return NULL; } -/* - * weechat_tcl_api_hook_focus: hook a focus - */ - static int weechat_tcl_api_hook_focus (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -3994,10 +3480,6 @@ weechat_tcl_api_hook_focus (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_unhook: unhook something - */ - static int weechat_tcl_api_unhook (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4016,10 +3498,6 @@ weechat_tcl_api_unhook (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_unhook_all: unhook all for script - */ - static int weechat_tcl_api_unhook_all (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4038,10 +3516,6 @@ weechat_tcl_api_unhook_all (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_input_data_cb: callback for input data in a buffer - */ - int weechat_tcl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) @@ -4079,10 +3553,6 @@ weechat_tcl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_buffer_close_cb: callback for buffer closed - */ - int weechat_tcl_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -4118,10 +3588,6 @@ weechat_tcl_api_buffer_close_cb (void *data, struct t_gui_buffer *buffer) return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_buffer_new: create a new buffer - */ - static int weechat_tcl_api_buffer_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4154,10 +3620,6 @@ weechat_tcl_api_buffer_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_buffer_search: search a buffer - */ - static int weechat_tcl_api_buffer_search (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4178,10 +3640,6 @@ weechat_tcl_api_buffer_search (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_buffer_search_main: search main buffer (WeeChat core buffer) - */ - static int weechat_tcl_api_buffer_search_main (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4201,10 +3659,6 @@ weechat_tcl_api_buffer_search_main (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_current_buffer: get current buffer - */ - static int weechat_tcl_api_current_buffer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4224,10 +3678,6 @@ weechat_tcl_api_current_buffer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_buffer_clear: clear a buffer - */ - static int weechat_tcl_api_buffer_clear (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4244,10 +3694,6 @@ weechat_tcl_api_buffer_clear (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_close: close a buffer - */ - static int weechat_tcl_api_buffer_close (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4266,10 +3712,6 @@ weechat_tcl_api_buffer_close (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_merge: merge a buffer to another buffer - */ - static int weechat_tcl_api_buffer_merge (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4287,11 +3729,6 @@ weechat_tcl_api_buffer_merge (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_unmerge: unmerge a buffer from a group of merged - * buffers - */ - static int weechat_tcl_api_buffer_unmerge (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4312,10 +3749,6 @@ weechat_tcl_api_buffer_unmerge (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_get_integer: get a buffer property as integer - */ - static int weechat_tcl_api_buffer_get_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4337,10 +3770,6 @@ weechat_tcl_api_buffer_get_integer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_buffer_get_string: get a buffer property as string - */ - static int weechat_tcl_api_buffer_get_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4362,10 +3791,6 @@ weechat_tcl_api_buffer_get_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_buffer_get_pointer: get a buffer property as pointer - */ - static int weechat_tcl_api_buffer_get_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4387,10 +3812,6 @@ weechat_tcl_api_buffer_get_pointer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_buffer_set: set a buffer property - */ - static int weechat_tcl_api_buffer_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4412,11 +3833,6 @@ weechat_tcl_api_buffer_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_buffer_string_replace_local_var: replace local variables ($var) in a string, - * using value of local variables - */ - static int weechat_tcl_api_buffer_string_replace_local_var (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4437,10 +3853,6 @@ weechat_tcl_api_buffer_string_replace_local_var (ClientData clientData, Tcl_Inte API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_buffer_match_list: return 1 if buffers matches list of buffers - */ - static int weechat_tcl_api_buffer_match_list (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4462,10 +3874,6 @@ weechat_tcl_api_buffer_match_list (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_current_window: get current window - */ - static int weechat_tcl_api_current_window (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4485,11 +3893,6 @@ weechat_tcl_api_current_window (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_window_search_with_buffer: search a window with buffer - * pointer - */ - static int weechat_tcl_api_window_search_with_buffer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4509,10 +3912,6 @@ weechat_tcl_api_window_search_with_buffer (ClientData clientData, Tcl_Interp *in API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_window_get_integer: get a window property as integer - */ - static int weechat_tcl_api_window_get_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4534,10 +3933,6 @@ weechat_tcl_api_window_get_integer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_window_get_string: get a window property as string - */ - static int weechat_tcl_api_window_get_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4559,10 +3954,6 @@ weechat_tcl_api_window_get_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_window_get_pointer: get a window property as pointer - */ - static int weechat_tcl_api_window_get_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4584,10 +3975,6 @@ weechat_tcl_api_window_get_pointer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_window_set_title: set window title - */ - static int weechat_tcl_api_window_set_title (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4607,10 +3994,6 @@ weechat_tcl_api_window_set_title (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_nicklist_add_group: add a group in nicklist - */ - static int weechat_tcl_api_nicklist_add_group (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4640,10 +4023,6 @@ weechat_tcl_api_nicklist_add_group (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_search_group: search a group in nicklist - */ - static int weechat_tcl_api_nicklist_search_group (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4667,10 +4046,6 @@ weechat_tcl_api_nicklist_search_group (ClientData clientData, Tcl_Interp *interp API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_add_nick: add a nick in nicklist - */ - static int weechat_tcl_api_nicklist_add_nick (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4704,10 +4079,6 @@ weechat_tcl_api_nicklist_add_nick (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_search_nick: search a nick in nicklist - */ - static int weechat_tcl_api_nicklist_search_nick (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4731,10 +4102,6 @@ weechat_tcl_api_nicklist_search_nick (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_remove_group: remove a group from nicklist - */ - static int weechat_tcl_api_nicklist_remove_group (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4756,10 +4123,6 @@ weechat_tcl_api_nicklist_remove_group (ClientData clientData, Tcl_Interp *interp API_RETURN_OK; } -/* - * weechat_tcl_api_nicklist_remove_nick: remove a nick from nicklist - */ - static int weechat_tcl_api_nicklist_remove_nick (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4781,10 +4144,6 @@ weechat_tcl_api_nicklist_remove_nick (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_nicklist_remove_all: remove all groups/nicks from nicklist - */ - static int weechat_tcl_api_nicklist_remove_all (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4801,10 +4160,6 @@ weechat_tcl_api_nicklist_remove_all (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_nicklist_group_get_integer: get a group property as integer - */ - static int weechat_tcl_api_nicklist_group_get_integer (ClientData clientData, Tcl_Interp *interp, @@ -4830,10 +4185,6 @@ weechat_tcl_api_nicklist_group_get_integer (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_nicklist_group_get_string: get a group property as string - */ - static int weechat_tcl_api_nicklist_group_get_string (ClientData clientData, Tcl_Interp *interp, @@ -4859,10 +4210,6 @@ weechat_tcl_api_nicklist_group_get_string (ClientData clientData, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_nicklist_group_get_pointer: get a group property as pointer - */ - static int weechat_tcl_api_nicklist_group_get_pointer (ClientData clientData, Tcl_Interp *interp, @@ -4887,10 +4234,6 @@ weechat_tcl_api_nicklist_group_get_pointer (ClientData clientData, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_group_set: set a group property - */ - static int weechat_tcl_api_nicklist_group_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -4916,10 +4259,6 @@ weechat_tcl_api_nicklist_group_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_nicklist_nick_get_integer: get a nick property as integer - */ - static int weechat_tcl_api_nicklist_nick_get_integer (ClientData clientData, Tcl_Interp *interp, @@ -4945,10 +4284,6 @@ weechat_tcl_api_nicklist_nick_get_integer (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_nicklist_nick_get_string: get a nick property as string - */ - static int weechat_tcl_api_nicklist_nick_get_string (ClientData clientData, Tcl_Interp *interp, @@ -4974,10 +4309,6 @@ weechat_tcl_api_nicklist_nick_get_string (ClientData clientData, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_nicklist_nick_get_pointer: get a nick property as pointer - */ - static int weechat_tcl_api_nicklist_nick_get_pointer (ClientData clientData, Tcl_Interp *interp, @@ -5002,10 +4333,6 @@ weechat_tcl_api_nicklist_nick_get_pointer (ClientData clientData, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_nicklist_nick_set: set a nick property - */ - static int weechat_tcl_api_nicklist_nick_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5031,10 +4358,6 @@ weechat_tcl_api_nicklist_nick_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_bar_item_search: search a bar item - */ - static int weechat_tcl_api_bar_item_search (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5052,10 +4375,6 @@ weechat_tcl_api_bar_item_search (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_bar_item_build_cb: callback for building bar item - */ - char * weechat_tcl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) @@ -5088,10 +4407,6 @@ weechat_tcl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, return NULL; } -/* - * weechat_tcl_api_bar_item_new: add a new bar item - */ - static int weechat_tcl_api_bar_item_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5118,10 +4433,6 @@ weechat_tcl_api_bar_item_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_bar_item_update: update a bar item on screen - */ - static int weechat_tcl_api_bar_item_update (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5138,10 +4449,6 @@ weechat_tcl_api_bar_item_update (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_bar_item_remove: remove a bar item - */ - static int weechat_tcl_api_bar_item_remove (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5160,10 +4467,6 @@ weechat_tcl_api_bar_item_remove (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_bar_search: search a bar - */ - static int weechat_tcl_api_bar_search (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5181,10 +4484,6 @@ weechat_tcl_api_bar_search (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_bar_new: add a new bar - */ - static int weechat_tcl_api_bar_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5234,10 +4533,6 @@ weechat_tcl_api_bar_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_bar_set: set a bar property - */ - static int weechat_tcl_api_bar_set (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5259,10 +4554,6 @@ weechat_tcl_api_bar_set (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_bar_update: update a bar on screen - */ - static int weechat_tcl_api_bar_update (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5279,10 +4570,6 @@ weechat_tcl_api_bar_update (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_bar_remove: remove a bar - */ - static int weechat_tcl_api_bar_remove (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5299,10 +4586,6 @@ weechat_tcl_api_bar_remove (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_command: execute a command on a buffer - */ - static int weechat_tcl_api_command (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5326,10 +4609,6 @@ weechat_tcl_api_command (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_info_get: get info (as string) - */ - static int weechat_tcl_api_info_get (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5348,10 +4627,6 @@ weechat_tcl_api_info_get (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_info_get_hashtable: get info (as hashtable) - */ - static int weechat_tcl_api_info_get_hashtable (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5381,10 +4656,6 @@ weechat_tcl_api_info_get_hashtable (ClientData clientData, Tcl_Interp *interp, API_RETURN_OBJ(result_dict); } -/* - * weechat_tcl_api_infolist_new: create a new infolist - */ - static int weechat_tcl_api_infolist_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5404,10 +4675,6 @@ weechat_tcl_api_infolist_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_new_item: create new item in infolist - */ - static int weechat_tcl_api_infolist_new_item (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5425,11 +4692,6 @@ weechat_tcl_api_infolist_new_item (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_new_var_integer: create new integer variable in - * infolist - */ - static int weechat_tcl_api_infolist_new_var_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5452,11 +4714,6 @@ weechat_tcl_api_infolist_new_var_integer (ClientData clientData, Tcl_Interp *int API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_new_var_string: create new string variable in - * infolist - */ - static int weechat_tcl_api_infolist_new_var_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5476,10 +4733,6 @@ weechat_tcl_api_infolist_new_var_string (ClientData clientData, Tcl_Interp *inte API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_new_var_pointer: create new pointer variable in infolist - */ - static int weechat_tcl_api_infolist_new_var_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5499,10 +4752,6 @@ weechat_tcl_api_infolist_new_var_pointer (ClientData clientData, Tcl_Interp *int API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_new_var_time: create new time variable in infolist - */ - static int weechat_tcl_api_infolist_new_var_time (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5525,10 +4774,6 @@ weechat_tcl_api_infolist_new_var_time (ClientData clientData, Tcl_Interp *interp API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_get: get list with infos - */ - static int weechat_tcl_api_infolist_get (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5552,10 +4797,6 @@ weechat_tcl_api_infolist_get (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_next: move item pointer to next item in infolist - */ - static int weechat_tcl_api_infolist_next (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5572,11 +4813,6 @@ weechat_tcl_api_infolist_next (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_infolist_prev: move item pointer to previous item in - * infolist - */ - static int weechat_tcl_api_infolist_prev (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5593,11 +4829,6 @@ weechat_tcl_api_infolist_prev (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_infolist_reset_item_cursor: reset pointer to current item in - * infolist - */ - static int weechat_tcl_api_infolist_reset_item_cursor (ClientData clientData, Tcl_Interp *interp, @@ -5615,11 +4846,6 @@ weechat_tcl_api_infolist_reset_item_cursor (ClientData clientData, API_RETURN_OK; } -/* - * weechat_tcl_api_infolist_fields: get list of fields for current item of - * infolist - */ - static int weechat_tcl_api_infolist_fields (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5637,11 +4863,6 @@ weechat_tcl_api_infolist_fields (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_infolist_integer: get integer value of a variable in - * infolist - */ - static int weechat_tcl_api_infolist_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5662,10 +4883,6 @@ weechat_tcl_api_infolist_integer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_infolist_string: get string value of a variable in infolist - */ - static int weechat_tcl_api_infolist_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5687,11 +4904,6 @@ weechat_tcl_api_infolist_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_infolist_pointer: get pointer value of a variable in - * infolist - */ - static int weechat_tcl_api_infolist_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5712,10 +4924,6 @@ weechat_tcl_api_infolist_pointer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_time: get time value of a variable in infolist - */ - static int weechat_tcl_api_infolist_time (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5743,10 +4951,6 @@ weechat_tcl_api_infolist_time (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_infolist_free: free infolist - */ - static int weechat_tcl_api_infolist_free (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5763,10 +4967,6 @@ weechat_tcl_api_infolist_free (ClientData clientData, Tcl_Interp *interp, API_RETURN_OK; } -/* - * weechat_tcl_api_hdata_get: get hdata - */ - static int weechat_tcl_api_hdata_get (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5786,10 +4986,6 @@ weechat_tcl_api_hdata_get (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hdata_get_var_offset: get offset of variable in hdata - */ - static int weechat_tcl_api_hdata_get_var_offset (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5810,11 +5006,6 @@ weechat_tcl_api_hdata_get_var_offset (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_hdata_get_var_type_string: get type of variable as string in - * hdata - */ - static int weechat_tcl_api_hdata_get_var_type_string (ClientData clientData, Tcl_Interp *interp, @@ -5837,11 +5028,6 @@ weechat_tcl_api_hdata_get_var_type_string (ClientData clientData, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_hdata_get_var_array_size: get array_size for variable in - * hdata - */ - static int weechat_tcl_api_hdata_get_var_array_size (ClientData clientData, Tcl_Interp *interp, @@ -5866,11 +5052,6 @@ weechat_tcl_api_hdata_get_var_array_size (ClientData clientData, API_RETURN_INT(result); } -/* - * weechat_tcl_api_hdata_get_var_array_size_string: get array size for variable - * in hdata (as string) - */ - static int weechat_tcl_api_hdata_get_var_array_size_string (ClientData clientData, Tcl_Interp *interp, @@ -5896,10 +5077,6 @@ weechat_tcl_api_hdata_get_var_array_size_string (ClientData clientData, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_hdata_get_var_hdata: get hdata for variable in hdata - */ - static int weechat_tcl_api_hdata_get_var_hdata (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5921,10 +5098,6 @@ weechat_tcl_api_hdata_get_var_hdata (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_hdata_get_list: get list pointer in hdata - */ - static int weechat_tcl_api_hdata_get_list (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5946,10 +5119,6 @@ weechat_tcl_api_hdata_get_list (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hdata_check_pointer: check pointer with hdata/list - */ - static int weechat_tcl_api_hdata_check_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -5973,10 +5142,6 @@ weechat_tcl_api_hdata_check_pointer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_hdata_move: move pointer to another element in list - */ - static int weechat_tcl_api_hdata_move (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6002,11 +5167,6 @@ weechat_tcl_api_hdata_move (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hdata_char: get char value of a variable in structure - * using hdata - */ - static int weechat_tcl_api_hdata_char (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6030,11 +5190,6 @@ weechat_tcl_api_hdata_char (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_hdata_integer: get integer value of a variable in structure - * using hdata - */ - static int weechat_tcl_api_hdata_integer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6058,11 +5213,6 @@ weechat_tcl_api_hdata_integer (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(result); } -/* - * weechat_tcl_api_hdata_long: get long value of a variable in structure using - * hdata - */ - static int weechat_tcl_api_hdata_long (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6086,11 +5236,6 @@ weechat_tcl_api_hdata_long (ClientData clientData, Tcl_Interp *interp, API_RETURN_LONG(result); } -/* - * weechat_tcl_api_hdata_string: get string value of a variable in structure - * using hdata - */ - static int weechat_tcl_api_hdata_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6115,11 +5260,6 @@ weechat_tcl_api_hdata_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_hdata_pointer: get pointer value of a variable in structure - * using hdata - */ - static int weechat_tcl_api_hdata_pointer (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6143,11 +5283,6 @@ weechat_tcl_api_hdata_pointer (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hdata_time: get time value of a variable in structure using - * hdata - */ - static int weechat_tcl_api_hdata_time (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6175,11 +5310,6 @@ weechat_tcl_api_hdata_time (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_hdata_hashtable: get hashtable value of a variable in - * structure using hdata - */ - static int weechat_tcl_api_hdata_hashtable (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6205,10 +5335,6 @@ weechat_tcl_api_hdata_hashtable (ClientData clientData, Tcl_Interp *interp, API_RETURN_OBJ(result_dict); } -/* - * weechat_tcl_api_hdata_update: update data in a hdata - */ - static int weechat_tcl_api_hdata_update (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6239,10 +5365,6 @@ weechat_tcl_api_hdata_update (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(value); } -/* - * weechat_tcl_api_hdata_get_string: get hdata property as string - */ - static int weechat_tcl_api_hdata_get_string (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6264,10 +5386,6 @@ weechat_tcl_api_hdata_get_string (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING(result); } -/* - * weechat_tcl_api_upgrade_new: create an upgrade file - */ - static int weechat_tcl_api_upgrade_new (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6290,10 +5408,6 @@ weechat_tcl_api_upgrade_new (ClientData clientData, Tcl_Interp *interp, API_RETURN_STRING_FREE(result); } -/* - * weechat_tcl_api_upgrade_write_object: write object in upgrade file - */ - static int weechat_tcl_api_upgrade_write_object (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6319,10 +5433,6 @@ weechat_tcl_api_upgrade_write_object (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_upgrade_read_cb: callback for reading an object in upgrade file - */ - int weechat_tcl_api_upgrade_read_cb (void *data, struct t_upgrade_file *upgrade_file, @@ -6368,10 +5478,6 @@ weechat_tcl_api_upgrade_read_cb (void *data, return WEECHAT_RC_ERROR; } -/* - * weechat_tcl_api_upgrade_read: read upgrade file - */ - static int weechat_tcl_api_upgrade_read (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6398,10 +5504,6 @@ weechat_tcl_api_upgrade_read (ClientData clientData, Tcl_Interp *interp, API_RETURN_INT(rc); } -/* - * weechat_tcl_api_upgrade_close: close upgrade file - */ - static int weechat_tcl_api_upgrade_close (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -6422,7 +5524,7 @@ weechat_tcl_api_upgrade_close (ClientData clientData, Tcl_Interp *interp, } /* - * weechat_tcl_api_init: initialize subroutines + * Initializes tcl functions and constants. */ void weechat_tcl_api_init (Tcl_Interp *interp) diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c index 95a55fe71..aec7ffc54 100644 --- a/src/plugins/tcl/weechat-tcl.c +++ b/src/plugins/tcl/weechat-tcl.c @@ -72,8 +72,7 @@ Tcl_Interp* cinterp; /* - * weechat_tcl_hashtable_map_cb: callback called for each key/value in a - * hashtable + * Callback called for each key/value in a hashtable. */ void @@ -99,7 +98,7 @@ weechat_tcl_hashtable_map_cb (void *data, } /* - * weechat_tcl_hashtable_to_dict: get tcl dict with a WeeChat hashtable + * Gets tcl dict with a WeeChat hashtable. */ Tcl_Obj * @@ -124,9 +123,9 @@ weechat_tcl_hashtable_to_dict (Tcl_Interp *interp, } /* - * weechat_tcl_dict_to_hashtable: get WeeChat hashtable with tcl dict - * Note: hashtable has to be released after - * use with call to weechat_hashtable_free() + * Gets WeeChat hashtable with tcl dict. + * + * Note: hashtable must be freed after use. */ struct t_hashtable * @@ -173,7 +172,7 @@ weechat_tcl_dict_to_hashtable (Tcl_Interp *interp, Tcl_Obj *dict, } /* - * weechat_tcl_exec: execute a tcl function + * Executes a tcl function. */ void * @@ -284,7 +283,11 @@ weechat_tcl_exec (struct t_plugin_script *script, } /* - * weechat_tcl_load: load a Tcl script + * Loads a tcl script. + * + * Returns: + * 1: OK + * 0: error */ int @@ -362,7 +365,7 @@ weechat_tcl_load (const char *filename) } /* - * weechat_tcl_load_cb: callback for weechat_script_auto_load() function + * Callback for weechat_script_auto_load() function. */ void @@ -375,7 +378,7 @@ weechat_tcl_load_cb (void *data, const char *filename) } /* - * weechat_tcl_unload: unload a Tcl script + * Unloads a tcl script. */ void @@ -420,7 +423,7 @@ weechat_tcl_unload (struct t_plugin_script *script) } /* - * weechat_tcl_unload_name: unload a Tcl script by name + * Unloads a tcl script by name. */ void @@ -448,7 +451,7 @@ weechat_tcl_unload_name (const char *name) } /* - * weechat_tcl_unload_all: unload all Tcl scripts + * Unloads all tcl scripts. */ void @@ -461,7 +464,7 @@ weechat_tcl_unload_all () } /* - * weechat_tcl_reload_name: reload a Tcl script by name + * Reloads a tcl script by name. */ void @@ -496,7 +499,7 @@ weechat_tcl_reload_name (const char *name) } /* - * weechat_tcl_command_cb: callback for "/tcl" command + * Callback for command "/tcl". */ int @@ -568,7 +571,7 @@ weechat_tcl_command_cb (void *data, struct t_gui_buffer *buffer, } if (weechat_strcasecmp (argv[1], "load") == 0) { - /* load Tcl script */ + /* load tcl script */ path_script = plugin_script_search_path (weechat_tcl_plugin, ptr_name); weechat_tcl_load ((path_script) ? path_script : ptr_name); @@ -577,12 +580,12 @@ weechat_tcl_command_cb (void *data, struct t_gui_buffer *buffer, } else if (weechat_strcasecmp (argv[1], "reload") == 0) { - /* reload one Tcl script */ + /* reload one tcl script */ weechat_tcl_reload_name (ptr_name); } else if (weechat_strcasecmp (argv[1], "unload") == 0) { - /* unload Tcl script */ + /* unload tcl script */ weechat_tcl_unload_name (ptr_name); } tcl_quiet = 0; @@ -600,7 +603,7 @@ weechat_tcl_command_cb (void *data, struct t_gui_buffer *buffer, } /* - * weechat_tcl_completion_cb: callback for script completion + * Adds tcl scripts to completion list. */ int @@ -619,7 +622,7 @@ weechat_tcl_completion_cb (void *data, const char *completion_item, } /* - * weechat_tcl_hdata_cb: callback for hdata + * Returns hdata for tcl scripts. */ struct t_hdata * @@ -634,7 +637,7 @@ weechat_tcl_hdata_cb (void *data, const char *hdata_name) } /* - * weechat_tcl_infolist_cb: callback for infolist + * Returns infolist with tcl scripts. */ struct t_infolist * @@ -658,7 +661,7 @@ weechat_tcl_infolist_cb (void *data, const char *infolist_name, } /* - * weechat_tcl_signal_debug_dump_cb: dump Tcl plugin data in WeeChat log file + * Dumps tcl plugin data in WeeChat log file. */ int @@ -680,7 +683,7 @@ weechat_tcl_signal_debug_dump_cb (void *data, const char *signal, } /* - * weechat_tcl_signal_buffer_closed_cb: callback called when a buffer is closed + * Callback called when a buffer is closed. */ int @@ -699,7 +702,7 @@ weechat_tcl_signal_buffer_closed_cb (void *data, const char *signal, } /* - * weechat_tcl_timer_action_cb: timer for executing actions + * Timer for executing actions. */ int @@ -733,8 +736,7 @@ weechat_tcl_timer_action_cb (void *data, int remaining_calls) } /* - * weechat_tcl_signal_script_action_cb: callback called when a script action - * is asked (install/remove a script) + * Callback called when a script action is asked (install/remove a script). */ int @@ -769,7 +771,7 @@ weechat_tcl_signal_script_action_cb (void *data, const char *signal, } /* - * weechat_plugin_init: initialize Tcl plugin + * Initializes tcl plugin. */ int @@ -800,7 +802,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end Tcl plugin + * Ends tcl plugin. */ int diff --git a/src/plugins/xfer/xfer-buffer.c b/src/plugins/xfer/xfer-buffer.c index 3fe3c9b4e..fed1d6cb0 100644 --- a/src/plugins/xfer/xfer-buffer.c +++ b/src/plugins/xfer/xfer-buffer.c @@ -38,7 +38,7 @@ int xfer_buffer_selected_line = 0; /* - * xfer_buffer_refresh: update a xfer in buffer and update hotlist for xfer buffer + * Updates a xfer in buffer and updates hotlist for xfer buffer. */ void @@ -244,8 +244,7 @@ xfer_buffer_refresh (const char *hotlist) } /* - * xfer_buffer_input_cb: callback called when user send data to xfer list - * buffer + * Callback called when user send data to xfer list buffer. */ int @@ -309,7 +308,7 @@ xfer_buffer_input_cb (void *data, struct t_gui_buffer *buffer, } /* - * xfer_buffer_close_cb: callback called when xfer buffer is closed + * Callback called when xfer buffer is closed. */ int @@ -325,7 +324,7 @@ xfer_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * xfer_buffer_open: open xfer buffer (to display list of xfer) + * Opens xfer buffer (to display list of xfer). */ void diff --git a/src/plugins/xfer/xfer-chat.c b/src/plugins/xfer/xfer-chat.c index e13f41c54..4416e2381 100644 --- a/src/plugins/xfer/xfer-chat.c +++ b/src/plugins/xfer/xfer-chat.c @@ -35,7 +35,7 @@ /* - * xfer_chat_send: send data to remote host via xfer chat + * Sends data to remote host via xfer chat. */ int @@ -48,7 +48,7 @@ xfer_chat_send (struct t_xfer *xfer, const char *buffer, int size_buf) } /* - * xfer_chat_sendf: send formatted data to remote host via DCC CHAT + * Sends formatted data to remote host via DCC CHAT. */ void @@ -86,7 +86,7 @@ xfer_chat_sendf (struct t_xfer *xfer, const char *format, ...) } /* - * xfer_chat_recv_cb: receive data from xfer chat remote host + * Receives data from xfer chat remote host. */ int @@ -223,8 +223,7 @@ xfer_chat_recv_cb (void *arg_xfer, int fd) } /* - * xfer_chat_buffer_input_cb: callback called when user send data to xfer chat - * buffer + * Callback called when user sends data to xfer chat buffer. */ int @@ -265,8 +264,7 @@ xfer_chat_buffer_input_cb (void *data, struct t_gui_buffer *buffer, } /* - * xfer_chat_close_buffer_cb: callback called when a buffer with direct chat - * is closed + * Callback called when a buffer with direct chat is closed. */ int @@ -295,7 +293,7 @@ xfer_chat_buffer_close_cb (void *data, struct t_gui_buffer *buffer) } /* - * xfer_chat_open_buffer: create buffer for DCC chat + * Creates buffer for DCC chat. */ void diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c index 02c834234..807079ad7 100644 --- a/src/plugins/xfer/xfer-command.c +++ b/src/plugins/xfer/xfer-command.c @@ -33,7 +33,7 @@ /* - * xfer_command_me: send a ctcp action to remote host + * Callback for command "/me": sends a ctcp action to remote host. */ int @@ -76,7 +76,7 @@ xfer_command_me (void *data, struct t_gui_buffer *buffer, int argc, } /* - * xfer_command_xfer_list: list xfer + * Displays a list of xfer. */ void @@ -193,7 +193,7 @@ xfer_command_xfer_list (int full) } /* - * xfer_command_xfer: command /xfer + * Callback for command "/xfer". */ int @@ -245,7 +245,7 @@ xfer_command_xfer (void *data, struct t_gui_buffer *buffer, int argc, } /* - * xfer_command_init: add /xfer command + * Hooks commands. */ void diff --git a/src/plugins/xfer/xfer-completion.c b/src/plugins/xfer/xfer-completion.c index 117bfeb97..d537c3c51 100644 --- a/src/plugins/xfer/xfer-completion.c +++ b/src/plugins/xfer/xfer-completion.c @@ -31,7 +31,7 @@ /* - * xfer_completion_nick_cb: callback for completion with nick + * Adds nicks to completion list. */ int @@ -64,7 +64,7 @@ xfer_completion_nick_cb (void *data, const char *completion_item, } /* - * xfer_completion_init: init completion for xfer plugin + * Hooks completion. */ void diff --git a/src/plugins/xfer/xfer-config.c b/src/plugins/xfer/xfer-config.c index 7fed0c78d..ebbd88cd2 100644 --- a/src/plugins/xfer/xfer-config.c +++ b/src/plugins/xfer/xfer-config.c @@ -67,8 +67,7 @@ struct t_config_option *xfer_config_file_auto_accept_chats; /* - * xfer_config_refresh_cb: callback called when user changes xfer option that - * needs a refresh of xfer list + * Callback for changes on an option that requires a refresh of xfer list. */ void @@ -83,7 +82,7 @@ xfer_config_refresh_cb (void *data, struct t_config_option *option) } /* - * xfer_config_reload: reload xfer configuration file + * Reloads xfer configuration file. */ int @@ -96,8 +95,11 @@ xfer_config_reload (void *data, struct t_config_file *config_file) } /* - * xfer_config_init: init xfer configuration file - * return: 1 if ok, 0 if error + * Initializes xfer configuration file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -309,7 +311,7 @@ xfer_config_init () } /* - * xfer_config_read: read xfer configuration file + * Reads xfer configuration file. */ int @@ -319,7 +321,7 @@ xfer_config_read () } /* - * xfer_config_write: write xfer configuration file + * Writes xfer configuration file. */ int diff --git a/src/plugins/xfer/xfer-dcc.c b/src/plugins/xfer/xfer-dcc.c index 4885c4fdb..fc8c702c4 100644 --- a/src/plugins/xfer/xfer-dcc.c +++ b/src/plugins/xfer/xfer-dcc.c @@ -40,7 +40,7 @@ /* - * xfer_dcc_send_file_child: child process for sending file with DCC protocol + * Child process for sending file with DCC protocol. */ void @@ -175,7 +175,7 @@ xfer_dcc_send_file_child (struct t_xfer *xfer) } /* - * xfer_dcc_recv_file_child: child process for receiving file + * Child process for receiving file with DCC protocol. */ void diff --git a/src/plugins/xfer/xfer-file.c b/src/plugins/xfer/xfer-file.c index f56f7a2a4..e8338e010 100644 --- a/src/plugins/xfer/xfer-file.c +++ b/src/plugins/xfer/xfer-file.c @@ -39,8 +39,11 @@ /* - * xfer_file_resume: resume a download - * return 1 if ok, 0 if not resumable + * Resumes a download. + * + * Returns: + * 1: OK + * 0: not resumable */ int @@ -70,9 +73,10 @@ xfer_file_resume (struct t_xfer *xfer, const char *filename) } /* - * xfer_file_find_filename: find local filename for a xfer - * if type if file/recv, add a suffix (like .1) if needed - * if download is resumable, set "start_resume" to good value + * Searches for local filename for a xfer. + * + * If type is file/recv, adds a suffix (like .1) if needed. + * If download is resumable, sets "start_resume" to good value. */ void @@ -169,7 +173,7 @@ xfer_file_find_filename (struct t_xfer *xfer) } /* - * xfer_file_calculate_speed: calculate xfer speed (for files only) + * Calculates xfer speed (for files only). */ void diff --git a/src/plugins/xfer/xfer-info.c b/src/plugins/xfer/xfer-info.c index 80afd31cd..9276bd452 100644 --- a/src/plugins/xfer/xfer-info.c +++ b/src/plugins/xfer/xfer-info.c @@ -29,7 +29,7 @@ /* - * xfer_info_get_infolist_cb: callback called when xfer infolist is asked + * Returns infolist with xfer info. */ struct t_infolist * @@ -85,13 +85,12 @@ xfer_info_get_infolist_cb (void *data, const char *infolist_name, } /* - * xfer_info_init: initialize info and infolist hooks for xfer plugin + * Hooks infolist. */ void xfer_info_init () { - /* xfer infolist hooks */ weechat_hook_infolist ("xfer", N_("list of xfer"), N_("xfer pointer (optional)"), NULL, diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c index e33612f67..78dc2b019 100644 --- a/src/plugins/xfer/xfer-network.c +++ b/src/plugins/xfer/xfer-network.c @@ -43,8 +43,11 @@ /* - * xfer_network_create_pipe: create pipe for communication with child process - * return 1 if ok, 0 if error + * Creates pipe for communication with child process. + * + * Returns: + * 1: OK + * 0: error */ int @@ -69,7 +72,7 @@ xfer_network_create_pipe (struct t_xfer *xfer) } /* - * xfer_network_write_pipe: write data into pipe + * Writes data into pipe. */ void @@ -85,7 +88,7 @@ xfer_network_write_pipe (struct t_xfer *xfer, int status, int error) } /* - * xfer_network_child_read_cb: read data from child via pipe + * Reads data from child via pipe. */ int @@ -174,7 +177,7 @@ xfer_network_child_read_cb (void *arg_xfer, int fd) } /* - * xfer_network_send_file_fork: fork process for sending file + * Forks process for sending file. */ void @@ -242,7 +245,7 @@ xfer_network_send_file_fork (struct t_xfer *xfer) } /* - * xfer_network_recv_file_fork: fork process for receiving file + * Forks process for receiving file. */ void @@ -300,7 +303,7 @@ xfer_network_recv_file_fork (struct t_xfer *xfer) } /* - * xfer_network_child_kill: kill child process and close pipe + * Kills child process and closes pipe. */ void @@ -328,7 +331,7 @@ xfer_network_child_kill (struct t_xfer *xfer) } /* - * xfer_network_fd_cb: callback called when data is available on xfer socket + * Callback called when data is available on xfer socket. */ int @@ -437,8 +440,8 @@ xfer_network_fd_cb (void *arg_xfer, int fd) } /* - * xfer_network_timer_cb: callback called to check if there's a timeout for xfer - * (called only one time for xfer) + * Callback called to check if there's a timeout for xfer (called only one time + * for xfer). */ int @@ -466,7 +469,11 @@ xfer_network_timer_cb (void *arg_xfer, int remaining_calls) } /* - * xfer_network_connect: connect to another host + * Connects to another host. + * + * Returns: + * 1: OK + * 0: error */ int @@ -537,7 +544,7 @@ xfer_network_connect (struct t_xfer *xfer) } /* - * xfer_network_connect_init: connect to sender and init file or chat + * Connects to sender and initializes file or chat. */ void @@ -567,7 +574,7 @@ xfer_network_connect_init (struct t_xfer *xfer) } /* - * xfer_network_accept: accept a xfer file or chat request + * Accepts a xfer file or chat request. */ void diff --git a/src/plugins/xfer/xfer-upgrade.c b/src/plugins/xfer/xfer-upgrade.c index 3327d878c..fe0137e10 100644 --- a/src/plugins/xfer/xfer-upgrade.c +++ b/src/plugins/xfer/xfer-upgrade.c @@ -31,7 +31,11 @@ /* - * xfer_upgrade_save_xfers: save xfers info to upgrade file + * Saves xfers info to upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -43,8 +47,11 @@ xfer_upgrade_save_xfers (struct t_upgrade_file *upgrade_file) } /* - * xfer_upgrade_save: save upgrade file - * return 1 if ok, 0 if error + * Saves upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int @@ -65,8 +72,8 @@ xfer_upgrade_save () } /* - * xfer_upgrade_set_buffer_callbacks: restore buffers callbacks (input and - * close) for buffers created by xfer plugin + * Restores buffers callbacks (input and close) for buffers created by xfer + * plugin. */ void @@ -97,7 +104,7 @@ xfer_upgrade_set_buffer_callbacks () } /* - * xfer_upgrade_read_cb: read callback for xfer upgrade file + * Reads callback for xfer upgrade file. */ int @@ -116,8 +123,11 @@ xfer_upgrade_read_cb (void *data, } /* - * xfer_upgrade_load: load upgrade file - * return 1 if ok, 0 if error + * Loads upgrade file. + * + * Returns: + * 1: OK + * 0: error */ int diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 8bc7b071b..f9f099b4a 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -78,9 +78,11 @@ void xfer_disconnect_all (); /* - * xfer_valid: check if a xfer pointer exists - * return 1 if xfer exists - * 0 if xfer is not found + * Checks if a xfer pointer is valid. + * + * Returns: + * 1: xfer exists + * 0: xfer does not exist */ int @@ -103,7 +105,7 @@ xfer_valid (struct t_xfer *xfer) } /* - * xfer_signal_upgrade_cb: callback for "upgrade" signal + * Callback for signal "upgrade". */ int @@ -125,7 +127,7 @@ xfer_signal_upgrade_cb (void *data, const char *signal, const char *type_data, /* - * xfer_create_directories: create directories for xfer plugin + * Creates directories for xfer plugin. */ void @@ -150,8 +152,9 @@ xfer_create_directories () } /* - * xfer_search_type: search xfer type with a string - * return -1 if not found + * Searches for xfer type. + * + * Returns index of type in enum t_xfer_type, -1 if not found. */ int @@ -170,8 +173,9 @@ xfer_search_type (const char *type) } /* - * xfer_search_protocol: search xfer protocol with a string - * return -1 if not found + * Searches for xfer protocol. + * + * Returns index of protocol in enum t_xfer_protocol, -1 if not found. */ int @@ -190,7 +194,9 @@ xfer_search_protocol (const char *protocol) } /* - * xfer_search: search a xfer + * Searches for a xfer. + * + * Returns pointer to xfer found, NULL if not found. */ struct t_xfer * @@ -214,7 +220,9 @@ xfer_search (const char *plugin_name, const char *plugin_id, enum t_xfer_type ty } /* - * xfer_search_by_number: search a xfer by number (first xfer is 0) + * Searches for a xfer by number (first xfer is 0). + * + * Returns pointer to xfer found, NULL if not found. */ struct t_xfer * @@ -236,7 +244,9 @@ xfer_search_by_number (int number) } /* - * xfer_search_by_buffer: search a xfer by buffer (for chat only) + * Searches for a xfer by buffer (for chat only). + * + * Returns pointer to xfer found, NULL if not found. */ struct t_xfer * @@ -258,7 +268,7 @@ xfer_search_by_buffer (struct t_gui_buffer *buffer) } /* - * xfer_close: close a xfer + * Closes a xfer. */ void @@ -347,7 +357,7 @@ xfer_close (struct t_xfer *xfer, enum t_xfer_status status) } /* - * xfer_disconnect_all: disconnect all active xfer (with a socket) + * Disconnects all active xfer (with a socket). */ void @@ -376,8 +386,11 @@ xfer_disconnect_all () } /* - * xfer_port_in_use: return 1 if a port is in used - * (by an active or connecting xfer) + * Checks if a port is in used. + * + * Returns: + * 1: port is in used (by an active or connecting xfer) + * 0: port is not in used */ int @@ -397,7 +410,7 @@ xfer_port_in_use (int port) } /* - * xfer_send_signal: send a signal for a xfer + * Sends a signal for a xfer. */ void @@ -439,7 +452,9 @@ xfer_send_signal (struct t_xfer *xfer, const char *signal) } /* - * xfer_alloc: allocate a new xfer + * Allocates a new xfer. + * + * Returns pointer to new xfer, NULL if error. */ struct t_xfer * @@ -506,7 +521,9 @@ xfer_alloc () } /* - * xfer_new: add a xfer to list + * Adds a xfer to list. + * + * Returns pointer to new xfer, NULL if error. */ struct t_xfer * @@ -674,7 +691,7 @@ xfer_new (const char *plugin_name, const char *plugin_id, } /* - * xfer_free: free xfer struct and remove it from list + * Frees xfer struct and removes it from list. */ void @@ -726,7 +743,7 @@ xfer_free (struct t_xfer *xfer) } /* - * xfer_add_cb: callback for "xfer_add" signal + * Callback for signal "xfer_add". */ int @@ -1089,7 +1106,7 @@ error: } /* - * xfer_start_resume_cb: callback called when resume is accepted by sender + * Callback called when resume is accepted by sender. */ int @@ -1173,8 +1190,7 @@ error: } /* - * xfer_accept_resume_cb: callback called when sender receives resume request - * from recever + * Callback called when sender receives resume request from receiver. */ int @@ -1265,8 +1281,11 @@ error: } /* - * xfer_add_to_infolist: add a xfer in an infolist - * return 1 if ok, 0 if error + * Adds a xfer in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1379,7 +1398,7 @@ xfer_add_to_infolist (struct t_infolist *infolist, struct t_xfer *xfer) } /* - * xfer_print_log: print xfer infos in log (usually for crash dump) + * Prints xfer infos in WeeChat log file (usually for crash dump). */ void @@ -1442,7 +1461,7 @@ xfer_print_log () } /* - * xfer_debug_dump_cb: callback for "debug_dump" signal + * Callback for signal "debug_dump". */ int @@ -1472,7 +1491,7 @@ xfer_debug_dump_cb (void *data, const char *signal, const char *type_data, } /* - * weechat_plugin_init: initialize xfer plugin + * Initializes xfer plugin. */ int @@ -1519,7 +1538,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) } /* - * weechat_plugin_end: end xfer plugin + * Ends xfer plugin. */ int |