1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 21:06:38 +02:00

spell: rename variable "broker" to "spell_enchant_broker"

This commit is contained in:
Sébastien Helleu
2025-03-16 15:47:18 +01:00
parent 6b19987e7f
commit 6d11468059
5 changed files with 15 additions and 12 deletions
+2 -1
View File
@@ -153,7 +153,8 @@ spell_command_speller_list_dicts (void)
SPELL_PLUGIN_NAME);
#ifdef USE_ENCHANT
enchant_broker_list_dicts (broker, spell_enchant_dict_describe_cb,
enchant_broker_list_dicts (spell_enchant_broker,
spell_enchant_dict_describe_cb,
NULL);
#else
config = new_aspell_config ();
+1 -1
View File
@@ -102,7 +102,7 @@ spell_completion_dicts_cb (const void *pointer, void *data,
(void) buffer;
#ifdef USE_ENCHANT
enchant_broker_list_dicts (broker,
enchant_broker_list_dicts (spell_enchant_broker,
spell_completion_enchant_add_dict_cb,
completion);
#else
+3 -3
View File
@@ -54,7 +54,7 @@ int
spell_speller_dict_supported (const char *lang)
{
#ifdef USE_ENCHANT
return enchant_broker_dict_exists (broker, lang);
return enchant_broker_dict_exists (spell_enchant_broker, lang);
#else
struct AspellConfig *config;
AspellDictInfoList *list;
@@ -164,7 +164,7 @@ spell_speller_new (const char *lang)
}
#ifdef USE_ENCHANT
new_speller = enchant_broker_request_dict (broker, lang);
new_speller = enchant_broker_request_dict (spell_enchant_broker, lang);
if (!new_speller)
{
weechat_printf (NULL,
@@ -353,7 +353,7 @@ spell_speller_free_value_cb (struct t_hashtable *hashtable,
/* free speller */
#ifdef USE_ENCHANT
ptr_speller = (EnchantDict *)value;
enchant_broker_free_dict (broker, ptr_speller);
enchant_broker_free_dict (spell_enchant_broker, ptr_speller);
#else
ptr_speller = (AspellSpeller *)value;
aspell_speller_save_all_word_lists (ptr_speller);
+8 -6
View File
@@ -58,7 +58,7 @@ char *spell_nick_completer = NULL;
int spell_len_nick_completer = 0;
#ifdef USE_ENCHANT
EnchantBroker *broker = NULL;
EnchantBroker *spell_enchant_broker = NULL;
#endif /* USE_ENCHANT */
/*
@@ -1177,11 +1177,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
#ifdef USE_ENCHANT
/* acquire enchant broker */
broker = enchant_broker_init ();
if (!broker)
spell_enchant_broker = enchant_broker_init ();
if (!spell_enchant_broker)
return WEECHAT_RC_ERROR;
#ifdef ENCHANT_MYSPELL_DICT_DIR
enchant_broker_set_param(broker, "enchant.myspell.dictionary.path", ENCHANT_MYSPELL_DICT_DIR);
enchant_broker_set_param(spell_enchant_broker,
"enchant.myspell.dictionary.path",
ENCHANT_MYSPELL_DICT_DIR);
#endif
#endif /* USE_ENCHANT */
@@ -1247,8 +1249,8 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
#ifdef USE_ENCHANT
/* release enchant broker */
enchant_broker_free (broker);
broker = NULL;
enchant_broker_free (spell_enchant_broker);
spell_enchant_broker = NULL;
#endif /* USE_ENCHANT */
if (spell_nick_completer)
+1 -1
View File
@@ -38,7 +38,7 @@ struct t_spell_code
};
#ifdef USE_ENCHANT
extern EnchantBroker *broker;
extern EnchantBroker *spell_enchant_broker;
#endif /* USE_ENCHANT */
extern struct t_weechat_plugin *weechat_spell_plugin;