diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-13 18:51:44 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-13 18:51:44 +0100 |
commit | 7d34812f1cd091b70395808381469c6c1f5c659a (patch) | |
tree | 8dd82177eaad95dc216bf1b68926b8398440a198 /src/plugins | |
parent | 9db5682186de96b1deeb48e76887df7c74e77036 (diff) | |
download | weechat-7d34812f1cd091b70395808381469c6c1f5c659a.zip |
core: reformat comments for functions
Diffstat (limited to 'src/plugins')
99 files changed, 2797 insertions, 7853 deletions
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 |