This is an automated email from the git hooks/post-receive script. rene pushed a commit to branch master in repository hunspell.
commit 1b209b7599846fc60d1b1c22f42e96abf7c78711 Author: Rene Engelhard <[email protected]> Date: Thu Apr 21 14:45:10 2016 +0200 Imported Upstream version 1.1.2 --- ChangeLog | 24 ++++++ Makefile.in | 6 ++ NEWS | 8 ++ configure | 189 +++++++++++++++++++++++++++----------------- configure.ac | 13 ++- m4/Makefile.in | 6 ++ man/Makefile.in | 6 ++ man/hu/Makefile.in | 6 ++ src/Makefile.in | 6 ++ src/hunspell/Makefile.in | 6 ++ src/hunspell/affixmgr.cxx | 30 ++++--- src/hunspell/affixmgr.hxx | 2 +- src/hunspell/csutil.cxx | 17 ++-- src/hunspell/csutil.hxx | 4 +- src/hunspell/suggestmgr.cxx | 22 +++--- src/parsers/Makefile.in | 6 ++ src/tools/Makefile.in | 6 ++ tests/Makefile.am | 9 +++ tests/Makefile.in | 14 ++++ tests/compound6.aff | 4 + tests/compound6.dic | 5 ++ tests/compound6.good | 4 + tests/compound6.test | 4 + tests/compound6.wrong | 4 + tests/flagutf8.aff | 3 +- tests/maputf.aff | 2 +- tests/onlyincompound.sug | 0 27 files changed, 296 insertions(+), 110 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88b7937..b51a3be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2005-11-11 Németh László <[email protected]>: + * src/hunspell/affixmgr.*: fix Unicode MAP errors (sorted only n-1 + characters instead of n ones in UTF-16 MAP character lists). + Bug reported by Rene Engelhard. + + * src/hunspell/affixmgr.*: fix infinite COMPOUND matching (default char + type is unsigned on PowerPC, s390 and ARM platforms and it will never + be negative). Bug reported by Rene Engelhard. + + * src/hunspell/{affixmgr,suggestmgr}.cxx: fix bad ONLYINCOMPOUND + word suggestions. + * tests/onlyincompound.sug: empty test file to check this fix. + Bug reported by Björn Jacke. + + * src/hunspell/affixmgr.cxx: fix backtracking in COMPOUND pattern matching. + * tests/compound6.*: test files to check this fix. + + * csutil.cxx: set bigger range types in flag_qsort() and flag_bsearch(). + + * affixmgr.hxx: set better type for cont_classes[] Boolean data (short -> char) + + * configure.ac, tests/automake.am: set platform specific XFAIL test + (flagutf8.test on ARM platform) + 2005-11-09 Németh László <[email protected]>: improvements: * src/hunspell/affixmgr.*: new and improved affix file parameters: diff --git a/Makefile.in b/Makefile.in index 0c7d0cc..89c8c60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ @@ -148,6 +149,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -189,7 +191,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = intl po src man m4 tests EXTRA_DIST = README.myspell AUTHORS.myspell license.myspell license.hunspell \ diff --git a/NEWS b/NEWS index 8779d40..2927e0d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +2005-11-11: Hunspell 1.1.2 release: + + - Bug fixes (MAP Unicode, COMPOUND pattern matching, ONLYINCOMPOUND + suggestions) + + - Checked with 51 regression tests in Valgrind debugging environment, + and tested with 52 OOo dictionaries on i686-pc-linux platform. + 2005-11-09: Hunspell 1.1.1 release: - Compound word patterns for complex compound word handling and diff --git a/configure b/configure index b510d17..b99edd8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for hunspell 1.1.1. +# Generated by GNU Autoconf 2.59 for hunspell 1.1.2. # # Report bugs to <[email protected]>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='hunspell' PACKAGE_TARNAME='hunspell' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='hunspell 1.1.1' +PACKAGE_VERSION='1.1.2' +PACKAGE_STRING='hunspell 1.1.2' PACKAGE_BUGREPORT='[email protected]' ac_unique_file="config.h.in" @@ -311,7 +311,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INS [...] +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os XFAILED INSTALL_PROGRAM INSTALL_SC [...] ac_subst_files='' # Initialize some variables set by options. @@ -788,7 +788,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures hunspell 1.1.1 to adapt to many kinds of systems. +\`configure' configures hunspell 1.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -849,12 +849,13 @@ Program names: System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of hunspell 1.1.1:";; + short | recursive ) echo "Configuration of hunspell 1.1.2:";; esac cat <<\_ACEOF @@ -987,7 +988,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -hunspell configure 1.1.1 +hunspell configure 1.1.2 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1001,7 +1002,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by hunspell $as_me 1.1.1, which was +It was created by hunspell $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1337,7 +1338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.9" + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1363,6 +1364,94 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +case "$host" in +arm*) XFAILED="flagutf8.test";; +esac + + +am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1644,7 +1733,7 @@ fi # Define the identity of the package. PACKAGE=hunspell - VERSION=1.1.1 + VERSION=1.1.2 cat >>confdefs.h <<_ACEOF @@ -1775,6 +1864,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + ac_config_headers="$ac_config_headers config.h" @@ -5021,60 +5111,6 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 ac_config_commands="$ac_config_commands default-1" -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then @@ -9052,7 +9088,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by hunspell $as_me 1.1.1, which was +This file was extended by hunspell $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9115,7 +9151,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -hunspell config.status 1.1.1 +hunspell config.status 1.1.2 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -9331,6 +9367,19 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@XFAILED@,$XFAILED,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -9385,14 +9434,6 @@ s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@MSGMERGE@,$MSGMERGE,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t s,@LIBICONV@,$LIBICONV,;t t diff --git a/configure.ac b/configure.ac index 14f7b57..2dd114c 100644 --- a/configure.ac +++ b/configure.ac @@ -3,9 +3,18 @@ m4_pattern_allow + AC_PREREQ(2.59) -AC_INIT([hunspell],[1.1.1],[[email protected]]) -AM_INIT_AUTOMAKE(hunspell, 1.1.1) +AC_INIT([hunspell],[1.1.2],[[email protected]]) + +AC_CANONICAL_SYSTEM +case "$host" in +arm*) XFAILED="flagutf8.test";; +esac +AC_SUBST(XFAILED) + +AM_INIT_AUTOMAKE(hunspell, 1.1.2) + AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) diff --git a/m4/Makefile.in b/m4/Makefile.in index 8e3e429..7723845 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = m4 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog @@ -123,6 +124,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -164,7 +166,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ EXTRA_DIST = README codeset.m4 gettext.m4 glibc21.m4 iconv.m4 \ isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \ progtest.m4 diff --git a/man/Makefile.in b/man/Makefile.in index 90ad05d..56754cd 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -136,6 +137,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -177,7 +179,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ man_MANS = hunspell.1 hunspell.4 EXTRA_DIST = $(man_MANS) SUBDIRS = hu diff --git a/man/hu/Makefile.in b/man/hu/Makefile.in index 6ba4257..793b431 100644 --- a/man/hu/Makefile.in +++ b/man/hu/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man/hu DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -125,6 +126,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -166,7 +168,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ #mandir = $(DESTDIR)/share man1dir = $(mandir)/hu/man1 diff --git a/src/Makefile.in b/src/Makefile.in index 5b5e881..8fe0a0f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -131,6 +132,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -172,7 +174,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ SUBDIRS = hunspell parsers tools all: all-recursive diff --git a/src/hunspell/Makefile.in b/src/hunspell/Makefile.in index 5674d67..6a69565 100644 --- a/src/hunspell/Makefile.in +++ b/src/hunspell/Makefile.in @@ -39,6 +39,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/hunspell DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -156,6 +157,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -197,7 +199,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ lib_LIBRARIES = libhunspell.a libhunspell_a_SOURCES = affentry.cxx affixmgr.cxx csutil.cxx \ dictmgr.cxx hashmgr.cxx hunspell.cxx \ diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx index b807408..052425c 100644 --- a/src/hunspell/affixmgr.cxx +++ b/src/hunspell/affixmgr.cxx @@ -1242,7 +1242,7 @@ int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** { short btpp[MAXWORDLEN]; // metacharacter (*, ?) positions for backtracking short btwp[MAXWORDLEN]; // word positions for metacharacters - char btnum[MAXWORDLEN]; // number of matched characters in metacharacter positions + int btnum[MAXWORDLEN]; // number of matched characters in metacharacter positions short bt = 0; int i; int ok; @@ -1268,7 +1268,6 @@ int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** pp+=2; btpp[bt] = pp; btwp[bt] = wp; - btwp[bt] = 0; while (wp <= wend) { if (!(*words)[wp]->alen || !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp-2], (*words)[wp]->alen)) { @@ -1293,7 +1292,12 @@ int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** if ((defcpdtable[i].len == pp) && !(wp > wnum)) ok = 0; } } - if (ok && ok2) break; + if (ok && ok2) { + int r = pp; + while ((defcpdtable[i].len > r) && ((r+1) < defcpdtable[i].len) && + ((defcpdtable[i].def[r+1] == '*') || (defcpdtable[i].def[r+1] == '?'))) r+=2; + if (defcpdtable[i].len <= r) return 1; + } // backtrack if (bt) do { ok = 1; @@ -2596,8 +2600,8 @@ int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts int nh=0; // first add root word to list - - if ((nh < maxn) && ((al == 0) || !pseudoroot || !(TESTAFF(ap, pseudoroot, al)))) { + if ((nh < maxn) && !(al && ((pseudoroot && TESTAFF(ap, pseudoroot, al)) || + (onlyincompound && TESTAFF(ap, onlyincompound, al))))) { wlst[nh].word = mystrdup(ts); wlst[nh].allow = (1 == 0); nh++; @@ -2611,8 +2615,10 @@ int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts if (!sptr->getKeyLen() || ((badl > sptr->getKeyLen()) && (strcmp(sptr->getAffix(), bad + badl - sptr->getKeyLen()) == 0)) && // check pseudoroot flag - !(pseudoroot && sptr->getCont() && - TESTAFF(sptr->getCont(), pseudoroot, sptr->getContLen())) + !(sptr->getCont() && ((pseudoroot && + TESTAFF(sptr->getCont(), pseudoroot, sptr->getContLen())) || + (onlyincompound && + TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen())))) ) { char * newword = sptr->add(ts, wl); if (newword) { @@ -2666,8 +2672,10 @@ int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts if (!ptr->getKeyLen() || ((badl > ptr->getKeyLen()) && (strncmp(ptr->getKey(), bad, ptr->getKeyLen()) == 0)) && // check pseudoroot flag - !(pseudoroot && ptr->getCont() && - TESTAFF(ptr->getCont(), pseudoroot, ptr->getContLen())) + !(ptr->getCont() && ((pseudoroot && + TESTAFF(ptr->getCont(), pseudoroot, ptr->getContLen())) || + (onlyincompound && + TESTAFF(ptr->getCont(), onlyincompound, ptr->getContLen())))) ) { char * newword = ptr->add(ts, wl); if (newword) { @@ -3073,7 +3081,7 @@ int AffixMgr::parse_cpdsyllable(char * line) } else { int n = u8_u16(w, MAXWORDLEN, piece); if (n > 0) { - flag_qsort((unsigned short *) w, 0, n - 1); + flag_qsort((unsigned short *) w, 0, n); cpdvowels_utf16 = (w_char *) malloc(n * sizeof(w_char)); memcpy(cpdvowels_utf16, w, n * sizeof(w_char)); } @@ -3411,7 +3419,7 @@ int AffixMgr::parse_maptable(char * line, FILE * af) w_char w[MAXWORDLEN]; int n = u8_u16(w, MAXWORDLEN, piece); if (n > 0) { - flag_qsort((unsigned short *) w, 0, n - 1); + flag_qsort((unsigned short *) w, 0, n); maptable[j].set_utf16 = (w_char *) malloc(n * sizeof(w_char)); memcpy(maptable[j].set_utf16, w, n * sizeof(w_char)); } diff --git a/src/hunspell/affixmgr.hxx b/src/hunspell/affixmgr.hxx index a2ba7bb..0ed530a 100644 --- a/src/hunspell/affixmgr.hxx +++ b/src/hunspell/affixmgr.hxx @@ -71,7 +71,7 @@ class AffixMgr FLAG keepcase; int havecontclass; // boolean variable - short contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix) + char contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix) flag flag_mode; public: diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx index 5bf7214..b359a88 100644 --- a/src/hunspell/csutil.cxx +++ b/src/hunspell/csutil.cxx @@ -136,9 +136,10 @@ int u8_u16(w_char * dest, int size, const char * src) { return u2 - dest; } -void flag_qsort(unsigned short flags[], short begin, short end) { +void flag_qsort(unsigned short flags[], int begin, int end) { + unsigned short reg; if (end > begin) { - unsigned int pivot = flags[begin]; + unsigned short pivot = flags[begin]; int l = begin + 1; int r = end; while(l < r) { @@ -146,13 +147,13 @@ void flag_qsort(unsigned short flags[], short begin, short end) { l++; } else { r--; - unsigned int reg = flags[l]; + reg = flags[l]; flags[l] = flags[r]; flags[r] = reg; } } l--; - unsigned int reg = flags[begin]; + reg = flags[begin]; flags[begin] = flags[l]; flags[l] = reg; @@ -161,10 +162,10 @@ void flag_qsort(unsigned short flags[], short begin, short end) { } } -int flag_bsearch(unsigned short flags[], unsigned short flag, short length) { - short mid; - short left = 0; - short right = length - 1; +int flag_bsearch(unsigned short flags[], unsigned short flag, int length) { + int mid; + int left = 0; + int right = length - 1; while (left <= right) { mid = (left + right) / 2; if (flags[mid] == flag) return 1; diff --git a/src/hunspell/csutil.hxx b/src/hunspell/csutil.hxx index 62202ca..aa50a58 100644 --- a/src/hunspell/csutil.hxx +++ b/src/hunspell/csutil.hxx @@ -15,10 +15,10 @@ char * u16_u8(char * dest, int size, const w_char * src, int srclen); int u8_u16(w_char * dest, int size, const char * src); // sort 2-byte vector -void flag_qsort(unsigned short flags[], short begin, short end); +void flag_qsort(unsigned short flags[], int begin, int end); // binary search in 2-byte vector -int flag_bsearch(unsigned short flags[], unsigned short flag, short right); +int flag_bsearch(unsigned short flags[], unsigned short flag, int right); // remove end of line char(s) void mychomp(char * s); diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx index 5fe1584..fe451cc 100644 --- a/src/hunspell/suggestmgr.cxx +++ b/src/hunspell/suggestmgr.cxx @@ -299,8 +299,7 @@ int SuggestMgr::map_related_utf(w_char * word, int len, int i, char** wlst, int return ns; } int in_map = 0; -// unsigned short c = *((unsigned short *) word + i); - unsigned short c = ((word + i)->h << 8) + (word + i)->l; + unsigned short c = *((unsigned short *) word + i); for (int j = 0; j < nummap; j++) { if (flag_bsearch((unsigned short *) maptable[j].set_utf16, c, maptable[j].len)) { in_map = 1; @@ -801,7 +800,8 @@ int SuggestMgr::ngsuggest(char** wlst, char * w, HashMgr* pHMgr) // check forbidden words if ((hp->astr) && (pAMgr) && (TESTAFF(hp->astr, pAMgr->get_forbiddenword(), hp->alen) || - TESTAFF(hp->astr, pAMgr->get_nosuggest(), hp->alen))) continue; + TESTAFF(hp->astr, pAMgr->get_nosuggest(), hp->alen) || + TESTAFF(hp->astr, pAMgr->get_onlyincompound(), hp->alen))) continue; sc = ngram(3, word, hp->word, NGRAM_LONGER_WORSE); if (sc > scores[lp]) { scores[lp] = sc; @@ -985,9 +985,8 @@ int SuggestMgr::check(const char * word, int len, int cpdsuggest, int * timer, t if (rv) { if ((rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) || TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen))) return 0; - if (rv->astr && TESTAFF(rv->astr,pAMgr->get_pseudoroot(),rv->alen)) { - rv = NULL; - } + if (rv->astr && (TESTAFF(rv->astr,pAMgr->get_pseudoroot(),rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) rv = NULL; } else rv = pAMgr->prefix_check(word, len, 0); // only prefix, and prefix + suffix XXX if (rv) { @@ -1003,9 +1002,10 @@ int SuggestMgr::check(const char * word, int len, int cpdsuggest, int * timer, t // check forbidden words if ((rv) && (rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) - || TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen))) return 0; + || TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) return 0; - if (rv) { // XXX obsolote + if (rv) { // XXX obsolote if ((pAMgr->get_compoundflag()) && TESTAFF(rv->astr, pAMgr->get_compoundflag(), rv->alen)) return 2 + nosuffix; return 1; @@ -1020,7 +1020,8 @@ int SuggestMgr::check_forbidden(const char * word, int len) if (pAMgr) { rv = pAMgr->lookup(word); - if (rv) if (rv->astr && TESTAFF(rv->astr,pAMgr->get_pseudoroot(),rv->alen)) rv = NULL; + if (rv && rv->astr && (TESTAFF(rv->astr,pAMgr->get_pseudoroot(),rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) rv = NULL; if (!(pAMgr->prefix_check(word,len,1))) rv = pAMgr->suffix_check(word,len, 0, NULL, NULL, 0, NULL); // prefix+suffix, suffix // check forbidden words @@ -1389,7 +1390,8 @@ char * SuggestMgr::suggest_morph(const char * w) while (rv) { if ((!rv->astr) || !(TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) || - TESTAFF(rv->astr, pAMgr->get_pseudoroot(), rv->alen))) { + TESTAFF(rv->astr, pAMgr->get_pseudoroot(), rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) { if (rv->description && ((!rv->astr) || !TESTAFF(rv->astr, pAMgr->get_lemma_present(), rv->alen))) strcat(result, word); diff --git a/src/parsers/Makefile.in b/src/parsers/Makefile.in index 69eb74c..62c6e03 100644 --- a/src/parsers/Makefile.in +++ b/src/parsers/Makefile.in @@ -40,6 +40,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = testparser$(EXEEXT) subdir = src/parsers DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ @@ -168,6 +169,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -209,7 +211,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ lib_LIBRARIES = libparsers.a libparsers_a_SOURCES = firstparser.cxx htmlparser.cxx \ latexparser.cxx manparser.cxx \ diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in index 3db7ca6..de3794a 100644 --- a/src/tools/Makefile.in +++ b/src/tools/Makefile.in @@ -39,6 +39,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ bin_PROGRAMS = munch$(EXEEXT) unmunch$(EXEEXT) example$(EXEEXT) \ hunspell$(EXEEXT) hunmorph$(EXEEXT) hunstem$(EXEEXT) subdir = src/tools @@ -176,6 +177,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -217,7 +219,11 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ INCLUDES = -I${top_srcdir}/src/hunspell -I${top_srcdir}/src/parsers munch_SOURCES = munch.c unmunch_SOURCES = unmunch.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 520ebdc..989213c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to create Makefile.in +XFAIL_TESTS = @XFAILED@ + TESTS = \ affixes.test \ base.test \ @@ -31,6 +33,7 @@ compound2.test \ compound3.test \ compound4.test \ compound5.test \ +compound6.test \ compoundaffix.test \ compoundaffix2.test \ compoundaffix3.test \ @@ -97,6 +100,7 @@ fogemorpheme.wrong \ onlyincompound.aff \ onlyincompound.dic \ onlyincompound.good \ +onlyincompound.sug \ onlyincompound.test \ onlyincompound.wrong \ forbiddenword.aff \ @@ -189,6 +193,11 @@ compound5.good \ compound5.morph \ compound5.test \ compound5.wrong \ +compound6.aff \ +compound6.dic \ +compound6.good \ +compound6.test \ +compound6.wrong \ compoundaffix.aff \ compoundaffix.dic \ compoundaffix.good \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a759060..48ad1ea 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -35,6 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -122,6 +123,7 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XFAILED = @XFAILED@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -163,7 +165,12 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +XFAIL_TESTS = @XFAILED@ TESTS = \ affixes.test \ base.test \ @@ -195,6 +202,7 @@ compound2.test \ compound3.test \ compound4.test \ compound5.test \ +compound6.test \ compoundaffix.test \ compoundaffix2.test \ compoundaffix3.test \ @@ -258,6 +266,7 @@ fogemorpheme.wrong \ onlyincompound.aff \ onlyincompound.dic \ onlyincompound.good \ +onlyincompound.sug \ onlyincompound.test \ onlyincompound.wrong \ forbiddenword.aff \ @@ -350,6 +359,11 @@ compound5.good \ compound5.morph \ compound5.test \ compound5.wrong \ +compound6.aff \ +compound6.dic \ +compound6.good \ +compound6.test \ +compound6.wrong \ compoundaffix.aff \ compoundaffix.dic \ compoundaffix.good \ diff --git a/tests/compound6.aff b/tests/compound6.aff new file mode 100644 index 0000000..cb7cc22 --- /dev/null +++ b/tests/compound6.aff @@ -0,0 +1,4 @@ +COMPOUNDMIN 1 +COMPOUND 2 +COMPOUND A*A +COMPOUND A*AAB*BBBC*C diff --git a/tests/compound6.dic b/tests/compound6.dic new file mode 100644 index 0000000..7d07bbc --- /dev/null +++ b/tests/compound6.dic @@ -0,0 +1,5 @@ +3 +a/A +b/B +c/C + diff --git a/tests/compound6.good b/tests/compound6.good new file mode 100644 index 0000000..55a8f8b --- /dev/null +++ b/tests/compound6.good @@ -0,0 +1,4 @@ +aa +aaaaaa +aabbbc +aaaaabbbbbbcccccc diff --git a/tests/compound6.test b/tests/compound6.test new file mode 100755 index 0000000..7f44369 --- /dev/null +++ b/tests/compound6.test @@ -0,0 +1,4 @@ +#!/bin/sh +DIR="`dirname $0`" +NAME="`basename $0 .test`" +$DIR/test.sh $NAME diff --git a/tests/compound6.wrong b/tests/compound6.wrong new file mode 100644 index 0000000..48b376d --- /dev/null +++ b/tests/compound6.wrong @@ -0,0 +1,4 @@ +abc +abbbbbccccccc +aabbccccccc +aabbbbbbb diff --git a/tests/flagutf8.aff b/tests/flagutf8.aff index a11870b..a7fa16c 100644 --- a/tests/flagutf8.aff +++ b/tests/flagutf8.aff @@ -2,7 +2,8 @@ FLAG UTF-8 SFX A Y 1 -SFX A 0 s/ÖüÜ . +SFX A 0 s/ÖüÖÜ . +#SFX A 0 s/ÖüÜ . SFX Ö Y 1 SFX Ö 0 bar . diff --git a/tests/maputf.aff b/tests/maputf.aff index aefedfa..08fbfeb 100644 --- a/tests/maputf.aff +++ b/tests/maputf.aff @@ -7,4 +7,4 @@ MAXNGRAMSUGS 0 MAP 2 MAP uúü -MAP oóö +MAP öóo diff --git a/tests/onlyincompound.sug b/tests/onlyincompound.sug new file mode 100644 index 0000000..e69de29 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/hunspell.git

