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/rmodifier | |
parent | 9db5682186de96b1deeb48e76887df7c74e77036 (diff) | |
download | weechat-7d34812f1cd091b70395808381469c6c1f5c659a.zip |
core: reformat comments for functions
Diffstat (limited to 'src/plugins/rmodifier')
-rw-r--r-- | src/plugins/rmodifier/rmodifier-command.c | 10 | ||||
-rw-r--r-- | src/plugins/rmodifier/rmodifier-completion.c | 4 | ||||
-rw-r--r-- | src/plugins/rmodifier/rmodifier-config.c | 28 | ||||
-rw-r--r-- | src/plugins/rmodifier/rmodifier-debug.c | 4 | ||||
-rw-r--r-- | src/plugins/rmodifier/rmodifier-info.c | 6 | ||||
-rw-r--r-- | src/plugins/rmodifier/rmodifier.c | 53 |
6 files changed, 56 insertions, 49 deletions
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 |