diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-04-14 22:20:10 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-04-14 22:20:10 +0000 |
commit | 8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e (patch) | |
tree | 724ddc9ab6cb3a362051fe1e081b3ccdcd7c0d5c /src/lngconfig.c | |
parent | b91203daf1a2b5865bfd284821c0c0b103f5b8e7 (diff) | |
download | librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.gz librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.bz2 librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.xz librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.zip |
DB4 & Postponed processing
- New DB4 database type
- Postponed processing in external module
+ User may allow external module to finish required processing before
termination. This could be useful for translation services while using
console applications (if network connection is slow, the external will
never finish translation before program termination)
- SKIP_PARRENT options are renamed to SKIP_PARENT
Diffstat (limited to 'src/lngconfig.c')
-rw-r--r-- | src/lngconfig.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lngconfig.c b/src/lngconfig.c index 631abd1..67e05c6 100644 --- a/src/lngconfig.c +++ b/src/lngconfig.c @@ -437,7 +437,7 @@ rcc_speller rccConfigGetSpeller(rcc_language_config config) { unsigned int i; rcc_speller speller; rcc_language_config pconfig; - rcc_language_id *parrents; + rcc_language_id *parents; rcc_language_id language_id; if (!config) return NULL; @@ -447,12 +447,12 @@ rcc_speller rccConfigGetSpeller(rcc_language_config config) { if (config->speller) language_id = rccConfigGetLanguage(config); else language_id = (rcc_language_id)-1; - if (language_id != (rcc_language_id)-1) parrents = ((rcc_language_internal*)config->language)->parrents; - else parrents = NULL; + if (language_id != (rcc_language_id)-1) parents = ((rcc_language_internal*)config->language)->parents; + else parents = NULL; - if (parrents) { - for (i = 0; parrents[i]!=(rcc_language_id)-1; i++) { - pconfig = rccGetConfig(config->ctx, parrents[i]); + if (parents) { + for (i = 0; parents[i]!=(rcc_language_id)-1; i++) { + pconfig = rccGetConfig(config->ctx, parents[i]); if (pconfig) { speller = rccConfigGetSpeller(pconfig); rccSpellerAddParrent(config->speller, speller); @@ -467,6 +467,7 @@ rcc_speller rccConfigGetSpeller(rcc_language_config config) { rcc_translate rccConfigGetTranslator(rcc_language_config config, rcc_language_id to) { rcc_option_value timeout; + rcc_option_value offline; if (!config) return NULL; @@ -482,6 +483,9 @@ rcc_translate rccConfigGetTranslator(rcc_language_config config, rcc_language_id config->translang = to; timeout = rccGetOption(config->ctx, RCC_OPTION_TIMEOUT); if (timeout) rccTranslateSetTimeout(config->trans, timeout); + + offline = rccGetOption(config->ctx, RCC_OPTION_OFFLINE); + if (offline) rccTranslateAllowOfflineMode(config->trans); } } rccMutexUnLock(config->mutex); |