Skip to content

Commit

Permalink
update libdatrie C library to 0.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Feb 17, 2014
1 parent 85c195a commit 0a08e81
Show file tree
Hide file tree
Showing 26 changed files with 2,067 additions and 130 deletions.
282 changes: 282 additions & 0 deletions libdatrie/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,285 @@
2014-01-10 Theppitak Karoonboonyanan <[email protected]>

* configure.ac:
- Bump library revision to reflect code changes.

* NEWS, configure.ac:
=== Version 0.2.8 ===

2014-01-09 Theppitak Karoonboonyanan <[email protected]>

Improve documentation.

* datrie/triedefs.h:
- Refine descriptions of data types.
* datrie/trie.c (trie_iterator_new):
- Fix typo on trie_root() mentioning.
* datrie/trie.c (trie_store, trie_store_if_absent):
- Adjust wording.
* datrie/alpha-map.h, datrie/trie.h:
- Add detailed description of AlphaMap and Trie types.

2014-01-08 Theppitak Karoonboonyanan <[email protected]>

Clarify message in test_nonalpha.

* tests/test_nonalpha.c (main):
- Clarify message on false key duplication.

2014-01-08 Theppitak Karoonboonyanan <[email protected]>

Add test on keys with non-alphabet input chars.

* tests/Makefile.am, +tests/test_nonalpha.c:
- Add test to ensure that operations on keys with non-alphabet
input chars fail.

2014-01-08 Theppitak Karoonboonyanan <[email protected]>

Fail trie operations on non-alphabet inputs.

alpha_map_char_to_trie() tried to return TRIE_CHAR_MAX to indicate
out-of-range error. But this value is indeed valid in trie operations.
Doing so could allow false key duplication when different non-alphabet
chars and TRIE_CHAR_MAX itself were all mapped to TRIE_CHAR_MAX.
So, let's fail all trie operations on non-alphabet input chars.

* datrie/alpha-map-private.h, datrie/alpha-map.c
(alpha_map_char_to_trie):
- Make alpha_map_char_to_trie return TrieIndex type, using
TRIE_INDEX_MAX to indicate out-of-range error.
This allows TRIE_CHAR_MAX to be returned as a valid output.
* datrie/alpha-map.c (alpha_map_char_to_trie_str):
- Fail if alpha_map_char_to_trie() returns error code.
* datrie/trie.c (trie_retrieve, trie_store_conditionally, trie_delete,
trie_state_walk, trie_state_is_walkable):
- Check return value from alpha_map_char_to_trie() and return
failure status on error.
- Also cast TrieIndex return values to TrieChar on function calls.

Thanks Naoki Youshinaga for the suggestion.

2014-01-07 Theppitak Karoonboonyanan <[email protected]>

Check for NULL result from AlphaMap string funcs.

* datrie/trie.c (trie_store_conditionally):
- Return failure on NULL alpha_map_char_to_trie_str().

2014-01-07 Theppitak Karoonboonyanan <[email protected]>

Return NULL on allocation errors in AlphaMap funcs.

* datrie/alpha-map.c
(alpha_map_char_to_trie_str, alpha_map_trie_to_char_str):
- Return NULL on malloc() error.

2014-01-03 Theppitak Karoonboonyanan <[email protected]>

Fix edge case with TRIE_CHAR_MAX as TrieChar.

The trie input char with value TRIE_CHAR_MAX (255), was always
skipped by double-array algorithms. Let's include it.

* datrie/darray.c (da_has_children, da_output_symbols,
da_relocate_base, da_first_separate, da_next_separate):
- Include the last char in trie char iterations.

* datrie/darray.c (da_first_separate, da_next_separate):
- Declare characters as TrieIndex type instead of TrieChar,
to prevent infinite loop due to unsigned char overflow.

Thanks Naoki Youshinaga for the report, test case, and analysis.

2013-10-25 Theppitak Karoonboonyanan <[email protected]>

Fix comiler warnings in tests.

* tests/test_walk.c (main):
- Remove unused var i;
- Remove extra printf() args.
* tests/test_iterator.c:
- Add missing #include for free().
* tests/test_walk.c (walk_dict), tests/utils.c (dict_src):
- Cast string literals to (AlphaChar *) to fix signedness
differences.

2013-10-25 Theppitak Karoonboonyanan <[email protected]>

