1230237Sbapt2007-04-30  Brendan Kehoe  <brendan@zen.org>
2230237Sbapt
3230237Sbapt	* gperf-3.0.3 released.
4230237Sbapt	* src/version.cc: Bump to 3.0.3.
5230237Sbapt	* tests/*.exp: Bump to 3.0.3 in header.
6230237Sbapt	* doc/gperf.1: Regenerate with gperf 3.0.3.
7230237Sbapt
8230237Sbapt2007-04-06  Bruno Haible  <bruno@clisp.org>
9230237Sbapt
10230237Sbapt	Improve support for mingw.
11230237Sbapt	* tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal,
12230237Sbapt	check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff.
13230237Sbapt	(POSTPROCESS_FOR_MINGW): New variable.
14230237Sbapt	(check-test): Use it to postprocess output before diff.
15230237Sbapt
16230237Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
17230237Sbapt
18230237Sbapt	Support for newer GNU standards.
19230237Sbapt	* doc/configure.ac (mandir): Remove assignment.
20230237Sbapt	* doc/Makefile.in (datarootdir): New variable.
21230237Sbapt	(docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by
22230237Sbapt	autoconf.
23230237Sbapt	* configure.ac: Require autoconf >= 2.60.
24230237Sbapt	* doc/configure.ac: Likewise.
25230237Sbapt	* lib/configure.ac: Likewise.
26230237Sbapt	* src/configure.ac: Likewise.
27230237Sbapt	* tests/configure.ac: Likewise.
28230237Sbapt	* configure: Regenerated with autoconf-2.61.
29230237Sbapt	* doc/configure: Likewise.
30230237Sbapt	* lib/configure: Likewise.
31230237Sbapt	* src/configure: Likewise.
32230237Sbapt	* tests/configure: Likewise.
33230237Sbapt	* src/config.h.in: Likewise.
34230237Sbapt	* src/config.h.msvc: Likewise.
35230237Sbapt	* src/config.h_vms: Likewise.
36230237Sbapt
37230237Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
38230237Sbapt
39230237Sbapt	* doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL
40230237Sbapt	environment variables.
41230237Sbapt
42230237Sbapt2007-04-04  Bruno Haible  <bruno@clisp.org>
43230237Sbapt
44230237Sbapt	* configure.ac: Renamed from configure.in.
45230237Sbapt	* doc/configure.ac: Renamed from doc/configure.in.
46230237Sbapt	* lib/configure.ac: Renamed from lib/configure.in.
47230237Sbapt	* src/configure.ac: Renamed from src/configure.in.
48230237Sbapt	* tests/configure.ac: Renamed from tests/configure.in.
49230237Sbapt	* Makefile.devel: Update.
50230237Sbapt	* INSTALL: Update.
51230237Sbapt
52230237Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
53230237Sbapt
54230237Sbapt	* tests/test.c (in_word_set): New declaration.
55230237Sbapt	* tests/test2.c (in_word_set): Likewise.
56230237Sbapt
57230237Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
58230237Sbapt
59230237Sbapt	* src/options.cc (Options::parse_options): Bump copyright year.
60230237Sbapt
61230237Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
62230237Sbapt
63230237Sbapt	* doc/gperf.texi: Fix typo.
64230237Sbapt
65230237Sbapt2007-03-31  Bruno Haible  <bruno@clisp.org>
66230237Sbapt
67230237Sbapt	Change generated code after the meaning of __inline is changed in
68230237Sbapt	GCC 4.3.
69230237Sbapt	* src/output.cc (Output::output_lookup_function): Emit an inline
70230237Sbapt	marker that also works with gcc-4.3 in c99 or gnu99 mode.
71230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
72230237Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
73230237Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
74230237Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
75230237Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
76230237Sbapt	Reported by Bruce Korb <Bruce.Korb@gmail.com>.
77230237Sbapt
78230237Sbapt2006-06-29  Brendan Kehoe  <brendan@zen.org>
79230237Sbapt
80230237Sbapt	* gperf-3.0.2 released.
81230237Sbapt
82230237Sbapt	* doc/Makefile.in (all): No longer depend on dvi.
83230237Sbapt
84230237Sbapt2006-01-22  Brendan Kehoe  <brendan@zen.org>
85230237Sbapt
86230237Sbapt	* doc/gperf.texi: Update copyright to be 1989-2006.
87230237Sbapt	(UPDATED): Change to 22 January 2006.
88230237Sbapt	* doc/gperf.1 (TH): Fix date.
89230237Sbapt	* configure.in: Update copyright years.
90230237Sbapt	* configure: Regenerate.
91230237Sbapt	* src/Makefile.in: Update copyright years.
92230237Sbapt
93230237Sbapt	* doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex
94230237Sbapt	instead of trying to use texi2dvi, whose run of etex ends up
95230237Sbapt	actually always running pdfetex, thus always recreating gperf.pdf.
96230237Sbapt
97230237Sbapt2006-01-13  Brendan Kehoe  <brendan@zen.org>
98230237Sbapt
99230237Sbapt	* NEWS: Add note about #line directive fix.
100230237Sbapt	* doc/gperf.1: Regenerate with Makefile.devel.
101230237Sbapt
102230237Sbapt	* doc/gperf.texi (UPDATED): Correct to be today.
103230237Sbapt	* doc: Regenerated by doing make in a configured tree.
104230237Sbapt	Requires makeinfo, texi2dvi, texi2pdf, and texi2html.
105230237Sbapt
106230237Sbapt	* configure.in: Add AC_OBJEXT and AC_EXEEXT.
107230237Sbapt	* lib/Makefile.in (OBJEXT): Define for subst.
108230237Sbapt	(OBJECTS): Use $(OBJEXT) instead of '.o'.
109230237Sbapt	* src/Makefile.in: Make dependencies use $(OBJEXT).
110230237Sbapt	(OBJEXT, EXEEXT): Define for subst.
111230237Sbapt	(TARGETPROG): Add $(EXEEXT).
112230237Sbapt	(OBJECTS): Use $(OBJEXT) instead of '.o'.
113230237Sbapt	(clean): Remove *.$(OBJEXT) instead of *.o.
114230237Sbapt
115230237Sbapt2006-01-13  Bruno Haible  <bruno@clisp.org>
116230237Sbapt
117230237Sbapt	Fix #line directives for filenames containing backslashes.
118230237Sbapt	* src/output.cc (output_line_directive): New function.
119230237Sbapt	(output_keyword_entry, Output::output): Use it.
120230237Sbapt	Reported by Alexander <alexander.me@gmail.com>.
121230237Sbapt
122230237Sbapt	* src/options.cc (Options::parse_options): Update years in --version
123230237Sbapt	output.
124230237Sbapt
125230237Sbapt2005-08-29  Brendan Kehoe  <brendan@zen.org>
126230237Sbapt
127230237Sbapt	* src/keyword.cc: Tweak comment to avoid nesting.
128230237Sbapt
129230237Sbapt2005-08-27  Bruno Haible  <bruno@clisp.org>
130230237Sbapt
131230237Sbapt	Fix missing ranlib detection when cross-compiling.
132230237Sbapt	* aclocal.m4 (CL_PROG_RANLIB): Remove macro.
133230237Sbapt	* lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB.
134230237Sbapt
135230237Sbapt2005-07-30  Bruno Haible  <bruno@clisp.org>
136230237Sbapt
137230237Sbapt	* src/version.cc: Bump version number to 3.0.2.
138230237Sbapt	* doc/gperf.texi: Likewise.
139230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
140230237Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
141230237Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
142230237Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
143230237Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
144230237Sbapt
145230237Sbapt2005-07-30  Bruno Haible  <bruno@clisp.org>
146230237Sbapt
147230237Sbapt	* src/positions.h: Add forward declarations of friend classes.
148230237Sbapt	Needed for compilation with g++ 4.0.
149230237Sbapt
150230237Sbapt2004-08-22  Bruno Haible  <bruno@clisp.org>
151230237Sbapt
152230237Sbapt	* tests/Makefile.in (check-lang-syntax): Add test for the
153230237Sbapt	--length-table-name option.
154230237Sbapt	* tests/test-6.exp: Update.
155230237Sbapt
156230237Sbapt2004-08-21  Bruce Lilly <blilly@erols.com>
157230237Sbapt
158230237Sbapt	* src/input.cc (Input::read_input): Accept length-table-name
159230237Sbapt	declaration.
160230237Sbapt	* src/options.h (Options::get_lengthtable_name,
161230237Sbapt	Options::set_lengthtable_name): New declarations.
162230237Sbapt	(Options): Add field _lengthtable_name.
163230237Sbapt	* src/options.icc (Options::get_lengthtable_name): New inline method.
164230237Sbapt	* src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant.
165230237Sbapt	(Options::long_usage): Document --length-table-name option.
166230237Sbapt	(Options::Options): Initialize _lengthtable_name field.
167230237Sbapt	(Options::~Options): Update.
168230237Sbapt	(Options::set_lengthtable_name): New method.
169230237Sbapt	(long_options): Add option --length-table-name.
170230237Sbapt	(Options::parse_options): Implement --length-table-name option.
171230237Sbapt	* src/output.cc (Output::output_keylength_table, output_switch_case,
172230237Sbapt	Output::output_lookup_function_body): Use option.get_lengthtable_name.
173230237Sbapt	* doc/gperf.texi (Gperf Declarations): Document %define
174230237Sbapt	length-table-name.
175230237Sbapt	(Output Details): Document --length-table-name option.
176230237Sbapt
177230237Sbapt2003-06-12  Bruno Haible  <bruno@clisp.org>
178230237Sbapt
179230237Sbapt	* gperf-3.0.1 released.
180230237Sbapt
181230237Sbapt	* src/version.cc: Bump version number to 3.0.1.
182230237Sbapt	* doc/gperf.texi: Likewise.
183230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
184230237Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
185230237Sbapt	tests/java.exp, tests/languages.exp, tests/modula2.exp,
186230237Sbapt	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
187230237Sbapt	tests/permutc2.exp, tests/test-4.exp: Update.
188230237Sbapt
189230237Sbapt2003-05-31  Bruno Haible  <bruno@clisp.org>
190230237Sbapt
191230237Sbapt	* doc/gperf.texi (User-supplied Struct): Mention the possibility of an
192230237Sbapt	abbreviated struct declaration.
193230237Sbapt	* src/input.cc (Input::read_input): Support struct declarations of the
194230237Sbapt	form "struct foo;".
195230237Sbapt	* tests/incomplete.gperf: New file.
196230237Sbapt	* tests/incomplete.exp: New file.
197230237Sbapt	* tests/Makefile.in (check-test): Check incomplete.gperf too.
198230237Sbapt	Reported by Rob Leslie <rob@mars.org>.
199230237Sbapt
200230237Sbapt2003-05-20  Bruno Haible  <bruno@clisp.org>
201230237Sbapt
202230237Sbapt	* doc/Makefile.in (gperf.ps): Don't use $< in a target rule.
203230237Sbapt
204230237Sbapt2003-05-27  Bruno Haible  <bruno@clisp.org>
205230237Sbapt
206230237Sbapt	* Makefile.vms (CC): Correct value.
207230237Sbapt	(getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set
208230237Sbapt	HAVE_CONFIG_H.
209230237Sbapt
210230237Sbapt2003-05-17  Bruno Haible  <bruno@clisp.org>
211230237Sbapt
212230237Sbapt	* Makefile.msvc (DEBUGFLAGS): New variable.
213230237Sbapt	(gperf.exe): Use it, and MFLAGS too.
214230237Sbapt
215230237Sbapt2003-05-08  Bruno Haible  <bruno@clisp.org>
216230237Sbapt
217230237Sbapt	* gperf-3.0 released.
218230237Sbapt
219230237Sbapt2003-05-07  Bruno Haible  <bruno@clisp.org>
220230237Sbapt
221230237Sbapt	* src/version.cc: Bump version number to 3.0.
222230237Sbapt	* doc/gperf.texi: Likewise.
223230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
224230237Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
225230237Sbapt	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
226230237Sbapt	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
227230237Sbapt	tests/test-4.exp: Update.
228230237Sbapt
229230237Sbapt	* src/configure.in: Fix AC_INIT argument.
230230237Sbapt
231230237Sbapt	* Makefile.devel (configure, lib/configure, src/configure,
232230237Sbapt	tests/configure, doc/configure): Use the newest autoconf.
233230237Sbapt	(src/config.h.in): Use the newest autoheader.
234230237Sbapt
235230237Sbapt2003-05-03  Bruno Haible  <bruno@clisp.org>
236230237Sbapt
237230237Sbapt	* doc/gperf.texi: Use two spaces as sentence separator, as recommended
238230237Sbapt	by the texinfo manual.
239230237Sbapt
240230237Sbapt2003-04-12  Bruno Haible  <bruno@clisp.org>
241230237Sbapt
242230237Sbapt	* doc/configure.in (mandir): Change default value.
243230237Sbapt	* doc/Makefile.in (docdir): Use datadir instead of prefix.
244230237Sbapt	* Makefile.msvc (datadir): New variable.
245230237Sbapt	(mandir, docdir): Use it instead of prefix.
246230237Sbapt	(install, installdirs): Update.
247230237Sbapt	* Makefile.vms (datadir): New variable.
248230237Sbapt	(mandir, docdir): Use it instead of prefix.
249230237Sbapt	(install, installdirs): Update.
250230237Sbapt
251230237Sbapt2003-04-12  Bruno Haible  <bruno@clisp.org>
252230237Sbapt
253230237Sbapt	* README.vms: New file.
254230237Sbapt	* Makefile.vms: New file.
255230237Sbapt	* Makefile.devel (src/config.h_vms): New rule.
256230237Sbapt	(all): Depend on it.
257230237Sbapt
258230237Sbapt2003-03-19  Bruno Haible  <bruno@clisp.org>
259230237Sbapt
260230237Sbapt	* src/input.cc (Input::read_input): Ignore comments at the beginning
261230237Sbapt	of the declarations section.
262230237Sbapt	* doc/gperf.texi (Controls for GNU indent): New section.
263230237Sbapt	Reported by Bruce Lilly <blilly@erols.com>.
264230237Sbapt
265230237Sbapt2003-03-19  Bruno Haible  <bruno@clisp.org>
266230237Sbapt
267230237Sbapt	* src/output.cc (Output::output_hash_function): Avoid lint warning if
268230237Sbapt	not all arguments of the hash function are used. Avoid lint warning
269230237Sbapt	for fallthrough in switch.
270230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
271230237Sbapt	tests/cplusplus.exp, tests/java.exp, tests/languages.exp,
272230237Sbapt	tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected
273230237Sbapt	output.
274230237Sbapt	Reported by Bruce Lilly <blilly@erols.com>.
275230237Sbapt
276230237Sbapt2003-03-01  Bruno Haible  <bruno@clisp.org>
277230237Sbapt
278230237Sbapt	* src/options.h (Options::set_initializer_suffix): New declaration.
279230237Sbapt	* src/options.cc (Options::set_initializer_suffix): New method.
280230237Sbapt	* src/input.cc (Input::read_input): Recognize %define
281230237Sbapt	initializer-suffix.
282230237Sbapt	* doc/gperf.texi (Gperf Declarations): Document %define
283230237Sbapt	initializer-suffix.
284230237Sbapt	* NEWS: Update.
285230237Sbapt
286230237Sbapt2003-02-26  Bruno Haible  <bruno@clisp.org>
287230237Sbapt
288230237Sbapt	* Makefile.msvc: New file.
289230237Sbapt	* README.woe32: New file.
290230237Sbapt	* Makefile.devel (all): Depend on src/config.h.msvc.
291230237Sbapt	(src/config.h.msvc): New rule.
292230237Sbapt
293230237Sbapt2003-01-07  Bruno Haible  <bruno@clisp.org>
294230237Sbapt
295230237Sbapt	* src/input.h (Input::_charset_dependent): New field.
296230237Sbapt	* src/input.cc (Input::read_input): Also set _charset_dependent.
297230237Sbapt	* src/main.cc (main): Pass _charset_dependent from Input to Output.
298230237Sbapt	* src/output.h (Output::Output): Add charset_dependent argument.
299230237Sbapt	(Output::_charset_dependent): New field.
300230237Sbapt	* src/output.cc (Output::Output): Add charset_dependent argument.
301230237Sbapt	(Output::output): Provoke a compilation error if the execution
302230237Sbapt	character set doesn't match the expectations.
303230237Sbapt	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
304230237Sbapt	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
305230237Sbapt	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
306230237Sbapt	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
307230237Sbapt	tests/test-4.exp: Update.
308230237Sbapt
309230237Sbapt	* src/options.cc (Options::long_usage): Change bug report address to
310230237Sbapt	<bug-gnu-gperf@gnu.org>.
311230237Sbapt	* tests/test-6.exp: Update.
312230237Sbapt
313230237Sbapt	* src/output.cc (USE_DOWNCASE_TABLE): New macro.
314230237Sbapt	(output_upperlower_table): New function.
315230237Sbapt	(output_upperlower_strcmp, output_upperlower_strncmp,
316230237Sbapt	output_upperlower_memcmp): Emit gperf_downcase array accesses.
317230237Sbapt	(Output::output): Call output_upperlower_table.
318230237Sbapt	* tests/permutc2.exp: Update.
319230237Sbapt
320230237Sbapt	* src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast.
321230237Sbapt	(Only in GCC a cast of an lvalue is an lvalue.)
322230237Sbapt
323230237Sbapt2003-01-01  Bruno Haible  <bruno@clisp.org>
324230237Sbapt
325230237Sbapt	* src/options.cc (Options::parse_options): Update copyright year.
326230237Sbapt
327230237Sbapt	* doc/gperf.texi (@author): Add me.
328230237Sbapt
329230237Sbapt	* src/options.h (NULLSTRINGS): New enum value.
330230237Sbapt	(Options::get_stringpool_name, Options::set_stringpool_name): New
331230237Sbapt	method declarations.
332230237Sbapt	(Options::_stringpool_name): New field.
333230237Sbapt	* src/options.icc (Options::get_stringpool_name): New method.
334230237Sbapt	* src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable.
335230237Sbapt	(Options::long_usage): Document -Q and --null-strings.
336230237Sbapt	(Options::Options): Initialize _stringpool_name.
337230237Sbapt	(Options::~Options): Output _stringpool_name, NULLSTRINGS values too.
338230237Sbapt	(Options::set_stringpool_name): New method.
339230237Sbapt	(long_options): Add options --string-pool-name, --null-strings.
340230237Sbapt	(Options::parse_options): Implement options -P, -Q and --null-strings.
341230237Sbapt	* src/input.cc (Input::read_input): Recognize declarations %pic,
342230237Sbapt	%define string-pool-name, %null-strings.
343230237Sbapt	* src/output.h (Output::output_string_pool,
344230237Sbapt	Output::output_lookup_pools): New method declarations.
345230237Sbapt	(Output::_wordlist_eltype): New field.
346230237Sbapt	* src/output.cc (Output::output_keylength_table): Trivial
347230237Sbapt	simplification.
348230237Sbapt	(Output::output_string_pool): New method.
349230237Sbapt	(output_keyword_entry): Add stringpool_index argument. For SHAREDLIB,
350230237Sbapt	use struct offsets.
351230237Sbapt	(output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "".
352230237Sbapt	(Output::output_keyword_table): Use _wordlist_eltype instead of
353230237Sbapt	_struct_tag. Compute stringpool_index for output_keyword_entry.
354230237Sbapt	(Output::output_lookup_pools): New method.
355230237Sbapt	(Output::output_lookup_function_body): Use _wordlist_eltype instead of
356230237Sbapt	_struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to
357230237Sbapt	strings. Use "o >= 0" to test for nonempty table entry.
358230237Sbapt	(Output::output_lookup_function): Call output_lookup_pools.
359230237Sbapt	(Output::output): Initialize _wordlist_eltype. Call
360230237Sbapt	output_lookup_pools.
361230237Sbapt	* tests/jstest4.gperf: New file.
362230237Sbapt	* tests/test-6.exp: Update.
363230237Sbapt	* tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of
364230237Sbapt	-P and -Q.
365230237Sbapt	* doc/gperf.texi (User-supplied Struct): Mention that first field has
366230237Sbapt	to be of type 'int' if -P is given.
367230237Sbapt	(Gperf Declarations): Document %pic, %define string-pool-name,
368230237Sbapt	%null-strings.
369230237Sbapt	(Output Details): Update description of option -P. Document options -Q
370230237Sbapt	and --null-strings.
371230237Sbapt
372230237Sbapt	* tests/Makefile.in (check-link-c, check-ada, check-pascal,
373230237Sbapt	check-test): Omit option -p.
374230237Sbapt	* tests/c-parse.exp: Regenerated.
375230237Sbapt	* tests/chill.exp: Regenerated.
376230237Sbapt	* tests/cplusplus.exp: Regenerated.
377230237Sbapt	* tests/gpc.exp: Regenerated.
378230237Sbapt	* tests/java.exp: Regenerated.
379230237Sbapt	* tests/objc.exp: Regenerated.
380230237Sbapt	* tests/test-4.exp: Regenerated.
381230237Sbapt
382230237Sbapt	* src/output.cc (Output::output_lookup_function_body): Omit the
383230237Sbapt	multicompare code section and its variables when it is not used.
384230237Sbapt	* tests/chill.exp: Regenerated.
385230237Sbapt
386230237Sbapt	* src/output.c (Output_Compare::output_firstchar_comparison): New
387230237Sbapt	method.
388230237Sbapt	(Output_Compare_Strcmp::output_comparison,
389230237Sbapt	Output_Compare_Strncmp::output_comparison,
390230237Sbapt	Output_Compare_Memcmp::output_comparison): Use it.
391230237Sbapt	* tests/permutc2.exp: Update.
392230237Sbapt
393230237Sbapt	* tests/smtp.gperf: New file, based on a contribution by Bruce Lilly.
394230237Sbapt	* tests/Makefile.in (check-smtp): New rule.
395230237Sbapt	(check): Depend on it.
396230237Sbapt	(clean): Update.
397230237Sbapt
398230237Sbapt2002-12-12  Bruno Haible  <bruno@clisp.org>
399230237Sbapt
400230237Sbapt	* src/search.h (Search::init_selchars_tuple,
401230237Sbapt	Search::count_duplicates_tuple): Add alpha_unify argument.
402230237Sbapt	(Search::count_duplicates_tuple): New method declaration.
403230237Sbapt	* src/search.cc (Search::init_selchars_tuple,
404230237Sbapt	Search::count_duplicates_tuple): Add alpha_unify argument.
405230237Sbapt	(Search::find_positions): Update.
406230237Sbapt	(Search::count_duplicates_tuple): New method.
407230237Sbapt	(Search::count_duplicates_multiset): Free temp alpha_unify vector.
408230237Sbapt	(Search::find_alpha_inc): Call count_duplicates_tuple.
409230237Sbapt
410230237Sbapt	* src/configure.in: Add test for stack-allocated variable-size arrays.
411230237Sbapt	* src/config.h.in: Regenerated.
412230237Sbapt	* src/search.cc: Include config.h.
413230237Sbapt	(DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros.
414230237Sbapt	(Search::find_alpha_inc, Search::count_possible_collisions,
415230237Sbapt	Search::find_asso_values): Use them.
416230237Sbapt	* src/Makefile.in (search.o): Depend on config.h.
417230237Sbapt
418230237Sbapt	* src/search.h (Search::keyword_list_length, Search::max_key_length,
419230237Sbapt	Search::get_max_keysig_size, Search::prepare): Remove declarations.
420230237Sbapt	(Search::prepare): Renamed from Search::preprepare.
421230237Sbapt	(Search::_max_selchars_length): New field.
422230237Sbapt	* src/search.cc (Search::prepare): Renamed from Search::preprepare.
423230237Sbapt	(Search::prepare_asso_values): Merged with old Search::prepare.
424230237Sbapt	Initialize _max_selchars_length.
425230237Sbapt	(Search::keyword_list_length): Remove function. Use _list_len instead.
426230237Sbapt	(Search::max_key_length): Remove function. Use _max_key_len instead.
427230237Sbapt	(Search::get_max_keysig_size): Remove function. Use
428230237Sbapt	_max_selchars_length instead.
429230237Sbapt	(Search::count_possible_collisions, Search::find_asso_values): Update.
430230237Sbapt	(Search::find_good_asso_values): Call just prepare_asso_values.
431230237Sbapt	(Search::~Search): Update.
432230237Sbapt
433230237Sbapt	* src/output.h (Output::output_asso_values_ref): New declaration.
434230237Sbapt	* src/output.cc (char_to_index): Remove variable.
435230237Sbapt	(Output::output_asso_values_ref): New function.
436230237Sbapt	(Output::output_hash_function): Use it.
437230237Sbapt	(Output::output): Update.
438230237Sbapt
439230237Sbapt	* src/positions.h (Positions::is_useall, Positions::set_useall,
440230237Sbapt	Positions::iterator, Positions::reviterator): New method declarations.
441230237Sbapt	(Positions::_useall): New field.
442230237Sbapt	(PositionIterator): Make constructor private. Add a constructor and a
443230237Sbapt	copy constructor.
444230237Sbapt	(PositionIterator::remaining): New declaration.
445230237Sbapt	(PositionReverseIterator): Make constructor private. Add a constructor
446230237Sbapt	and a copy constructor.
447230237Sbapt	(PositionReverseIterator::remaining): New declaration.
448230237Sbapt	(PositionReverseIterator::_minindex): New field.
449230237Sbapt	* src/positions.icc (Positions::Positions): Initialize _useall.
450230237Sbapt	(Positions::operator=): Likewise.
451230237Sbapt	(Positions::is_useall, Positions::set_useall): New methods.
452230237Sbapt	(Positions::sort): Do nothing if _useall is set.
453230237Sbapt	(Positions::iterator, Positions::reviterator): New methods.
454230237Sbapt	(PositionIterator::PositionIterator): New constructor.
455230237Sbapt	(PositionIterator::remaining): New method.
456230237Sbapt	(PositionReverseIterator::PositionReverseIterator): New constructor.
457230237Sbapt	(PositionReverseIterator::next): Use _minindex as bound.
458230237Sbapt	(PositionReverseIterator::remaining): New method.
459230237Sbapt	* src/positions.cc (Positions::add, Positions::remove): Reset the
460230237Sbapt	useall flag.
461230237Sbapt	(Positions::print): Handle the useall case.
462230237Sbapt	* src/options.h (ALLCHARS): Remove.
463230237Sbapt	* src/options.cc (Options::~Options): Update.
464230237Sbapt	(Options::parse_options): Use Positions::set_useall().
465230237Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple,
466230237Sbapt	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
467230237Sbapt	Remove use_all_chars argument.
468230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars
469230237Sbapt	argument. Tell the position iterator to stop at _allchars_length.
470230237Sbapt	Remove special case code for -k'*'.
471230237Sbapt	(KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset):
472230237Sbapt	Remove use_all_chars argument.
473230237Sbapt	* src/search.h (Search::init_selchars_tuple): Remove use_all_chars
474230237Sbapt	argument.
475230237Sbapt	(Search::init_selchars_multiset): Likewise.
476230237Sbapt	* src/search.cc (Search::init_selchars_tuple): Remove use_all_chars
477230237Sbapt	argument.
478230237Sbapt	(Search::count_duplicates_tuple, Search::find_positions): Update.
479230237Sbapt	(Search::compute_alpha_unify): Remove special case code for -k'*'.
480230237Sbapt	(Search::init_selchars_multiset): Remove use_all_chars argument.
481230237Sbapt	(Search::count_duplicates_multiset): Update.
482230237Sbapt	(Search::find_alpha_inc): Remove special case code for -k'*'.
483230237Sbapt	(Search::prepare): Update.
484230237Sbapt	(Search::get_max_keysig_size): Update.
485230237Sbapt	* src/output.cc (Output::output_hash_function): Remove special case
486230237Sbapt	code for -k'*'.
487230237Sbapt	* tests/chill.exp: Regenerated.
488230237Sbapt
489230237Sbapt2002-12-11  Bruno Haible  <bruno@clisp.org>
490230237Sbapt
491230237Sbapt	Change the positions to be 0-based, instead of 1-based.
492230237Sbapt	* src/positions.h (Positions::LASTCHAR): Set to -1.
493230237Sbapt	(Positions::MAX_SIZE): New constant.
494230237Sbapt	(Positions::pointer): Change return type.
495230237Sbapt	(Positions::_positions): Change element type.
496230237Sbapt	(PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2.
497230237Sbapt	* src/positions.icc (Positions::pointer): Change return type.
498230237Sbapt	(Positions::sort): Update.
499230237Sbapt	* src/positions.cc (Positions::contains, Positions::add,
500230237Sbapt	Positions::remove): Update.
501230237Sbapt	(Positions::print): Update. Fix off-by-one bug.
502230237Sbapt	* src/options.cc (Options::~Options): Update.
503230237Sbapt	(Options::parse_options): Set BAD_VALUE to -3. Update.
504230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Update.
505230237Sbapt	* src/search.cc (Search::find_positions, Search::compute_alpha_unify,
506230237Sbapt	Search::find_alpha_inc): Update.
507230237Sbapt	* src/output.cc (Output::output_hash_function): Update. Don't emit
508230237Sbapt	a 'case' statement right after 'default:'.
509230237Sbapt	* tests/c-parse.exp: Regenerated.
510230237Sbapt	* tests/charsets.exp: Regenerated.
511230237Sbapt	* tests/cplusplus.exp: Regenerated.
512230237Sbapt	* tests/java.exp: Regenerated.
513230237Sbapt	* tests/languages.exp: Regenerated.
514230237Sbapt	* tests/modula2.exp: Regenerated.
515230237Sbapt	* tests/objc.exp: Regenerated.
516230237Sbapt
517230237Sbapt2002-12-10  Bruno Haible  <bruno@clisp.org>
518230237Sbapt
519230237Sbapt	* src/options.h: Reorder enum values.
520230237Sbapt	(Options::short_usage, Options::long_usage): Make static.
521230237Sbapt	* src/options.cc (Options::short_usage); No longer print a monster
522230237Sbapt	usage line.
523230237Sbapt	(Options::print_options): Improve output of options like
524230237Sbapt	--key-positions=1,2,$.
525230237Sbapt	(Options::~Options): Update.
526230237Sbapt
527230237Sbapt	* src/options.h (UPPERLOWER): New enum value.
528230237Sbapt	* src/options.cc (Options::long_usage): Document option --ignore-case.
529230237Sbapt	(Options::~Options): Update.
530230237Sbapt	(long_options): Add option --ignore-case.
531230237Sbapt	(Options::parse_options): Handle option --ignore-case.
532230237Sbapt	* src/input.cc (Input::read_input): Recognize option %ignore-case.
533230237Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple,
534230237Sbapt	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
535230237Sbapt	Add alpha_unify argument.
536230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify
537230237Sbapt	argument.
538230237Sbapt	(KeywordExt::init_selchars_tuple): Add alpha_unify argument.
539230237Sbapt	(KeywordExt::init_selchars_multiset): Add alpha_unify argument.
540230237Sbapt	* src/search.h (Search::compute_alpha_size,
541230237Sbapt	Search::compute_alpha_unify): New declarations.
542230237Sbapt	(Search::init_selchars_multiset): Add alpha_unify argument.
543230237Sbapt	(Search::_alpha_unify): New field.
544230237Sbapt	* src/search.cc (Search::compute_alpha_size,
545230237Sbapt	Search::compute_alpha_unify): New functions.
546230237Sbapt	(Search::init_selchars_tuple): Update.
547230237Sbapt	(Search::find_positions): Temporarily set _alpha_unify. Perform a
548230237Sbapt	case insensitive comparison if needed.
549230237Sbapt	(Search::init_selchars_multiset): Add alpha_unify argument.
550230237Sbapt	(Search::count_duplicates_multiset): Call compute_alpha_unify.
551230237Sbapt	(Search::find_alpha_inc): Temporarily set _alpha_unify. At the end,
552230237Sbapt	set _alpha_size and _alpha_unify.
553230237Sbapt	(Search::prepare): Update. Don't compute _alpga_size here.
554230237Sbapt	(Search::optimize): Propagate unified asso_values.
555230237Sbapt	(Search::~Search) Delete _alpha_unify.
556230237Sbapt	* src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp,
557230237Sbapt	output_upperlower_memcmp): New functions.
558230237Sbapt	(Output_Compare_Strcmp::output_comparison,
559230237Sbapt	Output_Compare_Strncmp::output_comparison,
560230237Sbapt	Output_Compare_Memcmp::output_comparison): Use the case-insensitive
561230237Sbapt	comparison function if --ignore-case was given.
562230237Sbapt	(Output::output): Emit the auxiliary case-insensitive comparison
563230237Sbapt	function if needed.
564230237Sbapt	* tests/permutc2.gperf, tests/permutc2.exp: New files.
565230237Sbapt	* tests/Makefile.in (check-test): Also check permutc2.gperf.
566230237Sbapt	* tests/test-6.exp: Update.
567230237Sbapt	* doc/gperf.texi (Gperf Declarations): Document %ignore-case.
568230237Sbapt	(Input Details): Document option --ignore-case.
569230237Sbapt	* NEWS: Update.
570230237Sbapt
571230237Sbapt	* src/search.cc (Search::optimize): Fill unused asso_values[] entries
572230237Sbapt	with a large value.
573230237Sbapt	* src/output.h (Output::Output): Remove occurrences argument.
574230237Sbapt	(Output::_occurrences): Remove field.
575230237Sbapt	* src/output.cc (Output::Output): Remove occurrences argument.
576230237Sbapt	(Output::output_hash_function): Ignore _occurrences.
577230237Sbapt	* src/main.cc (main): Don't pass the _occurrences to Output.
578230237Sbapt
579230237Sbapt	* src/search.cc (Search::preprepare): Exit if keywords contain
580230237Sbapt	out-of-range characters.
581230237Sbapt
582230237Sbapt	* src/search.cc (for): Define so as to avoid errors with old compilers.
583230237Sbapt
584230237Sbapt	* src/options.h (SHAREDLIB): New enum value.
585230237Sbapt	* src/options.cc (Options::short_usage): Mention option -P.
586230237Sbapt	(Options::long_usage): Document option -P.
587230237Sbapt	(long_options): Add option --pic.
588230237Sbapt	(Options::parse_options): Handle option -P/--pic.
589230237Sbapt	* src/output.cc (output_keyword_blank_entries): When SHAREDLIB is
590230237Sbapt	specified, emit NULL pointers instead of "".
591230237Sbapt	(Output::output_lookup_function_body): When SHAREDLIB is specified
592230237Sbapt	and SWITCH and DUP and not specified, test the table entry against
593230237Sbapt	NULL before the string comparison.
594230237Sbapt	* tests/test-6.exp: Update.
595230237Sbapt	* doc/gperf.texi (Output Details): Document option -P.
596230237Sbapt	* NEWS: Update.
597230237Sbapt	Suggested by Ulrich Drepper.
598230237Sbapt
599230237Sbapt2002-12-08  Bruno Haible  <bruno@clisp.org>
600230237Sbapt
601230237Sbapt	* tests/permut2.gperf, tests/permut2.exp: New files.
602230237Sbapt	* tests/permut3.gperf, tests/permut3.exp: New files.
603230237Sbapt	* tests/charsets.gperf: New file, from Bruce Lilly.
604230237Sbapt	* tests/charsets.exp: New file.
605230237Sbapt	* tests/languages.gperf: New file, from Bruce Lilly.
606230237Sbapt	* tests/languages.exp: New file.
607230237Sbapt	* Makefile.in (check-test): Test them all.
608230237Sbapt
609230237Sbapt	Completely new asso_values search algorithm.
610230237Sbapt	* src/search.h (Search::compute_occurrence, Search::clear_determined,
611230237Sbapt	Search::set_determined, Search::already_determined, Search::reorder):
612230237Sbapt	Remove functions.
613230237Sbapt	(Search::init_asso_values, Search::sort_by_occurrence,
614230237Sbapt	Search::compute_occurrence, Search::sort_by_occurrence,
615230237Sbapt	Search::has_collisions, Search::collision_prior_to): Remove functions.
616230237Sbapt	(Search::compute_partition, Search::count_possible_collisions,
617230237Sbapt	Search::unchanged_partition): New method declarations.
618230237Sbapt	(Search::_determined): Remove field.
619230237Sbapt	* src/search.cc (Search::prepare): Don't initialize _determined.
620230237Sbapt	(Search::compute_occurrence, greater_by_occurrence,
621230237Sbapt	Search::clear_determined, Search::set_determined,
622230237Sbapt	Search::already_determined, Search::reorder): Remove functions.
623230237Sbapt	(Search::init_asso_values, compute_disjoint_union,
624230237Sbapt	Search::sort_by_occurrence, Search::compute_occurrence,
625230237Sbapt	Search::sort_by_occurrence, Search::has_collisions,
626230237Sbapt	Search::collision_prior_to): Remove functions.
627230237Sbapt	(StackEntry): Remove class.
628230237Sbapt	(EquivalenceClass, Step): New classes.
629230237Sbapt	(equals, Search::compute_partition, delete_partition,
630230237Sbapt	Search::count_possible_collisions, Search::unchanged_partition): New
631230237Sbapt	functions.
632230237Sbapt	(Search::find_asso_values): Completely rewritten.
633230237Sbapt	(Search::find_good_asso_values): Don't call reorder().
634230237Sbapt	(Search::~Search): Don't free _determined.
635230237Sbapt	* src/keyword.h (KeywordExt::_occurrence): Remove field.
636230237Sbapt	* src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values.
637230237Sbapt	(Options::_iterations): Remove field.
638230237Sbapt	* src/options.icc (Options::get_iterations): Remove method.
639230237Sbapt	* src/options.cc (Options::long_usage): Remove mention of -f and -o.
640230237Sbapt	(Options::Options): Don't initialize _iterations.
641230237Sbapt	(Options::~Options): Update.
642230237Sbapt	(Options::parse_options): Do nothing for options -f, -o, -O.
643230237Sbapt	* doc/gperf.texi: (Contributors): Update.
644230237Sbapt	(Algorithmic Details): Remove options -f and -o. Update description
645230237Sbapt	of option -s.
646230237Sbapt	* tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp,
647230237Sbapt	tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp,
648230237Sbapt	tests/test-4.exp): Regenerated, smaller than before.
649230237Sbapt	* tests/test-6.exp: Update.
650230237Sbapt	* NEWS: Update.
651230237Sbapt
652230237Sbapt2002-12-08  Bruno Haible  <bruno@clisp.org>
653230237Sbapt
654230237Sbapt	* src/search.h (Search::_alpha_size): Change type to 'unsigned int'.
655230237Sbapt	(Search::_asso_value_max): Likewise.
656230237Sbapt	* src/search.cc (Search::prepare_asso_values): Update.
657230237Sbapt	(Search::init_asso_values): Update.
658230237Sbapt	(Search::~Search): Update.
659230237Sbapt	* src/output.h (Output::Output): Change alpha_size type to
660230237Sbapt	'unsigned int'.
661230237Sbapt	(Output::_alpha_size): Change type to 'unsigned int'.
662230237Sbapt	* src/output.cc (Output::Output): Change alpha_size type to
663230237Sbapt	'unsigned int'.
664230237Sbapt	(Output::output_hash_function): Update.
665230237Sbapt
666230237Sbapt2002-12-07  Bruno Haible  <bruno@clisp.org>
667230237Sbapt
668230237Sbapt	* src/options.h (OPT_CHOICE): New enum value.
669230237Sbapt	* src/options.cc (Options::~Options): Update.
670230237Sbapt	(long_options): New option --optimized-collision-resolution.
671230237Sbapt	(Options::parse_options): Accept option -O.
672230237Sbapt	* src/search.h (Search::sort_by_occurrence): Change argument to
673230237Sbapt	'unsigned int'.
674230237Sbapt	(Search::compute_occurrence, Search::sort_by_occurrence): New method
675230237Sbapt	declarations.
676230237Sbapt	* src/search.cc (Search::sort_by_occurrence): Change argument to
677230237Sbapt	'unsigned int'.
678230237Sbapt	(Search::compute_occurrence, Search::sort_by_occurrence): New methods.
679230237Sbapt	(Search::find_asso_values): Implement OPT_CHOICE. More debugging
680230237Sbapt	output.
681230237Sbapt
682230237Sbapt	* src/search.cc (Search::prepare_asso_values) [DEBUG]: Also print
683230237Sbapt	the keyword list in order.
684230237Sbapt	(Search::find_asso_values) [DEBUG]: Upon failure, print the union_set.
685230237Sbapt
686230237Sbapt	* src/options.h (Options::get_size_multiple): Change return type to
687230237Sbapt	float.
688230237Sbapt	(Options::_size_multiple): Change type to float.
689230237Sbapt	* src/options.icc (Options::get_size_multiple): Change return type to
690230237Sbapt	float.
691230237Sbapt	* src/options.cc (Options::long_usage): Update description of option
692230237Sbapt	-s.
693230237Sbapt	(Options::~Options): Update.
694230237Sbapt	(Options::parse_options): For option -s, accept a fraction.
695230237Sbapt	* src/search.cc (Search::prepare_asso_values): Use get_size_multiple
696230237Sbapt	as it is.
697230237Sbapt	* tests/test-6.exp: Update.
698230237Sbapt	* doc/gperf.texi (Algorithmic Details): Update description of option
699230237Sbapt	-s.
700230237Sbapt
701230237Sbapt2002-12-04  Bruno Haible  <bruno@clisp.org>
702230237Sbapt
703230237Sbapt	Improve debugging output.
704230237Sbapt	* src/hash-table.h (Hash_Table::dump): New method.
705230237Sbapt	* src/hash-table.cc (Hash_Table::dump): New method, extracted from
706230237Sbapt	destructor.
707230237Sbapt	(Hash_Table::~Hash_Table): No longer print the contents.
708230237Sbapt	* src/positions.h (PositionReverseIterator): New class.
709230237Sbapt	* src/positions.icc (PositionReverseIterator::PositionReverseIterator,
710230237Sbapt	PositionReverseIterator::next): New methods.
711230237Sbapt	* src/search.cc (Search::find_positions): If debugging, print the
712230237Sbapt	result.
713230237Sbapt	(Search::find_alpha_inc): If debugging, print the result.
714230237Sbapt	(Search::prepare): Explicitly dump the hash table's contents here.
715230237Sbapt
716230237Sbapt	Portability fixes.
717230237Sbapt	* src/positions.h (Positions::LASTCHAR, Positions::MAX_KEY_POS,
718230237Sbapt	PositionIterator::EOS): Define as compile-time constants using enum.
719230237Sbapt	* src/bool-array.cc (Bool_Array::~Bool_Array): Remove const qualifier
720230237Sbapt	of pointer to be deleted.
721230237Sbapt	* src/input.cc (Input::~Input): Likewise.
722230237Sbapt	* src/keyword.cc (KeywordExt::delete_selchars): Likewise.
723230237Sbapt	* src/main.cc (main): Likewise.
724230237Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Limit scope of 'for'
725230237Sbapt	variables.
726230237Sbapt	* src/search.cc (Search::prepare_asso_values): Use a static_cast to
727230237Sbapt	convert from time_t to long. This is possible because ISO C 99 says
728230237Sbapt	time_t is a numeric type.
729230237Sbapt
730230237Sbapt2002-11-20  Bruno Haible  <bruno@clisp.org>
731230237Sbapt
732230237Sbapt	* src/search.cc (Search::find_asso_values): Avoid gcc warnings about
733230237Sbapt	uninitialized variables.
734230237Sbapt
735230237Sbapt	Implement backtracking.
736230237Sbapt	* src/search.h (Search::has_collisions): Renamed from
737230237Sbapt	Search::less_collisions. Return a boolean.
738230237Sbapt	* src/search.cc (Search::has_collisions): Renamed from
739230237Sbapt	Search::less_collisions. Return a boolean.
740230237Sbapt	(StackEntry): Remove field _collisions_so_far.
741230237Sbapt	(Search::find_asso_values): Backtrack when encountering an unresolved
742230237Sbapt	collision. Assume collisions_so_far is always zero.
743230237Sbapt	(Search::optimize): Exit if there are accidental duplicates at the end.
744230237Sbapt	* src/output.cc (Output::num_hash_values): Simply return the list
745230237Sbapt	length.
746230237Sbapt	(Output::output_keylength_table): Remove handling of accidental
747230237Sbapt	duplicates.
748230237Sbapt	(Output::output_keyword_table, Output::output_lookup_array): Likewise.
749230237Sbapt	(output_switch_case, output_switches): Likewise.
750230237Sbapt	* doc/gperf.texi (Algorithmic Details): Adjust description of options
751230237Sbapt	-D, -f, -o, -r.
752230237Sbapt	(Bugs): Remove note about missing backtracking.
753230237Sbapt	(Projects): Likewise.
754230237Sbapt
755230237Sbapt2002-11-19  Bruno Haible  <bruno@clisp.org>
756230237Sbapt
757230237Sbapt	Prepare for backtracking.
758230237Sbapt	* src/search.h (Search::try_asso_value, Search::change_some_asso_value):
759230237Sbapt	Remove declarations.
760230237Sbapt	(Search::less_collisions, Search::collision_prior_to): New declarations.
761230237Sbapt	(Search::_fewest_collisions, Search::_union_set, Search::_num_done):
762230237Sbapt	Remove fields.
763230237Sbapt	* src/search.cc (Search::prepare_asso_values): Don't initialize
764230237Sbapt	_union_set.
765230237Sbapt	(Search::try_asso_value, Search::change_some_asso_value): Remove
766230237Sbapt	methods.
767230237Sbapt	(Search::less_collisions, Search::collision_prior_to): New methods.
768230237Sbapt	(StackEntry): New class.
769230237Sbapt	(Search::find_asso_values): Reorganized to use pseudo-recursion.
770230237Sbapt	(Search::~Search): Don't free _union_set.
771230237Sbapt
772230237Sbapt	* src/search.h (Search::find_good_asso_values): New declaration.
773230237Sbapt	* src/search.cc: Add comments about the basic structure of the
774230237Sbapt	algorithm.
775230237Sbapt	(Search::find_positions): Move the option[POSITIONS] test to here.
776230237Sbapt	(Search::find_good_asso_values): New method, extracted from
777230237Sbapt	Search::optimize.
778230237Sbapt	(Search::optimize): Remove option[POSITIONS] test. Call
779230237Sbapt	find_good_asso_values.
780230237Sbapt
781230237Sbapt2002-11-17  Bruno Haible  <bruno@clisp.org>
782230237Sbapt
783230237Sbapt	* src/options.cc (Options::parse_options): Include copyright notice
784230237Sbapt	and authors in --version output.
785230237Sbapt
786230237Sbapt	Avoid artificial duplicates.
787230237Sbapt	* src/keyword.h (KeywordExt::init_selchars_tuple): New declaration.
788230237Sbapt	(KeywordExt::init_selchars_multiset): Renamed from
789230237Sbapt	KeywordExt::init_selchars.
790230237Sbapt	(KeywordExt::init_selchars_low): New declaration.
791230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars_low): Renamed from
792230237Sbapt	KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting.
793230237Sbapt	(KeywordExt::init_selchars_tuple): New method.
794230237Sbapt	(KeywordExt::init_selchars_multiset): New method, replaces
795230237Sbapt	KeywordExt::init_selchars.
796230237Sbapt	* src/search.h (Search::init_selchars_tuple): Renamed from
797230237Sbapt	Search::init_selchars.
798230237Sbapt	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
799230237Sbapt	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
800230237Sbapt	Search::find_alpha_inc): New declarations.
801230237Sbapt	(Search::_alpha_inc): New field.
802230237Sbapt	(Search::_alpha_size, Search::_occurrences, Search::_asso_values,
803230237Sbapt	Search::_determined): Make non-const.
804230237Sbapt	* src/search.cc (Search::Search): Don't initialize _key_positions,
805230237Sbapt	_alpha_size, _occurrences, _asso_values, _determined here.
806230237Sbapt	(Search::init_selchars_tuple): Renamed from Search::init_selchars.
807230237Sbapt	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
808230237Sbapt	(Search::find_positions): Update.
809230237Sbapt	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
810230237Sbapt	Search::find_alpha_inc): New methods.
811230237Sbapt	(Search::prepare): Move preprepare, find_positions calls away.
812230237Sbapt	Initialize _alpha_size, _occurrences, _asso_values, _determined here.
813230237Sbapt	(Search::optimize): Call preprepare, find_positions here. Initialize
814230237Sbapt	_key_positions here.
815230237Sbapt	(Search::~Search): Deallocate _alpha_inc.
816230237Sbapt	* src/output.cc (Output::Output): Add alpha_inc argument.
817230237Sbapt	(Output::output_hash_function): Use _alpha_inc.
818230237Sbapt	* src/output.h (Output::Output): Add alpha_inc argument.
819230237Sbapt	(Output::_alpha_inc): New field.
820230237Sbapt	* src/main.cc (main): Pass _alpha_inc from Search to Output.
821230237Sbapt	* tests/chill.exp: Update.
822230237Sbapt	* doc/gperf.texi (Algorithmic Details): Remove description of
823230237Sbapt	artificial duplicates.
824230237Sbapt
825230237Sbapt	* src/keyword.h (KeywordExt::_selchars): Change type to
826230237Sbapt	'const unsigned int *'.
827230237Sbapt	* src/keyword.cc (sort_char_set): Change argument type to
828230237Sbapt	'unsigned int *'.
829230237Sbapt	(KeywordExt::init_selchars): Update.
830230237Sbapt	* src/search.h (Search::sort_by_occurrence): Change argument type to
831230237Sbapt	'unsigned int *'.
832230237Sbapt	(Search::try_asso_value): Change argument type to 'unsigned int'.
833230237Sbapt	(Search::_union_set): Change type to 'unsigned int *'.
834230237Sbapt	* src/search.cc (Search::prepare, Search::compute_occurrence,
835230237Sbapt	Search::set_determined, Search::already_determined,
836230237Sbapt	Search::prepare_asso_values, Search::compute_hash): Update.
837230237Sbapt	(compute_disjoint_union): Change argument types to 'unsigned int *'.
838230237Sbapt	(Search::sort_by_occurrence): Likewise.
839230237Sbapt	(Search::try_asso_value): Change argument type to 'unsigned int'.
840230237Sbapt	(Search::change_some_asso_value, Search::~Search): Update.
841230237Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table, Hash_Table::equal,
842230237Sbapt	Hash_Table::insert): Update.
843230237Sbapt
844230237Sbapt	* src/positions.h: New file, extracted from options.h.
845230237Sbapt	* src/positions.icc: New file, extracted from options.icc.
846230237Sbapt	* src/positions.cc: New file, extracted from options.cc.
847230237Sbapt	* src/options.h: Include positions.h. Move classes Positions and
848230237Sbapt	PositionsIterator away.
849230237Sbapt	* src/options.icc: Move classes Positions and PositionsIterator away.
850230237Sbapt	* src/options.cc: Move class Positions away.
851230237Sbapt	* src/keyword.cc: Include positions.h instead of options.h.
852230237Sbapt	* src/output.h: Include positions.h instead of options.h.
853230237Sbapt	* src/search.h: Include positions.h instead of options.h.
854230237Sbapt	* src/Makefile.in (OBJECTS): Add positions.o.
855230237Sbapt	(POSITIONS_H): New variable.
856230237Sbapt	(OPTIONS_H, SEARCH_H, OUTPUT_H, keyword.o): Use it.
857230237Sbapt	(positions.o): New rule.
858230237Sbapt
859230237Sbapt	* src/options.h (POSITIONS): New enum value.
860230237Sbapt	(Positions::Positions): New copy constructor.
861230237Sbapt	(Positions::operator=, Positions::contains, Position::add,
862230237Sbapt	Positions::remove, Positions::print): New method declaration.
863230237Sbapt	(Options::get_max_keysig_size): Remove method.
864230237Sbapt	* src/options.icc (Positions::Positions): New copy constructor.
865230237Sbapt	(Positions::operator=): New method.
866230237Sbapt	(Options::get_max_keysig_size): Remove method.
867230237Sbapt	* src/options.cc (Options::Options): Initialize _key_positions
868230237Sbapt	trivially.
869230237Sbapt	(Options::parse_options): Option -k sets POSITIONS.
870230237Sbapt	(Positions::contains, Positions::add, Positions::remove,
871230237Sbapt	Positions::print): New methods.
872230237Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
873230237Sbapt	width explicitly, instead of using Options::get_max_keysig_size.
874230237Sbapt	* src/keyword.h (KeywordExt::init_selchars): Add arguments
875230237Sbapt	use_all_chars, positions.
876230237Sbapt	(KeywordExt::delete_selchars): New declaration.
877230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Add arguments
878230237Sbapt	use_all_chars, positions. Remove error message if there are no key
879230237Sbapt	positions.
880230237Sbapt	(KeywordExt::delete_selchars): New method.
881230237Sbapt	* src/search.h: Include options.h.
882230237Sbapt	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
883230237Sbapt	Search::count_duplicates, Search::find_positions): New declarations.
884230237Sbapt	(Search::_key_positions): New field.
885230237Sbapt	* src/search.cc (Search::Search): Initialize _key_positions.
886230237Sbapt	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
887230237Sbapt	Search::count_duplicates, Search::find_positions): New functions.
888230237Sbapt	(Search::prepare): Call preprepare and find_positions. Tweak error
889230237Sbapt	message.
890230237Sbapt	(Search::get_max_keysig_size): Use _key_positions instead of
891230237Sbapt	option.get_key_positions().
892230237Sbapt	(Search::optimize): Tweak error message.
893230237Sbapt	* src/output.h: Include options.h.
894230237Sbapt	(Output::Output): Add Positions argument.
895230237Sbapt	(Output::_key_positions): New field.
896230237Sbapt	* src/output.cc (Output::Output): Add Positions argument.
897230237Sbapt	(Output::output_hash_function): Omit the table if there are no
898230237Sbapt	positions at all. Use _key_positions instead of
899230237Sbapt	option.get_key_positions().
900230237Sbapt	(Output::output): Output the computed positions as a comment.
901230237Sbapt	* src/main.cc (main): Pass the Positions from Searcher to Output.
902230237Sbapt	* src/Makefile.in (SEARCH_H, OUTPUT_H): Include OPTIONS_H.
903230237Sbapt	* tests/Makefile.in (check-test): Pass key positions explicitly.
904230237Sbapt	* tests/gpc.exp: Update.
905230237Sbapt	* tests/test-4.exp: Update.
906230237Sbapt	* doc/gperf.texi (Algorithmic Details): Mention that -k is not needed
907230237Sbapt	usually.
908230237Sbapt
909230237Sbapt2002-11-16  Bruno Haible  <bruno@clisp.org>
910230237Sbapt
911230237Sbapt	* src/options.h (Options::get_slot_name): Renamed from
912230237Sbapt	Options::get_key_name.
913230237Sbapt	(Options::set, Options::set_language, Options::set_total_switches,
914230237Sbapt	Options::set_function_name, Options::set_slot_name,
915230237Sbapt	Options::set_class_name, Options::set_hash_name,
916230237Sbapt	Options::set_wordlist_name, Options::set_delimiters): New method
917230237Sbapt	declarations.
918230237Sbapt	(Options::_language): New field.
919230237Sbapt	(Options::_slot_name): Renamed from Options::_key_name.
920230237Sbapt	* src/options.icc (Options::set): New method.
921230237Sbapt	(Options::get_slot_name): Renamed from Options::get_key_name.
922230237Sbapt	* src/options.cc (DEFAULT_FUNCTION_NAME): Renamed from DEFAULT_NAME.
923230237Sbapt	(DEFAULT_SLOT_NAME): Renamed from DEFAULT_NAME.
924230237Sbapt	(Options::Options): Initialize _language. Update.
925230237Sbapt	(Options::~Options): Update.
926230237Sbapt	(Options::set_language, Options::set_total_switches,
927230237Sbapt	Options::set_function_name, Options::set_slot_name,
928230237Sbapt	Options::set_class_name, Options::set_hash_name,
929230237Sbapt	Options::set_wordlist_name, Options::set_delimiters): New methods.
930230237Sbapt	(Options::parse_options): Call set_language. Update.
931230237Sbapt	* src/input.cc (is_declaration, is_declaration_with_arg,
932230237Sbapt	is_define_declaration): New functions.
933230237Sbapt	(Input::read_input): Accept %DECL declarations.
934230237Sbapt	* src/output.cc (Output::output_lookup_function_body): Update.
935230237Sbapt	* doc/gperf.texi (Declarations): Add new subnodes.
936230237Sbapt	(User-supplied Struct, Gperf Declarations, C Code Inclusion): New
937230237Sbapt	nodes.
938230237Sbapt	(Keywords, Output Format, Binary Strings, Options): Mention %
939230237Sbapt	declarations as being equivalent to the command line options.
940230237Sbapt
941230237Sbapt	* src/options.cc (Options::long_usage): Rename options -H, -N, -l, -G.
942230237Sbapt	(long_options): Add --hash-function-name, --lookup-function-name,
943230237Sbapt	--compare-lengths.
944230237Sbapt	* doc/gperf.texi (Output Details): Rename options -H, -N, -l, -G.
945230237Sbapt	* tests/test-6.exp: Update.
946230237Sbapt
947230237Sbapt	* src/options.cc (DEFAULT_DELIMITERS): Remove newline.
948230237Sbapt	* src/options.cc (Options::long_usage): Change default --delimiters.
949230237Sbapt	* doc/gperf.texi (Input Details): Likewise.
950230237Sbapt	* tests/test-6.exp: Update.
951230237Sbapt
952230237Sbapt	* doc/gperf.texi: Move description of option -l from section
953230237Sbapt	Algorithmic Details to section Output Details.
954230237Sbapt	* src/options.cc (Options::long_usage): Likewise.
955230237Sbapt	* tests/test-6.exp: Update.
956230237Sbapt
957230237Sbapt2002-11-12  Bruno Haible  <bruno@clisp.org>
958230237Sbapt
959230237Sbapt	* src/options.h (Output::get_output_file_name): New method.
960230237Sbapt	(Output::_output_file_name): New field.
961230237Sbapt	* src/options.icc (Options::get_output_file_name): New method.
962230237Sbapt	* src/options.cc (Options::long_usage): Document option --output-file.
963230237Sbapt	(Options::Options): Initialize _output_file_name.
964230237Sbapt	(long_options): Add --output-file.
965230237Sbapt	(Options::parse_options): Handle it.
966230237Sbapt	* src/main.cc (main): Open the output file if given by name.
967230237Sbapt	* doc/gperf.texi (Output File): New section.
968230237Sbapt	* tests/test-6.exp: Update.
969230237Sbapt
970230237Sbapt2002-11-10  Bruno Haible  <bruno@clisp.org>
971230237Sbapt
972230237Sbapt	* src/input.cc (pretty_input_file_name): New function.
973230237Sbapt	(read_input): Use it in all error and warning messages.
974230237Sbapt
975230237Sbapt	* src/keyword.h (Keyword::_lineno): New field.
976230237Sbapt	* src/input.h (Input::_struct_decl_lineno): New field.
977230237Sbapt	* src/input.cc (Input::read_input): Set _struct_decl_lineno. Fill
978230237Sbapt	each keyword's _lineno field.
979230237Sbapt	* src/main.cc (main): Pass _struct_decl_lineno from Input to Output.
980230237Sbapt	* src/output.h (Output::Output) Add struct_decl_lineno argument.
981230237Sbapt	(Output::_struct_decl_lineno): New field.
982230237Sbapt	* src/output.cc (Output::Output) Add struct_decl_lineno argument.
983230237Sbapt	(output_keyword_entry): Emit #line directive before table entry.
984230237Sbapt	(Output::output): Emit #line directive before _struct_decl.
985230237Sbapt
986230237Sbapt	Fix memory leaks.
987230237Sbapt	* src/keyword.h (empty_string): New declaration.
988230237Sbapt	* src/keyword.cc (empty_string): New variable.
989230237Sbapt	* src/input.h (Input::_input): Make public.
990230237Sbapt	(Input::_input_end): New field.
991230237Sbapt	* src/input.cc (read_input): When removing leading whitespace from
992230237Sbapt	struct_decl, reallocate it. For rest, use empty_string instead of "".
993230237Sbapt	Set _input_end.
994230237Sbapt	(Input::~Input): Delete _struct_decl, _struct_tag, _return_type.
995230237Sbapt	* src/search.cc (Search::prepare): When removing an element from
996230237Sbapt	the keyword list, delete the list node.
997230237Sbapt	(Search::~Search): Delete _occurrences, _asso_values.
998230237Sbapt	* src/main.cc (main): Between Search::~Search and Input::~Input,
999230237Sbapt	destroy the keyword list.
1000230237Sbapt
1001230237Sbapt	Rewrite the input routines.
1002230237Sbapt	* src/input.h: Don't include read-line.h.
1003230237Sbapt	(Input): Don't inherit from class Read_Line.
1004230237Sbapt	(Input::read_keys, Input::strcspn, Input::set_output_types,
1005230237Sbapt	Input::get_array_type, Input::save_include_src,
1006230237Sbapt	Input::get_special_input): Remove declarations.
1007230237Sbapt	(Input::read_input): New declaration.
1008230237Sbapt	(Input::_struct_decl): Renamed from Input::_array_type.
1009230237Sbapt	(Input::_verbatim_declarations): Renamed from Input::_include_src.
1010230237Sbapt	(Input::_verbatim_code): Replaces Input::_additional_code.
1011230237Sbapt	* src/input.cc: Completely rewritten.
1012230237Sbapt	* src/output.h (Output::Output): Update the verbatim_* arguments.
1013230237Sbapt	(Output::_struct_decl): Renamed from Output::_array_type.
1014230237Sbapt	(Output::_verbatim_declarations): Renamed from Output::_include_src.
1015230237Sbapt	(Output::_verbatim_code): Replaces Output::_additional_code.
1016230237Sbapt	* src/output.cc (Output::Output): Update the verbatim_* arguments.
1017230237Sbapt	(Output::output): Output the verbatim_* code pieces with #line.
1018230237Sbapt	* src/main.cc (main): Call Input::read_input instead of
1019230237Sbapt	Input::read_keys. Update Output::Output arguments.
1020230237Sbapt	* src/read-line.h: Remove file.
1021230237Sbapt	* src/read-line.cc, src/read-line.icc: Remove files.
1022230237Sbapt	* src/Makefile.in (OBJECTS): Remove read-line.o.
1023230237Sbapt	(READ_LINE_H): Remove variable.
1024230237Sbapt	(INPUT_H): Update.
1025230237Sbapt	(read-line.o): Remove rule.
1026230237Sbapt	* doc/gperf.texi (Declarations): Correct the example.
1027230237Sbapt	(Keywords): Mention that lines starting with % are forbidden here.
1028230237Sbapt	* tests/c-parse.exp: Update.
1029230237Sbapt	* tests/cplusplus.exp: Update.
1030230237Sbapt	* tests/gpc.exp: Update.
1031230237Sbapt	* tests/java.exp: Update.
1032230237Sbapt	* tests/objc.exp: Update.
1033230237Sbapt	* tests/test-4.exp: Update.
1034230237Sbapt
1035230237Sbapt	* src/options.h (Options::get_input_file_name): New declaration.
1036230237Sbapt	(Options::_input_file_name): New field.
1037230237Sbapt	* src/options.icc (Options::get_input_file_name): New method.
1038230237Sbapt	* src/options.cc (Options::Options): Initialize _input_file_name.
1039230237Sbapt	(Options::parse_options): Don't open input file, only store it in
1040230237Sbapt	_input_file_name.
1041230237Sbapt	* src/main.cc (main): Open input file here.
1042230237Sbapt	Print an error message upon write error on the output file.
1043230237Sbapt
1044230237Sbapt	Upgrade to autoconf-2.52.
1045230237Sbapt	* configure.in: Use AC_CONFIG_SUBDIRS instead of AC_OUTPUT_SUBDIRS.
1046230237Sbapt	* Makefile.devel (configure, lib/configure, src/configure,
1047230237Sbapt	tests/configure, doc/configure): Use autoconf-2.52.
1048230237Sbapt
1049230237Sbapt2002-11-09  Bruno Haible  <bruno@clisp.org>
1050230237Sbapt
1051230237Sbapt	* doc/gperf.texi: Talk about "bytes" instead of "characters". Talk
1052230237Sbapt	about "keywords", not "keys". Talk about "input file", not "keyfile".
1053230237Sbapt	(@menu): Fix a menu entry.
1054230237Sbapt	(Contributors): Don't mention cperf.
1055230237Sbapt	(Motivation): Fix an off-by-one error in the definition of "minimal".
1056230237Sbapt	Mention GNU Java. Recommend http URL instead of anonymous ftp.
1057230237Sbapt	(Search Structures): Mention GNU Java.
1058230237Sbapt	(Output Format): Drop reference to node 'Implementation'.
1059230237Sbapt	(Output Details): Talk about "slot-name" instead of "key name".
1060230237Sbapt	(Algorithmic Details): Talk about "selected byte positons", not
1061230237Sbapt	"key positions". Upper limit is now 255. Explain a third reason
1062230237Sbapt	why duplicates can occur. Describe negative effects of
1063230237Sbapt	--occurrence-sort.
1064230237Sbapt	(Implementation): Remove chapter.
1065230237Sbapt
1066230237Sbapt2002-11-07  Bruno Haible  <bruno@clisp.org>
1067230237Sbapt
1068230237Sbapt	* src/bool-array.cc (Bool_Array::~Bool_Array): Free _storage_array.
1069230237Sbapt	* src/search.cc (Search::~Search): Free _union_set, _determined.
1070230237Sbapt
1071230237Sbapt	* tests/Makefile.in (check-test): Don't redirect stderr.
1072230237Sbapt
1073230237Sbapt2002-11-05  Bruno Haible  <bruno@clisp.org>
1074230237Sbapt
1075230237Sbapt	* src/keyword-list.h (mergesort_list): New declarations.
1076230237Sbapt	* src/keyword-list.cc (Keyword_Comparison): New type.
1077230237Sbapt	(merge, mergesort_list): New functions, moved here from search.cc.
1078230237Sbapt	* src/search.h (Search::merge, Search::merge_sort): Remove methods.
1079230237Sbapt	(Search::_occurrence_sort, Search::_hash_sort): Remove fields.
1080230237Sbapt	* src/search.cc (Search::merge, Search::merge_sort): Remove methods.
1081230237Sbapt	(greater_by_occurrence, less_by_hash_value): New functions.
1082230237Sbapt	(Search::reorder, Search::sort): Use mergesort_list.
1083230237Sbapt
1084230237Sbapt2002-11-04  Bruno Haible  <bruno@clisp.org>
1085230237Sbapt
1086230237Sbapt	* src/options.h (Options::_asso_iterations): New field.
1087230237Sbapt	(Options::get_asso_iterations): New method declaration.
1088230237Sbapt	* src/options.icc (Options::get_asso_iterations): New method.
1089230237Sbapt	* src/options.cc (Options::short_usage): Mention j<jump> and m<num>.
1090230237Sbapt	(Options::long_usage): Document option -m.
1091230237Sbapt	(Options::Options): Initialize _asso_iterations.
1092230237Sbapt	(Options::~Options): Print _asso_iterations too.
1093230237Sbapt	(long_options): Add --multiple-iterations.
1094230237Sbapt	(Options::parse_options): Handle option -m.
1095230237Sbapt	* src/keyword-list.h (copy_list, delete_list): New declarations.
1096230237Sbapt	* src/keyword-list.cc (copy_list, delete_list): New functions.
1097230237Sbapt	* src/search.h (Search::_initial_asso_value, Search::_jump): New fields.
1098230237Sbapt	* src/search.cc (Search::prepare_asso_values): Initialize
1099230237Sbapt	_initial_asso_value and _jump here.
1100230237Sbapt	(Search::init_asso_values): Use _initial_asso_value.
1101230237Sbapt	(Search::try_asso_value): Use _jump.
1102230237Sbapt	(Search::optimize): If option -m was given, iterate over different
1103230237Sbapt	values for _initial_asso_value and _jump.
1104230237Sbapt	* doc/gperf.texi (Algorithmic Details): Document option -m.
1105230237Sbapt	* tests/test-6.exp: Update.
1106230237Sbapt
1107230237Sbapt2002-11-03  Bruno Haible  <bruno@clisp.org>
1108230237Sbapt
1109230237Sbapt	Bug fix: When option -j 0 was used without option -r, the output was
1110230237Sbapt	not random.
1111230237Sbapt	* src/search.h (Search::prepare_asso_values): New method declaration.
1112230237Sbapt	* src/search.cc (Search::prepare_asso_values): New method, extracted
1113230237Sbapt	from Search::init_asso_values. Call srand also when "-j 0" was given.
1114230237Sbapt	(Search::optimize): Call prepare_asso_values().
1115230237Sbapt
1116230237Sbapt	* src/hash-table.h (Hash_Table::_ignore_length, Hash_Table::equal):
1117230237Sbapt	Declare as const.
1118230237Sbapt	* src/hash-table.cc (Hash_Table::equal): Declare as const.
1119230237Sbapt	* src/input.h (Input::_factory): Declare as const.
1120230237Sbapt	* src/keyword-list.h (Keyword_List::first, KeywordExt_List::first):
1121230237Sbapt	Declare as const.
1122230237Sbapt	* src/keyword-list.icc (Keyword_List::first, KeywordExt_List::first):
1123230237Sbapt	Declare as const.
1124230237Sbapt	* src/output.h (Output::num_hash_values, Output::output_constants,
1125230237Sbapt	Output::output_hash_function, Output::output_keylength_table,
1126230237Sbapt	Output::output_keyword_table, Output::output_lookup_array,
1127230237Sbapt	Output::output_lookup_tables, Output::output_lookup_function_body,
1128230237Sbapt	Output::output_lookup_function, Output::_array_type,
1129230237Sbapt	Output::_additional_code, Output::_include_src, Output::_total_keys,
1130230237Sbapt	Output::_total_duplicates, Output::_max_key_len, Output::_min_key_len):
1131230237Sbapt	Declare as const.
1132230237Sbapt	* src/output.cc (Output::num_hash_values, Output::output_constants,
1133230237Sbapt	Output::output_hash_function, Output::output_keylength_table,
1134230237Sbapt	Output::output_keyword_table, Output::output_lookup_array,
1135230237Sbapt	Output::output_lookup_tables, Output::output_lookup_function_body,
1136230237Sbapt	Output::output_lookup_function): Declare as const.
1137230237Sbapt	* src/search.h (Search::merge, Search::merge_sort,
1138230237Sbapt	Search::compute_occurrence, Search::already_determined,
1139230237Sbapt	Search::keyword_list_length, Search::max_key_length,
1140230237Sbapt	Search::get_max_keysig_size, Search::compute_hash,
1141230237Sbapt	Search::sort_by_occurrence): Declare as const.
1142230237Sbapt	* src/search.cc (Search::merge, Search::merge_sort,
1143230237Sbapt	Search::compute_occurrence, Search::already_determined,
1144230237Sbapt	Search::keyword_list_length, Search::max_key_length,
1145230237Sbapt	Search::get_max_keysig_size, Search::compute_hash,
1146230237Sbapt	Search::sort_by_occurrence): Declare as const.
1147230237Sbapt
1148230237Sbapt	* src/output.cc (Output::output): Set char_to_index to a cast in all
1149230237Sbapt	cases. Avoids gcc warnings on the generated code.
1150230237Sbapt
1151230237Sbapt	* src/output.cc (Output_Enum): Prepend an underscore to field names.
1152230237Sbapt	(Output_Expr1): Likewise.
1153230237Sbapt	(Output::output_hash_function): Simplify the special case for "-k 1,$".
1154230237Sbapt
1155230237Sbapt	* src/search.h (Search::init_asso_values, Search::find_asso_values):
1156230237Sbapt	New declarations.
1157230237Sbapt	(Search::try_asso_value): Renamed from Search::affects_prev.
1158230237Sbapt	(Search::change_some_asso_value): Renamed from Search::change.
1159230237Sbapt	(Search::set_asso_max, Search::get_asso_max): Remove methods.
1160230237Sbapt	(Search::_union_set): New field.
1161230237Sbapt	* src/search.cc (Search::init_asso_values): New method, extracted
1162230237Sbapt	from Search::optimize.
1163230237Sbapt	(Search::try_asso_value): Renamed from Search::affects_prev. Take the
1164230237Sbapt	iteration count as argument.
1165230237Sbapt	(Search::change_some_asso_value): Renamed from Search::change. Don't
1166230237Sbapt	make union_set static. Don't increment _fewest_collisions here.
1167230237Sbapt	(Search::find_asso_values): New method, extracted from
1168230237Sbapt	Search::optimize.
1169230237Sbapt	(Search::optimize); Update.
1170230237Sbapt
1171230237Sbapt	* src/search.h (Search::compute_hash): Renamed from Search::hash.
1172230237Sbapt	(Search::compute_disjoint_union): Remove declaration.
1173230237Sbapt	(Search::sort_by_occurrence): Renamed from Search::sort_set.
1174230237Sbapt	* src/search.cc (Search::compute_hash): Renamed from Search::hash.
1175230237Sbapt	(compute_disjoint_union): Renamed from Search::compute_disjoint_union.
1176230237Sbapt	(Search::sort_by_occurrence): Renamed from Search::sort_set.
1177230237Sbapt	(Search::change): Simplify loop.
1178230237Sbapt
1179230237Sbapt	* src/search.h (Search::clear_determined): New declaration.
1180230237Sbapt	* src/search.cc (Search::clear_determined): New method.
1181230237Sbapt	(Search::already_determined): Optimize.
1182230237Sbapt	(Search::reorder): Even when the next keyword after the current one
1183230237Sbapt	is completely determined, move all determined keywords after the
1184230237Sbapt	current one.
1185230237Sbapt
1186230237Sbapt	Compute the occurrences after removal of duplicates, not before.
1187230237Sbapt	* src/keyword.h (KeywordExt::init_selchars): Remove occurrences
1188230237Sbapt	argument.
1189230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Likewise.
1190230237Sbapt	* src/search.cc (Search::prepare): Reorder the code. Compute the
1191230237Sbapt	occurrences after removal of duplicates.
1192230237Sbapt	(Search::merge_sort): Optimize the loop.
1193230237Sbapt	(Search::compute_occurrence): Renamed from Search::get_occurrence.
1194230237Sbapt	* src/search.h (Search::compute_occurrence): Renamed from
1195230237Sbapt	Search::get_occurrence.
1196230237Sbapt	* tests/chill.exp: Regenerated.
1197230237Sbapt
1198230237Sbapt	Bug fix: The hash table could fail to detect duplicates, between
1199230237Sbapt	keywords of different length, when option -n (option[NOLENGTH]) was
1200230237Sbapt	given.
1201230237Sbapt	* src/hash-table.h (Hash_Table::Hash_Table): Pass table size, not
1202230237Sbapt	vector and vector size as arguments.
1203230237Sbapt	(Hash_Table::_log_size): New field.
1204230237Sbapt	(Hash_Table::equal): New declaration.
1205230237Sbapt	* src/hash-table.cc (size_factor): New variable.
1206230237Sbapt	(Hash_Table::Hash_Table): Pass table size, not vector and vector size
1207230237Sbapt	as arguments. Allocate the vector here.
1208230237Sbapt	(Hash_Table::~Hash_Table): Deallocate the vector here.
1209230237Sbapt	(Hash_Table::equal): New function.
1210230237Sbapt	(Hash_Table::insert): Use it. Don't use item->_allchars_length for the
1211230237Sbapt	increment if _ignore_length is true.
1212230237Sbapt	* src/search.cc (TABLE_MULTIPLE): Remove variable.
1213230237Sbapt	(Search::prepare): Update.
1214230237Sbapt
1215230237Sbapt2002-11-02  Bruno Haible  <bruno@clisp.org>
1216230237Sbapt
1217230237Sbapt	Provide documentation also in PDF format.
1218230237Sbapt	* doc/Makefile.in (pdfdir, TEXI2PDF): New variables.
1219230237Sbapt	(all): Depend on pdf.
1220230237Sbapt	(pdf, gperf.pdf): New rules.
1221230237Sbapt	(maintainer-clean): Remove the PDF file.
1222230237Sbapt
1223230237Sbapt	* src/keyword-list.icc: New file, extracted from keyword-list.h.
1224230237Sbapt	* src/keyword-list.h: Include keyword-list.icc. Move inline methods
1225230237Sbapt	to there.
1226230237Sbapt	* src/keyword-list.cc: Include keyword-list.icc.
1227230237Sbapt	* src/Makefile.in (KEYWORD_LIST_H): Add keyword-list.icc.
1228230237Sbapt
1229230237Sbapt	* lib/hashpjw.h (hashpjw): Change argument type to 'unsigned char *'.
1230230237Sbapt	* lib/hash.cc (hashpjw): Likewise.
1231230237Sbapt	* src/keyword.icc: New file.
1232230237Sbapt	* src/keyword.h: Include keyword.icc.
1233230237Sbapt	(KeywordExt::_selchars): Change type to 'unsigned char *'.
1234230237Sbapt	* src/keyword.cc: Include keyword.icc.
1235230237Sbapt	(Keyword::Keyword, KeywordExt::KeywordExt): Move to keyword.icc.
1236230237Sbapt	(sort_char_set): Change argument type to 'unsigned char *'.
1237230237Sbapt	(KeywordExt::init_selchars): Update.
1238230237Sbapt	* src/search.h (Search::compute_disjoint_union): Change argument types
1239230237Sbapt	to 'unsigned char *'.
1240230237Sbapt	(Search::sort_set): Likewise.
1241230237Sbapt	(Search::affects_prev): Change argument type to 'unsigned char'.
1242230237Sbapt	* src/search.cc (Search::prepare): Initialize _duplicate_link here.
1243230237Sbapt	(Search::get_occurrence, Search::set_determined,
1244230237Sbapt	Search::already_determined, Search::hash): Update.
1245230237Sbapt	(Search::compute_disjoint_union): Change argument types to
1246230237Sbapt	'unsigned char *'.
1247230237Sbapt	(Search::sort_set): Likewise.
1248230237Sbapt	(Search::affects_prev): Change argument type to 'unsigned char'.
1249230237Sbapt	(Search::change): Update.
1250230237Sbapt	* src/Makefile.in (KEYWORD_H): Add keyword.icc.
1251230237Sbapt
1252230237Sbapt	* src/options.cc (Options::parse_options): Fix error message.
1253230237Sbapt
1254230237Sbapt	* src/read-line.h (Read_Line::Read_Line): Make FILE* argument
1255230237Sbapt	mandatory. Move body to read-line.icc.
1256230237Sbapt	* src/read-line.icc (Read_Line::Read_Line): New constructor.
1257230237Sbapt	* src/input.h (Input::Input): Add FILE* argument.
1258230237Sbapt	* src/input.cc (Input::Input): Likewise.
1259230237Sbapt	* src/main.cc (main): Pass stdin to Input constructor.
1260230237Sbapt
1261230237Sbapt	* src/options.h (DEFAULTCHARS): Remove.
1262230237Sbapt	(Positions::MAX_KEY_POS): Set to 255.
1263230237Sbapt	(Positions::_positions): Increase array size.
1264230237Sbapt	(PositionIterator::EOS): Set to -1.
1265230237Sbapt	(PositionIterator::_index): Change type to 'unsigned int'.
1266230237Sbapt	* src/options.icc (Positions::Positions): Don't store
1267230237Sbapt	PositionIterator::EOS.
1268230237Sbapt	(PositionIterator::next): Produce PositionIterator::EOS here.
1269230237Sbapt	* src/options.cc (Options::long_usage): Use MAX_KEY_POS, not
1270230237Sbapt	MAX_KEY_POS-1.
1271230237Sbapt	(PositionStringParser): Rename field _size to _in_range. Rename
1272230237Sbapt	field _curr_value to _range_curr_value. Rename field _upper_bound
1273230237Sbapt	to _range_upper_bound.
1274230237Sbapt	(PositionStringParser::nextPosition): Comments.
1275230237Sbapt	(Options::Options): Update.
1276230237Sbapt	(Options::~Options): Update.
1277230237Sbapt	(long_options): Use NULL, not 0.
1278230237Sbapt	(Options::parse_options): Set BAD_VALUE to -2; -1 is now EOS. Bug fix:
1279230237Sbapt	Check against array overflow when more than MAX_KEY_POS positions are
1280230237Sbapt	given. Don't store PositionIterator::EOS.
1281230237Sbapt	Check against extra arguments before opening the input file.
1282230237Sbapt	* src/output.cc (Output::output_hash_function): Change test which
1283230237Sbapt	was for option[DEFAULTCHARS].
1284230237Sbapt	* tests/test-6.exp: Update.
1285230237Sbapt
1286230237Sbapt	* src/options.h (Options::get_delimiters): Renamed from
1287230237Sbapt	Options::get_delimiter.
1288230237Sbapt	* src/options.icc (Options::get_delimiters): Renamed from
1289230237Sbapt	Options::get_delimiter.
1290230237Sbapt	* src/input.cc (Input::read_keys): Update.
1291230237Sbapt
1292230237Sbapt	Bug fix.
1293230237Sbapt	* src/options.cc (Options::print_options): Escape backquote inside
1294230237Sbapt	double-quoted strings.
1295230237Sbapt
1296230237Sbapt	Bug fix.
1297230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Avoid comparison with
1298230237Sbapt	uninitialized member variable. Found with 'valgrind'.
1299230237Sbapt
1300230237Sbapt	* src/version.cc: Include version.h.
1301230237Sbapt	* src/Makefile.in (OBJECTS): Reorder.
1302230237Sbapt	(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
1303230237Sbapt	variables.
1304230237Sbapt	(HASH_TABLE_H): Update.
1305230237Sbapt	(options.o, read-line.o, keyword.o, keyword-list.o, input.o, search.o,
1306230237Sbapt	output.o, main.o): Update dependencies.
1307230237Sbapt
1308230237Sbapt	* src/vectors.h: Remove file.
1309230237Sbapt	* src/vectors.cc: Remove file.
1310230237Sbapt	* src/search.h: Don't include vectors.h.
1311230237Sbapt	(Search): Don't inherit from Vectors. New fields _alpha_size,
1312230237Sbapt	_occurrences, _asso_values.
1313230237Sbapt	(Search::_determined, Search::get_occurrence, Search::set_determined,
1314230237Sbapt	Search::already_determined, Search::hash, Search::sort_set): Make
1315230237Sbapt	nonstatic.
1316230237Sbapt	* src/search.cc (Search::Search): Initialize _alpha_size, _occurrences,
1317230237Sbapt	_asso_values, _determined.
1318230237Sbapt	(Search::optimize, Search::~Search): Update.
1319230237Sbapt	* src/output.h: Don't include vectors.h.
1320230237Sbapt	(Output): Remove field _v. New fields _alpha_size, _occurrences,
1321230237Sbapt	_asso_values.
1322230237Sbapt	(Output::Output): Replace Vectors* argument with alpha_size,
1323230237Sbapt	occurrences, asso_values.
1324230237Sbapt	* src/output.cc (Output::Output): Replace Vectors* argument with
1325230237Sbapt	alpha_size, occurrences, asso_values.
1326230237Sbapt	(Output::output_hash_function): Update.
1327230237Sbapt	* src/main.cc (main): Don't set Vectors::ALPHA_SIZE.
1328230237Sbapt	Pass _alpha_size, _occurrences, _asso_values from Search to Output.
1329230237Sbapt	* src/keyword.h: Don't include vectors.h.
1330230237Sbapt	* src/Makefile.in (OBJECTS): Remove vectors.o.
1331230237Sbapt	(VECTORS_H): Remove variable.
1332230237Sbapt	(vectors.o): Remove rule.
1333230237Sbapt
1334230237Sbapt	* src/search.h: New file, combines src/key-list.h, src/gen-perf.h.
1335230237Sbapt	* src/search,cc: New file, combines src/key-list.cc, src/gen-perf.cc.
1336230237Sbapt	* src/key-list.h: Remove file.
1337230237Sbapt	* src/key-list.cc: Remove file.
1338230237Sbapt	* src/gen-perf.h: Remove file.
1339230237Sbapt	* src/gen-perf.cc: Remove file.
1340230237Sbapt	* src/main.cc (KeywordExt_Factory): Moved here from gen-perf.cc.
1341230237Sbapt	(main): Inline some code from gen-perf.cc.
1342230237Sbapt	* src/keyword.h (KeywordExt::init_selchars): Take the occurrences
1343230237Sbapt	vector as argument.
1344230237Sbapt	* src/keyword.cc (KeywordExt::init_selchars): Take the occurrences
1345230237Sbapt	vector as argument.
1346230237Sbapt	* src/input.cc (Input::set_output_types): Initialize _array_type,
1347230237Sbapt	_return_type, _struct_tag.
1348230237Sbapt	(Input::read_keys): Initialize _additional_code.
1349230237Sbapt	* src/Makefile.in (OBJECTS): Add search.o.
1350230237Sbapt	Remove key-list.o, gen-perf.o.
1351230237Sbapt	(KEY_LIST_H, GEN_PERF_H): Remove variables.
1352230237Sbapt	(gen-perf.o, key-list.o): Remove rules.
1353230237Sbapt	(search.o): New rule.
1354230237Sbapt
1355230237Sbapt	* *, */*: Update copyright notice to GPL version 2.
1356230237Sbapt
1357230237Sbapt	* src/keyword-list.h (Keyword_List): New class.
1358230237Sbapt	(KeywordExt_List): Inherit from it.
1359230237Sbapt	* src/keyword-list.cc (Keyword_List::Keyword_List): New constructor.
1360230237Sbapt	(KeywordExt_List::KeywordExt_List): Update.
1361230237Sbapt	* src/input.h (Input::Input): Add Keyword_Factory argument.
1362230237Sbapt	(Input::_factory): New field.
1363230237Sbapt	(Input::_head): Change type to Keyword_List*.
1364230237Sbapt	(Input::parse_line): New declaration.
1365230237Sbapt	* src/input.cc (Input::Input): New constructor.
1366230237Sbapt	(Input::parse_line): Renamed from parse_line. Use the _factory.
1367230237Sbapt	(Input::read_keys): Update.
1368230237Sbapt	* src/key-list.cc (KeywordExt_Factory): New class.
1369230237Sbapt	(Key_List::read_keys): Pass a KeywordExt_Factory as Input constructor
1370230237Sbapt	argument.
1371230237Sbapt
1372230237Sbapt	Avoid g++ -Wold-style-cast warnings.
1373230237Sbapt	* src/bool-array.icc: Use new-style casts.
1374230237Sbapt	* src/gen-perf.cc: Likewise.
1375230237Sbapt	* src/input.cc: Likewise.
1376230237Sbapt	* src/key-list.cc: Likewise.
1377230237Sbapt	* src/keyword.cc: Likewise.
1378230237Sbapt	* src/options.cc: Likewise.
1379230237Sbapt	* src/output.cc: Likewise.
1380230237Sbapt	* src/hash-table.cc: Likewise. Remove (char *) cast in memset argument.
1381230237Sbapt
1382230237Sbapt	* src/keyword-list.h (KeywordExt_List): Don't inherit from KeywordExt.
1383230237Sbapt	(KeywordExt_List::KeywordExt_List): Take a KeywordExt* as argument.
1384230237Sbapt	(KeywordExt_List::_car): New field.
1385230237Sbapt	(KeywordExt_List::first): Use it.
1386230237Sbapt	* src/keyword-list.cc (KeywordExt_List::KeywordExt_List): Take a
1387230237Sbapt	KeywordExt* as argument.
1388230237Sbapt	* src/input.cc (parse_line): Create the KeywordExt separately.
1389230237Sbapt
1390230237Sbapt	Start using bool.
1391230237Sbapt	* src/bool-array.h (Bool_Array::set_bit): Change return type to bool.
1392230237Sbapt	* src/bool-array.icc (Bool_Array::set_bit): Likewise.
1393230237Sbapt	* src/gen-perf.h (Gen_Perf::affects_prev): Likewise.
1394230237Sbapt	* src/gen-perf.cc (Gen_Perf::affects_prev): Likewise.
1395230237Sbapt	* src/hash-table.h (Hash_Table::_ignore_length): Change type to bool.
1396230237Sbapt	(Hash_Table::Hash_Table): Change 3rd argument type to bool.
1397230237Sbapt	* src/hash-table.cc (Hash_Table::Hash_Table): Likewise.
1398230237Sbapt	* src/input.h (Input::_additional_code): Change type to bool.
1399230237Sbapt	* src/input.cc (Input::read_keys): Update.
1400230237Sbapt	* src/key-list.h (Key_List::_occurrence_sort, Key_List::_hash_sort,
1401230237Sbapt	Key_List::_additional_code): Change type to bool.
1402230237Sbapt	(Key_List::_determined): Change element type to bool.
1403230237Sbapt	(Key_List::already_determined): Change return type to bool.
1404230237Sbapt	* src/key-list.cc (Key_List::_determined): Change element type to bool.
1405230237Sbapt	(Key_List::set_determined): Update.
1406230237Sbapt	(Key_List::already_determined): Change return type to bool.
1407230237Sbapt	(Key_List::reorder, Key_List::sort, Key_List::Key_List): Update.
1408230237Sbapt	* src/options.h (Positions::sort): Change return type to bool.
1409230237Sbapt	(Options::operator[]): Likewise.
1410230237Sbapt	* src/options.icc (Positions::sort): Change return type to bool.
1411230237Sbapt	(Options::operator[]): Likewise.
1412230237Sbapt	* src/output.h (Output::Output): Change 5th argument type to bool.
1413230237Sbapt	(Output::_additional_code): Change type to bool.
1414230237Sbapt	* src/output.cc (Output::Output): Change 5th argument type to bool.
1415230237Sbapt
1416230237Sbapt2002-10-16  Bruno Haible  <bruno@clisp.org>
1417230237Sbapt
1418230237Sbapt	* src/*.h: Align all member names at column 24.
1419230237Sbapt
1420230237Sbapt2002-10-15  Bruno Haible  <bruno@clisp.org>
1421230237Sbapt
1422230237Sbapt	* src/input.h: New file.
1423230237Sbapt	* src/input.cc: New file, extracted from key-list.cc.
1424230237Sbapt	* src/key-list.h (Key_List): Don't inherit from Read_Line.
1425230237Sbapt	(Key_List::get_special_input,
1426230237Sbapt	Key_List::save_include_src, Key_List::get_array_type,
1427230237Sbapt	Key_List::strcspn, Key_List::set_output_types): Remove methods.
1428230237Sbapt	* src/key-list.cc (Key_List::get_special_input,
1429230237Sbapt	Key_List::save_include_src, Key_List::get_array_type,
1430230237Sbapt	Key_List::strcspn, Key_List::set_output_types, parse_line): Move to
1431230237Sbapt	src/input.cc.
1432230237Sbapt	(Key_List::read_keys): Use Input::read_keys.
1433230237Sbapt	(Key_List::Key_List): Update.
1434230237Sbapt	* src/gen-perf.cc: Update.
1435230237Sbapt	* src/Makefile.in (OBJECTS): Add input.o.
1436230237Sbapt	(input.o): New rule.
1437230237Sbapt
1438230237Sbapt2002-10-14  Bruno Haible  <bruno@clisp.org>
1439230237Sbapt
1440230237Sbapt	* src/options.cc: Don't include "vector.h".
1441230237Sbapt	(Options::parse_options): Don't initialize Vectors::ALPHA_SIZE here.
1442230237Sbapt	* src/vectors.cc (Vectors::ALPHA_SIZE): Don't initialize here.
1443230237Sbapt	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Initialize Vectors::ALPHA_SIZE.
1444230237Sbapt
1445230237Sbapt	* src/options.h (Positions): New class.
1446230237Sbapt	(PositionIterator): New class.
1447230237Sbapt	(Options::parse_options): Renamed from Options::operator().
1448230237Sbapt	(Options::get_asso_max, Options::set_asso_max): Move to class Key_List.
1449230237Sbapt	(Options::reset, Options::get): Remove, replaced by class
1450230237Sbapt	PositionIterator.
1451230237Sbapt	(Options::get_initial_asso_value): Renamed from Options::initial_value.
1452230237Sbapt	(Options::key_sort): Remove, replaced by Positions::sort.
1453230237Sbapt	(Options): Make all fields and methods non-static.
1454230237Sbapt	* src/options.icc (Positions::Positions, Positions::operator[],
1455230237Sbapt	Positions::get_size, Positions::pointer, Positions::set_size,
1456230237Sbapt	Positions::sort, PositionIterator::PositionIterator,
1457230237Sbapt	PositionIterator::next): New methods.
1458230237Sbapt	(Options::get_initial_asso_value): Renamed from Options::initial_value.
1459230237Sbapt	(Options::get_size_multiple): New method.
1460230237Sbapt	(Options::get_key_positions): New method.
1461230237Sbapt	(Options::get_max_keysig_size): Implement using _key_positions.
1462230237Sbapt	* src/options.cc (Options::long_usage): Split big string into small
1463230237Sbapt	pieces.
1464230237Sbapt	(PositionStringParser): Prefix field names with _.
1465230237Sbapt	(Options::Options): Update.
1466230237Sbapt	(Options::~Options): Fix explanation of of _size_multiple. Don't print
1467230237Sbapt	_key_positions if it is effectively ignored.
1468230237Sbapt	(Options::parse_options): Renamed from Options::operator(). Update.
1469230237Sbapt	* src/key-list.h (Key_List): New field _size. New methods get_asso_max,
1470230237Sbapt	set_asso_max, get_max_keysig_size.
1471230237Sbapt	* src/key-list.cc (Key_List::read_keys): Don't make side effects on
1472230237Sbapt	options.
1473230237Sbapt	(Key_List::dump): Use Key_List::get_max_keysig_size() instead of
1474230237Sbapt	Options::get_max_keysig_size().
1475230237Sbapt	(Key_List::get_max_keysig_size): New function.
1476230237Sbapt	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
1477230237Sbapt	width on the fly if option[ALLCHARS].
1478230237Sbapt	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Update,
1479230237Sbapt	Use Options::get_size_multiple() instead of Options::get_asso_max().
1480230237Sbapt	Use Key_List::get_asso_max() instead of Options::get_asso_max(). Use
1481230237Sbapt	Key_List::get_max_keysig_size() instead of
1482230237Sbapt	Options::get_max_keysig_size().
1483230237Sbapt	(Gen_Perf::affects_prev): Likewise.
1484230237Sbapt	(Gen_Perf::change): Likewise.
1485230237Sbapt	* src/keyword.cc: Update.
1486230237Sbapt	* src/main.cc: Update.
1487230237Sbapt	* src/output.cc: Update.
1488230237Sbapt	* tests/test-6.exp: Update.
1489230237Sbapt
1490230237Sbapt2002-10-13  Bruno Haible  <bruno@clisp.org>
1491230237Sbapt
1492230237Sbapt	* src/bool-array.*: Some polishing.
1493230237Sbapt
1494230237Sbapt	* src/options.h (Options::operator=, Options::operator!=): Remove
1495230237Sbapt	unused methods.
1496230237Sbapt	* src/options.icc (Options::operator=, Options::operator!=): Remove.
1497230237Sbapt
1498230237Sbapt	* src/*.h: Prefix all field names with _.
1499230237Sbapt	* src/*.cc, src/*.icc: Update.
1500230237Sbapt
1501230237Sbapt	* src/*: Simplify declarations of functions without arguments.
1502230237Sbapt
1503230237Sbapt2002-10-04  Bruno Haible  <bruno@clisp.org>
1504230237Sbapt
1505230237Sbapt	* src/output.h: New file, extracted from key-list.h.
1506230237Sbapt	* src/output.cc: New file, extracted from key-list.cc.
1507230237Sbapt	* src/key-list.h (Key_List): Make some fields protected. Move output
1508230237Sbapt	routines to src/output.h.
1509230237Sbapt	* src/key-list.cc: Move output routines to src/output.cc.
1510230237Sbapt	* src/gen-perf.cc (Gen_Perf::doit_all): Use class Output.
1511230237Sbapt	* src/Makefile.in (OBJECTS): Add output.o.
1512230237Sbapt	(output.o): New rule.
1513230237Sbapt
1514230237Sbapt2002-10-03  Bruno Haible  <bruno@clisp.org>
1515230237Sbapt
1516230237Sbapt	* src/iterator.h: Remove file.
1517230237Sbapt	* src/iterator.cc: Remove file.
1518230237Sbapt	* src/options.cc: (PositionStringParser): New class, taken from old
1519230237Sbapt	iterator.cc.
1520230237Sbapt	* src/Makefile.in (OBJECTS): Remove iterator.o.
1521230237Sbapt	(ITERATOR_H): Remove variable.
1522230237Sbapt	(iterator.o): Remove rule.
1523230237Sbapt
1524230237Sbapt	* src/keyword-list.h: New file.
1525230237Sbapt	* src/keyword-list.cc: New file.
1526230237Sbapt	* src/list-node.h: Remove file.
1527230237Sbapt	* src/list-node.cc: Remove file.
1528230237Sbapt	* src/keyword.h (KeywordExt::init_selchars): New declaration.
1529230237Sbapt	* src/keyword.cc (sort_char_set, KeywordExt::init_selchars): New, from
1530230237Sbapt	old list-node.cc.
1531230237Sbapt	* src/gen-perf.cc: Replace List_Node by KeywordExt or KeywordExt_List,
1532230237Sbapt	as appropriate.
1533230237Sbapt	* src/hash-table.h: Likewise.
1534230237Sbapt	* src/key-list.h: Likewise.
1535230237Sbapt	* src/key-list.cc: Likewise.
1536230237Sbapt	* src/Makefile.in (OBJECTS): Remove list-node.o, add keyword-list.o.
1537230237Sbapt	(LIST_NODE_H): Remove macro.
1538230237Sbapt	(list-node.o): Remove rule.
1539230237Sbapt	(keyword-list.o): New rule.
1540230237Sbapt
1541230237Sbapt	* src/keyword.h (KeywordExt): New class.
1542230237Sbapt	* src/keyword.cc (KeywordExt): New constructor.
1543230237Sbapt	* src/list-node.h (List_Node): Inherit from KeywordExt.
1544230237Sbapt	* src/list-node.cc: Update.
1545230237Sbapt	* src/gen-perf.cc: Update.
1546230237Sbapt	* src/hash-table.cc: Update.
1547230237Sbapt	* src/key-list.cc: Update.
1548230237Sbapt	(output_keyword_entry): Change argument type to KeywordExt*.
1549230237Sbapt
1550230237Sbapt	* src/keyword.h: New file.
1551230237Sbapt	* src/keyword.cc: New file.
1552230237Sbapt	* src/list-node.h (List_Node): Extend Keyword.
1553230237Sbapt	* src/list-node.cc: Update.
1554230237Sbapt	* src/gen-perf.cc: Update.
1555230237Sbapt	* src/hash-table.cc: Update.
1556230237Sbapt	* src/key-list.cc: Update.
1557230237Sbapt	* src/Makefile.in (OBJECTS): Add keyword.o.
1558230237Sbapt	(keyword.o): New rule.
1559230237Sbapt
1560230237Sbapt	* src/key-list.cc (Key_List::read_keys): Allocate the memory for the
1561230237Sbapt	hash table using 'new'.
1562230237Sbapt	(Key_List::output_lookup_array): Allocate the memory for the duplicates
1563230237Sbapt	array using 'new'.
1564230237Sbapt	* src/options.h (LARGE_STACK_ARRAYS): Remove definition.
1565230237Sbapt	* src/main.cc (main): Remove setrlimit call.
1566230237Sbapt	* src/configure.in: Don't test for unistd.h, sys/time.h,
1567230237Sbapt	sys/resource.h, getrlimit, setrlimit.
1568230237Sbapt
1569230237Sbapt	* src/bool-array.h (Bool_Array): Make all members non-static.
1570230237Sbapt	Add an argument to the constructor. Remove init(), rename reset() to
1571230237Sbapt	clear(), rename find() to set_bit().
1572230237Sbapt	* src/bool-array.icc: Move init() code into the constructor.
1573230237Sbapt	Rename reset() to clear(), rename find() to set_bit().
1574230237Sbapt	* src/gen-perf.h (Gen_Perf): Add collision_detector member.
1575230237Sbapt	* src/gen-perf.cc: Update.
1576230237Sbapt
1577230237Sbapt	* src/gen-perf.h (Gen_Perf::doit_all): Renamed from
1578230237Sbapt	Gen_Perf::operator ().
1579230237Sbapt	* src/gen-perf.cc (Gen_Perf::doit_all): Renamed from
1580230237Sbapt	Gen_Perf::operator ().
1581230237Sbapt	* src/main.cc: Update.
1582230237Sbapt
1583230237Sbapt	* src/read-line.h (Read_Line::read_next_line): Renamed from
1584230237Sbapt	Read_Line::get_line.
1585230237Sbapt	* src/read-line.icc: Likewise.
1586230237Sbapt	* src/read-line.cc: Update.
1587230237Sbapt	* src/key-list.cc: Update.
1588230237Sbapt
1589230237Sbapt	* lib/getline.h: New file.
1590230237Sbapt	* lib/getline.cc: New file.
1591230237Sbapt	* lib/Makefile.in (OBJECTS): Add getline.o.
1592230237Sbapt	(getline.o): New rule.
1593230237Sbapt	* src/read-line.h (Read_Line::readln_aux): Remove declaration.
1594230237Sbapt	* src/read-line.cc (Read_Line::readln_aux): Remove function.
1595230237Sbapt	* src/read-line.icc (Read_Line::get_line): Use ::get_line.
1596230237Sbapt	* src/options.h (LARGE_STACK): Remove macro.
1597230237Sbapt
1598230237Sbapt	* src/bool-array.h (STORAGE_TYPE): Remove type.
1599230237Sbapt	Use 'unsigned int' instead of STORAGE_TYPE.
1600230237Sbapt	* src/bool-array.cc: Likewise.
1601230237Sbapt	* src/bool-array.icc: Likewise.
1602230237Sbapt	* src/gen-perf.cc: Likewise.
1603230237Sbapt
1604230237Sbapt	* src/new.cc: Remove file.
1605230237Sbapt	* src/Makefile.in (OBJECTS): Remove new.o.
1606230237Sbapt	(new.o): Remove rule.
1607230237Sbapt	* src/configure.in: Remove test for HAVE_THROW_DECL.
1608230237Sbapt	* acconfig.h: Remove file.
1609230237Sbapt
1610230237Sbapt	* src/trace.h: Remove file.
1611230237Sbapt	* src/trace.cc: Remove file.
1612230237Sbapt	* src/Makefile.in (OBJECTS): Remove trace.o.
1613230237Sbapt	(TRACE_H): Remove variable.
1614230237Sbapt	(trace.o): Remove rule.
1615230237Sbapt	Update all dependencies.
1616230237Sbapt	* src/bool-array.h, src/bool-array.cc, src/bool-array.icc: Don't use T.
1617230237Sbapt	* src/gen-perf.cc: Likewise.
1618230237Sbapt	* src/hash-table.cc: Likewise.
1619230237Sbapt	* src/iterator.cc: Likewise.
1620230237Sbapt	* src/key-list.cc: Likewise.
1621230237Sbapt	* src/list-node.cc: Likewise.
1622230237Sbapt	* src/main.cc: Likewise.
1623230237Sbapt	* src/new.cc: Likewise.
1624230237Sbapt	* src/options.h, src/options.cc, src/options.icc: Likewise.
1625230237Sbapt	* src/read-line.h, src/read-line.cc, src/read-line.icc: Likewise.
1626230237Sbapt
1627230237Sbapt	* tests/Makefile.in: Use gperf option -I, to avoid gcc-3.x warnings.
1628230237Sbapt	* tests/test.c: Don't use gets(), to avoid warnings.
1629230237Sbapt
1630230237Sbapt2001-08-02  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1631230237Sbapt
1632230237Sbapt	* doc/gperf.texi: Change bug report address to <bug-gnu-gperf@gnu.org>.
1633230237Sbapt	* README: Updated.
1634230237Sbapt
1635230237Sbapt2000-12-18  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1636230237Sbapt
1637230237Sbapt        * src/configure.in: Add check for rand() in libm. Needed for BeOS.
1638230237Sbapt        * src/Makefile.in (LIBS): Use @GPERF_LIBM@ instead of hardwiring -lm.
1639230237Sbapt
1640230237Sbapt2000-11-20  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>
1641230237Sbapt
1642230237Sbapt        * doc/help2man: Update to version 1.23.
1643230237Sbapt
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