summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING4
-rwxr-xr-xbootstrap30
m---------gl-mod/bootstrap0
-rw-r--r--src/pwl.c14
-rw-r--r--tests/.gitignore5
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/enchant_providers/.gitignore1
-rw-r--r--tests/pwl/enchant_pwl_tests.cpp3
8 files changed, 31 insertions, 28 deletions
diff --git a/HACKING b/HACKING
index 4b63c14..b2558eb 100644
--- a/HACKING
+++ b/HACKING
@@ -6,6 +6,10 @@ Building from git
To build from git, or without relying on the generated files in a source
release, automake, autoconf, libtool, pkg-config and git must be installed.
+
+(Note, the exact packages needed for certain distros may be found in
+.travis.yml and appveyor.yml.)
+
Run
./bootstrap && ./configure --enable-relocatable
diff --git a/bootstrap b/bootstrap
index 79aab70..397a58e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
## DO NOT EDIT - This file generated from build-aux/bootstrap.in
-## by inline-source v2016-02-21.11
+## by inline-source v2019-02-19.15
# Bootstrap an Autotooled package from checked-out sources.
# Written by Gary V. Vaughan, 2010
@@ -9,7 +9,7 @@
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2010-2017 Bootstrap Authors
+# Copyright (C) 2010-2019 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
# <https://opensource.org/license/MIT>, and GPL version 3 or later
@@ -160,6 +160,9 @@ gnulib_non_module_files="
gnulib_path=
gnulib_url=
+# Date from which to clone github, to avoid a full clone.
+gnulib_clone_since=
+
# Additional gnulib-tool options to use.
gnulib_tool_options="
--no-changelog
@@ -224,7 +227,7 @@ vc_ignore=
# Source required external libraries:
# Set a version string for this script.
-scriptversion=2017-04-19.12; # UTC
+scriptversion=2019-02-19.15; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
@@ -232,7 +235,7 @@ scriptversion=2017-04-19.12; # UTC
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2004-2017 Bootstrap Authors
+# Copyright (C) 2004-2019 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
# <https://opensource.org/license/MIT>, and GPL version 3 or later
@@ -1657,7 +1660,7 @@ func_lt_ver ()
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2010-2017 Bootstrap Authors
+# Copyright (C) 2010-2019 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
# <https://opensource.org/license/MIT>, and GPL version 3 or later
@@ -1670,7 +1673,7 @@ func_lt_ver ()
# <https://github.com/gnulib-modules/bootstrap/issues>
# Set a version string for this script.
-scriptversion=2016-03-06.01; # UTC
+scriptversion=2019-02-19.15; # UTC
## ------ ##
@@ -2331,7 +2334,7 @@ func_version ()
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
#! /bin/sh
@@ -2342,7 +2345,7 @@ func_version ()
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2010-2017 Bootstrap Authors
+# Copyright (C) 2010-2019 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
# <https://opensource.org/license/MIT>, and GPL version 3 or later
@@ -2359,7 +2362,7 @@ test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
# Set a version string.
-scriptversion=2016-02-22.14; # UTC
+scriptversion=2019-02-19.15; # UTC
## ------ ##
@@ -2817,12 +2820,12 @@ test extract-trace = "$progname" && func_main "$@"
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "50/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
# Set a version string for *this* script.
-scriptversion=2017-01-09.18; # UTC
+scriptversion=2019-03-22.11; # UTC
## ------------------- ##
@@ -4217,8 +4220,9 @@ func_require_gnulib_submodule ()
trap func_cleanup_gnulib 1 2 13 15
shallow=
- $GIT clone -h 2>&1 |func_grep_q -- --depth \
- && shallow='--depth 365'
+ test -n "$gnulib_clone_since" && \
+ $GIT clone -h 2>&1 |func_grep_q -- --shallow-since \
+ && shallow="--shallow-since=$gnulib_clone_since"
func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
func_cleanup_gnulib
diff --git a/gl-mod/bootstrap b/gl-mod/bootstrap
-Subproject a6745bcbc8e0f1eca57221a0022ae248231e001
+Subproject 037f83765b6e8f90dfabdfac4889be22a5a3f4a
diff --git a/src/pwl.c b/src/pwl.c
index 79ce01b..f0c9d13 100644
--- a/src/pwl.c
+++ b/src/pwl.c
@@ -207,7 +207,7 @@ EnchantPWL* enchant_pwl_init_with_file(const char * file)
{
g_return_val_if_fail (file != NULL, NULL);
- FILE* fd = g_fopen(file, "a+b");
+ FILE* fd = g_fopen(file, "a+");
if(fd == NULL)
return NULL;
fclose(fd);
@@ -232,7 +232,7 @@ static void enchant_pwl_refresh_from_file(EnchantPWL* pwl)
g_hash_table_destroy (pwl->words_in_trie);
pwl->words_in_trie = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- FILE *f = g_fopen(pwl->filename, "rb");
+ FILE *f = g_fopen(pwl->filename, "r");
if (!f)
return;
@@ -248,10 +248,7 @@ static void enchant_pwl_refresh_from_file(EnchantPWL* pwl)
if(line_number == 1 && BOM == g_utf8_get_char(line))
line = g_utf8_next_char(line);
- size_t l = strlen(line)-1;
- if (line[l]=='\n')
- line[l] = '\0';
- else if(!feof(f)) /* ignore lines longer than BUFSIZ. */
+ if(line[strlen(line)-1] != '\n' && !feof(f)) /* ignore lines longer than BUFSIZ. */
{
g_warning ("Line too long (ignored) in %s at line:%zu\n", pwl->filename, line_number);
while (NULL != (fgets (buffer, sizeof (buffer), f)))
@@ -261,7 +258,8 @@ static void enchant_pwl_refresh_from_file(EnchantPWL* pwl)
}
continue;
}
-
+
+ g_strchomp(line);
if( line[0] && line[0] != '#')
{
if(g_utf8_validate(line, -1, NULL))
@@ -323,7 +321,7 @@ void enchant_pwl_add(EnchantPWL *pwl,
if (pwl->filename != NULL)
{
- FILE *f = g_fopen(pwl->filename, "a+b");
+ FILE *f = g_fopen(pwl->filename, "a+");
if (f)
{
/* Since this function does not signal I/O
diff --git a/tests/.gitignore b/tests/.gitignore
index a963072..a24eb43 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,7 +1,6 @@
/test.pwl
-main
-main.exe
-main.test
+/main.test
+/main.test.exe
libenchant_*.so
libenchant_*.dylib
*enchant*.dll
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 903e9b1..3f3f333 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -15,7 +15,7 @@ AM_TESTS_ENVIRONMENT = \
export ENCHANT_CONFIG_DIR=$(ENCHANT_CONFIG_DIR); \
if test -n "$(VALGRIND)"; then export VALGRIND='$(VALGRIND) --suppressions=$(top_srcdir)/lib/relocatable.valgrind'; fi; \
export LIBTOOL=$(top_builddir)/libtool; \
- rm -rf test.pwl; \
+ rm -f test.pwl; \
$(MAKE) libenchant-copy; \
cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \
cp $(builddir)/@objdir@/*@shlibext@ .; \
diff --git a/tests/enchant_providers/.gitignore b/tests/enchant_providers/.gitignore
index 0c954e3..e08c1da 100644
--- a/tests/enchant_providers/.gitignore
+++ b/tests/enchant_providers/.gitignore
@@ -3,3 +3,4 @@
/enchant_*.dylib
/enchant*.dll
/providers.test
+/providers.test.exe
diff --git a/tests/pwl/enchant_pwl_tests.cpp b/tests/pwl/enchant_pwl_tests.cpp
index 7837b20..c6a51e7 100644
--- a/tests/pwl/enchant_pwl_tests.cpp
+++ b/tests/pwl/enchant_pwl_tests.cpp
@@ -160,9 +160,6 @@ TEST_FIXTURE(EnchantPwl_TestFixture,
for(std::vector<std::string>::const_iterator itWord = sNewWords.begin(); itWord != sNewWords.end(); ++itWord){
CHECK( IsWordInDictionary(*itWord) );
- if(!IsWordInDictionary(*itWord)){
- testResults_.OnTestFailure(UnitTest::TestDetails(m_details, __LINE__), itWord->c_str());
- }
}
}