* configure.ac: Post-release version suffix added.

2013-10-22 Theppitak Karoonboonyanan <[email protected]>

* NEWS, configure.ac:
=== Version 0.2.7.1 ===

2013-10-21 Theppitak Karoonboonyanan <[email protected]>

* configure.ac: Bump library versioning to reflect API addition.
(Change missing in previous release)

2013-10-21 Theppitak Karoonboonyanan <[email protected]>

* configure.ac: Post-release version suffix added.

2013-10-21 Theppitak Karoonboonyanan <[email protected]>

* NEWS, configure.ac:
=== Version 0.2.7 ===

2013-10-21 Theppitak Karoonboonyanan <[email protected]>

Add missing distributed file.

* tests/Makefile.am:
- Add utils.h to distribution.

2013-10-20 Theppitak Karoonboonyanan <[email protected]>

Reorder tests from primitive to applied.

* tests/Makefile.am:
- Test walk & iterator before store-retrieve & file.

2013-10-20 Theppitak Karoonboonyanan <[email protected]>

Write a test suite for trie walk.

* tests/test_walk.c:
- Write test code.

2013-10-18 Theppitak Karoonboonyanan <[email protected]>

Write a test suite for trie store/retrieval.

* tests/utils.h, tests/utils.c (+dict_src_n_entries):
- Add function to get total entries in dict_src[].
* tests/test_store-retrieve.c (main):
- Write test code.

2013-10-18 Theppitak Karoonboonyanan <[email protected]>

Fix messages in test_iterator.

* tests/test_iterator.c (main):
- s/file/trie/. No file is written or read in this test.

2013-10-18 Theppitak Karoonboonyanan <[email protected]>

Skip further iteration tests if key is NULL.

* tests/test_iterator.c (main):
- Insert 'continue' if trie_iterator_get_key() returns NULL.

2013-10-17 Theppitak Karoonboonyanan <[email protected]>

Document availibility of alpha_char_strcmp()

* datrie/alpha-map.c (alpha_char_strcmp):
- Document that it's available since 0.2.7.

2013-10-17 Theppitak Karoonboonyanan <[email protected]>

Write a test for trie iterator.

* tests/test_iterator.c:
- Write test suite for trie iterator.

2013-10-17 Theppitak Karoonboonyanan <[email protected]>

Add skeleton test suites & a test for file I/O.

* configure.ac, Makefile.am, +tests/, +tests/Makefile.am:
- Add tests/ dir to the build system.
* +tests/utils.h, +tests/utils.c:
* +tests/test_file.c:
* +tests/test_iterator.c:
* +tests/test_store-retrieve.c:
* +tests/test_walk.c:
- Add skeleton for test suites.
* tests/utils.h, tests/utils.c, tests/test_file.c:
- Write test suite for file I/O.

2013-10-17 Theppitak Karoonboonyanan <[email protected]>

Add alpha_char_strcmp() API.

* datrie/alpha-map.h, datrie/alpha-map.c (+alpha_char_strcmp):
- Add alpha_char_strcmp() declaration & body.
* datrie/libdatrie.def, datrie/libdatrie.map:
- Add alpha_char_strcmp symbols.

2013-10-16 Theppitak Karoonboonyanan <[email protected]>

Add missing info in alpha_map_add_range() doc.

* datrie/alpha-map.c (alpha_map_add_range):
- Add documentation on return value.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Fix build for Visual Studio on Windows.

* datrie/dstring.c (dstring_append, dstring_append_string,
dstring_append_char, dstring_terminate):
- Cast (void *) pointers to (char *) before calculating offsets,
for portability.

Thanks Gabi Davar for the report and fix (via Mikhail Korobov
<[email protected]>).

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Check for doxygen required version.

* configure.ac:
- When doxygen-doc is enabled, also check doxygen version.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Fix doxygen warning.

* doc/Doxyfile.in:
- doxygen no longer ships with the FreeSans font. Just drop it.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Update Doxyfile.

* doc/Doxyfile.in:
- Updated with 'doxygen -u'.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Fix compiler warnings.
* datrie/trie-string.c (trie_string_append_string):
* datrie/trie.c (trie_iterator_get_key):
- Cast strlen() args from (const TrieChar *) to (const char *),
to fix signedness mismatch warnings.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

Fix automake warnings.

