tyler-trie 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +4 -0
- data/ext/libdatrie/AUTHORS +1 -0
- data/ext/libdatrie/COPYING +510 -0
- data/ext/libdatrie/ChangeLog +410 -0
- data/ext/libdatrie/INSTALL +236 -0
- data/ext/libdatrie/Makefile.am +5 -0
- data/ext/libdatrie/Makefile.in +661 -0
- data/ext/libdatrie/NEWS +27 -0
- data/ext/libdatrie/README +32 -0
- data/ext/libdatrie/aclocal.m4 +7431 -0
- data/ext/libdatrie/config.guess +1516 -0
- data/ext/libdatrie/config.h.in +74 -0
- data/ext/libdatrie/config.sub +1626 -0
- data/ext/libdatrie/configure +22008 -0
- data/ext/libdatrie/configure.ac +71 -0
- data/ext/libdatrie/datrie.pc.in +11 -0
- data/ext/libdatrie/datrie/Makefile.am +35 -0
- data/ext/libdatrie/datrie/Makefile.in +522 -0
- data/ext/libdatrie/datrie/alpha-map.c +170 -0
- data/ext/libdatrie/datrie/alpha-map.h +36 -0
- data/ext/libdatrie/datrie/darray.c +674 -0
- data/ext/libdatrie/datrie/darray.h +229 -0
- data/ext/libdatrie/datrie/fileutils.c +151 -0
- data/ext/libdatrie/datrie/fileutils.h +36 -0
- data/ext/libdatrie/datrie/libdatrie.def +31 -0
- data/ext/libdatrie/datrie/sb-trie.c +331 -0
- data/ext/libdatrie/datrie/sb-trie.h +279 -0
- data/ext/libdatrie/datrie/tail.c +344 -0
- data/ext/libdatrie/datrie/tail.h +200 -0
- data/ext/libdatrie/datrie/trie-private.h +31 -0
- data/ext/libdatrie/datrie/trie.c +413 -0
- data/ext/libdatrie/datrie/trie.h +270 -0
- data/ext/libdatrie/datrie/triedefs.h +63 -0
- data/ext/libdatrie/datrie/typedefs.h +113 -0
- data/ext/libdatrie/depcomp +530 -0
- data/ext/libdatrie/doc/Doxyfile.in +244 -0
- data/ext/libdatrie/doc/Makefile.am +29 -0
- data/ext/libdatrie/doc/Makefile.in +352 -0
- data/ext/libdatrie/install-sh +323 -0
- data/ext/libdatrie/ltmain.sh +6938 -0
- data/ext/libdatrie/man/Makefile.am +4 -0
- data/ext/libdatrie/man/Makefile.in +381 -0
- data/ext/libdatrie/man/trietool.1 +107 -0
- data/ext/libdatrie/missing +360 -0
- data/ext/libdatrie/tools/Makefile.am +7 -0
- data/ext/libdatrie/tools/Makefile.in +460 -0
- data/ext/libdatrie/tools/trietool.c +308 -0
- data/ext/trie/extconf.rb +12 -0
- data/ext/trie/trie.c +174 -0
- data/lib/trie.rb +1 -0
- data/spec/test-trie/README +1 -0
- data/spec/trie_spec.rb +79 -0
- metadata +139 -0
@@ -0,0 +1,410 @@
|
|
1
|
+
2008-01-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
2
|
+
|
3
|
+
* configure.in: Bump the library revision.
|
4
|
+
* NEWS:
|
5
|
+
=== Version 0.1.3 ===
|
6
|
+
|
7
|
+
2008-01-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
8
|
+
|
9
|
+
* man/trietool.1: Add documentation for the SBM file.
|
10
|
+
|
11
|
+
2008-01-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
12
|
+
|
13
|
+
* README: Fix my name in the reference.
|
14
|
+
|
15
|
+
2008-01-10 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
16
|
+
|
17
|
+
* datrie/tail.c (tail_set_suffix): Fix bug for the case in which
|
18
|
+
suffix argument and tail's suffix overlap. Bug report and patch by
|
19
|
+
shepmaster in http://linux.thai.net/node/102.
|
20
|
+
|
21
|
+
2008-01-10 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
22
|
+
|
23
|
+
* datrie/sb-trie.c (sb_trie_root): Return NULL pointer, rather than
|
24
|
+
FALSE. Bug reported by shepmaster in http://linux.thai.net/node/101.
|
25
|
+
|
26
|
+
2007-10-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
27
|
+
|
28
|
+
* datrie/libdatrie.def: List only symbols in plain format, for Mac
|
29
|
+
build. Thanks Vee Satayamas for the report.
|
30
|
+
|
31
|
+
* datrie/Makefile.am: Add libdatrie.def as libdatrie_la_DEPENDENCIES.
|
32
|
+
|
33
|
+
2007-08-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
34
|
+
|
35
|
+
* doc/Doxyfile.in: Only generate doc for public API.
|
36
|
+
|
37
|
+
2007-08-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
38
|
+
|
39
|
+
* doc/Makefile.am, doc/Doxyfile.in: Revert API man pages generation
|
40
|
+
and installation. Update Doxyfile format to doxygen 1.5.3.
|
41
|
+
|
42
|
+
2007-08-26 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
43
|
+
|
44
|
+
* man/trietool.1: Escape some minus signs. Mark a variable italic.
|
45
|
+
Thanks debian's lintian.
|
46
|
+
|
47
|
+
2007-08-26 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
48
|
+
|
49
|
+
* configure.ac: Post-release version bump.
|
50
|
+
|
51
|
+
2007-08-25 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
52
|
+
|
53
|
+
* configure.ac: Bump lib revision.
|
54
|
+
* NEWS:
|
55
|
+
=== Version 0.1.2 ===
|
56
|
+
|
57
|
+
2007-08-25 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
58
|
+
|
59
|
+
* datrie/Makefile.am, +datrie/trie-private.h (MIN_VAL, MAX_VAL):
|
60
|
+
Add utility macros.
|
61
|
+
* datrie/darray.c (da_output_symbols): Adjust loop boundary to be more
|
62
|
+
overflow-safe.
|
63
|
+
* "-------------" (da_has_children, da_relocate_base): Apply the same
|
64
|
+
loop pattern to prevent out-of-range accesses.
|
65
|
+
|
66
|
+
2007-08-24 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
67
|
+
|
68
|
+
* datrie/darray.c (da_output_symbols): Do not try to test symbols
|
69
|
+
beyond trie index range. Fixes segfault for trietool list command.
|
70
|
+
|
71
|
+
2007-08-19 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
72
|
+
|
73
|
+
Handle double array index overflow.
|
74
|
+
|
75
|
+
* datrie/triedefs.h (TRIE_INDEX_MAX): Define maximum index value.
|
76
|
+
* datrie/darray.c (TrieIndexInt): Define type for immediate values, so
|
77
|
+
overflow can be detected.
|
78
|
+
* "-------------" (da_extend_pool): Return success/failure status.
|
79
|
+
Accept TrieIndexInt argument for overflow detection.
|
80
|
+
* "-------------" (da_check_free_cell): False when extending fails.
|
81
|
+
Accept TrieIndexInt argument for overflow detection.
|
82
|
+
* "-------------" (da_find_free_base): Return error on failure.
|
83
|
+
* "-------------" (da_insert_branch): Return error on failure.
|
84
|
+
* datrie/trie.c (trie_branch_in_branch, trie_branch_in_tail): Check
|
85
|
+
for failure from da_insert_branch() and return the status.
|
86
|
+
* datrie/darray.{c,h} (da_prune_upto, da_prune): Add da_prune_upto(),
|
87
|
+
for rolling back partial operation in trie_branch_in_branch().
|
88
|
+
Redefine da_prune() in terms of da_prune_upto().
|
89
|
+
|
90
|
+
2007-08-16 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
91
|
+
|
92
|
+
* datrie/darray.c (da_open, da_find_free_base): Use DA_POOL_BEGIN
|
93
|
+
macro instead of hard-coded number. Remove unused DA_EXTENDING_STEPS.
|
94
|
+
|
95
|
+
2007-05-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
96
|
+
|
97
|
+
* datrie/sb-trie.c (sb_trie_close, sb_trie_save, sb_trie_retrieve,
|
98
|
+
sb_trie_store, sb_trie_enumerate, sb_trie_root, sb_trie_state_clone,
|
99
|
+
sb_trie_state_free, sb_trie_state_rewind, sb_trie_state_walk,
|
100
|
+
sb_trie_state_is_walkable, sb_trie_state_is_terminal,
|
101
|
+
sb_trie_state_is_leaf, sb_trie_state_get_data):
|
102
|
+
Guard against NULL pointers in functions. Thanks to Neutron Soutmun
|
103
|
+
for bug report and initial patch.
|
104
|
+
|
105
|
+
2007-04-06 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
106
|
+
|
107
|
+
* doc/Makefile.am: Add install-man target. Also install/uninstall
|
108
|
+
doxygen-generated man pages.
|
109
|
+
|
110
|
+
2007-03-27 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
111
|
+
|
112
|
+
* configure.ac (LT_CURRENT, LT_REVISION, LT_AGE),
|
113
|
+
datrie/Makefile.am (libdatrie_la_LDFLAGS), +datrie/libdatrie.def:
|
114
|
+
Add library version info. Limit exported symbols with -export-symbols
|
115
|
+
flag. Always pass -no-undefined flag.
|
116
|
+
|
117
|
+
* configure.ac: Add Win32 DLL building support.
|
118
|
+
|
119
|
+
2006-11-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
120
|
+
|
121
|
+
* datrie/fileutils.{c,h} (file_read_int32, file_write_int32): Add
|
122
|
+
int32 read/write functions.
|
123
|
+
|
124
|
+
* datrie/fileutils.c (file_read_int16, file_write_int16): Use unsigned
|
125
|
+
char buffer instead of and-ing with 0xff, in accordance with int32
|
126
|
+
functions. (Thanks to Vee Satayamas for suggestion).
|
127
|
+
|
128
|
+
2006-10-13 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
129
|
+
|
130
|
+
* configure.ac: Post-release version bump.
|
131
|
+
|
132
|
+
2006-10-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
133
|
+
|
134
|
+
* NEWS:
|
135
|
+
=== Version 0.1.1 ===
|
136
|
+
|
137
|
+
2006-10-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
138
|
+
|
139
|
+
* configure.ac, Makefile.am, +man/Makefile.am, +man/trietool.1:
|
140
|
+
Add manpage for trietool (moved from debian/).
|
141
|
+
|
142
|
+
2006-10-11 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
143
|
+
|
144
|
+
Fixed compiler warnings.
|
145
|
+
|
146
|
+
* datrie/sb-trie.c (sb_map_alphabet_to_char_str):
|
147
|
+
* datrie/tail.c (tail_open, tail_save, tail_set_suffix):
|
148
|
+
* datrie/trie.c (trie_da_enum_func): Cast pointers to get rid of
|
149
|
+
compiler warnings about char signedness.
|
150
|
+
|
151
|
+
* tools/trietool.c (list_enum_func): Return value on exit.
|
152
|
+
|
153
|
+
2006-09-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
154
|
+
|
155
|
+
* configure.ac: Post-release version bump.
|
156
|
+
|
157
|
+
2006-09-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
158
|
+
|
159
|
+
* NEWS, configure.ac:
|
160
|
+
=== Version 0.1.0 ===
|
161
|
+
|
162
|
+
2006-09-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
163
|
+
|
164
|
+
* README: Filled in.
|
165
|
+
|
166
|
+
2006-09-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
167
|
+
|
168
|
+
* datrie/triedefs.h, datrie/trie.h, datrie/sb-trie.h: Included headers
|
169
|
+
using system header forms in installed headers.
|
170
|
+
|
171
|
+
* datrie/Makefile.am (INCLUDES): Added include flag to ensure it
|
172
|
+
compiles without prior installation.
|
173
|
+
|
174
|
+
2006-09-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
175
|
+
|
176
|
+
* datrie/alpha-map.c (alpha_map_char_to_alphabet,
|
177
|
+
alpha_map_alphabet_to_char): Made sure terminator is always mapped
|
178
|
+
with character 0.
|
179
|
+
|
180
|
+
2006-09-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
181
|
+
|
182
|
+
* datrie/darray.{h,c} (da_is_walkable),
|
183
|
+
datrie/tail.{h,c} (tail_is_walkable_char): Made the tiny functions
|
184
|
+
inline (i.e. macros), for tiny performance gain.
|
185
|
+
|
186
|
+
2006-09-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
187
|
+
|
188
|
+
* datrie/sb-trie.{h,c} (+sb_trie_state_is_walkable): Added walkability
|
189
|
+
test wrapper.
|
190
|
+
|
191
|
+
* datrie/sb-trie.h (sb_trie_state_is_terminal, sb_trie_state_is_leaf),
|
192
|
+
datrie/trie.h (trie_state_is_terminal, trie_state_is_leaf): Fixed typo
|
193
|
+
for "\brief" doxygen tag.
|
194
|
+
|
195
|
+
2006-09-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
196
|
+
|
197
|
+
* datrie/trie.{h,c} (trie_state_is_terminal, +trie_state_is_walkable):
|
198
|
+
Changed trie_state_is_terminal() into a generic walkability test, and
|
199
|
+
made itself a specialized macro calling the function.
|
200
|
+
|
201
|
+
2006-08-31 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
202
|
+
|
203
|
+
* datrie/darray.{h,c} (+da_is_walkable),
|
204
|
+
datrie/tail.{h,c} (+tail_is_walkable_char),
|
205
|
+
datrie/trie.c (tail_state_is_terminal): <Optimization> Tested
|
206
|
+
walkability by peeking, instead of trying with a cloned state.
|
207
|
+
|
208
|
+
* datrie/tail.{h,c} (tail_walk_char): Removed redundant const in
|
209
|
+
parameter.
|
210
|
+
|
211
|
+
2006-08-29 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
212
|
+
|
213
|
+
* datrie/trie.h, datrie/sb-trie.h: Wrapped extern "C" in public
|
214
|
+
headers for compiling with C++ code.
|
215
|
+
|
216
|
+
2006-08-22 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
217
|
+
|
218
|
+
* tools/trietool.c (decode_command): Exited with proper return values.
|
219
|
+
|
220
|
+
* tools/trietool.c (command_add_list): Removed warning on missing data
|
221
|
+
for keys. This would be normal for data-less dictionaries.
|
222
|
+
|
223
|
+
2006-08-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
224
|
+
|
225
|
+
* datrie/trie.{h,c} (trie_state_rewind),
|
226
|
+
datrie/sb-trie.{h,c} (sb_trie_state_rewind): Added API to rewind a
|
227
|
+
trie state to root, so users do not need to reallocate to do so.
|
228
|
+
|
229
|
+
2006-08-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
230
|
+
|
231
|
+
* datrie/alpha-map.c (alpha_map_open, alpha_map_new): Better used a
|
232
|
+
dedicated function to initialize the map.
|
233
|
+
|
234
|
+
2006-08-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
235
|
+
|
236
|
+
* datrie/alpha-map.c (alpha_map_open): Initialized map list before
|
237
|
+
using. Also skipped mal-formed input lines.
|
238
|
+
|
239
|
+
* tools/trietool.c (command_add_list): Removed duplicated return.
|
240
|
+
|
241
|
+
2006-08-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
242
|
+
|
243
|
+
* configure.ac, Makefile.am, +datrie.pc.in: Added pkgconfig file.
|
244
|
+
|
245
|
+
2006-08-20 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
246
|
+
|
247
|
+
* datrie/sb-trie.{h,c} (sb_trie_state_is_terminal),
|
248
|
+
datrie/trie.{h,c} (trie_state_is_terminal, trie_state_is_leaf):
|
249
|
+
Added API for terminal node check and distinguish it from leaf node.
|
250
|
+
(Terminal node can be in either branch or tail, while leaf can only
|
251
|
+
be in tail.)
|
252
|
+
|
253
|
+
2006-08-20 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
254
|
+
|
255
|
+
* datrie/Makefile.am (pkginclude_HEADERS): Installed sb-trie.h.
|
256
|
+
|
257
|
+
* datrie/sb-trie.h: Fixed file name in doxygen tag.
|
258
|
+
|
259
|
+
2006-08-20 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
260
|
+
|
261
|
+
* datrie/Makefile.am, +datrie/alpha-map.{h,c}, +datrie/sb-trie.{h,c}:
|
262
|
+
Added alphabet map to map between character set and trie alphabet
|
263
|
+
codes. Also added SBTrie wrapper for 8-bit character sets.
|
264
|
+
|
265
|
+
* datrie/triedefs.h (TRIE_CHAR_MAX): Changed to 255, to fit char type.
|
266
|
+
|
267
|
+
* datrie/trie.{h,c} (trie_state_walk): Removed unnecessary const in
|
268
|
+
character argument.
|
269
|
+
|
270
|
+
* tools/trietool.c: Used SBTrie instead of plain Trie.
|
271
|
+
|
272
|
+
2006-08-20 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
273
|
+
|
274
|
+
* datrie/fileutils.c (file_read_int16): Fixed bitwise calculation. The
|
275
|
+
second byte should be masked to get rid of possible sign bits
|
276
|
+
introduced by type conversion.
|
277
|
+
|
278
|
+
2006-08-19 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
279
|
+
|
280
|
+
* datrie/fileutils.c (file_read_int16, file_write_int16): Used shift
|
281
|
+
operations to serialize int, eliminating dependency on <arpa/inet.h>.
|
282
|
+
Thanks Vee Satayamas for the suggestion.
|
283
|
+
|
284
|
+
2006-08-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
285
|
+
|
286
|
+
* datrie/trie.c (trie_retrieve, trie_store, trie_delete): Always walk
|
287
|
+
the null-terminator in tail. Otherwise, comparison with shorter key
|
288
|
+
will terminate at separate node.
|
289
|
+
|
290
|
+
2006-08-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
291
|
+
|
292
|
+
* datrie/darray.c (find_free_base): Extended pool before getting
|
293
|
+
exhausted.
|
294
|
+
|
295
|
+
* tools/trietool.c (command_add_list): Let tab and comma be field
|
296
|
+
delimitors, rather than white spaces in general.
|
297
|
+
|
298
|
+
* tools/trietool.c (list_enum_func): Do not pad space when printing
|
299
|
+
key data.
|
300
|
+
|
301
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
302
|
+
|
303
|
+
* configure.ac, Makefile.am, +doc/Makefile.am, +doc/Doxyfile.in:
|
304
|
+
Generated document using doxygen.
|
305
|
+
|
306
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
307
|
+
|
308
|
+
* datrie/darray.c (da_prune, da_num_children -> da_has_children):
|
309
|
+
Just checked whether a node has at least one child, instead of
|
310
|
+
counting children and comparing with zero, as a small optimization.
|
311
|
+
|
312
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
313
|
+
|
314
|
+
* tools/trietool.c (command_add_list, command_delete_list):
|
315
|
+
Implemented.
|
316
|
+
|
317
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
318
|
+
|
319
|
+
* datrie/trie.{h,c} (trie_enumerate), datrie/darray.{h,c}
|
320
|
+
(da_enumerate, da_enumerate_recursive, da_get_state_key): Added key
|
321
|
+
enumeration method.
|
322
|
+
|
323
|
+
* tools/trietool.c (command_list): Implemented.
|
324
|
+
|
325
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
326
|
+
|
327
|
+
* datrie/trie.{h,c} (trie_delete), datrie/darray.{h,c} (da_prune,
|
328
|
+
da_num_children), datrie/tail.{h,c} (tail_delete): Added key deletion
|
329
|
+
method.
|
330
|
+
|
331
|
+
* datrie/tail.c (tail_save): Guarded against null suffix.
|
332
|
+
|
333
|
+
* tools/trietool.c (command_delete): Implemented.
|
334
|
+
|
335
|
+
2006-08-17 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
336
|
+
|
337
|
+
* datrie/darray.c (da_find_free_base): Made sure the free cell for
|
338
|
+
first symbol is beyond header cells. Also repeatedly extended the pool
|
339
|
+
until a free cell is found, in case free list is restarted.
|
340
|
+
|
341
|
+
2006-08-16 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
342
|
+
|
343
|
+
* datrie/fileutils.c (file_open): Created new file only if it does not
|
344
|
+
exist.
|
345
|
+
|
346
|
+
* datrie/trie.c (trie_branch_in_branch): Also set data for tail block.
|
347
|
+
|
348
|
+
* datrie/trie.c (trie_branch_in_tail): Do not free the const suffix
|
349
|
+
block, fixing double free bug.
|
350
|
+
|
351
|
+
* datrie/darray.c (da_insert_branch): Covered the case of negative
|
352
|
+
base, for branching from a separate node.
|
353
|
+
|
354
|
+
* tools/trietool.c (command_add): Removed debug message.
|
355
|
+
|
356
|
+
2006-08-16 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
357
|
+
|
358
|
+
* configure.ac, Makefile.am, +tools/Makefile.am, +tools/trietool.c:
|
359
|
+
Added trietool utility.
|
360
|
+
|
361
|
+
* datrie/darray.c (da_get_free_list): Fixed typo in macro name.
|
362
|
+
|
363
|
+
* datrie/datrie.c (da_extend_pool): Updated num_cells immediately
|
364
|
+
after realloc(), to let the cell accesses pass boundary checks.
|
365
|
+
|
366
|
+
* datrie/tail.c (tail_get_suffix, tail_set_suffix, tail_alloc_block,
|
367
|
+
tail_free_block, tail_get_data, tail_set_data, tail_walk_str,
|
368
|
+
tail_walk_char): Started tail blocks indexing from 1 (defined as
|
369
|
+
TAIL_START_BLOCKNO macro) rather than 0, because we use signed values
|
370
|
+
to distinguish pointers in darray.
|
371
|
+
|
372
|
+
* datrie/tail.{c,h} (tail_get_suffix), datrie/trie.c
|
373
|
+
(trie_branch_in_tail): Made tail_get_suffix return const pointer.
|
374
|
+
|
375
|
+
* datrie/darray.c (da_close, da_save), datrie/tail.c (tail_close,
|
376
|
+
tail_save): Checked errors and returned appropriate codes.
|
377
|
+
|
378
|
+
* datrie/trie.c (trie_open): Checked errors on files openning and
|
379
|
+
resumed appropriately.
|
380
|
+
|
381
|
+
2006-08-15 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
382
|
+
|
383
|
+
* datrie/Makefile.am, +datrie/fileutils.c: Added fileutils.c for
|
384
|
+
implementation of file utility functions.
|
385
|
+
|
386
|
+
* datrie/fileutils.{c,h}, datrie/darray.c (da_open), datrie/tail.c
|
387
|
+
(tail_open): Adjusted file_read_int{8,16} API so error can be checked.
|
388
|
+
|
389
|
+
2006-08-15 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
390
|
+
|
391
|
+
* datrie/Makefile.am, +datrie/tail.c, datrie/tail.h: Added tail.c for
|
392
|
+
trie suffix implementation. Adjusted some API to not require size_t.
|
393
|
+
|
394
|
+
* datrile/fileutils.h: Added more functions required by tail.c.
|
395
|
+
|
396
|
+
* datrie/trie.c (trie_branch_in_tail): Added check for null suffix.
|
397
|
+
|
398
|
+
2006-08-14 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
399
|
+
|
400
|
+
* datrie/Makefile.am, +datrie/darray.c, +datrie/fileutils.h:
|
401
|
+
Added darray.c for double-array structure implementation, and
|
402
|
+
fileutils.h declarations for keeping file manipulation functions.
|
403
|
+
|
404
|
+
* datrie/triedefs.h: Added TRIE_CHAR_MAX constant for alphabet
|
405
|
+
enumeration. Changed TRIE_INDEX_ERROR to 0, as negative number has its
|
406
|
+
own meaning.
|
407
|
+
|
408
|
+
2006-08-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
409
|
+
|
410
|
+
* === First import the project ===
|
@@ -0,0 +1,236 @@
|
|
1
|
+
Installation Instructions
|
2
|
+
*************************
|
3
|
+
|
4
|
+
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
5
|
+
Software Foundation, Inc.
|
6
|
+
|
7
|
+
This file is free documentation; the Free Software Foundation gives
|
8
|
+
unlimited permission to copy, distribute and modify it.
|
9
|
+
|
10
|
+
Basic Installation
|
11
|
+
==================
|
12
|
+
|
13
|
+
These are generic installation instructions.
|
14
|
+
|
15
|
+
The `configure' shell script attempts to guess correct values for
|
16
|
+
various system-dependent variables used during compilation. It uses
|
17
|
+
those values to create a `Makefile' in each directory of the package.
|
18
|
+
It may also create one or more `.h' files containing system-dependent
|
19
|
+
definitions. Finally, it creates a shell script `config.status' that
|
20
|
+
you can run in the future to recreate the current configuration, and a
|
21
|
+
file `config.log' containing compiler output (useful mainly for
|
22
|
+
debugging `configure').
|
23
|
+
|
24
|
+
It can also use an optional file (typically called `config.cache'
|
25
|
+
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
26
|
+
the results of its tests to speed up reconfiguring. (Caching is
|
27
|
+
disabled by default to prevent problems with accidental use of stale
|
28
|
+
cache files.)
|
29
|
+
|
30
|
+
If you need to do unusual things to compile the package, please try
|
31
|
+
to figure out how `configure' could check whether to do them, and mail
|
32
|
+
diffs or instructions to the address given in the `README' so they can
|
33
|
+
be considered for the next release. If you are using the cache, and at
|
34
|
+
some point `config.cache' contains results you don't want to keep, you
|
35
|
+
may remove or edit it.
|
36
|
+
|
37
|
+
The file `configure.ac' (or `configure.in') is used to create
|
38
|
+
`configure' by a program called `autoconf'. You only need
|
39
|
+
`configure.ac' if you want to change it or regenerate `configure' using
|
40
|
+
a newer version of `autoconf'.
|
41
|
+
|
42
|
+
The simplest way to compile this package is:
|
43
|
+
|
44
|
+
1. `cd' to the directory containing the package's source code and type
|
45
|
+
`./configure' to configure the package for your system. If you're
|
46
|
+
using `csh' on an old version of System V, you might need to type
|
47
|
+
`sh ./configure' instead to prevent `csh' from trying to execute
|
48
|
+
`configure' itself.
|
49
|
+
|
50
|
+
Running `configure' takes awhile. While running, it prints some
|
51
|
+
messages telling which features it is checking for.
|
52
|
+
|
53
|
+
2. Type `make' to compile the package.
|
54
|
+
|
55
|
+
3. Optionally, type `make check' to run any self-tests that come with
|
56
|
+
the package.
|
57
|
+
|
58
|
+
4. Type `make install' to install the programs and any data files and
|
59
|
+
documentation.
|
60
|
+
|
61
|
+
5. You can remove the program binaries and object files from the
|
62
|
+
source code directory by typing `make clean'. To also remove the
|
63
|
+
files that `configure' created (so you can compile the package for
|
64
|
+
a different kind of computer), type `make distclean'. There is
|
65
|
+
also a `make maintainer-clean' target, but that is intended mainly
|
66
|
+
for the package's developers. If you use it, you may have to get
|
67
|
+
all sorts of other programs in order to regenerate files that came
|
68
|
+
with the distribution.
|
69
|
+
|
70
|
+
Compilers and Options
|
71
|
+
=====================
|
72
|
+
|
73
|
+
Some systems require unusual options for compilation or linking that the
|
74
|
+
`configure' script does not know about. Run `./configure --help' for
|
75
|
+
details on some of the pertinent environment variables.
|
76
|
+
|
77
|
+
You can give `configure' initial values for configuration parameters
|
78
|
+
by setting variables in the command line or in the environment. Here
|
79
|
+
is an example:
|
80
|
+
|
81
|
+
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
82
|
+
|
83
|
+
*Note Defining Variables::, for more details.
|
84
|
+
|
85
|
+
Compiling For Multiple Architectures
|
86
|
+
====================================
|
87
|
+
|
88
|
+
You can compile the package for more than one kind of computer at the
|
89
|
+
same time, by placing the object files for each architecture in their
|
90
|
+
own directory. To do this, you must use a version of `make' that
|
91
|
+
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
92
|
+
directory where you want the object files and executables to go and run
|
93
|
+
the `configure' script. `configure' automatically checks for the
|
94
|
+
source code in the directory that `configure' is in and in `..'.
|
95
|
+
|
96
|
+
If you have to use a `make' that does not support the `VPATH'
|
97
|
+
variable, you have to compile the package for one architecture at a
|
98
|
+
time in the source code directory. After you have installed the
|
99
|
+
package for one architecture, use `make distclean' before reconfiguring
|
100
|
+
for another architecture.
|
101
|
+
|
102
|
+
Installation Names
|
103
|
+
==================
|
104
|
+
|
105
|
+
By default, `make install' installs the package's commands under
|
106
|
+
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
107
|
+
can specify an installation prefix other than `/usr/local' by giving
|
108
|
+
`configure' the option `--prefix=PREFIX'.
|
109
|
+
|
110
|
+
You can specify separate installation prefixes for
|
111
|
+
architecture-specific files and architecture-independent files. If you
|
112
|
+
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
113
|
+
PREFIX as the prefix for installing programs and libraries.
|
114
|
+
Documentation and other data files still use the regular prefix.
|
115
|
+
|
116
|
+
In addition, if you use an unusual directory layout you can give
|
117
|
+
options like `--bindir=DIR' to specify different values for particular
|
118
|
+
kinds of files. Run `configure --help' for a list of the directories
|
119
|
+
you can set and what kinds of files go in them.
|
120
|
+
|
121
|
+
If the package supports it, you can cause programs to be installed
|
122
|
+
with an extra prefix or suffix on their names by giving `configure' the
|
123
|
+
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
124
|
+
|
125
|
+
Optional Features
|
126
|
+
=================
|
127
|
+
|
128
|
+
Some packages pay attention to `--enable-FEATURE' options to
|
129
|
+
`configure', where FEATURE indicates an optional part of the package.
|
130
|
+
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
131
|
+
is something like `gnu-as' or `x' (for the X Window System). The
|
132
|
+
`README' should mention any `--enable-' and `--with-' options that the
|
133
|
+
package recognizes.
|
134
|
+
|
135
|
+
For packages that use the X Window System, `configure' can usually
|
136
|
+
find the X include and library files automatically, but if it doesn't,
|
137
|
+
you can use the `configure' options `--x-includes=DIR' and
|
138
|
+
`--x-libraries=DIR' to specify their locations.
|
139
|
+
|
140
|
+
Specifying the System Type
|
141
|
+
==========================
|
142
|
+
|
143
|
+
There may be some features `configure' cannot figure out automatically,
|
144
|
+
but needs to determine by the type of machine the package will run on.
|
145
|
+
Usually, assuming the package is built to be run on the _same_
|
146
|
+
architectures, `configure' can figure that out, but if it prints a
|
147
|
+
message saying it cannot guess the machine type, give it the
|
148
|
+
`--build=TYPE' option. TYPE can either be a short name for the system
|
149
|
+
type, such as `sun4', or a canonical name which has the form:
|
150
|
+
|
151
|
+
CPU-COMPANY-SYSTEM
|
152
|
+
|
153
|
+
where SYSTEM can have one of these forms:
|
154
|
+
|
155
|
+
OS KERNEL-OS
|
156
|
+
|
157
|
+
See the file `config.sub' for the possible values of each field. If
|
158
|
+
`config.sub' isn't included in this package, then this package doesn't
|
159
|
+
need to know the machine type.
|
160
|
+
|
161
|
+
If you are _building_ compiler tools for cross-compiling, you should
|
162
|
+
use the option `--target=TYPE' to select the type of system they will
|
163
|
+
produce code for.
|
164
|
+
|
165
|
+
If you want to _use_ a cross compiler, that generates code for a
|
166
|
+
platform different from the build platform, you should specify the
|
167
|
+
"host" platform (i.e., that on which the generated programs will
|
168
|
+
eventually be run) with `--host=TYPE'.
|
169
|
+
|
170
|
+
Sharing Defaults
|
171
|
+
================
|
172
|
+
|
173
|
+
If you want to set default values for `configure' scripts to share, you
|
174
|
+
can create a site shell script called `config.site' that gives default
|
175
|
+
values for variables like `CC', `cache_file', and `prefix'.
|
176
|
+
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
177
|
+
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
178
|
+
`CONFIG_SITE' environment variable to the location of the site script.
|
179
|
+
A warning: not all `configure' scripts look for a site script.
|
180
|
+
|
181
|
+
Defining Variables
|
182
|
+
==================
|
183
|
+
|
184
|
+
Variables not defined in a site shell script can be set in the
|
185
|
+
environment passed to `configure'. However, some packages may run
|
186
|
+
configure again during the build, and the customized values of these
|
187
|
+
variables may be lost. In order to avoid this problem, you should set
|
188
|
+
them in the `configure' command line, using `VAR=value'. For example:
|
189
|
+
|
190
|
+
./configure CC=/usr/local2/bin/gcc
|
191
|
+
|
192
|
+
causes the specified `gcc' to be used as the C compiler (unless it is
|
193
|
+
overridden in the site shell script). Here is a another example:
|
194
|
+
|
195
|
+
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
196
|
+
|
197
|
+
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
198
|
+
configuration-related scripts to be executed by `/bin/bash'.
|
199
|
+
|
200
|
+
`configure' Invocation
|
201
|
+
======================
|
202
|
+
|
203
|
+
`configure' recognizes the following options to control how it operates.
|
204
|
+
|
205
|
+
`--help'
|
206
|
+
`-h'
|
207
|
+
Print a summary of the options to `configure', and exit.
|
208
|
+
|
209
|
+
`--version'
|
210
|
+
`-V'
|
211
|
+
Print the version of Autoconf used to generate the `configure'
|
212
|
+
script, and exit.
|
213
|
+
|
214
|
+
`--cache-file=FILE'
|
215
|
+
Enable the cache: use and save the results of the tests in FILE,
|
216
|
+
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
217
|
+
disable caching.
|
218
|
+
|
219
|
+
`--config-cache'
|
220
|
+
`-C'
|
221
|
+
Alias for `--cache-file=config.cache'.
|
222
|
+
|
223
|
+
`--quiet'
|
224
|
+
`--silent'
|
225
|
+
`-q'
|
226
|
+
Do not print messages saying which checks are being made. To
|
227
|
+
suppress all normal output, redirect it to `/dev/null' (any error
|
228
|
+
messages will still be shown).
|
229
|
+
|
230
|
+
`--srcdir=DIR'
|
231
|
+
Look for the package's source code in directory DIR. Usually
|
232
|
+
`configure' can determine that directory automatically.
|
233
|
+
|
234
|
+
`configure' also accepts some other, not widely useful, options. Run
|
235
|
+
`configure --help' for more details.
|
236
|
+
|