mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 01:25:41 +02:00
Aspell plugin is born again
This commit is contained in:
@@ -31,13 +31,13 @@ IF(NOT DISABLE_ALIAS)
|
||||
ADD_SUBDIRECTORY( alias )
|
||||
ENDIF(NOT DISABLE_ALIAS)
|
||||
|
||||
IF(ENABLE_ASPELL)
|
||||
IF(NOT DISABLE_ASPELL)
|
||||
# Check for aspell libraries
|
||||
FIND_PACKAGE(Aspell)
|
||||
IF(ASPELL_FOUND)
|
||||
ADD_SUBDIRECTORY( aspell )
|
||||
ENDIF(ASPELL_FOUND)
|
||||
ENDIF(ENABLE_ASPELL)
|
||||
ENDIF(NOT DISABLE_ASPELL)
|
||||
|
||||
IF(NOT DISABLE_CHARSET)
|
||||
# Check for iconv support.
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
ADD_LIBRARY(aspell MODULE aspell.c aspell.h)
|
||||
ADD_LIBRARY(aspell MODULE
|
||||
aspell.c aspell.h
|
||||
aspell-config.c aspell-config.h
|
||||
aspell-speller.c aspell-speller.h)
|
||||
SET_TARGET_PROPERTIES(aspell PROPERTIES PREFIX "")
|
||||
|
||||
IF(ASPELL_FOUND)
|
||||
|
||||
@@ -20,6 +20,11 @@ libdir = ${weechat_libdir}/plugins
|
||||
|
||||
lib_LTLIBRARIES = aspell.la
|
||||
|
||||
aspell_la_SOURCES = aspell.c aspell.h
|
||||
aspell_la_SOURCES = aspell.c \
|
||||
aspell.h \
|
||||
aspell-config.c \
|
||||
aspell-config.h \
|
||||
aspell-speller.c \
|
||||
aspell-speller.h
|
||||
aspell_la_LDFLAGS = -module
|
||||
aspell_la_LIBADD = $(ASPELL_LFLAGS)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_ASPELL_CONFIG_H
|
||||
#define __WEECHAT_ASPELL_CONFIG_H 1
|
||||
|
||||
#define ASPELL_CONFIG_NAME "aspell"
|
||||
|
||||
|
||||
extern struct t_config_option *weechat_aspell_config_look_color;
|
||||
|
||||
extern struct t_config_option *weechat_aspell_config_check_default_dict;
|
||||
extern struct t_config_option *weechat_aspell_config_check_real_time;
|
||||
extern struct t_config_option *weechat_aspell_config_check_word_min_length;
|
||||
|
||||
extern char **weechat_aspell_commands_to_check;
|
||||
extern int weechat_aspell_count_commands_to_check;
|
||||
extern int *weechat_aspell_length_commands_to_check;
|
||||
|
||||
extern struct t_config_option *weechat_aspell_config_get_dict (const char *name);
|
||||
extern int weechat_aspell_config_set_dict (const char *name, const char *value);
|
||||
extern int weechat_aspell_config_init ();
|
||||
extern int weechat_aspell_config_read ();
|
||||
extern int weechat_aspell_config_write ();
|
||||
extern void weechat_aspell_config_free ();
|
||||
|
||||
#endif /* aspell-config.h */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_ASPELL_SPELLER_H
|
||||
#define __WEECHAT_ASPELL_SPELLER_H 1
|
||||
|
||||
struct t_aspell_speller
|
||||
{
|
||||
AspellSpeller *speller; /* aspell speller */
|
||||
char *lang; /* language */
|
||||
|
||||
struct t_aspell_speller *prev_speller; /* pointer to next speller */
|
||||
struct t_aspell_speller *next_speller; /* pointer to previous speller */
|
||||
};
|
||||
|
||||
extern struct t_aspell_speller *weechat_aspell_spellers;
|
||||
|
||||
extern int weechat_aspell_speller_exists (const char *lang);
|
||||
extern struct t_aspell_speller *weechat_aspell_speller_search (const char *lang);
|
||||
extern void weechat_aspell_speller_check_dictionaries (const char *dict_list);
|
||||
extern struct t_aspell_speller *weechat_aspell_speller_new (const char *lang);
|
||||
extern void weechat_aspell_speller_free (struct t_aspell_speller *speller);
|
||||
extern void weechat_aspell_speller_free_all ();
|
||||
|
||||
#endif /* aspell-speller.h */
|
||||
+832
-1256
File diff suppressed because it is too large
Load Diff
+10
-162
File diff suppressed because it is too large
Load Diff
@@ -354,7 +354,7 @@ charset_decode_cb (void *data, const char *modifier, const char *modifier_data,
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"charset: debug: using 'decode' charset: %s "
|
||||
"(modifier='%s', modifier_data='%s', string='%s')",
|
||||
"(modifier=\"%s\", modifier_data=\"%s\", string=\"%s\")",
|
||||
charset, modifier, modifier_data, string);
|
||||
}
|
||||
if (charset && charset[0])
|
||||
@@ -383,7 +383,7 @@ charset_encode_cb (void *data, const char *modifier, const char *modifier_data,
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"charset: debug: using 'encode' charset: %s "
|
||||
"(modifier='%s', modifier_data='%s', string='%s')",
|
||||
"(modifier=\"%s\", modifier_data=\"%s\", string=\"%s\")",
|
||||
charset, modifier, modifier_data, string);
|
||||
}
|
||||
if (charset && charset[0])
|
||||
@@ -407,11 +407,11 @@ charset_set (struct t_config_section *section, const char *type,
|
||||
value) > 0)
|
||||
{
|
||||
if (value && value[0])
|
||||
weechat_printf (NULL, _("Charset: %s, %s => %s"),
|
||||
type, name, value);
|
||||
weechat_printf (NULL, "%s: %s, %s => %s",
|
||||
CHARSET_PLUGIN_NAME, type, name, value);
|
||||
else
|
||||
weechat_printf (NULL, _("Charset: %s, %s: removed"),
|
||||
type, name);
|
||||
weechat_printf (NULL, _("%s: %s, %s: removed"),
|
||||
CHARSET_PLUGIN_NAME, type, name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ demo_printf_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
|
||||
if (argc > 1)
|
||||
weechat_printf (buffer,
|
||||
"demo_printf: '%s'", argv_eol[1]);
|
||||
"demo_printf: \"%s\"", argv_eol[1]);
|
||||
else
|
||||
{
|
||||
weechat_printf (buffer,
|
||||
@@ -121,7 +121,7 @@ demo_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
|
||||
weechat_printf (buffer,
|
||||
"buffer_input_data_cb: buffer = %x (%s), "
|
||||
"input_data = '%s'",
|
||||
"input_data = \"%s\"",
|
||||
buffer,
|
||||
weechat_buffer_get_string (buffer, "name"),
|
||||
input_data);
|
||||
@@ -372,7 +372,7 @@ demo_signal_cb (void *data, const char *signal, const char *type_data,
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("demo_signal: signal: %s, type_data: %s, "
|
||||
"signal_data: '%s'"),
|
||||
"signal_data: \"%s\""),
|
||||
signal, type_data, (char *)signal_data);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
|
||||
@@ -2795,7 +2795,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
{
|
||||
weechat_printf (NULL, "");
|
||||
weechat_printf (NULL,
|
||||
_("Servers with '%s':"),
|
||||
_("Servers with \"%s\":"),
|
||||
server_name);
|
||||
}
|
||||
one_server_found = 1;
|
||||
|
||||
@@ -230,9 +230,9 @@ irc_ignore_free (struct t_irc_ignore *ignore)
|
||||
|
||||
/* remove filter from filters list */
|
||||
if (ignore->prev_ignore)
|
||||
ignore->prev_ignore->next_ignore = ignore->next_ignore;
|
||||
(ignore->prev_ignore)->next_ignore = ignore->next_ignore;
|
||||
if (ignore->next_ignore)
|
||||
ignore->next_ignore->prev_ignore = ignore->prev_ignore;
|
||||
(ignore->next_ignore)->prev_ignore = ignore->prev_ignore;
|
||||
if (irc_ignore_list == ignore)
|
||||
irc_ignore_list = ignore->next_ignore;
|
||||
if (last_irc_ignore == ignore)
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#define LOGGER_CONFIG_NAME "logger"
|
||||
|
||||
|
||||
extern struct t_config_file *logger_config_file;
|
||||
|
||||
extern struct t_config_option *logger_config_look_backlog;
|
||||
|
||||
extern struct t_config_option *logger_config_file_auto_log;
|
||||
|
||||
@@ -179,7 +179,7 @@ script_ptr2str (void *pointer)
|
||||
if (!pointer)
|
||||
return strdup ("");
|
||||
|
||||
snprintf (pointer_str, sizeof (pointer_str) - 1,
|
||||
snprintf (pointer_str, sizeof (pointer_str),
|
||||
"0x%x", (unsigned int)pointer);
|
||||
|
||||
return strdup (pointer_str);
|
||||
|
||||
Reference in New Issue
Block a user