diff --git a/libexttextcat/unkown.patch.1 b/libexttextcat/unkown.patch.1 index b57ceeb7e729..f29aae247405 100644 --- a/libexttextcat/unkown.patch.1 +++ b/libexttextcat/unkown.patch.1 @@ -1,3 +1,18 @@ +diff -ur exttextcat.old/configure exttextcat/configure +--- exttextcat.old/configure 2012-06-28 10:17:56.000000000 +0200 ++++ exttextcat/configure 2013-03-25 18:58:00.520816594 +0100 +@@ -11776,9 +11776,9 @@ + + EXTTEXTCAT_MINOR_VERSION=4 + +-EXTTEXTCAT_MICRO_VERSION=0 ++EXTTEXTCAT_MICRO_VERSION=1 + +-EXTTEXTCAT_VERSION=3.4.0 ++EXTTEXTCAT_VERSION=3.4.1 + + + ac_config_files="$ac_config_files libexttextcat.pc Makefile langclass/Makefile langclass/LM/Makefile langclass/ShortTexts/Makefile src/Makefile src/exttextcat-version.h src/test-primary.sh src/test-secondary.sh" diff -ur exttextcat.old/src/textcat.c exttextcat/src/textcat.c --- exttextcat.old/src/textcat.c 2012-11-01 15:40:35.000000000 +0100 +++ exttextcat/src/textcat.c 2013-03-25 16:22:57.226896529 +0100 diff --git a/lingucomponent/source/languageguessing/guess.cxx b/lingucomponent/source/languageguessing/guess.cxx index 4c8ed8e843f3..baf1e3796072 100644 --- a/lingucomponent/source/languageguessing/guess.cxx +++ b/lingucomponent/source/languageguessing/guess.cxx @@ -57,9 +57,16 @@ Guess::Guess(const char * guess_str) // && // strncmp((const char*)(guess_str + 1), _TEXTCAT_RESULT_SHORT, strlen(_TEXTCAT_RESULT_SHORT)) != 0) // { +// FIXME just a temporary check until new version with renamed macros deployed +#if EXTTEXTCAT_VERSION_MAJOR > 3 || (EXTTEXTCAT_VERSION_MAJOR == 3 && (EXTTEXTCAT_VERSION_MINOR > 4 || (EXTTEXTCAT_VERSION_MINOR == 4 && (EXTTEXTCAT_VERSION_MICRO >= 1)))) if(strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_UNKNOWN_STR) != 0 && strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_SHORT_STR) != 0) +#else + if(strcmp((const char*)(guess_str + 1), _TEXTCAT_RESULT_UNKNOWN) != 0 + && + strcmp((const char*)(guess_str + 1), _TEXTCAT_RESULT_SHORT) != 0) +#endif { int current_pointer = 0; diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx index ac171b14c908..af9bf440f921 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.cxx +++ b/lingucomponent/source/languageguessing/simpleguesser.cxx @@ -128,7 +128,12 @@ vector SimpleGuesser::GuessLanguage(const char* text) const char *guess_list = textcat_Classify(h, text, len); +// FIXME just a temporary check until new version with renamed macros deployed +#if EXTTEXTCAT_VERSION_MAJOR > 3 || (EXTTEXTCAT_VERSION_MAJOR == 3 && (EXTTEXTCAT_VERSION_MINOR > 4 || (EXTTEXTCAT_VERSION_MINOR == 4 && (EXTTEXTCAT_VERSION_MICRO >= 1)))) if (strcmp(guess_list, TEXTCAT_RESULT_SHORT_STR) == 0) +#else + if (strcmp(guess_list, _TEXTCAT_RESULT_SHORT) == 0) +#endif return guesses; int current_pointer = 0;