Imported Upstream version 0.2.12
[platform/upstream/libdatrie.git] / ChangeLog
index 4ba6b9d..2d87b42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,225 @@
+2018-06-19  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       * configure.ac:
+         - Bump library revision to reflect code changes.
+
+       * NEWS:
+       === Version 0.2.12 ===
+
+2018-06-19  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Use HTTPS in URL
+
+       * README:
+         - Update document URL to HTTPS
+
+2018-06-14  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Cast (wchar_t *) to fix warnings in tests
+
+       "%ls" printf() format requires (wchar_t *) [aka int *] arg.
+       So, let's cast (AlphaChar *) [aka unsigned int *] to satisfy it.
+
+       * tests/test_walk.c:
+       * tests/test_iterator.c:
+       * tests/test_store-retrieve.c:
+       * tests/test_file.c:
+       * tests/test_nonalpha.c:
+       * tests/test_null_trie.c:
+         - Add <wchar.h> include, for wchar_t type
+         - Cast "%ls" args from (AlphaChar *) to (wchar_t *)
+
+2018-06-06  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Avoid non-ANSI C snprintf()
+
+       * tools/trietool.c (+full_path, prepare_trie, close_trie):
+         - Instead of preparing full path name with snprintf(), which is
+           non-ANSI, and still risks path name trimming, do it with
+           size-calculated malloc().
+         - free() it as needed.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Fix sscanf() string format
+
+       * tools/trietool.c (prepare_trie):
+         - Define b, e as unsigned int, as required by "%x" format.
+           Fixing warning from '-Wformat=' gcc option.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Fix compiler warnings in tests
+
+       * tests/test_byte_alpha.c (main):
+       * tests/test_file.c (main):
+       * tests/test_iterator.c (main):
+       * tests/test_nonalpha.c (main):
+       * tests/test_null_trie.c (main):
+       * tests/test_store-retrieve.c (main):
+       * tests/test_term_state.c (main):
+       * tests/test_walk.c (main):
+         - Declare main function with 'main (void)'.
+           Fixing warning from '-Wstrict-prototypes' gcc option.
+       * tests/test_walk.c (main):
+         - Split long string, which required C90 compilers.
+           Fixing warning from '-Woverlength-strings' gcc option.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Duplicate TrieChar string in more portable manner
+
+       * datrie/tail.c (tail_set_suffix, +tc_strdup, +tc_strlen):
+         - Replace cast strdup() with crafted implementation,
+           allowing TrieChar to be of larger size than char.
+           Fixing warning from '-Wint-to-pointer-cast' gcc option.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Split long string
+
+       * tools/trietool.c (usage):
+         - Split help message which was too long and required C90 compiler.
+           Caught by '-Woverlength-strings' gcc option.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Remove unused byte, word, dword typedefs
+
+       These are likely to conflict with other uses.
+
+       * datrie/typedefs.h (-byte, -word, -dword):
+         - Remove the unused typedefs
+
+       Thanks Peter Moulder for the patch.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Rename TRUE/FALSE in Bool enum to avoid clash
+
+       Some other header file may have already define TRUE/FALSE.
+
+       * datrie/typedefs.h (Bool):
+         - Rename FALSE, TRUE to DA_FALSE, DA_TRUE respectively,
+           and define FALSE, TRUE macros only if they haven't been defined.
+
+       Thanks Peter Moulder for the patch.
+
+2018-06-04  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Declare argument-less functions with "(void)"
+
+       "f()" declaration form is K&R style, specifying that no information
+       about the number or types of parameters is supplied. This caused
+       warnings on '-Wstrict-prototypes' gcc option.
+
+       * datrie/alpha-map.h, datrie/alpha-map.c (alpha_map_new):
+       * datrie/darray.h, datrie/darray.c (da_new, symbols_new):
+       * datrie/tail.h, datrie/tail.c (tail_new):
+       * tests/utils.h, tests/utils.c (en_alpha_map_new, en_trie_new):
+         - Use "(void)" form in declaration
+         - Also use "(void)" form in definition, for consistency
+
+       Thanks Peter Moulder for the initial patch.
+
+2018-05-24  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Remove duplicate include
+
+       * tools/trietool.c:
+         - Remove duplicate include <config.h>
+
+2018-04-23  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Add missing include in test
+
+       * tests/test_byte_alpha.c:
+         - Add missing include for utils.h
+
+2018-04-23  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       * configure.ac:
+         - Bump library revision to reflect code changes.
+
+       * NEWS:
+       === Version 0.2.11 ===
+
+2018-04-21  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Fix reported segfault on full-range alpha map
+
+       * tests/Makefile.am, +tests/test_byte_alpha.c:
+         - Add test case
+       * datrie/alpha-map.c (alpha_map_recalc_work_area()):
+         - Redeclare trie_last as TrieIndex, to prevent overflow.
+
+       Thanks Xiao Wang for the report, and @nevermatch for the analysis.
+
+       Closes: #6
+       https://github.com/tlwg/libdatrie/issues/6
+
+2018-03-29  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Fix trie_state_get_data() at a prefix key
+
+       When getting data from a state which terminates a key that is
+       a prefix of another key, a terminator should be tried, so it
+       jumps from DA to TAIL, where we can get the data.
+
+       * tests/Makefile.am, +tests/test_term_state.c:
+         - Add a test case with {'ab', 'abc'} dictionary, which fails previous
+           code when retrieving data for key 'ab'.
+       * datrie/trie.c (trie_state_get_data()):
+         - Instead of simply checking for leaf state, which only caught a state
+           in TAIL, also try walking with a terminator when still in DA.
+         - Replace 'leaf state' with 'terminal state' in documentation,
+           for more clarity.
+         - Also return error on null state pointer.
+
+       Thanks Filip Pytloun from the pytries project for the initial patch.
+
+2017-09-06  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Revise description about search time complexity
+
+       * README:
+         - Clarify that search time is O(m), where m is the key length,
+           instead of O(1), while still claim that it's independent of
+           database size.
+
+       This closes #4.
+       https://github.com/tlwg/libdatrie/issues/4
+
+2016-12-14  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Include git-version-gen in tarball
+
+       * Makefile.am:
+         - Add build-aux/git-version-gen to EXTRA_DIST.
+
+2016-09-21  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Fix iconv() return value checking.
+
+       * tools/trietool.c (conv_to_alpha):
+         - Check iconv() return value against (size_t) -1, rather than
+           for its negativity, as size_t can be unsigned.
+
+       Thanks Daniel Macks for the report on Issue #3.
+       https://github.com/tlwg/libdatrie/issues/3
+
+2016-09-21  Theppitak Karoonboonyanan  <theppitak@gmail.com>
+
+       Use versioning based on Git snapshot.
+
+       * Makefile.am:
+         - Add dist-hook to generate VERSION file on tarball generation.
+       * +build-aux/git-version-gen:
+         - Add script to generate version based on 'git describe'
+           if in git tree, or using VERSION file if in release tarball.
+       * configure.ac:
+         - Call git-version-gen to get package version.
+
 2015-10-20  Theppitak Karoonboonyanan  <theppitak@gmail.com>
 
        * configure.ac: