ChangeLog revision 58551
1Sat May 2 12:31:51 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 2 3 * src/version.cc (version_string): Remove the "(C++ version)" suffix. 4 It's redundant: the early C versions of gperf are called cperf. 5 Reported by Karl Berry. 6 * src/option.cc (Options::operator()): Trim the output of "gperf -v". 7 8Thu Apr 16 13:22:16 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 9 10 * lib/Makefile.in, src/Makefile.in: Don't use $(TARGET_ARCH). 11 Solaris "make" sets it to a value not understood by "cc". 12 13Wed Apr 15 23:52:14 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 14 15 * lib/Makefile.in, src/Makefile.in: Don't use implicit rules. Don't 16 use $<. AIX "make" and OSF/1 "make" have problems with both. 17 * src/gen-perf.cc, src/key-list.cc: Cast free() argument to char*, 18 otherwise it doesn't compile on SunOS 4. 19 * src/key-list.h: Declare structs outside of other declarations, 20 needed for OSF/1 cxx 5.5. 21 * lib/getopt.h: Use prototypes if __STDC__ || __cplusplus. 22 Don't give a prototype for getopt(), to avoid error on SunOS 4. 23 * lib/getopt.c: Declare strncmp, to avoid warnings. 24 25Tue Apr 14 23:24:07 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 26 27 * lib/GetOpt.{h,cc}: Remove files. 28 * lib/getopt.{h,c}, lib/getopt1.c: New files, from GNU libc. 29 * lib/configure.in (AC_INIT): Search for hash.cc, not GetOpt.cc. 30 * lib/Makefile.in (OBJECTS): Remove GetOpt.o, add getopt.o, getopt1.o. 31 (getopt.o, getopt1.o, hash.o): Use explicit building rules. Some 32 "make"s don't support to have both implicit rules for "%.o : %.c" 33 and "%.o : %.cc" in the same Makefile. 34 * lib/hash.{h,cc}: Remove #pragma; there are no templates here. 35 * src/option.h (Options::usage): Remove. 36 (Options::short_usage, Options::long_usage): Declare. 37 * src/option.cc (Options::usage): Remove. 38 (Options::short_usage, Options::long_usage): New functions. 39 (long_options): New array. 40 (Options::operator()): Use getopt_long instead of GetOpt::operator(), 41 change all references to GetOpt members. 42 43 * src/std-err.{h,cc}: Remove files. 44 * src/gen-perf.cc, src/key-list.cc, list-node.cc, new.cc, options.cc: 45 Call fprintf(stderr) instead of Std_Err::report_error(). 46 * src/key-list.h, src/list-node.h, src/options.h: Don't use class 47 Std_Err any more. 48 * src/option.cc (program_name): New variable. 49 * src/Makefile.in: Remove STD_ERR_H. 50 (OBJECTS): Remove std-err.o. 51 52Mon Mar 23 01:03:35 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 53 54 * aclocal.m4, {lib,src,tests}/configure.in: Remove CL_CC_WORKS and 55 CL_CXX_WORKS, already contained in autoconf 2.12. 56 57 * src/gen-perf.cc, src/key-list.cc: Move some code from 58 Gen_Perf::Gen_Perf() to Key_List::output(). 59 * src/Makefile.in: Update dependencies. 60 61 * src/options.{h,cc}: Remove option "-p". 62 * src/key-list.cc (Key_List::set_output_types): Rewrite. 63 (default_array_type, default_return_type): Remove. 64 * src/key-list.cc: Adjust "const" handling. 65 + With option "-t" [TYPE], don't emit wrong code if there is no 66 space before the struct's opening brace. 67 68Sun Mar 22 16:59:15 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 69 70 * src/key-list.{h,cc}: Completely reorganized the output routines. 71 Rewrote from scratch the output_switch() function. Use classes 72 (Output_Constants, Output_Expr, Output_Compare) for abstraction. 73 In particular: 74 + Don't emit trailing whitespace and spurious blank lines. 75 + Adjust indentation of the arrays. 76 + Don't emit commas at the end of array initializers and 77 struct initializers. 78 + With option "-l" [LENTABLE], compare the length before 79 fetching the word from memory. 80 + With option "-S" [SWITCH], emit the comparison code just once, 81 not once in every switch statement. 82 + With option "-S" [SWITCH], choose the right switch statement 83 through a binary search, not a linear search. 84 + With option "-S" [SWITCH], emit straightforward comparisons 85 instead of switch statements with just one "case" label. 86 + With options "-S -p -t" [SWITCH, POINTER, TYPE], don't emit 87 spurious empty elements at the beginning of the wordlist array. 88 + With option "-D" [DUP] and not option "-S" [SWITCH], if there 89 is no more room for duplicate entries in the lookup array, 90 don't call `assert (i != 0)'. Instead, make the array larger :-) 91 + With option "-D" [DUP], if there are no duplicates, don't 92 automatically fall back to the non-"-D" algorithm. If the user 93 wants the non-"-D" algorithm, he can just not specify "-D". 94 + With option "-D" [DUP] and either options "-p -t" [POINTER, TYPE] 95 or not option "-S" [SWITCH], don't emit spurious empty elements 96 at the beginning of the wordlist array. 97 + With option "-D" [DUP], simplify the detection and processing 98 of duplicate entries in the lookup array. 99 + With options "-D -l" [DUP, LENTABLE] and not option "-S" [SWITCH], 100 don't forget to emit the lengthtable array. 101 + With options "-D -l -S" [DUP, LENTABLE, SWITCH], don't forget to 102 compare the lengths before comparing the strings. 103 104 * src/gen-perf.cc: No need to include <assert.h>. 105 * src/options.cc: Likewise. 106 107 * src/options.cc: Don't use `errno' after freopen failed. 108 * src/std-err.cc: `report_error' doesn't call strerror(errno) any 109 more. No need to include <string.h> and <errno.h>. 110 111 * tests/Makefile.in (check-*): Any difference between .exp and .out 112 is a failure. Don't ignore whitespace differences. 113 114 * tests/Makefile.in (check-lang-syntax): Add some more checks. 115 116Fri Mar 20 00:54:54 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 117 118 * tests/jscript.gperf: Renamed from tests/javascript.gperf, because 119 of Minix and SVR2 14-character filename limit. 120 * src/key-list.cc (output_string): New function. 121 (Key_List::output_switch, Key_List::output_keyword_table): Call it. 122 123 * src/options.{h,icc,cc} (get_wordlist_name): New function. Add 124 option -W. 125 * src/key-list.cc (Key_List::output_switch, 126 Key_List::output_keyword_table, Key_List::output_lookup_function): 127 Use it. 128 Patch from William Bader <wbader@CSEE.Lehigh.Edu>. 129 130 * src/version.cc: Bump version number directly from 2.5 to 2.7, 131 because Schmidt's last release from 1991 carries version number 2.6. 132 133Tue Jul 30 00:02:39 1991 Douglas C. Schmidt (schmidt at net4.ics.uci.edu) 134 135 * Fixed a small bug in the Key_List::output_keyword_table routine 136 that caused an extra newline to be printed if there where no 137 leading blank entries... (who cares, right?!) 138 139Mon Jul 29 22:05:40 1991 Douglas C. Schmidt (schmidt at net4.ics.uci.edu) 140 141 * Modified the handling of the -E (emit enums rather than 142 #defines) option in conjunction with the -G option. Now, if -G 143 and -E are given the enums are generated outside the lookup 144 function, rather than within it! 145 146Mon Apr 8 18:17:04 1991 Doug Schmidt (schmidt at net4.ics.uci.edu) 147 148 * Yucko, there was a bug in the handling of -c (and of course the 149 new -I command in key-list.cc). Apparently when I added the 150 super-duper hack that provided support for duplicate keys I 151 forgot to update the strcmp output... 152 153Mon Mar 9 02:19:04 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> 154 155 * Moved the documentation to doc/, put the stuff borrowed from 156 libg++ into lib/. 157 * Rewrote all Makefile.in's for better compliance with GNU standards. 158 * Autoconf based configuration. Rewrote all configure.in's. Added 159 aclocal.m4, with macros from CLISP and CLN. Added Makefile.devel. 160 * src/depend: Removed. Dependencies are now in src/Makefile.in. 161 162 * src/bool-array.icc: New file, contains inline functions, from both 163 src/bool-array.h and src/bool-array.cc. 164 * src/options.icc: New file, contains inline functions, from both 165 src/options.h and src/options.cc. 166 * src/read-line.icc: New file, contains inline functions, from both 167 src/read-line.h and src/read-line.cc. 168 169 * src/bool-array.h: Don't include <std.h>. 170 * src/bool-array.cc: Include <string.h>. 171 * src/gen-perf.cc: No need to include <ctype.h>. Don't include 172 <_G_config.h>. 173 * src/hash-table.cc: Don't include <std.h> and <builtin.h>. Include 174 <string.h> and lib/hash.h instead. 175 * src/iterator.cc: Don't include <std.h>. 176 * src/key-list.cc: Don't include <builtin.h>. Include <string.h> and 177 <stdlib.h> instead. 178 * src/list-node.cc: Don't include <std.h>. Include <stdlib.h> instead. 179 Remove `index' hack. 180 * src/main.cc: Don't include <_G_config.h>. 181 * src/new.cc: Don't include <std.h>. Include <stdlib.h> instead. 182 * src/options.cc: Don't include <builtin.h>. Include <string.h> and 183 <stdlib.h> instead. 184 * src/read-line.cc: Don't include <builtin.h>. Include <stdlib.h> 185 instead. 186 * src/std-err.cc: Don't include <std.h>. Include <string.h> (for Irix). 187 * src/vectors.h: No need to include <stdio.h>. 188 * src/version.cc: No need to include <stdio.h>. 189 190 * src/bool-array.h: Change `STORAGE_TYPE' from int to unsigned int. 191 * src/bool-array.{h,cc}: Change type of `Bool_Array::size' from int 192 to unsigned int. 193 * src/bool-array.{h,cc}: Change type of `Bool_Array::init' argument 194 from STORAGE_TYPE to unsigned int. 195 * src/gen-perf.{h,cc}: Change two `Gen_Perf::compute_disjoint_union' 196 argument types from `char *' to `const char *'. 197 * src/iterator.h: Change type of `Iterator::str' and argument of 198 `Iterator::Iterator' from `char *' to `const char *'. 199 * src/iterator.cc: Cast to `unsigned char' before calling `isdigit'. 200 * src/key-list.{h,cc}: Change type of `Key_List::array_type', 201 `Key_List::return_type', `Key_List::struct_tag', 202 `Key_List::include_src', `default_array_type', `default_return_type' 203 and return type of `Key_List::get_array_type', 204 `Key_List::get_special_input', `Key_List::save_include_src' from 205 `char *' to `const char *'. 206 * src/key-list.cc: Change "pretty gross" assignment. 207 * src/key-list.cc: Don't use `alloca', HP-UX CC lacks it. 208 * lib/GetOpt.cc: Likewise. 209 * src/key-list.cc (merge): Use iteration instead of recursion. 210 * src/list-node.{h,cc}: Change type of `List_Node::key', 211 `List_Node::rest', `List_Node::char_set' from `char *' to 212 `const char *'. 213 * src/new.cc: Don't use BUFSIZ. Conditionalize the throw() declaration. 214 * src/read-line.h: Don't use BUFSIZ. 215 * src/read-line.cc: Make CHUNK_SIZE a constant, and use allocate the 216 buffers on the stack by default. Use memcpy for copying buffers. 217 Include <string.h>. 218 * src/read-line.icc (get_line): Use iteration instead of tail recursion. 219 Don't call ungetc(EOF,stdin). 220 * src/std-err.{h,cc}: Change type of `Std_Err::program_name' and of 221 argument `Std_Err::report_error' from `char *' to `const char *'. 222 * src/std-err.cc: `report_error' doesn't call `exit' any more. All 223 callers changed to do that themselves. 224 * src/trace.h: Make constructor/destructor calls non-inline. 225 226 * src/key-list.cc (output_hash_function): If option[CPLUSPLUS], 227 always make the hash function inline. 228 (output): Declare the hash function inline, with the right name. 229 * src/options.{h,cc}, src/gen-perf.cc, src/key-list.cc: Remove 230 options -g, making it on by default. Remove option -a. Instead, 231 introduce "-L KR-C", "-L C", "-L ANSI-C", "-L C++". 232 * src/options.{h,cc}, src/key-list.cc: Add option -I. 233 * src/key-list.cc: Don't emit "const" if compiling in mode "-L KR-C". 234 * src/key-list.cc: Don't emit a comma at the end of an enum list. 235 * src/main.cc: Remove COUNT_TIME code. 236 * src/vectors.h, src/key-list.cc, src/options.cc, src/list-node.cc: 237 ALPHA_SIZE defaults to 256 now. Add option -7. 238 239 * tests/javascript.gperf: New file. 240 * tests/jstest*.gperf, tests/validate: New tests. 241 242Sat Jan 31 01:38:11 1998 Alexandre Oliva <oliva@dcc.unicamp.br> 243 244 * src/Makefile.in ($(TARGETPROG)): Add $(CFLAGS). 245 246Wed Jan 28 01:56:00 1998 Manfred Hollstein <manfred@s-direktnet.de> 247 248 * configure.in (package_makefile_rules_frag): New and 249 redirect stderr from ${srcdir}/config.shared to 250 ${package_makefile_rules_frag}. 251 * src/configure.in: Ditto. 252 * tests/configure.in: Ditto. 253 254Fri Jan 23 08:00:41 1998 H.J. Lu (hjl@gnu.org) 255 256 * gperf.texi (@ichapter): Changed to @chapter. 257 258Wed Jan 14 09:16:48 1998 H.J. Lu (hjl@gnu.org) 259 260 * src/key-list.cc, src/key-list.h (Key_List::strcspn): Don't 261 define if strcspn is defined. 262 263Fri Jan 24 13:23:47 1997 Mike Stump <mrs@cygnus.com> 264 265 * src/new.cc (operator delete): Add the exception specification. 266 267Mon Feb 5 19:29:16 1996 Per Bothner <bothner@kalessin.cygnus.com> 268 269 * src/read-line.cc (Read_Line::readln_aux): Handle EOF if last line 270 has a length which is an exact multiple of CHUNK_SIZE. (Used to throw 271 away the line's contents.) From Bruno Haible <haible@ilog.ilog.fr>. 272 * src/Makefile.in ($(TARGETPROG)): Add -lm to link line. 273 274Tue Jun 11 13:43:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com> 275 276 * src/list-node.cc (List_Node): Reorder init of nodes to 277 match declaration order. 278 * src/hash-table.cc (Hash_Table): Likewise. 279 280Tue Oct 10 16:37:28 1995 Mike Stump <mrs@cygnus.com> 281 282 * src/new.cc: Since malloc/delete are not paired, we cannot call 283 free. 284 285Wed Jan 4 12:40:14 1995 Per Bothner <bothner@kalessin.cygnus.com> 286 287 * src/Makefile.in ($(TARGETPROG)): Link with $(LDFLAGS). 288 Patch from John Interrante <interran@uluru.stanford.edu>. 289 290Sat Nov 5 19:12:48 1994 Jason Merrill (jason@phydeaux.cygnus.com) 291 292 * src/Makefile.in (LIBS): Remove. 293 294Tue Oct 18 17:51:14 1994 Per Bothner <bothner@kalessin.cygnus.com> 295 296 * src/std-err.cc: Use stderror, instead of the non-standard 297 sys_nerr and sys_errlist. 298 299Sat Sep 17 22:02:13 1994 Per Bothner (bothner@kalessin.cygnus.com) 300 301 * src/key-list.cc (output_hash_function): 302 Patch from William Bader <wbader@CSEE.Lehigh.Edu>. 303 304Fri Jul 15 09:38:11 1994 Per Bothner (bothner@cygnus.com) 305 306 * src/std-err.cc: #include <errno.h>, and only declare 307 extern int errno if errno is not a macro. 308 309Mon May 30 17:29:34 1994 Per Bothner (bothner@kalessin.cygnus.com) 310 311 * Makefile.in (src_all, install): Make sure to add '/' after 312 `pwd` in $rootme, as expected by FLAGS_TO_PASS. 313 314Wed May 11 00:47:22 1994 Jason Merrill (jason@deneb.cygnus.com) 315 316 Make libg++ build with gcc -ansi -pedantic-errors 317 * src/options.h: Lose commas at end of enumerator lists. 318 319Sun Dec 5 19:16:40 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 320 321 * src/hash-table.cc (Hash_Table::~Hash_Table): Don't pass an 322 argument to fprintf, since it's not expecting one. 323 324Fri Nov 26 19:03:18 1993 Per Bothner (bothner@kalessin.cygnus.com) 325 326 * src/list-node.cc: #undef index, for the sake of broken NeXT, 327 328Thu Nov 4 11:16:03 1993 Per Bothner (bothner@kalessin.cygnus.com) 329 330 * Makefile.in (install): Use INSTALL_DATA for gperf.1. 331 332Mon Oct 25 18:40:51 1993 Per Bothner (bothner@kalessin.cygnus.com) 333 334 * src/key-list.cc (Key_List::read_keys): Use POW macro 335 to increase hash table size to power of 2. 336 337 * options.h (LARGE_STACK_ARRAYS): New flag. Defaults to zero. 338 * gen-perf.cc, key-list.cc, read-line.cc: 339 Only stack-allocate large arrays if LARGE_STACK_ARRAYS is set. 340 * main.cc (main): Only call setrlimit (RLIMIT_STACK, ...) 341 if LARGE_STACK_ARRAYS. 342 343Mon Oct 4 17:45:08 1993 Per Bothner (bothner@kalessin.cygnus.com) 344 345 * src/gen-perf.cc: Always use ANSI rand/srand instead of BSDisms. 346 347Wed Aug 18 12:19:53 1993 Per Bothner (bothner@kalessin.cygnus.com) 348 349 * Makefile.in (src_all): Make less verbose output. 350 351Fri May 28 14:01:18 1993 Per Bothner (bothner@rtl.cygnus.com) 352 353 * src/gen-perf.cc (Gen_Perf::change): Don't use gcc-specific 354 2-operand conditional expression. 355 * src/key-list.cc (Key_List::output_lookup_array): 356 Don't use variable-size stack arrays, unless compiled by g++. 357 358Tue May 4 14:08:44 1993 Per Bothner (bothner@cygnus.com) 359 360 Changes (mostly from Peter Schauer) to permit compilation 361 using cfront 3.0 and otherwise be ARM-conforming. 362 * src/key-list.h: class Key_List must use public derivation 363 of base class Std_Err (because Gen_Perf::operator() in gen-perf.cc 364 calls Std_Err::report_error). 365 * src/gen-perf.cc (Gen_Perf::affects_prev), src/hash-table.cc 366 (Hash_Table::operator()): Don't use gcc-specific 2-operand 367 conditional expression. 368 * src/iterator.cc (Iterator::operator()): Don't use gcc-specific 369 range construct in case label. 370 * key-list.cc (Key_List::output_lookup_array, Key_List::read_keys), 371 src/gen-perf.cc (Gen_Perf::operator(), src/read-line.cc 372 (Read_Line::readln_aux): If not gcc, don't allocate 373 variable-sized arrays on stack. 374 * src/new.cc (operator new): Argument type should be size_t. 375 * key-list.cc (Key_List::output_lookup_array, Key_List::read_keys), 376 new/cc (::operator new): Don't use non-standard >?= operator. 377 378Tue Apr 27 20:11:30 1993 Per Bothner (bothner@cygnus.com) 379 380 * src/Makefile.in: Define TARGETPROG, and use it. 381 382Mon Apr 19 00:29:18 1993 Per Bothner (bothner@cygnus.com) 383 384 * Makefile.in, configure.in: Re-vamped configure scheme. 385 * gperf.texinfo: Renamed to gperf.texi. 386 * src/bool-array.{h,cc}: ANSIfy bzero->memset. 387 388Sat Jan 30 20:21:28 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 389 390 * tests/Makefile.in (mostlyclean): Also delete aout, cout, m3out, 391 pout, and preout. 392 393Tue Dec 29 08:58:17 1992 Ian Lance Taylor (ian@cygnus.com) 394 395 * Makefile.in: pass $(FLAGS_TO_PASS) to all calls to make. 396 (FLAGS_TO_PASS): added INSTALL, INSTALL_DATA, INSTALL_PROGRAM. 397 398Mon Dec 21 18:46:46 1992 Per Bothner (bothner@rtl.cygnus.com) 399 400 * tests/expected.* renamed to *.exp to fit in 14 chars. 401 * tests/Makefile.in: Update accordingly. 402 Also rename output.* to *.out. 403 * src/Makefile.in (clean): Remove gperf program. 404 405Wed Dec 9 14:33:34 1992 Per Bothner (bothner@cygnus.com) 406 407 * src/hash-table.cc, src/bool-array.h: ANSIfy bzero->memset. 408 409Thu Dec 3 19:34:12 1992 Per Bothner (bothner@cygnus.com) 410 411 * Makefile.in (distclean, realclean): Don't delete 412 Makefile before recursing. 413 414Fri Nov 6 13:41:49 1992 Per Bothner (bothner@rtl.cygnus.com) 415 416 * key-list.{h,cc}: Remove MAX_INT (and similar) constant 417 fields from Key_List class, and use INT_MAX (etc) from limits.h. 418 * key-list.{h,cc}, options.{h,cc}, vectors.h: Removed all 419 uses of initialized const fields, as they are non-standard 420 - and their use was easy to do away with. Mostly, just 421 made the constants static non-fields in the .cc file. 422 423Mon Nov 2 13:10:11 1992 Per Bothner (bothner@cygnus.com) 424 425 * tests/Makefile.in: When generating cinset.c, don't pass -C, 426 since -C assumes an ANSI compiler. Add the -C flag (with -a) 427 when generating test.out.3 instead. 428 * tests/expected.out.3: Update accordingly. 429 430Wed Aug 12 11:47:54 1992 Per Bothner (bothner@cygnus.com) 431 432 * Makefile.in: Factor out common flags into $(FLAGS_TO_PASS). 433 * Makefile.in: 'install-info' depends on gperf.info. 434 435Mon Aug 10 11:39:52 1992 Ian Lance Taylor (ian@dumbest.cygnus.com) 436 437 * Makefile.in, src/Makefile.in: always create installation 438 directories. 439 440Mon Jul 20 15:33:21 1992 Mike Stump (mrs@cygnus.com) 441 442 * src/new.cc (operator new): Add cast from void * to char *, 443 since it is not a standard conversion. 444 445Wed Jun 17 16:25:30 1992 Per Bothner (bothner@rtl.cygnus.com) 446 447 * src/gen-perf.cc: #include <_G_config.h> for _G_SYSV. 448 * src/key-list.cc: alloca() hair. 449 * src/main.cc (main): Only call getrlimit if _G_HAVE_SYS_RESOURCE. 450 * Makefile,in, {src,test}/Makefile.in: Fix *clean rules. 451 452Fri May 29 13:21:13 1992 Per Bothner (bothner@rtl.cygnus.com) 453 454 * src/gen-perf.cc: Replace USG -> _G_SYSV. 455 456Thu May 14 13:58:36 1992 Per Bothner (bothner@rtl.cygnus.com) 457 458 * src/Makefile.in: Don't pass obsolete flag -DUNLIMIT_STACK. 459 * tests/Makefile.in (clean): Fix. 460 461Sat Mar 7 00:03:56 1992 K. Richard Pixley (rich@rtl.cygnus.com) 462 463 * gperf.texinfo: added menu item hook. 464 465Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) 466 467 * Makefile.in, configure.in: removed traces of namesubdir, 468 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced 469 copyrights to '92, changed some from Cygnus to FSF. 470 471Sun Jan 26 19:21:58 1992 Per Bothner (bothner at cygnus.com) 472 473 * tests/Makefile.in: Use re-directed stdin instead of file 474 name in argv. This allows us to remove the filename 475 from the output, the expected output, and hence the diffs. 476 (Note that the input file is in $(srcdir), which we cannot 477 place in the expected out files.) 478 * tests/expected.out.[1235]: Edit out input filename, 479 to match new output. 480 481Thu Jun 28 16:17:27 1990 Doug Schmidt (schmidt at brilliant) 482 483 * Wow, first fix on the new job! There was a dumb error 484 in Key_List::output_lookup_function, where I printed the 485 string "&wordlist[key]" instead of the correct "&wordlist[index]". 486 487 * Added a couple of #ifdefs for USG support. 488 489Sun Jun 3 17:16:36 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 490 491 * Updated the version number to 2.5 and sent to Doug Lea for release 492 with the latest GNU libg++. 493 494 * Changed the error handling when a keyword file cannot be opened 495 (now calls perror). 496 497Wed May 30 14:49:40 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 498 499 * Instrumented the source code with trace statements automagically 500 inserted using my new automated trace instrumentation tool! 501 502Wed May 9 11:47:41 1990 Doug Schmidt (schmidt at siam.ics.uci.edu) 503 504 * Really fixed the previous bug. Turns out that a small amount 505 of logic had to be duplicated to handle static links that occur 506 as part of dynamic link chains. What a pain!!! 507 508Tue May 8 23:11:44 1990 Doug Schmidt (schmidt at siam.ics.uci.edu) 509 510 * Fixed a stupid bug in Key_List::output_lookup_array that was 511 causing incorrect counts to be generated when there were both 512 static and dynamic links occurring for the same hash value. 513 Also simplified the code that performs the logic in this routine. 514 515Mon Apr 30 17:37:24 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 516 517 * Fixed stupid bug in Key_List::output_lookup_array that was 518 making the generated lookup[] array contain `chars' even 519 when the values stored in the chars are greater than 127! 520 521 * Changed the behavior of the -G (global table) option so that it 522 will output the `length[]' array in the global scope along with 523 the `word_list[]' array. 524 525 * Fixed a stupid bug in Key_List::output_lookup_function that 526 would always output the complicated `duplicate-handling' lookup 527 logic, even when there were no duplicates in the input! 528 529 * Yikes, had to modify a bunch of stuff in key-list.cc to correctly 530 handle duplicate entries. Changed the generated code so that 531 the MIN_HASH_VALUE is no longer subtracted off when calculating 532 the hash value for a keyword. This required changing some other 533 code by substituting MAX_HASH_VALUE for TOTAL_KEYS in several places. 534 Finally, this means that the generated tables may contain leading 535 null entries, but I suppose it is better to trade-off space to get 536 faster performance... 537 538Mon Mar 26 13:08:43 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 539 540 * Updated version number to 2.4 to reflect the latest changes. 541 542 * Changed the main program so that it always prints out gperf's 543 execution timings to the generated output file. 544 545Sun Mar 25 12:39:30 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 546 547 * Added the -Z option so that users can specify the name of the 548 generated class explicitly. Updated documentation to reflect 549 this change. 550 551 * Modified the generated C++ class interface so that the functions 552 are declared static (to remove the overhead of passing the `this' 553 pointer). This means that operator()() can no longer be used, 554 since it only works on non-static member functions. 555 Also changed things so that there is no constructor (why waste 556 the extra call, when it doesn't do anything, eh?) 557 558 * Modified the behavior of Key_List::output when the -L C++ option 559 is enabled. Previously the code generated use const data members 560 to record MIN_WORD_LENGTH, MIN_HASH_VALUE, etc. However, as 561 pointed out by James Clark this may result in suboptimal behavior 562 on the part of C++ compilers that can't inline these values. 563 Therefore, the new behavior is identical to what happens with 564 -L C, i.e., either #defines or function-specific enums are used. 565 Why sacrifice speed for some abstract notion of `code purity?' ;-) 566 567Tue Mar 6 18:17:42 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 568 569 * Added the -E option that defines constant values using an enum 570 local to the lookup function rather than with #defines. This 571 also means that different lookup functions can reside in the 572 same file. Thanks to James Clark (jjc@ai.mit.edu). 573 574Sat Mar 3 20:19:00 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 575 576 * Added a special case to key_list::output_switch that doesn't 577 generate extra comparisons when the `-S' is given an argument 578 of 1 (the normal case). This should speed up the generated 579 code output a tad... 580 581Fri Feb 23 14:21:28 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 582 583 * Renamed all instances of member function get_keysig_size 584 to get_max_keysig_size, since this is more precise... 585 586 * Changed all occurrences of charset to keysig (stands for ``key 587 signature'') to reflect the new naming convention used in the 588 USENIX paper. 589 590Thu Feb 22 11:28:36 1990 Doug Schmidt (schmidt at crimee.ics.uci.edu) 591 592 * Changed the name of the generated associated values table from 593 asso_value to asso_values to reflect conventions in the USENIX 594 C++ paper. 595 596Thu Feb 15 23:29:03 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 597 598 * Updated the gperf.texinfo file to fix some formatting problems 599 that had crept in since last time. 600 601Wed Feb 14 23:27:24 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 602 603 * Fixed stupid bug in key-list.cc (get_special_input), wher 604 gperf replaced each '%' with the succeeding character. 605 606 * Added support for multiple target language generation. Currently 607 handled languages are C and C++, with C as the default. Updated 608 documentation and option handler to reflect the changes. 609 610 * Added a global destructor to new.cc and removed the #ifdef, since 611 the bloody thing now works with libg++. 612 613Mon Feb 14 13:00:00 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 614 615 * Found out that my gperf paper was accepted at the upcoming 616 USENIX C++ Conference in San Francisco. Yow! 617 618Tue Jan 30 09:00:29 1990 Doug Schmidt (schmidt at zola.ics.uci.edu) 619 620 * #ifdef'd out the new.cc memory allocator, since there are 621 problems with this and the libg++ stuff. 622 623 * Changed key-list.h so that class Vectors is a public (rather 624 than private) base class for class Key_List. The previous 625 form was illegal C++, but wasn't being caught by the old 626 g++ compiler. Should work now... ;-) 627 628Sun Dec 10 14:08:23 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 629 630 * Added several changes from rfg@ics.uci.edu. These changes 631 help to automate the build process. 632 633Wed Nov 15 15:49:33 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 634 635 * Removed conditional compilation for GATHER_STATISTICS. There's 636 really no good reason to avoid collecting this info at run-time, 637 since that section of code is *hardly* the bottleneck... ;-) 638 639 * Simplified the C output routines in Key_List::set_output_types 640 and Key_List::output_keyword_table a bit in order to 641 speed-up and clean up the code generation. 642 643 * Modified function Key_List::get_special_input so that it does 644 not try to `delete' a buffer that turned out to be too short. 645 This is important since the new memory management scheme 646 does not handle deletions. However, adding a small amount of 647 garbage won't hurt anything, since we generally don't do this 648 operation more than a couple times *at most*! 649 650 * Created a new file (new.cc) which includes my own overloaded 651 operator new. This function should dramatically reduce the 652 number of calls to malloc since it grabs large chunks and 653 doles them out in small pieces. As a result of this change 654 the class-specific `operator new' was removed from class List_Node. 655 656Tue Nov 14 21:45:30 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 657 658 * Continued to refine the great hack. The latest trick is to 659 try and replace most uses of dynamic memory (i.e., calls to 660 new) with uses of gcc dynamic arrays (i.e., an alloca solution). 661 This makes life much easier for the overall process-size, since 662 it reduces the amount of overhead for memory management. As a 663 side-effect from this change there is no reason to have the 664 Bool_Array::dispose member function, so it's outta here! 665 666 * Fixed a stupid bug that was an disaster waiting to happen... 667 Instead of making the boolean array large enough to index 668 max_hash_value it was only large enough to index max_hash_value 669 - 1. Once again, an off-by-one mistake in C/C++!!!! 670 671Mon Nov 13 19:38:27 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 672 673 * Added the final great hack! This allows us to generate hash tables 674 for near-perfect hash functions that contain duplicates, *without* 675 having to use switch statements! Since many compilers die on large 676 switch statements this feature is essential. Furthermore, it appears 677 that the generated code is often *smaller* than that put out by 678 compilers, even though a large, sparse array must be created. 679 Here's the general idea: 680 681 a. Generate the wordlist as a contiguous block of keywords, 682 just as before when using a switch statement. This 683 wordlist *must* be sorted by hash value. 684 685 b. Generate the lookup array, which is an array of signed 686 {chars,shorts,ints}, (which ever allows full coverage of 687 the wordlist dimensions). If the value v, where v = 688 lookup[hash(str,len)], is >= 0 and < TOTAL_KEYWORDS, then we 689 simply use this result as a direct access into the wordlist 690 array to snag the keyword for comparison. 691 692 c. Otherwise, if v is < -TOTAL_KEYWORDS or > TOTAL_KEYWORDS 693 this is an indication that we'll need to search through 694 some number of duplicates hash values. Using a hash 695 linking scheme we'd then index into a different part of 696 the hash table that provides the starting index and total 697 length of the duplicate entries to find via linear search! 698 699Sun Nov 12 13:48:10 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 700 701 * Simplified Key_List::output_min_max considerably by recognizing 702 that since the keyword list was already sorted by hash value finding 703 the min and max values is trivial! 704 705 * Improved the debugging diagnostics considerably in classes Key_List, 706 Hash_Table, and Gen_Perf. 707 708 * Modified the `-s' option so that a negative argument is now 709 interpreted to mean `allow the maximum associated value to be 710 about x times *smaller* than the number of input keys.' This 711 should help prevent massive explosion of generated hash table 712 size for large keysets. 713 714Sat Nov 11 11:31:13 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 715 716 * Added a field in class Key_List that counts the total number 717 of duplicate keywords, both static and dynamic. 718 719 * Added a new member function Bool_Array that deletes the dynamic 720 memory allocated to Bool_Array::storage_array. This space may 721 be needed for subsequent options, so it made sense to free it as 722 soon as possible... 723 724 * Renamed file/class Alpha_Vectors to Vectors, to avoid problems 725 with 14 character length filenames on SYSV. Also changed file 726 adapredefined.gperf to adadefs.gperf in the ./tests directory. 727 728 * Modified class Options by changing the member function 729 Options::total_positions to Options::get_charset_size and 730 Options::set_charset_size. These two routines now either return 731 the total charset size *or* the length of the largest keyword 732 if the user specifies the -k'*' (ALLCHARS) option. This change 733 cleans up client code. 734 735 * Merged all the cperf changes into gperf. 736 737 * Made sure to explicitly initialize perfect.fewest_collisions to 738 0. 739 740 * Cleaned up some loose ends noticed by Nels Olson. 741 1. Removed `if (collisions <= perfect.fewest_collisions)' 742 from Gen_Perf::affects_prev since it was superfluous. 743 2. Removed the fields best_char_value and best_asso_value 744 from Gen_Perf. There were also unnecessary. 745 3. Fixed a braino in the Bool_Array::bool_array_reset 746 function. Since iteration numbers can never be zero 747 the `if (bool_array.iteration_number++ == 0)' must be 748 `if (++bool_array.iteration_number == 0).' 749 4. Modified Std_Err::report_error so that it correctly handles 750 "%%". 751 752 * It is important to note that -D no longer enables -S. 753 There is a good reason for this change, which will become 754 manifested in the next release... (suspense!). 755 756 * Made some subtle changes to Key_List::print_switch so that if finally 757 seems to work correctly. Needs more stress testing, however... 758 759 * Made a major change to the Key_List::print_switch function. 760 The user can now specify the number of switch statements to generate 761 via an argument to the -S option, i.e., -S1 means `generate 1 762 switch statement with all keywords in it,' -S2 means generate 763 2 switch statements with 1/2 the elements in each one, etc. 764 Hopefully this will fix the problem with C compilers not being 765 able to generate code for giant switch statements (but don't 766 hold your breath!) 767 768 * Changed Key_List::length function to Key_List::keyword_list_length. 769 770 * Added a feature to main.c that prints out the starting wall-clock 771 time before the program begins and prints out the ending wall-clock 772 time when the program is finished. 773 774 * Added the GATHER_STATISTICS code in hash-table.c so we can 775 keep track of how well double hashing is doing. Eventually, 776 GATHER_STATISTICS will be added so that all instrumentation 777 code can be conditionally compiled in. 778 779 * Fixed a stupid bug in Key_List::print_switch routine. This 780 was necessary to make sure the generated switch statement worked 781 correctly when *both* `natural,' i.e., static links and dynamic 782 links, i.e., unresolved duplicates, hash to the same value. 783 784 * Modified Bool_Array::~Bool_Array destructor so that 785 it now frees the bool_array.storage_array when it is no longer 786 needed. Since this array is generally very large it makes sense 787 to return the memory to the freelist when it is no longer in use. 788 789 * Changed the interface to constructor Hash_Table::Hash_Table. This 790 constructor now passed a pointer to a power-of-two sized buffer that 791 serve as storage for the hash table. Although this weakens information 792 hiding a little bit it greatly reduces dynamic memory fragmentation, 793 since we can now obtain the memory via a call to alloca, rather 794 than malloc. This change modified Key_List::read_keys calling 795 interface. 796 797 * Since alloca is now being used more aggressively a conditional 798 compilation section was added in main.c. Taken from GNU GCC, 799 this code gets rid of any avoidable limit on stack size so that 800 alloca does not fail. It is only used if the -DRLIMIT_STACK 801 symbol is defined when gperf is compiled. 802 803 * Added warnings in option.c so that user's would be informed 804 that -r superceeds -i on the command-line. 805 806 * Rewrote Gen_Perf::affects_prev. First, the code structure 807 was cleaned up considerably (removing the need for a dreaded 808 goto!). Secondly, a major change occurred so that Gen_Perf::affects_prev 809 returns FALSE (success) when fewest_hits gets down to whatever 810 it was after inserting the previous key (instead of waiting for 811 it to reach 0). In other words, it stops trying if it can 812 resolve the new collisions added by a key, even if there are 813 still other old, unresolved collisions. This modification was 814 suggested by Nels Olson and seems to *greatly* increase the 815 speed of gperf for large keyfiles. Thanks Nels! 816 817 * In a similar vein, inside the Gen_Perf::change routine 818 the variable `perfect.fewest_collisions is no longer initialized 819 with the length of the keyword list. Instead it starts out at 820 0 and is incremented by 1 every time change () is called. 821 The rationale for this behavior is that there are times when a 822 collision causes the number of duplicates (collisions) to 823 increase by a large amount when it would presumably just have 824 gone up by 1 if none of the asso_values were changed. That is, 825 at the beginning of change(), you could initialize fewest_hits 826 to 1+(previous value of fewest_hits) instead of to the number of 827 keys. Thanks again, Nels. 828 829 * Replaced alloca with new in the Gen_Perf::change function. 830 This should eliminate some overhead at the expense of a little 831 extra memory that is never reclaimed. 832 833 * Renamed Gen_Perf::merge_sets to Gen_Perf::compute_disjoint_union 834 to reflect the change in behavior. 835 836 * Added the -e option so users can supply a string containing 837 the characters used to separate keywords from their attributes. 838 The default behavior is ",\n". 839 840 * Removed the char *uniq_set field from LIST_NODE and modified 841 uses of uniq_set in perfect.c and keylist.c. Due to changes 842 to Gen_Perf::compute_disjoint_sets this field was no longer 843 necessary, and its removal makes the program smaller and 844 potentially faster. 845 846 * Added lots of changes/fixes suggested by Nels Olson 847 (umls.UUCP!olson@mis.ucsf.edu). In particular: 848 1. Changed Bool_Array so that it would dynamically create 849 an array of unsigned shorts rather than ints if the 850 LO_CAL symbol was defined during program compilation. 851 This cuts the amount of dynamic memory usage in half, 852 which is important for large keyfile input. 853 2. Added some additional debugging statements that print extra 854 info to stderr when the -d option is enabled. 855 3. Fixed a really stupid bug in Key_List::print_switch 856 A right paren was placed at the wrong location, which broke 857 strlen (). 858 4. Fixed a subtle problem with printing case values when keylinks 859 appear. The logic failed to account for the fact that there 860 can be keylinks *and* regular node info also! 861 5. Changed the behavior of Key_List::read_keys so that it would 862 honor -D unequivocally, i.e., it doesn't try to turn off dup 863 handling if the user requests it, even if there are no 864 immediate links in the keyfile input. 865 6. Modified the -j option so that -j 0 means `try random values 866 when searching for a way to resolve collisions.' 867 7. Added a field `num_done' to the Gen_Perf struct. This is used 868 to report information collected when trying to resolve 869 hash collisions. 870 8. Modified the merge_sets algorithm to perform a disjoint 871 union of two multisets. This ensures that subsequent 872 processing in Gen_Perf::affect_prev doesn't 873 waste time trying to change an associated value that is 874 shared between two conflicting keywords. 875 9. Modified Gen_Perf::affects_prev so that it doesn't try 876 random jump values unless the -j 0 option is enabled. 877 10. Fixed a silly bug in Gen_Perf::change. This problem caused 878 gperf to seg fault when the -k* option was given and the 879 keyfile file had long keywords. 880 881Sun Oct 29 00:18:55 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) 882 883 * Modified class-specific new operations for Read_Line and 884 List_Node so they don't fail if SIZE is larger than twice 885 the previous buffer size. Note we double buffer size 886 everytime the previous buffer runs out, as a heuristic 887 to reduce future calls to malloc. 888 889Sun Oct 22 13:49:43 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 890 891 * Updated gperf version number to 2.0. Send to Doug Lea for 892 incorporation into the long-awaited `official' libg++ 1.36 893 release! 894 895 * Thanks to Nels Olson a silly bug in Gen_Perf::change () 896 was fixed. This problem caused gperf to seg fault when 897 the -k* option was given and the keyfile file had long 898 keywords. 899 900 * Modified Key_List::print_hash_function so that it output 901 max_hash_value + 1 (rather than just max_hash_value) for 902 any associated value entries that don't correspond to 903 keyword charset characters. This should speed up rejection 904 of non-keyword strings a little in some cases. 905 906Sat Oct 21 19:28:36 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 907 908 * Fixed Key_List::print_hash_function so that it no longer output 909 things like `return 0 + ...' Although this probably gets 910 optimized away by even the worst C compilers there isn't any 911 point tempting fate... ;-) 912 913 * Fixed class List_Node's constructor so that it wouldn't a priori 914 refuse to consider trying to hash keys whose length is less 915 than the smallest user-specified key position. It turns out 916 this is not a problem unless the user also specifies the -n 917 (NOLENGTH) option, in which case such keys most likely 918 don't have a prayer of being hashed correctly! 919 920 * Changed the name of the generated lookup table from `Hash_Table' 921 to `asso_value' to be consistent with the gperf paper. 922 923Tue Oct 17 14:19:48 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 924 925 * Added a flag GATHER_STATISTICS in the Makefile. If defined 926 during compilation this turns on certain collection facilities 927 that track the performance of gperf during its execution. In 928 particular, I want to see how many collisions occur for the 929 double hashing Hash_Table. 930 931 * Added a safety check so that we don't screw up if the total 932 number of `resets' of the Bool_Array exceeds MAX_INT. Since 933 this number is around 2^31 it is unlikely that this would ever 934 occur for most input, but why take the risk? 935 936 * Changed the behavior for the -a (ANSI) option so that the 937 generated prototypes use int rather than size_t for the LEN 938 parameter. It was too ugly having to #include <stddef.h> all 939 over the place... 940 941Mon Oct 16 11:00:35 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 942 943 * Continued to work on the gperf paper for the USENIX C++ 944 conference. At some point this will be merged back into 945 the gperf documentation... 946 947Sat Oct 14 20:29:43 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) 948 949 * Added a majorly neat hack to Bool_Array, suggested by rfg. 950 The basic idea was to throw away the Ullman array technique. 951 The Ullman array was used to remove the need to reinitialize all 952 the Bool_Array elements to zero everytime we needed to determine 953 whether there were duplicate hash values in the keyword list. 954 The current trick uses an `iteration number' scheme, which takes 955 about 1/3 the space and reduces the overall program running a 956 time by about 20 percent for large input! The hack works as 957 follows: 958 959 1. Dynamically allocation 1 boolean array of size k. 960 2. Initialize the boolean array to zeros, and consider the first 961 iteration to be iteration 1. 962 2. Then on all subsequent iterations we `reset' the bool array by 963 kicking the iteration count by 1. 964 3. When it comes time to check whether a hash value is currently 965 in the boolean array we simply check its index location. If 966 the value stored there is *not* equal to the current iteration 967 number then the item is clearly *not* in the set. In that 968 case we assign the iteration number to that array's index 969 location for future reference. Otherwise, if the item at 970 the index location *is* equal to the iteration number we've 971 found a duplicate. No muss, no fuss! 972 973Mon Oct 2 12:30:54 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 974 975 * Changed some consts in options.h to enumerals, since g++ 976 doesn't seem to like them at the moment! 977 978Sat Sep 30 12:55:24 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 979 980 * Fixed a stupid bug in Key_List::print_hash_function that manifested 981 itself if the `-k$' option was given (i.e., only use the key[length] 982 character in the hash function). 983 984 * Added support for the -C option. This makes the contents of 985 all generated tables `readonly'. 986 987 * Changed the handling of generated switches so that there is 988 only one call to str[n]?cmp. This *greatly* reduces the size of 989 the generated assembly code on all compilers I've seen. 990 991 * Fixed a subtle bug that occurred when the -l and -S option 992 was given. Code produced looked something like: 993 994 if (len != key_len || !strcmp (s1, resword->name)) return resword; 995 996 which doesn't make any sense. Clearly, this should be: 997 998 if (len == key_len && !strcmp (s1, resword->name)) return resword; 999 1000Tue Sep 26 10:36:50 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1001 1002 * Changed class Read_Line's definition so that it no longer 1003 needs to know about the buffering scheme used to speed up 1004 dynamic memory allocation of input keywords and their 1005 associated attributes. This means that operator new is no longer 1006 a friend of Read_Line. 1007 1008Mon Sep 25 23:17:10 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1009 1010 * Decided that Obstacks had too much overhead, so they were 1011 removed in favor of super-efficient, low-overhead buffered 1012 storage allocation hacks in Read_Line and List_Node. 1013 1014 * No longer try to inline functions that g++ complains about 1015 (Key_List::Merge and Key_List::Merge_Sort). 1016 1017Sun Sep 24 13:11:24 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1018 1019 * Changed classes Read_Line and List_Node to use Obstacks in order 1020 to cache memory allocation for keyword strings and List_Nodes. 1021 1022 * Continued to experiment with inheritance schemes. 1023 1024 * Added a new file `alpha.h', that declares static data shared 1025 (i.e., inherited) between classes List_Node and Key_List. 1026 1027Tue Sep 12 16:14:41 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1028 1029 * Made numerous changes to incorporate multiple inheritance in 1030 gperf. 1031 1032Wed Aug 16 23:04:08 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1033 1034 * Added the -DCOMPILER_FIXED flag to the ./src/Makefile. This 1035 implies that people trying to compile gperf need to have a 1036 working version of the new g++ compiler (1.36.0). 1037 1038 * Removed some extra spaces that were being added in the generated 1039 C code. 1040 1041Mon Jul 24 17:09:46 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1042 1043 * Fixed PRINT_HASH_FUNCTION and PRINT_LOOKUP_FUNCTION in keylist.c 1044 so that the generated functions take an unsigned int length argument. 1045 If -a is enabled the prototype is (const char *str, size_t len). 1046 1047Fri Jul 21 13:06:15 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1048 1049 * Fixed a typo in PRINT_KEYWORD_TABLE in keylist.cc that prevented 1050 the indentation from working correctly. 1051 1052 * Fixed a horrible typo in PRINT_KEYWORD_TABLE in keylist.cc 1053 that prevented links from being printed correctly. 1054 1055Tue Jul 18 16:04:31 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1056 1057 * Fixed up readline.cc and readline.h so that they work OK 1058 with g++ compilers that aren't completely up-to-date. 1059 If symbol COMPILER_FIXED is defined then the behavior 1060 that works on my more recent version of g++ is enabled. 1061 1062Sun Jul 9 17:53:28 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1063 1064 * Changed the ./tests subdirectory Makefile so that it 1065 uses $(CC) instead of gcc. 1066 1067Sun Jul 2 21:52:15 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1068 1069 * Fixed a number of subtle bugs that occurred when -S was 1070 combined with various and sundry options. 1071 1072 * Added the -G option, that makes the generated keyword table 1073 a global static variable, rather than hiding it inside 1074 the lookup function. This allows other functions to directly 1075 access the contents in this table. 1076 1077 * Added the "#" feature, that allows comments inside the keyword 1078 list from the input file. Comment handling takes place in readline.c. 1079 This simplifies the code and reduces the number of malloc calls. 1080 1081 * Also added the -H option (user can give the name of the hash 1082 function) and the -T option (prevents the transfer of the type decl 1083 to the output file, which is useful if the type is already defined 1084 elsewhere). 1085 1086Thu Jun 22 20:39:39 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1087 1088 * Modified many classes so that they would inherit Std_Err as 1089 a base class. This makes things more abstract... 1090 1091Fri Jun 16 14:23:00 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1092 1093 * Modified the -f (FAST) option. This now takes an argument. 1094 The argument corresponds to the number of iterations used 1095 to resolve collisions. -f 0 uses the length of the 1096 keyword list (which is what -f did before). This makes 1097 life much easier when dealing with large keyword files. 1098 1099Tue Jun 6 17:53:27 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1100 1101 * Added the -c (comparison) option. Enabling this 1102 will use the strncmp function for string comparisons. 1103 The default is to use strcmp. 1104 1105 * Fixed a typo in key_list.cc (PRINT_SWITCH). This caused 1106 faulty C code to be generated when the -D, -p, and -t 1107 options were all enabled. 1108 1109Thu May 25 14:07:21 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) 1110 1111 * Once again, changed class Read_Line to overload global operator 1112 new. Hopefully, this will work...! 1113 1114Sun May 21 01:51:45 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1115 1116 * Modified Key_List::print_hash_function () so that it properly 1117 formats the associated values in the hash table according to 1118 the maximum number of digits required to represent the largest 1119 value. 1120 1121 * Removed the named return value from class Hash_Table's 1122 operator (), since this causes a seg fault when -O is enabled. 1123 No sense tripping subtle g++ bugs if we don't have to.... ;-) 1124 1125 * Removed the operator new hack from Read_Line, since this seemed 1126 to create horrible bus error problems. 1127 1128 * Changed many class member functions and data members to be `static', 1129 if they don't manipulate this! 1130 1131Fri May 12 23:06:56 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1132 1133 * Changed class Std_Err to use static member functions, a la 1134 Ada or Modula 2. This eliminates the need for an explicit 1135 error-handler class object. 1136 1137 * Added the ``named return value'' feature to Hash_Table::operator () 1138 and Bool_Array::operator [], just for the heck of it.... ;-) 1139 1140 * Changed the previous hack in Read_Line so that we now use 1141 the overloaded global `new' instead of NEW_STRING! 1142 1143Wed May 3 17:36:55 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1144 1145 * Updated to version 1.7. This reflects the recent major changes 1146 and the new C port. 1147 1148 * Modified the GNU getopt.cc routine to have a class-based interface. 1149 1150 * Fixed a typo in Perfect.cc ~Perfect that prevented the actual maximum 1151 hash table size from being printed (maybe the stream classes 1152 weren't so bad after all.... ;-). 1153 1154 * Added support for the -f option. This generates the perfect 1155 hash function ``fast.'' It reduces the execution time of 1156 gperf, at the cost of minimizing the range of hash values. 1157 1158Tue May 2 16:23:29 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1159 1160 * Added an efficiency hack to Read_Line. Instead of making 1161 a call to operator NEW (a.k.a. malloc) for each input string 1162 a new member function NEW_STRING stores a large buffer from 1163 which new strings are carved out, growing the buffer if 1164 necessary. It might be useful to add this throughout the 1165 program.... 1166 1167 * Removed all unnecessary calls to DELETE. If the program is about 1168 to exit it is silly to waste time freeing memory. 1169 1170 * Added the GNU getopt program to the distribution. This makes 1171 GPERF portable to systems that don't include getopt in libc. 1172 1173 * Added a strcspn member to class Key_List. This also increases 1174 portability. 1175 1176 * Added the get_include_src function from keylist.c as a member 1177 function in class Key_List. Hopefully every function is 1178 now associated with a class. This aids abstraction and 1179 modularity. 1180 1181 * Ported gperf to C. From now on both K&R C and GNU G++ versions 1182 will be supported. There will be two ChangeLog files, one 1183 for each version of the program. 1184 1185Mon May 1 16:41:45 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1186 1187 * Fixed a bug with -k'*'. This now prints out *all* the cases 1188 up to the length of the longest word in the keyword set. 1189 1190Sun Apr 30 12:15:25 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1191 1192 * Removed all use of the stream classes. Too ugly, slow, and 1193 not handled by the c++-mode formatter.... 1194 1195 * Modified the handling of links (i.e., keywords that have 1196 identical hash values as other keywords). This should 1197 speed up hash function generation for keyword sets with 1198 many duplicate entries. The trick is to treat duplicate 1199 values as equivalence classes, so that each set of duplicate 1200 values is represented only once in the main list processing. 1201 1202 * Fixed some capitialization typos and indentations mistakes in 1203 Key_List::print_hash_function. 1204 1205Sat Apr 29 12:04:03 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1206 1207 * Fixed a typo/logico in Key_List::print_switch that prevented 1208 the last keyword in the keyword list to be print out. This 1209 requires further examination..... 1210 1211 * Fixed a stupid bug in List_Node::List_node. If the -k'*' option 1212 was enabled the KEY_SET string wasn't getting terminated with 1213 '\0'! 1214 1215Fri Apr 28 12:38:35 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1216 1217 * Renamed strexp.h and strexp.cc to iterator.h and iterator.cc. 1218 Also changed the strexp class to iterator. Continued to work 1219 on style... 1220 1221 * Updated the version number to 1.6. This reflects all the 1222 recent changes. 1223 1224Thu Apr 27 00:14:51 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1225 1226 * Added the -D option that properly handles keyword sets that 1227 contain duplicate hash values. 1228 1229 * Continued the stylistic changes. Added the #pragma once 1230 directive to all the *.h files. Removed all #defines and 1231 replaced them with static consts. Also moved the key_sort 1232 routine from options.cc into the options class as a 1233 member function. 1234 1235Mon Apr 3 13:26:55 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) 1236 1237 * Made massive stylistic changes to bring source code into 1238 conformance with GNU style guidelines. 1239 1240Thu Mar 30 23:28:45 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1241 1242 * Fixed up the output routines so that they generate code 1243 corresponding to the GNU style guidelines. 1244 1245Sat Mar 11 13:12:37 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1246 1247 * Fixed Stderr constructors so that they wouldn't try to 1248 use the base class initializer syntax for the static 1249 class variable Program_Name. G++ 1.34 is stricter in 1250 enforcing the rules! 1251 1252Fri Mar 10 11:24:14 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1253 1254 * Removed -v and ``| more'' from the Makefile to keep rfg happy... 1255 1256Thu Mar 2 12:37:30 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1257 1258 * Sent latest GNU gperf version 1.5 to Doug Lea for inclusion 1259 into libg++ 1.34. Note that there is a small bug with 1260 the new %{ ... %} source inclusion facility, since it doesn't 1261 understand comments and will barf if %{ or %} appear nested 1262 inside the outermost delimiters. This is too trivial of 1263 a defect to fix at the moment... 1264 1265Tue Feb 28 11:19:58 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1266 1267 * Added the -K option, which allows the user to provide a 1268 alternative name for the keyword structure component. 1269 The default is still ``name.'' 1270 1271 * Added the LEX and YACC-like ability to include arbitrary 1272 text at the beginning of the generated C source code output. 1273 This required two new functions Get_Special_Input, 1274 Key_List::Save_Include_Src; 1275 1276 * Fixed memory allocation bug in Key_List::Set_Types. 1277 Variable Return_Type needs 1 additional location 1278 to store the "*" if the -p option is used. 1279 1280 * Added code to NULL terminate both Struct_Tag and Return_Type, 1281 *after* the strncpy (stupid mistake). 1282 1283Mon Feb 27 14:39:51 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1284 1285 * Added a new option -N. This allows the user to specify the 1286 name to be used for the generated lookup function. The 1287 default name is still ``in_word_set.'' This makes it 1288 possible to completely automate the perfect hash function 1289 generation process! 1290 1291Mon Feb 20 23:33:14 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1292 1293 * Corrected the Hash_Table::operator () function so that 1294 *it* is responsible for deciding when a new key has the 1295 same signature as a previously seen key. The key length 1296 information is now used internally to this function to 1297 decide whether to add to the hash table those keys with 1298 the same key sets, but different lengths. Before, this 1299 was handled by the Key_List::Read_Keys function. However, 1300 this failed to work for certain duplicate keys, since 1301 they weren't being entered into the hash table properly. 1302 1303Sun Feb 19 16:02:51 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1304 1305 * Modified class Options by moving the enum Option_Type out 1306 of the class. This is to satisfy the new enumeration 1307 scope rules in C++. 1308 1309Sun Jan 15 15:12:09 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1310 1311 * Incremented the version number upto 1.4 to reflect the new 1312 options that affect the generated code. Send the new 1313 distribution off to Michael for use with g++ 1.33. 1314 1315 * Added a fix to Key_List::Read_Keys so that it checks for links 1316 properly when the -n option is used. Previously, it didn't 1317 catch obvious links, which caused it to spend large amount 1318 of time searching for a solution that could never occur! 1319 1320 * Modified the Key_List data structure to record *both* the 1321 minimum and the maximum key lengths. This information 1322 is now computed in Key_List::Read_Keys, and thus 1323 Key_List::Print_Min_Max doesn't need to bother. 1324 1325 * Modifed the key position iterator scheme in options.cc to 1326 eliminate the need for member function Options::Advance. 1327 Now, the Options::Get function performs the advancement 1328 automatically, obviating the need for an extra function call. 1329 1330 * Added the new function Options::Print_Options, to print out 1331 the user-specified command line options to generated C 1332 output file. 1333 1334 * Added a new function, Key_List::Print_Keylength_Table, 1335 which creates a table of lengths for use in speeding 1336 up the keyword search. This also meant that a new 1337 option, -l (LENTABLE) is recognized. It controls 1338 whether the length table is printed and the comparison 1339 made in the generated function ``in_word_set.'' 1340 1341 * Added a comment at the top of the generated C code 1342 output file that tells what version of gperf was used. 1343 Next, I'll also dump out the command line options 1344 as a comment too. Thanks to Michael Tiemann for the 1345 feedback on this. 1346 1347 * Fixed the -n option to make it work correctly with 1348 other parts of the program (most notably the Perfect::Hash 1349 function and the computation of minimum and maximum lengths. 1350 1351Fri Jan 13 21:25:27 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) 1352 1353 * Realized the the need to add a test that will enable 1354 optimziation of the generated C code in the ``hash'' function 1355 by checking whether all the requested key positions are 1356 guaranteed to exist due to the comparison in `in_word_set.'' 1357 I'll put this in soon.... 1358 1359Thu Jan 12 20:09:21 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1360 1361 * Added pascal, modula3, and modula2 tests inputs to the 1362 Makefile 1363 1364 * Recognised that there is a bug with the -n option. However 1365 I'm too busy to fix it properly, right now. The problem 1366 is that the generated #define end up being 0, since that's 1367 my hack to make -n work. This needs complete rethinking! 1368 1369Tue Jan 10 00:08:16 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1370 1371 * Added a new option, -n, that instructs gperf to not use the 1372 length of an identifier when computing the hash functions. 1373 I'm not sure how useful this is! 1374 1375 * Retransmitted the distribution to rocky.oswego.edu. Hopefully, 1376 this will work! 1377 1378 * Began fixing the indentation and capitalization to conform 1379 to the GNU coding guidelines. 1380 1381Mon Jan 9 22:23:18 1989 Doug Schmidt (schmidt at pompe.ics.uci.edu) 1382 1383 * Fixed horrible bug in Read_Line::Readln_Aux. This was 1384 a subtle and pernicous off-by-1 error, that overwrote 1385 past the last character of the input string buffer. I 1386 think this fault was killing the vax! 1387 1388 * Yow, fixed an oversight in List_Node::List_Node, where the 1389 pointer field Next was uninitialized. Luckily, the new routine 1390 seems to return 0 filled objects the first time through! 1391 1392Sun Jan 8 13:43:14 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1393 1394 * Modified the ``key linked'' diagnostic in Key_List::Read_Keys 1395 to be more helpful and easy to read. 1396 1397 * Fixed the List_Node::List_Node so that it would ignore trailing 1398 fields if the -t option was not enabled. 1399 1400 * Moved the List_Node declarations out of keylist.h and 1401 into a file of its own, called listnode.cc and listnode.h 1402 Made Set_Sort a member function of class List_Node. 1403 1404 * Massively updated the documentation in the gperf.texinfo file. 1405 1406 * Polished off the major revision to the print functions, 1407 added a few new tests in the Makefile to check for the 1408 validity of the program and ftp'ed the entire distribution 1409 off to Doug Lea for libg++. ( changed it to 1410 1.3 to reflect the major changes with the generated 1411 C code ). 1412 1413 * Fixed Key_List::Print_Switch to deal with the -p and -t options. 1414 This meant that the ``still-born'' function Key_List:: 1415 Print_Type_Switch was superflous, so I removed it. 1416 Also, removed the restriction in Option that the -p and 1417 -t options couldn't be used simultaneously. 1418 1419 * Modified List_Node::List_Node, to perform only 1 call to 1420 ``new'' when dynamically allocating memory for the Key_Set 1421 and the Uniq_Set. 1422 1423Sat Jan 7 14:10:51 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) 1424 1425 * Fixed a big bug with the new policy of nesting the 1426 wordlist inside of generated function ``in_word_set.'' 1427 I'd forgotten to declare the wordlist array as static! 1428 ( arrgh ). 1429 1430 * Added a new function Key_List::Set_Types, that figures out 1431 the return type for generated function ``in_word_set,'' 1432 the user-defined ``struct tag,'' if one is used, and also 1433 formates the array type for the static local array. 1434 1435 * Changed the print routines to take advantage of the 1436 new -p option. 1437 1438 * Began adding the hooks to allow the return of a pointer 1439 to a user defined struct location from the generated 1440 ``in_word_set'' function instead of the current 0 or 1 1441 return value. Created function Key_List::Print_Type_Switch 1442 and added option -p to class Option, allowing the user to 1443 request generation of the aforementioned pointers returned 1444 instead of booleans. 1445 1446 * Put in checks in class Option to make sure that -S and -t 1447 options are not used simultaneously. This restriction 1448 will be removed in subsequent releases, once I decide on 1449 a clean way to implement it. 1450 1451 * Sent version 1.2 to Doug Lea for possible inclusion into 1452 the libg++ distribution. 1453 1454 * Moved the static word_list array inside the generated function 1455 in_word_set. This supports better data hiding. 1456 1457 * Added a texinfo file, gperf.texinfo 1458 1459 * Revised the Makefile to cleanup the droppings from texinfo 1460 and changed the name of gperf.cc and gperf.h to perfect.cc 1461 and perfect.h. 1462 1463Fri Jan 6 13:04:45 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) 1464 1465 * Implemented the switch statement output format. Much better 1466 for large datasets in terms of space used. 1467 1468 * Added new functions to break up the Key_List::Output function. 1469 Functions added were Key_List::Print_Switch, Key_List::Print_Min_Max, 1470 Key_List::Print_Keyword_Table, Key_List::Print_Hash_Function, 1471 and Key_List::Print_Lookup_Function. This simplifies the 1472 big mess in Key_List::Output considerably! 1473 1474 * Added switch statement option to Options, which potentially 1475 trades time for space in the generated lookup code. 1476 1477Thu Jan 5 22:46:34 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) 1478 1479 * Released version 1.1 1480 1481 * Fixed a bug with Gperf::Merge_Set, it was skipping letters shared 1482 between the Set_1 and Set_2. 1483 1484 * Added the optimal min/max algorithm in Key_List::Output. This 1485 runs in O ( 3n/2 ), rather than O ( 2n ) time. 1486 1487 * Changed Gperf::Sort_Set to use insertion sort, rather than 1488 bubble sort. 1489 1490 * Added a check in Key_List::Output for the special case where 1491 the keys used are 1,$. It is possible to generate more 1492 efficient C code in this case. 1493