| 1 |
2025-11-25 Theppitak Karoonboonyanan <[email protected]> |
| 2 |
|
| 3 |
* NEWS: |
| 4 |
=== Version 0.2.14 === |
| 5 |
|
| 6 |
2025-11-25 Theppitak Karoonboonyanan <[email protected]> |
| 7 |
|
| 8 |
Update library versioning |
| 9 |
|
| 10 |
* configure.ac: Bump library revision to reflect code change. |
| 11 |
|
| 12 |
2025-11-24 Theppitak Karoonboonyanan <[email protected]> |
| 13 |
|
| 14 |
Check Doxygen version without autoconf-archive. |
| 15 |
|
| 16 |
* configure.ac: |
| 17 |
- Check Doxygen version using AS_VERSION_COMPARE from within |
| 18 |
autoconf instead of AX_COMPARE_VERSION from autoconf-archive. |
| 19 |
* INSTALL: |
| 20 |
- Drop autoconf-archive requirement from documentation. |
| 21 |
|
| 22 |
2025-11-22 Theppitak Karoonboonyanan <[email protected]> |
| 23 |
|
| 24 |
Update Doxyfile for doxygen 1.9.8. |
| 25 |
|
| 26 |
* doc/Doxyfile.in: |
| 27 |
- Apply 'doxygen -u'. |
| 28 |
* configure.ac: |
| 29 |
- Bump doxygen required version. |
| 30 |
|
| 31 |
2025-05-25 Theppitak Karoonboonyanan <[email protected]> |
| 32 |
|
| 33 |
Mark UNLIKELY for a malloc failure check. |
| 34 |
|
| 35 |
* datrie/dstring.c (dstring_new): |
| 36 |
- Mark a malloc() result check with UNLIKELY(). |
| 37 |
|
| 38 |
2025-05-25 Theppitak Karoonboonyanan <[email protected]> |
| 39 |
|
| 40 |
Add missing #include for the last commit. |
| 41 |
|
| 42 |
* datrie/trie-string.c: |
| 43 |
- Include "trie-private.h" for the UNLIKELY() macro. |
| 44 |
|
| 45 |
2025-05-25 Theppitak Karoonboonyanan <[email protected]> |
| 46 |
|
| 47 |
Add checks for malloc() failures. |
| 48 |
|
| 49 |
* datrie/trie-string.c (trie_char_strdup): |
| 50 |
* datrie/trie.c (trie_iterator_get_key): |
| 51 |
- Check and return NULL on malloc() failures. |
| 52 |
|
| 53 |
Thanks Peng Wu <@[email protected]> for the report. |
| 54 |
Closes: #20. |
| 55 |
|
| 56 |
|
| 57 |
2025-05-24 John Hein <@[email protected]> |
| 58 |
|
| 59 |
Fix 'undefined symbol: locale_charset' failure. |
| 60 |
|
| 61 |
* configure.ac: |
| 62 |
- Link with -liconv when locale_charset() is found in libiconv, |
| 63 |
which is true since libiconv 1.17. |
| 64 |
|
| 65 |
Closes: #25. |
| 66 |
|
| 67 |
2025-05-24 Theppitak Karoonboonyanan <[email protected]> |
| 68 |
|
| 69 |
Fix parallel test failure. |
| 70 |
|
| 71 |
* tests/test_file.c: |
| 72 |
* tests/test_serialization.c: |
| 73 |
- Make TRIE_FILENAME unique for each test, to avoid operation |
| 74 |
on the same file in parrallel test. |
| 75 |
|
| 76 |
Thanks @[email protected] for the report. |
| 77 |
Closes: #28. |
| 78 |
|
| 79 |
2025-05-15 Theppitak Karoonboonyanan <[email protected]> |
| 80 |
|
| 81 |
Fix "make --shuffle=reverse" failure. |
| 82 |
|
| 83 |
See Debian #1105545 for the report. |
| 84 |
|
| 85 |
* tools/Makefile.am: |
| 86 |
- Make sure $(bindir) exists before installing old program |
| 87 |
symlink. |
| 88 |
|
| 89 |
2021-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 90 |
|
| 91 |
Check fread() result in serialization test. |
| 92 |
|
| 93 |
* tests/test_serialization.c (main): |
| 94 |
- Check fread() return value when reading back the serialized |
| 95 |
trie file. (Caught by -Wunused-result when building deb.) |
| 96 |
|
| 97 |
2021-08-31 Theppitak Karoonboonyanan <[email protected]> |
| 98 |
|
| 99 |
Fix PAPER_TYPE in Doxyfile. |
| 100 |
|
| 101 |
* doc/Doxyfile.in: |
| 102 |
- Fix invalid PAPER_TYPE 'a4wide' to 'a4'. |
| 103 |
|
| 104 |
2021-08-31 Theppitak Karoonboonyanan <[email protected]> |
| 105 |
|
| 106 |
Update Doxyfile for doxygen 1.9.1. |
| 107 |
|
| 108 |
* doc/Doxyfile.in: |
| 109 |
- Apply 'doxygen -u'. |
| 110 |
* configure.ac: |
| 111 |
- Bump doxygen required version. |
| 112 |
|
| 113 |
2021-08-31 Theppitak Karoonboonyanan <[email protected]> |
| 114 |
|
| 115 |
Fix documentation typo. |
| 116 |
|
| 117 |
* datrie/trie.h (TrieEnumFunc): |
| 118 |
- Fix 'data' param to 'key_data' in doc comment. |
| 119 |
|
| 120 |
2021-08-31 Theppitak Karoonboonyanan <[email protected]> |
| 121 |
|
| 122 |
Apply 'autoupdate' for autoconf 2.71 |
| 123 |
|
| 124 |
* configure.ac: |
| 125 |
- Quote m4 strings in AC_INIT() parameters. |
| 126 |
- Replace AC_CONFIG_HEADER() with AC_CONFIG_HEADERS(). |
| 127 |
- Replace AC_PROG_LIBTOOL with LT_INIT. With this, drop |
| 128 |
AC_LIBTOOL_WIN32_DLL, as we haven't really declared |
| 129 |
dllexport anywhere yet. |
| 130 |
- Replace obsolete AC_LIBTOOL_LINKER_OPTION() with |
| 131 |
_LT_LINKER_OPTION(). Also quote an m4 string. |
| 132 |
- Replace obsolete AC_TRY_COMPILE() with AC_COMPILE_IFELSE(). |
| 133 |
Use AC_LANG_PROGRAM() as 'autoupdate' suggests. |
| 134 |
- Drop AC_HEADER_STDC as 'autoupdate' suggests. |
| 135 |
- Replace deprecated AC_HELP_STRING() with AS_HELP_STRING(). |
| 136 |
- Update AC_PREREQ() from 2.59 to 2.71. |
| 137 |
|
| 138 |
2021-02-08 Theppitak Karoonboonyanan <[email protected]> |
| 139 |
|
| 140 |
Provide our own version of INSTALL instruction. |
| 141 |
|
| 142 |
* INSTALL: |
| 143 |
- Explain simple installation steps and build requirements. |
| 144 |
|
| 145 |
This is to address a frequently found issue when |
| 146 |
'autoconf-archive' is missing, like in issue #17, issue #18. |
| 147 |
|
| 148 |
2021-01-29 Theppitak Karoonboonyanan <[email protected]> |
| 149 |
|
| 150 |
* NEWS: |
| 151 |
=== Version 0.2.13 === |
| 152 |
|
| 153 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 154 |
|
| 155 |
Update library versioning |
| 156 |
|
| 157 |
* configure.ac: Bump library versioning to reflect API addition. |
| 158 |
|
| 159 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 160 |
|
| 161 |
Rename trie_byte_strlen() to trie_char_strsize(). |
| 162 |
|
| 163 |
The object of the function is TrieChar string. Let's keep |
| 164 |
that semantics in the name. |
| 165 |
|
| 166 |
* datrie/trie-string.h, datrie/trie-string.c |
| 167 |
(trie_byte_strlen -> trie_char_strsize): |
| 168 |
- Rename the function. |
| 169 |
* datrie/tail.c (tail_get_serialized_size, tail_serialize): |
| 170 |
- Replace trie_byte_strlen() calls with the new name. |
| 171 |
|
| 172 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 173 |
|
| 174 |
Revise test_serialization. |
| 175 |
|
| 176 |
* tests/test_serialization.c (-trie_enum_mark_rec): |
| 177 |
- Drop unused callback function. |
| 178 |
* tests/test_serialization (main): |
| 179 |
- Drop unused 'is_failed' variable. |
| 180 |
- "%Ilu" -> "%lu" printf format. |
| 181 |
- Rearrange error handling in stack unwinding style. |
| 182 |
- Add '\n' to printf messages. |
| 183 |
- Free 'trieSerializedData'. |
| 184 |
|
| 185 |
We're not moving to C99 yet, but the declaration amid code is |
| 186 |
too useful to remove. And it's just in the test code, not in |
| 187 |
the main source. So we still allow it. |
| 188 |
|
| 189 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 190 |
|
| 191 |
Get rid of <unistd.h> include in the new test. |
| 192 |
|
| 193 |
* tests/test_serialization.c (main): |
| 194 |
- Replace unlink() calls with remove() from <stdio.h> and drop |
| 195 |
<unistd.h> include. |
| 196 |
|
| 197 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 198 |
|
| 199 |
Adjust file-internal function declarations. |
| 200 |
|
| 201 |
* datrie/fileutils.c |
| 202 |
(parse_int16_be, serialize_int32_be, serialize_int16_be): |
| 203 |
- Re-declare functions as static. |
| 204 |
* datrie/fileutils.c (parse_int16_be): |
| 205 |
- Make the 'buff' arg const pointer. |
| 206 |
* datrie/fileutils.c: |
| 207 |
- Remove some blank lines in source. |
| 208 |
|
| 209 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 210 |
|
| 211 |
Fix documentation. |
| 212 |
|
| 213 |
* datrie/tail.h (Tail typedef): |
| 214 |
- Fix comment (Double-array -> Tail). |
| 215 |
|
| 216 |
2021-01-24 Theppitak Karoonboonyanan <[email protected]> |
| 217 |
|
| 218 |
Cosmetic changes. |
| 219 |
|
| 220 |
* datrie/fileutils.c: |
| 221 |
* datrie/trie-string.c: |
| 222 |
* datrie/alpha-map.c: |
| 223 |
* datrie/darray.h: |
| 224 |
* datrie/darray.c: |
| 225 |
* datrie/tail.h: |
| 226 |
* datrie/tail.c: |
| 227 |
* datrie/trie.c: |
| 228 |
* tools/trie-tool.c: |
| 229 |
* tests/test_serialization.c: |
| 230 |
- Use space before left parenthesis. |
| 231 |
- Use old-style C comments. |
| 232 |
- Remove trailing spaces. |
| 233 |
- Re-wrap lines. |
| 234 |
|
| 235 |
2021-01-23 KOLANICH <[email protected]> |
| 236 |
|
| 237 |
Added serialization of the trie into a memory buffer. |
| 238 |
|
| 239 |
* datrie/fileutils.c |
| 240 |
(file_write_int32, +serialize_int32, |
| 241 |
file_write_int16, +serialize_int16, |
| 242 |
file_read_int32, +parse_int32_be, |
| 243 |
file_read_int16, +parse_int16_be): |
| 244 |
- Split binary read/write operations into separate functions. |
| 245 |
* datrie/fileutils.h, datrie/fileutils.c |
| 246 |
(+serialize_int32_be_incr, +serialize_int16_be_incr): |
| 247 |
- Add serialization utility functions with pointer advancement. |
| 248 |
* datrie/trie-string.h, datrie/trie-string.c |
| 249 |
(+trie_byte_strlen): |
| 250 |
- Add utility method for calculating TrieChar string size in bytes. |
| 251 |
|
| 252 |
* datrie/alpha-map-private.h, datrie/alpha-map.c |
| 253 |
(+alpha_map_get_serialized_size, +alpha_map_serialize_bin): |
| 254 |
- Add AlphaMap serialization methods. |
| 255 |
* datrie/darray.h, datrie/darray.c |
| 256 |
(+da_get_serialized_size, +da_serialize): |
| 257 |
- Add DArray serialization methods. |
| 258 |
* datrie/tail.h, datrie/tail.c |
| 259 |
(+tail_get_serialized_size, +tail_serialize): |
| 260 |
- Add Tail serialization methods. |
| 261 |
* datrie/trie.h, datrie/trie.c |
| 262 |
(+trie_get_serialized_size, +trie_serialize): |
| 263 |
- Add Trie serialization methods. |
| 264 |
* datrie/libdatrie.map, datrie/libdatrie.def: |
| 265 |
- Add export symbols for Trie serialization. |
| 266 |
|
| 267 |
* tests/Makefile.am, +tests/test_serialization.c: |
| 268 |
- Add serialization test. |
| 269 |
|
| 270 |
Pull Request #12. |
| 271 |
|
| 272 |
2021-01-22 Theppitak Karoonboonyanan <[email protected]> |
| 273 |
|
| 274 |
Get rid of <unistd.h> include. |
| 275 |
|
| 276 |
* tests/test_file.c (main): |
| 277 |
- Replace unlink() calls with remove() from <stdio.h> and drop |
| 278 |
<unistd.h> include, fixing build issue on Windows. |
| 279 |
|
| 280 |
Addressing Windows build issue differently from what proposed by |
| 281 |
@fanc999 in pull request #15. Thanks @fanc999 for first raising this. |
| 282 |
|
| 283 |
2021-01-15 Theppitak Karoonboonyanan <[email protected]> |
| 284 |
|
| 285 |
Use TRIE_CHAR_TERM in TAIL I/O methods. |
| 286 |
|
| 287 |
* datrie/tail.c (tail_fwrite): |
| 288 |
- Replace strlen() with trie_char_strlen() on suffix, |
| 289 |
which is TrieChar string. |
| 290 |
* datrie/tail.c (tail_fread): |
| 291 |
- Append TRIE_CHAR_TERM, rather than literal zero, |
| 292 |
as suffix terminator. |
| 293 |
|
| 294 |
2021-01-15 Theppitak Karoonboonyanan <[email protected]> |
| 295 |
|
| 296 |
Use TRIE_CHAR_TERM in TrieIterator methods. |
| 297 |
|
| 298 |
* datrie/trie.c (trie_iterator_get_key): |
| 299 |
- Replace strlen() with trie_char_strlen() on tail_str, |
| 300 |
which is TrieChar string. |
| 301 |
- Check tail_str termination against TRIE_CHAR_TERM, not zero. |
| 302 |
|
| 303 |
2021-01-14 Theppitak Karoonboonyanan <[email protected]> |
| 304 |
|
| 305 |
Fix wrong TRIE_CHAR_TERM semantics. |
| 306 |
|
| 307 |
* datrie/trie.h (trie_state_is_terminal): |
| 308 |
- Test for terminal state using zero AlphaChar. |
| 309 |
TRIE_CHAR_TERM is a TrieChar, although it's also accidentally zero. |
| 310 |
|
| 311 |
2021-01-14 Theppitak Karoonboonyanan <[email protected]> |
| 312 |
|
| 313 |
Reduce loops in alpha_map_recalc_work_area(). |
| 314 |
|
| 315 |
* datrie/alpha-map.c (alpha_map_recalc_work_area): |
| 316 |
- Instead of pre-filling trie-to-alpha map with errors |
| 317 |
and setting valid cells afterward, just fill error cells |
| 318 |
left after valid cells are done. Then, finally set |
| 319 |
TRIE_CHAR_TERM cell. |
| 320 |
|
| 321 |
2021-01-10 Theppitak Karoonboonyanan <[email protected]> |
| 322 |
|
| 323 |
Rewrite AlphaMap recalc. |
| 324 |
|
| 325 |
* datrie/alpha-map.c (alpha_map_recalc_work_area): |
| 326 |
Rewrite alpha-to-trie & trie-to-alpha maps recalculation |
| 327 |
- For clearer relation between the two maps |
| 328 |
- To allow other TRIE_CHAR_TERM values than zero |
| 329 |
|
| 330 |
2021-01-09 Theppitak Karoonboonyanan <[email protected]> |
| 331 |
|
| 332 |
Use TRIE_CHAR_TERM macro instead of zero. |
| 333 |
|
| 334 |
* datrie/alpha-map.c |
| 335 |
(alpha_map_char_to_trie, alpha_map_char_to_trie_str): |
| 336 |
* datrie/trie.c (trie_branch_in_branch, trie_branch_in_tail): |
| 337 |
* datrie/tail.c (tail_walk_str, tail_walk_char): |
| 338 |
- Use TRIE_CHAR_TERM instead of hard-wired zero when working |
| 339 |
with raw trie string termination. |
| 340 |
* datrie/trie-string.c (trie_string_terminate): |
| 341 |
- Append TRIE_CHAR_TERM instead of simply delegating to |
| 342 |
dstring_terminate(). |
| 343 |
|
| 344 |
2021-01-09 Theppitak Karoonboonyanan <[email protected]> |
| 345 |
|
| 346 |
Share static trie string functions internally. |
| 347 |
|
| 348 |
* datrie/trie-string.h, datrie/trie-string.c, datrie/tail.c |
| 349 |
(tc_strlen -> trie_char_strlen, tc_strdup -> trie_char_strdup): |
| 350 |
- Move private functions in tail.c to trie-string.[ch], |
| 351 |
with new full names under new "static trie string" section. |
| 352 |
- Check/assign string terminator using TRIE_CHAR_TERM |
| 353 |
instead of zero. |
| 354 |
* datrie/tail.c (tail_set_suffix): |
| 355 |
- Call the new trie_char_strdup() instead of tc_strdup(). |
| 356 |
* datrie/alpha-map.c (alpha_map_trie_to_char_str): |
| 357 |
- Call trie_char_strlen() instead of strlen(). |
| 358 |
|
| 359 |
2021-01-06 Theppitak Karoonboonyanan <[email protected]> |
| 360 |
|
| 361 |
Get rid of char semantics from TrieChar |
| 362 |
|
| 363 |
* datrie/trie.c (trie_branch_in_branch, trie_branch_in_tail): |
| 364 |
- Check null TrieChar with int zero instead of char. |
| 365 |
|
| 366 |
2021-01-05 Theppitak Karoonboonyanan <[email protected]> |
| 367 |
|
| 368 |
Use proper #include form in installed header. |
| 369 |
|
| 370 |
* datrie/alpha-map.h: |
| 371 |
- Use angle quotes form instead of double quotes in #include. |
| 372 |
|
| 373 |
2021-01-05 Theppitak Karoonboonyanan <[email protected]> |
| 374 |
|
| 375 |
Fix some documentations. |
| 376 |
|
| 377 |
* datrie/trie.c (trie_is_dirty): |
| 378 |
- Adjust wording to make clear the file is out of sync, |
| 379 |
not the other way around. |
| 380 |
* datrie/trie.c (trie_store, trie_store_if_absent): |
| 381 |
- Fix typo in the description of 'key' parameter. |
| 382 |
* datrie/trie.c (trie_store_if_absent): |
| 383 |
- Minor wording adjustment (inserted, not appended). |
| 384 |
|
| 385 |
2020-12-30 Theppitak Karoonboonyanan <[email protected]> |
| 386 |
|
| 387 |
Fix isspace() arg problem on NetBSD. |
| 388 |
|
| 389 |
* tools/trietool.c (command_add_list, string_trim): |
| 390 |
- Cast char to unsigned char before passing to isspace(). |
| 391 |
|
| 392 |
Thanks Sean <[email protected]> for the report via a personal mail. |
| 393 |
|
| 394 |
2019-12-20 Theppitak Karoonboonyanan <[email protected]> |
| 395 |
|
| 396 |
Use GitHub issue tracker as bug report address. |
| 397 |
|
| 398 |
* configure.ac: |
| 399 |
- Replace bug report e-mail address with GitHub issue tracker URL. |
| 400 |
|
| 401 |
2019-08-05 Theppitak Karoonboonyanan <[email protected]> |
| 402 |
|
| 403 |
Stop installing README.migration |
| 404 |
|
| 405 |
It's supposed to be internal document now. |
| 406 |
|
| 407 |
* Makefile.am: |
| 408 |
- Remove README.migration from doc_DATA. |
| 409 |
|
| 410 |
2019-01-21 Theppitak Karoonboonyanan <[email protected]> |
| 411 |
|
| 412 |
Fix cross-compiling issue caused by AC_FUNC_MALLOC |
| 413 |
|
| 414 |
* configure.ac: |
| 415 |
- Replace AC_FUNC_MALLOC with AC_CHECK_FUNCS([malloc]), |
| 416 |
as we don't rely on GNU's malloc(0) behavior. |
| 417 |
|
| 418 |
Thanks Vanessa McHale for the report. Closes: #11 |
| 419 |
|
| 420 |
2018-11-23 Theppitak Karoonboonyanan <[email protected]> |
| 421 |
|
| 422 |
Fix wrong key listing in byte trie |
| 423 |
|
| 424 |
* tests/Makefile.am, +tests/test_byte_list.c: |
| 425 |
- Add test case |
| 426 |
* datrie/alpha-map.c (alpha_map_recalc_work_area): |
| 427 |
- Index trie_to_alpha_map[] using TrieIndex, not TrieChar type, |
| 428 |
to prevent overflow upon incrementing over 0xff. |
| 429 |
- Drop tc variable and just reuse trie_last. |
| 430 |
|
| 431 |
Thanks @legale for the report. |
| 432 |
|
| 433 |
Closes: #9 |
| 434 |
https://github.com/tlwg/libdatrie/issues/9 |
| 435 |
|
| 436 |
2018-06-19 Theppitak Karoonboonyanan <[email protected]> |
| 437 |
|
| 438 |
* configure.ac: |
| 439 |
- Bump library revision to reflect code changes. |
| 440 |
|
| 441 |
* NEWS: |
| 442 |
=== Version 0.2.12 === |
| 443 |
|
| 444 |
2018-06-19 Theppitak Karoonboonyanan <[email protected]> |
| 445 |
|
| 446 |
Use HTTPS in URL |
| 447 |
|
| 448 |
* README: |
| 449 |
- Update document URL to HTTPS |
| 450 |
|
| 451 |
2018-06-14 Theppitak Karoonboonyanan <[email protected]> |
| 452 |
|
| 453 |
Cast (wchar_t *) to fix warnings in tests |
| 454 |
|
| 455 |
"%ls" printf() format requires (wchar_t *) [aka int *] arg. |
| 456 |
So, let's cast (AlphaChar *) [aka unsigned int *] to satisfy it. |
| 457 |
|
| 458 |
* tests/test_walk.c: |
| 459 |
* tests/test_iterator.c: |
| 460 |
* tests/test_store-retrieve.c: |
| 461 |
* tests/test_file.c: |
| 462 |
* tests/test_nonalpha.c: |
| 463 |
* tests/test_null_trie.c: |
| 464 |
- Add <wchar.h> include, for wchar_t type |
| 465 |
- Cast "%ls" args from (AlphaChar *) to (wchar_t *) |
| 466 |
|
| 467 |
2018-06-06 Theppitak Karoonboonyanan <[email protected]> |
| 468 |
|
| 469 |
Avoid non-ANSI C snprintf() |
| 470 |
|
| 471 |
* tools/trietool.c (+full_path, prepare_trie, close_trie): |
| 472 |
- Instead of preparing full path name with snprintf(), which is |
| 473 |
non-ANSI, and still risks path name trimming, do it with |
| 474 |
size-calculated malloc(). |
| 475 |
- free() it as needed. |
| 476 |
|
| 477 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 478 |
|
| 479 |
Fix sscanf() string format |
| 480 |
|
| 481 |
* tools/trietool.c (prepare_trie): |
| 482 |
- Define b, e as unsigned int, as required by "%x" format. |
| 483 |
Fixing warning from '-Wformat=' gcc option. |
| 484 |
|
| 485 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 486 |
|
| 487 |
Fix compiler warnings in tests |
| 488 |
|
| 489 |
* tests/test_byte_alpha.c (main): |
| 490 |
* tests/test_file.c (main): |
| 491 |
* tests/test_iterator.c (main): |
| 492 |
* tests/test_nonalpha.c (main): |
| 493 |
* tests/test_null_trie.c (main): |
| 494 |
* tests/test_store-retrieve.c (main): |
| 495 |
* tests/test_term_state.c (main): |
| 496 |
* tests/test_walk.c (main): |
| 497 |
- Declare main function with 'main (void)'. |
| 498 |
Fixing warning from '-Wstrict-prototypes' gcc option. |
| 499 |
* tests/test_walk.c (main): |
| 500 |
- Split long string, which required C90 compilers. |
| 501 |
Fixing warning from '-Woverlength-strings' gcc option. |
| 502 |
|
| 503 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 504 |
|
| 505 |
Duplicate TrieChar string in more portable manner |
| 506 |
|
| 507 |
* datrie/tail.c (tail_set_suffix, +tc_strdup, +tc_strlen): |
| 508 |
- Replace cast strdup() with crafted implementation, |
| 509 |
allowing TrieChar to be of larger size than char. |
| 510 |
Fixing warning from '-Wint-to-pointer-cast' gcc option. |
| 511 |
|
| 512 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 513 |
|
| 514 |
Split long string |
| 515 |
|
| 516 |
* tools/trietool.c (usage): |
| 517 |
- Split help message which was too long and required C90 compiler. |
| 518 |
Caught by '-Woverlength-strings' gcc option. |
| 519 |
|
| 520 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 521 |
|
| 522 |
Remove unused byte, word, dword typedefs |
| 523 |
|
| 524 |
These are likely to conflict with other uses. |
| 525 |
|
| 526 |
* datrie/typedefs.h (-byte, -word, -dword): |
| 527 |
- Remove the unused typedefs |
| 528 |
|
| 529 |
Thanks Peter Moulder for the patch. |
| 530 |
|
| 531 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 532 |
|
| 533 |
Rename TRUE/FALSE in Bool enum to avoid clash |
| 534 |
|
| 535 |
Some other header file may have already define TRUE/FALSE. |
| 536 |
|
| 537 |
* datrie/typedefs.h (Bool): |
| 538 |
- Rename FALSE, TRUE to DA_FALSE, DA_TRUE respectively, |
| 539 |
and define FALSE, TRUE macros only if they haven't been defined. |
| 540 |
|
| 541 |
Thanks Peter Moulder for the patch. |
| 542 |
|
| 543 |
2018-06-04 Theppitak Karoonboonyanan <[email protected]> |
| 544 |
|
| 545 |
Declare argument-less functions with "(void)" |
| 546 |
|
| 547 |
"f()" declaration form is K&R style, specifying that no information |
| 548 |
about the number or types of parameters is supplied. This caused |
| 549 |
warnings on '-Wstrict-prototypes' gcc option. |
| 550 |
|
| 551 |
* datrie/alpha-map.h, datrie/alpha-map.c (alpha_map_new): |
| 552 |
* datrie/darray.h, datrie/darray.c (da_new, symbols_new): |
| 553 |
* datrie/tail.h, datrie/tail.c (tail_new): |
| 554 |
* tests/utils.h, tests/utils.c (en_alpha_map_new, en_trie_new): |
| 555 |
- Use "(void)" form in declaration |
| 556 |
- Also use "(void)" form in definition, for consistency |
| 557 |
|
| 558 |
Thanks Peter Moulder for the initial patch. |
| 559 |
|
| 560 |
2018-05-24 Theppitak Karoonboonyanan <[email protected]> |
| 561 |
|
| 562 |
Remove duplicate include |
| 563 |
|
| 564 |
* tools/trietool.c: |
| 565 |
- Remove duplicate include <config.h> |
| 566 |
|
| 567 |
2018-04-23 Theppitak Karoonboonyanan <[email protected]> |
| 568 |
|
| 569 |
Add missing include in test |
| 570 |
|
| 571 |
* tests/test_byte_alpha.c: |
| 572 |
- Add missing include for utils.h |
| 573 |
|
| 574 |
2018-04-23 Theppitak Karoonboonyanan <[email protected]> |
| 575 |
|
| 576 |
* configure.ac: |
| 577 |
- Bump library revision to reflect code changes. |
| 578 |
|
| 579 |
* NEWS: |
| 580 |
=== Version 0.2.11 === |
| 581 |
|
| 582 |
2018-04-21 Theppitak Karoonboonyanan <[email protected]> |
| 583 |
|
| 584 |
Fix reported segfault on full-range alpha map |
| 585 |
|
| 586 |
* tests/Makefile.am, +tests/test_byte_alpha.c: |
| 587 |
- Add test case |
| 588 |
* datrie/alpha-map.c (alpha_map_recalc_work_area()): |
| 589 |
- Redeclare trie_last as TrieIndex, to prevent overflow. |
| 590 |
|
| 591 |
Thanks Xiao Wang for the report, and @nevermatch for the analysis. |
| 592 |
|
| 593 |
Closes: #6 |
| 594 |
https://github.com/tlwg/libdatrie/issues/6 |
| 595 |
|
| 596 |
2018-03-29 Theppitak Karoonboonyanan <[email protected]> |
| 597 |
|
| 598 |
Fix trie_state_get_data() at a prefix key |
| 599 |
|
| 600 |
When getting data from a state which terminates a key that is |
| 601 |
a prefix of another key, a terminator should be tried, so it |
| 602 |
jumps from DA to TAIL, where we can get the data. |
| 603 |
|
| 604 |
* tests/Makefile.am, +tests/test_term_state.c: |
| 605 |
- Add a test case with {'ab', 'abc'} dictionary, which fails previous |
| 606 |
code when retrieving data for key 'ab'. |
| 607 |
* datrie/trie.c (trie_state_get_data()): |
| 608 |
- Instead of simply checking for leaf state, which only caught a state |
| 609 |
in TAIL, also try walking with a terminator when still in DA. |
| 610 |
- Replace 'leaf state' with 'terminal state' in documentation, |
| 611 |
for more clarity. |
| 612 |
- Also return error on null state pointer. |
| 613 |
|
| 614 |
Thanks Filip Pytloun from the pytries project for the initial patch. |
| 615 |
|
| 616 |
2017-09-06 Theppitak Karoonboonyanan <[email protected]> |
| 617 |
|
| 618 |
Revise description about search time complexity |
| 619 |
|
| 620 |
* README: |
| 621 |
- Clarify that search time is O(m), where m is the key length, |
| 622 |
instead of O(1), while still claim that it's independent of |
| 623 |
database size. |
| 624 |
|
| 625 |
This closes #4. |
| 626 |
https://github.com/tlwg/libdatrie/issues/4 |
| 627 |
|
| 628 |
2016-12-14 Theppitak Karoonboonyanan <[email protected]> |
| 629 |
|
| 630 |
Include git-version-gen in tarball |
| 631 |
|
| 632 |
* Makefile.am: |
| 633 |
- Add build-aux/git-version-gen to EXTRA_DIST. |
| 634 |
|
| 635 |
2016-09-21 Theppitak Karoonboonyanan <[email protected]> |
| 636 |
|
| 637 |
Fix iconv() return value checking. |
| 638 |
|
| 639 |
* tools/trietool.c (conv_to_alpha): |
| 640 |
- Check iconv() return value against (size_t) -1, rather than |
| 641 |
for its negativity, as size_t can be unsigned. |
| 642 |
|
| 643 |
Thanks Daniel Macks for the report on Issue #3. |
| 644 |
https://github.com/tlwg/libdatrie/issues/3 |
| 645 |
|
| 646 |
2016-09-21 Theppitak Karoonboonyanan <[email protected]> |
| 647 |
|
| 648 |
Use versioning based on Git snapshot. |
| 649 |
|
| 650 |
* Makefile.am: |
| 651 |
- Add dist-hook to generate VERSION file on tarball generation. |
| 652 |
* +build-aux/git-version-gen: |
| 653 |
- Add script to generate version based on 'git describe' |
| 654 |
if in git tree, or using VERSION file if in release tarball. |
| 655 |
* configure.ac: |
| 656 |
- Call git-version-gen to get package version. |
| 657 |
|
| 658 |
2015-10-20 Theppitak Karoonboonyanan <[email protected]> |
| 659 |
|
| 660 |
* configure.ac: |
| 661 |
- Bump library revision to reflect code changes. |
| 662 |
|
| 663 |
* NEWS, configure.ac: |
| 664 |
=== Version 0.2.10 === |
| 665 |
|
| 666 |
2015-10-13 Theppitak Karoonboonyanan <[email protected]> |
| 667 |
|
| 668 |
Optimize AlphaMap mapping. |
| 669 |
|
| 670 |
alpha_map_char_to_trie() is called everywhere before trie state |
| 671 |
transition. It's an important bottleneck. |
| 672 |
|
| 673 |
We won't change the persistent AlphaMap structure, but will add |
| 674 |
pre-calculated lookup tables for use at run-time. |
| 675 |
|
| 676 |
* datrie/alpha-map.c (struct _AlphaMap): |
| 677 |
- Add members for alpha-to-trie and trie-to-alpha lookup tables. |
| 678 |
* datrie/alpha-map.c (alpha_map_new, alpha_map_free): |
| 679 |
- Initialize & free the tables properly. |
| 680 |
* datrie/alpha-map.c (alpha_map_add_range -> alpha_map_add_range_only |
| 681 |
+ alpha_map_recalc_work_area): |
| 682 |
- Split alpha_map_add_range() API into two parts: adding the range |
| 683 |
as usual and recalculate the lookup tables. |
| 684 |
* datrie/alpha-map.c (alpha_map_clone, alpha_map_fread_bin): |
| 685 |
- Call alpha_map_add_range_only() repeatedly before calling |
| 686 |
alpha_map_recalc_work_area() once. |
| 687 |
* datrie/alpha-map.c (alpha_map_char_to_trie, alpha_map_trie_to_char): |
| 688 |
- Look up the pre-calculated tables instead of calculating on |
| 689 |
every call. |
| 690 |
|
| 691 |
This appears to save time by 14.6% for total alpha_char_to_trie() |
| 692 |
calls and even lower its bottleneck rank by 1 rank on a libthai |
| 693 |
test case. It reduces 0.2% run time of the total libthai test case. |
| 694 |
|
| 695 |
Note that the time saved would be even more in case of multiple |
| 696 |
uncontinuous alphabet ranges, at the expense of more memory used. |
| 697 |
|
| 698 |
2015-08-18 Theppitak Karoonboonyanan <[email protected]> |
| 699 |
|
| 700 |
Fix doxygen version checking. |
| 701 |
|
| 702 |
* configure.ac: |
| 703 |
- Correctly compare doxygen versions. Simple expr comparison |
| 704 |
didn't work with version 1.8.10. |
| 705 |
|
| 706 |
Thanks Petr Gajdos <[email protected]> for the patch. |
| 707 |
|
| 708 |
2015-06-24 Theppitak Karoonboonyanan <[email protected]> |
| 709 |
|
| 710 |
* datrie/tail.c (tail_set_suffix): |
| 711 |
- Catch strdup() failure. |
| 712 |
|
| 713 |
2015-06-24 Theppitak Karoonboonyanan <[email protected]> |
| 714 |
|
| 715 |
* configure.ac: Post-release version suffix added. |
| 716 |
|
| 717 |
2015-05-03 Theppitak Karoonboonyanan <[email protected]> |
| 718 |
|
| 719 |
* NEWS, configure.ac: |
| 720 |
=== Version 0.2.9 === |
| 721 |
|
| 722 |
2015-05-03 Theppitak Karoonboonyanan <[email protected]> |
| 723 |
|
| 724 |
Use relative paths for symlinks. |
| 725 |
|
| 726 |
* tools/Makefile.am, man/Makefile.am: |
| 727 |
- Use relative paths for symlinks to avoid confusion in |
| 728 |
installation with DESTDIR. |
| 729 |
|
| 730 |
2015-05-03 Theppitak Karoonboonyanan <[email protected]> |
| 731 |
|
| 732 |
Also install symlink for old trietool. |
| 733 |
|
| 734 |
* man/Makefile.am: |
| 735 |
- Add hooks to install/uninstall symlink for old man page. |
| 736 |
|
| 737 |
2015-05-02 Theppitak Karoonboonyanan <[email protected]> |
| 738 |
|
| 739 |
* configure.ac: |
| 740 |
- Bump library revision to reflect code changes. |
| 741 |
|
| 742 |
2015-04-29 Theppitak Karoonboonyanan <[email protected]> |
| 743 |
|
| 744 |
Bump doxygen required version. |
| 745 |
|
| 746 |
* configure.ac: |
| 747 |
- Bump doxygen required version to 1.8.8, according to recent |
| 748 |
Doxyfile update. |
| 749 |
|
| 750 |
2015-04-21 Theppitak Karoonboonyanan <[email protected]> |
| 751 |
|
| 752 |
Fix infinite loop on empty trie iteration. |
| 753 |
|
| 754 |
* tests/Makefile.am, +tests/test_null_trie.c: |
| 755 |
- Add test case for empty trie iteration. |
| 756 |
|
| 757 |
* datrie/darray.c (da_first_separate): |
| 758 |
- Fix error condition after loop ending. |
| 759 |
|
| 760 |
Thanks Sergei Lebedev <[email protected]> for the report |
| 761 |
via personal mail. |
| 762 |
|
| 763 |
Original report: https://github.com/kmike/datrie/issues/17 |
| 764 |
|
| 765 |
2015-04-12 Theppitak Karoonboonyanan <[email protected]> |
| 766 |
|
| 767 |
Document about alphabet size. |
| 768 |
|
| 769 |
* datrie/trie.h: |
| 770 |
- Add to doc comment a description on the alphabet size limit |
| 771 |
and the mapped raw codes. |
| 772 |
|
| 773 |
Thanks edgehogapp for the suggestion. |
| 774 |
https://groups.google.com/forum/#!topic/thai-linux-foss-devel/U-O__IfviQ0 |
| 775 |
|
| 776 |
2015-04-11 Theppitak Karoonboonyanan <[email protected]> |
| 777 |
|
| 778 |
Clarify Symbols' struct & methods. |
| 779 |
|
| 780 |
* datrie/darray.c (struct _Symbols): |
| 781 |
- Use TRIE_CHAR_MAX + 1 instead of hard-coded value for symbols[] |
| 782 |
array size. |
| 783 |
|
| 784 |
Thanks edgehogapp for the suggestion. |
| 785 |
https://groups.google.com/forum/#!topic/thai-linux-foss-devel/U-O__IfviQ0 |
| 786 |
|
| 787 |
* datrie/darray.h, datrie/darray.c (symbols_new, symbols_add): |
| 788 |
- Hide symbols_new() and symbols_add() for internal use. |
| 789 |
|
| 790 |
2015-03-06 Theppitak Karoonboonyanan <[email protected]> |
| 791 |
|
| 792 |
Update Doxyfile. |
| 793 |
|
| 794 |
* doc/Doxyfile.in: |
| 795 |
- Updated for doxygen 1.8.8 with 'doxygen -u'. |
| 796 |
|
| 797 |
2015-03-02 Theppitak Karoonboonyanan <[email protected]> |
| 798 |
|
| 799 |
Catch realloc failure. |
| 800 |
|
| 801 |
* datrie/tail.c (tail_alloc_block): |
| 802 |
- Check realloc() result on t->tails reallocation and return |
| 803 |
failure code if failed. |
| 804 |
* datrie/tail.c (tail_add_suffix): |
| 805 |
- Check return value from tail_alloc_block() and return failure |
| 806 |
code if failed. |
| 807 |
- Update documentation. |
| 808 |
|
| 809 |
2015-03-02 Theppitak Karoonboonyanan <[email protected]> |
| 810 |
|
| 811 |
Catch realloc failure. |
| 812 |
|
| 813 |
* datrie/darray.c (da_extend_pool): |
| 814 |
- Check realloc() result on d->cells reallocation and handle |
| 815 |
failure properly. |
| 816 |
|
| 817 |
2015-02-27 Theppitak Karoonboonyanan <[email protected]> |
| 818 |
|
| 819 |
Catch malloc failure. |
| 820 |
|
| 821 |
* datrie/tail.c (tail_fread): |
| 822 |
- Check malloc() result on suffix string and exit properly. |
| 823 |
|
| 824 |
2015-02-26 Theppitak Karoonboonyanan <[email protected]> |
| 825 |
|
| 826 |
More micro-optimization with LIKELY/UNLIKELY. |
| 827 |
|
| 828 |
* datrie/alpha-map.c (alpha_map_char_to_trie, alpha_map_trie_to_char): |
| 829 |
- Use UNLIKELY() when checking for NUL character. |
| 830 |
|
| 831 |
2015-02-10 Theppitak Karoonboonyanan <[email protected]> |
| 832 |
|
| 833 |
Fix 'make distcheck' failure. |
| 834 |
|
| 835 |
* doc/Makefile.am: |
| 836 |
- Remove doxygen db file on clean. |
| 837 |
|
| 838 |
2015-02-10 Theppitak Karoonboonyanan <[email protected]> |
| 839 |
|
| 840 |
More update of my e-mail address. |
| 841 |
|
| 842 |
* man/trietool.1: |
| 843 |
- Update my e-mail address. |
| 844 |
|
| 845 |
2015-02-10 Theppitak Karoonboonyanan <[email protected]> |
| 846 |
|
| 847 |
Rename trietool-0.2 utility to trietool. |
| 848 |
|
| 849 |
* configure.ac: |
| 850 |
- Check for ln -s |
| 851 |
* tools/Makefile.am: |
| 852 |
- Rename bin target from trietool-0.2 to trietool. |
| 853 |
- Add hooks to install/uninstall symlink with old name. |
| 854 |
* man/Makefile.am, man/trietool-0.2.1 -> man/trietool.1: |
| 855 |
- Rename & update manpage accordingly. |
| 856 |
|
| 857 |
2015-02-06 Theppitak Karoonboonyanan <[email protected]> |
| 858 |
|
| 859 |
Micro-optimize with likely/unlikely hints. |
| 860 |
|
| 861 |
* datrie/trie-private.h: |
| 862 |
- Add LIKELY() and UNLIKELY() macros based on compiler extension. |
| 863 |
* datrie/alpha-map.c |
| 864 |
(alpha_map_new, alpha_map_clone, alpha_map_fread_bin, |
| 865 |
alpha_map_add_range, alpha_map_char_to_trie_str, |
| 866 |
alpha_map_trie_to_char_str): |
| 867 |
* datrie/darray.c |
| 868 |
(symbols_new, da_new, da_fread, da_get_base, da_get_check, |
| 869 |
da_set_base, da_set_check, da_insert_branch, da_find_free_base, |
| 870 |
da_extend_pool): |
| 871 |
* datrie/dstring.c (dstring_new, dstring_ensure_space): |
| 872 |
* datrie/tail.c |
| 873 |
(tail_new, tail_fread, tail_get_suffix, tail_set_suffix, |
| 874 |
tail_get_data, tail_set_data, tail_walk_str, tail_walk_char): |
| 875 |
* datrie/trie.c |
| 876 |
(trie_new, trie_fread, trie_enumerate, trie_state_new, |
| 877 |
trie_state_walk, trie_state_is_walkable, trie_iterator_new): |
| 878 |
- Use LIKELY() and UNLIKELY() where it is known to be so, mostly |
| 879 |
for one-time initialization and failure handling. |
| 880 |
* datrie/alpha-map.c, datrie/tail.c, datrie/tail.c: |
| 881 |
- These are the files that need to include trie-private.h |
| 882 |
because of this. |
| 883 |
|
| 884 |
Callgrind says it does help speed up a little bit. |
| 885 |
|
| 886 |
2015-02-05 Theppitak Karoonboonyanan <[email protected]> |
| 887 |
|
| 888 |
Disable timestamp in Doxygen-generated doc. |
| 889 |
|
| 890 |
* doc/Doxyfile.in: |
| 891 |
- Set HTML_TIMESTAMP to NO to make the document reproducible. |
| 892 |
(reported by Debian Reproducible) |
| 893 |
|
| 894 |
2015-02-01 Theppitak Karoonboonyanan <[email protected]> |
| 895 |
|
| 896 |
* configure.ac: [Belated] post-release version suffix added. |
| 897 |
|
| 898 |
2015-02-01 Theppitak Karoonboonyanan <[email protected]> |
| 899 |
|
| 900 |
Update my e-mail address everywhere. |
| 901 |
|
| 902 |
* AUTHORS, configure.ac, datrie/*.[ch], tests/*.[ch], |
| 903 |
tools/trietool.c: |
| 904 |
- Replace all mentionings of my e-mail address with the gmail one. |
| 905 |
|
| 906 |
2015-02-01 Theppitak Karoonboonyanan <[email protected]> |
| 907 |
|
| 908 |
Fix binary file opening on Windows. |
| 909 |
|
| 910 |
* datrie/trie.c (trie_new_from_file, trie_save): |
| 911 |
- Add "b" to fopen() modes, so the binary file is opened properly |
| 912 |
on Windows. |
| 913 |
|
| 914 |
Thanks phongphan.p for the report and initial patch. |
| 915 |
|
| 916 |
2014-01-10 Theppitak Karoonboonyanan <[email protected]> |
| 917 |
|
| 918 |
* configure.ac: |
| 919 |
- Bump library revision to reflect code changes. |
| 920 |
|
| 921 |
* NEWS, configure.ac: |
| 922 |
=== Version 0.2.8 === |
| 923 |
|
| 924 |
2014-01-09 Theppitak Karoonboonyanan <[email protected]> |
| 925 |
|
| 926 |
Improve documentation. |
| 927 |
|
| 928 |
* datrie/triedefs.h: |
| 929 |
- Refine descriptions of data types. |
| 930 |
* datrie/trie.c (trie_iterator_new): |
| 931 |
- Fix typo on trie_root() mentioning. |
| 932 |
* datrie/trie.c (trie_store, trie_store_if_absent): |
| 933 |
- Adjust wording. |
| 934 |
* datrie/alpha-map.h, datrie/trie.h: |
| 935 |
- Add detailed description of AlphaMap and Trie types. |
| 936 |
|
| 937 |
2014-01-08 Theppitak Karoonboonyanan <[email protected]> |
| 938 |
|
| 939 |
Clarify message in test_nonalpha. |
| 940 |
|
| 941 |
* tests/test_nonalpha.c (main): |
| 942 |
- Clarify message on false key duplication. |
| 943 |
|
| 944 |
2014-01-08 Theppitak Karoonboonyanan <[email protected]> |
| 945 |
|
| 946 |
Add test on keys with non-alphabet input chars. |
| 947 |
|
| 948 |
* tests/Makefile.am, +tests/test_nonalpha.c: |
| 949 |
- Add test to ensure that operations on keys with non-alphabet |
| 950 |
input chars fail. |
| 951 |
|
| 952 |
2014-01-08 Theppitak Karoonboonyanan <[email protected]> |
| 953 |
|
| 954 |
Fail trie operations on non-alphabet inputs. |
| 955 |
|
| 956 |
alpha_map_char_to_trie() tried to return TRIE_CHAR_MAX to indicate |
| 957 |
out-of-range error. But this value is indeed valid in trie operations. |
| 958 |
Doing so could allow false key duplication when different non-alphabet |
| 959 |
chars and TRIE_CHAR_MAX itself were all mapped to TRIE_CHAR_MAX. |
| 960 |
So, let's fail all trie operations on non-alphabet input chars. |
| 961 |
|
| 962 |
* datrie/alpha-map-private.h, datrie/alpha-map.c |
| 963 |
(alpha_map_char_to_trie): |
| 964 |
- Make alpha_map_char_to_trie return TrieIndex type, using |
| 965 |
TRIE_INDEX_MAX to indicate out-of-range error. |
| 966 |
This allows TRIE_CHAR_MAX to be returned as a valid output. |
| 967 |
* datrie/alpha-map.c (alpha_map_char_to_trie_str): |
| 968 |
- Fail if alpha_map_char_to_trie() returns error code. |
| 969 |
* datrie/trie.c (trie_retrieve, trie_store_conditionally, trie_delete, |
| 970 |
trie_state_walk, trie_state_is_walkable): |
| 971 |
- Check return value from alpha_map_char_to_trie() and return |
| 972 |
failure status on error. |
| 973 |
- Also cast TrieIndex return values to TrieChar on function calls. |
| 974 |
|
| 975 |
Thanks Naoki Youshinaga for the suggestion. |
| 976 |
|
| 977 |
2014-01-07 Theppitak Karoonboonyanan <[email protected]> |
| 978 |
|
| 979 |
Check for NULL result from AlphaMap string funcs. |
| 980 |
|
| 981 |
* datrie/trie.c (trie_store_conditionally): |
| 982 |
- Return failure on NULL alpha_map_char_to_trie_str(). |
| 983 |
|
| 984 |
2014-01-07 Theppitak Karoonboonyanan <[email protected]> |
| 985 |
|
| 986 |
Return NULL on allocation errors in AlphaMap funcs. |
| 987 |
|
| 988 |
* datrie/alpha-map.c |
| 989 |
(alpha_map_char_to_trie_str, alpha_map_trie_to_char_str): |
| 990 |
- Return NULL on malloc() error. |
| 991 |
|
| 992 |
2014-01-03 Theppitak Karoonboonyanan <[email protected]> |
| 993 |
|
| 994 |
Fix edge case with TRIE_CHAR_MAX as TrieChar. |
| 995 |
|
| 996 |
The trie input char with value TRIE_CHAR_MAX (255), was always |
| 997 |
skipped by double-array algorithms. Let's include it. |
| 998 |
|
| 999 |
* datrie/darray.c (da_has_children, da_output_symbols, |
| 1000 |
da_relocate_base, da_first_separate, da_next_separate): |
| 1001 |
- Include the last char in trie char iterations. |
| 1002 |
|
| 1003 |
* datrie/darray.c (da_first_separate, da_next_separate): |
| 1004 |
- Declare characters as TrieIndex type instead of TrieChar, |
| 1005 |
to prevent infinite loop due to unsigned char overflow. |
| 1006 |
|
| 1007 |
Thanks Naoki Youshinaga for the report, test case, and analysis. |
| 1008 |
|
| 1009 |
2013-10-25 Theppitak Karoonboonyanan <[email protected]> |
| 1010 |
|
| 1011 |
Fix comiler warnings in tests. |
| 1012 |
|
| 1013 |
* tests/test_walk.c (main): |
| 1014 |
- Remove unused var i; |
| 1015 |
- Remove extra printf() args. |
| 1016 |
* tests/test_iterator.c: |
| 1017 |
- Add missing #include for free(). |
| 1018 |
* tests/test_walk.c (walk_dict), tests/utils.c (dict_src): |
| 1019 |
- Cast string literals to (AlphaChar *) to fix signedness |
| 1020 |
differences. |
| 1021 |
|
| 1022 |
2013-10-25 Theppitak Karoonboonyanan <[email protected]> |
| 1023 |
|
| 1024 |
* configure.ac: Post-release version suffix added. |
| 1025 |
|
| 1026 |
2013-10-22 Theppitak Karoonboonyanan <[email protected]> |
| 1027 |
|
| 1028 |
* NEWS, configure.ac: |
| 1029 |
=== Version 0.2.7.1 === |
| 1030 |
|
| 1031 |
2013-10-21 Theppitak Karoonboonyanan <[email protected]> |
| 1032 |
|
| 1033 |
* configure.ac: Bump library versioning to reflect API addition. |
| 1034 |
(Change missing in previous release) |
| 1035 |
|
| 1036 |
2013-10-21 Theppitak Karoonboonyanan <[email protected]> |
| 1037 |
|
| 1038 |
* configure.ac: Post-release version suffix added. |
| 1039 |
|
| 1040 |
2013-10-21 Theppitak Karoonboonyanan <[email protected]> |
| 1041 |
|
| 1042 |
* NEWS, configure.ac: |
| 1043 |
=== Version 0.2.7 === |
| 1044 |
|
| 1045 |
2013-10-21 Theppitak Karoonboonyanan <[email protected]> |
| 1046 |
|
| 1047 |
Add missing distributed file. |
| 1048 |
|
| 1049 |
* tests/Makefile.am: |
| 1050 |
- Add utils.h to distribution. |
| 1051 |
|
| 1052 |
2013-10-20 Theppitak Karoonboonyanan <[email protected]> |
| 1053 |
|
| 1054 |
Reorder tests from primitive to applied. |
| 1055 |
|
| 1056 |
* tests/Makefile.am: |
| 1057 |
- Test walk & iterator before store-retrieve & file. |
| 1058 |
|
| 1059 |
2013-10-20 Theppitak Karoonboonyanan <[email protected]> |
| 1060 |
|
| 1061 |
Write a test suite for trie walk. |
| 1062 |
|
| 1063 |
* tests/test_walk.c: |
| 1064 |
- Write test code. |
| 1065 |
|
| 1066 |
2013-10-18 Theppitak Karoonboonyanan <[email protected]> |
| 1067 |
|
| 1068 |
Write a test suite for trie store/retrieval. |
| 1069 |
|
| 1070 |
* tests/utils.h, tests/utils.c (+dict_src_n_entries): |
| 1071 |
- Add function to get total entries in dict_src[]. |
| 1072 |
* tests/test_store-retrieve.c (main): |
| 1073 |
- Write test code. |
| 1074 |
|
| 1075 |
2013-10-18 Theppitak Karoonboonyanan <[email protected]> |
| 1076 |
|
| 1077 |
Fix messages in test_iterator. |
| 1078 |
|
| 1079 |
* tests/test_iterator.c (main): |
| 1080 |
- s/file/trie/. No file is written or read in this test. |
| 1081 |
|
| 1082 |
2013-10-18 Theppitak Karoonboonyanan <[email protected]> |
| 1083 |
|
| 1084 |
Skip further iteration tests if key is NULL. |
| 1085 |
|
| 1086 |
* tests/test_iterator.c (main): |
| 1087 |
- Insert 'continue' if trie_iterator_get_key() returns NULL. |
| 1088 |
|
| 1089 |
2013-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 1090 |
|
| 1091 |
Document availibility of alpha_char_strcmp() |
| 1092 |
|
| 1093 |
* datrie/alpha-map.c (alpha_char_strcmp): |
| 1094 |
- Document that it's available since 0.2.7. |
| 1095 |
|
| 1096 |
2013-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 1097 |
|
| 1098 |
Write a test for trie iterator. |
| 1099 |
|
| 1100 |
* tests/test_iterator.c: |
| 1101 |
- Write test suite for trie iterator. |
| 1102 |
|
| 1103 |
2013-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 1104 |
|
| 1105 |
Add skeleton test suites & a test for file I/O. |
| 1106 |
|
| 1107 |
* configure.ac, Makefile.am, +tests/, +tests/Makefile.am: |
| 1108 |
- Add tests/ dir to the build system. |
| 1109 |
* +tests/utils.h, +tests/utils.c: |
| 1110 |
* +tests/test_file.c: |
| 1111 |
* +tests/test_iterator.c: |
| 1112 |
* +tests/test_store-retrieve.c: |
| 1113 |
* +tests/test_walk.c: |
| 1114 |
- Add skeleton for test suites. |
| 1115 |
* tests/utils.h, tests/utils.c, tests/test_file.c: |
| 1116 |
- Write test suite for file I/O. |
| 1117 |
|
| 1118 |
2013-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 1119 |
|
| 1120 |
Add alpha_char_strcmp() API. |
| 1121 |
|
| 1122 |
* datrie/alpha-map.h, datrie/alpha-map.c (+alpha_char_strcmp): |
| 1123 |
- Add alpha_char_strcmp() declaration & body. |
| 1124 |
* datrie/libdatrie.def, datrie/libdatrie.map: |
| 1125 |
- Add alpha_char_strcmp symbols. |
| 1126 |
|
| 1127 |
2013-10-16 Theppitak Karoonboonyanan <[email protected]> |
| 1128 |
|
| 1129 |
Add missing info in alpha_map_add_range() doc. |
| 1130 |
|
| 1131 |
* datrie/alpha-map.c (alpha_map_add_range): |
| 1132 |
- Add documentation on return value. |
| 1133 |
|
| 1134 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1135 |
|
| 1136 |
Fix build for Visual Studio on Windows. |
| 1137 |
|
| 1138 |
* datrie/dstring.c (dstring_append, dstring_append_string, |
| 1139 |
dstring_append_char, dstring_terminate): |
| 1140 |
- Cast (void *) pointers to (char *) before calculating offsets, |
| 1141 |
for portability. |
| 1142 |
|
| 1143 |
Thanks Gabi Davar for the report and fix (via Mikhail Korobov |
| 1144 |
<[email protected]>). |
| 1145 |
|
| 1146 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1147 |
|
| 1148 |
Check for doxygen required version. |
| 1149 |
|
| 1150 |
* configure.ac: |
| 1151 |
- When doxygen-doc is enabled, also check doxygen version. |
| 1152 |
|
| 1153 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1154 |
|
| 1155 |
Fix doxygen warning. |
| 1156 |
|
| 1157 |
* doc/Doxyfile.in: |
| 1158 |
- doxygen no longer ships with the FreeSans font. Just drop it. |
| 1159 |
|
| 1160 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1161 |
|
| 1162 |
Update Doxyfile. |
| 1163 |
|
| 1164 |
* doc/Doxyfile.in: |
| 1165 |
- Updated with 'doxygen -u'. |
| 1166 |
|
| 1167 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1168 |
|
| 1169 |
Fix compiler warnings. |
| 1170 |
* datrie/trie-string.c (trie_string_append_string): |
| 1171 |
* datrie/trie.c (trie_iterator_get_key): |
| 1172 |
- Cast strlen() args from (const TrieChar *) to (const char *), |
| 1173 |
to fix signedness mismatch warnings. |
| 1174 |
|
| 1175 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1176 |
|
| 1177 |
Fix automake warnings. |
| 1178 |
|
| 1179 |
* datrie/Makefile.am, tools/Makefile.am: |
| 1180 |
- Replace deprecated INCLUDES with AM_CPPFLAGS. |
| 1181 |
|
| 1182 |
2013-09-23 Theppitak Karoonboonyanan <[email protected]> |
| 1183 |
|
| 1184 |
* configure.ac: Post-release version suffix added. |
| 1185 |
|
| 1186 |
2013-01-23 Theppitak Karoonboonyanan <[email protected]> |
| 1187 |
|
| 1188 |
* NEWS, configure.ac: |
| 1189 |
=== Version 0.2.6 === |
| 1190 |
|
| 1191 |
2013-01-22 Theppitak Karoonboonyanan <[email protected]> |
| 1192 |
|
| 1193 |
Use xz compression for release tarball. |
| 1194 |
|
| 1195 |
* configure.ac: |
| 1196 |
- Specify "dist-xz no-dist-gzip" options to AM_INIT_AUTOMAKE. |
| 1197 |
|
| 1198 |
2012-08-06 Theppitak Karoonboonyanan <[email protected]> |
| 1199 |
|
| 1200 |
Improve AlphaMap range merging. |
| 1201 |
|
| 1202 |
* datrie/alpha-map.c (alpha_map_add_range): |
| 1203 |
- Also try to merge adjacent ranges. Otherwise, adding one by one |
| 1204 |
character will result in linear search on alphabet set. |
| 1205 |
|
| 1206 |
Thanks Mikhail Korobov <[email protected]> for the report. |
| 1207 |
|
| 1208 |
2012-08-05 Theppitak Karoonboonyanan <[email protected]> |
| 1209 |
|
| 1210 |
Migrate trie_enumerate() to the new TrieIterator. |
| 1211 |
|
| 1212 |
This improves performance by 10%, and recursion stacks are also |
| 1213 |
eliminated. |
| 1214 |
|
| 1215 |
* datrie/trie.c (trie_enumerate): |
| 1216 |
- Replace da_enumerate() call with TrieIterator loop. |
| 1217 |
* datrie/trie.c (-trie_da_enum_func, -_TrieEnumData): |
| 1218 |
* datrie/darray.h, datrie/darray.c |
| 1219 |
(-da_enumerate, -da_get_transition_key, -DAEnumFunc, |
| 1220 |
-da_enumerate_recursive): |
| 1221 |
- Drop now-unused codes. |
| 1222 |
|
| 1223 |
2012-08-05 Theppitak Karoonboonyanan <[email protected]> |
| 1224 |
|
| 1225 |
Optimize key calculation for TrieIterator. |
| 1226 |
|
| 1227 |
* datrie/Makefile.am +datrie/dstring.h +datrie/dstring-private.h |
| 1228 |
+datrie/dstring.c +datrie/trie-string.h +datrie/trie-string.c: |
| 1229 |
- Add dynamic string classes DString and TrieString. |
| 1230 |
* datrie/trie.c: |
| 1231 |
- (TrieIterator): Add "key" dynamic trie string member for |
| 1232 |
incrementally gathering the key while iterating. |
| 1233 |
- Initialize "key" member to NULL on construction. Only allocate and |
| 1234 |
free it on branching root states. |
| 1235 |
* datrie/darray.h, datrie/darray.c |
| 1236 |
(da_first_separate, da_next_separate): |
| 1237 |
- Instead of allocating memory for return string, accept a dynamic |
| 1238 |
string object and update it while traversing. |
| 1239 |
* datrie/trie.c (trie_iterator_next): |
| 1240 |
- For branching state, create the "key" dynamic string object on |
| 1241 |
first iteration and pass it to da_first_separate() and |
| 1242 |
da_next_separate() along the iterations. |
| 1243 |
* datrie/trie.c (trie_iterator_get_key): |
| 1244 |
- Replace the total key reconstruction by da_get_transition_key() |
| 1245 |
with simple string catenation of the dynamic "key" and the suffix |
| 1246 |
string. |
| 1247 |
* datrie/darray.h, datrie/darray.c (da_get_transition_key): |
| 1248 |
- Adjust to use dynamic string instead of total allocation. |
| 1249 |
* datrie/darray.c (da_enumerate_recursive): |
| 1250 |
- Adjust the da_get_transition_key() call accordingly. |
| 1251 |
|
| 1252 |
Thanks Mikhail Korobov <[email protected]> for the suggested approach |
| 1253 |
and for profiling check. |
| 1254 |
|
| 1255 |
2012-07-31 Theppitak Karoonboonyanan <[email protected]> |
| 1256 |
|
| 1257 |
Add TrieIterator and its operations. |
| 1258 |
|
| 1259 |
* datrie/trie.h, datrie/trie.c |
| 1260 |
(+trie_iterator_new, +trie_iterator_free, +trie_iterator_next, |
| 1261 |
+trie_iterator_get_key, +trie_iterator_get_data): |
| 1262 |
- Add TrieIterator class and its methods. |
| 1263 |
* datrie/libdatrie.def, datrie/libdatrie.map: |
| 1264 |
- Add the new export symbols. |
| 1265 |
* datrie/darray.h, datrie/darray.c |
| 1266 |
(da_get_state_key -> da_get_transition_key): |
| 1267 |
- Adjust da_get_state_key() from getting transition key from root |
| 1268 |
to getting from arbitrary ancestor. |
| 1269 |
* datrie/darray.h, datrie/darray.c |
| 1270 |
(+da_first_separate, +da_next_separate): |
| 1271 |
- Add internal functions for iterating from one separate node to |
| 1272 |
another in double-array structure. |
| 1273 |
|
| 1274 |
Thanks Mikhail Korobov <[email protected]> for the use case suggestion. |
| 1275 |
|
| 1276 |
2012-07-30 Theppitak Karoonboonyanan <[email protected]> |
| 1277 |
|
| 1278 |
* doc/Doxyfile.in: Upgrade to doxygen 1.8.1.2 format. |
| 1279 |
|
| 1280 |
2012-07-29 Theppitak Karoonboonyanan <[email protected]> |
| 1281 |
|
| 1282 |
* datrie/trie.c: Reformat source. |
| 1283 |
|
| 1284 |
2012-07-29 Theppitak Karoonboonyanan <[email protected]> |
| 1285 |
|
| 1286 |
* datrie/trie.h, datrie/trie.c (trie_state_walkable_chars): |
| 1287 |
Reformat source. |
| 1288 |
|
| 1289 |
2012-07-27 Theppitak Karoonboonyanan <[email protected]> |
| 1290 |
|
| 1291 |
Add new API trie_state_walkable_chars() to allow breadth-first |
| 1292 |
traversal. |
| 1293 |
|
| 1294 |
* datrie/darray.h, datrie/darray.c: |
| 1295 |
- Move da_output_symbols() to darray.h, to be called by the new |
| 1296 |
function. |
| 1297 |
- Move the Symbols class to darray.h, as required by |
| 1298 |
da_output_symbols(). |
| 1299 |
* datrie/trie.h, datrie/trie.c (+trie_state_walkable_chars): |
| 1300 |
- Add the new public function. |
| 1301 |
* datrie/libdatrie.map, datrie/libdatrie.def: |
| 1302 |
- Add the new symbol to export maps. |
| 1303 |
* configure.ac: |
| 1304 |
- Update library versioning to reflect API addition. |
| 1305 |
|
| 1306 |
2012-07-26 Theppitak Karoonboonyanan <[email protected]> |
| 1307 |
|
| 1308 |
* darray/darray.c (da_has_children): Accept (const DArray *) arg. |
| 1309 |
|
| 1310 |
2012-07-26 Theppitak Karoonboonyanan <[email protected]> |
| 1311 |
|
| 1312 |
* datrie/darray.c (da_has_children, da_output_symbols, |
| 1313 |
da_relocate_base): |
| 1314 |
Calculate max_c candidate using num_cells - base instead of |
| 1315 |
TRIE_INDEX_MAX - base, to prevent more unnecessary loops. |
| 1316 |
|
| 1317 |
2012-07-26 Theppitak Karoonboonyanan <[email protected]> |
| 1318 |
|
| 1319 |
* datrie/trie.c (trie_state_get_data): |
| 1320 |
Check if the state is leaf, not just suffix, before getting data. |
| 1321 |
|
| 1322 |
Thanks Mikhail Korobov <[email protected]> for the report. |
| 1323 |
|
| 1324 |
2012-07-25 Theppitak Karoonboonyanan <[email protected]> |
| 1325 |
|
| 1326 |
* datrie/tail.h, datrie/tail.c: |
| 1327 |
* datrie/alpha-map.c: |
| 1328 |
* datrie/trie.h, datrie/trie.c: |
| 1329 |
* datrie/darray.c: Remove trailing spaces. |
| 1330 |
|
| 1331 |
2012-07-13 Theppitak Karoonboonyanan <[email protected]> |
| 1332 |
|
| 1333 |
* datrie/tail.c (tail_get_suffix): Fix function documentation. |
| 1334 |
|
| 1335 |
Thanks Mikhail Korobov <[email protected]> for the report. |
| 1336 |
|
| 1337 |
2012-07-13 Theppitak Karoonboonyanan <[email protected]> |
| 1338 |
|
| 1339 |
* datrie/darray.c, datrie/tail.c: |
| 1340 |
- Don't include <stdint.h> when compiled with MSVC, as the header is |
| 1341 |
missing there, and SIZE_MAX is provided in some other header. |
| 1342 |
|
| 1343 |
Thanks Mikhail Korobov <[email protected]> for the report. |
| 1344 |
|
| 1345 |
2012-07-13 Theppitak Karoonboonyanan <[email protected]> |
| 1346 |
|
| 1347 |
* configure.ac: Post-release version suffix added. |
| 1348 |
|
| 1349 |
2011-11-04 Theppitak Karoonboonyanan <[email protected]> |
| 1350 |
|
| 1351 |
* NEWS, configure.ac: |
| 1352 |
=== Version 0.2.5 === |
| 1353 |
|
| 1354 |
2011-08-04 Theppitak Karoonboonyanan <[email protected]> |
| 1355 |
|
| 1356 |
* datrie/alpha-map.h: Add missing 'extern "C"' for export functions |
| 1357 |
to fix problem with C++ compiler. |
| 1358 |
Thanks Aurimas ÄŒernius <[email protected]> for the patch. |
| 1359 |
|
| 1360 |
2011-03-13 Theppitak Karoonboonyanan <[email protected]> |
| 1361 |
|
| 1362 |
* configure.ac: Post-release version suffix added. |
| 1363 |
* datrie/trie.h: Add missing documentation for "user_data" parameter |
| 1364 |
in TrieEnumFunc. |
| 1365 |
|
| 1366 |
2010-06-30 Theppitak Karoonboonyanan <[email protected]> |
| 1367 |
|
| 1368 |
* NEWS, configure.ac: |
| 1369 |
=== Version 0.2.4 === |
| 1370 |
|
| 1371 |
2010-06-28 Theppitak Karoonboonyanan <[email protected]> |
| 1372 |
|
| 1373 |
* datrie/alpha-map-private.h, datrie/alpha-map.c: |
| 1374 |
* datrie/darray.h, datrie/darray.c: |
| 1375 |
* datrie/tail.h, datrie/tail.c: |
| 1376 |
* datrie/trie.c (trie_fread, trie_fwrite): |
| 1377 |
Rename *_read() and *_write() functions to *_fread() and *_fwrite(), |
| 1378 |
for consistency with the trie_f{read,write}() function. |
| 1379 |
|
| 1380 |
2010-06-28 Theppitak Karoonboonyanan <[email protected]> |
| 1381 |
|
| 1382 |
Add trie_fread() and trie_fwrite() interfaces for reading/writing trie |
| 1383 |
data from an open file. Thanks NIIBE Yutaka <[email protected]> for the |
| 1384 |
suggestion. |
| 1385 |
|
| 1386 |
* datrie/trie.h (trie_fread, trie_fwrite): Add new API declarations. |
| 1387 |
* datrie/trie.c (trie_new_from_file, trie_fread, trie_save, |
| 1388 |
trie_fwrite): |
| 1389 |
Refactor open file handling of trie_new_from_file() and trie_save() |
| 1390 |
into trie_fread() and trie_fwrite(), and make the old functions |
| 1391 |
do file opening/closing as wrappers to them. |
| 1392 |
* datrie/libdatrie.def, datrie/libdatrie.map: Add symbol exports. |
| 1393 |
|
| 1394 |
2010-06-27 Theppitak Karoonboonyanan <[email protected]> |
| 1395 |
|
| 1396 |
* datrie/trie.c (trie_store_if_absent): Document that it's available |
| 1397 |
since 0.2.4. |
| 1398 |
* datrie/libdatrie.def, datrie/libdatrie.map: Add symbol exports for |
| 1399 |
trie_store_if_absent(). |
| 1400 |
* ChangeLog: Fix file locations in previous log. |
| 1401 |
|
| 1402 |
2010-06-24 Theppitak Karoonboonyanan <[email protected]> |
| 1403 |
|
| 1404 |
Add trie_store_if_absent() interface to avoid race condition in |
| 1405 |
multi-thread applications. Thanks Dan Searle <[email protected]> |
| 1406 |
for the suggestion. |
| 1407 |
|
| 1408 |
* datrie/trie.h (trie_store_if_absent): Add new API declaration. |
| 1409 |
* datrie/trie.c (trie_store_if_absent, trie_store, |
| 1410 |
trie_store_conditionally): |
| 1411 |
Refactor trie_store() into trie_store_conditionally() with extra arg |
| 1412 |
is_overwrite, and make the two public functions mere wrappers to it. |
| 1413 |
* configure.ac: Bump library version according to the added symbol. |
| 1414 |
|
| 1415 |
2010-03-01 Theppitak Karoonboonyanan <[email protected]> |
| 1416 |
|
| 1417 |
* datrie/trie.c (trie_save): Do not return before closing file. |
| 1418 |
Thanks to Xu Jiandong for the report. |
| 1419 |
|
| 1420 |
2010-03-01 Theppitak Karoonboonyanan <[email protected]> |
| 1421 |
|
| 1422 |
* configure.ac: Post-release version suffix added. |
| 1423 |
|
| 1424 |
2010-02-27 Theppitak Karoonboonyanan <[email protected]> |
| 1425 |
|
| 1426 |
* configure.ac: Bump library revision. |
| 1427 |
* NEWS, configure.ac: |
| 1428 |
=== Version 0.2.3 === |
| 1429 |
|
| 1430 |
2010-02-25 Theppitak Karoonboonyanan <[email protected]> |
| 1431 |
|
| 1432 |
* datrie/*.h, datrie/*.c: Add my e-mail address to license header. |
| 1433 |
|
| 1434 |
2010-02-24 Theppitak Karoonboonyanan <[email protected]> |
| 1435 |
|
| 1436 |
* datrie/*.h, datrie/*.c: Add license header to every source file. |
| 1437 |
|
| 1438 |
2010-02-23 Theppitak Karoonboonyanan <[email protected]> |
| 1439 |
|
| 1440 |
Move documentation from *.h to *.c, so libdatrie developers have the |
| 1441 |
doc at hand. Users can still read the doxygen-generated doc BTW. |
| 1442 |
|
| 1443 |
* datrie/alpha-map.h: |
| 1444 |
* datrie/alpha-map.c: |
| 1445 |
* datrie/trie.h: |
| 1446 |
* datrie/trie.c: |
| 1447 |
* datrie/darray.h: |
| 1448 |
* datrie/darray.c: |
| 1449 |
* datrie/tail.h: |
| 1450 |
* datrie/tail.c: Move doc comments from *.h to *.c. |
| 1451 |
* doc/Doxyfile.in: Add alpha-map.c, trie.c to INPUT. |
| 1452 |
* doc/Makefile.am: Add *.c to doxygen.stamp dependency. |
| 1453 |
|
| 1454 |
2010-02-20 Theppitak Karoonboonyanan <[email protected]> |
| 1455 |
|
| 1456 |
* datrie/darray.c (da_read), datrie/tail.c (tail_read): |
| 1457 |
Protect against possible integer overflow on malicious trie file. |
| 1458 |
|
| 1459 |
2010-02-20 Theppitak Karoonboonyanan <[email protected]> |
| 1460 |
|
| 1461 |
* configure.ac: Post-release version suffix added. |
| 1462 |
|
| 1463 |
Be more robust against corrupted trie files. |
| 1464 |
* datrie/alpha-map.c (alpha_map_read_bin): |
| 1465 |
* datrie/darray.c (da_read): |
| 1466 |
* datrie/tail.c (tail_read): |
| 1467 |
- Check all returns from file_read_*() and clean up properly on |
| 1468 |
failures |
| 1469 |
- Adjust existing clean up codes to the new structure |
| 1470 |
|
| 1471 |
2009-04-29 Theppitak Karoonboonyanan <[email protected]> |
| 1472 |
|
| 1473 |
* configure.ac: Bump library revision. |
| 1474 |
* NEWS, configure.ac: |
| 1475 |
=== Version 0.2.2 === |
| 1476 |
|
| 1477 |
2009-04-28 Theppitak Karoonboonyanan <[email protected]> |
| 1478 |
|
| 1479 |
* configure.ac: Check $datrie_cv_have_version_script against "yes", |
| 1480 |
not "1", so symbol versioning works on GNU ld again. |
| 1481 |
|
| 1482 |
2009-04-28 Theppitak Karoonboonyanan <[email protected]> |
| 1483 |
|
| 1484 |
* datrie/trie.c (trie_state_copy): Use bitwise copy instead of |
| 1485 |
member-wise. |
| 1486 |
|
| 1487 |
2009-04-15 Theppitak Karoonboonyanan <[email protected]> |
| 1488 |
|
| 1489 |
* configure.ac: Adjust variable name datrie_cv_have_version_script. |
| 1490 |
|
| 1491 |
2009-04-14 Theppitak Karoonboonyanan <[email protected]> |
| 1492 |
|
| 1493 |
Support locale charset query with libcharset, for mac and mingw. |
| 1494 |
[Thanks Beamer User for the report.] |
| 1495 |
|
| 1496 |
* configure.ac: Check for locale_charset() from libiconv and |
| 1497 |
nl_langinfo(CODESET) from libc. If neither is present, ask user to |
| 1498 |
install GNU libiconv. |
| 1499 |
* tools/trietool.c (init_iconv): Use locale_charset() to query locale |
| 1500 |
charset if possible, fall back to nl_langinfo(CODESET) otherwise. |
| 1501 |
|
| 1502 |
2009-04-14 Theppitak Karoonboonyanan <[email protected]> |
| 1503 |
|
| 1504 |
Support alternative iconv implemetations. |
| 1505 |
[Thanks cwt for the report.] |
| 1506 |
|
| 1507 |
* configure.ac: Check for GNU libconv or native libiconv if system libc |
| 1508 |
doesn't have iconv(). |
| 1509 |
* tools/Makefile.am: Add ICONV_LIBS to linker options. |
| 1510 |
|
| 1511 |
2009-04-13 Theppitak Karoonboonyanan <[email protected]> |
| 1512 |
|
| 1513 |
Fall back to libtool for linkers that do not support -version-script. |
| 1514 |
[Thanks bact' for the report. Thanks cwt for the test.] |
| 1515 |
|
| 1516 |
* configure.ac: Check whether linker supports -version-script. |
| 1517 |
* datrie/Makefile.am, +datrie/libdatrie.def: |
| 1518 |
Apply -version-script flag only when linker supports it. Otherwise, |
| 1519 |
fall back to the old method based on libtool -export-symbols flag. |
| 1520 |
|
| 1521 |
2009-04-13 Theppitak Karoonboonyanan <[email protected]> |
| 1522 |
|
| 1523 |
* configure.ac: Post-release version suffix added. |
| 1524 |
* configure.ac (AC_CONFIG_MACRO_DIR), Makefile.am (ACLOCAL_AMFLAGS): |
| 1525 |
Add m4 dir as automake includes, as required by the new libtool. |
| 1526 |
[Thanks cwt for the report and test.] |
| 1527 |
|
| 1528 |
2009-04-05 Theppitak Karoonboonyanan <[email protected]> |
| 1529 |
|
| 1530 |
* configure.ac: Bump library revision. |
| 1531 |
* NEWS, configure.ac: |
| 1532 |
=== Version 0.2.1 === |
| 1533 |
|
| 1534 |
2009-04-05 Theppitak Karoonboonyanan <[email protected]> |
| 1535 |
|
| 1536 |
* datrie-0.2.pc.in: Remove blank Requires: line. |
| 1537 |
|
| 1538 |
2009-04-03 Theppitak Karoonboonyanan <[email protected]> |
| 1539 |
|
| 1540 |
* datrie/alpha-map.h, datrie/trie.h: Revise documentation. |
| 1541 |
|
| 1542 |
2009-04-03 Theppitak Karoonboonyanan <[email protected]> |
| 1543 |
|
| 1544 |
* datrie/fileutils.h, datrie/fileutils.c |
| 1545 |
(make_full_path, file_open, file_length): Remove unused codes. |
| 1546 |
* datrie/triedefs.h (TrieIOMode): Remove unused typedef. |
| 1547 |
|
| 1548 |
2009-04-01 Theppitak Karoonboonyanan <[email protected]> |
| 1549 |
|
| 1550 |
* datrie/Makefile.am, datrie/libdatrie.def -> datrie/libdatrie.map: |
| 1551 |
Replace libtool symbol exports with symbol versioning, to ease |
| 1552 |
upgrading across SONAME. |
| 1553 |
|
| 1554 |
2009-03-31 Theppitak Karoonboonyanan <[email protected]> |
| 1555 |
|
| 1556 |
Fix gcc warnings. |
| 1557 |
|
| 1558 |
* tools/trietool.c (conv_to_alpha): Cast 'out_p' pointer before |
| 1559 |
comparing. |
| 1560 |
* tools/trietool.c (command_add_list, command_delete_list): |
| 1561 |
Make sure 'saved_conv' is initialized before use. |
| 1562 |
* datrie/trie.c (trie_new_from_file): Remove unused 'alt_map' var. |
| 1563 |
|
| 1564 |
2009-03-31 Theppitak Karoonboonyanan <[email protected]> |
| 1565 |
|
| 1566 |
* configura.ac: Post-release version suffix added. |
| 1567 |
|
| 1568 |
* datrie/trie.h (trie_save): Document parameter 'path'. |
| 1569 |
* doc/Doxygen.in: Update format to doxygen 1.5.8. |
| 1570 |
|
| 1571 |
2009-03-24 Theppitak Karoonboonyanan <[email protected]> |
| 1572 |
|
| 1573 |
* NEWS, configure.ac: |
| 1574 |
=== Version 0.2.0 === |
| 1575 |
|
| 1576 |
2009-03-24 Theppitak Karoonboonyanan <[email protected]> |
| 1577 |
|
| 1578 |
* Makefile.am, +README.migration: |
| 1579 |
Add migration documentation. |
| 1580 |
|
| 1581 |
2008-12-29 Theppitak Karoonboonyanan <[email protected]> |
| 1582 |
|
| 1583 |
* datrie/alpha-map.c (alpha_map_char_to_trie, alpha_map_trie_to_char): |
| 1584 |
Tighten the loop for more readability, plus eliminating one duplicated |
| 1585 |
check. |
| 1586 |
|
| 1587 |
2008-12-28 Theppitak Karoonboonyanan <[email protected]> |
| 1588 |
|
| 1589 |
* datrie/datrie.c (da_get_base, da_get_check, da_set_base, |
| 1590 |
da_set_check)): |
| 1591 |
Revert lower bound checks. It's no use checking too much for internal |
| 1592 |
code. |
| 1593 |
|
| 1594 |
2008-12-28 Theppitak Karoonboonyanan <[email protected]> |
| 1595 |
|
| 1596 |
* datrie/trie.h, datrie/trie.c, datrie/libdatrie.def |
| 1597 |
(trie_state_is_leaf, +trie_state_is_single): |
| 1598 |
- Introduce a new state condition: single. A single state is a state |
| 1599 |
in a single path, with no other branch til its leaf. |
| 1600 |
- Redefine trie_state_is_leaf() as a macro based on it and |
| 1601 |
trie_state_is_terminal(). |
| 1602 |
|
| 1603 |
2008-12-26 Theppitak Karoonboonyanan <[email protected]> |
| 1604 |
|
| 1605 |
* datrie/trie.h, datrie/trie.c, datrie/libdatrie.def (trie_state_copy): |
| 1606 |
Add a new API function for trie state reuse support. |
| 1607 |
|
| 1608 |
2008-12-15 Theppitak Karoonboonyanan <[email protected]> |
| 1609 |
|
| 1610 |
* tools/trietool.c (conv_to_alpha): Use 'unsigned char' instead of |
| 1611 |
'uint8'. Better not tie to datrie internal notations too much. |
| 1612 |
|
| 1613 |
2008-12-15 Theppitak Karoonboonyanan <[email protected]> |
| 1614 |
|
| 1615 |
* configure.ac: Post-release version bump. |
| 1616 |
|
| 1617 |
* tools/trietool.c (conv_to_alpha): Use uint8 to access data bytes |
| 1618 |
instead of char, to fix char signedness bug. |
| 1619 |
|
| 1620 |
2008-12-15 Theppitak Karoonboonyanan <[email protected]> |
| 1621 |
|
| 1622 |
* NEWS, configure.ac: |
| 1623 |
=== Version 0.1.99.2 === |
| 1624 |
|
| 1625 |
2008-12-15 Theppitak Karoonboonyanan <[email protected]> |
| 1626 |
|
| 1627 |
* man/Makefile.am, man/trietool.1 -> man/trietool-0.2.1: |
| 1628 |
Rename 'trietool' man page to 'trietool-0.2', according to the |
| 1629 |
corrsponding binary. |
| 1630 |
|
| 1631 |
2008-12-14 Theppitak Karoonboonyanan <[email protected]> |
| 1632 |
|
| 1633 |
* tools/Makefile.am: Rename 'trietool' program to 'trietool-0.2', |
| 1634 |
to allow co-existence with datrie 0.1.x. |
| 1635 |
|
| 1636 |
2008-12-14 Theppitak Karoonboonyanan <[email protected]> |
| 1637 |
|
| 1638 |
* datrie/darray.c (da_read): |
| 1639 |
* datrie/tail.c (tail_read): |
| 1640 |
Restore file pointer on signature check failure. |
| 1641 |
|
| 1642 |
2008-12-14 Theppitak Karoonboonyanan <[email protected]> |
| 1643 |
|
| 1644 |
* man/trietool.1: Document that no more than 255 alphabets are allowed. |
| 1645 |
|
| 1646 |
2008-12-13 Theppitak Karoonboonyanan <[email protected]> |
| 1647 |
|
| 1648 |
Ensure that ranges in AlphaMap are always sorted and don't overlap. |
| 1649 |
|
| 1650 |
* datrie/alpha-map.c (struct _AlphaMap, alpha_map_new): |
| 1651 |
- Remove 'last_range' member |
| 1652 |
* datrie/alpha-map.c (alpha_map_add_range): |
| 1653 |
- Check if the new range overlaps existing ranges and merge them |
| 1654 |
as necessary. |
| 1655 |
|
| 1656 |
2008-12-13 Theppitak Karoonboonyanan <[email protected]> |
| 1657 |
|
| 1658 |
* configure.ac: Post-release version bump. |
| 1659 |
* configure.ac, Makefile.am, datrie.pc.in -> datrie-0.2.pc.in: |
| 1660 |
Rename pkg-config file, to allow co-existence with datrie 0.1.x. |
| 1661 |
|
| 1662 |
2008-12-12 Theppitak Karoonboonyanan <[email protected]> |
| 1663 |
|
| 1664 |
* NEWS, configure.ac: |
| 1665 |
=== Version 0.1.99.1 === |
| 1666 |
|
| 1667 |
2008-12-12 Theppitak Karoonboonyanan <[email protected]> |
| 1668 |
|
| 1669 |
* man/trietool.1: Update document |
| 1670 |
- Trie is now stored in a single '*.tri' file |
| 1671 |
- The alphabet map is renamed from '*.sbm' to '*.abm' |
| 1672 |
- Mention Unicode, instead of single-byte character domain |
| 1673 |
- Document the options for 'add-list' and 'delete-list' commands |
| 1674 |
- Adjust troff formatting commands |
| 1675 |
|
| 1676 |
2008-12-12 Theppitak Karoonboonyanan <[email protected]> |
| 1677 |
|
| 1678 |
* tools/trietool.c (prepare_trie): |
| 1679 |
- Try to read alphabet map from '*.abm' instead of '*.sbm' |
| 1680 |
|
| 1681 |
2008-12-11 Theppitak Karoonboonyanan <[email protected]> |
| 1682 |
|
| 1683 |
Allow specifying character encoding for word list file. |
| 1684 |
|
| 1685 |
* tools/trietool.c (command_add_list, command_delete_list): |
| 1686 |
- Add '-e|--encoding ENC' option which temporarily override locale's |
| 1687 |
codeset for character conversion |
| 1688 |
* tools/trietool.c (usage): |
| 1689 |
- Update usage message accordingly |
| 1690 |
|
| 1691 |
2008-12-09 Theppitak Karoonboonyanan <[email protected]> |
| 1692 |
|
| 1693 |
Use const where possible + general clean-ups. |
| 1694 |
|
| 1695 |
* datrie/alpha-map-private.h, datrie/alpha-map.c (alpha_map_write_bin): |
| 1696 |
* datrie/alpha-map.h, datrie/alpha-map.c (alpha_map_clone): |
| 1697 |
* datrie/alpha-map.c (alpha_map_get_total_ranges): |
| 1698 |
- Accept (const AlphaMap *) arg |
| 1699 |
* datrie/alpha-map.c (alpha_map_char_to_trie_str): |
| 1700 |
- Rename 'alphabet_str' to 'trie_str', to be more sensible |
| 1701 |
|
| 1702 |
* datrie/darray.h, datrie/darray.c (da_write, da_walk, da_enumerate): |
| 1703 |
* datrie/darray.c |
| 1704 |
(da_output_symbols, da_get_state_key, da_enumerate_recursive): |
| 1705 |
- Accept (const DArray *) arg |
| 1706 |
* datrie/darray.h, datrie/darray.c (da_free): |
| 1707 |
- Made void function, instead of int |
| 1708 |
* datrie/darray.c (da_new): |
| 1709 |
- Set CHECK[0] = d->num_cells, to be more clear |
| 1710 |
* datrie/darray.c (da_write, da_extend_pool): |
| 1711 |
- Update CHECK[0] whenever DArray::num_cells is changed, instead of |
| 1712 |
just setting it before writing; so da_write() can now accept |
| 1713 |
(const DArray *) arg |
| 1714 |
|
| 1715 |
* datrie/tail.h, datrie/tail.c |
| 1716 |
(tail_write, tail_get_data, tail_walk_str, tail_walk_char): |
| 1717 |
- Accept (const Tail *) arg |
| 1718 |
* datrie/tail.h, datrie/tail.c (tail_free): |
| 1719 |
- Made void function, instead of int |
| 1720 |
|
| 1721 |
* datrie/trie.c (struct _TrieState, struct _TrieEnumData): |
| 1722 |
- 'trie' member is now const pointer |
| 1723 |
* datrie/trie.h, datrie/trie.c |
| 1724 |
(trie_new, trie_is_dirty, trie_retrieve, trie_enumerate, trie_root): |
| 1725 |
* datrie/trie.c (trie_state_new): |
| 1726 |
- Accept (const Trie *) arg |
| 1727 |
|
| 1728 |
2008-12-09 Theppitak Karoonboonyanan <[email protected]> |
| 1729 |
|
| 1730 |
Unicode (UCS-4) character support. |
| 1731 |
|
| 1732 |
* datrie/triedefs.h (AlphaChar): |
| 1733 |
- unsigned char -> uint32 |
| 1734 |
|
| 1735 |
* datrie/alpha-map.h, datrie/alpha-map.c, datrie/libdatrie.def: |
| 1736 |
- Export alpha_char_strlen() utility routine |
| 1737 |
|
| 1738 |
* tools/trietool.c |
| 1739 |
(ProgEnv, init_conv, conv_to_alpha, conv_from_alpha, close_conv): |
| 1740 |
- Add routines for converting characters between locale (LC_CTYPE) |
| 1741 |
codeset and UCS-4 |
| 1742 |
* tools/trietool.c (main): |
| 1743 |
- Initialize and close conversion routines |
| 1744 |
* tools/trietool.c |
| 1745 |
(command_add, command_add_list, command_delete, command_delete_list, |
| 1746 |
command_query, list_enum_func, command_list): |
| 1747 |
- Convert character encodings between I/O and trie |
| 1748 |
|
| 1749 |
2008-12-09 Theppitak Karoonboonyanan <[email protected]> |
| 1750 |
|
| 1751 |
* datrie/trie.c (trie_retrieve, trie_store): |
| 1752 |
- Use (AlphaChar *), not (TrieChar *), as key pointer type |
| 1753 |
|
| 1754 |
2008-12-07 Theppitak Karoonboonyanan <[email protected]> |
| 1755 |
|
| 1756 |
* datrie/trie.c (trie_retrieve): |
| 1757 |
- Remove unused var 'len' |
| 1758 |
- Compare AlphaChar with integer zero rather than '\0' |
| 1759 |
|
| 1760 |
2008-12-07 Theppitak Karoonboonyanan <[email protected]> |
| 1761 |
|
| 1762 |
Adjust APIs for in-memory trie support. |
| 1763 |
|
| 1764 |
* datrie/trie.c (struct _Trie): |
| 1765 |
- Remove 'file' member; now trie is detached from file; file is |
| 1766 |
closed after loading, and reopened when saving |
| 1767 |
* datrie/trie.h, datrie/trie.c (trie_new): |
| 1768 |
- Add public APIs: trie_new(), for non-file usage |
| 1769 |
- One can still save it to file with trie_save(), BTW |
| 1770 |
* datrie/trie.h, datrie/trie.c (trie_open, trie_new_from_file): |
| 1771 |
- Rename trie_open() to trie_new_from_file() and make it accept only |
| 1772 |
one pathname parameter, instead of separated dir and name |
| 1773 |
- Alphabet map is now mandatory, rather than optional |
| 1774 |
* datrie/trie.h, datrie/trie.c (trie_close, trie_free): |
| 1775 |
- Rename trie_close() to trie_free() and do not bother with saving |
| 1776 |
any more |
| 1777 |
* datrie/trie.h, datrie/trie.c (trie_save): |
| 1778 |
- Accept file path argument and open the file for saving |
| 1779 |
* datrie/trie.h, datrie/trie.c (trie_is_dirty): |
| 1780 |
- Add public API: trie_is_dirty() for client to determine whether |
| 1781 |
saving is needed |
| 1782 |
|
| 1783 |
* datrie/alpha-map-private.h: |
| 1784 |
- Separate internal APIs from public |
| 1785 |
* datrie/alpha-map.h, datrie/alpha-map.c: |
| 1786 |
- Promote alpha_map_new() and alpha_map_add_range() to public; |
| 1787 |
they are now needed by trie_new() |
| 1788 |
- Remove alpha_map_open() |
| 1789 |
- Add public API: alpha_map_clone() |
| 1790 |
- Document public APIs |
| 1791 |
|
| 1792 |
* datrie/darray.h, datrie/darray.c (da_new): |
| 1793 |
- Add internal API: da_new() needed by trie_new() |
| 1794 |
- Code migrated from new-file case in da_read() |
| 1795 |
* datrie/darray.c (da_read): |
| 1796 |
- No longer handle new file; read failure means an error |
| 1797 |
|
| 1798 |
* datrie/tail.h, datrie/tail.c (tail_new): |
| 1799 |
- Add internal API: tail_new() needed by trie_new() |
| 1800 |
- Code migrated from new-file case in tail_read() |
| 1801 |
* datrie/tail.c (TAIL_SIGNATURE): |
| 1802 |
- Update TAIL_SIGNATURE to harmonize with other data parts |
| 1803 |
* datrie/tail.c (tail_read): |
| 1804 |
- No longer handle new file; read failure means an error |
| 1805 |
|
| 1806 |
* tools/trietool.c (prepare_trie, close_trie): |
| 1807 |
- Add helper function for openning and closing trie |
| 1808 |
* tools/trietool.c (main): |
| 1809 |
- Open and close trie with prepare_trie() and close_trie() |
| 1810 |
|
| 1811 |
* datrie/Makefile.am: |
| 1812 |
- Install alpha-map.h as public header |
| 1813 |
- Add alpha-map-private.h to source list |
| 1814 |
* datrie/libdatrie.def: |
| 1815 |
- Update exported symbols |
| 1816 |
|
| 1817 |
2008-12-07 Theppitak Karoonboonyanan <[email protected]> |
| 1818 |
|
| 1819 |
Rename AlphaMap functions to be more logical. |
| 1820 |
|
| 1821 |
* datrie/alpha-map.c, datrie/alpha-map.h: Rename functions |
| 1822 |
- alpha_map_char_to_alphabet -> alpha_map_char_to_trie |
| 1823 |
- alpha_map_alphabet_to_char -> alpha_map_trie_to_char |
| 1824 |
- alpha_map_char_to_alphabet_str -> alpha_map_char_to_trie_str |
| 1825 |
- alpha_map_alphabet_to_char_str -> alpha_map_trie_to_char_str |
| 1826 |
|
| 1827 |
* datrie/trie.c (trie_retrieve, trie_store, trie_delete, |
| 1828 |
trie_da_enum_func, trie_state_walk, trie_state_is_walkable): |
| 1829 |
- Call the AlphaMap functions with the new names |
| 1830 |
|
| 1831 |
2008-12-07 Theppitak Karoonboonyanan <[email protected]> |
| 1832 |
|
| 1833 |
Merge SBTrie alphabet mapping feature into Trie. |
| 1834 |
|
| 1835 |
* datrie/triedefs.h (AlphaChar): |
| 1836 |
- Add AlphaChar typedef, as well as ALPHA_CHAR_ERROR macro |
| 1837 |
(moved from UniChar type in datrie/alpha-map.h) |
| 1838 |
|
| 1839 |
* datrie/alpha-map.c (alpha_char_strlen): |
| 1840 |
- Add string length function for alphabet string |
| 1841 |
* datrie/alpha-map.c (struct _AlphaRange): |
| 1842 |
- Use AlphaChar type instead of UniChar for begin, end members |
| 1843 |
* datrie/alpha-map.c (alpha_map_get_total_ranges): |
| 1844 |
- Add range count private method |
| 1845 |
* datrie/alpha-map.c (alpha_map_add_range): |
| 1846 |
- Add private method for adding range (refactored from |
| 1847 |
alpha_map_open()) |
| 1848 |
* datrie/alpha-map.c (alpha_map_open): |
| 1849 |
- Call alpha_map_add_range() to add range, instead of doing low-level |
| 1850 |
code |
| 1851 |
* datrie/alpha-map.c, datrie/alpha-map.h |
| 1852 |
(alpha_map_read_bin, alpha_map_write_bin): |
| 1853 |
- Add methods for binary format I/O |
| 1854 |
* datrie/alpha-map.c, datrie/alpha-map.h |
| 1855 |
(alpha_map_char_to_alphabet, alpha_map_alphabet_to_char): |
| 1856 |
- Accept and return AlphaChar, instead of UniChar |
| 1857 |
* datrie/alpha-map.c, datrie/alpha-map.h |
| 1858 |
(alpha_map_char_to_alphabet_str, alpha_map_alphabet_to_char_str): |
| 1859 |
- Add public methods for mapping strings (migrated from |
| 1860 |
sb_map_char_to_alphabet_str and sb_map_alphabet_to_char_str in |
| 1861 |
datrie/sb-trie.c) |
| 1862 |
|
| 1863 |
* datrie/trie.c (struct _Trie): |
| 1864 |
- Add alpha_map member |
| 1865 |
* datrie/trie.c (trie_open): |
| 1866 |
- Add code to read AlphaMap data block, and prefer text-formatted |
| 1867 |
*.sbm if exists |
| 1868 |
- Defer Trie object allocation to after file openning |
| 1869 |
* datrie/trie.c (trie_close): |
| 1870 |
- Free alpha_map member |
| 1871 |
* datrie/trie.c (trie_save): |
| 1872 |
- Add code to write AlphaMap data block |
| 1873 |
* datrie/trie.c, datrie/trie.h (trie_retrieve, trie_store, trie_delete, |
| 1874 |
trie_da_enum_func, trie_state_walk, trie_state_is_walkable): |
| 1875 |
- Adjust function prototypes to accept AlphaChar instead of TrieChar |
| 1876 |
- Add mapping between alphabet and trie character code |
| 1877 |
* datrie/trie.h (TrieEnumFunc): |
| 1878 |
- Adjust function typedef to accept AlphaChar instead of TrieChar |
| 1879 |
|
| 1880 |
* datrie/Makefile.am: |
| 1881 |
- Remove sb-trie.c and sb-trie.h from source/header list |
| 1882 |
* datrie/libdatrie.def: |
| 1883 |
- Remove sb_trie symbols |
| 1884 |
|
| 1885 |
* tools/trietool.c: |
| 1886 |
- Call trie_* functions instead of sb_trie_* |
| 1887 |
|
| 1888 |
2008-12-03 Theppitak Karoonboonyanan <[email protected]> |
| 1889 |
|
| 1890 |
Adjust file format by catenating *.br and *.tl data into a single |
| 1891 |
*.tri file. |
| 1892 |
|
| 1893 |
* datrie/trie.c (struct _Trie): |
| 1894 |
- Add 'file' and 'is_dirty' members |
| 1895 |
* datrie/trie.c (trie_open): |
| 1896 |
- Open the file and call da_read() and tail_read() to load data |
| 1897 |
portions, instead of openning separate files |
| 1898 |
* datrie/trie.c (trie_close): |
| 1899 |
- Do the saving stuff and free DArray and Tail data, instead of |
| 1900 |
separately closing them; then finally close the file |
| 1901 |
* datrie/trie.c (trie_save): |
| 1902 |
- Write file portions with da_write() and tail_write() instead of |
| 1903 |
saving to separate files |
| 1904 |
- Handle the 'is_dirty' stuffs |
| 1905 |
* datrie/trie.c (trie_store, trie_branch_in_branch, trie_delete): |
| 1906 |
- Set the 'is_dirty' flag |
| 1907 |
|
| 1908 |
* datrie/darray.h: Change prototypes for internal APIs whose |
| 1909 |
functionalities are to be reduced: |
| 1910 |
- da_open(path, name, mode) -> da_read(FILE*) |
| 1911 |
- da_close(DArray*) -> da_free(DArray*) |
| 1912 |
- da_save(DArray*) -> da_write(DArray*, FILE*) |
| 1913 |
|
| 1914 |
* datrie/darray.c (struct_DArray): |
| 1915 |
- Drop 'file' and 'is_dirty' members |
| 1916 |
* datrie/darray.c (da_open -> da_read): |
| 1917 |
- Accept (FILE *) argument and drop file openning/closing codes |
| 1918 |
- Store number of cells at CHECK[0], so double-array data size can |
| 1919 |
determined without depending on file size |
| 1920 |
- Do not allocate DArray object until needed |
| 1921 |
- Drop 'is_dirty' stuffs |
| 1922 |
* datrie/darray.c (da_close -> da_free): |
| 1923 |
- Remove file stuffs; just free memory |
| 1924 |
* datrie/darray.c (da_save -> da_write): |
| 1925 |
- Accept (FILE *) argument and use it instead of DArray::file |
| 1926 |
- Ensure CHECK[0] stores the number of cells |
| 1927 |
- Drop 'is_dirty' stuffs |
| 1928 |
* datrie/darray.c (da_set_base, da_set_check): |
| 1929 |
- Drop 'is_dirty' stuffs |
| 1930 |
|
| 1931 |
* datrie/tail.h: Change prototypes for internal APIs whose |
| 1932 |
functionalities are to be reduced: |
| 1933 |
- tail_open(path, name, mode) -> tail_read(FILE*) |
| 1934 |
- tail_close(Tail*) -> tail_free(Tail*) |
| 1935 |
- tail_save(Tail*) -> tail_write(Tail*, FILE*) |
| 1936 |
|
| 1937 |
* datrie/tail.c (struct _Tail): |
| 1938 |
- Drop 'file' and 'is_dirty' members |
| 1939 |
* datrie/tail.c (tail_open -> tail_read): |
| 1940 |
- Accept (FILE *) argument and drop file openning/closing codes |
| 1941 |
- Check for new file from read failure, rather than file size |
| 1942 |
- Do not allocate Tail object until needed |
| 1943 |
- Drop 'is_dirty' stuffs |
| 1944 |
* datrie/tail.c (tail_close -> tail_free): |
| 1945 |
- Remove file stuffs; just free memory |
| 1946 |
* datrie/tail.c (tail_save -> tail_write): |
| 1947 |
- Accept (FILE *) argument and use it instead of Tail::file |
| 1948 |
- Drop 'is_dirty' stuffs |
| 1949 |
* datrie/tail.c (tail_set_suffix, tail_set_data, tail_free_block): |
| 1950 |
- Drop 'is_dirty' stuffs |
| 1951 |
|
| 1952 |
2008-12-01 Theppitak Karoonboonyanan <[email protected]> |
| 1953 |
|
| 1954 |
Get rid of the weird TrieIndexInt intermediate type, by checking |
| 1955 |
ranges instead. (Changes merged from r_0_1_x-branch) |
| 1956 |
|
| 1957 |
* datrie/darray.c: Remove typedef for TrieIndexInt. |
| 1958 |
* datrie/darray.c (da_check_free_cell, da_extend_pool): |
| 1959 |
- Accept normal TrieIndex arg instead of TrieIndexInt |
| 1960 |
* datrie/datrie.c (da_insert_branch): |
| 1961 |
- Define 'base', 'next' vars as TrieIndex instead of TrieIndexInt |
| 1962 |
- Check overflow for 'next' before checking if the cell is free |
| 1963 |
* datrie/datrie.c (da_find_free_base): |
| 1964 |
- Define 's' var as TrieIndex instead of TrieIndexInt |
| 1965 |
* datrie/datrie.c (da_fit_symbols): |
| 1966 |
- Check overflow for (base + sym) before checking if the cell is free |
| 1967 |
* datrie/datrie.c (da_get_base, da_get_check, da_set_base, |
| 1968 |
da_set_check)): |
| 1969 |
- Also check lower bound for index range |
| 1970 |
|
| 1971 |
2008-11-27 Theppitak Karoonboonyanan <[email protected]> |
| 1972 |
|
| 1973 |
First changes to break ABI for larger trie index. |
| 1974 |
|
| 1975 |
* datrie/triedefs.h: Redefine TrieIndex and TrieData as int32. |
| 1976 |
Update TRIE_INDEX_MAX accordingly. |
| 1977 |
* datrie/darray.c (da_open, da_save): Redefine DA_SIGNATURE. |
| 1978 |
Read/write 32-bit data in headers. |
| 1979 |
* datrie/darray.c (da_has_children, da_output_symbols, |
| 1980 |
da_relocate_base): |
| 1981 |
Declare characters as TrieIndex instead of uint16. |
| 1982 |
* datrie/tail.c (tail_open, tail_save): Redefine TAIL_SIGNATURE. |
| 1983 |
Read/write 32-bit data in headers. Use 16-bit length for each block. |
| 1984 |
* configure.ac: Bump up library version to 1.0.0. |
| 1985 |
|
| 1986 |
2008-06-21 Theppitak Karoonboonyanan <[email protected]> |
| 1987 |
|
| 1988 |
* man/trietool.1: Use troff .in command to indent text, fixing warning |
| 1989 |
from 'groff --warnings'. Thanks Debian's lintian. |
| 1990 |
|
| 1991 |
2008-06-21 Theppitak Karoonboonyanan <[email protected]> |
| 1992 |
|
| 1993 |
* datrie/tail.c (tail_set_suffix): |
| 1994 |
* datrie/sb-trie.c (sb_map_char_to_alphabet_str): |
| 1995 |
Fix GCC warnings about char signedness. |
| 1996 |
|
| 1997 |
2008-01-28 Theppitak Karoonboonyanan <[email protected]> |
| 1998 |
|
| 1999 |
* configure.in: Bump the library revision. |
| 2000 |
* NEWS: |
| 2001 |
=== Version 0.1.3 === |
| 2002 |
|
| 2003 |
2008-01-28 Theppitak Karoonboonyanan <[email protected]> |
| 2004 |
|
| 2005 |
* man/trietool.1: Add documentation for the SBM file. |
| 2006 |
|
| 2007 |
2008-01-28 Theppitak Karoonboonyanan <[email protected]> |
| 2008 |
|
| 2009 |
* README: Fix my name in the reference. |
| 2010 |
|
| 2011 |
2008-01-10 Theppitak Karoonboonyanan <[email protected]> |
| 2012 |
|
| 2013 |
* datrie/tail.c (tail_set_suffix): Fix bug for the case in which |
| 2014 |
suffix argument and tail's suffix overlap. Bug report and patch by |
| 2015 |
shepmaster in http://linux.thai.net/node/102. |
| 2016 |
|
| 2017 |
2008-01-10 Theppitak Karoonboonyanan <[email protected]> |
| 2018 |
|
| 2019 |
* datrie/sb-trie.c (sb_trie_root): Return NULL pointer, rather than |
| 2020 |
FALSE. Bug reported by shepmaster in http://linux.thai.net/node/101. |
| 2021 |
|
| 2022 |
2007-10-17 Theppitak Karoonboonyanan <[email protected]> |
| 2023 |
|
| 2024 |
* datrie/libdatrie.def: List only symbols in plain format, for Mac |
| 2025 |
build. Thanks Vee Satayamas for the report. |
| 2026 |
|
| 2027 |
* datrie/Makefile.am: Add libdatrie.def as libdatrie_la_DEPENDENCIES. |
| 2028 |
|
| 2029 |
2007-08-28 Theppitak Karoonboonyanan <[email protected]> |
| 2030 |
|
| 2031 |
* doc/Doxyfile.in: Only generate doc for public API. |
| 2032 |
|
| 2033 |
2007-08-28 Theppitak Karoonboonyanan <[email protected]> |
| 2034 |
|
| 2035 |
* doc/Makefile.am, doc/Doxyfile.in: Revert API man pages generation |
| 2036 |
and installation. Update Doxyfile format to doxygen 1.5.3. |
| 2037 |
|
| 2038 |
2007-08-26 Theppitak Karoonboonyanan <[email protected]> |
| 2039 |
|
| 2040 |
* man/trietool.1: Escape some minus signs. Mark a variable italic. |
| 2041 |
Thanks debian's lintian. |
| 2042 |
|
| 2043 |
2007-08-26 Theppitak Karoonboonyanan <[email protected]> |
| 2044 |
|
| 2045 |
* configure.ac: Post-release version bump. |
| 2046 |
|
| 2047 |
2007-08-25 Theppitak Karoonboonyanan <[email protected]> |
| 2048 |
|
| 2049 |
* configure.ac: Bump lib revision. |
| 2050 |
* NEWS: |
| 2051 |
=== Version 0.1.2 === |
| 2052 |
|
| 2053 |
2007-08-25 Theppitak Karoonboonyanan <[email protected]> |
| 2054 |
|
| 2055 |
* datrie/Makefile.am, +datrie/trie-private.h (MIN_VAL, MAX_VAL): |
| 2056 |
Add utility macros. |
| 2057 |
* datrie/darray.c (da_output_symbols): Adjust loop boundary to be more |
| 2058 |
overflow-safe. |
| 2059 |
* "-------------" (da_has_children, da_relocate_base): Apply the same |
| 2060 |
loop pattern to prevent out-of-range accesses. |
| 2061 |
|
| 2062 |
2007-08-24 Theppitak Karoonboonyanan <[email protected]> |
| 2063 |
|
| 2064 |
* datrie/darray.c (da_output_symbols): Do not try to test symbols |
| 2065 |
beyond trie index range. Fixes segfault for trietool list command. |
| 2066 |
|
| 2067 |
2007-08-19 Theppitak Karoonboonyanan <[email protected]> |
| 2068 |
|
| 2069 |
Handle double array index overflow. |
| 2070 |
|
| 2071 |
* datrie/triedefs.h (TRIE_INDEX_MAX): Define maximum index value. |
| 2072 |
* datrie/darray.c (TrieIndexInt): Define type for immediate values, so |
| 2073 |
overflow can be detected. |
| 2074 |
* "-------------" (da_extend_pool): Return success/failure status. |
| 2075 |
Accept TrieIndexInt argument for overflow detection. |
| 2076 |
* "-------------" (da_check_free_cell): False when extending fails. |
| 2077 |
Accept TrieIndexInt argument for overflow detection. |
| 2078 |
* "-------------" (da_find_free_base): Return error on failure. |
| 2079 |
* "-------------" (da_insert_branch): Return error on failure. |
| 2080 |
* datrie/trie.c (trie_branch_in_branch, trie_branch_in_tail): Check |
| 2081 |
for failure from da_insert_branch() and return the status. |
| 2082 |
* datrie/darray.{c,h} (da_prune_upto, da_prune): Add da_prune_upto(), |
| 2083 |
for rolling back partial operation in trie_branch_in_branch(). |
| 2084 |
Redefine da_prune() in terms of da_prune_upto(). |
| 2085 |
|
| 2086 |
2007-08-16 Theppitak Karoonboonyanan <[email protected]> |
| 2087 |
|
| 2088 |
* datrie/darray.c (da_open, da_find_free_base): Use DA_POOL_BEGIN |
| 2089 |
macro instead of hard-coded number. Remove unused DA_EXTENDING_STEPS. |
| 2090 |
|
| 2091 |
2007-05-12 Theppitak Karoonboonyanan <[email protected]> |
| 2092 |
|
| 2093 |
* datrie/sb-trie.c (sb_trie_close, sb_trie_save, sb_trie_retrieve, |
| 2094 |
sb_trie_store, sb_trie_enumerate, sb_trie_root, sb_trie_state_clone, |
| 2095 |
sb_trie_state_free, sb_trie_state_rewind, sb_trie_state_walk, |
| 2096 |
sb_trie_state_is_walkable, sb_trie_state_is_terminal, |
| 2097 |
sb_trie_state_is_leaf, sb_trie_state_get_data): |
| 2098 |
Guard against NULL pointers in functions. Thanks to Neutron Soutmun |
| 2099 |
for bug report and initial patch. |
| 2100 |
|
| 2101 |
2007-04-06 Theppitak Karoonboonyanan <[email protected]> |
| 2102 |
|
| 2103 |
* doc/Makefile.am: Add install-man target. Also install/uninstall |
| 2104 |
doxygen-generated man pages. |
| 2105 |
|
| 2106 |
2007-03-27 Theppitak Karoonboonyanan <[email protected]> |
| 2107 |
|
| 2108 |
* configure.ac (LT_CURRENT, LT_REVISION, LT_AGE), |
| 2109 |
datrie/Makefile.am (libdatrie_la_LDFLAGS), +datrie/libdatrie.def: |
| 2110 |
Add library version info. Limit exported symbols with -export-symbols |
| 2111 |
flag. Always pass -no-undefined flag. |
| 2112 |
|
| 2113 |
* configure.ac: Add Win32 DLL building support. |
| 2114 |
|
| 2115 |
2006-11-02 Theppitak Karoonboonyanan <[email protected]> |
| 2116 |
|
| 2117 |
* datrie/fileutils.{c,h} (file_read_int32, file_write_int32): Add |
| 2118 |
int32 read/write functions. |
| 2119 |
|
| 2120 |
* datrie/fileutils.c (file_read_int16, file_write_int16): Use unsigned |
| 2121 |
char buffer instead of and-ing with 0xff, in accordance with int32 |
| 2122 |
functions. (Thanks to Vee Satayamas for suggestion). |
| 2123 |
|
| 2124 |
2006-10-13 Theppitak Karoonboonyanan <[email protected]> |
| 2125 |
|
| 2126 |
* configure.ac: Post-release version bump. |
| 2127 |
|
| 2128 |
2006-10-12 Theppitak Karoonboonyanan <[email protected]> |
| 2129 |
|
| 2130 |
* NEWS: |
| 2131 |
=== Version 0.1.1 === |
| 2132 |
|
| 2133 |
2006-10-12 Theppitak Karoonboonyanan <[email protected]> |
| 2134 |
|
| 2135 |
* configure.ac, Makefile.am, +man/Makefile.am, +man/trietool.1: |
| 2136 |
Add manpage for trietool (moved from debian/). |
| 2137 |
|
| 2138 |
2006-10-11 Theppitak Karoonboonyanan <[email protected]> |
| 2139 |
|
| 2140 |
Fixed compiler warnings. |
| 2141 |
|
| 2142 |
* datrie/sb-trie.c (sb_map_alphabet_to_char_str): |
| 2143 |
* datrie/tail.c (tail_open, tail_save, tail_set_suffix): |
| 2144 |
* datrie/trie.c (trie_da_enum_func): Cast pointers to get rid of |
| 2145 |
compiler warnings about char signedness. |
| 2146 |
|
| 2147 |
* tools/trietool.c (list_enum_func): Return value on exit. |
| 2148 |
|
| 2149 |
2006-09-18 Theppitak Karoonboonyanan <[email protected]> |
| 2150 |
|
| 2151 |
* configure.ac: Post-release version bump. |
| 2152 |
|
| 2153 |
2006-09-18 Theppitak Karoonboonyanan <[email protected]> |
| 2154 |
|
| 2155 |
* NEWS, configure.ac: |
| 2156 |
=== Version 0.1.0 === |
| 2157 |
|
| 2158 |
2006-09-17 Theppitak Karoonboonyanan <[email protected]> |
| 2159 |
|
| 2160 |
* README: Filled in. |
| 2161 |
|
| 2162 |
2006-09-02 Theppitak Karoonboonyanan <[email protected]> |
| 2163 |
|
| 2164 |
* datrie/triedefs.h, datrie/trie.h, datrie/sb-trie.h: Included headers |
| 2165 |
using system header forms in installed headers. |
| 2166 |
|
| 2167 |
* datrie/Makefile.am (INCLUDES): Added include flag to ensure it |
| 2168 |
compiles without prior installation. |
| 2169 |
|
| 2170 |
2006-09-02 Theppitak Karoonboonyanan <[email protected]> |
| 2171 |
|
| 2172 |
* datrie/alpha-map.c (alpha_map_char_to_alphabet, |
| 2173 |
alpha_map_alphabet_to_char): Made sure terminator is always mapped |
| 2174 |
with character 0. |
| 2175 |
|
| 2176 |
2006-09-02 Theppitak Karoonboonyanan <[email protected]> |
| 2177 |
|
| 2178 |
* datrie/darray.{h,c} (da_is_walkable), |
| 2179 |
datrie/tail.{h,c} (tail_is_walkable_char): Made the tiny functions |
| 2180 |
inline (i.e. macros), for tiny performance gain. |
| 2181 |
|
| 2182 |
2006-09-02 Theppitak Karoonboonyanan <[email protected]> |
| 2183 |
|
| 2184 |
* datrie/sb-trie.{h,c} (+sb_trie_state_is_walkable): Added walkability |
| 2185 |
test wrapper. |
| 2186 |
|
| 2187 |
* datrie/sb-trie.h (sb_trie_state_is_terminal, sb_trie_state_is_leaf), |
| 2188 |
datrie/trie.h (trie_state_is_terminal, trie_state_is_leaf): Fixed typo |
| 2189 |
for "\brief" doxygen tag. |
| 2190 |
|
| 2191 |
2006-09-02 Theppitak Karoonboonyanan <[email protected]> |
| 2192 |
|
| 2193 |
* datrie/trie.{h,c} (trie_state_is_terminal, +trie_state_is_walkable): |
| 2194 |
Changed trie_state_is_terminal() into a generic walkability test, and |
| 2195 |
made itself a specialized macro calling the function. |
| 2196 |
|
| 2197 |
2006-08-31 Theppitak Karoonboonyanan <[email protected]> |
| 2198 |
|
| 2199 |
* datrie/darray.{h,c} (+da_is_walkable), |
| 2200 |
datrie/tail.{h,c} (+tail_is_walkable_char), |
| 2201 |
datrie/trie.c (tail_state_is_terminal): <Optimization> Tested |
| 2202 |
walkability by peeking, instead of trying with a cloned state. |
| 2203 |
|
| 2204 |
* datrie/tail.{h,c} (tail_walk_char): Removed redundant const in |
| 2205 |
parameter. |
| 2206 |
|
| 2207 |
2006-08-29 Theppitak Karoonboonyanan <[email protected]> |
| 2208 |
|
| 2209 |
* datrie/trie.h, datrie/sb-trie.h: Wrapped extern "C" in public |
| 2210 |
headers for compiling with C++ code. |
| 2211 |
|
| 2212 |
2006-08-22 Theppitak Karoonboonyanan <[email protected]> |
| 2213 |
|
| 2214 |
* tools/trietool.c (decode_command): Exited with proper return values. |
| 2215 |
|
| 2216 |
* tools/trietool.c (command_add_list): Removed warning on missing data |
| 2217 |
for keys. This would be normal for data-less dictionaries. |
| 2218 |
|
| 2219 |
2006-08-21 Theppitak Karoonboonyanan <[email protected]> |
| 2220 |
|
| 2221 |
* datrie/trie.{h,c} (trie_state_rewind), |
| 2222 |
datrie/sb-trie.{h,c} (sb_trie_state_rewind): Added API to rewind a |
| 2223 |
trie state to root, so users do not need to reallocate to do so. |
| 2224 |
|
| 2225 |
2006-08-21 Theppitak Karoonboonyanan <[email protected]> |
| 2226 |
|
| 2227 |
* datrie/alpha-map.c (alpha_map_open, alpha_map_new): Better used a |
| 2228 |
dedicated function to initialize the map. |
| 2229 |
|
| 2230 |
2006-08-21 Theppitak Karoonboonyanan <[email protected]> |
| 2231 |
|
| 2232 |
* datrie/alpha-map.c (alpha_map_open): Initialized map list before |
| 2233 |
using. Also skipped mal-formed input lines. |
| 2234 |
|
| 2235 |
* tools/trietool.c (command_add_list): Removed duplicated return. |
| 2236 |
|
| 2237 |
2006-08-21 Theppitak Karoonboonyanan <[email protected]> |
| 2238 |
|
| 2239 |
* configure.ac, Makefile.am, +datrie.pc.in: Added pkgconfig file. |
| 2240 |
|
| 2241 |
2006-08-20 Theppitak Karoonboonyanan <[email protected]> |
| 2242 |
|
| 2243 |
* datrie/sb-trie.{h,c} (sb_trie_state_is_terminal), |
| 2244 |
datrie/trie.{h,c} (trie_state_is_terminal, trie_state_is_leaf): |
| 2245 |
Added API for terminal node check and distinguish it from leaf node. |
| 2246 |
(Terminal node can be in either branch or tail, while leaf can only |
| 2247 |
be in tail.) |
| 2248 |
|
| 2249 |
2006-08-20 Theppitak Karoonboonyanan <[email protected]> |
| 2250 |
|
| 2251 |
* datrie/Makefile.am (pkginclude_HEADERS): Installed sb-trie.h. |
| 2252 |
|
| 2253 |
* datrie/sb-trie.h: Fixed file name in doxygen tag. |
| 2254 |
|
| 2255 |
2006-08-20 Theppitak Karoonboonyanan <[email protected]> |
| 2256 |
|
| 2257 |
* datrie/Makefile.am, +datrie/alpha-map.{h,c}, +datrie/sb-trie.{h,c}: |
| 2258 |
Added alphabet map to map between character set and trie alphabet |
| 2259 |
codes. Also added SBTrie wrapper for 8-bit character sets. |
| 2260 |
|
| 2261 |
* datrie/triedefs.h (TRIE_CHAR_MAX): Changed to 255, to fit char type. |
| 2262 |
|
| 2263 |
* datrie/trie.{h,c} (trie_state_walk): Removed unnecessary const in |
| 2264 |
character argument. |
| 2265 |
|
| 2266 |
* tools/trietool.c: Used SBTrie instead of plain Trie. |
| 2267 |
|
| 2268 |
2006-08-20 Theppitak Karoonboonyanan <[email protected]> |
| 2269 |
|
| 2270 |
* datrie/fileutils.c (file_read_int16): Fixed bitwise calculation. The |
| 2271 |
second byte should be masked to get rid of possible sign bits |
| 2272 |
introduced by type conversion. |
| 2273 |
|
| 2274 |
2006-08-19 Theppitak Karoonboonyanan <[email protected]> |
| 2275 |
|
| 2276 |
* datrie/fileutils.c (file_read_int16, file_write_int16): Used shift |
| 2277 |
operations to serialize int, eliminating dependency on <arpa/inet.h>. |
| 2278 |
Thanks Vee Satayamas for the suggestion. |
| 2279 |
|
| 2280 |
2006-08-18 Theppitak Karoonboonyanan <[email protected]> |
| 2281 |
|
| 2282 |
* datrie/trie.c (trie_retrieve, trie_store, trie_delete): Always walk |
| 2283 |
the null-terminator in tail. Otherwise, comparison with shorter key |
| 2284 |
will terminate at separate node. |
| 2285 |
|
| 2286 |
2006-08-18 Theppitak Karoonboonyanan <[email protected]> |
| 2287 |
|
| 2288 |
* datrie/darray.c (find_free_base): Extended pool before getting |
| 2289 |
exhausted. |
| 2290 |
|
| 2291 |
* tools/trietool.c (command_add_list): Let tab and comma be field |
| 2292 |
delimitors, rather than white spaces in general. |
| 2293 |
|
| 2294 |
* tools/trietool.c (list_enum_func): Do not pad space when printing |
| 2295 |
key data. |
| 2296 |
|
| 2297 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2298 |
|
| 2299 |
* configure.ac, Makefile.am, +doc/Makefile.am, +doc/Doxyfile.in: |
| 2300 |
Generated document using doxygen. |
| 2301 |
|
| 2302 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2303 |
|
| 2304 |
* datrie/darray.c (da_prune, da_num_children -> da_has_children): |
| 2305 |
Just checked whether a node has at least one child, instead of |
| 2306 |
counting children and comparing with zero, as a small optimization. |
| 2307 |
|
| 2308 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2309 |
|
| 2310 |
* tools/trietool.c (command_add_list, command_delete_list): |
| 2311 |
Implemented. |
| 2312 |
|
| 2313 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2314 |
|
| 2315 |
* datrie/trie.{h,c} (trie_enumerate), datrie/darray.{h,c} |
| 2316 |
(da_enumerate, da_enumerate_recursive, da_get_state_key): Added key |
| 2317 |
enumeration method. |
| 2318 |
|
| 2319 |
* tools/trietool.c (command_list): Implemented. |
| 2320 |
|
| 2321 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2322 |
|
| 2323 |
* datrie/trie.{h,c} (trie_delete), datrie/darray.{h,c} (da_prune, |
| 2324 |
da_num_children), datrie/tail.{h,c} (tail_delete): Added key deletion |
| 2325 |
method. |
| 2326 |
|
| 2327 |
* datrie/tail.c (tail_save): Guarded against null suffix. |
| 2328 |
|
| 2329 |
* tools/trietool.c (command_delete): Implemented. |
| 2330 |
|
| 2331 |
2006-08-17 Theppitak Karoonboonyanan <[email protected]> |
| 2332 |
|
| 2333 |
* datrie/darray.c (da_find_free_base): Made sure the free cell for |
| 2334 |
first symbol is beyond header cells. Also repeatedly extended the pool |
| 2335 |
until a free cell is found, in case free list is restarted. |
| 2336 |
|
| 2337 |
2006-08-16 Theppitak Karoonboonyanan <[email protected]> |
| 2338 |
|
| 2339 |
* datrie/fileutils.c (file_open): Created new file only if it does not |
| 2340 |
exist. |
| 2341 |
|
| 2342 |
* datrie/trie.c (trie_branch_in_branch): Also set data for tail block. |
| 2343 |
|
| 2344 |
* datrie/trie.c (trie_branch_in_tail): Do not free the const suffix |
| 2345 |
block, fixing double free bug. |
| 2346 |
|
| 2347 |
* datrie/darray.c (da_insert_branch): Covered the case of negative |
| 2348 |
base, for branching from a separate node. |
| 2349 |
|
| 2350 |
* tools/trietool.c (command_add): Removed debug message. |
| 2351 |
|
| 2352 |
2006-08-16 Theppitak Karoonboonyanan <[email protected]> |
| 2353 |
|
| 2354 |
* configure.ac, Makefile.am, +tools/Makefile.am, +tools/trietool.c: |
| 2355 |
Added trietool utility. |
| 2356 |
|
| 2357 |
* datrie/darray.c (da_get_free_list): Fixed typo in macro name. |
| 2358 |
|
| 2359 |
* datrie/datrie.c (da_extend_pool): Updated num_cells immediately |
| 2360 |
after realloc(), to let the cell accesses pass boundary checks. |
| 2361 |
|
| 2362 |
* datrie/tail.c (tail_get_suffix, tail_set_suffix, tail_alloc_block, |
| 2363 |
tail_free_block, tail_get_data, tail_set_data, tail_walk_str, |
| 2364 |
tail_walk_char): Started tail blocks indexing from 1 (defined as |
| 2365 |
TAIL_START_BLOCKNO macro) rather than 0, because we use signed values |
| 2366 |
to distinguish pointers in darray. |
| 2367 |
|
| 2368 |
* datrie/tail.{c,h} (tail_get_suffix), datrie/trie.c |
| 2369 |
(trie_branch_in_tail): Made tail_get_suffix return const pointer. |
| 2370 |
|
| 2371 |
* datrie/darray.c (da_close, da_save), datrie/tail.c (tail_close, |
| 2372 |
tail_save): Checked errors and returned appropriate codes. |
| 2373 |
|
| 2374 |
* datrie/trie.c (trie_open): Checked errors on files openning and |
| 2375 |
resumed appropriately. |
| 2376 |
|
| 2377 |
2006-08-15 Theppitak Karoonboonyanan <[email protected]> |
| 2378 |
|
| 2379 |
* datrie/Makefile.am, +datrie/fileutils.c: Added fileutils.c for |
| 2380 |
implementation of file utility functions. |
| 2381 |
|
| 2382 |
* datrie/fileutils.{c,h}, datrie/darray.c (da_open), datrie/tail.c |
| 2383 |
(tail_open): Adjusted file_read_int{8,16} API so error can be checked. |
| 2384 |
|
| 2385 |
2006-08-15 Theppitak Karoonboonyanan <[email protected]> |
| 2386 |
|
| 2387 |
* datrie/Makefile.am, +datrie/tail.c, datrie/tail.h: Added tail.c for |
| 2388 |
trie suffix implementation. Adjusted some API to not require size_t. |
| 2389 |
|
| 2390 |
* datrile/fileutils.h: Added more functions required by tail.c. |
| 2391 |
|
| 2392 |
* datrie/trie.c (trie_branch_in_tail): Added check for null suffix. |
| 2393 |
|
| 2394 |
2006-08-14 Theppitak Karoonboonyanan <[email protected]> |
| 2395 |
|
| 2396 |
* datrie/Makefile.am, +datrie/darray.c, +datrie/fileutils.h: |
| 2397 |
Added darray.c for double-array structure implementation, and |
| 2398 |
fileutils.h declarations for keeping file manipulation functions. |
| 2399 |
|
| 2400 |
* datrie/triedefs.h: Added TRIE_CHAR_MAX constant for alphabet |
| 2401 |
enumeration. Changed TRIE_INDEX_ERROR to 0, as negative number has its |
| 2402 |
own meaning. |
| 2403 |
|
| 2404 |
2006-08-12 Theppitak Karoonboonyanan <[email protected]> |
| 2405 |
|
| 2406 |
* === First import the project === |