adding aspell plugin
This commit is contained in:
parent
b48fb5c0ec
commit
935d8e9304
43
configure.in
43
configure.in
@ -96,6 +96,7 @@ AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
|
||||
AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
|
||||
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
@ -114,6 +115,7 @@ AC_ARG_ENABLE(lua, [ --disable-lua Turn off Lua script plug
|
||||
AC_ARG_WITH(lua-inc, [ --with-lua-inc=DIR, Lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
|
||||
AC_ARG_WITH(lua-lib, [ --with-lua-lib=DIR, Lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
|
||||
AC_ARG_WITH(lua-suffix, [ --with-lua-suffix=ARG Lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
|
||||
AC_ARG_ENABLE(aspell, [ --disable-aspell Turn off Aspell plugin (default=compiled if found)],enable_aspell=$enableval,enable_aspell=yes)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||
|
||||
@ -197,6 +199,7 @@ if test "x$enable_plugins" != "xyes" ; then
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
fi
|
||||
|
||||
# ---------------------------------- perl --------------------------------------
|
||||
@ -456,6 +459,42 @@ if test "x$enable_lua" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_LUA)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# aspell
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
ASPELL_CFLAGS=""
|
||||
ASPELL_LFLAGS=""
|
||||
|
||||
AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
|
||||
AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
|
||||
|
||||
AC_MSG_CHECKING(for aspell headers and librairies)
|
||||
if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([
|
||||
*** Aspell headers and/or libraries couldn't be found in your system.
|
||||
*** Try to install them with your software package manager.
|
||||
*** WeeChat will be built without Aspell support.])
|
||||
enable_aspell="no"
|
||||
not_found="$not_found aspell"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
AC_SUBST(ASPELL_CFLAGS)
|
||||
AC_SUBST(ASPELL_LFLAGS)
|
||||
AC_DEFINE(PLUGIN_ASPELL)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# dynamic loader
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
||||
if test "$LIBDL_FOUND" != "yes"; then
|
||||
@ -474,6 +513,7 @@ if test "x$enable_plugins" = "xyes" ; then
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
not_found="$not_found plugins"
|
||||
fi
|
||||
fi
|
||||
@ -617,6 +657,7 @@ AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
|
||||
|
||||
@ -636,6 +677,7 @@ AC_OUTPUT([Makefile
|
||||
src/plugins/scripts/python/Makefile
|
||||
src/plugins/scripts/ruby/Makefile
|
||||
src/plugins/scripts/lua/Makefile
|
||||
src/plugins/aspell/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
@ -692,6 +734,7 @@ echo " Perl plugin......... : $enable_perl"
|
||||
echo " Python plugin....... : $enable_python"
|
||||
echo " Ruby plugin......... : $enable_ruby"
|
||||
echo " Lua plugin.......... : $enable_lua"
|
||||
echo " Aspell plugin....... : $enable_aspell"
|
||||
echo "Compile with debug info........... : $msg_debug_compiler"
|
||||
echo " Backtrace........... : $enable_backtrace"
|
||||
echo "Print debugging messages.......... : $msg_debug_verbose"
|
||||
|
@ -33,7 +33,11 @@ if PLUGIN_LUA
|
||||
script_dir = scripts
|
||||
endif
|
||||
|
||||
SUBDIRS = $(script_dir)
|
||||
if PLUGIN_ASPELL
|
||||
aspell_dir = aspell
|
||||
endif
|
||||
|
||||
SUBDIRS = $(script_dir) $(aspell_dir)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_plugins.a
|
||||
|
||||
|
26
src/plugins/aspell/Makefile.am
Normal file
26
src/plugins/aspell/Makefile.am
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright (c) 2003-2006 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# 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 2 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, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS)
|
||||
|
||||
libdir = ${weechat_libdir}/plugins
|
||||
|
||||
lib_LTLIBRARIES = libaspell.la
|
||||
|
||||
libaspell_la_SOURCES = weechat-aspell.c
|
||||
libaspell_la_LDFLAGS = -module
|
||||
libaspell_la_LIBADD = $(ASPELL_LFLAGS)
|
1176
src/plugins/aspell/weechat-aspell.c
Normal file
1176
src/plugins/aspell/weechat-aspell.c
Normal file
File diff suppressed because it is too large
Load Diff
156
src/plugins/aspell/weechat-aspell.h
Normal file
156
src/plugins/aspell/weechat-aspell.h
Normal file
@ -0,0 +1,156 @@
|
||||
|
||||
#ifndef WEECHAT_ASPELL__H
|
||||
#define WEECHAT_ASPELL__H 1
|
||||
|
||||
#include <aspell.h>
|
||||
|
||||
char plugin_name[] = "Aspell";
|
||||
char plugin_version[] = "0.1";
|
||||
char plugin_description[] = "Aspell plugin for WeeChat";
|
||||
char plugin_command[] = "aspell";
|
||||
|
||||
#define _OPTION_WORD_SIZE 2
|
||||
#define _OPTION_CHECK_SYNC 0
|
||||
#define _OPTION_COLOR "red"
|
||||
|
||||
typedef struct speller_t
|
||||
{
|
||||
AspellSpeller *speller;
|
||||
char *lang;
|
||||
int refs;
|
||||
|
||||
struct speller_t *prev_speller;
|
||||
struct speller_t *next_speller;
|
||||
} speller_t;
|
||||
|
||||
typedef struct config_t
|
||||
{
|
||||
char *server;
|
||||
char *channel;
|
||||
speller_t *speller;
|
||||
|
||||
struct config_t *prev_config;
|
||||
struct config_t *next_config;
|
||||
} config_t;
|
||||
|
||||
typedef struct options_t
|
||||
{
|
||||
int word_size;
|
||||
int check_sync;
|
||||
int color;
|
||||
char *color_name;
|
||||
} options_t;
|
||||
|
||||
typedef struct iso_langs_t
|
||||
{
|
||||
char *code;
|
||||
char *name;
|
||||
} iso_langs_t;
|
||||
|
||||
typedef struct iso_countries_t
|
||||
{
|
||||
char *code;
|
||||
char *name;
|
||||
} iso_countries_t;
|
||||
|
||||
/* aspell supported langs 2006-05-27 */
|
||||
iso_langs_t langs_avail[] =
|
||||
{
|
||||
{ "af", "Afrikaans"},
|
||||
{ "am", "Amharic"},
|
||||
{ "az", "Azerbaijani"},
|
||||
{ "be", "Belarusian"},
|
||||
{ "bg", "Bulgarian"},
|
||||
{ "bn", "Bengali"},
|
||||
{ "br", "Breton"},
|
||||
{ "ca", "Catalan"},
|
||||
{ "cs", "Czech"},
|
||||
{ "csb", "Kashubian"},
|
||||
{ "cy", "Welsh"},
|
||||
{ "da", "Danish"},
|
||||
{ "de", "German"},
|
||||
{ "el", "Greek Modern"},
|
||||
{ "en", "English"},
|
||||
{ "eo", "Esperanto"},
|
||||
{ "es", "Spanish"},
|
||||
{ "et", "Estonian"},
|
||||
{ "fa", "Persian"},
|
||||
{ "fi", "Finnish"},
|
||||
{ "fo", "Faroese"},
|
||||
{ "fr", "French"},
|
||||
{ "ga", "Irish"},
|
||||
{ "gd", "Gaelic"},
|
||||
{ "gl", "Galician"},
|
||||
{ "gu", "Gujarati"},
|
||||
{ "gv", "Manx"},
|
||||
{ "he", "Hebrew"},
|
||||
{ "hi", "Hiligaynon"},
|
||||
{ "hr", "Croatian"},
|
||||
{ "hsb", "Upper Sorbian"},
|
||||
{ "hu", "Hungarian"},
|
||||
{ "ia", "Interlingua"},
|
||||
{ "id", "Indonesian"},
|
||||
{ "is", "Icelandic"},
|
||||
{ "it", "Italian"},
|
||||
{ "ku", "Kurdish"},
|
||||
{ "la", "Latin"},
|
||||
{ "lt", "Lithuanian"},
|
||||
{ "lv", "Latvian"},
|
||||
{ "mg", "Malagasy"},
|
||||
{ "mi", "Maori"},
|
||||
{ "mk", "Macedonian"},
|
||||
{ "mn", "Mongolian"},
|
||||
{ "mr", "Marathi"},
|
||||
{ "ms", "Malay"},
|
||||
{ "mt", "Maltese"},
|
||||
{ "nb", "Norwegian Bokmal"},
|
||||
{ "nds", "Saxon Low"},
|
||||
{ "nl", "Flemish"},
|
||||
{ "nn", "Norwegian Nynorsk"},
|
||||
{ "no", "Norwegian"},
|
||||
{ "ny", "Nyanja"},
|
||||
{ "or", "Oriya"},
|
||||
{ "pa", "Panjabi"},
|
||||
{ "pl", "Polish"},
|
||||
{ "pt", "Portuguese"},
|
||||
{ "qu", "Quechua"},
|
||||
{ "ro", "Romanian"},
|
||||
{ "ru", "Russian"},
|
||||
{ "rw", "Kinyarwanda"},
|
||||
{ "sc", "Sardinian"},
|
||||
{ "sk", "Slovak"},
|
||||
{ "sl", "Slovenian"},
|
||||
{ "sr", "Serbian"},
|
||||
{ "sv", "Swedish"},
|
||||
{ "sw", "Swahili"},
|
||||
{ "ta", "Tamil"},
|
||||
{ "te", "Telugu"},
|
||||
{ "tet", "Tetum"},
|
||||
{ "tl", "Tagalog"},
|
||||
{ "tn", "Tswana"},
|
||||
{ "tr", "Turkish"},
|
||||
{ "uk", "Ukrainian"},
|
||||
{ "uz", "Uzbek"},
|
||||
{ "vi", "Vietnamese"},
|
||||
{ "wa", "Walloon"},
|
||||
{ "yi", "Yiddish"},
|
||||
{ "zu", "Zulu"},
|
||||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
iso_countries_t countries_avail[] =
|
||||
{
|
||||
{ "AT", "Austria" },
|
||||
{ "BR", "Brazil" },
|
||||
{ "CA", "Canada" },
|
||||
{ "CH", "Switzerland" },
|
||||
{ "DE", "Germany" },
|
||||
{ "FR", "France" },
|
||||
{ "GB", "Great Britain" },
|
||||
{ "PT", "Portugal" },
|
||||
{ "SK", "Slovakia" },
|
||||
{ "US", "United States of America" },
|
||||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
#endif /* WEECHAT_ASPELL__H */
|
@ -96,6 +96,7 @@ AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
|
||||
AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
|
||||
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
@ -114,6 +115,7 @@ AC_ARG_ENABLE(lua, [ --disable-lua Turn off Lua script plug
|
||||
AC_ARG_WITH(lua-inc, [ --with-lua-inc=DIR, Lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
|
||||
AC_ARG_WITH(lua-lib, [ --with-lua-lib=DIR, Lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
|
||||
AC_ARG_WITH(lua-suffix, [ --with-lua-suffix=ARG Lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
|
||||
AC_ARG_ENABLE(aspell, [ --disable-aspell Turn off Aspell plugin (default=compiled if found)],enable_aspell=$enableval,enable_aspell=yes)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||
|
||||
@ -197,6 +199,7 @@ if test "x$enable_plugins" != "xyes" ; then
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
fi
|
||||
|
||||
# ---------------------------------- perl --------------------------------------
|
||||
@ -456,6 +459,42 @@ if test "x$enable_lua" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_LUA)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# aspell
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
ASPELL_CFLAGS=""
|
||||
ASPELL_LFLAGS=""
|
||||
|
||||
AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
|
||||
AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
|
||||
|
||||
AC_MSG_CHECKING(for aspell headers and librairies)
|
||||
if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([
|
||||
*** Aspell headers and/or libraries couldn't be found in your system.
|
||||
*** Try to install them with your software package manager.
|
||||
*** WeeChat will be built without Aspell support.])
|
||||
enable_aspell="no"
|
||||
not_found="$not_found aspell"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
AC_SUBST(ASPELL_CFLAGS)
|
||||
AC_SUBST(ASPELL_LFLAGS)
|
||||
AC_DEFINE(PLUGIN_ASPELL)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# dynamic loader
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
||||
if test "$LIBDL_FOUND" != "yes"; then
|
||||
@ -474,6 +513,7 @@ if test "x$enable_plugins" = "xyes" ; then
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
not_found="$not_found plugins"
|
||||
fi
|
||||
fi
|
||||
@ -617,6 +657,7 @@ AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
|
||||
|
||||
@ -636,6 +677,7 @@ AC_OUTPUT([Makefile
|
||||
src/plugins/scripts/python/Makefile
|
||||
src/plugins/scripts/ruby/Makefile
|
||||
src/plugins/scripts/lua/Makefile
|
||||
src/plugins/aspell/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
@ -692,6 +734,7 @@ echo " Perl plugin......... : $enable_perl"
|
||||
echo " Python plugin....... : $enable_python"
|
||||
echo " Ruby plugin......... : $enable_ruby"
|
||||
echo " Lua plugin.......... : $enable_lua"
|
||||
echo " Aspell plugin....... : $enable_aspell"
|
||||
echo "Compile with debug info........... : $msg_debug_compiler"
|
||||
echo " Backtrace........... : $enable_backtrace"
|
||||
echo "Print debugging messages.......... : $msg_debug_verbose"
|
||||
|
@ -33,7 +33,11 @@ if PLUGIN_LUA
|
||||
script_dir = scripts
|
||||
endif
|
||||
|
||||
SUBDIRS = $(script_dir)
|
||||
if PLUGIN_ASPELL
|
||||
aspell_dir = aspell
|
||||
endif
|
||||
|
||||
SUBDIRS = $(script_dir) $(aspell_dir)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_plugins.a
|
||||
|
||||
|
26
weechat/src/plugins/aspell/Makefile.am
Normal file
26
weechat/src/plugins/aspell/Makefile.am
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright (c) 2003-2006 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# 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 2 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, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS)
|
||||
|
||||
libdir = ${weechat_libdir}/plugins
|
||||
|
||||
lib_LTLIBRARIES = libaspell.la
|
||||
|
||||
libaspell_la_SOURCES = weechat-aspell.c
|
||||
libaspell_la_LDFLAGS = -module
|
||||
libaspell_la_LIBADD = $(ASPELL_LFLAGS)
|
1176
weechat/src/plugins/aspell/weechat-aspell.c
Normal file
1176
weechat/src/plugins/aspell/weechat-aspell.c
Normal file
File diff suppressed because it is too large
Load Diff
156
weechat/src/plugins/aspell/weechat-aspell.h
Normal file
156
weechat/src/plugins/aspell/weechat-aspell.h
Normal file
@ -0,0 +1,156 @@
|
||||
|
||||
#ifndef WEECHAT_ASPELL__H
|
||||
#define WEECHAT_ASPELL__H 1
|
||||
|
||||
#include <aspell.h>
|
||||
|
||||
char plugin_name[] = "Aspell";
|
||||
char plugin_version[] = "0.1";
|
||||
char plugin_description[] = "Aspell plugin for WeeChat";
|
||||
char plugin_command[] = "aspell";
|
||||
|
||||
#define _OPTION_WORD_SIZE 2
|
||||
#define _OPTION_CHECK_SYNC 0
|
||||
#define _OPTION_COLOR "red"
|
||||
|
||||
typedef struct speller_t
|
||||
{
|
||||
AspellSpeller *speller;
|
||||
char *lang;
|
||||
int refs;
|
||||
|
||||
struct speller_t *prev_speller;
|
||||
struct speller_t *next_speller;
|
||||
} speller_t;
|
||||
|
||||
typedef struct config_t
|
||||
{
|
||||
char *server;
|
||||
char *channel;
|
||||
speller_t *speller;
|
||||
|
||||
struct config_t *prev_config;
|
||||
struct config_t *next_config;
|
||||
} config_t;
|
||||
|
||||
typedef struct options_t
|
||||
{
|
||||
int word_size;
|
||||
int check_sync;
|
||||
int color;
|
||||
char *color_name;
|
||||
} options_t;
|
||||
|
||||
typedef struct iso_langs_t
|
||||
{
|
||||
char *code;
|
||||
char *name;
|
||||
} iso_langs_t;
|
||||
|
||||
typedef struct iso_countries_t
|
||||
{
|
||||
char *code;
|
||||
char *name;
|
||||
} iso_countries_t;
|
||||
|
||||
/* aspell supported langs 2006-05-27 */
|
||||
iso_langs_t langs_avail[] =
|
||||
{
|
||||
{ "af", "Afrikaans"},
|
||||
{ "am", "Amharic"},
|
||||
{ "az", "Azerbaijani"},
|
||||
{ "be", "Belarusian"},
|
||||
{ "bg", "Bulgarian"},
|
||||
{ "bn", "Bengali"},
|
||||
{ "br", "Breton"},
|
||||
{ "ca", "Catalan"},
|
||||
{ "cs", "Czech"},
|
||||
{ "csb", "Kashubian"},
|
||||
{ "cy", "Welsh"},
|
||||
{ "da", "Danish"},
|
||||
{ "de", "German"},
|
||||
{ "el", "Greek Modern"},
|
||||
{ "en", "English"},
|
||||
{ "eo", "Esperanto"},
|
||||
{ "es", "Spanish"},
|
||||
{ "et", "Estonian"},
|
||||
{ "fa", "Persian"},
|
||||
{ "fi", "Finnish"},
|
||||
{ "fo", "Faroese"},
|
||||
{ "fr", "French"},
|
||||
{ "ga", "Irish"},
|
||||
{ "gd", "Gaelic"},
|
||||
{ "gl", "Galician"},
|
||||
{ "gu", "Gujarati"},
|
||||
{ "gv", "Manx"},
|
||||
{ "he", "Hebrew"},
|
||||
{ "hi", "Hiligaynon"},
|
||||
{ "hr", "Croatian"},
|
||||
{ "hsb", "Upper Sorbian"},
|
||||
{ "hu", "Hungarian"},
|
||||
{ "ia", "Interlingua"},
|
||||
{ "id", "Indonesian"},
|
||||
{ "is", "Icelandic"},
|
||||
{ "it", "Italian"},
|
||||
{ "ku", "Kurdish"},
|
||||
{ "la", "Latin"},
|
||||
{ "lt", "Lithuanian"},
|
||||
{ "lv", "Latvian"},
|
||||
{ "mg", "Malagasy"},
|
||||
{ "mi", "Maori"},
|
||||
{ "mk", "Macedonian"},
|
||||
{ "mn", "Mongolian"},
|
||||
{ "mr", "Marathi"},
|
||||
{ "ms", "Malay"},
|
||||
{ "mt", "Maltese"},
|
||||
{ "nb", "Norwegian Bokmal"},
|
||||
{ "nds", "Saxon Low"},
|
||||
{ "nl", "Flemish"},
|
||||
{ "nn", "Norwegian Nynorsk"},
|
||||
{ "no", "Norwegian"},
|
||||
{ "ny", "Nyanja"},
|
||||
{ "or", "Oriya"},
|
||||
{ "pa", "Panjabi"},
|
||||
{ "pl", "Polish"},
|
||||
{ "pt", "Portuguese"},
|
||||
{ "qu", "Quechua"},
|
||||
{ "ro", "Romanian"},
|
||||
{ "ru", "Russian"},
|
||||
{ "rw", "Kinyarwanda"},
|
||||
{ "sc", "Sardinian"},
|
||||
{ "sk", "Slovak"},
|
||||
{ "sl", "Slovenian"},
|
||||
{ "sr", "Serbian"},
|
||||
{ "sv", "Swedish"},
|
||||
{ "sw", "Swahili"},
|
||||
{ "ta", "Tamil"},
|
||||
{ "te", "Telugu"},
|
||||
{ "tet", "Tetum"},
|
||||
{ "tl", "Tagalog"},
|
||||
{ "tn", "Tswana"},
|
||||
{ "tr", "Turkish"},
|
||||
{ "uk", "Ukrainian"},
|
||||
{ "uz", "Uzbek"},
|
||||
{ "vi", "Vietnamese"},
|
||||
{ "wa", "Walloon"},
|
||||
{ "yi", "Yiddish"},
|
||||
{ "zu", "Zulu"},
|
||||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
iso_countries_t countries_avail[] =
|
||||
{
|
||||
{ "AT", "Austria" },
|
||||
{ "BR", "Brazil" },
|
||||
{ "CA", "Canada" },
|
||||
{ "CH", "Switzerland" },
|
||||
{ "DE", "Germany" },
|
||||
{ "FR", "France" },
|
||||
{ "GB", "Great Britain" },
|
||||
{ "PT", "Portugal" },
|
||||
{ "SK", "Slovakia" },
|
||||
{ "US", "United States of America" },
|
||||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
#endif /* WEECHAT_ASPELL__H */
|
Loading…
x
Reference in New Issue
Block a user