summaryrefslogtreecommitdiffstats
path: root/src/rccspell.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2007-04-14 22:20:10 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2007-04-14 22:20:10 +0000
commit8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e (patch)
tree724ddc9ab6cb3a362051fe1e081b3ccdcd7c0d5c /src/rccspell.c
parentb91203daf1a2b5865bfd284821c0c0b103f5b8e7 (diff)
downloadlibrcc-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/rccspell.c')
-rw-r--r--src/rccspell.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/rccspell.c b/src/rccspell.c
index da5e4d1..19b5abc 100644
--- a/src/rccspell.c
+++ b/src/rccspell.c
@@ -29,7 +29,7 @@ rcc_speller rccSpellerCreate(const char *lang) {
}
rccspeller->speller = speller;
- rccspeller->parrents[0] = NULL;
+ rccspeller->parents[0] = NULL;
return rccspeller;
#else
return NULL;
@@ -49,14 +49,14 @@ int rccSpellerGetError(rcc_speller rccspeller) {
return 0;
}
-int rccSpellerAddParrent(rcc_speller speller, rcc_speller parrent) {
+int rccSpellerAddParent(rcc_speller speller, rcc_speller parent) {
unsigned int i;
- if ((!speller)||(!parrent)) return -1;
+ if ((!speller)||(!parent)) return -1;
- for (i=0;speller->parrents[i];i++);
- if (i >= RCC_MAX_LANGUAGE_PARRENTS) return -1;
- speller->parrents[i++] = parrent;
- speller->parrents[i] = NULL;
+ for (i=0;speller->parents[i];i++);
+ if (i >= RCC_MAX_LANGUAGE_PARENTS) return -1;
+ speller->parents[i++] = parent;
+ speller->parents[i] = NULL;
return 0;
}
@@ -70,10 +70,10 @@ rcc_speller_result rccSpellerSized(rcc_speller speller, const char *word, size_t
if (rccSpellerGetError(speller)) return (rcc_speller_result)RCC_SPELLER_INCORRECT;
if (recursion) {
- for (i=0; speller->parrents[i]; i++) {
- result = rccSpellerSized(speller->parrents[i], word, len, 0);
- if ((result == RCC_SPELLER_CORRECT)||(result == RCC_SPELLER_PARRENT)) return RCC_SPELLER_PARRENT;
- if ((result == RCC_SPELLER_ALMOST_CORRECT)||(result == RCC_SPELLER_ALMOST_PARRENT)) saved_result = RCC_SPELLER_ALMOST_PARRENT;
+ for (i=0; speller->parents[i]; i++) {
+ result = rccSpellerSized(speller->parents[i], word, len, 0);
+ if ((result == RCC_SPELLER_CORRECT)||(result == RCC_SPELLER_PARENT)) return RCC_SPELLER_PARENT;
+ if ((result == RCC_SPELLER_ALMOST_CORRECT)||(result == RCC_SPELLER_ALMOST_PARENT)) saved_result = RCC_SPELLER_ALMOST_PARENT;
}
}
@@ -95,12 +95,12 @@ int rccSpellerResultIsOwn(rcc_speller_result res) {
}
int rccSpellerResultIsPrecise(rcc_speller_result res) {
- if ((res == RCC_SPELLER_PARRENT)||(res == RCC_SPELLER_CORRECT)) return 1;
+ if ((res == RCC_SPELLER_PARENT)||(res == RCC_SPELLER_CORRECT)) return 1;
return 0;
}
int rccSpellerResultIsCorrect(rcc_speller_result res) {
if ((res == RCC_SPELLER_ALMOST_CORRECT)||(res == RCC_SPELLER_CORRECT)) return 1;
- if ((res == RCC_SPELLER_ALMOST_PARRENT)||(res == RCC_SPELLER_PARRENT)) return 1;
+ if ((res == RCC_SPELLER_ALMOST_PARENT)||(res == RCC_SPELLER_PARENT)) return 1;
return 0;
}