mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 16:53:14 +02:00
core, plugins: fix typos in comments on functions, use imperative
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Returns content of bar item "spell_dict": spell dictionary used on current
|
||||
* Return content of bar item "spell_dict": spell dictionary used on current
|
||||
* buffer.
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@ spell_bar_item_dict (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns content of bar item "spell_suggest": spell checker suggestions.
|
||||
* Return content of bar item "spell_suggest": spell checker suggestions.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -172,7 +172,7 @@ end:
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes spell bar items.
|
||||
* Initialize spell bar items.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Converts an ISO lang code in its English full name.
|
||||
* Convert an ISO lang code in its English full name.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ spell_command_iso_to_lang (const char *code)
|
||||
}
|
||||
|
||||
/*
|
||||
* Converts an ISO country code in its English full name.
|
||||
* Convert an ISO country code in its English full name.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ spell_command_iso_to_country (const char *code)
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays one dictionary when using enchant.
|
||||
* Display one dictionary when using enchant.
|
||||
*/
|
||||
|
||||
#ifdef USE_ENCHANT
|
||||
@@ -133,7 +133,7 @@ spell_enchant_dict_describe_cb (const char *lang_tag,
|
||||
#endif /* USE_ENCHANT */
|
||||
|
||||
/*
|
||||
* Displays list of dictionaries installed on system.
|
||||
* Display list of dictionaries installed on system.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -211,7 +211,7 @@ spell_command_speller_list_dicts (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a list of dictionaries for a buffer.
|
||||
* Set a list of dictionaries for a buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -246,7 +246,7 @@ spell_command_set_dict (struct t_gui_buffer *buffer, const char *value)
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a word in personal dictionary.
|
||||
* Add a word in personal dictionary.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -480,7 +480,7 @@ spell_command_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Hooks spell command.
|
||||
* Hook spell command.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Adds spell langs (all langs, even for dictionaries not installed) to
|
||||
* Add spell langs (all langs, even for dictionaries not installed) to
|
||||
* completion list.
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ spell_completion_langs_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a dictionary to completion when using enchant.
|
||||
* Add a dictionary to completion when using enchant.
|
||||
*/
|
||||
|
||||
#ifdef USE_ENCHANT
|
||||
@@ -81,7 +81,7 @@ spell_completion_enchant_add_dict_cb (const char *lang_tag,
|
||||
#endif /* USE_ENCHANT */
|
||||
|
||||
/*
|
||||
* Adds spell dictionaries (only installed dictionaries) to completion list.
|
||||
* Add spell dictionaries (only installed dictionaries) to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -132,7 +132,7 @@ spell_completion_dicts_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Hooks completions.
|
||||
* Hook completions.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -220,7 +220,7 @@ spell_config_dict_delete_option (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates an option in section "dict".
|
||||
* Create an option in section "dict".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -411,7 +411,7 @@ spell_config_option_create_option (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets a list of dictionaries for a buffer.
|
||||
* Get a list of dictionaries for a buffer.
|
||||
*/
|
||||
|
||||
struct t_config_option *
|
||||
@@ -423,7 +423,7 @@ spell_config_get_dict (const char *name)
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a list of dictionaries for a buffer.
|
||||
* Set a list of dictionaries for a buffer.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -437,9 +437,9 @@ spell_config_set_dict (const char *name, const char *value)
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes spell configuration file.
|
||||
* Initialize spell configuration file.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
@@ -620,7 +620,7 @@ spell_config_init (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Reads spell configuration file.
|
||||
* Read spell configuration file.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -639,7 +639,7 @@ spell_config_read (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Writes spell configuration file.
|
||||
* Write spell configuration file.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -649,7 +649,7 @@ spell_config_write (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Frees spell configuration.
|
||||
* Free spell configuration.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Returns spell info "spell_dict".
|
||||
* Return spell info "spell_dict".
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -80,7 +80,7 @@ spell_info_info_spell_dict_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Hooks info for spell plugin.
|
||||
* Hook info for spell plugin.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -45,9 +45,9 @@ struct t_hashtable *spell_speller_buffer = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* Checks if a spelling dictionary is supported (installed on system).
|
||||
* Check if a spelling dictionary is supported (installed on system).
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: spell dict is supported
|
||||
* 0: spell dict is NOT supported
|
||||
*/
|
||||
@@ -90,7 +90,7 @@ spell_speller_dict_supported (const char *lang)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if dictionaries are valid (called when user creates/changes
|
||||
* Check if dictionaries are valid (called when user creates/changes
|
||||
* dictionaries for a buffer).
|
||||
*
|
||||
* An error is displayed for each invalid dictionary found.
|
||||
@@ -134,9 +134,9 @@ spell_speller_check_dictionaries (const char *dict_list)
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates and adds a new speller instance in the hashtable.
|
||||
* Create and add a new speller instance in the hashtable.
|
||||
*
|
||||
* Returns pointer to new speller, NULL if error.
|
||||
* Return pointer to new speller, NULL if error.
|
||||
*/
|
||||
|
||||
#ifdef USE_ENCHANT
|
||||
@@ -229,7 +229,7 @@ spell_speller_new (const char *lang)
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates hashtable entries with a string containing a list of dicts.
|
||||
* Create hashtable entries with a string containing a list of dicts.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -258,7 +258,7 @@ spell_speller_add_dicts_to_hash (struct t_hashtable *hashtable,
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes a speller if it is NOT in hashtable "used_spellers".
|
||||
* Remove a speller if it is NOT in hashtable "used_spellers".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -279,7 +279,7 @@ spell_speller_remove_unused_cb (void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes unused spellers from hashtable "spell_spellers".
|
||||
* Remove unused spellers from hashtable "spell_spellers".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -364,7 +364,7 @@ spell_speller_free_value_cb (struct t_hashtable *hashtable,
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a structure for buffer speller info in hashtable
|
||||
* Create a structure for buffer speller info in hashtable
|
||||
* "spell_buffer_spellers".
|
||||
*/
|
||||
|
||||
@@ -461,9 +461,9 @@ spell_speller_buffer_free_value_cb (struct t_hashtable *hashtable,
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes spellers (creates hashtables).
|
||||
* Initialize spellers (creates hashtables).
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: OK (hashtables created)
|
||||
* 0: error (not enough memory)
|
||||
*/
|
||||
@@ -498,7 +498,7 @@ spell_speller_init (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Ends spellers (removes hashtables).
|
||||
* End spellers (removes hashtables).
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+23
-23
@@ -186,7 +186,7 @@ char *spell_url_prefix[] =
|
||||
|
||||
|
||||
/*
|
||||
* Displays a warning if the file aspell.conf is still present in WeeChat
|
||||
* Display a warning if the file aspell.conf is still present in WeeChat
|
||||
* home directory and spell.conf not yet created (upgrade from a version ≤ 2.4
|
||||
* to a version ≥ 2.5).
|
||||
*/
|
||||
@@ -223,7 +223,7 @@ spell_warning_aspell_config (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Builds full name of buffer.
|
||||
* Build full name of buffer.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
@@ -246,7 +246,7 @@ spell_build_option_name (struct t_gui_buffer *buffer)
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets dictionary list for a name of buffer.
|
||||
* Get dictionary list for a name of buffer.
|
||||
*
|
||||
* First tries with all arguments, then removes one by one to find dict (from
|
||||
* specific to general dict).
|
||||
@@ -301,7 +301,7 @@ spell_get_dict_with_buffer_name (const char *name)
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets dictionary list for a buffer.
|
||||
* Get dictionary list for a buffer.
|
||||
*
|
||||
* First tries with all arguments, then removes one by one to find dict (from
|
||||
* specific to general dict).
|
||||
@@ -325,9 +325,9 @@ spell_get_dict (struct t_gui_buffer *buffer)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if command is authorized for spell checking.
|
||||
* Check if command is authorized for spell checking.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: command authorized
|
||||
* 0: command not authorized
|
||||
*/
|
||||
@@ -357,9 +357,9 @@ spell_command_authorized (const char *command)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a word is an URL.
|
||||
* Check if a word is an URL.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: word is an URL
|
||||
* 0: word is not an URL
|
||||
*/
|
||||
@@ -383,9 +383,9 @@ spell_string_is_url (const char *word)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a word is a nick of nicklist.
|
||||
* Check if a word is a nick of nicklist.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: word is a nick of nicklist
|
||||
* 0: word is not a nick of nicklist
|
||||
*/
|
||||
@@ -460,9 +460,9 @@ spell_string_is_nick (struct t_gui_buffer *buffer, const char *word)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a word is made of digits and punctuation.
|
||||
* Check if a word is made of digits and punctuation.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: word has only digits and punctuation
|
||||
* 0: word has some other chars (not digits neither punctuation)
|
||||
*/
|
||||
@@ -488,9 +488,9 @@ spell_string_is_simili_number (const char *word)
|
||||
}
|
||||
|
||||
/*
|
||||
* Spell checks a word.
|
||||
* Spell check a word.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* 1: word is OK
|
||||
* 0: word is misspelled
|
||||
*/
|
||||
@@ -529,9 +529,9 @@ spell_check_word (struct t_spell_speller_buffer *speller_buffer,
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets suggestions for a word.
|
||||
* Get suggestions for a word.
|
||||
*
|
||||
* Returns a string with format: "suggest1,suggest2,suggest3".
|
||||
* Return a string with format: "suggest1,suggest2,suggest3".
|
||||
*
|
||||
* Note: result must be freed after use (if not NULL).
|
||||
*/
|
||||
@@ -636,7 +636,7 @@ spell_get_suggestions (struct t_spell_speller_buffer *speller_buffer,
|
||||
}
|
||||
|
||||
/*
|
||||
* Skips WeeChat and IRC color codes in *string and adds them to "result".
|
||||
* Skip WeeChat and IRC color codes in *string and adds them to "result".
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -707,7 +707,7 @@ spell_skip_color_codes (char **string, char **result)
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates input text by adding color for misspelled words.
|
||||
* Update input text by adding color for misspelled words.
|
||||
*/
|
||||
|
||||
char *
|
||||
@@ -1044,7 +1044,7 @@ spell_modifier_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Refreshes bar items on signal "buffer_switch".
|
||||
* Refresh bar items on signal "buffer_switch".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1066,7 +1066,7 @@ spell_buffer_switch_cb (const void *pointer, void *data, const char *signal,
|
||||
}
|
||||
|
||||
/*
|
||||
* Refreshes bar items on signal "window_switch".
|
||||
* Refresh bar items on signal "window_switch".
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1088,7 +1088,7 @@ spell_window_switch_cb (const void *pointer, void *data, const char *signal,
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes struct for buffer in hashtable "spell_speller_buffer" on
|
||||
* Remove struct for buffer in hashtable "spell_speller_buffer" on
|
||||
* signal "buffer_closed".
|
||||
*/
|
||||
|
||||
@@ -1160,7 +1160,7 @@ spell_config_change_nick_completer_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes spell plugin.
|
||||
* Initialize spell plugin.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1234,7 +1234,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
}
|
||||
|
||||
/*
|
||||
* Ends spell plugin.
|
||||
* End spell plugin.
|
||||
*/
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user