1 2013-12-25 Sergey Poznyakoff <gray@gnu.org.ua>
5 2013-12-25 Sergey Poznyakoff <gray@gnu.org.ua>
9 * src/gdbm_load.c: New options: --mmap, --cache-size and
12 * doc/gdbm.texinfo: Document new gdbm_load options.
13 * doc/gdbm_load.1: Likewise.
15 * src/gdbmdelete.c: Stylistic changes.
16 * src/gdbmstore.c: Likewise.
18 2013-05-21 Sergey Poznyakoff <gray@gnu.org.ua>
20 New function gdbm_count.
22 * configure.ac: Check for unsigned long long, define
23 substitution variable GDBM_COUNT_T.
24 * src/gdbmcount.c: New file.
25 * src/Makefile.am (libgdbm_la_SOURCES): Add gdbmcount.c.
26 * src/bucket.c (_gdbm_read_bucket_at): New function.
27 * src/gdbm.h.in (gdbm_count_t): New typedef.
28 (gdbm_count): New proto.
29 * src/gdbmdefs.h (GDBM_DIR_COUNT): New define.
30 * src/proto.h (_gdbm_read_bucket_at): New proto.
31 * src/var.c: New variable "filemode".
33 * src/gdbmtool.c: Use gdbm_count. Various bugfixes.
36 * doc/gdbm.texinfo: Update.
38 2013-05-17 Sergey Poznyakoff <gray@gnu.org.ua>
43 * doc/gdbm.texinfo: Update.
44 * doc/gdbmtool.1: Document the "define" statement.
45 * src/datconv.c: Rename string datatypes to reflect their
47 (dsprint): Improve output presentation.
49 2013-05-16 Sergey Poznyakoff <gray@gnu.org.ua>
51 Provide support for a simplified "define" construct.
53 * doc/gdbm.texinfo: Document the "define" statement.
54 * src/datconv.c: Support short and ushort data types.
55 * src/gdbmtool.c: Don't call checkdb prior to handling
57 * src/gram.y: Support simplified definition construct:
58 "define key|content type".
60 2013-05-16 Sergey Poznyakoff <gray@gnu.org.ua>
62 Improve handling of the variables.
64 * src/gdbmtool.c (opendb): Allow for unset variables.
65 * src/gram.y: Improve error detection.
66 * src/lex.l: Handle multiline strings.
67 (pe_file_name): file_name can be NULL.
68 * src/var.c (VARF_PROT): New flag. Protects the variable
70 (vartab): Use VARF_PROT if needed.
71 (s2b): Fix return values.
72 (variable_set, variable_unset): Return error if attempting
73 to unset a variable marked with VARF_PROT.
75 * doc/gdbm.info: Update.
76 * doc/gdbmtool.1: Update.
78 2013-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
82 * src/gdbmtool.c (command_tab): Change variable names
83 in docstrings to uppercase.
85 2013-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
87 Implement the "quiet" variable.
89 * src/var.c (vartab) <quiet>: New variable.
90 (variable_is_true): Return 0 if the value cannot be
92 * src/gdbmtool.c (optab): New option --file (-f).
93 (main): Handle the --file option.
94 Retrieve the "quiet" setting from the variable.
95 * src/lex.l (context_pop): Clear both point.file
98 2013-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
100 Add "pager" variable and "unset" command.
102 * src/gdbmtool.c (command_tab) <unset>: New command.
103 (run_command): Get pager value from the variable.
104 * src/gdbmtool.h (VAR_ERR_NOTSET): New error code.
105 (variable_is_true): New function. Replaces variable_is_set,
106 which changed semantics.
107 * src/gram.y: Implement the unset command.
108 * src/var.c: Support the "unset variable" notion.
109 (VARF_INIT): New flag.
110 (VAR_IS_SET): New define.
111 (vartab): Mark initialized variables with VARF_INIT.
112 New variable "pager".
113 (open_hook): v can be NULL.
114 (variable_set): NULL value unsets the variable.
115 (variable_unset): New function.
116 (variable_get): Return VAR_ERR_NOTSET if the variable is
118 (variable_is_true): Renamed from variable_is_set.
119 (variable_is_set): New function.
121 * src/gdbmdefs.h: Fix some typos.
123 2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
125 Change variable handling.
127 * src/util.c: New file.
128 * src/Makefile.am: Add new files.
129 * src/gdbmtool.c (open_mode): New variable.
131 (mkfilename, tildexpand): Move to util.c
132 (opendb): Use open_mode.
133 (import_handler): Likewise.
134 (optab): New option -N (--norc).
136 * src/gdbmtool.h (vparse_error): Rename to vlerror.
137 (parse_error): Rename to lerror.
138 (syntax_error): Rename tp terror.
140 (VAR_ERR_FAILURE): Remove.
141 (VAR_ERR_BADVALUE): New error code.
142 (variable_mode_name): Remove.
143 (mkfilename, tildexpand)
144 (vgetyn, getyn): New protos.
145 * src/lex.l (initialized): New static.
146 (setsource): Set initialized.
147 (vlerror): Print locus only if the lexer has been
149 * src/var.c: Rewrite.
151 2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
153 Provide "open" and "close" commands; implement new variables.
155 * src/datconv.c (datum_format): Don't print field delimiter
156 after the last field.
158 * src/gdbmload.c (gdbm_load_from_file): Return GDBM_NO_DBNAME
159 when loading from bdb dump and the database pointer is NULL.
160 * src/gdbmtool.c (opendb, checkdb): New auxiliary functions.
161 (begin handlers): call checkdb.
162 (import_handler): Special handling for GDBM_NO_DBNAME.
163 (status_handler): Print more info.
164 (command_tab): Call checkdb prior to handlers that expect an
166 New commands: open, close
167 (gdbmarg_string, gdbmarg_datum)
168 (gdbmarg_kvpair): Take pointer to locus as the 2nd argument.
170 (coerce): Include locus info in the diagnostic message.
171 (main): Don't open database right away.
172 * src/gdbmtool.h (GDBMTOOL_DEFFILE): New define.
173 (gdbmarg) <loc>: New member.
174 (VART_INT): New variable typ.e
175 (VAR_ERR_FAILURE): New error code.
176 (variable_is_set, varible_mode_name): New protos.
177 * src/gram.y: Provide printable token names for error messages.
178 Pass locus to gdbmarg initialization functions.
179 * src/lex.l (vparse_error): Fix output.
180 * src/var.c (variable) <v.num, hook, hook_data>: New members.
181 (vartab): Define more variables.
182 (variable_set): Accept value of any valid datatype.
183 (variable_mode_name, variable_is_set): New functions.
185 2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
189 * src/datconv.c (s_float): Use strtod.
190 (datum_scan_notag, datum_scan_tag): Made static.
191 (dsprint): New function.
192 * src/gdbmtool.c (status_handler): Print key and
194 (slist_new): Bugfix (missing return statement).
195 * src/gdbmtool.h: Add new prototypes.
196 * src/lex.l: Remove unused variables, set option
199 2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
201 Implement rc files and "source" command; improve lexical analyzer.
203 * src/gdbmtool.c (interactive): Move to lex.l;
204 (mkfilename, tildexpand): New functions.
205 (command_tab) <source>: New command.
206 (main): Source rc file, if present.
207 * src/gdbmtool.h (setsource): Change return type
209 * src/lex.l: Implement context stack.
210 Change DEF to be an exclusive state.
212 * src/gdbmapp.h (estrdup): Argument is const.
213 * src/mem.c: Likewise.
215 2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
217 Add support for Berkeley dump format version 3 (read-only).
219 * src/gdbmapp.h: Include gettext.h and locale.h.
220 * src/gdbmload.c: Support for Berkeley dump format,
223 2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
225 Remove the "read" command. Use "import" instead.
227 2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
229 Add "set" and "define" to the main command table.
231 * src/gdbmtool.c: Include gram.h
232 (command) <tok>: New member.
233 (command_tab): List "define" and "set".
234 (find_command): Rewrite as command_lookup, with different
235 return type and signature.
236 (run_command): Take struct command * as its first argument.
237 * src/gdbmtool.h (command_lookup): New proto.
238 (run_command): Change signature.
239 (datadef_locate): Rename to datadef_lookup. All uses changed.
240 * src/gram.y: Update.
241 * src/lex.l: Change handling of IDENT rules.
243 2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
245 Implement shell variables in gdbmtool.
247 * src/var.c: New file.
248 * src/Makefile.am: Add var.c
249 * src/datconv.c (datum_format): Remove the "delim"
250 parameter, use "delim1" and "delim2" shell variables
252 * src/gdbmtool.c: Remove "prompt" command. Use "set ps[12]"
254 (print_prompt): Move to lex.l
255 * src/gdbmtool.h (variable_set)
256 (variable_get, variable_print_all): New protos.
257 * src/gram.y: Handle the "set" command.
260 2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
262 Handle structured key and content data in gdbmtool.
264 * src/datconv.c: New file.
265 * src/Makefile.am (gdbmtool_SOURCES): Add datconv.c.
266 * src/gdbmtool.h (slist, kvpair): New structures.
267 (gdbmarg): Keep various types of data depending on the
268 value of the type member.
269 (slist_new, slist_free)
270 (kvpair_string, kvpair_list): New protos.
271 (gdbmarg_new): Remove.
272 (gdbmarg_string, gdbmarg_datum)
273 (gdbmarg_kvpair, gdbmarg_free)
274 (gdbmarg_destroy): New protos.
275 (xd_expand, xd_store, datadef_locate): New protos.
276 (field, dsegm): New structs.
277 (dsegm_new, dsegm_new_field, dsegm_free_list): New protos.
278 * src/gdbmtool.c: Rewrite.
279 * src/gram.y: Change grammar to allow for defining key and
280 content structure and for supplying structured data as arguments
281 to fetch, store and similar functions.
282 * src/lex.l: Handle new token types.
284 * tests/dtload.c (main): Fix parser.
285 * tests/gtload.c: Likewise.
287 2013-05-11 Sergey Poznyakoff <gray@gnu.org.ua>
289 Rewrite gdbmtool parser.
291 * src/testgdbm.c: Remove.
292 * src/gdbmtool.c: New file.
293 * src/gdbmtool.h: New file.
294 * src/gram.y: New file.
295 * src/lex.l: New file.
296 * src/Makefile.am: Update.
298 2013-05-09 Sergey Poznyakoff <gray@gnu.org.ua>
300 Add new prompt escapes.
302 * src/testgdbm.c: New prompt escapes: %p, %P, %v, %_.
303 Change default prompt to %p>%_.
304 * doc/gdbmtool.1: Document new prompt escapes.
306 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
308 Rename testgdbm to gdbmtool. Improve documentation.
310 * configure.ac: Fix a typo.
311 * src/.cvsignore: Add gdbmtool
312 * src/Makefile.am: Rename testgdbm to gdbmtool. Source
313 file not renamed because of CVS deficiency.
314 * src/gdbm_dump.c: Enable NLS.
315 * src/gdbm_load.c: Likewise.
316 * src/testgdbm.c: New option -q (--quiet).
318 * doc/Makefile.am (man_MANS): Add new manpages.
319 * doc/gdbmtool.1: New file.
320 * doc/gdbm_load.1: New file.
321 * doc/gdbm_dump.1: New file.
322 * doc/gdbm.3: Update.
323 * doc/gdbm.texinfo: Update.
325 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
327 * configure.ac: (AC_INIT): Add webpage URL.
329 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
331 Improve testgdbm; install some more bugfixes.
333 * src/gdbmdefs.h: Fix typo in a comment.
334 * src/gdbmdump.c (gdbm_dump_to_file): Improve error
336 * src/testgdbm.c: Improve interactive usage.
337 (command) <minlen>: Rename to len.
338 (command_tab): Initialize len.
339 (set_minimal_abbreviations): Remove.
340 (sort_commands): New function.
341 (find_command): Print possible alternatives in case of
343 (main): Reset param.argc after freeing previous arguments.
344 Continue silently if find_command returns NULL.
346 2013-05-07 Sergey Poznyakoff <gray@gnu.org.ua>
350 * src/gdbmreorg.c: Call _gdbm_mapped_init when the database
351 structure is fully initialized (Puszcza bug #171).
353 2013-05-07 Sergey Poznyakoff <gray@gnu.org.ua>
357 * configure.ac: Require autoconf 2.69 or newer (in response
358 to Puszcza bug #171).
360 2012-03-21 Sergey Poznyakoff <gray@gnu.org.ua>
362 * tests/create00.at: Use cmp -s || diff -u instead of plain
363 diff, because the latter produces extra output on some systems
365 * tests/dbmcreate00.at: Likewise.
366 * THANKS: Add Bill Jones
368 2011-11-16 Sergey Poznyakoff <gray@gnu.org.ua>
372 * src/mem.c (ealloc_die): Return EXIT_FATAL to the shell.
373 * src/testgdbm.c: Use emalloc, erealloc and estrdup for memory
375 (syntax_error): New function.
376 (handler_param): New struct.
377 (all handlers): Change signature. Take a pointer to struct
378 handler_param as argument.
379 (export_handler,import_handler): Handle new formats.
380 (main): Take first argument to be the file name.
381 (optab): Remove -f argument. Hide -g, but retain it for
382 backward compatibility.
384 * doc/gdbm.texinfo: Update.
386 2011-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
390 Update the docs. Improve dump/load utilities.
392 * doc/gdbm.texinfo: Reorganize the material. Document gdbm_load
393 and gdbm_dump utilities.
394 * src/gdbm.h.in (GDBM_META_MASK_MODE)
395 (GDBM_META_MASK_OWNER): New constant.
396 (gdbm_load,gdbm_load_from_file): Take an additional argument:
397 meta_flags, which masks out restoring certain meta-data.
398 * src/gdbm_dump.c: Remove -b option. The -H option takes symbolic
399 format names. Use the standard exit codes.
400 * src/gdbm_load.c: New options: --mode, --user and --no-meta.
401 Use the standard exit codes.
402 * src/gdbmapp.h (EXIT_OK, EXIT_FATAL, EXIT_MILD)
403 (EXIT_USAGE): New constants.
404 * src/gdbmload.c (gdbm_load,gdbm_load_from_file): Take an
405 additional argument, which masks out restoring certain meta-data.
407 2011-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
409 Return a meaningful error code if failed to restore file's metadata.
411 * src/gdbm.h.in (GDBM_ERR_FILE_OWNER)
412 (GDBM_ERR_FILE_MODE): New error codes.
413 (_GDBM_MAX_ERRNO): Update.
414 * src/gdbmerrno.c (gdbm_errlist): Add new error codes.
415 * src/gdbmload.c (_set_gdbm_meta_info): Set gdbm_errno and
416 return 1 in case of errors.
417 (_gdbm_load_file): Propagate the return value from
420 * src/gdbm_load.c (main): Handle mild error conditions.
421 * export/export.c (usage): Print the GDBM version the program is
423 * doc/gdbm.texinfo: Document changes.
425 2011-11-14 Sergey Poznyakoff <gray@gnu.org.ua>
427 * doc/gdbm.texinfo (Error codes): Document new flat format and
429 * po/POTFILES.in: Update
431 2011-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
433 Implement new dump format. Add new utilities: gdbm_dump and gdbm_load.
435 * configure.ac (AC_CHECK_HEADERS): Don't check for files that must
436 always be present. Check for getopt.h.
437 (AC_CHECK_FUNCS): Add getopt_long
438 * src/systems.h: Include useless #if's.
440 * src/flatfile.c: Split into two files:
441 * src/gdbmexp.c: ... this and ...
442 * src/gdbmimp.c: .., this
444 * src/mem.c: New file.
445 * src/base64.c: New file.
446 * src/gdbm_dump.c: New file.
447 * src/gdbm_load.c: New file.
448 * src/gdbmapp.h: New file.
449 * src/gdbmdump.c: New file.
450 * src/gdbmload.c: New file.
451 * src/parseopt.c: New file.
452 * src/progname.c: New file.
453 * src/.cvsignore: Update.
454 * src/Makefile.am (libgdbm_la_SOURCES): Add new files.
455 (noinst_LIBRARIES): New variable. Build libgdbmapp.a.
456 (libgdbmapp_a_SOURCES): New variable.
457 (bin_PROGRAMS): Add gdbm_load and gdbm_dump
458 (testgdbm_LDADD, gdbm_load_LDADD)
459 (gdbm_dump_LDADD): Add ./libgdbmapp.a
461 * src/gdbm.h.in: Include <stdio.h>
462 (gdbm_export_to_file)
463 (gdbm_import_from_file): New prototypes.
464 (GDBM_DUMP_FMT_BINARY,GDBM_DUMP_FMT_ASCII): New constants.
465 (gdbm_dump,gdbm_load)
466 (gdbm_dump_to_file,gdbm_load_from_file): New prototypes.
467 (GDBM_NO_DBNAME): New error code.
468 (_GDBM_MAX_ERRNO): Update.
469 * src/gdbmdefs.h (_GDBM_MAX_DUMP_LINE_LEN): New constant.
470 * src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_NO_DBNAME.
471 * src/proto.h (_gdbm_base64_encode,_gdbm_base64_decode)
472 (_gdbm_load,_gdbm_dump): New prototypes.
474 * src/testgdbm.c: Use gdbmapp interface for option parsing.
476 * export/export.c: Include gdbmexp.c
477 * export/.cvsignore: Update.
478 * doc/gdbm.texinfo: Update.
480 2011-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
484 * NEWS: Raise version number.
485 * configure.ac: Raise version number.
487 2011-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
489 Implement cloexec in gdbm_reorganize. Add test cases.
491 * compat/dbmopen.c: Apply O_CLOEXEC to newly created dir
494 * src/gdbmdefs.h (gdbm_file_info) <cloexec>: New member.
495 * src/gdbmopen.c (gdbm_open): Initialize cloexec member.
496 * src/gdbmreorg.c (gdbm_reorganize): Propagate cloexec bit
499 * tests/.cvsignore: Update.
500 * tests/cloexec00.at: New test case.
501 * tests/cloexec01.at: Likewise.
502 * tests/cloexec02.at: Likewise.
503 * tests/cloexec03.at: Likewise.
504 * fdop.c: New auxiliary program.
505 * g_open_ce: New test program.
506 * g_reorg_ce: New test program.
507 * d_creat_ce: New test program.
508 * tests/Makefile.am: Add new test cases and test programs.
509 * tests/testsuite.at: Include new test cases.
510 * doc/gdbm.texinfo: Minor change.
512 2011-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
514 Use SEEK_SET instead of L_SET in all sources.
516 2011-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
518 Support close-on-exec flag for gdbm_open call.
520 * src/gdbm.h.in (GDBM_CLOEXEC): New flag.
521 * src/systems.h [O_CLOEXEC]: Provide a placeholder definition.
523 * src/gdbmopen.c (gdbm_open): Honor the GDBM_CLOEXEC flag.
524 * compat/dbmopen.c (ndbm_open_dir_file0): Mask out open mode
525 before comparing with GDBM_READER.
526 Support GDBM_CLOEXEC.
527 (dbm_open): Translate O_CLOEXEC to GDBM_CLOEXEC.
529 * doc/gdbm.texinfo: Document GDBM_CLOEXEC.
533 2011-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
535 Fix handling of NDBM databases in read-only mode.
537 * compat/dbmopen.c (ndbm_open_dir_file0): Open dir file in
538 read-only mode if the database is being opened as GDBM_READER.
539 * tests/dbmcvt.at: New file.
540 * tests/dbmfetch02.at: New file.
541 * tests/dbmfetch03.at: New file.
542 * tests/Makefile.am (TESTSUITE_AT): Add new files.
543 * tests/testsuite.at: Include new testcases.
545 2011-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
549 Tolerate I/O operations returning less bytes than expected. Retry I/O
552 * src/fullio.c: New file.
553 * src/Makefile.am (libgdbm_la_SOURCES): Add fullio.c
554 * src/proto.h (_gdbm_full_read)
555 (_gdbm_full_write): New protos.
556 * src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_FILE_EOF.
558 * src/bucket.c: Use _gdbm_full_{read|write}.
559 * src/falloc.c: Likewise.
560 * src/findkey.c: Likewise.
561 * src/gdbmopen.c: Likewise.
562 * src/gdbmstore.c: Likewise.
563 * src/testgdbm.c: Likewise.
564 * src/update.c: Likewise.
566 2011-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
568 * src/gdbmopen.c (gdbm_open): Initialize memory used for file
569 header. This fixes bug #151.
571 2011-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
573 Implement multi-character commands in testgdbm.
575 * bootstrap (get_po): Discard output from cmp.
576 * src/testgdbm.c: Implement multi-character commands.
577 * doc/gdbm.texinfo: Update.
579 2011-08-18 Sergey Poznyakoff <gray@gnu.org.ua>
581 * bootstrap: Get PO files; create LINGUAS list
582 * po/.cvsignore: Add LINGUAS.
584 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
586 Make sure errno is preserved, if it can contain details about the
589 * src/gdbmdefs.h (SAVE_ERRNO): New macro.
590 * src/gdbmopen.c: Use SAVE_ERRNO where it is important to
591 preserve system errno.
592 * src/mmap.c: Likewise.
594 * doc/gdbm.texinfo: Document which gdbm errors can
595 be detailed by inspecting the system errno.
597 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
599 Introduce new error code.
601 * configure.ac, NEWS: Raise patchlevel to 90.
602 * src/gdbm.h.in: Enclose entire file in conditional
604 (GDBM_FILE_STAT_ERROR): New error code.
605 (_GDBM_MAX_ERRNO): Update.
606 * src/gdbmerrno.c (gdbm_errlist): Update.
607 * src/gdbmopen.c: Set GDBM_FILE_STAT_ERROR on fstat
609 * src/gdbmreorg.c: Likewise.
610 * src/mmap.c: Likewise.
611 * src/systems.h: Include errno.h
612 * gdbm.texinfo: Document GDBM_FILE_STAT_ERROR.
614 2011-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
616 Minor housekeeping for Gnits compliance.
618 * README-alpha: New file.
619 * README-hacking: New file.
622 2011-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
624 Internationalization.
626 * Makefile.am (SUBDIRS): Add po.
627 (EXTRA_DIST): Add build-aux/config.rpath.
628 * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
629 * bootstrap: New file.
630 * src/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
631 (noinst_HEADERS): Add gettext.h
632 (LIBADD): New variable.
633 * src/gettext.h: New file.
634 * po/.cvsignore: New file.
635 * po/Makevars: New file.
636 * po/POTFILES.in: New file.
637 * src/gdbmdefs.h: Define DEFAULT_TEXT_DOMAIN, _, N_
639 * src/bucket.c: Add NLS markers.
640 * src/falloc.c: Likewise.
641 * src/findkey.c: Likewise.
642 * src/gdbmerrno.c: Likewise.
643 * src/gdbmfetch.c: Likewise.
644 * src/gdbmseq.c: Likewise.
645 * src/gdbmstore.c: Likewise.
646 * src/update.c: Likewise.
647 * src/testgdbm.c: Add NLS markers.
648 (main): Initialize I18N.
650 2011-08-14 Sergey Poznyakoff <gray@gnu.org.ua>
652 * compat/Makefile.am (libgdbm_compat_la_LIBADD): Link against
653 libgdbm. Suggested by Adam Sampson.
655 2011-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
657 Improve release checking: use gnits.
659 * configure.ac (AM_INIT_AUTOMAKE): Use gnits.
660 (AC_INIT): Remove extra quoting from around version number
664 2011-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
666 Verify preprocessor directives. Pass them through cppi to
667 reflect their nesting level. Affected files:
680 2011-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
682 * NEWS, configure.ac: Version 1.9.1
684 2011-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
686 Bugfixes (pointed out by Matthew Burgess
687 <matthew@linuxfromscratch.org>).
689 * src/gdbmopen.c: Fix a typo.
690 * tests/Makefile.am ($(srcdir)/package.m4): Fix improper
693 2011-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
697 2011-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
699 Add testcases for gdbm_setopt.
701 * tests/gtopt.c: New file
702 * tests/.cvsignore: Update.
703 * tests/setopt00.at: New testcase.
704 * tests/setopt01.at: New testcase.
705 * tests/Makefile.am: Build gtopt. Add setopt00.at and setopt01.at.
706 * tests/testsuite.at: Include setopt00.at and setopt01.at.
708 2011-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
710 New option GDBM_GETDBNAME.
712 * src/gdbm.h.in (GDBM_GETDBNAME): New option.
713 * src/gdbmsetopt.c (gdbm_setopt): Handle GDBM_GETDBNAME.
714 * doc/gdbm.texinfo (Options): Document GDBM_GETDBNAME.
716 2011-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
718 Improve gdbm_setopt interface.
720 * src/gdbm.h.in (GDBM_OPENMASK): New constant.
721 * src/gdbmconst.h: Remove constants duplicated in
723 * src/gdbmdefs.h (gdbm_file_info) <allow_mmap>
724 <mmap_inited>: Replace with a single member: memory_mapping.
726 (GDBM_SETCACHESIZE,GDBM_SETSYNCMODE)
727 (GDBM_SETCENTFREE,GDBM_SETCOALESCEBLKS): New option names.
728 (GDBM_SETMMAP,GDBM_GETMMAP,GDBM_GETFLAGS)
729 (GDBM_GETCACHESIZE,GDBM_GETSYNCMODE,GDBM_GETCENTFREE)
730 (GDBM_GETCOALESCEBLKS,GDBM_GETMAXMAPSIZE): New option codes.
731 * src/gdbmsetopt.c: Implement new options.
732 * doc/gdbm.texinfo: Document new options.
734 2011-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
736 Improve memory mapping support.
738 The new code is more flexible and performs better when
739 lots of inserts are being made (e.g. when populating the
740 database with new data).
742 * src/gdbm.h.in (GDBM_SETMAXMAPSIZE): New constant.
743 * src/gdbmconst.h (SIZE_T_MAX): New define.
744 * src/gdbmdefs.h (gdbm_file_info) <cache_size>: Change type
746 <mmap_inited,mapped_size_max>: New member.
747 <mapped_remap>: Remove.
748 * src/gdbmopen.c: Fix a typo.
749 (gdbm_open): Initialize new members.
750 (_gdbm_init_cache): Second argument is size_t.
751 * src/gdbmsetopt.c (gdbm_setopt): Optval argument is void*.
752 Handle GDBM_SETMAXMAPSIZE.
753 Improve error checking.
754 * src/mmap.c (_GDBM_IN_MAPPED_REGION_P): Fix comparison with
756 (_GDBM_NEED_REMAP): Return true if mapped_region is NULL.
757 (SUM_FILE_SIZE): Rewrite.
758 (_gdbm_mapped_unmap): Don't call msync.
759 (_gdbm_internal_remap): Take 2 arguments, the second one
760 giving the new mapped size.
761 Unmap the region prior to remapping it.
762 Always pass NULL as the argument to mmap.
763 (_gdbm_mapped_remap): Rewrite the logic. Change semantics of the
764 third argument. All uses updated.
765 (_gdbm_mapped_init): Reflect the above changes.
766 (_gdbm_mapped_read,_gdbm_mapped_write): Use mmap_inited to decide
767 whether to use mmap, because mapped_region can be reset to zero
768 by another functions (namely, _gdbm_mapped_lseek).
769 Reset mmap_inited to FALSE, if _gdbm_mapped_remap fails.
770 (_gdbm_mapped_lseek): Rewrite offset computations. Invalidate
772 * src/proto.h (_gdbm_init_cache): Change prototype.
773 * src/update.c (write_header, _gdbm_end_update): Remove checks
774 for dbf->mapped_region.
775 * tests/gtload.c: Implement the -maxmap option (set maximal
778 * doc/gdbm.texinfo: Document GDBM_SETMAXMAPSIZE.
780 2011-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
784 * doc/gdbm.texinfo: Document compatibility functions,
785 provide more cross-references.
787 2011-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
789 Implement dbm_error and dbm_clearerr.
791 * compat/ndbm.h (__gdbm_error_to_ndbm): New macro
792 (dbm_error,dbm_clearerr): Provide prototypes instead of
794 (DBM) <_dbm_errno>: New member.
795 * compat/dbmerr.c: New file.
796 * compat/Makefile.am (NDBM_CF): Add dbmerr.c
797 * compat/dbmdelete.c: Make sure _dbm_errno reflects the
799 * compat/dbmfetch.c: Likewise.
800 * compat/dbmseq.c: Likewise.
801 * compat/dbmstore.c: Likewise.
803 2011-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
805 Provide test group descriptors in the testsuite.
807 * tests/atlocal.in (XFAILFILE): Remove.
808 * tests/version.at: Don't create XFAILFILE.
809 * tests/testsuite.at: Add test group banners
810 * tests/dbmcreate00.at (AT_SETUP): Change description.
811 * tests/dbmdel00.at: Likewise.
812 * tests/dbmdel01.at: Likewise.
813 * tests/dbmdel02.at: Likewise.
814 * tests/dbmfetch00.at: Likewise.
815 * tests/dbmfetch01.at: Likewise.
817 2011-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
819 * src/testgdbm.c: Change internal command invocation
820 mechanism: the begin handler (if provided) initializes
821 the invocation and computes the expected number of
822 output lines. If it is greater than the screen size
823 the pager is enabled. End handler (if supplied) cleans
824 up after the invocation.
826 Always use error() for diagnostics.
828 2011-08-06 Sergey Poznyakoff <gray@gnu.org.ua>
830 * doc/Config: New file.
831 * doc/gendocs_template: Rewrite for the new site layout.
833 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
834 Force the use of --enable-libgdbm-compat on distcheck stage.
836 * compat/ndbm.h (DBM) <dirfd>: New member.
837 * src/version.c (gdbm_version_cmp): New function.
838 * compat/dbmclose.c (dbm_close): Close dirfd.
839 * compat/dbmdirfno.c (dbm_dirfno): Return dirfd.
840 * compat/dbmopen.c (dbm_open): Instead of linking
841 pag to dir, create a separate dir file with the version
842 information in it. When opening an existing db in
843 write mode, detect if it has pag linked to dir. If so,
844 break the link and recreate the dir file in new format.
845 This allows GDBM to cooperate with the applications which
846 lock both pag and dir files.
847 * doc/gdbm.texinfo: Document gdbm_version_cmp.
850 2011-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
852 * configure.ac: Require latest autotools. Enable silent mode.
853 * NEWS: Convert to the standard GNU outline format. Add entry
856 2011-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
858 * configure.ac: Require latest autotools. Enable silent mode.
859 * NEWS: Convert to the standard GNU outline format. Add entry
862 2011-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
864 * tests/version.at: Update.
865 * tests/Makefile.am: Define AT_PACKAGE_VERSION_MAJOR,
866 AT_PACKAGE_VERSION_MINOR, and AT_PACKAGE_VERSION_PATCH.
867 * src/lock.c: Shut the gcc warning.
868 * doc/gdbm.texinfo: Minor fixes.
869 * src/testgdbm.c (error): Bugfix.
871 2011-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
873 * src/global.c: Remove.
874 * src/extern.h: Remove.
875 * src/Makefile.am: Remove extern.h and global.c
876 * src/flatfile.c: Don't include extern.h
877 * src/gdbmreorg.c: Likewise.
878 * src/lock.c: Likewise.
879 * src/testgdbm.c: Likewise.
880 * src/gdbmerrno.c (gdbm_errno): New declaration (from
884 * compat/dbm-priv.h: New file.
885 * compat/dbm.h: New file.
886 * compat/ndbm.h: New file.
887 * compat/Makefile.am (include_HEADERS): Add dbm.h and ndbm.h
888 (noinst_HEADERS): Add dbm-priv.h
889 * compat/close.c: Rewrite using ndbm interface.
890 * compat/dbminit.c: Likewise.
891 * compat/delete.c: Likewise.
892 * compat/fetch.c: Likewise.
893 * compat/seq.c: Likewise.
894 * compat/store.c: Likewise.
896 * compat/dbmclose.c: Include nbdm.h.
897 Use the new DBM declaration.
898 * compat/dbmdelete.c: Likewise.
899 * compat/dbmdirfno.c: Likewise.
900 * compat/dbmfetch.c: Likewise.
901 * compat/dbmopen.c: Likewise.
902 * compat/dbmpagfno.c: Likewise.
903 * compat/dbmrdonly.c: Likewise.
904 * compat/dbmseq.c: Likewise.
905 * compat/dbmstore.c: Likewise.
907 * tests/Makefile.am: Add new files.
908 * tests/atlocal.in: Conditionally define COMPAT.
910 * tests/create00.at: Update keywords.
911 * tests/delete00.at: Likewise.
912 * tests/delete01.at: Likewise.
913 * tests/delete02.at: Likewise.
914 * tests/fetch00.at: Likewise.
915 * tests/fetch01.at: Likewise.
917 * tests/gtdel.c: Include progname.h instead of declaring
919 * tests/gtdump.c: Likewise.
920 * tests/gtfetch.c: Likewise.
921 * tests/gtload.c: Likewise.
922 * tests/gtver.c: Likewise.
924 * tests/testsuite.at (AT_COMPAT_PREREQ): New macro.
925 Add compat test cases.
927 * tests/dtload.c: New file.
928 * tests/dtdump.c: New file.
929 * tests/dtdel.c: New file.
930 * tests/dbmcreate00.at: New test case.
931 * tests/dbmfetch00: Likewise.
932 * tests/dbmfetch01: Likewise.
933 * tests/dbmdel00.at: Likewise.
934 * tests/dbmdel01.at: Likewise.
935 * tests/dbmdel02.at: Likewise.
937 2011-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
940 * doc/gdbm.3: Update.
942 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
944 * tests/gtver.c: New file.
945 * tests/Makefile.am (check_PROGRAMS): Add gtver.
946 * tests/.cvsignore: Update.
947 * tests/version.at: Use gtver instead of testgdbm.
949 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
951 * src/gdbm.proto: Remove.
952 * src/gdbm.proto2: Remove.
953 * src/gdbmerrno.h: Remove.
954 * src/gdbm.h.in: New file.
955 * Makefile.am (dist-hook): Remove destination file before
957 * configure.ac: Define Major,Minor numbers and Patchlevel
959 (GDBM_VERSION_MAJOR,GDBM_VERSION_MINOR)
960 (GDBM_VERSION_PATCH): New substitution variables.
961 * src/Makefile.am: Remove rules for building gdbm.h.
962 It is now created by configure.
963 (noinst_HEADERS): Install gdbm.h
964 (EXTRA_DIST): Distribute gdbm.h.in.
966 * src/flatfile.c: Include arpa/inet.h and gdbm.h.
967 * src/gdbmerrno.c: Include gdbm.h.
968 * src/version.c: Include gdbm.h.
969 (gdbm_version_number): New global variable.
971 * doc/gdbm.texinfo: Document gdbm_version_number and
972 GDBM_VERSION_* macros.
974 * src/gdbmopen.c: Remove unused variables, fix format specs.
975 * src/testgdbm.c: Remove unused variables, fix format specs.
977 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
979 * Makefile.am (dist-hook): Replace /*@DIST_DATE@*/ with
980 the actual distribution date.
981 * src/version.c (gdbm_version): Update automatically.
983 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
985 * (all files): Update copyright headers.
987 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
989 * doc/Makefile.am (check-fixmes): New rule.
990 * doc/gdbm.texinfo: Document flat format and related
993 * src/flatfile.c: Minor changes.
994 * src/gdbmerrno.c (gdbm_errlist): Indicate the size of
995 array and document its entries to minimize the possibility
996 of errors when editing it.
997 * src/gdbmerrno.h (gdbm_errlist): New prototype.
999 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
1001 * src/gdbmdefs.h (struct gdbm_file_info) <name>: Remove
1002 the static qualifier.
1004 2011-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
1006 * src/gdbm.proto2: Remove a leftover __P wrapper.
1007 * src/gdbmsetopt.c (gdbm_setopt): Avoid coredumps on NULL
1010 * doc/.cvsignore: Update.
1011 * doc/Makefile.am: Rewrite.
1012 * doc/gdbm.texinfo: Revise.
1013 * doc/gendocs_template: New file.
1014 * doc/untabify.el: New file.
1016 2011-08-02 Sergey Poznyakoff <gray@gnu.org.ua>
1018 * tests/.cvsignore: Update.
1019 * tests/Makefile.am: Add new tests.
1020 * tests/testsuite.at: Likewise.
1021 * tests/gtdump.c: Minor fix.
1022 * tests/gtfetch.c: Likewise.
1023 * tests/delete00.at: New file.
1024 * tests/delete01.at: New file.
1025 * tests/delete02.at: New file.
1026 * tests/gtdel.c: New file.
1028 * Makefile.am (SUBDIRS): Add tests.
1029 * configure.ac: Initialize testsuite.
1030 * src/testgdbm.c: Minor fixes.
1031 * tests/Makefile.am: New file.
1032 * tests/atlocal.in: New file.
1033 * tests/create00.at: New file.
1034 * tests/fetch00.at: New file.
1035 * tests/fetch01.at: New file.
1036 * tests/gtdump.c: New file.
1037 * tests/gtfetch.c: New file.
1038 * tests/gtload.c: New file.
1039 * tests/num2word.c: New file.
1040 * tests/testsuite.at: New file.
1042 * tests/version.at: New file.
1044 * .cvsignore: Update.
1045 * compat/.cvsignore: Update.
1046 * doc/.cvsignore: Update.
1047 * export/.cvsignore: Update.
1048 * src/.cvsignore: Update.
1050 2011-08-01 Sergey Poznyakoff <gray@gnu.org.ua>
1052 * compat/dbminit.c: Remove useless include.
1053 * compat/dbmopen.c: Likewise.
1055 2011-08-01 Sergey Poznyakoff <gray@gnu.org.ua>
1057 * src/testgdbm.c (main): Support --help and --version for
1058 the sake of make distcheck.
1060 2011-08-01 Sergey Poznyakoff <gray@gnu.org.ua>
1062 * src/gdbm.proto: Remove the legacy __P stuff.
1064 2011-08-01 Sergey Poznyakoff <gray@gnu.org.ua>
1066 * Makefile.am (ACLOCAL_AMFLAGS): New variable.
1067 * configure.ac: Use AM_INIT_AUTOMAKE with arguments.
1069 * src/gdbm.proto (GDBM_FILE): Change typedef.
1070 * src/gdbmdefs.h: Include gdbm.h
1071 (datum): Remove duplicate declaration.
1072 (gdbm_file_info): Change to struct gdbm_file_info
1074 * src/proto.h: Use GDBM_FILE instead of gdbm_file_info *.
1075 Remove duplicate declarations.
1077 * src/gdbmopen.c: Use GDBM_FILE instead of gdbm_file_info *.
1078 (gdbm_open): Fix signature to match global declaration.
1080 * compat/dbmclose.c: Use GDBM_FILE instead of gdbm_file_info *.
1081 * compat/dbmdirfno.c: Likewise.
1082 * compat/dbmfetch.c: Likewise.
1083 * compat/dbmopen.c: Likewise.
1084 * compat/dbmpagfno.c: Likewise.
1085 * compat/dbmrdonly.c: Likewise.
1086 * compat/dbmseq.c: Likewise.
1087 * compat/dbmstore.c: Likewise.
1088 * src/bucket.c: Likewise.
1089 * src/extern.h: Likewise.
1090 * src/falloc.c: Likewise.
1091 * src/findkey.c: Likewise.
1092 * src/flatfile.c: Likewise.
1093 * src/gdbmclose.c: Likewise.
1094 * src/gdbmdelete.c: Likewise.
1095 * src/gdbmexists.c: Likewise.
1096 * src/gdbmfdesc.c: Likewise.
1097 * src/gdbmfetch.c: Likewise.
1098 * src/gdbmreorg.c: Likewise.
1099 * src/gdbmseq.c: Likewise.
1100 * src/gdbmsetopt.c: Likewise.
1101 * src/gdbmstore.c: Likewise.
1102 * src/gdbmsync.c: Likewise.
1103 * src/global.c: Likewise.
1104 * src/lock.c: Likewise.
1105 * src/mmap.c: Likewise.
1106 * src/testgdbm.c: Likewise.
1107 * src/update.c: Likewise.
1109 2009-01-03 Sergey Poznyakoff <gray@gnu.org.ua>
1111 * configure.ac: Update bug-reporting address.
1112 * doc/gdbm.texinfo: Likewise.
1113 * INSTALL, doc/version.texi: Remove automatically generated files.
1115 Wed Dec 3 19:29:25 PST 2008 Jason Downs (downsj@downsj.com)
1117 * src/lock.c, src/gdbm.proto, src/proto.h: Disabled/removed
1118 gdbm_locked() for now, it's not needed.
1120 Sun Nov 30 16:48:29 PST 2008 Jason Downs (downsj@downsj.com)
1122 * src/lock.c: Check errno to see if a lock failed because it's already
1123 locked. Add external gdbm_locked() routine to return the
1124 status of locking. Move lock type to the dbf.
1125 * src/gdbmdefs.h: Move lock type to the dbf.
1126 * src/gdbm.proto: Add gdbm_export(), gdbm_import(), and gdbm_locked().
1128 2008-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
1130 * src/lock.c: Remove flock/flock64 distinction.
1132 Sat Nov 29 23:22:24 PST 2008 Jason Downs (downsj@downsj.com)
1133 * configure.ac: Add test for lockf.
1135 * src/lock.c: New file, adds _gdbm_unlock_file() and
1136 _gdbm_lock_file() routines. These attempt to use flock(),
1137 lockf(), and fcntl() locking.
1138 * src/proto.h: Add new prototypes.
1139 * src/systems.h: Remove file locking macros.
1140 * src/gdbmopen.c: Rewrite locking code, use _gdbm_lock_file().
1141 * src/gdbmclose.c, src/gdbmreorg.c: Use _gdbm_unlock_file().
1143 Sat Nov 29 21:19:32 PST 2008 Jason Downs (downsj@downsj.com)
1144 * configure.ac: Add test for sys/termios.h
1146 * src/systems.h: Add macros for Solaris-style 64bit fcntl locks.
1147 * src/testgdbm.c: Add support for opening files without locking.
1148 Add support for opening files without mmap.
1149 Add sys/termios.h include and add check for TIOCWINSZ.
1151 * export/export.c: Add support for opening files without locking.
1153 Mon Oct 29 15:14:53 EET 2007 Sergey Poznyakoff (gray@gnu.org.ua)
1155 * configure.ac (AC_INIT): Add bug-reporting email.
1156 * gdbm.texinfo: Use values.texi for version and edition number and
1158 Document testgdbm and gdbmexport.
1159 Remove obsolete chapter describing conv2gdbm.
1161 * export/export.c: Fix check for argc.
1162 Take name of the output file from the second argument.
1163 Accept -h and -v command line options.
1165 * src/Makefile.am (noinst_PROGRAMS): move to bin_PROGRAMS.
1166 * src/flatfile.c (gdbm_export): Add missing break.
1167 * src/gdbmreorg.c (gdbm_reorganize): Call _gdbm_mapped_init if
1169 * src/testgdbm.c: Improve usage and version output to comply to
1171 Allow to operate on non-nul-terminated ascii data:
1172 (key_z, data_z): New variables.
1173 (key_z_handler, data_z_handler, status_handler): New handlers -
1174 commands 'z', 'Z' and 'S'
1175 All functions using key_data and data_data updated accordingly
1176 (read_from_file): 'r' command takes an optional second arg.
1177 (print_cache_handler): Use pager.
1178 (page_data): Ignore pager for non-interactive usage.
1180 Sun Oct 28 15:50:53 PDT 2007 Jason Downs (downsj@downsj.com)
1182 * configure.ac: Add options for gdbmexport.
1183 * export/Makefile.am, export/export.c: New files, stand alone flat
1185 * COPYING, all source files: Update to GPLv3.
1186 * src/Makefile.ac, compat/Makefile.ac: Move gdbm_compat to compat dir.
1187 * compat: New directory, populate with [n]dbm files.
1188 * src/Makefile.ac: Remove getopt.h.
1189 * testgdbm.c, conv2gdbm.c: Remove getopt.h.
1190 * configure.ac: Remove getopt.
1191 * getopt.h, getopt.c: Remove.
1193 Fri Oct 26 07:43:18 PDT 2007 Sergey Poznyakoff (gray@gnu.org.ua)
1195 * src/Makefile.am (noinst_PROGRAMS): Remove testdbm, testndbm,
1197 * src/gdbmreorg.c (gdbm_reorganize): Call _gdbm_mapped_unmap
1198 * src/testgdbm.c: Redo command handling. Expect arguments to
1199 follow the command, otherwise prompt for them.
1201 Thu Oct 25 09:36:51 PDT 2007 Sergey Poznyakoff (gray@gnu.org.ua)
1203 * src, doc: New directories
1204 * *.[ch], gdbm.proto, gdbm.proto2: Move to src
1205 * gdbm.texi, gdbm.3: Move to doc
1206 * configure.in: Rename to configure.ac, switch to deep structure
1207 * build-aux: Auxiliary dir for autoconf stuff
1208 * Makefile.am, src/Makefile.am, doc/Makefile.am: New file
1210 * src/mmap.c (_gdbm_mapped_remap): Bugfix.
1211 * src/testgdbm.c: New commands '<' - read entries from file and store,
1212 and 'l' - list entire database
1214 Tue Oct 23 19:19:36 PDT 2007 Jason Downs (downsj@downsj.com)
1216 * update.c: Force sync if using mmap.
1218 * gdbmclose.c: Unmap file.
1220 * gdbmopen.c: Initialize mmap.
1222 * gdbmdefs.h: Finish adding mmap support.
1224 * Makefile.in: Add mmap.c.
1226 * mmap.c: New mmap() i/o routines, from Sergey Poznyakoff
1229 Thu Oct 18 18:16:26 PDT 2007
1231 * gdbmdefs.h: Convert a bunch of flags to bit fields.
1233 * gdbmconst.h, gdbm.proto, gdbm.proto2: Add GDBM_NOMMAP and clean up.
1235 * gdbmerrno.c, gdbmerrno.h: New errnos.
1237 * gdbmconst.h, gdbmdefs.h, gdbmopen.c: Implement new magic number(s).
1239 * bucket.c, falloc.c, findkey.c, gdbmopen.c, gdbmstore.c, update.c:
1240 lseek() becomes __lseek().
1242 * bucket.c, falloc.c, gdbmopen.c, gdbmstore.c, update.c: write()
1245 * bucket.c, falloc.c, findkey.c, gdbmopen.c: read() becomes __read().
1247 * gdbmclose.c, gdbmopen.c, gdbmreorg.c, gdbmsync.c, update.c: fsync()
1250 * systems.h: New I/O macros.
1252 * Makefile.in: Library version 4, remove BINOWN/BINGRP.
1254 * autoconf.h.in, configure: Regenerate.
1256 * aclocal.m4, config.guess, config.sub, ltmain.sh: Update.
1258 * systems.h, gdbmfetch.c, gdbmopen.c, gdbmseq.c, gdbmstore.c,
1259 findkey.c: Switch to memcpy() and memcmp().
1261 * configure.in: Add mmap() support, sizeof off_t check, remove bcopy.
1263 * proto.h, gdbmopen.c, update.c: Fatal function now takes a
1266 * All .h and .c files: ANSI function declarations, remove __P macros.
1267 Also minor style fixes.
1269 Tue Oct 15 15:00:11 PDT 2002 Jason Downs (downsj@downsj.com)
1273 * gdbm.3, gdbm.texinfo: 1.8.3.
1275 * version.c: Version 1.8.3., modernize string (release date is in
1278 * gdbmreorg.c: Remove small memory leak.
1280 * Makefile.in: Use more subs from configure, remove mention of SunOS.
1281 Add support for spec'ing an install time prefix via INSTALL_ROOT.
1283 * INSTALL: Remove extra text from top.
1285 * config.guess, config.sub: Update to latest versions.
1287 * autoconf.h.in: Regenerate.
1289 * configure.in: Modernize.
1291 * systems.h: HAVE_ST_BLKSIZE -> HAVE_STRUCT_STAT_ST_BLKSIZE.
1293 Fri Sep 27 16:12:44 PDT 2002 Jason Downs (downsj@downsj.com)
1295 * Makefile.in: Remove `info' target from all, since we don't even
1296 bother installing the one we built anyway.
1298 * Fix a few checks against dbf.read_write.
1300 Wed Sep 25 15:19:00 PDT 2002 Jason Downs (downsj@downsj.com)
1302 * Makefile.in: Remove the dbm and ndbm routines from the main
1303 library, moving them to gdbm_compat. install-compat now
1304 installs the compat headers and the library. Increment the
1305 MAJOR number of the shared library due to the removal of
1306 the compat functions.
1308 * gdbm.3, gdbm.texinfo, version.c: 1.8.1; note gdbm_compat.
1310 * proto.h: Change _gdbm_fatal() to void.
1312 * update.c(_gdbm_fatal): Change function declaration to void.
1314 * update.c(_gdbm_fatal): Change default exit status to 1.
1316 * gdbmopen.c(gdbm_open): Remove setting of flags since we always check
1317 it against the mask.
1319 * testdbm.c, testndbm.c: Added stdlib.h inclusions.
1321 * falloc.c(push_avail_block): Fixed extremely rare case where the
1322 header avail table could fill up, causing us to over flow the
1323 table, corrupting memory, and eventually crashing. Also forced
1324 merging of blocks within the scope of this routine (possibly
1325 should force them whenever the header avail table is being used).
1327 * gdbmerrno.c: Fix error count, there are more than 18.
1329 * gdbmerrno.h: Fix typo; GDBM_OPT_ILLEGAL is 20.
1331 * gdbmopen.c: Fix typo; s/GDBM_OPENMASK/GDBM_WRITER/.
1333 Tue May 18 19:25:25 PDT 1999 Jason Downs (downsj@downsj.com)
1335 * gdbm.3, gdbm.texinfo: Update for 1.8.
1337 * Makefile.in, configure.in: Switch to using libtool, but without
1340 * aclocal.m4, config.guess, config.sub, ltconfig, ltmain.sh: New
1341 files (libtool 1.2).
1343 Wed May 12 01:26:15 PDT 1999 Jason Downs (downsj@downsj.com)
1345 * gdbmopen.c, gdbmclose.c, gdbmreorg.c: check file_locking before
1346 calling locking macros; add support for setting GDBM_NOLOCK in
1349 * gdbmdefs.h: add file_locking flag to gdbm_file_info.
1351 * gdbmconst.h, gdbm.proto: add GDBM_NOLOCK flag.
1353 * gdbmfdesc.c: new file, adds external gdbm_fdesc() routine.
1355 * gdbm.proto, gdbm.proto2: clean up, use __P, and compress.
1357 * gdbmerrno.h: kill the enum, add defines for errors.
1359 * gdbmsetopt.c, testgdbm.c: support GDBM_SYNC/GDBM_SYNCMODE.
1361 * gdbmopen.c: gdbm_open() now DEFAULTS to ``fast mode''; use
1362 GDBM_SYNC to turn it off. GDBM_FAST is obsolete and ignored.
1364 * gdbmconst.h: add GDBM_SYNC and GDBM_SYNCMODE.
1366 * proto.h, various source files: switch _ARGS to __P.
1368 * systems.h, various source files: kill word_t, just use int
1371 * configure.in, autoconf.h.in: remove alloca() goo and modernize.
1373 * many source files: replace all instances of alloca() with real
1374 malloc()s and free()s.
1376 * update.c: don't deref NULL in _gdbm_fatal(), and don't use stdio.
1378 [ The following are entries revived from a dead experimental branch. ]
1380 Tue Nov 1 00:35:11 1994 Jason Downs (downsj@downsj.com)
1382 * gdbmopen.c (gdbm_open): actually initialize central_free and
1385 * gdbmdefs.h: added coalesce_blocks. these should've been bitmapped.
1388 * falloc.c (various routines): made block merging an option.
1390 * gdbmsetopt.c (gdbm_setopt): added GDBM_COALESCEBLKS option.
1392 * gdbmconst.h: added GDBM_COALESCEBLKS option.
1394 Fri Jun 3 09:45:19 1994 Jason Downs (downsj@downsj.com)
1396 * falloc.c (_gdbm_free): if central_free is set, all blocks are
1397 put into the header.
1399 * gdbmsetopt.c (gdbm_setopt): add GDBM_CENTFREE case.
1401 * gdbmdefs.h, gdbmconst.h, gdbm.proto: add central free option.
1403 Fri Jun 3 05:57:36 1994 Jason Downs (downsj@downsj.com)
1405 * falloc.c (pop_avail_block): merge block with header, instead
1406 of replace, since header may not be empty any longer.
1408 * falloc.c (_gdbm_alloc): pop a block off the stack when the
1409 current header is half empty, instead of zero.
1411 Fri Jun 3 05:11:33 1994 Jason Downs (downsj@downsj.com)
1413 * gdbmstore.c (gdbm_store): don't alloc new disk if we're replacing
1414 and the records are the same size. suggested by phil a long time
1417 Fri Jun 3 03:47:46 1994 Jason Downs (downsj@downsj.com)
1419 * falloc.c (_gdbm_put_av_elem): allow adjacent blocks to be
1420 merged. inspired by the enhancement by Tim Howes.
1422 Thu Jun 2 22:15:19 1994 Jason Downs (downsj@downsj.com)
1424 * Makefile.in: add installation mode, owner, and group.
1426 Thu Jun 2 04:24:58 1994 Jason Downs (downsj@downsj.com)
1428 * Makefile.in: run mkinstalldirs before installing files.
1430 * mkinstalldirs: new file.
1432 [ End of revived entries. ]
1434 Thu May 19 15:50:04 1994 Jason Downs (downsj@downsj.com)
1436 * NEWS, README: update to 1.7.3.
1438 * gdbm.texinfo: update to 1.7.3, slight fixes.
1440 * gdbm.3: update to 1.7.3, slight reformat.
1442 Thu May 19 14:45:51 1994 Jason Downs (downsj@downsj.com)
1444 * gdbmconst.h: removed the header magic numbers from this
1447 * version.c: added an include of autoconf.h, updated version
1449 * gdbm.proto: added a define for GDBM_FASTMODE.
1451 Sun May 15 02:39:48 1994 Jason Downs (downsj@downsj.com)
1453 * gdbm.3, gdbm.texinfo: updates for 1.7.2
1455 * README, NEWS, version.c: update for 1.7.2
1457 * Makefile.in: removed files, changed (drastically) how the
1458 package compiles and installs.
1460 * bytewise.c, bytewise.h: removed from this branch.
1462 Wed Mar 23 00:44:43 1994 Jason Downs (downsj@downsj.com)
1464 * extern.h: removed bogus (old) function declarations.
1466 Mon Mar 14 01:37:09 1994 Jason Downs (downsj@downsj.com)
1468 * Makefile.in: added new files.
1470 * bytewise.c, bytewise.h: new portable byte order conversion
1471 package; supports 64bit longs/16bit ints.
1473 Sun Mar 13 22:56:10 1994 Jason Downs (downsj@downsj.com)
1475 * gdbmsetopt.c, gdbmconst.h: added GDBM_FASTMODE option.
1477 * falloc.c: taught _gdbm_alloc() about the header avail table.
1478 hopefully, this will fix the bloating problem. i dunno, though,
1479 as i've never had that problem, myself.
1481 Sun Dec 26 05:17:04 1993 Jason Downs (downsj@downsj.com)
1483 * version.c: made gdbm_version const.
1485 * gdbmerrno.c: made gdbm_strerror() and it's array const.
1487 * various files: general clean up, reformating of code.
1489 * systems.h: put <memory.h> inside of a conditional.
1491 * configure.in, autoconf.h.in: added check for <memory.h>.
1493 * systems.h: added a default define of SEEK_SET.
1495 * bucket.c, gdbmopen.c, gdbmseq.c, gdbmdelete.c, gdbmdefs.h:
1496 cleaned up some uses of word_t.
1498 Tue Nov 16 03:11:56 1993 Jason Downs (downsj@downsj.com)
1500 * gdbm.3, gdbm.texinfo: updated versions to 1.3 for release
1502 * version.c, README, NEWS: updated versions to 1.7.1 for release
1504 Sun Nov 14 17:21:03 1993 Jason Downs (downsj@downsj.com)
1506 * Makefile.in: added $(srcdir) to a few file references.
1508 Sat Nov 13 13:56:37 1993 Jason Downs (downsj@downsj.com)
1510 * gdbm.3, gdbm.texinfo: added new gdbm_firstkey()/gdbm_nextkey()
1513 * gdbmopen.c: added SGI alloca patch.
1515 * Makefile.in: changed installation prefix semantics.
1517 Sat Nov 13 01:52:31 1993 Jason Downs (downsj@downsj.com)
1519 * various source: redid the AIX alloca declaration. any new files
1520 that call alloca will have to start with the same header.
1522 * all source, configure.in, Makefile.in: switched over to using
1523 autoconf.h, rather than packing all of the autoconf defs into
1526 * autoconf.h.in: new file.
1528 * Makefile.in: changed rule for tndbm.o, hopefully making it more
1531 * alloca.c: added inclusion of stdlib.h
1533 Fri Nov 12 13:11:03 1993 Jason Downs (downsj@downsj.com)
1535 * Makefile.in, configure.in: fixed getop related bugs.
1537 * systems.h: moved sys/types.h include to top.
1539 Wed Nov 3 17:18:59 1993 Jason Downs (downsj@downsj.com)
1541 * version.c: changed version to 1.7, for release.
1543 * gdbmdefs.h: Moved all system includes to systems.h.
1545 Sun Oct 31 02:50:12 1993 Jason Downs (downsj@downsj.com)
1547 * version.c: changed version number to 1.7alpha.
1549 * gdbm.texinfo: updated to reflect new routines and changes.
1551 * getopt.c, getopt.h: Added the GNU getopt.c to the dist, for
1552 compilation of testgdbm and conv2gdbm on machines without getopt().
1554 * various source files: changed all appropiate occurances of 'long'
1555 to type 'off_t'. Added off_t check to configure.in.
1557 * gdbm.3: updated to reflect new routines and changes.
1559 Sat Oct 30 05:20:45 1993 Jason Downs (downsj@downsj.com)
1561 * testgdbm.c: Added support for bucket cache and block sizes,
1562 adding -c, -b and -g flags. Must use -g to specify the file
1565 * bucket.c, gdbmopen.c, gdbmclose.c, gdbmreorg.c, update.c,
1566 gdbmconst.h, gdbmdefs.h: Implemented dynamic, delayed
1567 initialization, bucket cache. New routine: _gdbm_init_cache().
1569 * proto.h, gdbmerrno.c, gdbmerrno.h: Added gdbm_setopt() errors
1572 * gdbmsetopt.c: New file, implements the gdbm_setopt() routine.
1574 * testgdbm.c, testndbm.c, testdbm.c, conv2gdbm.c: cleaned up
1577 * update.c: repaired declarations and added prototypes for
1578 static routines, repaired declaration of _gdbm_fatal().
1580 * falloc.c: repaired declarations and added prototypes for
1583 * gdbmstore.c: commented out unsed variables in gdbm_store().
1585 * proto.h: added prototypes for _gdbm_read_entry(),
1586 _gdbm_find_key(), and gdbm_sync().
1588 * bucket.c, proto.h: changed _gdbm_get_bucket() and
1589 _gdbm_write_bucket() over to type void.
1591 Sat Oct 30 00:56:24 1993 Jason Downs (downsj@downsj.com)
1593 * gdbmerrno.c, gdbmexists.c, close.c, dbmrdonly.c: New files,
1594 adding the routines gdbm_strerror(), gdbm_exists(), and for
1595 better compatibility with the old dbm/ndbm libraries, the
1596 dbmclose() and dbm_rdonly() routines.
1598 * various headers: Added prototypes for the new routines, and
1599 rearranged how gdbm.h is generated.
1601 Fri Oct 29 07:02:41 1993 Jason Downs (downsj@downsj.com)
1603 * README: split into README, INSTALL, and NEWS. INSTALL
1604 includes more tips on compiling. NEWS contains the 'short form'
1607 * Makefile.in, configure.in: Redid parts of the autoconf
1608 stuff, and repaired many bugs.
1610 * systems.h: Repaired the alloca declarations, among other
1613 * various source files: changed all relevant usage of type
1614 'long' to type 'word_t', which will always be 32bits wide.
1615 'word_t' is defined in systems.h.
1617 Fri Jul 30 13:27:24 1993 Phil Nelson (phil@cs.wwu.edu)
1619 * findkey.c: Added a check of elem_loc == -1 in determining if
1620 the data cache held the item being looked for.
1622 Tue Jul 20 13:08:47 1993 Phil Nelson (phil at cs.wwu.edu)
1624 * gdbm.texinfo: Fixed some errors.
1626 * Makefile.in: Fixed some errors.
1628 * version.c: Set version to 1.6 for release.
1630 Mon Jul 19 15:02:40 1993 Phil Nelson (phil at cs.wwu.edu)
1632 * COPYING: Replaced Version 1 with Version 2. Also updated
1633 all file notices to refer to version 2.
1635 * gdbm.texinfo: Updated the documentation.
1637 * README: Updated to current version.
1639 * Makefile: updated clean and install.
1641 Wed Jul 14 13:37:44 1993 Phil Nelson (phil at cs.wwu.edu)
1643 * Makfile.in: Added samp1.cc to the list of distributed files.
1645 Sat Jun 5 21:35:59 1993 Phil Nelson (phil at cs.wwu.edu)
1647 * gdbm.proto, Makefile.in: Added #ifndef _GDBM_H_ protection
1648 for the final gdbm.h file. Also added prototypes and C++
1651 * gdbmseq.c: Added gdbm_errno initialization to gdbm_nextkey.
1653 * gdbmerrno.h and others: Moved the extern definition of
1654 gdbm_erron to gdbmerrno.h from the other files.
1656 Mon May 17 12:32:02 1993 Phil Nelson (phil at cs.wwu.edu)
1658 * gdbm.proto: Added GDBM_FAST to the read_write flags.
1660 Sun May 16 12:50:01 1993 Phil Nelson (phil at cs.wwu.edu)
1662 * configure.in, Makefile.in: Added autoconf configuration
1665 Tue Mar 30 00:08:48 1993 Phil Nelson (phil at cs.wwu.edu)
1667 * global.c: Set gdbm_errno to GDBM_NO_ERROR to force
1668 it into the data segment.
1670 Sun Mar 28 22:51:40 1993 Phil Nelson (phil at cs.wwu.edu)
1672 * gdbmfetch.c: Set return_val.dsize to 0 as a default return
1673 value. (I was told that was more compatible with dbm/ndbm.)
1675 * gdbmopen.c: Changed a "sizeof(int)" to "sizeof(long)".
1677 * testgdbm.c: Changed "char opt" to "int opt" to make sure
1680 * hash.c: Added "unsigned" to declaration of value for
1681 better overflow operation.
1683 * gdbmreorg.c: Added a free for data.dptr in the main loop.
1684 Also changed the malloc for new_name to an alloca.
1685 Removed all frees on new_name.
1687 Sat Mar 27 23:25:14 1993 Phil Nelson (phil at cs.wwu.edu)
1689 * gdbmconst.h, gdbmdefs.h, gdbmopen.c, gdbmreorg.c,
1690 testgdbm.c, update.c, gdbm.h: Added code to allow for a
1691 GDBM_FAST mode in which fsync is not called during
1692 database update mode. Added a new flag "-f" to
1693 testgdbm to make use of the new fast mode.
1695 * gdbmsync.c: Added this function to allow a programmer
1696 to use the GDBM_FAST mode but still be able to sync
1699 * gdbmopen.c, gdbmdelete.c, gdbmfetch.c, gdbmseq.c, gdbmstore.c,
1700 gdbmreorg.c: Added initialization of gdbm_errno to GDBM_NO_ERROR.
1702 Mon Mar 22 23:03:36 1993 Phil Nelson (phil at cs.wwu.edu)
1704 * gdbmclose.c: (gdbmclose) Added a fsync before close to make
1705 sure the file is written to disk before continuing.
1707 Sun Mar 21 21:33:31 1993 Phil Nelson (phil at cs.wwu.edu)
1709 * proto.h: Added this as a new file. It adds ANSI prototypes
1712 * gdbmdefs.h: Added an include of proto.h.
1714 * Makefile: Added proper references to proto.h
1716 * gdbmopen.c: Changed (int *) casts to (long *) and added
1717 an initialization to dbf->header.
1719 * gdbmreorg.c: Added an "end update" on the new database and
1720 correctly set up the bucket cache.
1722 * update.c: (_gdbm_end_update) Added type void to header.
1724 Wed Mar 17 19:14:27 1993 Phil Nelson (phil at cs.wwu.edu)
1726 * Changed copyright on all files to include 1993. Also deleted
1727 all references to my phone number.
1729 Thu Feb 28 17:05:09 1991 Phil Nelson (phil at strawberry.cs.wwu.edu)
1731 * Added 1991 to copyright lines on all files.
1733 * gdbmfetch.c: Fixed a bug introduced by previous changes.
1735 * version.c: Updated version to 1.5.
1737 Fri Feb 8 12:27:13 1991 Phil Nelson (phil at strawberry.cs.wwu.edu)
1739 * Change author's e-mail address in all comments.
1741 * gdbmopen.c, systems.h: Changed opening sequence so that a
1742 database will not be truncated in NEWDB mode until the
1743 write has locked the file.
1745 * testgdbm.c: Fixed a bug that caused a segmentation fault on
1746 one computer. Also added the flags "-r" for opening the
1747 database as a READER and "-n" for opening the database as
1748 a NEWDB writer. The default mode remains the WRCREAT mode.
1750 * Various source files, changed the data types of various
1751 variables from int to long. This should not make any difference
1752 to systems where sizeof(int) = sizeof(long). It should make
1753 it easier to move to other systems.
1755 * gdbmstore.c: Added a check for NULL key or content dptr. Due to
1756 NULLs being used as error indications, data cannot be NULL also.
1758 * gdbmfetch.c, gdbmseq.c, fetch.c: Added checks for zero sized
1759 key and content so malloc will not try to allocate zero bytes.
1761 * gdbmconst.h: Added this file so that all constants are in one
1762 central place. A few constants can be changed without changing
1765 Tue Aug 14 13:08:43 1990 Phil Nelson (phil at unicorn.wwu.edu)
1767 * Version 1.4 released. (version.c: Updated to correct version.)
1769 * Makefile: Added $(LIBS) to link for conv2gdbm.
1771 * README: Updated to version 1.4 and added a 1.0-1.4 change
1774 Wed Aug 8 16:57:29 1990 Phil Nelson (phil at unicorn.wwu.edu)
1776 * gdbmopen.c: Restructured some code to initialize dbf
1779 * dbm.h: Added a null define to satisfy some versions that
1780 require a dbmclose() call.
1782 * findkey.c: (_gdbm_findkey) Added a check for the NULL
1783 pointer in ...ca_data.dptr.
1785 * gdbmdelete.c: Added code to more completely remove the
1786 cache entry for a deleted item.
1788 * gdbmreorg.c: Added code to finish the transfer of information
1789 from the new_dbf to the orginal dbf.
1791 Fri May 30 08:29:16 1990 Phil Nelson (phil at unicorn.wwu.edu)
1793 * gdbmstore.c: Changed a strncpy to bcopy.
1795 Tue May 15 09:55:21 1990 Phil Nelson (phil at unicorn.wwu.edu)
1797 * Version 1.3 released.
1799 * systems.h: Changed the defines for alloca to use the
1800 name builtin_alloca to depend on BUILTIN_ALLOCA instead
1801 of __GNUC__. Added a definition of BUILTIN_ALLOCA for
1802 GNUC and for sun sparc.
1804 Fri May 11 12:15:56 1990 Phil Nelson (phil at unicorn.wwu.edu)
1806 * systems.h: Removed the include for <sys/types> and now
1807 systems.h requires <sys/types> included before it.
1809 * Makefile: Corrected the makefile to include a file that
1810 was missing before. Also, switched order of conv2gdbm
1811 and alldbm in the all option.
1813 * findkey.c (_gdbm_read_entry): Reordered some statements
1814 to make the code more readable.
1816 * update.c (_gdbm_fatal): Changed fatal message from "dbm fatal:"
1819 Mon Apr 30 10:18:24 1990 Phil Nelson (phil at unicorn.wwu.edu)
1821 * Version 1.2 released.
1823 Fri Apr 27 09:49:59 1990 Phil Nelson (phil at unicorn.wwu.edu)
1825 * Makefile: Added the dist option. Similar to the
1826 addition from hack@ai.mit.edu, but correct.
1828 * falloc.c (push_avail_block): Change the avail count
1829 to reflect the correct number of entries.
1831 * dbminit.c (dbminit): Changed the stat call to stat the
1832 ".dir" file as is done in dbmopen.c (dbm_open).
1834 Tue Apr 10 12:18:40 1990 Phil Nelson (phil at unicorn.wwu.edu)
1836 * Version 1.1. released.
1838 * gdbmopen.c (gdbm_open): Clear out bucket cache.