From 9d4628df369b92016b7fc3bfc7fed6d06ff2ca9a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 7 Aug 2005 21:41:32 +0000 Subject: - Russian autoengine is renamed to LibRCD - Fix Learning with Language Autodetection switched on - Attempt to perform rccFS with Language Autodetection switched off, if failed with default behaviour. - Systematization of translation engine: + Rearangement of the translation modes: OFF, TO_ENGLISH, SKIP_RELATED, SKIP_PARRENT, FULL. + New class types: TRANSLATE_LOCALE, TRANSLATE_CURRENT, TRANSLATE_FROM. - Detect "Unicode" locales for foreign languages - "out" class is assumed to be TRANSLATE_LOCALE - Respect RCC_CLASS_KNOWN - Check for Latin UTF-8 prior to running any charset detection engine. --- src/librcc.h | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) (limited to 'src/librcc.h') diff --git a/src/librcc.h b/src/librcc.h index 63a6f80..0529682 100644 --- a/src/librcc.h +++ b/src/librcc.h @@ -13,13 +13,6 @@ #define RCC_MAX_ALIASES 64 #define RCC_MAX_CLASSES 16 -#define RCC_MAX_ERRORS 3 - -#define RCC_MAX_CHARSET_CHARS 16 -#define RCC_MAX_LANGUAGE_CHARS 16 -#define RCC_MAX_VARIABLE_CHARS 16 - - /* ID's */ /** * Language ID. @@ -301,7 +294,10 @@ typedef enum rcc_class_type_t { RCC_CLASS_INVALID = 0, /**< Invalid value */ RCC_CLASS_STANDARD, /**< Standard class */ RCC_CLASS_KNOWN, /**< Class encoding is known and no autodetection should be performed */ - RCC_CLASS_FS /**< Class strings are representing file names */ + RCC_CLASS_FS, /**< Class strings are representing file names */ + RCC_CLASS_TRANSLATE_LOCALE, /**< It is permited to translate class strings to current Locale Language in rccTo */ + RCC_CLASS_TRANSLATE_CURRENT,/**< It is permited to translate class strings to Current Language in rccTo */ + RCC_CLASS_TRANSLATE_FROM, /**< It is permited to translate class strings to Current Language in rccFrom */ } rcc_class_type; /** @@ -390,22 +386,13 @@ typedef int rcc_option_value; */ #define RCC_OPTION_LEARNING_FLAG_LEARN 2 -/** - * Switch translation off. - */ -#define RCC_OPTION_TRANSLATE_OFF 0 -/** - * Translate data to english language (Current language don't matter). - */ -#define RCC_OPTION_TRANSLATE_TO_ENGLISH 1 -/** - * Skip translation of the english text. - */ -#define RCC_OPTION_TRANSLATE_SKIP_ENGLISH 2 -/** - * Translate whole data to the current language. - */ -#define RCC_OPTION_TRANSLATE_FULL 3 +typedef enum rcc_option_translate_t { + RCC_OPTION_TRANSLATE_OFF = 0, /**< Switch translation off. */ + RCC_OPTION_TRANSLATE_TO_ENGLISH, /**< Translate data to english language (Current language don't matter). */ + RCC_OPTION_TRANSLATE_SKIP_RELATED, /**< Skip translation of the text's between related languages. */ + RCC_OPTION_TRANSLATE_SKIP_PARRENT, /**< Skip translation of the text's from parrent languages (from english). */ + RCC_OPTION_TRANSLATE_FULL /**< Translate whole data to the current language */ +} rcc_option_translate; /** * List of options available -- cgit v1.2.3