--- libtextcat/libtextcat-2.2.patch.orig 2026-09-19 20:13:03 UTC +++ libtextcat/libtextcat-2.2.patch @@ -1,5 +1,5 @@ --- misc/libtextcat-2.2/configure Thu May 22 13:39:55 --- misc/libtextcat-2.2/configure Thu May 22 13:39:55 2003 -+++ misc/build/libtextcat-2.2/configure Mon Mar 31 11:29:14 2008 ++++ misc/build/libtextcat-2.2/configure Fri Sep @@ -3451,7 +3451,7 @@ ;; @@ -28,16 +28,49 @@ + archive_cmds='$CC -r -keep_private_externs -nostd # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes -@@ -6280,7 +6281,7 @@ +@@ -5793,7 +5794,7 @@ + whole_archive_flag_spec='-all_load $convenience' + ;; + +- freebsd1*) ++ freebsd1.*) + ld_shlibs=no + ;; + +@@ -5809,7 +5810,7 @@ + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. +- freebsd2*) ++ freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes +@@ -6275,12 +6276,12 @@ + shlibpath_var=DYLD_LIBRARY_PATH ;; +-freebsd1*) ++freebsd1.*) + dynamic_linker=no + ;; + freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` version_type=freebsd-$objformat case $version_type in freebsd-elf*) -@@ -6365,7 +6365,7 @@ +@@ -6295,7 +6296,7 @@ + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in +- freebsd2*) ++ freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + *) +@@ -6364,7 +6365,7 @@ ;; # This must be Linux ELF. @@ -726,7 +759,7 @@ - const char *q = p; + while(1) { - const char *q = p; -+ const char *q = &p[pointer]; /*[modified] previously p++ above (for(;;p++)) now, it's pointer wich is increased so we have to get the new pointer on the buffer*/ ++ const char *q = &p[pointer]; /*[modified] previously p++ above (for(;;p++)) now, it's pointer which is increased so we have to get the new pointer on the buffer*/ char *m = n; /*** First char may be an underscore ***/ @@ -759,7 +792,7 @@ + } } + -+ pointer = nextcharstart(p,pointer); /*[modified] p[pointer] must point on the next start of symbol, but whith utf next start is not surely next char*/ ++ pointer = nextcharstart(p,pointer); /*[modified] p[pointer] must point on the next start of symbol, but with utf next start is not surely next char*/ } return; } @@ -1088,8 +1121,8 @@ +/** +} + +/** -+ * Originaly this function had only one parameter (conffile) it has been modified since OOo use -+ * Basicaly prefix is the directory path where fingerprints are stored ++ * Originally this function had only one parameter (conffile) it has been modified since OOo use ++ * Basically prefix is the directory path where fingerprints are stored + */ +extern void *special_textcat_Init( const char *conffile, const char *prefix ) { @@ -1208,8 +1241,8 @@ + * see below extern void *textcat_Init( const char *conffile ); /** -+ * Originaly this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB -+ * Basicaly prefix is the directory path where fingerprints are stored ++ * Originally this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB ++ * Basically prefix is the directory path where fingerprints are stored + */ +extern void *special_textcat_Init( const char *conffile, const char *prefix ); + @@ -1284,7 +1317,7 @@ + } + ++pointer; + } + } -+ if(str[pointer]){ /*finaly, if we are not on the \0 character, we jump to the next character*/ ++ if(str[pointer]){ /*finally, if we are not on the \0 character, we jump to the next character*/ + ++pointer; + } + return pointer; @@ -1419,14 +1452,14 @@ + * Is used to jump to the next start of char + +/* + * Is used to jump to the next start of char -+ * of course it's only usefull when encoding is utf-8 ++ * of course it's only useful when encoding is utf-8 + * This function have been added by Jocelyn Merand to use libtextcat in OOo + */ +int nextcharstart(const char *str, int position); + + +/*Copy the char in str to dest -+ * of course it's only usefull when encoding is utf8 and the symbol is encoded with more than 1 char ++ * of course it's only useful when encoding is utf8 and the symbol is encoded with more than 1 char + * return the number of char jumped + * This function have been added by Jocelyn Merand to use libtextcat in OOo + */ @@ -1434,14 +1467,14 @@ +/* checks if n-gram lex is a prefix of key and of len + + +/* checks if n-gram lex is a prefix of key and of length len -+* if _UTF8_ is defined, it uses escap characters and len is not realy the length of lex ++* if _UTF8_ is defined, it uses escap characters and len is not really the length of lex +* in this case, len is the number of utf-8 char strlen("€") == 3 but len == 1 +*/ +int issame( char *lex, char *key, int len ); + + +/* Counts the number of characters -+* if _UTF8_ is defined, it uses escap characters and the result is not realy the length of str ++* if _UTF8_ is defined, it uses escap characters and the result is not really the length of str +* in this case, the result is the number of utf-8 char strlen("€") == 3 but utfstrlen("€") == 1 +*/ +#ifdef __cplusplus