1228060Sbapt2007-04-30  Brendan Kehoe  <brendan@zen.org>
2228060Sbapt
3228060Sbapt	* gperf-3.0.3 released.
4228060Sbapt	* src/version.cc: Bump to 3.0.3.
5228060Sbapt	* tests/*.exp: Bump to 3.0.3 in header.
6228060Sbapt	* doc/gperf.1: Regenerate with gperf 3.0.3.
7228060Sbapt
8228060Sbapt2007-04-06  Bruno Haible  <bruno@clisp.org>
9228060Sbapt
10228060Sbapt	Improve support for mingw.
11228060Sbapt	* tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal,
12228060Sbapt	check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff.
13228060Sbapt	(POSTPROCESS_FOR_MINGW): New variable.
14228060Sbapt	(check-test): Use it to postprocess output before diff.
15228060Sbapt
16228060Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
17228060Sbapt
18228060Sbapt	Support for newer GNU standards.
19228060Sbapt	* doc/configure.ac (mandir): Remove assignment.
20228060Sbapt	* doc/Makefile.in (datarootdir): New variable.
21228060Sbapt	(docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by
22228060Sbapt	autoconf.
23228060Sbapt	* configure.ac: Require autoconf >= 2.60.
24228060Sbapt	* doc/configure.ac: Likewise.
25228060Sbapt	* lib/configure.ac: Likewise.
26228060Sbapt	* src/configure.ac: Likewise.
27228060Sbapt	* tests/configure.ac: Likewise.
28228060Sbapt	* configure: Regenerated with autoconf-2.61.
29228060Sbapt	* doc/configure: Likewise.
30228060Sbapt	* lib/configure: Likewise.
31228060Sbapt	* src/configure: Likewise.
32228060Sbapt	* tests/configure: Likewise.
33228060Sbapt	* src/config.h.in: Likewise.
34228060Sbapt	* src/config.h.msvc: Likewise.
35228060Sbapt	* src/config.h_vms: Likewise.
36228060Sbapt
37228060Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
38228060Sbapt
39228060Sbapt	* doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL
40228060Sbapt	environment variables.
41228060Sbapt
42228060Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
43228060Sbapt
44228060Sbapt	* configure.ac: Renamed from configure.in.
45228060Sbapt	* doc/configure.ac: Renamed from doc/configure.in.
46228060Sbapt	* lib/configure.ac: Renamed from lib/configure.in.
47228060Sbapt	* src/configure.ac: Renamed from src/configure.in.
48228060Sbapt	* tests/configure.ac: Renamed from tests/configure.in.
49228060Sbapt	* Makefile.devel: Update.
50228060Sbapt	* INSTALL: Update.
51228060Sbapt
52228060Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
53228060Sbapt
54228060Sbapt	* tests/test.c (in_word_set): New declaration.
55228060Sbapt	* tests/test2.c (in_word_set): Likewise.
56228060Sbapt
57228060Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
58228060Sbapt
59228060Sbapt	* src/options.cc (Options::parse_options): Bump copyright year.
60228060Sbapt
61228060Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
62228060Sbapt
63228060Sbapt	* doc/gperf.texi: Fix typo.
64228060Sbapt
65228060Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
66228060Sbapt
67228060Sbapt	Change generated code after the meaning of __inline is changed in
68228060Sbapt	GCC 4.3.
69228060Sbapt	* src/output.cc (Output::output_lookup_function): Emit an inline
70228060Sbapt	marker that also works with gcc-4.3 in c99 or gnu99 mode.
71228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
72228060Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
73228060Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
74228060Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
75228060Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
76228060Sbapt	Reported by Bruce Korb <Bruce.Korb@gmail.com>.
77228060Sbapt
78228060Sbapt2006-06-29  Brendan Kehoe  <brendan@zen.org>
79228060Sbapt
80228060Sbapt	* gperf-3.0.2 released.
81228060Sbapt
82228060Sbapt	* doc/Makefile.in (all): No longer depend on dvi.
83228060Sbapt
84228060Sbapt2006-01-22  Brendan Kehoe  <brendan@zen.org>
85228060Sbapt
86228060Sbapt	* doc/gperf.texi: Update copyright to be 1989-2006.
87228060Sbapt	(UPDATED): Change to 22 January 2006.
88228060Sbapt	* doc/gperf.1 (TH): Fix date.
89228060Sbapt	* configure.in: Update copyright years.
90228060Sbapt	* configure: Regenerate.
91228060Sbapt	* src/Makefile.in: Update copyright years.
92228060Sbapt
93228060Sbapt	* doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex
94228060Sbapt	instead of trying to use texi2dvi, whose run of etex ends up
95228060Sbapt	actually always running pdfetex, thus always recreating gperf.pdf.
96228060Sbapt
97228060Sbapt2006-01-13  Brendan Kehoe  <brendan@zen.org>
98228060Sbapt
99228060Sbapt	* NEWS: Add note about #line directive fix.
100228060Sbapt	* doc/gperf.1: Regenerate with Makefile.devel.
101228060Sbapt
102228060Sbapt	* doc/gperf.texi (UPDATED): Correct to be today.
103228060Sbapt	* doc: Regenerated by doing make in a configured tree.
104228060Sbapt	Requires makeinfo, texi2dvi, texi2pdf, and texi2html.
105228060Sbapt
106228060Sbapt	* configure.in: Add AC_OBJEXT and AC_EXEEXT.
107228060Sbapt	* lib/Makefile.in (OBJEXT): Define for subst.
108228060Sbapt	(OBJECTS): Use $(OBJEXT) instead of '.o'.
109228060Sbapt	* src/Makefile.in: Make dependencies use $(OBJEXT).
110228060Sbapt	(OBJEXT, EXEEXT): Define for subst.
111228060Sbapt	(TARGETPROG): Add $(EXEEXT).
112228060Sbapt	(OBJECTS): Use $(OBJEXT) instead of '.o'.
113228060Sbapt	(clean): Remove *.$(OBJEXT) instead of *.o.
114228060Sbapt
115228060Sbapt2006-01-13  Bruno Haible  <bruno@clisp.org>
116228060Sbapt
117228060Sbapt	Fix #line directives for filenames containing backslashes.
118228060Sbapt	* src/output.cc (output_line_directive): New function.
119228060Sbapt	(output_keyword_entry, Output::output): Use it.
120228060Sbapt	Reported by Alexander <alexander.me@gmail.com>.
121228060Sbapt
122228060Sbapt	* src/options.cc (Options::parse_options): Update years in --version
123228060Sbapt	output.
124228060Sbapt
125228060Sbapt2005-08-29  Brendan Kehoe  <brendan@zen.org>
126228060Sbapt
127228060Sbapt	* src/keyword.cc: Tweak comment to avoid nesting.
128228060Sbapt
129228060Sbapt2005-08-27  Bruno Haible  <bruno@clisp.org>
130228060Sbapt
131228060Sbapt	Fix missing ranlib detection when cross-compiling.
132228060Sbapt	* aclocal.m4 (CL_PROG_RANLIB): Remove macro.
133228060Sbapt	* lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB.
134228060Sbapt
135228060Sbapt2005-07-30  Bruno Haible  <bruno@clisp.org>
136228060Sbapt
137228060Sbapt	* src/version.cc: Bump version number to 3.0.2.
138228060Sbapt	* doc/gperf.texi: Likewise.
139228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
140228060Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
141228060Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
142228060Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
143228060Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
144228060Sbapt
145228060Sbapt2005-07-30  Bruno Haible  <bruno@clisp.org>
146228060Sbapt
147228060Sbapt	* src/positions.h: Add forward declarations of friend classes.
148228060Sbapt	Needed for compilation with g++ 4.0.
149228060Sbapt
150228060Sbapt2004-08-22  Bruno Haible  <bruno@clisp.org>
151228060Sbapt
152228060Sbapt	* tests/Makefile.in (check-lang-syntax): Add test for the
153228060Sbapt	--length-table-name option.
154228060Sbapt	* tests/test-6.exp: Update.
155228060Sbapt
156228060Sbapt2004-08-21  Bruce Lilly <blilly@erols.com>
157228060Sbapt
158228060Sbapt	* src/input.cc (Input::read_input): Accept length-table-name
159228060Sbapt	declaration.
160228060Sbapt	* src/options.h (Options::get_lengthtable_name,
161228060Sbapt	Options::set_lengthtable_name): New declarations.
162228060Sbapt	(Options): Add field _lengthtable_name.
163228060Sbapt	* src/options.icc (Options::get_lengthtable_name): New inline method.
164228060Sbapt	* src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant.
165228060Sbapt	(Options::long_usage): Document --length-table-name option.
166228060Sbapt	(Options::Options): Initialize _lengthtable_name field.
167228060Sbapt	(Options::~Options): Update.
168228060Sbapt	(Options::set_lengthtable_name): New method.
169228060Sbapt	(long_options): Add option --length-table-name.
170228060Sbapt	(Options::parse_options): Implement --length-table-name option.
171228060Sbapt	* src/output.cc (Output::output_keylength_table, output_switch_case,
172228060Sbapt	Output::output_lookup_function_body): Use option.get_lengthtable_name.
173228060Sbapt	* doc/gperf.texi (Gperf Declarations): Document %define
174228060Sbapt	length-table-name.
175228060Sbapt	(Output Details): Document --length-table-name option.
176228060Sbapt
177228060Sbapt2003-06-12  Bruno Haible  <bruno@clisp.org>
178228060Sbapt
179228060Sbapt	* gperf-3.0.1 released.
180228060Sbapt
181228060Sbapt	* src/version.cc: Bump version number to 3.0.1.
182228060Sbapt	* doc/gperf.texi: Likewise.
183228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
184228060Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
185228060Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
186228060Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
187228060Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
188228060Sbapt
189228060Sbapt2003-05-31  Bruno Haible  <bruno@clisp.org>
190228060Sbapt
191228060Sbapt	* doc/gperf.texi (User-supplied Struct): Mention the possibility of an
192228060Sbapt	abbreviated struct declaration.
193228060Sbapt	* src/input.cc (Input::read_input): Support struct declarations of the
194228060Sbapt	form "struct foo;".
195228060Sbapt	* tests/incomplete.gperf: New file.
196228060Sbapt	* tests/incomplete.exp: New file.
197228060Sbapt	* tests/Makefile.in (check-test): Check incomplete.gperf too.
198228060Sbapt	Reported by Rob Leslie <rob@mars.org>.
199228060Sbapt
200228060Sbapt2003-05-20  Bruno Haible  <bruno@clisp.org>
201228060Sbapt
202228060Sbapt	* doc/Makefile.in (gperf.ps): Don't use $< in a target rule.
203228060Sbapt
204228060Sbapt2003-05-27  Bruno Haible  <bruno@clisp.org>
205228060Sbapt
206228060Sbapt	* Makefile.vms (CC): Correct value.
207228060Sbapt	(getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set
208228060Sbapt	HAVE_CONFIG_H.
209228060Sbapt
210228060Sbapt2003-05-17  Bruno Haible  <bruno@clisp.org>
211228060Sbapt
212228060Sbapt	* Makefile.msvc (DEBUGFLAGS): New variable.
213228060Sbapt	(gperf.exe): Use it, and MFLAGS too.
214228060Sbapt
215228060Sbapt2003-05-08  Bruno Haible  <bruno@clisp.org>
216228060Sbapt
217228060Sbapt	* gperf-3.0 released.
218228060Sbapt
219228060Sbapt2003-05-07  Bruno Haible  <bruno@clisp.org>
220228060Sbapt
221228060Sbapt	* src/version.cc: Bump version number to 3.0.
222228060Sbapt	* doc/gperf.texi: Likewise.
223228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
224228060Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
225228060Sbapt	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
226228060Sbapt	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
227228060Sbapt	tests/test-4.exp: Update.
228228060Sbapt
229228060Sbapt	* src/configure.in: Fix AC_INIT argument.
230228060Sbapt
231228060Sbapt	* Makefile.devel (configure, lib/configure, src/configure,
232228060Sbapt	tests/configure, doc/configure): Use the newest autoconf.
233228060Sbapt	(src/config.h.in): Use the newest autoheader.
234228060Sbapt
235228060Sbapt2003-05-03  Bruno Haible  <bruno@clisp.org>
236228060Sbapt
237228060Sbapt	* doc/gperf.texi: Use two spaces as sentence separator, as recommended
238228060Sbapt	by the texinfo manual.
239228060Sbapt
240228060Sbapt2003-04-12  Bruno Haible  <bruno@clisp.org>
241228060Sbapt
242228060Sbapt	* doc/configure.in (mandir): Change default value.
243228060Sbapt	* doc/Makefile.in (docdir): Use datadir instead of prefix.
244228060Sbapt	* Makefile.msvc (datadir): New variable.
245228060Sbapt	(mandir, docdir): Use it instead of prefix.
246228060Sbapt	(install, installdirs): Update.
247228060Sbapt	* Makefile.vms (datadir): New variable.
248228060Sbapt	(mandir, docdir): Use it instead of prefix.
249228060Sbapt	(install, installdirs): Update.
250228060Sbapt
251228060Sbapt2003-04-12  Bruno Haible  <bruno@clisp.org>
252228060Sbapt
253228060Sbapt	* README.vms: New file.
254228060Sbapt	* Makefile.vms: New file.
255228060Sbapt	* Makefile.devel (src/config.h_vms): New rule.
256228060Sbapt	(all): Depend on it.
257228060Sbapt
258228060Sbapt2003-03-19  Bruno Haible  <bruno@clisp.org>
259228060Sbapt
260228060Sbapt	* src/input.cc (Input::read_input): Ignore comments at the beginning
261228060Sbapt	of the declarations section.
262228060Sbapt	* doc/gperf.texi (Controls for GNU indent): New section.
263228060Sbapt	Reported by Bruce Lilly <blilly@erols.com>.
264228060Sbapt
265228060Sbapt2003-03-19  Bruno Haible  <bruno@clisp.org>
266228060Sbapt
267228060Sbapt	* src/output.cc (Output::output_hash_function): Avoid lint warning if
268228060Sbapt	not all arguments of the hash function are used. Avoid lint warning
269228060Sbapt	for fallthrough in switch.
270228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
271228060Sbapt	tests/cplusplus.exp, tests/java.exp, tests/languages.exp,
272228060Sbapt	tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected
273228060Sbapt	output.
274228060Sbapt	Reported by Bruce Lilly <blilly@erols.com>.
275228060Sbapt
276228060Sbapt2003-03-01  Bruno Haible  <bruno@clisp.org>
277228060Sbapt
278228060Sbapt	* src/options.h (Options::set_initializer_suffix): New declaration.
279228060Sbapt	* src/options.cc (Options::set_initializer_suffix): New method.
280228060Sbapt	* src/input.cc (Input::read_input): Recognize %define
281228060Sbapt	initializer-suffix.
282228060Sbapt	* doc/gperf.texi (Gperf Declarations): Document %define
283228060Sbapt	initializer-suffix.
284228060Sbapt	* NEWS: Update.
285228060Sbapt
286228060Sbapt2003-02-26  Bruno Haible  <bruno@clisp.org>
287228060Sbapt
288228060Sbapt	* Makefile.msvc: New file.
289228060Sbapt	* README.woe32: New file.
290228060Sbapt	* Makefile.devel (all): Depend on src/config.h.msvc.
291228060Sbapt	(src/config.h.msvc): New rule.
292228060Sbapt
293228060Sbapt2003-01-07  Bruno Haible  <bruno@clisp.org>
294228060Sbapt
295228060Sbapt	* src/input.h (Input::_charset_dependent): New field.
296228060Sbapt	* src/input.cc (Input::read_input): Also set _charset_dependent.
297228060Sbapt	* src/main.cc (main): Pass _charset_dependent from Input to Output.
298228060Sbapt	* src/output.h (Output::Output): Add charset_dependent argument.
299228060Sbapt	(Output::_charset_dependent): New field.
300228060Sbapt	* src/output.cc (Output::Output): Add charset_dependent argument.
301228060Sbapt	(Output::output): Provoke a compilation error if the execution
302228060Sbapt	character set doesn't match the expectations.
303228060Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
304228060Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
305228060Sbapt	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
306228060Sbapt	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
307228060Sbapt	tests/test-4.exp: Update.
308228060Sbapt
309228060Sbapt	* src/options.cc (Options::long_usage): Change bug report address to
310228060Sbapt	<bug-gnu-gperf@gnu.org>.
311228060Sbapt	* tests/test-6.exp: Update.
312228060Sbapt
313228060Sbapt	* src/output.cc (USE_DOWNCASE_TABLE): New macro.
314228060Sbapt	(output_upperlower_table): New function.
315228060Sbapt	(output_upperlower_strcmp, output_upperlower_strncmp,
316228060Sbapt	output_upperlower_memcmp): Emit gperf_downcase array accesses.
317228060Sbapt	(Output::output): Call output_upperlower_table.
318228060Sbapt	* tests/permutc2.exp: Update.
319228060Sbapt
320228060Sbapt	* src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast.
321228060Sbapt	(Only in GCC a cast of an lvalue is an lvalue.)
322228060Sbapt
323228060Sbapt2003-01-01  Bruno Haible  <bruno@clisp.org>
324228060Sbapt
325228060Sbapt	* src/options.cc (Options::parse_options): Update copyright year.
326228060Sbapt
327228060Sbapt	* doc/gperf.texi (@author): Add me.
328228060Sbapt
329228060Sbapt	* src/options.h (NULLSTRINGS): New enum value.
330228060Sbapt	(Options::get_stringpool_name, Options::set_stringpool_name): New
331228060Sbapt	method declarations.
332228060Sbapt	(Options::_stringpool_name): New field.
333228060Sbapt	* src/options.icc (Options::get_stringpool_name): New method.
334228060Sbapt	* src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable.
335228060Sbapt	(Options::long_usage): Document -Q and --null-strings.
336228060Sbapt	(Options::Options): Initialize _stringpool_name.
337228060Sbapt	(Options::~Options): Output _stringpool_name, NULLSTRINGS values too.
338228060Sbapt	(Options::set_stringpool_name): New method.
339228060Sbapt	(long_options): Add options --string-pool-name, --null-strings.
340228060Sbapt	(Options::parse_options): Implement options -P, -Q and --null-strings.
341228060Sbapt	* src/input.cc (Input::read_input): Recognize declarations %pic,
342228060Sbapt	%define string-pool-name, %null-strings.
343228060Sbapt	* src/output.h (Output::output_string_pool,
344228060Sbapt	Output::output_lookup_pools): New method declarations.
345228060Sbapt	(Output::_wordlist_eltype): New field.
346228060Sbapt	* src/output.cc (Output::output_keylength_table): Trivial
347228060Sbapt	simplification.
348228060Sbapt	(Output::output_string_pool): New method.
349228060Sbapt	(output_keyword_entry): Add stringpool_index argument. For SHAREDLIB,
350228060Sbapt	use struct offsets.
351228060Sbapt	(output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "".
352228060Sbapt	(Output::output_keyword_table): Use _wordlist_eltype instead of
353228060Sbapt	_struct_tag. Compute stringpool_index for output_keyword_entry.
354228060Sbapt	(Output::output_lookup_pools): New method.
355228060Sbapt	(Output::output_lookup_function_body): Use _wordlist_eltype instead of
356228060Sbapt	_struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to
357228060Sbapt	strings. Use "o >= 0" to test for nonempty table entry.
358228060Sbapt	(Output::output_lookup_function): Call output_lookup_pools.
359228060Sbapt	(Output::output): Initialize _wordlist_eltype. Call
360228060Sbapt	output_lookup_pools.
361228060Sbapt	* tests/jstest4.gperf: New file.
362228060Sbapt	* tests/test-6.exp: Update.
363228060Sbapt	* tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of
364228060Sbapt	-P and -Q.
365228060Sbapt	* doc/gperf.texi (User-supplied Struct): Mention that first field has
366228060Sbapt	to be of type 'int' if -P is given.
367228060Sbapt	(Gperf Declarations): Document %pic, %define string-pool-name,
368228060Sbapt	%null-strings.
369228060Sbapt	(Output Details): Update description of option -P. Document options -Q
370228060Sbapt	and --null-strings.
371228060Sbapt
372228060Sbapt	* tests/Makefile.in (check-link-c, check-ada, check-pascal,
373228060Sbapt	check-test): Omit option -p.
374228060Sbapt	* tests/c-parse.exp: Regenerated.
375228060Sbapt	* tests/chill.exp: Regenerated.
376228060Sbapt	* tests/cplusplus.exp: Regenerated.
377228060Sbapt	* tests/gpc.exp: Regenerated.
378228060Sbapt	* tests/java.exp: Regenerated.
379228060Sbapt	* tests/objc.exp: Regenerated.
380228060Sbapt	* tests/test-4.exp: Regenerated.
381228060Sbapt
382228060Sbapt	* src/output.cc (Output::output_lookup_function_body): Omit the
383228060Sbapt	multicompare code section and its variables when it is not used.
384228060Sbapt	* tests/chill.exp: Regenerated.
385228060Sbapt
386228060Sbapt	* src/output.c (Output_Compare::output_firstchar_comparison): New
387228060Sbapt	method.
388228060Sbapt	(Output_Compare_Strcmp::output_comparison,
389228060Sbapt	Output_Compare_Strncmp::output_comparison,
390228060Sbapt	Output_Compare_Memcmp::output_comparison): Use it.
391228060Sbapt	* tests/permutc2.exp: Update.
392228060Sbapt
393228060Sbapt	* tests/smtp.gperf: New file, based on a contribution by Bruce Lilly.
394228060Sbapt	* tests/Makefile.in (check-smtp): New rule.
395228060Sbapt	(check): Depend on it.
396228060Sbapt	(clean): Update.
397228060Sbapt
398228060Sbapt2002-12-12  Bruno Haible  <bruno@clisp.org>
399228060Sbapt
400228060Sbapt	* src/search.h (Search::init_selchars_tuple,
401228060Sbapt	Search::count_duplicates_tuple): Add alpha_unify argument.
402228060Sbapt	(Search::count_duplicates_tuple): New method declaration.
403228060Sbapt	* src/search.cc (Search::init_selchars_tuple,
404228060Sbapt	Search::count_duplicates_tuple): Add alpha_unify argument.
405228060Sbapt	(Search::find_positions): Update.
406228060Sbapt	(Search::count_duplicates_tuple): New method.
407228060Sbapt	(Search::count_duplicates_multiset): Free temp alpha_unify vector.
408228060Sbapt	(Search::find_alpha_inc): Call count_duplicates_tuple.
409228060Sbapt
410228060Sbapt	* src/configure.in: Add test for stack-allocated variable-size arrays.
411228060Sbapt	* src/config.h.in: Regenerated.
412228060Sbapt	* src/search.cc: Include config.h.
413228060Sbapt	(DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros.
414228060Sbapt	(Search::find_alpha_inc, Search::count_possible_collisions,
415228060Sbapt	Search::find_asso_values): Use them.
416228060Sbapt	* src/Makefile.in (search.o): Depend on config.h.
417228060Sbapt
418228060Sbapt	* src/search.h (Search::keyword_list_length, Search::max_key_length,
419228060Sbapt	Search::get_max_keysig_size, Search::prepare): Remove declarations.
420228060Sbapt	(Search::prepare): Renamed from Search::preprepare.
421228060Sbapt	(Search::_max_selchars_length): New field.
422228060Sbapt	* src/search.cc (Search::prepare): Renamed from Search::preprepare.
423228060Sbapt	(Search::prepare_asso_values): Merged with old Search::prepare.
424228060Sbapt	Initialize _max_selchars_length.
425228060Sbapt	(Search::keyword_list_length): Remove function. Use _list_len instead.
426228060Sbapt	(Search::max_key_length): Remove function. Use _max_key_len instead.
427228060Sbapt	(Search::get_max_keysig_size): Remove function. Use
428228060Sbapt	_max_selchars_length instead.
429228060Sbapt	(Search::count_possible_collisions, Search::find_asso_values): Update.
430228060Sbapt	(Search::find_good_asso_values): Call just prepare_asso_values.
431228060Sbapt	(Search::~Search): Update.
432228060Sbapt
433228060Sbapt	* src/output.h (Output::output_asso_values_ref): New declaration.
434228060Sbapt	* src/output.cc (char_to_index): Remove variable.
435228060Sbapt	(Output::output_asso_values_ref): New function.
436228060Sbapt	(Output::output_hash_function): Use it.
437228060Sbapt	(Output::output): Update.
438228060Sbapt
439228060Sbapt	* src/positions.h (Positions::is_useall, Positions::set_useall,
440228060Sbapt	Positions::iterator, Positions::reviterator): New method declarations.
441228060Sbapt	(Positions::_useall): New field.
442228060Sbapt	(PositionIterator): Make constructor private. Add a constructor and a
443228060Sbapt	copy constructor.
444228060Sbapt	(PositionIterator::remaining): New declaration.
445228060Sbapt	(PositionReverseIterator): Make constructor private. Add a constructor
446228060Sbapt	and a copy constructor.
447228060Sbapt	(PositionReverseIterator::remaining): New declaration.
448228060Sbapt	(PositionReverseIterator::_minindex): New field.
449228060Sbapt	* src/positions.icc (Positions::Positions): Initialize _useall.
450228060Sbapt	(Positions::operator=): Likewise.
451228060Sbapt	(Positions::is_useall, Positions::set_useall): New methods.
452228060Sbapt	(Positions::sort): Do nothing if _useall is set.
453228060Sbapt	(Positions::iterator, Positions::reviterator): New methods.
454228060Sbapt	(PositionIterator::PositionIterator): New constructor.
455228060Sbapt	(PositionIterator::remaining): New method.
456228060Sbapt	(PositionReverseIterator::PositionReverseIterator): New constructor.
457228060Sbapt	(PositionReverseIterator::next): Use _minindex as bound.
458228060Sbapt	(PositionReverseIterator::remaining): New method.
459228060Sbapt	* src/positions.cc (Positions::add, Positions::remove): Reset the
460228060Sbapt	useall flag.
461228060Sbapt	(Positions::print): Handle the useall case.
462228060Sbapt	* src/options.h (ALLCHARS): Remove.
463228060Sbapt	* src/options.cc (Options::~Options): Update.
464228060Sbapt	(Options::parse_options): Use Positions::set_useall().
465228060Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple,
466228060Sbapt	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
467228060Sbapt	Remove use_all_chars argument.
468228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars
469228060Sbapt	argument. Tell the position iterator to stop at _allchars_length.
470228060Sbapt	Remove special case code for -k'*'.
471228060Sbapt	(KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset):
472228060Sbapt	Remove use_all_chars argument.
473228060Sbapt	* src/search.h (Search::init_selchars_tuple): Remove use_all_chars
474228060Sbapt	argument.
475228060Sbapt	(Search::init_selchars_multiset): Likewise.
476228060Sbapt	* src/search.cc (Search::init_selchars_tuple): Remove use_all_chars
477228060Sbapt	argument.
478228060Sbapt	(Search::count_duplicates_tuple, Search::find_positions): Update.
479228060Sbapt	(Search::compute_alpha_unify): Remove special case code for -k'*'.
480228060Sbapt	(Search::init_selchars_multiset): Remove use_all_chars argument.
481228060Sbapt	(Search::count_duplicates_multiset): Update.
482228060Sbapt	(Search::find_alpha_inc): Remove special case code for -k'*'.
483228060Sbapt	(Search::prepare): Update.
484228060Sbapt	(Search::get_max_keysig_size): Update.
485228060Sbapt	* src/output.cc (Output::output_hash_function): Remove special case
486228060Sbapt	code for -k'*'.
487228060Sbapt	* tests/chill.exp: Regenerated.
488228060Sbapt
489228060Sbapt2002-12-11  Bruno Haible  <bruno@clisp.org>
490228060Sbapt
491228060Sbapt	Change the positions to be 0-based, instead of 1-based.
492228060Sbapt	* src/positions.h (Positions::LASTCHAR): Set to -1.
493228060Sbapt	(Positions::MAX_SIZE): New constant.
494228060Sbapt	(Positions::pointer): Change return type.
495228060Sbapt	(Positions::_positions): Change element type.
496228060Sbapt	(PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2.
497228060Sbapt	* src/positions.icc (Positions::pointer): Change return type.
498228060Sbapt	(Positions::sort): Update.
499228060Sbapt	* src/positions.cc (Positions::contains, Positions::add,
500228060Sbapt	Positions::remove): Update.
501228060Sbapt	(Positions::print): Update. Fix off-by-one bug.
502228060Sbapt	* src/options.cc (Options::~Options): Update.
503228060Sbapt	(Options::parse_options): Set BAD_VALUE to -3. Update.
504228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Update.
505228060Sbapt	* src/search.cc (Search::find_positions, Search::compute_alpha_unify,
506228060Sbapt	Search::find_alpha_inc): Update.
507228060Sbapt	* src/output.cc (Output::output_hash_function): Update. Don't emit
508228060Sbapt	a 'case' statement right after 'default:'.
509228060Sbapt	* tests/c-parse.exp: Regenerated.
510228060Sbapt	* tests/charsets.exp: Regenerated.
511228060Sbapt	* tests/cplusplus.exp: Regenerated.
512228060Sbapt	* tests/java.exp: Regenerated.
513228060Sbapt	* tests/languages.exp: Regenerated.
514228060Sbapt	* tests/modula2.exp: Regenerated.
515228060Sbapt	* tests/objc.exp: Regenerated.
516228060Sbapt
517228060Sbapt2002-12-10  Bruno Haible  <bruno@clisp.org>
518228060Sbapt
519228060Sbapt	* src/options.h: Reorder enum values.
520228060Sbapt	(Options::short_usage, Options::long_usage): Make static.
521228060Sbapt	* src/options.cc (Options::short_usage); No longer print a monster
522228060Sbapt	usage line.
523228060Sbapt	(Options::print_options): Improve output of options like
524228060Sbapt	--key-positions=1,2,$.
525228060Sbapt	(Options::~Options): Update.
526228060Sbapt
527228060Sbapt	* src/options.h (UPPERLOWER): New enum value.
528228060Sbapt	* src/options.cc (Options::long_usage): Document option --ignore-case.
529228060Sbapt	(Options::~Options): Update.
530228060Sbapt	(long_options): Add option --ignore-case.
531228060Sbapt	(Options::parse_options): Handle option --ignore-case.
532228060Sbapt	* src/input.cc (Input::read_input): Recognize option %ignore-case.
533228060Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple,
534228060Sbapt	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
535228060Sbapt	Add alpha_unify argument.
536228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify
537228060Sbapt	argument.
538228060Sbapt	(KeywordExt::init_selchars_tuple): Add alpha_unify argument.
539228060Sbapt	(KeywordExt::init_selchars_multiset): Add alpha_unify argument.
540228060Sbapt	* src/search.h (Search::compute_alpha_size,
541228060Sbapt	Search::compute_alpha_unify): New declarations.
542228060Sbapt	(Search::init_selchars_multiset): Add alpha_unify argument.
543228060Sbapt	(Search::_alpha_unify): New field.
544228060Sbapt	* src/search.cc (Search::compute_alpha_size,
545228060Sbapt	Search::compute_alpha_unify): New functions.
546228060Sbapt	(Search::init_selchars_tuple): Update.
547228060Sbapt	(Search::find_positions): Temporarily set _alpha_unify. Perform a
548228060Sbapt	case insensitive comparison if needed.
549228060Sbapt	(Search::init_selchars_multiset): Add alpha_unify argument.
550228060Sbapt	(Search::count_duplicates_multiset): Call compute_alpha_unify.
551228060Sbapt	(Search::find_alpha_inc): Temporarily set _alpha_unify. At the end,
552228060Sbapt	set _alpha_size and _alpha_unify.
553228060Sbapt	(Search::prepare): Update. Don't compute _alpga_size here.
554228060Sbapt	(Search::optimize): Propagate unified asso_values.
555228060Sbapt	(Search::~Search) Delete _alpha_unify.
556228060Sbapt	* src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp,
557228060Sbapt	output_upperlower_memcmp): New functions.
558228060Sbapt	(Output_Compare_Strcmp::output_comparison,
559228060Sbapt	Output_Compare_Strncmp::output_comparison,
560228060Sbapt	Output_Compare_Memcmp::output_comparison): Use the case-insensitive
561228060Sbapt	comparison function if --ignore-case was given.
562228060Sbapt	(Output::output): Emit the auxiliary case-insensitive comparison
563228060Sbapt	function if needed.
564228060Sbapt	* tests/permutc2.gperf, tests/permutc2.exp: New files.
565228060Sbapt	* tests/Makefile.in (check-test): Also check permutc2.gperf.
566228060Sbapt	* tests/test-6.exp: Update.
567228060Sbapt	* doc/gperf.texi (Gperf Declarations): Document %ignore-case.
568228060Sbapt	(Input Details): Document option --ignore-case.
569228060Sbapt	* NEWS: Update.
570228060Sbapt
571228060Sbapt	* src/search.cc (Search::optimize): Fill unused asso_values[] entries
572228060Sbapt	with a large value.
573228060Sbapt	* src/output.h (Output::Output): Remove occurrences argument.
574228060Sbapt	(Output::_occurrences): Remove field.
575228060Sbapt	* src/output.cc (Output::Output): Remove occurrences argument.
576228060Sbapt	(Output::output_hash_function): Ignore _occurrences.
577228060Sbapt	* src/main.cc (main): Don't pass the _occurrences to Output.
578228060Sbapt
579228060Sbapt	* src/search.cc (Search::preprepare): Exit if keywords contain
580228060Sbapt	out-of-range characters.
581228060Sbapt
582228060Sbapt	* src/search.cc (for): Define so as to avoid errors with old compilers.
583228060Sbapt
584228060Sbapt	* src/options.h (SHAREDLIB): New enum value.
585228060Sbapt	* src/options.cc (Options::short_usage): Mention option -P.
586228060Sbapt	(Options::long_usage): Document option -P.
587228060Sbapt	(long_options): Add option --pic.
588228060Sbapt	(Options::parse_options): Handle option -P/--pic.
589228060Sbapt	* src/output.cc (output_keyword_blank_entries): When SHAREDLIB is
590228060Sbapt	specified, emit NULL pointers instead of "".
591228060Sbapt	(Output::output_lookup_function_body): When SHAREDLIB is specified
592228060Sbapt	and SWITCH and DUP and not specified, test the table entry against
593228060Sbapt	NULL before the string comparison.
594228060Sbapt	* tests/test-6.exp: Update.
595228060Sbapt	* doc/gperf.texi (Output Details): Document option -P.
596228060Sbapt	* NEWS: Update.
597228060Sbapt	Suggested by Ulrich Drepper.
598228060Sbapt
599228060Sbapt2002-12-08  Bruno Haible  <bruno@clisp.org>
600228060Sbapt
601228060Sbapt	* tests/permut2.gperf, tests/permut2.exp: New files.
602228060Sbapt	* tests/permut3.gperf, tests/permut3.exp: New files.
603228060Sbapt	* tests/charsets.gperf: New file, from Bruce Lilly.
604228060Sbapt	* tests/charsets.exp: New file.
605228060Sbapt	* tests/languages.gperf: New file, from Bruce Lilly.
606228060Sbapt	* tests/languages.exp: New file.
607228060Sbapt	* Makefile.in (check-test): Test them all.
608228060Sbapt
609228060Sbapt	Completely new asso_values search algorithm.
610228060Sbapt	* src/search.h (Search::compute_occurrence, Search::clear_determined,
611228060Sbapt	Search::set_determined, Search::already_determined, Search::reorder):
612228060Sbapt	Remove functions.
613228060Sbapt	(Search::init_asso_values, Search::sort_by_occurrence,
614228060Sbapt	Search::compute_occurrence, Search::sort_by_occurrence,
615228060Sbapt	Search::has_collisions, Search::collision_prior_to): Remove functions.
616228060Sbapt	(Search::compute_partition, Search::count_possible_collisions,
617228060Sbapt	Search::unchanged_partition): New method declarations.
618228060Sbapt	(Search::_determined): Remove field.
619228060Sbapt	* src/search.cc (Search::prepare): Don't initialize _determined.
620228060Sbapt	(Search::compute_occurrence, greater_by_occurrence,
621228060Sbapt	Search::clear_determined, Search::set_determined,
622228060Sbapt	Search::already_determined, Search::reorder): Remove functions.
623228060Sbapt	(Search::init_asso_values, compute_disjoint_union,
624228060Sbapt	Search::sort_by_occurrence, Search::compute_occurrence,
625228060Sbapt	Search::sort_by_occurrence, Search::has_collisions,
626228060Sbapt	Search::collision_prior_to): Remove functions.
627228060Sbapt	(StackEntry): Remove class.
628228060Sbapt	(EquivalenceClass, Step): New classes.
629228060Sbapt	(equals, Search::compute_partition, delete_partition,
630228060Sbapt	Search::count_possible_collisions, Search::unchanged_partition): New
631228060Sbapt	functions.
632228060Sbapt	(Search::find_asso_values): Completely rewritten.
633228060Sbapt	(Search::find_good_asso_values): Don't call reorder().
634228060Sbapt	(Search::~Search): Don't free _determined.
635228060Sbapt	* src/keyword.h (KeywordExt::_occurrence): Remove field.
636228060Sbapt	* src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values.
637228060Sbapt	(Options::_iterations): Remove field.
638228060Sbapt	* src/options.icc (Options::get_iterations): Remove method.
639228060Sbapt	* src/options.cc (Options::long_usage): Remove mention of -f and -o.
640228060Sbapt	(Options::Options): Don't initialize _iterations.
641228060Sbapt	(Options::~Options): Update.
642228060Sbapt	(Options::parse_options): Do nothing for options -f, -o, -O.
643228060Sbapt	* doc/gperf.texi: (Contributors): Update.
644228060Sbapt	(Algorithmic Details): Remove options -f and -o. Update description
645228060Sbapt	of option -s.
646228060Sbapt	* tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp,
647228060Sbapt	tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp,
648228060Sbapt	tests/test-4.exp): Regenerated, smaller than before.
649228060Sbapt	* tests/test-6.exp: Update.
650228060Sbapt	* NEWS: Update.
651228060Sbapt
652228060Sbapt2002-12-08  Bruno Haible  <bruno@clisp.org>
653228060Sbapt
654228060Sbapt	* src/search.h (Search::_alpha_size): Change type to 'unsigned int'.
655228060Sbapt	(Search::_asso_value_max): Likewise.
656228060Sbapt	* src/search.cc (Search::prepare_asso_values): Update.
657228060Sbapt	(Search::init_asso_values): Update.
658228060Sbapt	(Search::~Search): Update.
659228060Sbapt	* src/output.h (Output::Output): Change alpha_size type to
660228060Sbapt	'unsigned int'.
661228060Sbapt	(Output::_alpha_size): Change type to 'unsigned int'.
662228060Sbapt	* src/output.cc (Output::Output): Change alpha_size type to
663228060Sbapt	'unsigned int'.
664228060Sbapt	(Output::output_hash_function): Update.
665228060Sbapt
666228060Sbapt2002-12-07  Bruno Haible  <bruno@clisp.org>
667228060Sbapt
668228060Sbapt	* src/options.h (OPT_CHOICE): New enum value.
669228060Sbapt	* src/options.cc (Options::~Options): Update.
670228060Sbapt	(long_options): New option --optimized-collision-resolution.
671228060Sbapt	(Options::parse_options): Accept option -O.
672228060Sbapt	* src/search.h (Search::sort_by_occurrence): Change argument to
673228060Sbapt	'unsigned int'.
674228060Sbapt	(Search::compute_occurrence, Search::sort_by_occurrence): New method
675228060Sbapt	declarations.
676228060Sbapt	* src/search.cc (Search::sort_by_occurrence): Change argument to
677228060Sbapt	'unsigned int'.
678228060Sbapt	(Search::compute_occurrence, Search::sort_by_occurrence): New methods.
679228060Sbapt	(Search::find_asso_values): Implement OPT_CHOICE. More debugging
680228060Sbapt	output.
681228060Sbapt
682228060Sbapt	* src/search.cc (Search::prepare_asso_values) [DEBUG]: Also print
683228060Sbapt	the keyword list in order.
684228060Sbapt	(Search::find_asso_values) [DEBUG]: Upon failure, print the union_set.
685228060Sbapt
686228060Sbapt	* src/options.h (Options::get_size_multiple): Change return type to
687228060Sbapt	float.
688228060Sbapt	(Options::_size_multiple): Change type to float.
689228060Sbapt	* src/options.icc (Options::get_size_multiple): Change return type to
690228060Sbapt	float.
691228060Sbapt	* src/options.cc (Options::long_usage): Update description of option
692228060Sbapt	-s.
693228060Sbapt	(Options::~Options): Update.
694228060Sbapt	(Options::parse_options): For option -s, accept a fraction.
695228060Sbapt	* src/search.cc (Search::prepare_asso_values): Use get_size_multiple
696228060Sbapt	as it is.
697228060Sbapt	* tests/test-6.exp: Update.
698228060Sbapt	* doc/gperf.texi (Algorithmic Details): Update description of option
699228060Sbapt	-s.
700228060Sbapt
701228060Sbapt2002-12-04  Bruno Haible  <bruno@clisp.org>
702228060Sbapt
703228060Sbapt	Improve debugging output.
704228060Sbapt	* src/hash-table.h (Hash_Table::dump): New method.
705228060Sbapt	* src/hash-table.cc (Hash_Table::dump): New method, extracted from
706228060Sbapt	destructor.
707228060Sbapt	(Hash_Table::~Hash_Table): No longer print the contents.
708228060Sbapt	* src/positions.h (PositionReverseIterator): New class.
709228060Sbapt	* src/positions.icc (PositionReverseIterator::PositionReverseIterator,
710228060Sbapt	PositionReverseIterator::next): New methods.
711228060Sbapt	* src/search.cc (Search::find_positions): If debugging, print the
712228060Sbapt	result.
713228060Sbapt	(Search::find_alpha_inc): If debugging, print the result.
714228060Sbapt	(Search::prepare): Explicitly dump the hash table's contents here.
715228060Sbapt
716228060Sbapt	Portability fixes.
717228060Sbapt	* src/positions.h (Positions::LASTCHAR, Positions::MAX_KEY_POS,
718228060Sbapt	PositionIterator::EOS): Define as compile-time constants using enum.
719228060Sbapt	* src/bool-array.cc (Bool_Array::~Bool_Array): Remove const qualifier
720228060Sbapt	of pointer to be deleted.
721228060Sbapt	* src/input.cc (Input::~Input): Likewise.
722228060Sbapt	* src/keyword.cc (KeywordExt::delete_selchars): Likewise.
723228060Sbapt	* src/main.cc (main): Likewise.
724228060Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Limit scope of 'for'
725228060Sbapt	variables.
726228060Sbapt	* src/search.cc (Search::prepare_asso_values): Use a static_cast to
727228060Sbapt	convert from time_t to long. This is possible because ISO C 99 says
728228060Sbapt	time_t is a numeric type.
729228060Sbapt
730228060Sbapt2002-11-20  Bruno Haible  <bruno@clisp.org>
731228060Sbapt
732228060Sbapt	* src/search.cc (Search::find_asso_values): Avoid gcc warnings about
733228060Sbapt	uninitialized variables.
734228060Sbapt
735228060Sbapt	Implement backtracking.
736228060Sbapt	* src/search.h (Search::has_collisions): Renamed from
737228060Sbapt	Search::less_collisions. Return a boolean.
738228060Sbapt	* src/search.cc (Search::has_collisions): Renamed from
739228060Sbapt	Search::less_collisions. Return a boolean.
740228060Sbapt	(StackEntry): Remove field _collisions_so_far.
741228060Sbapt	(Search::find_asso_values): Backtrack when encountering an unresolved
742228060Sbapt	collision. Assume collisions_so_far is always zero.
743228060Sbapt	(Search::optimize): Exit if there are accidental duplicates at the end.
744228060Sbapt	* src/output.cc (Output::num_hash_values): Simply return the list
745228060Sbapt	length.
746228060Sbapt	(Output::output_keylength_table): Remove handling of accidental
747228060Sbapt	duplicates.
748228060Sbapt	(Output::output_keyword_table, Output::output_lookup_array): Likewise.
749228060Sbapt	(output_switch_case, output_switches): Likewise.
750228060Sbapt	* doc/gperf.texi (Algorithmic Details): Adjust description of options
751228060Sbapt	-D, -f, -o, -r.
752228060Sbapt	(Bugs): Remove note about missing backtracking.
753228060Sbapt	(Projects): Likewise.
754228060Sbapt
755228060Sbapt2002-11-19  Bruno Haible  <bruno@clisp.org>
756228060Sbapt
757228060Sbapt	Prepare for backtracking.
758228060Sbapt	* src/search.h (Search::try_asso_value, Search::change_some_asso_value):
759228060Sbapt	Remove declarations.
760228060Sbapt	(Search::less_collisions, Search::collision_prior_to): New declarations.
761228060Sbapt	(Search::_fewest_collisions, Search::_union_set, Search::_num_done):
762228060Sbapt	Remove fields.
763228060Sbapt	* src/search.cc (Search::prepare_asso_values): Don't initialize
764228060Sbapt	_union_set.
765228060Sbapt	(Search::try_asso_value, Search::change_some_asso_value): Remove
766228060Sbapt	methods.
767228060Sbapt	(Search::less_collisions, Search::collision_prior_to): New methods.
768228060Sbapt	(StackEntry): New class.
769228060Sbapt	(Search::find_asso_values): Reorganized to use pseudo-recursion.
770228060Sbapt	(Search::~Search): Don't free _union_set.
771228060Sbapt
772228060Sbapt	* src/search.h (Search::find_good_asso_values): New declaration.
773228060Sbapt	* src/search.cc: Add comments about the basic structure of the
774228060Sbapt	algorithm.
775228060Sbapt	(Search::find_positions): Move the option[POSITIONS] test to here.
776228060Sbapt	(Search::find_good_asso_values): New method, extracted from
777228060Sbapt	Search::optimize.
778228060Sbapt	(Search::optimize): Remove option[POSITIONS] test. Call
779228060Sbapt	find_good_asso_values.
780228060Sbapt
781228060Sbapt2002-11-17  Bruno Haible  <bruno@clisp.org>
782228060Sbapt
783228060Sbapt	* src/options.cc (Options::parse_options): Include copyright notice
784228060Sbapt	and authors in --version output.
785228060Sbapt
786228060Sbapt	Avoid artificial duplicates.
787228060Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple): New declaration.
788228060Sbapt	(KeywordExt::init_selchars_multiset): Renamed from
789228060Sbapt	KeywordExt::init_selchars.
790228060Sbapt	(KeywordExt::init_selchars_low): New declaration.
791228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Renamed from
792228060Sbapt	KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting.
793228060Sbapt	(KeywordExt::init_selchars_tuple): New method.
794228060Sbapt	(KeywordExt::init_selchars_multiset): New method, replaces
795228060Sbapt	KeywordExt::init_selchars.
796228060Sbapt	* src/search.h (Search::init_selchars_tuple): Renamed from
797228060Sbapt	Search::init_selchars.
798228060Sbapt	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
799228060Sbapt	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
800228060Sbapt	Search::find_alpha_inc): New declarations.
801228060Sbapt	(Search::_alpha_inc): New field.
802228060Sbapt	(Search::_alpha_size, Search::_occurrences, Search::_asso_values,
803228060Sbapt	Search::_determined): Make non-const.
804228060Sbapt	* src/search.cc (Search::Search): Don't initialize _key_positions,
805228060Sbapt	_alpha_size, _occurrences, _asso_values, _determined here.
806228060Sbapt	(Search::init_selchars_tuple): Renamed from Search::init_selchars.
807228060Sbapt	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
808228060Sbapt	(Search::find_positions): Update.
809228060Sbapt	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
810228060Sbapt	Search::find_alpha_inc): New methods.
811228060Sbapt	(Search::prepare): Move preprepare, find_positions calls away.
812228060Sbapt	Initialize _alpha_size, _occurrences, _asso_values, _determined here.
813228060Sbapt	(Search::optimize): Call preprepare, find_positions here. Initialize
814228060Sbapt	_key_positions here.
815228060Sbapt	(Search::~Search): Deallocate _alpha_inc.
816228060Sbapt	* src/output.cc (Output::Output): Add alpha_inc argument.
817228060Sbapt	(Output::output_hash_function): Use _alpha_inc.
818228060Sbapt	* src/output.h (Output::Output): Add alpha_inc argument.
819228060Sbapt	(Output::_alpha_inc): New field.
820228060Sbapt	* src/main.cc (main): Pass _alpha_inc from Search to Output.
821228060Sbapt	* tests/chill.exp: Update.
822228060Sbapt	* doc/gperf.texi (Algorithmic Details): Remove description of
823228060Sbapt	artificial duplicates.
824228060Sbapt
825228060Sbapt	* src/keyword.h (KeywordExt::_selchars): Change type to
826228060Sbapt	'const unsigned int *'.
827228060Sbapt	* src/keyword.cc (sort_char_set): Change argument type to
828228060Sbapt	'unsigned int *'.
829228060Sbapt	(KeywordExt::init_selchars): Update.
830228060Sbapt	* src/search.h (Search::sort_by_occurrence): Change argument type to
831228060Sbapt	'unsigned int *'.
832228060Sbapt	(Search::try_asso_value): Change argument type to 'unsigned int'.
833228060Sbapt	(Search::_union_set): Change type to 'unsigned int *'.
834228060Sbapt	* src/search.cc (Search::prepare, Search::compute_occurrence,
835228060Sbapt	Search::set_determined, Search::already_determined,
836228060Sbapt	Search::prepare_asso_values, Search::compute_hash): Update.
837228060Sbapt	(compute_disjoint_union): Change argument types to 'unsigned int *'.
838228060Sbapt	(Search::sort_by_occurrence): Likewise.
839228060Sbapt	(Search::try_asso_value): Change argument type to 'unsigned int'.
840228060Sbapt	(Search::change_some_asso_value, Search::~Search): Update.
841228060Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table, Hash_Table::equal,
842228060Sbapt	Hash_Table::insert): Update.
843228060Sbapt
844228060Sbapt	* src/positions.h: New file, extracted from options.h.
845228060Sbapt	* src/positions.icc: New file, extracted from options.icc.
846228060Sbapt	* src/positions.cc: New file, extracted from options.cc.
847228060Sbapt	* src/options.h: Include positions.h. Move classes Positions and
848228060Sbapt	PositionsIterator away.
849228060Sbapt	* src/options.icc: Move classes Positions and PositionsIterator away.
850228060Sbapt	* src/options.cc: Move class Positions away.
851228060Sbapt	* src/keyword.cc: Include positions.h instead of options.h.
852228060Sbapt	* src/output.h: Include positions.h instead of options.h.
853228060Sbapt	* src/search.h: Include positions.h instead of options.h.
854228060Sbapt	* src/Makefile.in (OBJECTS): Add positions.o.
855228060Sbapt	(POSITIONS_H): New variable.
856228060Sbapt	(OPTIONS_H, SEARCH_H, OUTPUT_H, keyword.o): Use it.
857228060Sbapt	(positions.o): New rule.
858228060Sbapt
859228060Sbapt	* src/options.h (POSITIONS): New enum value.
860228060Sbapt	(Positions::Positions): New copy constructor.
861228060Sbapt	(Positions::operator=, Positions::contains, Position::add,
862228060Sbapt	Positions::remove, Positions::print): New method declaration.
863228060Sbapt	(Options::get_max_keysig_size): Remove method.
864228060Sbapt	* src/options.icc (Positions::Positions): New copy constructor.
865228060Sbapt	(Positions::operator=): New method.
866228060Sbapt	(Options::get_max_keysig_size): Remove method.
867228060Sbapt	* src/options.cc (Options::Options): Initialize _key_positions
868228060Sbapt	trivially.
869228060Sbapt	(Options::parse_options): Option -k sets POSITIONS.
870228060Sbapt	(Positions::contains, Positions::add, Positions::remove,
871228060Sbapt	Positions::print): New methods.
872228060Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
873228060Sbapt	width explicitly, instead of using Options::get_max_keysig_size.
874228060Sbapt	* src/keyword.h (KeywordExt::init_selchars): Add arguments
875228060Sbapt	use_all_chars, positions.
876228060Sbapt	(KeywordExt::delete_selchars): New declaration.
877228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Add arguments
878228060Sbapt	use_all_chars, positions. Remove error message if there are no key
879228060Sbapt	positions.
880228060Sbapt	(KeywordExt::delete_selchars): New method.
881228060Sbapt	* src/search.h: Include options.h.
882228060Sbapt	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
883228060Sbapt	Search::count_duplicates, Search::find_positions): New declarations.
884228060Sbapt	(Search::_key_positions): New field.
885228060Sbapt	* src/search.cc (Search::Search): Initialize _key_positions.
886228060Sbapt	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
887228060Sbapt	Search::count_duplicates, Search::find_positions): New functions.
888228060Sbapt	(Search::prepare): Call preprepare and find_positions. Tweak error
889228060Sbapt	message.
890228060Sbapt	(Search::get_max_keysig_size): Use _key_positions instead of
891228060Sbapt	option.get_key_positions().
892228060Sbapt	(Search::optimize): Tweak error message.
893228060Sbapt	* src/output.h: Include options.h.
894228060Sbapt	(Output::Output): Add Positions argument.
895228060Sbapt	(Output::_key_positions): New field.
896228060Sbapt	* src/output.cc (Output::Output): Add Positions argument.
897228060Sbapt	(Output::output_hash_function): Omit the table if there are no
898228060Sbapt	positions at all. Use _key_positions instead of
899228060Sbapt	option.get_key_positions().
900228060Sbapt	(Output::output): Output the computed positions as a comment.
901228060Sbapt	* src/main.cc (main): Pass the Positions from Searcher to Output.
902228060Sbapt	* src/Makefile.in (SEARCH_H, OUTPUT_H): Include OPTIONS_H.
903228060Sbapt	* tests/Makefile.in (check-test): Pass key positions explicitly.
904228060Sbapt	* tests/gpc.exp: Update.
905228060Sbapt	* tests/test-4.exp: Update.
906228060Sbapt	* doc/gperf.texi (Algorithmic Details): Mention that -k is not needed
907228060Sbapt	usually.
908228060Sbapt
909228060Sbapt2002-11-16  Bruno Haible  <bruno@clisp.org>
910228060Sbapt
911228060Sbapt	* src/options.h (Options::get_slot_name): Renamed from
912228060Sbapt	Options::get_key_name.
913228060Sbapt	(Options::set, Options::set_language, Options::set_total_switches,
914228060Sbapt	Options::set_function_name, Options::set_slot_name,
915228060Sbapt	Options::set_class_name, Options::set_hash_name,
916228060Sbapt	Options::set_wordlist_name, Options::set_delimiters): New method
917228060Sbapt	declarations.
918228060Sbapt	(Options::_language): New field.
919228060Sbapt	(Options::_slot_name): Renamed from Options::_key_name.
920228060Sbapt	* src/options.icc (Options::set): New method.
921228060Sbapt	(Options::get_slot_name): Renamed from Options::get_key_name.
922228060Sbapt	* src/options.cc (DEFAULT_FUNCTION_NAME): Renamed from DEFAULT_NAME.
923228060Sbapt	(DEFAULT_SLOT_NAME): Renamed from DEFAULT_NAME.
924228060Sbapt	(Options::Options): Initialize _language. Update.
925228060Sbapt	(Options::~Options): Update.
926228060Sbapt	(Options::set_language, Options::set_total_switches,
927228060Sbapt	Options::set_function_name, Options::set_slot_name,
928228060Sbapt	Options::set_class_name, Options::set_hash_name,
929228060Sbapt	Options::set_wordlist_name, Options::set_delimiters): New methods.
930228060Sbapt	(Options::parse_options): Call set_language. Update.
931228060Sbapt	* src/input.cc (is_declaration, is_declaration_with_arg,
932228060Sbapt	is_define_declaration): New functions.
933228060Sbapt	(Input::read_input): Accept %DECL declarations.
934228060Sbapt	* src/output.cc (Output::output_lookup_function_body): Update.
935228060Sbapt	* doc/gperf.texi (Declarations): Add new subnodes.
936228060Sbapt	(User-supplied Struct, Gperf Declarations, C Code Inclusion): New
937228060Sbapt	nodes.
938228060Sbapt	(Keywords, Output Format, Binary Strings, Options): Mention %
939228060Sbapt	declarations as being equivalent to the command line options.
940228060Sbapt
941228060Sbapt	* src/options.cc (Options::long_usage): Rename options -H, -N, -l, -G.
942228060Sbapt	(long_options): Add --hash-function-name, --lookup-function-name,
943228060Sbapt	--compare-lengths.
944228060Sbapt	* doc/gperf.texi (Output Details): Rename options -H, -N, -l, -G.
945228060Sbapt	* tests/test-6.exp: Update.
946228060Sbapt
947228060Sbapt	* src/options.cc (DEFAULT_DELIMITERS): Remove newline.
948228060Sbapt	* src/options.cc (Options::long_usage): Change default --delimiters.
949228060Sbapt	* doc/gperf.texi (Input Details): Likewise.
950228060Sbapt	* tests/test-6.exp: Update.
951228060Sbapt
952228060Sbapt	* doc/gperf.texi: Move description of option -l from section
953228060Sbapt	Algorithmic Details to section Output Details.
954228060Sbapt	* src/options.cc (Options::long_usage): Likewise.
955228060Sbapt	* tests/test-6.exp: Update.
956228060Sbapt
957228060Sbapt2002-11-12  Bruno Haible  <bruno@clisp.org>
958228060Sbapt
959228060Sbapt	* src/options.h (Output::get_output_file_name): New method.
960228060Sbapt	(Output::_output_file_name): New field.
961228060Sbapt	* src/options.icc (Options::get_output_file_name): New method.
962228060Sbapt	* src/options.cc (Options::long_usage): Document option --output-file.
963228060Sbapt	(Options::Options): Initialize _output_file_name.
964228060Sbapt	(long_options): Add --output-file.
965228060Sbapt	(Options::parse_options): Handle it.
966228060Sbapt	* src/main.cc (main): Open the output file if given by name.
967228060Sbapt	* doc/gperf.texi (Output File): New section.
968228060Sbapt	* tests/test-6.exp: Update.
969228060Sbapt
970228060Sbapt2002-11-10  Bruno Haible  <bruno@clisp.org>
971228060Sbapt
972228060Sbapt	* src/input.cc (pretty_input_file_name): New function.
973228060Sbapt	(read_input): Use it in all error and warning messages.
974228060Sbapt
975228060Sbapt	* src/keyword.h (Keyword::_lineno): New field.
976228060Sbapt	* src/input.h (Input::_struct_decl_lineno): New field.
977228060Sbapt	* src/input.cc (Input::read_input): Set _struct_decl_lineno. Fill
978228060Sbapt	each keyword's _lineno field.
979228060Sbapt	* src/main.cc (main): Pass _struct_decl_lineno from Input to Output.
980228060Sbapt	* src/output.h (Output::Output) Add struct_decl_lineno argument.
981228060Sbapt	(Output::_struct_decl_lineno): New field.
982228060Sbapt	* src/output.cc (Output::Output) Add struct_decl_lineno argument.
983228060Sbapt	(output_keyword_entry): Emit #line directive before table entry.
984228060Sbapt	(Output::output): Emit #line directive before _struct_decl.
985228060Sbapt
986228060Sbapt	Fix memory leaks.
987228060Sbapt	* src/keyword.h (empty_string): New declaration.
988228060Sbapt	* src/keyword.cc (empty_string): New variable.
989228060Sbapt	* src/input.h (Input::_input): Make public.
990228060Sbapt	(Input::_input_end): New field.
991228060Sbapt	* src/input.cc (read_input): When removing leading whitespace from
992228060Sbapt	struct_decl, reallocate it. For rest, use empty_string instead of "".
993228060Sbapt	Set _input_end.
994228060Sbapt	(Input::~Input): Delete _struct_decl, _struct_tag, _return_type.
995228060Sbapt	* src/search.cc (Search::prepare): When removing an element from
996228060Sbapt	the keyword list, delete the list node.
997228060Sbapt	(Search::~Search): Delete _occurrences, _asso_values.
998228060Sbapt	* src/main.cc (main): Between Search::~Search and Input::~Input,
999228060Sbapt	destroy the keyword list.
1000228060Sbapt
1001228060Sbapt	Rewrite the input routines.
1002228060Sbapt	* src/input.h: Don't include read-line.h.
1003228060Sbapt	(Input): Don't inherit from class Read_Line.
1004228060Sbapt	(Input::read_keys, Input::strcspn, Input::set_output_types,
1005228060Sbapt	Input::get_array_type, Input::save_include_src,
1006228060Sbapt	Input::get_special_input): Remove declarations.
1007228060Sbapt	(Input::read_input): New declaration.
1008228060Sbapt	(Input::_struct_decl): Renamed from Input::_array_type.
1009228060Sbapt	(Input::_verbatim_declarations): Renamed from Input::_include_src.
1010228060Sbapt	(Input::_verbatim_code): Replaces Input::_additional_code.
1011228060Sbapt	* src/input.cc: Completely rewritten.
1012228060Sbapt	* src/output.h (Output::Output): Update the verbatim_* arguments.
1013228060Sbapt	(Output::_struct_decl): Renamed from Output::_array_type.
1014228060Sbapt	(Output::_verbatim_declarations): Renamed from Output::_include_src.
1015228060Sbapt	(Output::_verbatim_code): Replaces Output::_additional_code.
1016228060Sbapt	* src/output.cc (Output::Output): Update the verbatim_* arguments.
1017228060Sbapt	(Output::output): Output the verbatim_* code pieces with #line.
1018228060Sbapt	* src/main.cc (main): Call Input::read_input instead of
1019228060Sbapt	Input::read_keys. Update Output::Output arguments.
1020228060Sbapt	* src/read-line.h: Remove file.
1021228060Sbapt	* src/read-line.cc, src/read-line.icc: Remove files.
1022228060Sbapt	* src/Makefile.in (OBJECTS): Remove read-line.o.
1023228060Sbapt	(READ_LINE_H): Remove variable.
1024228060Sbapt	(INPUT_H): Update.
1025228060Sbapt	(read-line.o): Remove rule.
1026228060Sbapt	* doc/gperf.texi (Declarations): Correct the example.
1027228060Sbapt	(Keywords): Mention that lines starting with % are forbidden here.
1028228060Sbapt	* tests/c-parse.exp: Update.
1029228060Sbapt	* tests/cplusplus.exp: Update.
1030228060Sbapt	* tests/gpc.exp: Update.
1031228060Sbapt	* tests/java.exp: Update.
1032228060Sbapt	* tests/objc.exp: Update.
1033228060Sbapt	* tests/test-4.exp: Update.
1034228060Sbapt
1035228060Sbapt	* src/options.h (Options::get_input_file_name): New declaration.
1036228060Sbapt	(Options::_input_file_name): New field.
1037228060Sbapt	* src/options.icc (Options::get_input_file_name): New method.
1038228060Sbapt	* src/options.cc (Options::Options): Initialize _input_file_name.
1039228060Sbapt	(Options::parse_options): Don't open input file, only store it in
1040228060Sbapt	_input_file_name.
1041228060Sbapt	* src/main.cc (main): Open input file here.
1042228060Sbapt	Print an error message upon write error on the output file.
1043228060Sbapt
1044228060Sbapt	Upgrade to autoconf-2.52.
1045228060Sbapt	* configure.in: Use AC_CONFIG_SUBDIRS instead of AC_OUTPUT_SUBDIRS.
1046228060Sbapt	* Makefile.devel (configure, lib/configure, src/configure,
1047228060Sbapt	tests/configure, doc/configure): Use autoconf-2.52.
1048228060Sbapt
1049228060Sbapt2002-11-09  Bruno Haible  <bruno@clisp.org>
1050228060Sbapt
1051228060Sbapt	* doc/gperf.texi: Talk about "bytes" instead of "characters". Talk
1052228060Sbapt	about "keywords", not "keys". Talk about "input file", not "keyfile".
1053228060Sbapt	(@menu): Fix a menu entry.
1054228060Sbapt	(Contributors): Don't mention cperf.
1055228060Sbapt	(Motivation): Fix an off-by-one error in the definition of "minimal".
1056228060Sbapt	Mention GNU Java. Recommend http URL instead of anonymous ftp.
1057228060Sbapt	(Search Structures): Mention GNU Java.
1058228060Sbapt	(Output Format): Drop reference to node 'Implementation'.
1059228060Sbapt	(Output Details): Talk about "slot-name" instead of "key name".
1060228060Sbapt	(Algorithmic Details): Talk about "selected byte positons", not
1061228060Sbapt	"key positions". Upper limit is now 255. Explain a third reason
1062228060Sbapt	why duplicates can occur. Describe negative effects of
1063228060Sbapt	--occurrence-sort.
1064228060Sbapt	(Implementation): Remove chapter.
1065228060Sbapt
1066228060Sbapt2002-11-07  Bruno Haible  <bruno@clisp.org>
1067228060Sbapt
1068228060Sbapt	* src/bool-array.cc (Bool_Array::~Bool_Array): Free _storage_array.
1069228060Sbapt	* src/search.cc (Search::~Search): Free _union_set, _determined.
1070228060Sbapt
1071228060Sbapt	* tests/Makefile.in (check-test): Don't redirect stderr.
1072228060Sbapt
1073228060Sbapt2002-11-05  Bruno Haible  <bruno@clisp.org>
1074228060Sbapt
1075228060Sbapt	* src/keyword-list.h (mergesort_list): New declarations.
1076228060Sbapt	* src/keyword-list.cc (Keyword_Comparison): New type.
1077228060Sbapt	(merge, mergesort_list): New functions, moved here from search.cc.
1078228060Sbapt	* src/search.h (Search::merge, Search::merge_sort): Remove methods.
1079228060Sbapt	(Search::_occurrence_sort, Search::_hash_sort): Remove fields.
1080228060Sbapt	* src/search.cc (Search::merge, Search::merge_sort): Remove methods.
1081228060Sbapt	(greater_by_occurrence, less_by_hash_value): New functions.
1082228060Sbapt	(Search::reorder, Search::sort): Use mergesort_list.
1083228060Sbapt
1084228060Sbapt2002-11-04  Bruno Haible  <bruno@clisp.org>
1085228060Sbapt
1086228060Sbapt	* src/options.h (Options::_asso_iterations): New field.
1087228060Sbapt	(Options::get_asso_iterations): New method declaration.
1088228060Sbapt	* src/options.icc (Options::get_asso_iterations): New method.
1089228060Sbapt	* src/options.cc (Options::short_usage): Mention j<jump> and m<num>.
1090228060Sbapt	(Options::long_usage): Document option -m.
1091228060Sbapt	(Options::Options): Initialize _asso_iterations.
1092228060Sbapt	(Options::~Options): Print _asso_iterations too.
1093228060Sbapt	(long_options): Add --multiple-iterations.
1094228060Sbapt	(Options::parse_options): Handle option -m.
1095228060Sbapt	* src/keyword-list.h (copy_list, delete_list): New declarations.
1096228060Sbapt	* src/keyword-list.cc (copy_list, delete_list): New functions.
1097228060Sbapt	* src/search.h (Search::_initial_asso_value, Search::_jump): New fields.
1098228060Sbapt	* src/search.cc (Search::prepare_asso_values): Initialize
1099228060Sbapt	_initial_asso_value and _jump here.
1100228060Sbapt	(Search::init_asso_values): Use _initial_asso_value.
1101228060Sbapt	(Search::try_asso_value): Use _jump.
1102228060Sbapt	(Search::optimize): If option -m was given, iterate over different
1103228060Sbapt	values for _initial_asso_value and _jump.
1104228060Sbapt	* doc/gperf.texi (Algorithmic Details): Document option -m.
1105228060Sbapt	* tests/test-6.exp: Update.
1106228060Sbapt
1107228060Sbapt2002-11-03  Bruno Haible  <bruno@clisp.org>
1108228060Sbapt
1109228060Sbapt	Bug fix: When option -j 0 was used without option -r, the output was
1110228060Sbapt	not random.
1111228060Sbapt	* src/search.h (Search::prepare_asso_values): New method declaration.
1112228060Sbapt	* src/search.cc (Search::prepare_asso_values): New method, extracted
1113228060Sbapt	from Search::init_asso_values. Call srand also when "-j 0" was given.
1114228060Sbapt	(Search::optimize): Call prepare_asso_values().
1115228060Sbapt
1116228060Sbapt	* src/hash-table.h (Hash_Table::_ignore_length, Hash_Table::equal):
1117228060Sbapt	Declare as const.
1118228060Sbapt	* src/hash-table.cc (Hash_Table::equal): Declare as const.
1119228060Sbapt	* src/input.h (Input::_factory): Declare as const.
1120228060Sbapt	* src/keyword-list.h (Keyword_List::first, KeywordExt_List::first):
1121228060Sbapt	Declare as const.
1122228060Sbapt	* src/keyword-list.icc (Keyword_List::first, KeywordExt_List::first):
1123228060Sbapt	Declare as const.
1124228060Sbapt	* src/output.h (Output::num_hash_values, Output::output_constants,
1125228060Sbapt	Output::output_hash_function, Output::output_keylength_table,
1126228060Sbapt	Output::output_keyword_table, Output::output_lookup_array,
1127228060Sbapt	Output::output_lookup_tables, Output::output_lookup_function_body,
1128228060Sbapt	Output::output_lookup_function, Output::_array_type,
1129228060Sbapt	Output::_additional_code, Output::_include_src, Output::_total_keys,
1130228060Sbapt	Output::_total_duplicates, Output::_max_key_len, Output::_min_key_len):
1131228060Sbapt	Declare as const.
1132228060Sbapt	* src/output.cc (Output::num_hash_values, Output::output_constants,
1133228060Sbapt	Output::output_hash_function, Output::output_keylength_table,
1134228060Sbapt	Output::output_keyword_table, Output::output_lookup_array,
1135228060Sbapt	Output::output_lookup_tables, Output::output_lookup_function_body,
1136228060Sbapt	Output::output_lookup_function): Declare as const.
1137228060Sbapt	* src/search.h (Search::merge, Search::merge_sort,
1138228060Sbapt	Search::compute_occurrence, Search::already_determined,
1139228060Sbapt	Search::keyword_list_length, Search::max_key_length,
1140228060Sbapt	Search::get_max_keysig_size, Search::compute_hash,
1141228060Sbapt	Search::sort_by_occurrence): Declare as const.
1142228060Sbapt	* src/search.cc (Search::merge, Search::merge_sort,
1143228060Sbapt	Search::compute_occurrence, Search::already_determined,
1144228060Sbapt	Search::keyword_list_length, Search::max_key_length,
1145228060Sbapt	Search::get_max_keysig_size, Search::compute_hash,
1146228060Sbapt	Search::sort_by_occurrence): Declare as const.
1147228060Sbapt
1148228060Sbapt	* src/output.cc (Output::output): Set char_to_index to a cast in all
1149228060Sbapt	cases. Avoids gcc warnings on the generated code.
1150228060Sbapt
1151228060Sbapt	* src/output.cc (Output_Enum): Prepend an underscore to field names.
1152228060Sbapt	(Output_Expr1): Likewise.
1153228060Sbapt	(Output::output_hash_function): Simplify the special case for "-k 1,$".
1154228060Sbapt
1155228060Sbapt	* src/search.h (Search::init_asso_values, Search::find_asso_values):
1156228060Sbapt	New declarations.
1157228060Sbapt	(Search::try_asso_value): Renamed from Search::affects_prev.
1158228060Sbapt	(Search::change_some_asso_value): Renamed from Search::change.
1159228060Sbapt	(Search::set_asso_max, Search::get_asso_max): Remove methods.
1160228060Sbapt	(Search::_union_set): New field.
1161228060Sbapt	* src/search.cc (Search::init_asso_values): New method, extracted
1162228060Sbapt	from Search::optimize.
1163228060Sbapt	(Search::try_asso_value): Renamed from Search::affects_prev. Take the
1164228060Sbapt	iteration count as argument.
1165228060Sbapt	(Search::change_some_asso_value): Renamed from Search::change. Don't
1166228060Sbapt	make union_set static. Don't increment _fewest_collisions here.
1167228060Sbapt	(Search::find_asso_values): New method, extracted from
1168228060Sbapt	Search::optimize.
1169228060Sbapt	(Search::optimize); Update.
1170228060Sbapt
1171228060Sbapt	* src/search.h (Search::compute_hash): Renamed from Search::hash.
1172228060Sbapt	(Search::compute_disjoint_union): Remove declaration.
1173228060Sbapt	(Search::sort_by_occurrence): Renamed from Search::sort_set.
1174228060Sbapt	* src/search.cc (Search::compute_hash): Renamed from Search::hash.
1175228060Sbapt	(compute_disjoint_union): Renamed from Search::compute_disjoint_union.
1176228060Sbapt	(Search::sort_by_occurrence): Renamed from Search::sort_set.
1177228060Sbapt	(Search::change): Simplify loop.
1178228060Sbapt
1179228060Sbapt	* src/search.h (Search::clear_determined): New declaration.
1180228060Sbapt	* src/search.cc (Search::clear_determined): New method.
1181228060Sbapt	(Search::already_determined): Optimize.
1182228060Sbapt	(Search::reorder): Even when the next keyword after the current one
1183228060Sbapt	is completely determined, move all determined keywords after the
1184228060Sbapt	current one.
1185228060Sbapt
1186228060Sbapt	Compute the occurrences after removal of duplicates, not before.
1187228060Sbapt	* src/keyword.h (KeywordExt::init_selchars): Remove occurrences
1188228060Sbapt	argument.
1189228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Likewise.
1190228060Sbapt	* src/search.cc (Search::prepare): Reorder the code. Compute the
1191228060Sbapt	occurrences after removal of duplicates.
1192228060Sbapt	(Search::merge_sort): Optimize the loop.
1193228060Sbapt	(Search::compute_occurrence): Renamed from Search::get_occurrence.
1194228060Sbapt	* src/search.h (Search::compute_occurrence): Renamed from
1195228060Sbapt	Search::get_occurrence.
1196228060Sbapt	* tests/chill.exp: Regenerated.
1197228060Sbapt
1198228060Sbapt	Bug fix: The hash table could fail to detect duplicates, between
1199228060Sbapt	keywords of different length, when option -n (option[NOLENGTH]) was
1200228060Sbapt	given.
1201228060Sbapt	* src/hash-table.h (Hash_Table::Hash_Table): Pass table size, not
1202228060Sbapt	vector and vector size as arguments.
1203228060Sbapt	(Hash_Table::_log_size): New field.
1204228060Sbapt	(Hash_Table::equal): New declaration.
1205228060Sbapt	* src/hash-table.cc (size_factor): New variable.
1206228060Sbapt	(Hash_Table::Hash_Table): Pass table size, not vector and vector size
1207228060Sbapt	as arguments. Allocate the vector here.
1208228060Sbapt	(Hash_Table::~Hash_Table): Deallocate the vector here.
1209228060Sbapt	(Hash_Table::equal): New function.
1210228060Sbapt	(Hash_Table::insert): Use it. Don't use item->_allchars_length for the
1211228060Sbapt	increment if _ignore_length is true.
1212228060Sbapt	* src/search.cc (TABLE_MULTIPLE): Remove variable.
1213228060Sbapt	(Search::prepare): Update.
1214228060Sbapt
1215228060Sbapt2002-11-02  Bruno Haible  <bruno@clisp.org>
1216228060Sbapt
1217228060Sbapt	Provide documentation also in PDF format.
1218228060Sbapt	* doc/Makefile.in (pdfdir, TEXI2PDF): New variables.
1219228060Sbapt	(all): Depend on pdf.
1220228060Sbapt	(pdf, gperf.pdf): New rules.
1221228060Sbapt	(maintainer-clean): Remove the PDF file.
1222228060Sbapt
1223228060Sbapt	* src/keyword-list.icc: New file, extracted from keyword-list.h.
1224228060Sbapt	* src/keyword-list.h: Include keyword-list.icc. Move inline methods
1225228060Sbapt	to there.
1226228060Sbapt	* src/keyword-list.cc: Include keyword-list.icc.
1227228060Sbapt	* src/Makefile.in (KEYWORD_LIST_H): Add keyword-list.icc.
1228228060Sbapt
1229228060Sbapt	* lib/hashpjw.h (hashpjw): Change argument type to 'unsigned char *'.
1230228060Sbapt	* lib/hash.cc (hashpjw): Likewise.
1231228060Sbapt	* src/keyword.icc: New file.
1232228060Sbapt	* src/keyword.h: Include keyword.icc.
1233228060Sbapt	(KeywordExt::_selchars): Change type to 'unsigned char *'.
1234228060Sbapt	* src/keyword.cc: Include keyword.icc.
1235228060Sbapt	(Keyword::Keyword, KeywordExt::KeywordExt): Move to keyword.icc.
1236228060Sbapt	(sort_char_set): Change argument type to 'unsigned char *'.
1237228060Sbapt	(KeywordExt::init_selchars): Update.
1238228060Sbapt	* src/search.h (Search::compute_disjoint_union): Change argument types
1239228060Sbapt	to 'unsigned char *'.
1240228060Sbapt	(Search::sort_set): Likewise.
1241228060Sbapt	(Search::affects_prev): Change argument type to 'unsigned char'.
1242228060Sbapt	* src/search.cc (Search::prepare): Initialize _duplicate_link here.
1243228060Sbapt	(Search::get_occurrence, Search::set_determined,
1244228060Sbapt	Search::already_determined, Search::hash): Update.
1245228060Sbapt	(Search::compute_disjoint_union): Change argument types to
1246228060Sbapt	'unsigned char *'.
1247228060Sbapt	(Search::sort_set): Likewise.
1248228060Sbapt	(Search::affects_prev): Change argument type to 'unsigned char'.
1249228060Sbapt	(Search::change): Update.
1250228060Sbapt	* src/Makefile.in (KEYWORD_H): Add keyword.icc.
1251228060Sbapt
1252228060Sbapt	* src/options.cc (Options::parse_options): Fix error message.
1253228060Sbapt
1254228060Sbapt	* src/read-line.h (Read_Line::Read_Line): Make FILE* argument
1255228060Sbapt	mandatory. Move body to read-line.icc.
1256228060Sbapt	* src/read-line.icc (Read_Line::Read_Line): New constructor.
1257228060Sbapt	* src/input.h (Input::Input): Add FILE* argument.
1258228060Sbapt	* src/input.cc (Input::Input): Likewise.
1259228060Sbapt	* src/main.cc (main): Pass stdin to Input constructor.
1260228060Sbapt
1261228060Sbapt	* src/options.h (DEFAULTCHARS): Remove.
1262228060Sbapt	(Positions::MAX_KEY_POS): Set to 255.
1263228060Sbapt	(Positions::_positions): Increase array size.
1264228060Sbapt	(PositionIterator::EOS): Set to -1.
1265228060Sbapt	(PositionIterator::_index): Change type to 'unsigned int'.
1266228060Sbapt	* src/options.icc (Positions::Positions): Don't store
1267228060Sbapt	PositionIterator::EOS.
1268228060Sbapt	(PositionIterator::next): Produce PositionIterator::EOS here.
1269228060Sbapt	* src/options.cc (Options::long_usage): Use MAX_KEY_POS, not
1270228060Sbapt	MAX_KEY_POS-1.
1271228060Sbapt	(PositionStringParser): Rename field _size to _in_range. Rename
1272228060Sbapt	field _curr_value to _range_curr_value. Rename field _upper_bound
1273228060Sbapt	to _range_upper_bound.
1274228060Sbapt	(PositionStringParser::nextPosition): Comments.
1275228060Sbapt	(Options::Options): Update.
1276228060Sbapt	(Options::~Options): Update.
1277228060Sbapt	(long_options): Use NULL, not 0.
1278228060Sbapt	(Options::parse_options): Set BAD_VALUE to -2; -1 is now EOS. Bug fix:
1279228060Sbapt	Check against array overflow when more than MAX_KEY_POS positions are
1280228060Sbapt	given. Don't store PositionIterator::EOS.
1281228060Sbapt	Check against extra arguments before opening the input file.
1282228060Sbapt	* src/output.cc (Output::output_hash_function): Change test which
1283228060Sbapt	was for option[DEFAULTCHARS].
1284228060Sbapt	* tests/test-6.exp: Update.
1285228060Sbapt
1286228060Sbapt	* src/options.h (Options::get_delimiters): Renamed from
1287228060Sbapt	Options::get_delimiter.
1288228060Sbapt	* src/options.icc (Options::get_delimiters): Renamed from
1289228060Sbapt	Options::get_delimiter.
1290228060Sbapt	* src/input.cc (Input::read_keys): Update.
1291228060Sbapt
1292228060Sbapt	Bug fix.
1293228060Sbapt	* src/options.cc (Options::print_options): Escape backquote inside
1294228060Sbapt	double-quoted strings.
1295228060Sbapt
1296228060Sbapt	Bug fix.
1297228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Avoid comparison with
1298228060Sbapt	uninitialized member variable. Found with 'valgrind'.
1299228060Sbapt
1300228060Sbapt	* src/version.cc: Include version.h.
1301228060Sbapt	* src/Makefile.in (OBJECTS): Reorder.
1302228060Sbapt	(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
1303228060Sbapt	variables.
1304228060Sbapt	(HASH_TABLE_H): Update.
1305228060Sbapt	(options.o, read-line.o, keyword.o, keyword-list.o, input.o, search.o,
1306228060Sbapt	output.o, main.o): Update dependencies.
1307228060Sbapt
1308228060Sbapt	* src/vectors.h: Remove file.
1309228060Sbapt	* src/vectors.cc: Remove file.
1310228060Sbapt	* src/search.h: Don't include vectors.h.
1311228060Sbapt	(Search): Don't inherit from Vectors. New fields _alpha_size,
1312228060Sbapt	_occurrences, _asso_values.
1313228060Sbapt	(Search::_determined, Search::get_occurrence, Search::set_determined,
1314228060Sbapt	Search::already_determined, Search::hash, Search::sort_set): Make
1315228060Sbapt	nonstatic.
1316228060Sbapt	* src/search.cc (Search::Search): Initialize _alpha_size, _occurrences,
1317228060Sbapt	_asso_values, _determined.
1318228060Sbapt	(Search::optimize, Search::~Search): Update.
1319228060Sbapt	* src/output.h: Don't include vectors.h.
1320228060Sbapt	(Output): Remove field _v. New fields _alpha_size, _occurrences,
1321228060Sbapt	_asso_values.
1322228060Sbapt	(Output::Output): Replace Vectors* argument with alpha_size,
1323228060Sbapt	occurrences, asso_values.
1324228060Sbapt	* src/output.cc (Output::Output): Replace Vectors* argument with
1325228060Sbapt	alpha_size, occurrences, asso_values.
1326228060Sbapt	(Output::output_hash_function): Update.
1327228060Sbapt	* src/main.cc (main): Don't set Vectors::ALPHA_SIZE.
1328228060Sbapt	Pass _alpha_size, _occurrences, _asso_values from Search to Output.
1329228060Sbapt	* src/keyword.h: Don't include vectors.h.
1330228060Sbapt	* src/Makefile.in (OBJECTS): Remove vectors.o.
1331228060Sbapt	(VECTORS_H): Remove variable.
1332228060Sbapt	(vectors.o): Remove rule.
1333228060Sbapt
1334228060Sbapt	* src/search.h: New file, combines src/key-list.h, src/gen-perf.h.
1335228060Sbapt	* src/search,cc: New file, combines src/key-list.cc, src/gen-perf.cc.
1336228060Sbapt	* src/key-list.h: Remove file.
1337228060Sbapt	* src/key-list.cc: Remove file.
1338228060Sbapt	* src/gen-perf.h: Remove file.
1339228060Sbapt	* src/gen-perf.cc: Remove file.
1340228060Sbapt	* src/main.cc (KeywordExt_Factory): Moved here from gen-perf.cc.
1341228060Sbapt	(main): Inline some code from gen-perf.cc.
1342228060Sbapt	* src/keyword.h (KeywordExt::init_selchars): Take the occurrences
1343228060Sbapt	vector as argument.
1344228060Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Take the occurrences
1345228060Sbapt	vector as argument.
1346228060Sbapt	* src/input.cc (Input::set_output_types): Initialize _array_type,
1347228060Sbapt	_return_type, _struct_tag.
1348228060Sbapt	(Input::read_keys): Initialize _additional_code.
1349228060Sbapt	* src/Makefile.in (OBJECTS): Add search.o.
1350228060Sbapt	Remove key-list.o, gen-perf.o.
1351228060Sbapt	(KEY_LIST_H, GEN_PERF_H): Remove variables.
1352228060Sbapt	(gen-perf.o, key-list.o): Remove rules.
1353228060Sbapt	(search.o): New rule.
1354228060Sbapt
1355228060Sbapt	* *, */*: Update copyright notice to GPL version 2.
1356228060Sbapt
1357228060Sbapt	* src/keyword-list.h (Keyword_List): New class.
1358228060Sbapt	(KeywordExt_List): Inherit from it.
1359228060Sbapt	* src/keyword-list.cc (Keyword_List::Keyword_List): New constructor.
1360228060Sbapt	(KeywordExt_List::KeywordExt_List): Update.
1361228060Sbapt	* src/input.h (Input::Input): Add Keyword_Factory argument.
1362228060Sbapt	(Input::_factory): New field.
1363228060Sbapt	(Input::_head): Change type to Keyword_List*.
1364228060Sbapt	(Input::parse_line): New declaration.
1365228060Sbapt	* src/input.cc (Input::Input): New constructor.
1366228060Sbapt	(Input::parse_line): Renamed from parse_line. Use the _factory.
1367228060Sbapt	(Input::read_keys): Update.
1368228060Sbapt	* src/key-list.cc (KeywordExt_Factory): New class.
1369228060Sbapt	(Key_List::read_keys): Pass a KeywordExt_Factory as Input constructor
1370228060Sbapt	argument.
1371228060Sbapt
1372228060Sbapt	Avoid g++ -Wold-style-cast warnings.
1373228060Sbapt	* src/bool-array.icc: Use new-style casts.
1374228060Sbapt	* src/gen-perf.cc: Likewise.
1375228060Sbapt	* src/input.cc: Likewise.
1376228060Sbapt	* src/key-list.cc: Likewise.
1377228060Sbapt	* src/keyword.cc: Likewise.
1378228060Sbapt	* src/options.cc: Likewise.
1379228060Sbapt	* src/output.cc: Likewise.
1380228060Sbapt	* src/hash-table.cc: Likewise. Remove (char *) cast in memset argument.
1381228060Sbapt
1382228060Sbapt	* src/keyword-list.h (KeywordExt_List): Don't inherit from KeywordExt.
1383228060Sbapt	(KeywordExt_List::KeywordExt_List): Take a KeywordExt* as argument.
1384228060Sbapt	(KeywordExt_List::_car): New field.
1385228060Sbapt	(KeywordExt_List::first): Use it.
1386228060Sbapt	* src/keyword-list.cc (KeywordExt_List::KeywordExt_List): Take a
1387228060Sbapt	KeywordExt* as argument.
1388228060Sbapt	* src/input.cc (parse_line): Create the KeywordExt separately.
1389228060Sbapt
1390228060Sbapt	Start using bool.
1391228060Sbapt	* src/bool-array.h (Bool_Array::set_bit): Change return type to bool.
1392228060Sbapt	* src/bool-array.icc (Bool_Array::set_bit): Likewise.
1393228060Sbapt	* src/gen-perf.h (Gen_Perf::affects_prev): Likewise.
1394228060Sbapt	* src/gen-perf.cc (Gen_Perf::affects_prev): Likewise.
1395228060Sbapt	* src/hash-table.h (Hash_Table::_ignore_length): Change type to bool.
1396228060Sbapt	(Hash_Table::Hash_Table): Change 3rd argument type to bool.
1397228060Sbapt	* src/hash-table.cc (Hash_Table::Hash_Table): Likewise.
1398228060Sbapt	* src/input.h (Input::_additional_code): Change type to bool.
1399228060Sbapt	* src/input.cc (Input::read_keys): Update.
1400228060Sbapt	* src/key-list.h (Key_List::_occurrence_sort, Key_List::_hash_sort,
1401228060Sbapt	Key_List::_additional_code): Change type to bool.
1402228060Sbapt	(Key_List::_determined): Change element type to bool.
1403228060Sbapt	(Key_List::already_determined): Change return type to bool.
1404228060Sbapt	* src/key-list.cc (Key_List::_determined): Change element type to bool.
1405228060Sbapt	(Key_List::set_determined): Update.
1406228060Sbapt	(Key_List::already_determined): Change return type to bool.
1407228060Sbapt	(Key_List::reorder, Key_List::sort, Key_List::Key_List): Update.
1408228060Sbapt	* src/options.h (Positions::sort): Change return type to bool.
1409228060Sbapt	(Options::operator[]): Likewise.
1410228060Sbapt	* src/options.icc (Positions::sort): Change return type to bool.
1411228060Sbapt	(Options::operator[]): Likewise.
1412228060Sbapt	* src/output.h (Output::Output): Change 5th argument type to bool.
1413228060Sbapt	(Output::_additional_code): Change type to bool.
1414228060Sbapt	* src/output.cc (Output::Output): Change 5th argument type to bool.
1415228060Sbapt
1416228060Sbapt2002-10-16  Bruno Haible  <bruno@clisp.org>
1417228060Sbapt
1418228060Sbapt	* src/*.h: Align all member names at column 24.
1419228060Sbapt
1420228060Sbapt2002-10-15  Bruno Haible  <bruno@clisp.org>
1421228060Sbapt
1422228060Sbapt	* src/input.h: New file.
1423228060Sbapt	* src/input.cc: New file, extracted from key-list.cc.
1424228060Sbapt	* src/key-list.h (Key_List): Don't inherit from Read_Line.
1425228060Sbapt	(Key_List::get_special_input,
1426228060Sbapt	Key_List::save_include_src, Key_List::get_array_type,
1427228060Sbapt	Key_List::strcspn, Key_List::set_output_types): Remove methods.
1428228060Sbapt	* src/key-list.cc (Key_List::get_special_input,
1429228060Sbapt	Key_List::save_include_src, Key_List::get_array_type,
1430228060Sbapt	Key_List::strcspn, Key_List::set_output_types, parse_line): Move to
1431228060Sbapt	src/input.cc.
1432228060Sbapt	(Key_List::read_keys): Use Input::read_keys.
1433228060Sbapt	(Key_List::Key_List): Update.
1434228060Sbapt	* src/gen-perf.cc: Update.
1435228060Sbapt	* src/Makefile.in (OBJECTS): Add input.o.
1436228060Sbapt	(input.o): New rule.
1437228060Sbapt
1438228060Sbapt2002-10-14  Bruno Haible  <bruno@clisp.org>
1439228060Sbapt
1440228060Sbapt	* src/options.cc: Don't include "vector.h".
1441228060Sbapt	(Options::parse_options): Don't initialize Vectors::ALPHA_SIZE here.
1442228060Sbapt	* src/vectors.cc (Vectors::ALPHA_SIZE): Don't initialize here.
1443228060Sbapt	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Initialize Vectors::ALPHA_SIZE.
1444228060Sbapt
1445228060Sbapt	* src/options.h (Positions): New class.
1446228060Sbapt	(PositionIterator): New class.
1447228060Sbapt	(Options::parse_options): Renamed from Options::operator().
1448228060Sbapt	(Options::get_asso_max, Options::set_asso_max): Move to class Key_List.
1449228060Sbapt	(Options::reset, Options::get): Remove, replaced by class
1450228060Sbapt	PositionIterator.
1451228060Sbapt	(Options::get_initial_asso_value): Renamed from Options::initial_value.
1452228060Sbapt	(Options::key_sort): Remove, replaced by Positions::sort.
1453228060Sbapt	(Options): Make all fields and methods non-static.
1454228060Sbapt	* src/options.icc (Positions::Positions, Positions::operator[],
1455228060Sbapt	Positions::get_size, Positions::pointer, Positions::set_size,
1456228060Sbapt	Positions::sort, PositionIterator::PositionIterator,
1457228060Sbapt	PositionIterator::next): New methods.
1458228060Sbapt	(Options::get_initial_asso_value): Renamed from Options::initial_value.
1459228060Sbapt	(Options::get_size_multiple): New method.
1460228060Sbapt	(Options::get_key_positions): New method.
1461228060Sbapt	(Options::get_max_keysig_size): Implement using _key_positions.
1462228060Sbapt	* src/options.cc (Options::long_usage): Split big string into small
1463228060Sbapt	pieces.
1464228060Sbapt	(PositionStringParser): Prefix field names with _.
1465228060Sbapt	(Options::Options): Update.
1466228060Sbapt	(Options::~Options): Fix explanation of of _size_multiple. Don't print
1467228060Sbapt	_key_positions if it is effectively ignored.
1468228060Sbapt	(Options::parse_options): Renamed from Options::operator(). Update.
1469228060Sbapt	* src/key-list.h (Key_List): New field _size. New methods get_asso_max,
1470228060Sbapt	set_asso_max, get_max_keysig_size.
1471228060Sbapt	* src/key-list.cc (Key_List::read_keys): Don't make side effects on
1472228060Sbapt	options.
1473228060Sbapt	(Key_List::dump): Use Key_List::get_max_keysig_size() instead of
1474228060Sbapt	Options::get_max_keysig_size().
1475228060Sbapt	(Key_List::get_max_keysig_size): New function.
1476228060Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
1477228060Sbapt	width on the fly if option[ALLCHARS].
1478228060Sbapt	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Update,
1479228060Sbapt	Use Options::get_size_multiple() instead of Options::get_asso_max().
1480228060Sbapt	Use Key_List::get_asso_max() instead of Options::get_asso_max(). Use
1481228060Sbapt	Key_List::get_max_keysig_size() instead of
1482228060Sbapt	Options::get_max_keysig_size().
1483228060Sbapt	(Gen_Perf::affects_prev): Likewise.
1484228060Sbapt	(Gen_Perf::change): Likewise.
1485228060Sbapt	* src/keyword.cc: Update.
1486228060Sbapt	* src/main.cc: Update.
1487228060Sbapt	* src/output.cc: Update.
1488228060Sbapt	* tests/test-6.exp: Update.
1489228060Sbapt
1490228060Sbapt2002-10-13  Bruno Haible  <bruno@clisp.org>
1491228060Sbapt
1492228060Sbapt	* src/bool-array.*: Some polishing.
1493228060Sbapt
1494228060Sbapt	* src/options.h (Options::operator=, Options::operator!=): Remove
1495228060Sbapt	unused methods.
1496228060Sbapt	* src/options.icc (Options::operator=, Options::operator!=): Remove.
1497228060Sbapt
1498228060Sbapt	* src/*.h: Prefix all field names with _.
1499228060Sbapt	* src/*.cc, src/*.icc: Update.
1500228060Sbapt
1501228060Sbapt	* src/*: Simplify declarations of functions without arguments.
1502228060Sbapt
1503228060Sbapt2002-10-04  Bruno Haible  <bruno@clisp.org>
1504228060Sbapt
1505228060Sbapt	* src/output.h: New file, extracted from key-list.h.
1506228060Sbapt	* src/output.cc: New file, extracted from key-list.cc.
1507228060Sbapt	* src/key-list.h (Key_List): Make some fields protected. Move output
1508228060Sbapt	routines to src/output.h.
1509228060Sbapt	* src/key-list.cc: Move output routines to src/output.cc.
1510228060Sbapt	* src/gen-perf.cc (Gen_Perf::doit_all): Use class Output.
1511228060Sbapt	* src/Makefile.in (OBJECTS): Add output.o.
1512228060Sbapt	(output.o): New rule.
1513228060Sbapt
1514228060Sbapt2002-10-03  Bruno Haible  <bruno@clisp.org>
1515228060Sbapt
1516228060Sbapt	* src/iterator.h: Remove file.
1517228060Sbapt	* src/iterator.cc: Remove file.
1518228060Sbapt	* src/options.cc: (PositionStringParser): New class, taken from old
1519228060Sbapt	iterator.cc.
1520228060Sbapt	* src/Makefile.in (OBJECTS): Remove iterator.o.
1521228060Sbapt	(ITERATOR_H): Remove variable.
1522228060Sbapt	(iterator.o): Remove rule.
1523228060Sbapt
1524228060Sbapt	* src/keyword-list.h: New file.
1525228060Sbapt	* src/keyword-list.cc: New file.
1526228060Sbapt	* src/list-node.h: Remove file.
1527228060Sbapt	* src/list-node.cc: Remove file.
1528228060Sbapt	* src/keyword.h (KeywordExt::init_selchars): New declaration.
1529228060Sbapt	* src/keyword.cc (sort_char_set, KeywordExt::init_selchars): New, from
1530228060Sbapt	old list-node.cc.
1531228060Sbapt	* src/gen-perf.cc: Replace List_Node by KeywordExt or KeywordExt_List,
1532228060Sbapt	as appropriate.
1533228060Sbapt	* src/hash-table.h: Likewise.
1534228060Sbapt	* src/key-list.h: Likewise.
1535228060Sbapt	* src/key-list.cc: Likewise.
1536228060Sbapt	* src/Makefile.in (OBJECTS): Remove list-node.o, add keyword-list.o.
1537228060Sbapt	(LIST_NODE_H): Remove macro.
1538228060Sbapt	(list-node.o): Remove rule.
1539228060Sbapt	(keyword-list.o): New rule.
1540228060Sbapt
1541228060Sbapt	* src/keyword.h (KeywordExt): New class.
1542228060Sbapt	* src/keyword.cc (KeywordExt): New constructor.
1543228060Sbapt	* src/list-node.h (List_Node): Inherit from KeywordExt.
1544228060Sbapt	* src/list-node.cc: Update.
1545228060Sbapt	* src/gen-perf.cc: Update.
1546228060Sbapt	* src/hash-table.cc: Update.
1547228060Sbapt	* src/key-list.cc: Update.
1548228060Sbapt	(output_keyword_entry): Change argument type to KeywordExt*.
1549228060Sbapt
1550228060Sbapt	* src/keyword.h: New file.
1551228060Sbapt	* src/keyword.cc: New file.
1552228060Sbapt	* src/list-node.h (List_Node): Extend Keyword.
1553228060Sbapt	* src/list-node.cc: Update.
1554228060Sbapt	* src/gen-perf.cc: Update.
1555228060Sbapt	* src/hash-table.cc: Update.
1556228060Sbapt	* src/key-list.cc: Update.
1557228060Sbapt	* src/Makefile.in (OBJECTS): Add keyword.o.
1558228060Sbapt	(keyword.o): New rule.
1559228060Sbapt
1560228060Sbapt	* src/key-list.cc (Key_List::read_keys): Allocate the memory for the
1561228060Sbapt	hash table using 'new'.
1562228060Sbapt	(Key_List::output_lookup_array): Allocate the memory for the duplicates
1563228060Sbapt	array using 'new'.
1564228060Sbapt	* src/options.h (LARGE_STACK_ARRAYS): Remove definition.
1565228060Sbapt	* src/main.cc (main): Remove setrlimit call.
1566228060Sbapt	* src/configure.in: Don't test for unistd.h, sys/time.h,
1567228060Sbapt	sys/resource.h, getrlimit, setrlimit.
1568228060Sbapt
1569228060Sbapt	* src/bool-array.h (Bool_Array): Make all members non-static.
1570228060Sbapt	Add an argument to the constructor. Remove init(), rename reset() to
1571228060Sbapt	clear(), rename find() to set_bit().
1572228060Sbapt	* src/bool-array.icc: Move init() code into the constructor.
1573228060Sbapt	Rename reset() to clear(), rename find() to set_bit().
1574228060Sbapt	* src/gen-perf.h (Gen_Perf): Add collision_detector member.
1575228060Sbapt	* src/gen-perf.cc: Update.
1576228060Sbapt
1577228060Sbapt	* src/gen-perf.h (Gen_Perf::doit_all): Renamed from
1578228060Sbapt	Gen_Perf::operator ().
1579228060Sbapt	* src/gen-perf.cc (Gen_Perf::doit_all): Renamed from
1580228060Sbapt	Gen_Perf::operator ().
1581228060Sbapt	* src/main.cc: Update.
1582228060Sbapt
1583228060Sbapt	* src/read-line.h (Read_Line::read_next_line): Renamed from
1584228060Sbapt	Read_Line::get_line.
1585228060Sbapt	* src/read-line.icc: Likewise.
1586228060Sbapt	* src/read-line.cc: Update.
1587228060Sbapt	* src/key-list.cc: Update.
1588228060Sbapt
1589228060Sbapt	* lib/getline.h: New file.
1590228060Sbapt	* lib/getline.cc: New file.
1591228060Sbapt	* lib/Makefile.in (OBJECTS): Add getline.o.
1592228060Sbapt	(getline.o): New rule.
1593228060Sbapt	* src/read-line.h (Read_Line::readln_aux): Remove declaration.
1594228060Sbapt	* src/read-line.cc (Read_Line::readln_aux): Remove function.
1595228060Sbapt	* src/read-line.icc (Read_Line::get_line): Use ::get_line.
1596228060Sbapt	* src/options.h (LARGE_STACK): Remove macro.
1597228060Sbapt
1598228060Sbapt	* src/bool-array.h (STORAGE_TYPE): Remove type.
1599228060Sbapt	Use 'unsigned int' instead of STORAGE_TYPE.
1600228060Sbapt	* src/bool-array.cc: Likewise.
1601228060Sbapt	* src/bool-array.icc: Likewise.
1602228060Sbapt	* src/gen-perf.cc: Likewise.
1603228060Sbapt
1604228060Sbapt	* src/new.cc: Remove file.
1605228060Sbapt	* src/Makefile.in (OBJECTS): Remove new.o.
1606228060Sbapt	(new.o): Remove rule.
1607228060Sbapt	* src/configure.in: Remove test for HAVE_THROW_DECL.
1608228060Sbapt	* acconfig.h: Remove file.
1609228060Sbapt
1610228060Sbapt	* src/trace.h: Remove file.
1611228060Sbapt	* src/trace.cc: Remove file.
1612228060Sbapt	* src/Makefile.in (OBJECTS): Remove trace.o.
1613228060Sbapt	(TRACE_H): Remove variable.
1614228060Sbapt	(trace.o): Remove rule.
1615228060Sbapt	Update all dependencies.
1616228060Sbapt	* src/bool-array.h, src/bool-array.cc, src/bool-array.icc: Don't use T.
1617228060Sbapt	* src/gen-perf.cc: Likewise.
1618228060Sbapt	* src/hash-table.cc: Likewise.
1619228060Sbapt	* src/iterator.cc: Likewise.
1620228060Sbapt	* src/key-list.cc: Likewise.
1621228060Sbapt	* src/list-node.cc: Likewise.
1622228060Sbapt	* src/main.cc: Likewise.
1623228060Sbapt	* src/new.cc: Likewise.
1624228060Sbapt	* src/options.h, src/options.cc, src/options.icc: Likewise.
1625228060Sbapt	* src/read-line.h, src/read-line.cc, src/read-line.icc: Likewise.
1626228060Sbapt
1627228060Sbapt	* tests/Makefile.in: Use gperf option -I, to avoid gcc-3.x warnings.
1628228060Sbapt	* tests/test.c: Don't use gets(), to avoid warnings.
1629228060Sbapt
1630228060Sbapt2001-08-02  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1631228060Sbapt
1632228060Sbapt	* doc/gperf.texi: Change bug report address to <bug-gnu-gperf@gnu.org>.
1633228060Sbapt	* README: Updated.
1634228060Sbapt
1635228060Sbapt2000-12-18  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1636228060Sbapt
1637228060Sbapt        * src/configure.in: Add check for rand() in libm. Needed for BeOS.
1638228060Sbapt        * src/Makefile.in (LIBS): Use @GPERF_LIBM@ instead of hardwiring -lm.
1639228060Sbapt
1640228060Sbapt2000-11-20  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1641228060Sbapt
1642228060Sbapt        * doc/help2man: Update to version 1.23.
1643228060Sbapt
164467064Sobrien2000-09-26  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
164567064Sobrien
164667064Sobrien        * gperf-2.7.2 released.
164767064Sobrien
164867064Sobrien        * doc/gperf.texi: Add a second bug report address
164967064Sobrien          <gperf-bugs@lists.sourceforge.net>.
165067064Sobrien        * README: Updated.
165167064Sobrien
165267064Sobrien2000-08-28  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
165367064Sobrien
165467064Sobrien        * lib/getopt.h (struct option): Use "const" also when compiling in
165567064Sobrien          C++ mode. Avoids warnings from Sun CC and HP-UX aCC.
165667064Sobrien
165767064Sobrien        * doc/Makefile.in (docdir): Change from $(datadir)/doc/@PACKAGE@ to
165867064Sobrien          $(prefix)/doc/@PACKAGE@, following the newest GNU standards.
165967064Sobrien
166067064Sobrien2000-08-20  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
166167064Sobrien
166267064Sobrien        * src/version.cc: Bump version number to 2.7.2.
166367064Sobrien        * doc/gperf.texi: Likewise.
166467064Sobrien
166567064Sobrien        * doc/texinfo.tex: Update to post-texinfo-4.0 version. @code in the
166667064Sobrien          title page now chooses a larger font. The overall layout of the
166767064Sobrien          text is denser.
166867064Sobrien
166967064Sobrien        * AUTHORS: New file.
167067064Sobrien
167167064Sobrien        * tests/Makefile.in (all): Add check-lang-utf8 and check-lang-ucs2.
167267064Sobrien          (check-lang-utf8, check-lang-ucs2): New targets.
167367064Sobrien          (clean): Remove lu8out and lu2out.
167467064Sobrien        * tests/lang-utf8.gperf, tests/lang-utf8.exp: New files.
167567064Sobrien        * tests/lang-ucs2.gperf, tests/test2.c, tests/lang-ucs2.in,
167667064Sobrien          tests/lang-ucs2.exp: New files.
167767064Sobrien
167867064Sobrien        Allow the use of embedded NULs in keys.
167967064Sobrien        * lib/hash.h (hashpjw): Add a length argument.
168067064Sobrien        * lib/hash.cc (hashpjw): Likewise. Don't stop when encountering a NUL
168167064Sobrien          character.
168267064Sobrien        * src/hash-table.h (Hash_Table constructor): Add ignore_len argument.
168367064Sobrien          (Hash_Table::ignore_length): New field.
168467064Sobrien          (Hash_Table::insert): Renamed from Hash_Table::operator(). Remove
168567064Sobrien          ignore_length argument.
168667064Sobrien        * src/hash-table.cc (NIL): Remove macro.
168767064Sobrien          (Hash_Table constructor): Add ignore_len argument. Use it to
168867064Sobrien          initialize ignore_length.
168967064Sobrien          (Hash_Table destructor): Specify explicit length of char_set and
169067064Sobrien          key.
169167064Sobrien          (Hash_Table::insert): Renamed from Hash_Table::operator(). Remove
169267064Sobrien          ignore_length argument. Pass explicit length to hashpjw. Compare
169367064Sobrien          char_set using memcmp, not strcmp.
169467064Sobrien        * src/list-node.h (List_Node): Rename field length to key_length.
169567064Sobrien          New field char_set_length.
169667064Sobrien          (List_Node constructor): Accept key and rest, not the entire line.
169767064Sobrien        * src/list-node.cc (List_Node constructor): Accept key and rest, not
169867064Sobrien          the entire line. Don't NUL terminate key and char_set. Specify
169967064Sobrien          explicit length of key. Initialize char_set_length field.
170067064Sobrien        * src/key-list.cc: Include <ctype.h>.
170167064Sobrien          (parse_line): New function.
170267064Sobrien          (Key_List::read_keys): Call parse_line instead of new List_Node.
170367064Sobrien          Pass option[NOLENGTH] to Hash_Table constructor, not
170467064Sobrien          Hash_Table::insert. Specify explicit length of key and char_set.
170567064Sobrien          (Key_List::get_occurrence): Use explicit length of char_set.
170667064Sobrien          (Key_List::set_determined): Likewise.
170767064Sobrien          (Key_List::already_determined): Likewise.
170867064Sobrien          (output_string): Add length argument. Output unprintable characters
170967064Sobrien          using octal escape sequence.
171067064Sobrien          (output_keyword_entry): Use explicit length of key.
171167064Sobrien          (Key_List::output_lookup_array): Specify explicit length of key.
171267064Sobrien          (output_switch_case): Likewise.
171367064Sobrien          (Key_List::dump): Likewise.
171467064Sobrien        * src/gen-perf.h (Gen_Perf::compute_disjoint_union): Add two length
171567064Sobrien          arguments.
171667064Sobrien        * src/gen-perf.cc (Gen_Perf::compute_disjoint_union): Likewise. Don't
171767064Sobrien          stop when encountering NUL characters. Don't NUL terminate the
171867064Sobrien          result.
171967064Sobrien          (Gen_Perf::hash): Use explicit length of char_set.
172067064Sobrien          (Gen_Perf::change): Specify explicit length of key.
172167064Sobrien        * doc/gperf.texi: Document it.
172267064Sobrien
172367064Sobrien        * doc/help2man: New file, help2man version 1.022.
172467064Sobrien        * Makefile.devel (all): Add doc/gperf.1.
172567064Sobrien          (doc/gperf.1): New target.
172667064Sobrien        * doc/gperf.1: Automatically generated.
172767064Sobrien
172867064Sobrien        * mkinstalldirs: New file, from automake-1.4, grep-2.4.1, guile-1.4,
172967064Sobrien          libtool-1.3.3, make-3.79.1, tar-1.13.
173067064Sobrien        * src/Makefile.in (MKINSTALLDIRS): New variable.
173167064Sobrien          (install, installdirs): Use it instead of mkdir.
173267064Sobrien        * doc/Makefile.in (MKINSTALLDIRS): New variable.
173367064Sobrien          (install, installdirs): Use it instead of mkdir.
173467064Sobrien
173567064Sobrien        * INSTALL: Update.
173667064Sobrien
173767064Sobrien2000-08-19  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
173867064Sobrien
173967064Sobrien        * src/key-list.cc (Output_Compare_Memcmp): New class.
174067064Sobrien          (Key_List::output_lookup_function): When option -l is given, use
174167064Sobrien          memcmp instead of strcmp or strncmp.
174267064Sobrien
174367064Sobrien        * doc/gperf.texi: The bug report address is <bug-gnu-utils@gnu.org>.
174467064Sobrien          The download address is ftp.gnu.org. Remove mention of -a and -g
174567064Sobrien          options (now nops). Explain effect of -c option.
174667064Sobrien
174767064Sobrien        * doc/configure.in (PACKAGE): New variable.
174867064Sobrien        * doc/Makefile.in (datadir, docdir): New variables.
174967064Sobrien          (dvidir, htmldir): Change values.
175067064Sobrien          (install, installdirs): Update.
175167064Sobrien
175267064Sobrien        * src/configure.in: Rename cache variable gp_cxx_throw_decl to
175367064Sobrien          gp_cv_cxx_throw_decl.
175467064Sobrien
175567064Sobrien        * src/key-list.cc (Key_List::output_hash_function): When outputting
175667064Sobrien          __inline, take advantage of C++ compilers which have inline.
175767064Sobrien
175867064Sobrien        * src/key-list.cc (Output_Compare_Strncmp::output_comparison):
175967064Sobrien          After the call to strncmp, verify that expr2 is not longer than
176067064Sobrien          `len'.
176167064Sobrien          Reported by Carlo Wood <carlo@runaway.xs4all.nl>.
176267064Sobrien
176367064Sobrien        * src/key-list.cc (Key_List::output_lookup_function_body): Avoid
176467064Sobrien          emitting the loop for dealing with duplicates if
176567064Sobrien          total_duplicates == 0.
176667064Sobrien
176767064Sobrien        * src/key-list.cc (Key_List::read_keys): Don't accept an empty key.
176867064Sobrien
176967064Sobrien        * src/Makefile.in (install, installdirs, uninstall): Respect
177067064Sobrien          $(DESTDIR).
177167064Sobrien        * doc/Makefile.in (install, installdirs, uninstall): Likewise.
177267064Sobrien
177367064Sobrien        * src/options.cc (Options::print_options): Escape the arguments which
177467064Sobrien          contain special characters.
177567064Sobrien
177667064Sobrien        * tests/c-parse.gperf: Updated from gcc-2.95.2/gcc/c-parse.gperf.
177767064Sobrien        * tests/objc.gperf: New file, from gcc-2.95.2/gcc/objc/objc.gperf.
177867064Sobrien        * tests/chill.gperf: New file, from gcc-2.95.2/gcc/ch/gperf.
177967064Sobrien        * tests/cplusplus.gperf: New file, from gcc-2.95.2/gcc/cp/gxx.gperf.
178067064Sobrien        * tests/gplus.gperf: Remove file.
178167064Sobrien        * tests/java.gperf: New file, from gcc-2.95.2/gcc/java/keyword.gperf.
178267064Sobrien        * tests/Makefile: Check them all.
178367064Sobrien        * tests/c-parse.exp: Renamed from tests/test-1.exp.
178467064Sobrien        * tests/modula2.exp: Renamed from tests/test-2.exp.
178567064Sobrien        * tests/cplusplus.exp: Renamed from tests/test-3.exp.
178667064Sobrien        * tests/gpc.exp: Renamed from tests/test-5.exp.
178767064Sobrien
178867064Sobrien        * src/key-list.cc (output_switch_case): Add trailing semicolon to
178967064Sobrien          lengthptr assignment line. Fixes bug with -D and -S.
179067064Sobrien          From Reini Urban <rurban@sbox.tu-graz.ac.at>. Also reported by
179167064Sobrien          David Hunter.
179267064Sobrien        * tests/Makefile.in (check-lang-syntax): Perform each test with -D
179367064Sobrien          once without and once with duplicates.
179467064Sobrien
179567064Sobrien        * src/key-list.cc (output_keyword_entry): Avoid outputting a struct
179667064Sobrien          initializer of the form {"key",}.
179767064Sobrien
179867064Sobrien        * src/iterator.cc: Don't include <stream.h>.
179967064Sobrien          From Michael Deutschmann <ldeutsch@mail.netshop.net>.
180067064Sobrien
180167064Sobrien        * tests/Makefile.in (VALIDATE, check-lang-syntax): Use $(srcdir) where
180267064Sobrien          appropriate.
180367064Sobrien          Reported by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
180467064Sobrien
180567064Sobrien        * tests/validate: Don't run -traditional tests by default.
180667064Sobrien
180767064Sobrien        * src/main.cc (main): Check for write error on stdout before returning.
180867064Sobrien
180967064Sobrien        * src/Makefile.in (LDFLAGS): New definition, to catch the value given
181067064Sobrien          at configure time.
181167064Sobrien
181267064Sobrien        Make the structure initializers customizable. Based on a patch by
181367064Sobrien        Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
181467064Sobrien        * src/options.h (Options::get_initializer_suffix,
181567064Sobrien          Options::initializer_suffix): New declarations.
181667064Sobrien        * src/options.icc (Options::get_initializer_suffix): New function.
181767064Sobrien        * src/options.cc (DEFAULT_INITIALIZER_SUFFIX): New constant.
181867064Sobrien          (Options::initializer_suffix): New variable.
181967064Sobrien          (Options::short_usage): Document option "-F".
182067064Sobrien          (Options::long_usage): Document option "-F".
182167064Sobrien          (Options constructor): Initialize initializer_suffix.
182267064Sobrien          (Options destructor): Dump initializer_suffix.
182367064Sobrien          (long_options): Add option "-F".
182467064Sobrien          (Options::operator()): Accept option "-F". Sets initializer_suffix.
182567064Sobrien        * src/key-list.cc (output_keyword_blank_entries): Output
182667064Sobrien          initializer_suffix.
182767064Sobrien        * doc/gperf.texi: Document option "-F".
182867064Sobrien
182967064Sobrien        * COPYING: Replace with GPL version 2 (with new FSF address and Y2K
183067064Sobrien          safe year format).
183167064Sobrien
183267064Sobrien        * doc/gpl.texinfo: New file.
183367064Sobrien        * doc/gperf.texi: Document it.
183467064Sobrien        * doc/Makefile.in (gperf.info, gperf.dvi, gperf.html, gperf_toc.html):
183567064Sobrien          Update dependencies.
183667064Sobrien
183767064Sobrien        * doc/Makefile.in (MAKEINFO): Unset LANG while running makeinfo.
183867064Sobrien
183967064Sobrien1998-05-20  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
184067064Sobrien
184167064Sobrien        * doc/Makefile.in (gperf.dvi, clean): Remove gperf.cps.
184267064Sobrien          (install, installdirs, uninstall): Don't install gperf.dvi. The
184367064Sobrien          info and HTML documentations are sufficient for on-line use, and
184467064Sobrien          users who wish to print the documentation (in PS or DVI format)
184567064Sobrien          can do this directly off the source distribution.
184667064Sobrien          (DVIPS): Use "-D600" instead of "-Pljfour", for portability.
184767064Sobrien
184867064Sobrien1998-05-20  Akim Demaille  <demaille@inf.enst.fr>
184967064Sobrien
185067064Sobrien        * doc/gperf.texi: Many modifications:
185167064Sobrien          (Output Format): Declare `hash' and `in_word_set' as functions.
185267064Sobrien          (Concept Index): New section.
185367064Sobrien          (Title page): Use standard presentation.
185467064Sobrien          (Top): Use @top instead of @unnumbered so that automatic master
185567064Sobrien          update works.
185667064Sobrien          (Motivation): Avoid spaces in @var.
185767064Sobrien          (Options): Use the standard name ``Invoking ...''.
185867064Sobrien          (Options): Declare also the long form of the options.
185967064Sobrien          (Options): Remove redundant @itemize when @table is used.
186067064Sobrien
186167064Sobrien1998-05-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
186267064Sobrien
186367064Sobrien        * aclocal.m4 (CL_PROG_INSTALL): Set cl_cv_path_install, not
186467064Sobrien          ac_cv_path_install.
186567064Sobrien
186667064SobrienSat May  2 13:20:54 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
186767064Sobrien
186867064Sobrien        * gperf-2.7 released.
186967064Sobrien
187058551SkrisSat May  2 12:31:51 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
187118214Speter
187258551Skris        * src/version.cc (version_string): Remove the "(C++ version)" suffix.
187358551Skris          It's redundant: the early C versions of gperf are called cperf.
187458551Skris          Reported by Karl Berry.
187558551Skris        * src/option.cc (Options::operator()): Trim the output of "gperf -v".
187658551Skris
187758551SkrisThu Apr 16 13:22:16 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
187858551Skris
187958551Skris        * lib/Makefile.in, src/Makefile.in: Don't use $(TARGET_ARCH).
188058551Skris          Solaris "make" sets it to a value not understood by "cc".
188158551Skris
188258551SkrisWed Apr 15 23:52:14 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
188358551Skris
188458551Skris        * lib/Makefile.in, src/Makefile.in: Don't use implicit rules. Don't
188558551Skris          use $<. AIX "make" and OSF/1 "make" have problems with both.
188658551Skris        * src/gen-perf.cc, src/key-list.cc: Cast free() argument to char*,
188758551Skris          otherwise it doesn't compile on SunOS 4.
188858551Skris        * src/key-list.h: Declare structs outside of other declarations,
188958551Skris          needed for OSF/1 cxx 5.5.
189058551Skris        * lib/getopt.h: Use prototypes if __STDC__ || __cplusplus.
189158551Skris          Don't give a prototype for getopt(), to avoid error on SunOS 4.
189258551Skris        * lib/getopt.c: Declare strncmp, to avoid warnings.
189358551Skris
189458551SkrisTue Apr 14 23:24:07 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
189558551Skris
189658551Skris        * lib/GetOpt.{h,cc}: Remove files.
189758551Skris        * lib/getopt.{h,c}, lib/getopt1.c: New files, from GNU libc.
189858551Skris        * lib/configure.in (AC_INIT): Search for hash.cc, not GetOpt.cc.
189958551Skris        * lib/Makefile.in (OBJECTS): Remove GetOpt.o, add getopt.o, getopt1.o.
190058551Skris          (getopt.o, getopt1.o, hash.o): Use explicit building rules. Some
190158551Skris          "make"s don't support to have both implicit rules for "%.o : %.c"
190258551Skris          and "%.o : %.cc" in the same Makefile.
190358551Skris        * lib/hash.{h,cc}: Remove #pragma; there are no templates here.
190458551Skris        * src/option.h (Options::usage): Remove.
190558551Skris          (Options::short_usage, Options::long_usage): Declare.
190658551Skris        * src/option.cc (Options::usage): Remove.
190758551Skris          (Options::short_usage, Options::long_usage): New functions.
190858551Skris          (long_options): New array.
190958551Skris          (Options::operator()): Use getopt_long instead of GetOpt::operator(),
191058551Skris          change all references to GetOpt members.
191158551Skris
191258551Skris        * src/std-err.{h,cc}: Remove files.
191358551Skris        * src/gen-perf.cc, src/key-list.cc, list-node.cc, new.cc, options.cc:
191458551Skris          Call fprintf(stderr) instead of Std_Err::report_error().
191558551Skris        * src/key-list.h, src/list-node.h, src/options.h: Don't use class
191658551Skris          Std_Err any more.
191758551Skris        * src/option.cc (program_name): New variable.
191858551Skris        * src/Makefile.in: Remove STD_ERR_H.
191958551Skris          (OBJECTS): Remove std-err.o.
192058551Skris
192158551SkrisMon Mar 23 01:03:35 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
192258551Skris
192358551Skris        * aclocal.m4, {lib,src,tests}/configure.in: Remove CL_CC_WORKS and
192458551Skris          CL_CXX_WORKS, already contained in autoconf 2.12.
192558551Skris
192658551Skris        * src/gen-perf.cc, src/key-list.cc: Move some code from
192758551Skris          Gen_Perf::Gen_Perf() to Key_List::output().
192858551Skris        * src/Makefile.in: Update dependencies.
192958551Skris
193058551Skris        * src/options.{h,cc}: Remove option "-p".
193158551Skris        * src/key-list.cc (Key_List::set_output_types): Rewrite.
193258551Skris          (default_array_type, default_return_type): Remove.
193358551Skris        * src/key-list.cc: Adjust "const" handling.
193458551Skris          + With option "-t" [TYPE], don't emit wrong code if there is no
193558551Skris            space before the struct's opening brace.
193658551Skris
193758551SkrisSun Mar 22 16:59:15 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
193858551Skris
193958551Skris        * src/key-list.{h,cc}: Completely reorganized the output routines.
194058551Skris          Rewrote from scratch the output_switch() function. Use classes
194158551Skris          (Output_Constants, Output_Expr, Output_Compare) for abstraction.
194258551Skris          In particular:
194358551Skris          + Don't emit trailing whitespace and spurious blank lines.
194458551Skris          + Adjust indentation of the arrays.
194558551Skris          + Don't emit commas at the end of array initializers and
194658551Skris            struct initializers.
194758551Skris          + With option "-l" [LENTABLE], compare the length before
194858551Skris            fetching the word from memory.
194958551Skris          + With option "-S" [SWITCH], emit the comparison code just once,
195058551Skris            not once in every switch statement.
195158551Skris          + With option "-S" [SWITCH], choose the right switch statement
195258551Skris            through a binary search, not a linear search.
195358551Skris          + With option "-S" [SWITCH], emit straightforward comparisons
195458551Skris            instead of switch statements with just one "case" label.
195558551Skris          + With options "-S -p -t" [SWITCH, POINTER, TYPE], don't emit
195658551Skris            spurious empty elements at the beginning of the wordlist array.
195758551Skris          + With option "-D" [DUP] and not option "-S" [SWITCH], if there
195858551Skris            is no more room for duplicate entries in the lookup array,
195958551Skris            don't call `assert (i != 0)'. Instead, make the array larger :-)
196058551Skris          + With option "-D" [DUP], if there are no duplicates, don't
196158551Skris            automatically fall back to the non-"-D" algorithm. If the user
196258551Skris            wants the non-"-D" algorithm, he can just not specify "-D".
196358551Skris          + With option "-D" [DUP] and either options "-p -t" [POINTER, TYPE]
196458551Skris            or not option "-S" [SWITCH], don't emit spurious empty elements
196558551Skris            at the beginning of the wordlist array.
196658551Skris          + With option "-D" [DUP], simplify the detection and processing
196758551Skris            of duplicate entries in the lookup array.
196858551Skris          + With options "-D -l" [DUP, LENTABLE] and not option "-S" [SWITCH],
196958551Skris            don't forget to emit the lengthtable array.
197058551Skris          + With options "-D -l -S" [DUP, LENTABLE, SWITCH], don't forget to
197158551Skris            compare the lengths before comparing the strings.
197258551Skris
197358551Skris        * src/gen-perf.cc: No need to include <assert.h>.
197458551Skris        * src/options.cc: Likewise.
197558551Skris
197658551Skris        * src/options.cc: Don't use `errno' after freopen failed.
197758551Skris        * src/std-err.cc: `report_error' doesn't call strerror(errno) any
197858551Skris          more. No need to include <string.h> and <errno.h>.
197958551Skris
198058551Skris        * tests/Makefile.in (check-*): Any difference between .exp and .out
198158551Skris          is a failure. Don't ignore whitespace differences.
198258551Skris
198358551Skris        * tests/Makefile.in (check-lang-syntax): Add some more checks.
198458551Skris
198558551SkrisFri Mar 20 00:54:54 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
198658551Skris
198758551Skris        * tests/jscript.gperf: Renamed from tests/javascript.gperf, because
198858551Skris          of Minix and SVR2 14-character filename limit.
198958551Skris        * src/key-list.cc (output_string): New function.
199058551Skris          (Key_List::output_switch, Key_List::output_keyword_table): Call it.
199158551Skris
199258551Skris        * src/options.{h,icc,cc} (get_wordlist_name): New function. Add
199358551Skris          option -W.
199458551Skris        * src/key-list.cc (Key_List::output_switch,
199558551Skris          Key_List::output_keyword_table, Key_List::output_lookup_function):
199658551Skris          Use it.
199758551Skris        Patch from William Bader <wbader@CSEE.Lehigh.Edu>.
199858551Skris
199958551Skris        * src/version.cc: Bump version number directly from 2.5 to 2.7,
200058551Skris          because Schmidt's last release from 1991 carries version number 2.6.
200158551Skris
200258551SkrisTue Jul 30 00:02:39 1991  Douglas C. Schmidt  (schmidt at net4.ics.uci.edu)
200358551Skris
200458551Skris        * Fixed a small bug in the Key_List::output_keyword_table routine
200558551Skris          that caused an extra newline to be printed if there where no
200658551Skris          leading blank entries... (who cares, right?!)
200758551Skris
200858551SkrisMon Jul 29 22:05:40 1991  Douglas C. Schmidt  (schmidt at net4.ics.uci.edu)
200958551Skris
201058551Skris        * Modified the handling of the -E (emit enums rather than
201158551Skris          #defines) option in conjunction with the -G option.  Now, if -G
201258551Skris          and -E are given the enums are generated outside the lookup
201358551Skris          function, rather than within it!
201458551Skris
201558551SkrisMon Apr  8 18:17:04 1991  Doug Schmidt  (schmidt at net4.ics.uci.edu)
201658551Skris
201758551Skris        * Yucko, there was a bug in the handling of -c (and of course the
201858551Skris          new -I command in key-list.cc).  Apparently when I added the
201958551Skris          super-duper hack that provided support for duplicate keys I
202058551Skris          forgot to update the strcmp output...
202158551Skris
202258551SkrisMon Mar  9 02:19:04 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
202358551Skris
202458551Skris        * Moved the documentation to doc/, put the stuff borrowed from
202558551Skris          libg++ into lib/.
202658551Skris        * Rewrote all Makefile.in's for better compliance with GNU standards.
202758551Skris        * Autoconf based configuration. Rewrote all configure.in's. Added
202858551Skris          aclocal.m4, with macros from CLISP and CLN. Added Makefile.devel.
202958551Skris        * src/depend: Removed. Dependencies are now in src/Makefile.in.
203058551Skris
203158551Skris        * src/bool-array.icc: New file, contains inline functions, from both
203258551Skris          src/bool-array.h and src/bool-array.cc.
203358551Skris        * src/options.icc: New file, contains inline functions, from both
203458551Skris          src/options.h and src/options.cc.
203558551Skris        * src/read-line.icc: New file, contains inline functions, from both
203658551Skris          src/read-line.h and src/read-line.cc.
203758551Skris
203858551Skris        * src/bool-array.h: Don't include <std.h>.
203958551Skris        * src/bool-array.cc: Include <string.h>.
204058551Skris        * src/gen-perf.cc: No need to include <ctype.h>. Don't include
204158551Skris          <_G_config.h>.
204258551Skris        * src/hash-table.cc: Don't include <std.h> and <builtin.h>. Include
204358551Skris          <string.h> and lib/hash.h instead.
204458551Skris        * src/iterator.cc: Don't include <std.h>.
204558551Skris        * src/key-list.cc: Don't include <builtin.h>. Include <string.h> and
204658551Skris          <stdlib.h> instead.
204758551Skris        * src/list-node.cc: Don't include <std.h>. Include <stdlib.h> instead.
204858551Skris          Remove `index' hack.
204958551Skris        * src/main.cc: Don't include <_G_config.h>.
205058551Skris        * src/new.cc: Don't include <std.h>. Include <stdlib.h> instead.
205158551Skris        * src/options.cc: Don't include <builtin.h>. Include <string.h> and
205258551Skris          <stdlib.h> instead.
205358551Skris        * src/read-line.cc: Don't include <builtin.h>. Include <stdlib.h>
205458551Skris          instead.
205558551Skris        * src/std-err.cc: Don't include <std.h>. Include <string.h> (for Irix).
205658551Skris        * src/vectors.h: No need to include <stdio.h>.
205758551Skris        * src/version.cc: No need to include <stdio.h>.
205858551Skris
205958551Skris        * src/bool-array.h: Change `STORAGE_TYPE' from int to unsigned int.
206058551Skris        * src/bool-array.{h,cc}: Change type of `Bool_Array::size' from int
206158551Skris          to unsigned int.
206258551Skris        * src/bool-array.{h,cc}: Change type of `Bool_Array::init' argument
206358551Skris          from STORAGE_TYPE to unsigned int.
206458551Skris        * src/gen-perf.{h,cc}: Change two `Gen_Perf::compute_disjoint_union'
206558551Skris          argument types from `char *' to `const char *'.
206658551Skris        * src/iterator.h: Change type of `Iterator::str' and argument of
206758551Skris          `Iterator::Iterator' from `char *' to `const char *'.
206858551Skris        * src/iterator.cc: Cast to `unsigned char' before calling `isdigit'.
206958551Skris        * src/key-list.{h,cc}: Change type of `Key_List::array_type',
207058551Skris          `Key_List::return_type', `Key_List::struct_tag',
207158551Skris          `Key_List::include_src', `default_array_type', `default_return_type'
207258551Skris          and return type of `Key_List::get_array_type',
207358551Skris          `Key_List::get_special_input', `Key_List::save_include_src' from
207458551Skris          `char *' to `const char *'.
207558551Skris        * src/key-list.cc: Change "pretty gross" assignment.
207658551Skris        * src/key-list.cc: Don't use `alloca', HP-UX CC lacks it.
207758551Skris        * lib/GetOpt.cc: Likewise.
207858551Skris        * src/key-list.cc (merge): Use iteration instead of recursion.
207958551Skris        * src/list-node.{h,cc}: Change type of `List_Node::key',
208058551Skris          `List_Node::rest', `List_Node::char_set' from `char *' to
208158551Skris          `const char *'.
208258551Skris        * src/new.cc: Don't use BUFSIZ. Conditionalize the throw() declaration.
208358551Skris        * src/read-line.h: Don't use BUFSIZ.
208458551Skris        * src/read-line.cc: Make CHUNK_SIZE a constant, and use allocate the
208558551Skris          buffers on the stack by default. Use memcpy for copying buffers.
208658551Skris          Include <string.h>.
208758551Skris        * src/read-line.icc (get_line): Use iteration instead of tail recursion.
208858551Skris          Don't call ungetc(EOF,stdin).
208958551Skris        * src/std-err.{h,cc}: Change type of `Std_Err::program_name' and of
209058551Skris          argument `Std_Err::report_error' from `char *' to `const char *'.
209158551Skris        * src/std-err.cc: `report_error' doesn't call `exit' any more. All
209258551Skris          callers changed to do that themselves.
209358551Skris        * src/trace.h: Make constructor/destructor calls non-inline.
209458551Skris
209558551Skris        * src/key-list.cc (output_hash_function): If option[CPLUSPLUS],
209658551Skris          always make the hash function inline.
209758551Skris          (output): Declare the hash function inline, with the right name.
209858551Skris        * src/options.{h,cc}, src/gen-perf.cc, src/key-list.cc: Remove
209958551Skris          options -g, making it on by default. Remove option -a. Instead,
210058551Skris          introduce "-L KR-C", "-L C", "-L ANSI-C", "-L C++".
210158551Skris        * src/options.{h,cc}, src/key-list.cc: Add option -I.
210258551Skris        * src/key-list.cc: Don't emit "const" if compiling in mode "-L KR-C".
210358551Skris        * src/key-list.cc: Don't emit a comma at the end of an enum list.
210458551Skris        * src/main.cc: Remove COUNT_TIME code.
210558551Skris        * src/vectors.h, src/key-list.cc, src/options.cc, src/list-node.cc:
210658551Skris          ALPHA_SIZE defaults to 256 now. Add option -7.
210758551Skris
210858551Skris        * tests/javascript.gperf: New file.
210958551Skris        * tests/jstest*.gperf, tests/validate: New tests.
211058551Skris
211158551SkrisSat Jan 31 01:38:11 1998  Alexandre Oliva <oliva@dcc.unicamp.br>
211258551Skris
211358551Skris	* src/Makefile.in ($(TARGETPROG)): Add $(CFLAGS).
211458551Skris
211558551SkrisWed Jan 28 01:56:00 1998  Manfred Hollstein  <manfred@s-direktnet.de>
211658551Skris
211758551Skris	* configure.in (package_makefile_rules_frag): New and
211858551Skris	redirect stderr from ${srcdir}/config.shared to
211958551Skris	${package_makefile_rules_frag}.
212058551Skris	* src/configure.in: Ditto.
212158551Skris	* tests/configure.in: Ditto.
212258551Skris
212358551SkrisFri Jan 23 08:00:41 1998  H.J. Lu  (hjl@gnu.org)
212458551Skris
212558551Skris	* gperf.texi (@ichapter): Changed to @chapter.
212658551Skris
212758551SkrisWed Jan 14 09:16:48 1998  H.J. Lu  (hjl@gnu.org)
212858551Skris
212958551Skris	* src/key-list.cc, src/key-list.h (Key_List::strcspn): Don't
213058551Skris	define if strcspn is defined.
213158551Skris
213258551SkrisFri Jan 24 13:23:47 1997  Mike Stump  <mrs@cygnus.com>
213358551Skris
213458551Skris	* src/new.cc (operator delete): Add the exception specification.
213558551Skris
213658551SkrisMon Feb  5 19:29:16 1996  Per Bothner  <bothner@kalessin.cygnus.com>
213758551Skris
213858551Skris	* src/read-line.cc (Read_Line::readln_aux):  Handle EOF if last	line
213958551Skris	has a length which is an exact multiple of CHUNK_SIZE.  (Used to throw
214058551Skris	away the line's contents.)  From Bruno Haible <haible@ilog.ilog.fr>.
214158551Skris	* src/Makefile.in ($(TARGETPROG)):  Add -lm to link line.
214258551Skris
214358551SkrisTue Jun 11 13:43:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
214458551Skris
214558551Skris	* src/list-node.cc (List_Node): Reorder init of nodes to
214658551Skris	match declaration order.
214758551Skris	* src/hash-table.cc (Hash_Table): Likewise.
214858551Skris
214958551SkrisTue Oct 10 16:37:28 1995  Mike Stump  <mrs@cygnus.com>
215058551Skris
215158551Skris	* src/new.cc: Since malloc/delete are not paired, we cannot call
215258551Skris	free.
215358551Skris
215458551SkrisWed Jan  4 12:40:14 1995  Per Bothner  <bothner@kalessin.cygnus.com>
215558551Skris
215658551Skris	* src/Makefile.in ($(TARGETPROG)):  Link with $(LDFLAGS).
215758551Skris	Patch from John Interrante <interran@uluru.stanford.edu>.
215858551Skris
215958551SkrisSat Nov  5 19:12:48 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
216058551Skris
216158551Skris	* src/Makefile.in (LIBS): Remove.
216258551Skris
216358551SkrisTue Oct 18 17:51:14 1994  Per Bothner  <bothner@kalessin.cygnus.com>
216458551Skris
216558551Skris	* src/std-err.cc:  Use stderror, instead of the non-standard
216658551Skris	sys_nerr and sys_errlist.
216758551Skris
216858551SkrisSat Sep 17 22:02:13 1994  Per Bothner  (bothner@kalessin.cygnus.com)
216958551Skris
217058551Skris	* src/key-list.cc (output_hash_function):
217158551Skris	Patch from William Bader <wbader@CSEE.Lehigh.Edu>.
217258551Skris
217358551SkrisFri Jul 15 09:38:11 1994  Per Bothner  (bothner@cygnus.com)
217458551Skris
217558551Skris	* src/std-err.cc:  #include <errno.h>, and only declare
217658551Skris	extern int errno if errno is not a macro.
217758551Skris
217858551SkrisMon May 30 17:29:34 1994  Per Bothner  (bothner@kalessin.cygnus.com)
217958551Skris
218058551Skris	* Makefile.in (src_all, install):  Make sure to add '/' after
218158551Skris	`pwd` in $rootme, as expected by FLAGS_TO_PASS.
218258551Skris
218358551SkrisWed May 11 00:47:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
218458551Skris
218558551Skris	Make libg++ build with gcc -ansi -pedantic-errors
218658551Skris	* src/options.h: Lose commas at end of enumerator lists.
218758551Skris
218858551SkrisSun Dec  5 19:16:40 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
218958551Skris
219058551Skris	* src/hash-table.cc (Hash_Table::~Hash_Table): Don't pass an
219158551Skris	argument to fprintf, since it's not expecting one.
219258551Skris
219358551SkrisFri Nov 26 19:03:18 1993  Per Bothner  (bothner@kalessin.cygnus.com)
219458551Skris
219558551Skris	* src/list-node.cc:  #undef index, for the sake of broken NeXT,
219658551Skris
219758551SkrisThu Nov  4 11:16:03 1993  Per Bothner  (bothner@kalessin.cygnus.com)
219858551Skris
219958551Skris	* Makefile.in (install):  Use INSTALL_DATA for gperf.1.
220058551Skris
220158551SkrisMon Oct 25 18:40:51 1993  Per Bothner  (bothner@kalessin.cygnus.com)
220258551Skris
220358551Skris	* src/key-list.cc (Key_List::read_keys):  Use POW macro
220458551Skris	to increase hash table size to power of 2.
220558551Skris
220658551Skris	* options.h (LARGE_STACK_ARRAYS):  New flag.  Defaults to zero.
220758551Skris	* gen-perf.cc, key-list.cc, read-line.cc:	
220858551Skris	Only stack-allocate large arrays if LARGE_STACK_ARRAYS is set.
220958551Skris	* main.cc (main):  Only call setrlimit (RLIMIT_STACK, ...)
221058551Skris	if LARGE_STACK_ARRAYS.
221158551Skris
221258551SkrisMon Oct  4 17:45:08 1993  Per Bothner  (bothner@kalessin.cygnus.com)
221358551Skris
221458551Skris	* src/gen-perf.cc:  Always use ANSI rand/srand instead of BSDisms.
221558551Skris
221658551SkrisWed Aug 18 12:19:53 1993  Per Bothner  (bothner@kalessin.cygnus.com)
221758551Skris
221858551Skris	* Makefile.in (src_all):  Make less verbose output.
221958551Skris
222058551SkrisFri May 28 14:01:18 1993  Per Bothner  (bothner@rtl.cygnus.com)
222158551Skris
222258551Skris	* src/gen-perf.cc (Gen_Perf::change):  Don't use gcc-specific
222358551Skris	2-operand conditional expression.
222458551Skris	* src/key-list.cc (Key_List::output_lookup_array):
222558551Skris	Don't use variable-size stack arrays, unless compiled by g++.
222658551Skris
222758551SkrisTue May  4 14:08:44 1993  Per Bothner  (bothner@cygnus.com)
222858551Skris
222958551Skris	Changes (mostly from Peter Schauer) to permit compilation
223058551Skris	using cfront 3.0 and otherwise be ARM-conforming.
223158551Skris	* src/key-list.h:  class Key_List must use public derivation
223258551Skris	of base class Std_Err (because Gen_Perf::operator() in gen-perf.cc
223358551Skris	calls Std_Err::report_error).
223458551Skris	* src/gen-perf.cc (Gen_Perf::affects_prev), src/hash-table.cc
223558551Skris	(Hash_Table::operator()):  Don't use gcc-specific 2-operand
223658551Skris	conditional expression.
223758551Skris	* src/iterator.cc (Iterator::operator()):  Don't use gcc-specific
223858551Skris	range construct in case label.
223958551Skris	* key-list.cc (Key_List::output_lookup_array, Key_List::read_keys),
224058551Skris	src/gen-perf.cc (Gen_Perf::operator(), src/read-line.cc
224158551Skris	(Read_Line::readln_aux):  If not gcc, don't allocate
224258551Skris	variable-sized arrays on stack.
224358551Skris	* src/new.cc (operator new):  Argument type should be size_t.
224458551Skris	* key-list.cc (Key_List::output_lookup_array, Key_List::read_keys),
224558551Skris	new/cc (::operator new): Don't use non-standard >?= operator.
224658551Skris
224758551SkrisTue Apr 27 20:11:30 1993  Per Bothner  (bothner@cygnus.com)
224858551Skris
224958551Skris	* src/Makefile.in:  Define TARGETPROG, and use it.
225058551Skris
225158551SkrisMon Apr 19 00:29:18 1993  Per Bothner  (bothner@cygnus.com)
225258551Skris
225358551Skris	* Makefile.in, configure.in:  Re-vamped configure scheme.
225458551Skris	* gperf.texinfo:  Renamed to gperf.texi.
225558551Skris	* src/bool-array.{h,cc}:  ANSIfy bzero->memset.
225658551Skris
225758551SkrisSat Jan 30 20:21:28 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
225858551Skris
225958551Skris	* tests/Makefile.in (mostlyclean): Also delete aout, cout, m3out,
226058551Skris	pout, and preout.
226158551Skris
226258551SkrisTue Dec 29 08:58:17 1992  Ian Lance Taylor  (ian@cygnus.com)
226358551Skris
226458551Skris	* Makefile.in: pass $(FLAGS_TO_PASS) to all calls to make.
226558551Skris	(FLAGS_TO_PASS): added INSTALL, INSTALL_DATA, INSTALL_PROGRAM.
226658551Skris
226758551SkrisMon Dec 21 18:46:46 1992  Per Bothner  (bothner@rtl.cygnus.com)
226858551Skris
226958551Skris	* tests/expected.* renamed to *.exp to fit in 14 chars.
227058551Skris	* tests/Makefile.in:  Update accordingly.
227158551Skris	Also rename output.* to *.out.
227258551Skris	* src/Makefile.in (clean):  Remove gperf program.
227358551Skris
227458551SkrisWed Dec  9 14:33:34 1992  Per Bothner  (bothner@cygnus.com)
227558551Skris
227658551Skris	* src/hash-table.cc, src/bool-array.h: ANSIfy bzero->memset.
227758551Skris
227858551SkrisThu Dec  3 19:34:12 1992  Per Bothner  (bothner@cygnus.com)
227958551Skris
228058551Skris	* Makefile.in (distclean, realclean): Don't delete
228158551Skris	Makefile before recursing.
228258551Skris
228358551SkrisFri Nov  6 13:41:49 1992  Per Bothner  (bothner@rtl.cygnus.com)
228458551Skris
228558551Skris	* key-list.{h,cc}:  Remove MAX_INT (and similar) constant
228658551Skris	fields from Key_List class, and use INT_MAX (etc) from limits.h.
228758551Skris	* key-list.{h,cc}, options.{h,cc}, vectors.h:  Removed all
228858551Skris	uses of initialized const fields, as they are non-standard
228958551Skris	- and their use was easy to do away with.  Mostly, just
229058551Skris	made the constants static non-fields in the .cc file.
229158551Skris
229258551SkrisMon Nov  2 13:10:11 1992  Per Bothner  (bothner@cygnus.com)
229358551Skris
229458551Skris	* tests/Makefile.in:  When generating cinset.c, don't pass -C,
229558551Skris	since -C assumes an ANSI compiler.  Add the -C flag (with -a)
229658551Skris	when generating test.out.3 instead.
229758551Skris	* tests/expected.out.3:  Update accordingly.
229858551Skris
229958551SkrisWed Aug 12 11:47:54 1992  Per Bothner  (bothner@cygnus.com)
230058551Skris
230158551Skris	* Makefile.in:  Factor out common flags into $(FLAGS_TO_PASS).
230258551Skris	* Makefile.in:  'install-info' depends on gperf.info.
230358551Skris
230458551SkrisMon Aug 10 11:39:52 1992  Ian Lance Taylor  (ian@dumbest.cygnus.com)
230558551Skris
230658551Skris	* Makefile.in, src/Makefile.in: always create installation
230758551Skris	directories.
230858551Skris
230958551SkrisMon Jul 20 15:33:21 1992  Mike Stump  (mrs@cygnus.com)
231058551Skris
231158551Skris	* src/new.cc (operator new):  Add cast from void * to char *,
231258551Skris	since it is not a standard conversion.
231358551Skris
231458551SkrisWed Jun 17 16:25:30 1992  Per Bothner  (bothner@rtl.cygnus.com)
231558551Skris
231658551Skris	* src/gen-perf.cc:  #include <_G_config.h> for _G_SYSV.
231758551Skris	* src/key-list.cc:  alloca() hair.
231858551Skris	* src/main.cc (main):  Only call getrlimit if _G_HAVE_SYS_RESOURCE.
231958551Skris	* Makefile,in, {src,test}/Makefile.in:  Fix *clean rules.
232058551Skris
232158551SkrisFri May 29 13:21:13 1992  Per Bothner  (bothner@rtl.cygnus.com)
232258551Skris
232358551Skris	* src/gen-perf.cc:  Replace USG -> _G_SYSV.
232458551Skris
232558551SkrisThu May 14 13:58:36 1992  Per Bothner  (bothner@rtl.cygnus.com)
232658551Skris
232758551Skris	* src/Makefile.in:  Don't pass obsolete flag -DUNLIMIT_STACK.
232858551Skris	* tests/Makefile.in (clean): Fix.
232958551Skris
233058551SkrisSat Mar  7 00:03:56 1992  K. Richard Pixley  (rich@rtl.cygnus.com)
233158551Skris
233258551Skris	* gperf.texinfo: added menu item hook.
233358551Skris
233458551SkrisWed Feb 26 18:04:40 1992  K. Richard Pixley  (rich@cygnus.com)
233558551Skris
233658551Skris	* Makefile.in, configure.in: removed traces of namesubdir,
233758551Skris	  -subdirs, $(subdir), $(unsubdir), some rcs triggers.  Forced
233858551Skris	  copyrights to '92, changed some from Cygnus to FSF.
233958551Skris
234058551SkrisSun Jan 26 19:21:58 1992  Per Bothner  (bothner at cygnus.com)
234158551Skris
234258551Skris	* tests/Makefile.in:  Use re-directed stdin instead of file
234358551Skris	name in argv.  This allows us to remove the filename
234458551Skris	from the output, the expected output, and hence the diffs.
234558551Skris	(Note that the input file is in $(srcdir), which we cannot
234658551Skris	place in the expected out files.)
234758551Skris	* tests/expected.out.[1235]:  Edit out input filename,
234858551Skris	to match new output.
234958551Skris
235058551SkrisThu Jun 28 16:17:27 1990  Doug Schmidt  (schmidt at brilliant)
235158551Skris
235258551Skris	* Wow, first fix on the new job!  There was a dumb error
235358551Skris	  in Key_List::output_lookup_function, where I printed the
235458551Skris	  string "&wordlist[key]" instead of the correct "&wordlist[index]".
235558551Skris	  
235658551Skris	* Added a couple of #ifdefs for USG support.
235758551Skris	  	
235858551SkrisSun Jun  3 17:16:36 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
235958551Skris
236058551Skris        * Updated the version number to 2.5 and sent to Doug Lea for release
236158551Skris          with the latest GNU libg++.
236258551Skris
236358551Skris        * Changed the error handling when a keyword file cannot be opened
236458551Skris          (now calls perror).
236558551Skris
236658551SkrisWed May 30 14:49:40 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
236758551Skris
236858551Skris        * Instrumented the source code with trace statements automagically
236958551Skris          inserted using my new automated trace instrumentation tool!
237058551Skris
237158551SkrisWed May  9 11:47:41 1990  Doug Schmidt  (schmidt at siam.ics.uci.edu)
237258551Skris
237358551Skris        * Really fixed the previous bug.  Turns out that a small amount
237458551Skris          of logic had to be duplicated to handle static links that occur
237558551Skris          as part of dynamic link chains.  What a pain!!!
237658551Skris
237758551SkrisTue May  8 23:11:44 1990  Doug Schmidt  (schmidt at siam.ics.uci.edu)
237858551Skris
237958551Skris        * Fixed a stupid bug in Key_List::output_lookup_array that was
238058551Skris          causing incorrect counts to be generated when there were both
238158551Skris          static and dynamic links occurring for the same hash value.
238258551Skris          Also simplified the code that performs the logic in this routine.
238358551Skris
238458551SkrisMon Apr 30 17:37:24 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
238558551Skris
238658551Skris        * Fixed stupid bug in Key_List::output_lookup_array that was
238758551Skris          making the generated lookup[] array contain `chars' even
238858551Skris          when the values stored in the chars are greater than 127!
238958551Skris
239058551Skris        * Changed the behavior of the -G (global table) option so that it
239158551Skris          will output the `length[]' array in the global scope along with
239258551Skris          the `word_list[]' array.
239358551Skris
239458551Skris        * Fixed a stupid bug in Key_List::output_lookup_function that
239558551Skris          would always output the complicated `duplicate-handling' lookup
239658551Skris          logic, even when there were no duplicates in the input!
239758551Skris
239858551Skris        * Yikes, had to modify a bunch of stuff in key-list.cc to correctly
239958551Skris          handle duplicate entries.  Changed the generated code so that
240058551Skris          the MIN_HASH_VALUE is no longer subtracted off when calculating
240158551Skris          the hash value for a keyword.  This required changing some other
240258551Skris          code by substituting MAX_HASH_VALUE for TOTAL_KEYS in several places.
240358551Skris          Finally, this means that the generated tables may contain leading 
240458551Skris          null entries, but I suppose it is better to trade-off space to get 
240558551Skris          faster performance...
240658551Skris
240758551SkrisMon Mar 26 13:08:43 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
240858551Skris
240958551Skris        * Updated version number to 2.4 to reflect the latest changes.
241058551Skris
241158551Skris        * Changed the main program so that it always prints out gperf's
241258551Skris          execution timings to the generated output file.
241358551Skris          
241458551SkrisSun Mar 25 12:39:30 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
241558551Skris
241658551Skris        * Added the -Z option so that users can specify the name of the
241758551Skris          generated class explicitly.  Updated documentation to reflect
241858551Skris          this change.
241958551Skris          
242058551Skris        * Modified the generated C++ class interface so that the functions
242158551Skris          are declared static (to remove the overhead of passing the `this'
242258551Skris          pointer).  This means that operator()() can no longer be used,
242358551Skris          since it only works on non-static member functions.
242458551Skris          Also changed things so that there is no constructor (why waste
242558551Skris          the extra call, when it doesn't do anything, eh?)
242658551Skris
242758551Skris        * Modified the behavior of Key_List::output when the -L C++ option
242858551Skris          is enabled.  Previously the code generated use const data members
242958551Skris          to record MIN_WORD_LENGTH, MIN_HASH_VALUE, etc.  However, as
243058551Skris          pointed out by James Clark this may result in suboptimal behavior
243158551Skris          on the part of C++ compilers that can't inline these values.
243258551Skris          Therefore, the new behavior is identical to what happens with
243358551Skris          -L C, i.e., either #defines or function-specific enums are used.
243458551Skris          Why sacrifice speed for some abstract notion of `code purity?' ;-)
243558551Skris
243658551SkrisTue Mar  6 18:17:42 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
243758551Skris
243858551Skris        * Added the -E option that defines constant values using an enum
243958551Skris          local to the lookup function rather than with #defines.  This
244058551Skris          also means that different lookup functions can reside in the
244158551Skris          same file.  Thanks to James Clark (jjc@ai.mit.edu). 
244258551Skris
244358551SkrisSat Mar  3 20:19:00 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
244458551Skris
244558551Skris        * Added a special case to key_list::output_switch that doesn't
244658551Skris          generate extra comparisons when the `-S' is given an argument
244758551Skris          of 1 (the normal case).  This should speed up the generated
244858551Skris          code output a tad...
244958551Skris
245058551SkrisFri Feb 23 14:21:28 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
245158551Skris
245258551Skris        * Renamed all instances of member function get_keysig_size
245358551Skris          to get_max_keysig_size, since this is more precise...
245458551Skris
245558551Skris        * Changed all occurrences of charset to keysig (stands for ``key
245658551Skris          signature'') to reflect the new naming convention used in the 
245758551Skris          USENIX paper.
245858551Skris
245958551SkrisThu Feb 22 11:28:36 1990  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
246058551Skris
246158551Skris        * Changed the name of the generated associated values table from
246258551Skris          asso_value to asso_values to reflect conventions in the USENIX
246358551Skris          C++ paper.
246458551Skris
246558551SkrisThu Feb 15 23:29:03 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
246658551Skris
246758551Skris        * Updated the gperf.texinfo file to fix some formatting problems
246858551Skris          that had crept in since last time.
246958551Skris
247058551SkrisWed Feb 14 23:27:24 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
247158551Skris
247258551Skris        * Fixed stupid bug in key-list.cc (get_special_input), wher
247358551Skris          gperf replaced each '%' with the succeeding character.
247458551Skris
247558551Skris        * Added support for multiple target language generation.  Currently
247658551Skris          handled languages are C and C++, with C as the default.  Updated
247758551Skris          documentation and option handler to reflect the changes.
247858551Skris
247958551Skris        * Added a global destructor to new.cc and removed the #ifdef, since
248058551Skris          the bloody thing now works with libg++.
248158551Skris
248258551SkrisMon Feb 14 13:00:00 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
248358551Skris
248458551Skris        * Found out that my gperf paper was accepted at the upcoming
248558551Skris          USENIX C++ Conference in San Francisco.  Yow!
248658551Skris
248758551SkrisTue Jan 30 09:00:29 1990  Doug Schmidt  (schmidt at zola.ics.uci.edu)
248858551Skris
248958551Skris        * #ifdef'd out the new.cc memory allocator, since there are
249058551Skris          problems with this and the libg++ stuff.
249158551Skris
249258551Skris        * Changed key-list.h so that class Vectors is a public (rather
249358551Skris          than private) base class for class Key_List.  The previous
249458551Skris          form was illegal C++, but wasn't being caught by the old
249558551Skris          g++ compiler.  Should work now... ;-)
249658551Skris
249758551SkrisSun Dec 10 14:08:23 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
249858551Skris
249958551Skris        * Added several changes from rfg@ics.uci.edu.  These changes
250058551Skris          help to automate the build process.
250158551Skris
250258551SkrisWed Nov 15 15:49:33 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
250358551Skris
250458551Skris        * Removed conditional compilation for GATHER_STATISTICS.  There's
250558551Skris          really no good reason to avoid collecting this info at run-time,
250658551Skris          since that section of code is *hardly* the bottleneck... ;-)
250758551Skris
250858551Skris        * Simplified the C output routines in Key_List::set_output_types
250958551Skris          and Key_List::output_keyword_table a bit in order to
251058551Skris          speed-up and clean up the code generation.
251158551Skris
251258551Skris        * Modified function Key_List::get_special_input so that it does
251358551Skris          not try to `delete' a buffer that turned out to be too short.
251458551Skris          This is important since the new memory management scheme
251558551Skris          does not handle deletions.  However, adding a small amount of
251658551Skris          garbage won't hurt anything, since we generally don't do this
251758551Skris          operation more than a couple times *at most*!
251858551Skris
251958551Skris        * Created a new file (new.cc) which includes my own overloaded
252058551Skris          operator new.  This function should dramatically reduce the
252158551Skris          number of calls to malloc since it grabs large chunks and
252258551Skris          doles them out in small pieces.  As a result of this change
252358551Skris          the class-specific `operator new' was removed from class List_Node.
252458551Skris
252558551SkrisTue Nov 14 21:45:30 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
252658551Skris
252758551Skris        * Continued to refine the great hack.  The latest trick is to
252858551Skris          try and replace most uses of dynamic memory (i.e., calls to
252958551Skris          new) with uses of gcc dynamic arrays (i.e., an alloca solution).
253058551Skris          This makes life much easier for the overall process-size, since 
253158551Skris          it reduces the amount of overhead for memory management.  As a
253258551Skris          side-effect from this change there is no reason to have the
253358551Skris          Bool_Array::dispose member function, so it's outta here!
253458551Skris
253558551Skris        * Fixed a stupid bug that was an disaster waiting to happen...
253658551Skris          Instead of making the boolean array large enough to index
253758551Skris          max_hash_value it was only large enough to index max_hash_value
253858551Skris          - 1.  Once again, an off-by-one mistake in C/C++!!!!
253958551Skris
254058551SkrisMon Nov 13 19:38:27 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
254158551Skris
254258551Skris        * Added the final great hack!  This allows us to generate hash tables
254358551Skris          for near-perfect hash functions that contain duplicates, *without*
254458551Skris          having to use switch statements!  Since many compilers die on large
254558551Skris          switch statements this feature is essential.  Furthermore, it appears
254658551Skris          that the generated code is often *smaller* than that put out by
254758551Skris          compilers, even though a large, sparse array must be created.
254858551Skris          Here's the general idea:
254958551Skris
255058551Skris             a. Generate the wordlist as a contiguous block of keywords, 
255158551Skris                just as before when using a switch statement.  This
255258551Skris                wordlist *must* be sorted by hash value. 
255358551Skris
255458551Skris             b. Generate the lookup array, which is an array of signed
255558551Skris                {chars,shorts,ints}, (which ever allows full coverage of
255658551Skris                the wordlist dimensions).  If the value v, where v =
255758551Skris                lookup[hash(str,len)], is >= 0 and < TOTAL_KEYWORDS, then we
255858551Skris                simply use this result as a direct access into the wordlist 
255958551Skris                array to snag the keyword for comparison.  
256058551Skris
256158551Skris             c. Otherwise, if v is < -TOTAL_KEYWORDS or > TOTAL_KEYWORDS
256258551Skris                this is an indication that we'll need to search through
256358551Skris                some number of duplicates hash values.  Using a hash
256458551Skris                linking scheme we'd then index into a different part of
256558551Skris                the hash table that provides the starting index and total
256658551Skris                length of the duplicate entries to find via linear search!
256758551Skris
256858551SkrisSun Nov 12 13:48:10 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
256958551Skris
257058551Skris        * Simplified Key_List::output_min_max considerably by recognizing
257158551Skris          that since the keyword list was already sorted by hash value finding 
257258551Skris          the min and max values is trivial!
257358551Skris
257458551Skris        * Improved the debugging diagnostics considerably in classes Key_List,
257558551Skris          Hash_Table, and Gen_Perf.
257658551Skris
257758551Skris        * Modified the `-s' option so that a negative argument is now 
257858551Skris          interpreted to mean `allow the maximum associated value to be
257958551Skris          about x times *smaller* than the number of input keys.'  This
258058551Skris          should help prevent massive explosion of generated hash table
258158551Skris          size for large keysets.
258258551Skris
258358551SkrisSat Nov 11 11:31:13 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
258458551Skris
258558551Skris        * Added a field in class Key_List that counts the total number
258658551Skris          of duplicate keywords, both static and dynamic.
258758551Skris
258858551Skris        * Added a new member function Bool_Array that deletes the dynamic
258958551Skris          memory allocated to Bool_Array::storage_array.  This space may
259058551Skris          be needed for subsequent options, so it made sense to free it as
259158551Skris          soon as possible...
259258551Skris          
259358551Skris        * Renamed file/class Alpha_Vectors to Vectors, to avoid problems
259458551Skris          with 14 character length filenames on SYSV.  Also changed file
259558551Skris          adapredefined.gperf to adadefs.gperf in the ./tests directory.
259658551Skris
259758551Skris        * Modified class Options by changing the member function
259858551Skris          Options::total_positions to Options::get_charset_size and
259958551Skris          Options::set_charset_size.  These two routines now either return
260018214Speter          the total charset size *or* the length of the largest keyword
260118214Speter          if the user specifies the -k'*' (ALLCHARS) option.  This change
260218214Speter          cleans up client code.
260318214Speter
260458551Skris        * Merged all the cperf changes into gperf.
260558551Skris        
260618214Speter        * Made sure to explicitly initialize perfect.fewest_collisions to
260718214Speter          0.
260818214Speter
260918214Speter        * Cleaned up some loose ends noticed by Nels Olson.
261018214Speter          1.  Removed `if (collisions <= perfect.fewest_collisions)'
261158551Skris              from Gen_Perf::affects_prev since it was superfluous.
261218214Speter          2.  Removed the fields best_char_value and best_asso_value
261358551Skris              from Gen_Perf.  There were also unnecessary.
261458551Skris          3.  Fixed a braino in the Bool_Array::bool_array_reset
261518214Speter              function.  Since iteration numbers can never be zero
261618214Speter              the `if (bool_array.iteration_number++ == 0)' must be
261718214Speter              `if (++bool_array.iteration_number == 0).'
261858551Skris          4.  Modified Std_Err::report_error so that it correctly handles
261918214Speter              "%%".
262018214Speter
262118214Speter        * It is important to note that -D no longer enables -S.
262218214Speter          There is a good reason for this change, which will become
262318214Speter          manifested in the next release... (suspense!).
262418214Speter
262558551Skris        * Made some subtle changes to Key_List::print_switch so that if finally
262618214Speter          seems to work correctly.  Needs more stress testing, however...
262718214Speter
262858551Skris        * Made a major change to the Key_List::print_switch function.
262918214Speter          The user can now specify the number of switch statements to generate
263018214Speter          via an argument to the -S option, i.e., -S1 means `generate 1
263118214Speter          switch statement with all keywords in it,' -S2 means generate
263218214Speter          2 switch statements with 1/2 the elements in each one, etc.
263318214Speter          Hopefully this will fix the problem with C compilers not being
263418214Speter          able to generate code for giant switch statements (but don't
263518214Speter          hold your breath!)
263618214Speter
263758551Skris        * Changed Key_List::length function to Key_List::keyword_list_length.
263818214Speter
263918214Speter        * Added a feature to main.c that prints out the starting wall-clock
264018214Speter          time before the program begins and prints out the ending wall-clock
264118214Speter          time when the program is finished.
264218214Speter
264358551Skris        * Added the GATHER_STATISTICS code in hash-table.c so we can
264418214Speter          keep track of how well double hashing is doing.  Eventually,
264518214Speter          GATHER_STATISTICS will be added so that all instrumentation
264618214Speter          code can be conditionally compiled in.
264718214Speter
264858551Skris        * Fixed a stupid bug in Key_List::print_switch routine.  This
264918214Speter          was necessary to make sure the generated switch statement worked
265018214Speter          correctly when *both* `natural,' i.e., static links and dynamic
265118214Speter          links, i.e., unresolved duplicates, hash to the same value.
265218214Speter
265358551Skris        * Modified Bool_Array::~Bool_Array destructor so that
265418214Speter          it now frees the bool_array.storage_array when it is no longer
265518214Speter          needed.  Since this array is generally very large it makes sense
265618214Speter          to return the memory to the freelist when it is no longer in use.
265718214Speter
265858551Skris        * Changed the interface to constructor Hash_Table::Hash_Table.  This 
265958551Skris          constructor now passed a pointer to a power-of-two sized buffer that 
266058551Skris          serve as storage for the hash table.  Although this weakens information
266118214Speter          hiding a little bit it greatly reduces dynamic memory fragmentation,
266218214Speter          since we can now obtain the memory via a call to alloca, rather
266358551Skris          than malloc.  This change modified Key_List::read_keys calling
266418214Speter          interface.
266518214Speter
266618214Speter        * Since alloca is now being used more aggressively a conditional
266758551Skris          compilation section was added in main.c. Taken from GNU GCC,
266858551Skris          this code gets rid of any avoidable limit on stack size so that
266958551Skris          alloca does not fail.  It is only used if the -DRLIMIT_STACK
267058551Skris          symbol is defined when gperf is compiled. 
267118214Speter
267218214Speter        * Added warnings in option.c so that user's would be informed
267318214Speter          that -r superceeds -i on the command-line.
267418214Speter          
267558551Skris        * Rewrote Gen_Perf::affects_prev.  First, the code structure
267618214Speter          was cleaned up considerably (removing the need for a dreaded
267758551Skris          goto!).  Secondly, a major change occurred so that Gen_Perf::affects_prev
267818214Speter          returns FALSE (success) when fewest_hits gets down to whatever
267918214Speter          it was after inserting the previous key (instead of waiting for
268018214Speter          it to reach 0).  In other words, it stops trying if it can
268118214Speter          resolve the new collisions added by a key, even if there are
268218214Speter          still other old, unresolved collisions.  This modification was
268318214Speter          suggested by Nels Olson and seems to *greatly* increase the
268418214Speter          speed of gperf for large keyfiles.  Thanks Nels!
268518214Speter
268658551Skris        * In a similar vein, inside the Gen_Perf::change routine 
268718214Speter          the variable `perfect.fewest_collisions is no longer initialized
268818214Speter          with the length of the keyword list.  Instead it starts out at
268918214Speter          0 and is incremented by 1 every time change () is called.
269018214Speter          The rationale for this behavior is that there are times when a
269118214Speter          collision causes the number of duplicates (collisions) to
269218214Speter          increase by a large amount when it would presumably just have
269318214Speter          gone up by 1 if none of the asso_values were changed.  That is,
269418214Speter          at the beginning of change(), you could initialize fewest_hits
269518214Speter          to 1+(previous value of fewest_hits) instead of to the number of
269618214Speter          keys.  Thanks again, Nels.
269718214Speter
269858551Skris        * Replaced alloca with new in the Gen_Perf::change function.
269918214Speter          This should eliminate some overhead at the expense of a little
270018214Speter          extra memory that is never reclaimed.
270118214Speter
270258551Skris        * Renamed Gen_Perf::merge_sets to Gen_Perf::compute_disjoint_union
270318214Speter          to reflect the change in behavior.
270418214Speter
270518214Speter        * Added the -e option so users can supply a string containing
270618214Speter          the characters used to separate keywords from their attributes.
270718214Speter          The default behavior is ",\n".
270818214Speter
270918214Speter        * Removed the char *uniq_set field from LIST_NODE and modified
271018214Speter          uses of uniq_set in perfect.c and keylist.c.  Due to changes
271158551Skris          to Gen_Perf::compute_disjoint_sets this field was no longer
271258551Skris          necessary, and its removal makes the program smaller and
271358551Skris          potentially faster. 
271418214Speter          
271518214Speter        * Added lots of changes/fixes suggested by Nels Olson
271618214Speter          (umls.UUCP!olson@mis.ucsf.edu).  In particular:
271758551Skris          1.  Changed Bool_Array so that it would dynamically create
271818214Speter              an array of unsigned shorts rather than ints if the 
271918214Speter              LO_CAL symbol was defined during program compilation.
272018214Speter              This cuts the amount of dynamic memory usage in half,
272118214Speter              which is important for large keyfile input.
272218214Speter          2.  Added some additional debugging statements that print extra
272318214Speter              info to stderr when the -d option is enabled.
272458551Skris          3.  Fixed a really stupid bug in Key_List::print_switch
272558551Skris              A right paren was placed at the wrong location, which broke
272658551Skris              strlen ().
272718214Speter          4.  Fixed a subtle problem with printing case values when keylinks
272818214Speter              appear.  The logic failed to account for the fact that there
272918214Speter              can be keylinks *and* regular node info also!
273058551Skris          5.  Changed the behavior of Key_List::read_keys so that it would
273158551Skris              honor -D unequivocally, i.e., it doesn't try to turn off dup
273258551Skris              handling if the user requests it, even if there are no
273358551Skris              immediate links in the keyfile input. 
273418214Speter          6.  Modified the -j option so that -j 0 means `try random values
273518214Speter              when searching for a way to resolve collisions.'
273658551Skris          7.  Added a field `num_done' to the Gen_Perf struct.  This is used
273718214Speter              to report information collected when trying to resolve
273818214Speter              hash collisions.
273918214Speter          8.  Modified the merge_sets algorithm to perform a disjoint
274018214Speter              union of two multisets.  This ensures that subsequent
274158551Skris              processing in Gen_Perf::affect_prev doesn't
274218214Speter              waste time trying to change an associated value that is
274318214Speter              shared between two conflicting keywords.
274458551Skris          9.  Modified Gen_Perf::affects_prev so that it doesn't try
274558551Skris              random jump values unless the -j 0 option is enabled.
274658551Skris          10. Fixed a silly bug in Gen_Perf::change.  This problem caused
274758551Skris              gperf to seg fault when the -k* option was given and the
274858551Skris              keyfile file had long keywords.
274958551Skris        
275058551SkrisSun Oct 29 00:18:55 1989  Doug Schmidt  (schmidt at siam.ics.uci.edu)
275118214Speter
275258551Skris        * Modified class-specific new operations for Read_Line and
275358551Skris          List_Node so they don't fail if SIZE is larger than twice
275458551Skris          the previous buffer size.  Note we double buffer size
275558551Skris          everytime the previous buffer runs out, as a heuristic
275658551Skris          to reduce future calls to malloc.
275718214Speter
275858551SkrisSun Oct 22 13:49:43 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
275958551Skris
276058551Skris        * Updated gperf version number to 2.0.  Send to Doug Lea for
276158551Skris          incorporation into the long-awaited `official' libg++ 1.36
276258551Skris          release! 
276358551Skris
276458551Skris        * Thanks to Nels Olson a silly bug in Gen_Perf::change ()
276558551Skris          was fixed.  This problem caused gperf to seg fault when
276658551Skris          the -k* option was given and the keyfile file had long
276758551Skris          keywords.
276858551Skris          
276958551Skris        * Modified Key_List::print_hash_function so that it output
277058551Skris          max_hash_value + 1 (rather than just max_hash_value) for
277158551Skris          any associated value entries that don't correspond to
277258551Skris          keyword charset characters.  This should speed up rejection
277358551Skris          of non-keyword strings a little in some cases.
277458551Skris
277558551SkrisSat Oct 21 19:28:36 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
277658551Skris
277758551Skris        * Fixed Key_List::print_hash_function so that it no longer output
277858551Skris          things like `return 0 + ...'  Although this probably gets
277958551Skris          optimized away by even the worst C compilers there isn't any
278058551Skris          point tempting fate... ;-)
278158551Skris
278258551Skris        * Fixed class List_Node's constructor so that it wouldn't a priori
278358551Skris          refuse to consider trying to hash keys whose length is less
278458551Skris          than the smallest user-specified key position.  It turns out
278558551Skris          this is not a problem unless the user also specifies the -n
278658551Skris          (NOLENGTH) option, in which case such keys most likely
278758551Skris          don't have a prayer of being hashed correctly!
278858551Skris
278958551Skris        * Changed the name of the generated lookup table from `Hash_Table'
279058551Skris          to `asso_value' to be consistent with the gperf paper.
279158551Skris
279258551SkrisTue Oct 17 14:19:48 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
279358551Skris
279458551Skris        * Added a flag GATHER_STATISTICS in the Makefile.  If defined
279558551Skris          during compilation this turns on certain collection facilities
279658551Skris          that track the performance of gperf during its execution.  In
279758551Skris          particular, I want to see how many collisions occur for the
279858551Skris          double hashing Hash_Table.
279958551Skris
280058551Skris        * Added a safety check so that we don't screw up if the total
280158551Skris          number of `resets' of the Bool_Array exceeds MAX_INT.  Since
280258551Skris          this number is around 2^31 it is unlikely that this would ever
280358551Skris          occur for most input, but why take the risk?
280458551Skris
280558551Skris        * Changed the behavior for the -a (ANSI) option so that the
280618214Speter          generated prototypes use int rather than size_t for the LEN 
280718214Speter          parameter.  It was too ugly having to #include <stddef.h> all
280818214Speter          over the place...
280918214Speter
281058551SkrisMon Oct 16 11:00:35 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
281158551Skris
281258551Skris        * Continued to work on the gperf paper for the USENIX C++
281358551Skris          conference.  At some point this will be merged back into
281458551Skris          the gperf documentation...
281558551Skris
281658551SkrisSat Oct 14 20:29:43 1989  Doug Schmidt  (schmidt at siam.ics.uci.edu)
281758551Skris
281818214Speter        * Added a majorly neat hack to Bool_Array, suggested by rfg.
281918214Speter          The basic idea was to throw away the Ullman array technique.
282018214Speter          The Ullman array was used to remove the need to reinitialize all 
282118214Speter          the Bool_Array elements to zero everytime we needed to determine
282218214Speter          whether there were duplicate hash values in the keyword list.  
282318214Speter          The current trick uses an `iteration number' scheme, which takes
282418214Speter          about 1/3 the space and reduces the overall program running a 
282518214Speter          time by about 20 percent for large input!  The hack works as 
282618214Speter          follows:
282718214Speter          
282858551Skris          1. Dynamically allocation 1 boolean array of size k.
282918214Speter          2. Initialize the boolean array to zeros, and consider the first
283018214Speter             iteration to be iteration 1.
283118214Speter          2. Then on all subsequent iterations we `reset' the bool array by
283218214Speter             kicking the iteration count by 1. 
283318214Speter          3. When it comes time to check whether a hash value is currently
283418214Speter             in the boolean array we simply check its index location.  If
283518214Speter             the value stored there is *not* equal to the current iteration
283618214Speter             number then the item is clearly *not* in the set.  In that
283718214Speter             case we assign the iteration number to that array's index
283818214Speter             location for future reference.  Otherwise, if the item at
283918214Speter             the index location *is* equal to the iteration number we've
284018214Speter             found a duplicate.  No muss, no fuss!
284158551Skris             
284258551SkrisMon Oct  2 12:30:54 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
284318214Speter
284458551Skris        * Changed some consts in options.h to enumerals, since g++
284558551Skris          doesn't seem to like them at the moment!
284618214Speter
284758551SkrisSat Sep 30 12:55:24 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
284818214Speter
284958551Skris        * Fixed a stupid bug in Key_List::print_hash_function that manifested
285058551Skris          itself if the `-k$' option was given (i.e., only use the key[length]
285158551Skris          character in the hash function).
285258551Skris
285318214Speter        * Added support for the -C option.  This makes the contents of
285418214Speter          all generated tables `readonly'.
285518214Speter
285618214Speter        * Changed the handling of generated switches so that there is
285718214Speter          only one call to str[n]?cmp.  This *greatly* reduces the size of
285818214Speter          the generated assembly code on all compilers I've seen.
285918214Speter
286018214Speter        * Fixed a subtle bug that occurred when the -l and -S option
286118214Speter          was given.  Code produced looked something like:
286218214Speter
286318214Speter          if (len != key_len || !strcmp (s1, resword->name)) return resword;
286418214Speter
286518214Speter          which doesn't make any sense.  Clearly, this should be:
286618214Speter
286718214Speter          if (len == key_len && !strcmp (s1, resword->name)) return resword;
286818214Speter
286958551SkrisTue Sep 26 10:36:50 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
287018214Speter
287158551Skris        * Changed class Read_Line's definition so that it no longer
287258551Skris          needs to know about the buffering scheme used to speed up 
287358551Skris          dynamic memory allocation of input keywords and their
287458551Skris          associated attributes.  This means that operator new is no longer
287558551Skris          a friend of Read_Line.
287618214Speter
287758551SkrisMon Sep 25 23:17:10 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
287858551Skris
287958551Skris        * Decided that Obstacks had too much overhead, so they were
288058551Skris          removed in favor of super-efficient, low-overhead buffered
288158551Skris          storage allocation hacks in Read_Line and List_Node.
288258551Skris
288358551Skris        * No longer try to inline functions that g++ complains about
288458551Skris          (Key_List::Merge and Key_List::Merge_Sort).
288558551Skris
288658551SkrisSun Sep 24 13:11:24 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
288758551Skris
288858551Skris        * Changed classes Read_Line and List_Node to use Obstacks in order
288958551Skris          to cache memory allocation for keyword strings and List_Nodes.
289058551Skris          
289158551Skris        * Continued to experiment with inheritance schemes.
289258551Skris        
289358551Skris        * Added a new file `alpha.h', that declares static data shared
289458551Skris          (i.e., inherited) between classes List_Node and Key_List.
289558551Skris
289658551SkrisTue Sep 12 16:14:41 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
289758551Skris
289858551Skris        * Made numerous changes to incorporate multiple inheritance in 
289958551Skris          gperf.
290058551Skris
290158551SkrisWed Aug 16 23:04:08 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
290258551Skris
290358551Skris        * Added the -DCOMPILER_FIXED flag to the ./src/Makefile.  This
290458551Skris          implies that people trying to compile gperf need to have a
290558551Skris          working version of the new g++ compiler (1.36.0).
290658551Skris
290758551Skris        * Removed some extra spaces that were being added in the generated
290858551Skris          C code.
290958551Skris
291018214SpeterMon Jul 24 17:09:46 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
291118214Speter
291218214Speter        * Fixed PRINT_HASH_FUNCTION and PRINT_LOOKUP_FUNCTION in keylist.c
291318214Speter          so that the generated functions take an unsigned int length argument.
291418214Speter          If -a is enabled the prototype is (const char *str, size_t len).
291518214Speter
291618214SpeterFri Jul 21 13:06:15 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
291718214Speter
291858551Skris        * Fixed a typo in PRINT_KEYWORD_TABLE in keylist.cc that prevented
291958551Skris          the indentation from working correctly.
292058551Skris
292118214Speter        * Fixed a horrible typo in PRINT_KEYWORD_TABLE in keylist.cc
292218214Speter          that prevented links from being printed correctly.
292318214Speter
292458551SkrisTue Jul 18 16:04:31 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
292558551Skris
292658551Skris        * Fixed up readline.cc and readline.h so that they work OK
292758551Skris          with g++ compilers that aren't completely up-to-date.
292858551Skris          If symbol COMPILER_FIXED is defined then the behavior
292958551Skris          that works on my more recent version of g++ is enabled.
293058551Skris
293118214SpeterSun Jul  9 17:53:28 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
293218214Speter
293318214Speter        * Changed the ./tests subdirectory Makefile so that it 
293418214Speter          uses $(CC) instead of gcc.
293518214Speter
293658551SkrisSun Jul  2 21:52:15 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
293718214Speter
293818214Speter        * Fixed a number of subtle bugs that occurred when -S was
293918214Speter          combined with various and sundry options.
294018214Speter
294118214Speter        * Added the -G option, that makes the generated keyword table
294218214Speter          a global static variable, rather than hiding it inside
294318214Speter          the lookup function.  This allows other functions to directly
294418214Speter          access the contents in this table.
294518214Speter
294618214Speter        * Added the "#" feature, that allows comments inside the keyword
294758551Skris          list from the input file. Comment handling takes place in readline.c.  
294858551Skris          This simplifies the code and reduces the number of malloc calls.
294918214Speter          
295018214Speter        * Also added the -H option (user can give the name of the hash
295118214Speter          function) and the -T option (prevents the transfer of the type decl
295218214Speter          to the output file, which is useful if the type is already defined
295318214Speter          elsewhere).
295418214Speter
295558551SkrisThu Jun 22 20:39:39 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
295618214Speter
295758551Skris        * Modified many classes so that they would inherit Std_Err as
295858551Skris          a base class.  This makes things more abstract...
295918214Speter
296058551SkrisFri Jun 16 14:23:00 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
296118214Speter
296218214Speter        * Modified the -f (FAST) option.  This now takes an argument.
296318214Speter          The argument corresponds to the number of iterations used
296418214Speter          to resolve collisions.  -f 0 uses the length of the
296518214Speter          keyword list (which is what -f did before).  This makes
296618214Speter          life much easier when dealing with large keyword files.
296718214Speter
296858551SkrisTue Jun  6 17:53:27 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
296918214Speter
297018214Speter        * Added the -c (comparison) option.  Enabling this
297118214Speter          will use the strncmp function for string comparisons.
297218214Speter          The default is to use strcmp.
297318214Speter
297458551Skris        * Fixed a typo in key_list.cc (PRINT_SWITCH).  This caused
297558551Skris          faulty C code to be generated when the -D, -p, and -t
297658551Skris          options were all enabled.
297718214Speter
297858551SkrisThu May 25 14:07:21 1989  Doug Schmidt  (schmidt at siam.ics.uci.edu)
297918214Speter
298058551Skris        * Once again, changed class Read_Line to overload global operator
298158551Skris          new.  Hopefully, this will work...!
298258551Skris
298358551SkrisSun May 21 01:51:45 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
298458551Skris
298558551Skris        * Modified Key_List::print_hash_function () so that it properly
298658551Skris          formats the associated values in the hash table according to
298758551Skris          the maximum number of digits required to represent the largest
298858551Skris          value.
298958551Skris
299058551Skris        * Removed the named return value from class Hash_Table's
299158551Skris          operator (), since this causes a seg fault when -O is enabled.
299258551Skris          No sense tripping subtle g++ bugs if we don't have to.... ;-)
299358551Skris
299458551Skris        * Removed the operator new hack from Read_Line, since this seemed
299558551Skris          to create horrible bus error problems.
299658551Skris                    
299758551Skris        * Changed many class member functions and data members to be `static', 
299858551Skris          if they don't manipulate this!
299918214Speter          
300058551SkrisFri May 12 23:06:56 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
300118214Speter
300258551Skris        * Changed class Std_Err to use static member functions, a la
300358551Skris          Ada or Modula 2.  This eliminates the need for an explicit
300458551Skris          error-handler class object.
300518214Speter
300658551Skris        * Added the ``named return value'' feature to Hash_Table::operator ()
300758551Skris          and Bool_Array::operator [], just for the heck of it.... ;-)
300818214Speter
300958551Skris        * Changed the previous hack in Read_Line so that we now use
301058551Skris          the overloaded global `new' instead of NEW_STRING!
301118214Speter
301258551SkrisWed May  3 17:36:55 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
301318214Speter
301418214Speter        * Updated to version 1.7.  This reflects the recent major changes
301518214Speter          and the new C port.
301618214Speter
301758551Skris        * Modified the GNU getopt.cc routine to have a class-based interface.
301818214Speter
301958551Skris        * Fixed a typo in Perfect.cc ~Perfect that prevented the actual maximum
302058551Skris          hash table size from being printed (maybe the stream classes
302158551Skris          weren't so bad after all.... ;-).
302258551Skris
302318214Speter        * Added support for the -f option.  This generates the perfect
302418214Speter          hash function ``fast.''  It reduces the execution time of
302518214Speter          gperf, at the cost of minimizing the range of hash values.
302618214Speter
302718214SpeterTue May  2 16:23:29 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
302818214Speter
302958551Skris        * Added an efficiency hack to Read_Line.  Instead of making
303058551Skris          a call to operator NEW (a.k.a. malloc) for each input string
303158551Skris          a new member function NEW_STRING stores a large buffer from
303258551Skris          which new strings are carved out, growing the buffer if
303358551Skris          necessary.  It might be useful to add this throughout the
303458551Skris          program....
303518214Speter
303658551Skris        * Removed all unnecessary calls to DELETE.  If the program is about
303758551Skris          to exit it is silly to waste time freeing memory.
303858551Skris
303958551Skris        * Added the GNU getopt program to the distribution.  This makes
304058551Skris          GPERF portable to systems that don't include getopt in libc.
304158551Skris          
304258551Skris        * Added a strcspn member to class Key_List.  This also increases
304358551Skris          portability.
304458551Skris
304558551Skris        * Added the get_include_src function from keylist.c as a member
304658551Skris          function in class Key_List.  Hopefully every function is 
304758551Skris          now associated with a class.  This aids abstraction and
304858551Skris          modularity.
304958551Skris
305018214Speter        * Ported gperf to C.  From now on both K&R C and GNU G++ versions
305158551Skris          will be supported.  There will be two ChangeLog files, one
305258551Skris          for each version of the program.
305318214Speter
305458551SkrisMon May  1 16:41:45 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
305558551Skris
305658551Skris        * Fixed a bug with -k'*'.  This now prints out *all* the cases
305758551Skris          up to the length of the longest word in the keyword set.
305858551Skris
305958551SkrisSun Apr 30 12:15:25 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
306058551Skris
306158551Skris        * Removed all use of the stream classes.  Too ugly, slow, and
306258551Skris          not handled by the c++-mode formatter....
306358551Skris
306458551Skris        * Modified the handling of links (i.e., keywords that have
306558551Skris          identical hash values as other keywords).  This should 
306658551Skris          speed up hash function generation for keyword sets with
306758551Skris          many duplicate entries.  The trick is to treat duplicate
306858551Skris          values as equivalence classes, so that each set of duplicate
306958551Skris          values is represented only once in the main list processing.
307058551Skris
307158551Skris        * Fixed some capitialization typos and indentations mistakes in 
307258551Skris          Key_List::print_hash_function.
307358551Skris
307458551SkrisSat Apr 29 12:04:03 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
307558551Skris
307658551Skris        * Fixed a typo/logico in Key_List::print_switch that prevented
307758551Skris          the last keyword in the keyword list to be print out.  This
307858551Skris          requires further examination.....
307958551Skris
308058551Skris        * Fixed a stupid bug in List_Node::List_node.  If the -k'*' option
308158551Skris          was enabled the KEY_SET string wasn't getting terminated with
308258551Skris          '\0'!
308358551Skris
308458551SkrisFri Apr 28 12:38:35 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
308558551Skris
308658551Skris        * Renamed strexp.h and strexp.cc to iterator.h and iterator.cc.
308758551Skris          Also changed the strexp class to iterator.  Continued to work
308858551Skris          on style...
308958551Skris
309058551Skris        * Updated the version number to 1.6.  This reflects all the 
309158551Skris          recent changes.
309258551Skris
309358551SkrisThu Apr 27 00:14:51 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
309458551Skris
309558551Skris        * Added the -D option that properly handles keyword sets that
309658551Skris          contain duplicate hash values.
309758551Skris
309858551Skris        * Continued the stylistic changes.  Added the #pragma once
309958551Skris          directive to all the *.h files.  Removed all #defines and
310058551Skris          replaced them with static consts.  Also moved the key_sort
310158551Skris          routine from options.cc into the options class as a 
310258551Skris          member function.
310358551Skris
310458551SkrisMon Apr  3 13:26:55 1989  Doug Schmidt  (schmidt at zola.ics.uci.edu)
310558551Skris
310658551Skris        * Made massive stylistic changes to bring source code into
310758551Skris          conformance with GNU style guidelines.
310858551Skris
310958551SkrisThu Mar 30 23:28:45 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
311058551Skris
311158551Skris        * Fixed up the output routines so that they generate code
311258551Skris          corresponding to the GNU style guidelines.
311358551Skris
311458551SkrisSat Mar 11 13:12:37 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
311558551Skris
311658551Skris        * Fixed Stderr constructors so that they wouldn't try to
311758551Skris          use the base class initializer syntax for the static 
311858551Skris          class variable Program_Name.  G++ 1.34 is stricter in
311958551Skris          enforcing the rules!
312058551Skris
312158551SkrisFri Mar 10 11:24:14 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
312258551Skris
312358551Skris        * Removed -v and ``| more'' from the Makefile to keep rfg happy...
312458551Skris
312558551SkrisThu Mar  2 12:37:30 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
312658551Skris
312758551Skris        * Sent latest GNU gperf version 1.5 to Doug Lea for inclusion
312858551Skris          into libg++ 1.34.  Note that there is a small bug with
312958551Skris          the new %{ ... %} source inclusion facility, since it doesn't
313058551Skris          understand comments and will barf if %{ or %} appear nested
313158551Skris          inside the outermost delimiters.  This is too trivial of
313258551Skris          a defect to fix at the moment...
313358551Skris
313458551SkrisTue Feb 28 11:19:58 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
313558551Skris
313658551Skris        * Added the -K option, which allows the user to provide a
313758551Skris          alternative name for the keyword structure component.
313858551Skris          The default is still ``name.''
313958551Skris
314058551Skris        * Added the LEX and YACC-like ability to include arbitrary
314158551Skris          text at the beginning of the generated C source code output.
314258551Skris          This required two new functions Get_Special_Input, 
314358551Skris          Key_List::Save_Include_Src;
314458551Skris
314558551Skris        * Fixed memory allocation bug in Key_List::Set_Types.
314658551Skris          Variable Return_Type needs 1 additional location
314758551Skris          to store the "*" if the -p option is used.
314858551Skris          
314958551Skris        * Added code to NULL terminate both Struct_Tag and Return_Type,
315058551Skris          *after* the strncpy (stupid mistake).
315158551Skris          
315258551SkrisMon Feb 27 14:39:51 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
315358551Skris
315458551Skris        * Added a new option -N.  This allows the user to specify the
315558551Skris          name to be used for the generated lookup function.  The
315658551Skris          default name is still ``in_word_set.''  This makes it
315758551Skris          possible to completely automate the perfect hash function
315858551Skris          generation process!
315958551Skris
316058551SkrisMon Feb 20 23:33:14 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
316158551Skris
316258551Skris        * Corrected the Hash_Table::operator () function so that
316358551Skris          *it* is responsible for deciding when a new key has the
316458551Skris          same signature as a previously seen key.  The key length 
316558551Skris          information is now used internally to this function to
316658551Skris          decide whether to add to the hash table those keys with
316758551Skris          the same key sets, but different lengths.  Before, this
316858551Skris          was handled by the Key_List::Read_Keys function.  However,
316958551Skris          this failed to work for certain duplicate keys, since
317058551Skris          they weren't being entered into the hash table properly.
317158551Skris
317258551SkrisSun Feb 19 16:02:51 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
317358551Skris
317458551Skris        * Modified class Options by moving the enum Option_Type out
317558551Skris          of the class.  This is to satisfy the new enumeration
317658551Skris          scope rules in C++.
317758551Skris
317858551SkrisSun Jan 15 15:12:09 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
317958551Skris
318058551Skris        * Incremented the version number upto 1.4 to reflect the new 
318158551Skris          options that affect the generated code.  Send the new 
318258551Skris          distribution off to Michael for use with g++ 1.33.
318358551Skris
318458551Skris        * Added a fix to Key_List::Read_Keys so that it checks for links
318558551Skris          properly when the -n option is used.  Previously, it didn't
318658551Skris          catch obvious links, which caused it to spend large amount
318758551Skris          of time searching for a solution that could never occur!
318858551Skris
318958551Skris        * Modified the Key_List data structure to record *both* the 
319058551Skris          minimum and the maximum key lengths.  This information
319158551Skris          is now computed in Key_List::Read_Keys, and thus 
319258551Skris          Key_List::Print_Min_Max doesn't need to bother.
319358551Skris
319458551Skris        * Modifed the key position iterator scheme in options.cc to
319558551Skris          eliminate the need for member function Options::Advance.
319658551Skris          Now, the Options::Get function performs the advancement
319758551Skris          automatically, obviating the need for an extra function call.
319858551Skris
319958551Skris        * Added the new function Options::Print_Options, to print out
320058551Skris          the user-specified command line options to generated C
320158551Skris          output file.
320258551Skris
320358551Skris        * Added a new function, Key_List::Print_Keylength_Table,
320458551Skris          which creates a table of lengths for use in speeding
320558551Skris          up the keyword search.  This also meant that a new
320658551Skris          option, -l (LENTABLE) is recognized.  It controls 
320758551Skris          whether the length table is printed and the comparison
320858551Skris          made in the generated function ``in_word_set.''
320958551Skris
321058551Skris        * Added a comment at the top of the generated C code
321158551Skris          output file that tells what version of gperf was used.
321258551Skris          Next, I'll also dump out the command line options
321358551Skris          as a comment too.  Thanks to Michael Tiemann for the
321458551Skris          feedback on this.
321558551Skris
321658551Skris        * Fixed the -n option to make it work correctly with
321758551Skris          other parts of the program (most notably the Perfect::Hash
321858551Skris          function and the computation of minimum and maximum lengths.
321958551Skris
322058551SkrisFri Jan 13 21:25:27 1989  Doug Schmidt  (schmidt at siam.ics.uci.edu)
322158551Skris
322258551Skris        * Realized the the need to add a test that will enable
322358551Skris          optimziation of the generated C code in the ``hash'' function
322458551Skris          by checking whether all the requested key positions are
322558551Skris          guaranteed to exist due to the comparison in `in_word_set.''
322658551Skris          I'll put this in soon....
322758551Skris
322858551SkrisThu Jan 12 20:09:21 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
322958551Skris
323058551Skris        * Added pascal, modula3, and modula2 tests inputs to the 
323158551Skris          Makefile
323258551Skris        
323358551Skris        * Recognised that there is a bug with the -n option.  However
323458551Skris          I'm too busy to fix it properly, right now.  The problem 
323558551Skris          is that the generated #define end up being 0, since that's
323658551Skris          my hack to make -n work.  This needs complete rethinking!
323758551Skris
323858551SkrisTue Jan 10 00:08:16 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
323958551Skris
324058551Skris        * Added a new option, -n, that instructs gperf to not use the
324158551Skris          length of an identifier when computing the hash functions.
324258551Skris          I'm not sure how useful this is!
324358551Skris          
324458551Skris        * Retransmitted the distribution to rocky.oswego.edu.  Hopefully,
324558551Skris          this will work!
324658551Skris
324758551Skris        * Began fixing the indentation and capitalization to conform
324858551Skris          to the GNU coding guidelines.
324958551Skris
325058551SkrisMon Jan  9 22:23:18 1989  Doug Schmidt  (schmidt at pompe.ics.uci.edu)
325158551Skris
325258551Skris        * Fixed horrible bug in Read_Line::Readln_Aux.  This was
325358551Skris          a subtle and pernicous off-by-1 error, that overwrote
325458551Skris          past the last character of the input string buffer.  I
325558551Skris          think this fault was killing the vax!
325658551Skris
325758551Skris        * Yow, fixed an oversight in List_Node::List_Node, where the
325858551Skris          pointer field Next was uninitialized.  Luckily, the new routine
325958551Skris          seems to return 0 filled objects the first time through!
326058551Skris
326158551SkrisSun Jan  8 13:43:14 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
326258551Skris
326358551Skris        * Modified the ``key linked'' diagnostic in Key_List::Read_Keys
326458551Skris          to be more helpful and easy to read.
326558551Skris
326658551Skris        * Fixed the List_Node::List_Node so that it would ignore trailing
326758551Skris          fields if the -t option was not enabled.
326858551Skris
326958551Skris        * Moved the List_Node declarations out of keylist.h and
327058551Skris          into a file of its own, called listnode.cc and listnode.h
327158551Skris          Made Set_Sort a member function of class List_Node.
327258551Skris
327358551Skris        * Massively updated the documentation in the gperf.texinfo file.
327458551Skris        
327558551Skris        * Polished off the major revision to the print functions,
327658551Skris          added a few new tests in the Makefile to check for the
327758551Skris          validity of the program and ftp'ed the entire distribution
327858551Skris          off to Doug Lea for libg++. ( changed it to
327958551Skris          1.3 to reflect the major changes with the generated
328058551Skris          C code ).
328158551Skris
328258551Skris        * Fixed Key_List::Print_Switch to deal with the -p and -t options.
328358551Skris          This meant that the ``still-born'' function Key_List::
328458551Skris          Print_Type_Switch was superflous, so I removed it.
328558551Skris          Also, removed the restriction in Option that the -p and
328658551Skris          -t options couldn't be used simultaneously.
328758551Skris
328858551Skris        * Modified List_Node::List_Node, to perform only 1 call to 
328958551Skris          ``new'' when dynamically allocating memory for the Key_Set
329058551Skris          and the Uniq_Set.
329158551Skris
329258551SkrisSat Jan  7 14:10:51 1989  Doug Schmidt  (schmidt at glacier.ics.uci.edu)
329358551Skris
329458551Skris        * Fixed a big bug with the new policy of nesting the
329558551Skris          wordlist inside of generated function ``in_word_set.''
329658551Skris          I'd forgotten to declare the wordlist array as static!
329758551Skris          ( arrgh ).
329858551Skris
329958551Skris        * Added a new function Key_List::Set_Types, that figures out
330058551Skris          the return type for generated function ``in_word_set,''
330158551Skris          the user-defined ``struct tag,'' if one is used, and also
330258551Skris          formates the array type for the static local array.
330358551Skris
330458551Skris        * Changed the print routines to take advantage of the
330558551Skris          new -p option.
330658551Skris
330758551Skris        * Began adding the hooks to allow the return of a pointer
330858551Skris          to a user defined struct location from the generated
330958551Skris          ``in_word_set'' function instead of the current 0 or 1
331058551Skris          return value.  Created function Key_List::Print_Type_Switch
331158551Skris          and added option -p to class Option, allowing the user to 
331258551Skris          request generation of the aforementioned pointers returned 
331358551Skris          instead of booleans.
331458551Skris
331558551Skris        * Put in checks in class Option to make sure that -S and -t
331658551Skris          options are not used simultaneously.  This restriction
331758551Skris          will be removed in subsequent releases, once I decide on
331858551Skris          a clean way to implement it.
331958551Skris
332058551Skris        * Sent version 1.2 to Doug Lea for possible inclusion into
332158551Skris          the libg++ distribution.
332258551Skris          
332358551Skris        * Moved the static word_list array inside the generated function
332458551Skris          in_word_set.  This supports better data hiding.
332558551Skris
332658551Skris        * Added a texinfo file, gperf.texinfo
332758551Skris          
332858551Skris        * Revised the Makefile to cleanup the droppings from texinfo
332958551Skris          and changed the name of gperf.cc and gperf.h to perfect.cc
333058551Skris          and perfect.h.
333158551Skris
333258551SkrisFri Jan  6 13:04:45 1989  Doug Schmidt  (schmidt at crimee.ics.uci.edu)
333358551Skris
333458551Skris        * Implemented the switch statement output format.  Much better
333558551Skris          for large datasets in terms of space used.
333658551Skris
333758551Skris        * Added new functions to break up the Key_List::Output function.
333858551Skris          Functions added were Key_List::Print_Switch, Key_List::Print_Min_Max,
333958551Skris          Key_List::Print_Keyword_Table, Key_List::Print_Hash_Function,
334058551Skris          and Key_List::Print_Lookup_Function.  This simplifies the
334158551Skris          big mess in Key_List::Output considerably!
334258551Skris          
334358551Skris        * Added switch statement option to Options, which potentially 
334458551Skris          trades time for space in the generated lookup code.
334558551Skris
334658551SkrisThu Jan  5 22:46:34 1989  Doug Schmidt  (schmidt at siam.ics.uci.edu)
334758551Skris
334858551Skris        * Released version 1.1
334958551Skris        
335058551Skris        * Fixed a bug with Gperf::Merge_Set, it was skipping letters shared
335158551Skris          between the Set_1 and Set_2.
335258551Skris
335358551Skris        * Added the optimal min/max algorithm in Key_List::Output.  This
335458551Skris          runs in O ( 3n/2 ), rather than O ( 2n ) time.
335558551Skris
335658551Skris        * Changed Gperf::Sort_Set to use insertion sort, rather than
335758551Skris          bubble sort.
335858551Skris        
335958551Skris        * Added a check in Key_List::Output for the special case where
336058551Skris          the keys used are 1,$.  It is possible to generate more
336158551Skris          efficient C code in this case.
3362