* datrie/Makefile.am, tools/Makefile.am:
- Replace deprecated INCLUDES with AM_CPPFLAGS.

2013-09-23 Theppitak Karoonboonyanan <[email protected]>

* configure.ac: Post-release version suffix added.

2013-01-23 Theppitak Karoonboonyanan <[email protected]>

* NEWS, configure.ac:
=== Version 0.2.6 ===

2013-01-22 Theppitak Karoonboonyanan <[email protected]>

Use xz compression for release tarball.

* configure.ac:
- Specify "dist-xz no-dist-gzip" options to AM_INIT_AUTOMAKE.

2012-08-06 Theppitak Karoonboonyanan <[email protected]>

Improve AlphaMap range merging.
Expand Down
2 changes: 1 addition & 1 deletion libdatrie/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = datrie tools man doc
SUBDIRS = datrie tools man doc tests

EXTRA_DIST = README.migration

Expand Down
33 changes: 33 additions & 0 deletions libdatrie/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
libdatrie

0.2.8 (2014-01-10)
=====
- Fix compiler warnings in test suites.
- Fix edge-case error on alphabet set of size 255.
(Thanks Naoki Youshinaga for the report, test case, and analysis.)
- Fail trie operations on non-alphabet inputs, rather than silently allowing
them to sneak in as false keys.
(Thanks Naoki Youshinaga for the suggestion.)
- Improved documentation.

0.2.7.1 (2013-10-22)
=======
- Bump library versioning to reflect API addition.
(Change missing in previous release)

0.2.7 (2013-10-21)
=====
- Fix portability issue with non-GCC compilers.
[Thanks Gabi Daver for the report and fix (via Mikhail Korobov).]
- Fix compiler warnings.
- New utility API for comparing AlphaChar strings.
- Add test suites.
- Update doxygen doc generation.

0.2.6 (2013-01-23)
=====
- New API trie_state_walkable_chars() for breadth-first traversal.
- New class TrieIterator for callback-free enumeration.
- Improved performance on key enumeration.
- Improved AlphaMap range merging.
- Bug fixes.
[Many thanks to Mikhail Korobov for improvements in this version.]

0.2.5 (2011-11-04)
=====
- Fix missing 'extern "C"' in header file. [Patch from Aurimas Černius]
Expand Down
24 changes: 18 additions & 6 deletions libdatrie/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(libdatrie, 0.2.5svn, [email protected])
AC_INIT(libdatrie, 0.2.8, [email protected])
AC_CONFIG_SRCDIR([datrie/trie.h])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE(dist-xz no-dist-gzip)

# Library versioning
# Library code modified: REVISION++
# Interfaces added: CURRENT++ REVISION=0 AGE++
# Interfaces changed/removed: CURRENT++ REVISION=0 AGE=0
LT_CURRENT=3
LT_REVISION=0
LT_AGE=2
LT_CURRENT=4
LT_REVISION=1
LT_AGE=3
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

DOXYGEN_REQ_VER=1.8.4

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
Expand Down Expand Up @@ -107,6 +109,15 @@ if test "x$enable_doxygen_doc" = "xyes"; then
AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no)
if test "x$DOXYGEN" = "xno"; then
enable_doxygen_doc="no"
else
AC_MSG_CHECKING([doxygen >= $DOXYGEN_REQ_VER])
DOXYGEN_VER=$($DOXYGEN --version)
if expr $DOXYGEN_VER \< $DOXYGEN_REQ_VER > /dev/null; then
AC_MSG_RESULT([$DOXYGEN_VER, no, documentation disabled])
enable_doxygen_doc="no"
else
AC_MSG_RESULT([$DOXYGEN_VER, yes])
fi
fi
fi

Expand All @@ -128,5 +139,6 @@ AC_CONFIG_FILES([Makefile
tools/Makefile
man/Makefile
doc/Makefile
doc/Doxyfile])
doc/Doxyfile
tests/Makefile])
AC_OUTPUT
2 changes: 1 addition & 1 deletion libdatrie/datrie/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkginclude_HEADERS = \

EXTRA_DIST = libdatrie.map libdatrie.def

INCLUDES = -I$(top_srcdir)
AM_CPPFLAGS = -I$(top_srcdir)

lib_LTLIBRARIES = libdatrie.la

Expand Down
Loading

0 comments on commit 0a08e81

Please sign in to comment.