summaryrefslogtreecommitdiffstats
path: root/src/internal.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-05 03:06:50 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-05 03:06:50 +0000
commit94ca629ceec7b0dc9f6f724b2e15923d3ec1d5b3 (patch)
tree317019f306f7195c07d3c0d943c829ed11ba8cca /src/internal.h
parent50aa5cd62ef4a66da41d68f4a50ddfca97863c38 (diff)
downloadlibrcc-94ca629ceec7b0dc9f6f724b2e15923d3ec1d5b3.tar.gz
librcc-94ca629ceec7b0dc9f6f724b2e15923d3ec1d5b3.tar.bz2
librcc-94ca629ceec7b0dc9f6f724b2e15923d3ec1d5b3.tar.xz
librcc-94ca629ceec7b0dc9f6f724b2e15923d3ec1d5b3.zip
Language AutoDetection Improvements
- Fix: Loading/Saving range options. - Fix: Language AutoDetection. Using locale language instead of selected one. - Support for range options in GTK UI. - Option to control recoding timeout is provided. - LibRCC.h is updated (Translate, Spell, IConv). - Documentation is updated. - Add 'rcc-config' alias to 'rcc-gtk2-config' in spec. - Implemented concept of parrent languages + The concept is used in language autodetection. The string in considered language is permited to have words from all it's parrent languages. + English is assumed to be parrent for all other languages by default. + Russian is parrent language for Ukrainian and Belorussian. - No translation to english if translation between related (one of the languages is parrent for another one) languages is failed.
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/internal.h b/src/internal.h
index fcaa4c6..d5797fc 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -5,15 +5,8 @@
# define LIBRCC_DATA_DIR "/usr/lib/rcc"
#endif /* LIBRCC_DATA_DIR */
-#include "librcc.h"
-#include "recode.h"
-#include "engine.h"
-#include "lngconfig.h"
-#include "rccstring.h"
-#include "rccdb4.h"
-#include "rcciconv.h"
-#include "rccstring.h"
-#include "rccmutex.h"
+#define RCC_MAX_LANGUAGE_PARRENTS 4
+#define RCC_MAX_RELATIONS RCC_MAX_LANGUAGES
#ifdef HAVE_STRNLEN
#define STRNLEN(str,n) (n?strnlen(str,n):strlen(str))
@@ -26,6 +19,20 @@
#define RCC_MAX_PREFIX_CHARS 32
#define RCC_MIN_DB4_CHARS 3
+#include "librcc.h"
+#include "recode.h"
+#include "engine.h"
+#include "lngconfig.h"
+#include "rccstring.h"
+#include "rccdb4.h"
+#include "rcciconv.h"
+#include "rccstring.h"
+#include "rccmutex.h"
+
+
+
+typedef rcc_language_id rcc_language_parrent_list[RCC_MAX_LANGUAGE_PARRENTS];
+
struct rcc_context_t {
char locale_variable[RCC_MAX_VARIABLE_CHARS+1];
@@ -37,6 +44,7 @@ struct rcc_context_t {
unsigned int max_languages;
unsigned int n_languages;
rcc_language_ptr *languages;
+ rcc_language_parrent_list *language_parrents;
rcc_language_config configs;
unsigned int max_classes;