1\input texinfo @c -*- Texinfo -*- 2@comment %**start of header (This is for running Texinfo on a region.) 3@setfilename gdbm.info 4@settitle gdbm 5@dircategory Programming & development tools 6@direntry 7* GDBM: (gdbm). The GNU database manager. 8@end direntry 9@c @setchapternewpage odd 10@comment %**end of header (This is for running Texinfo on a region.) 11 12@iftex 13@finalout 14@end iftex 15 16@ifinfo 17This file documents the GNU dbm utility. 18 19Copyright (C) 1989-1999 Free Software Foundation, Inc. 20 21Permission is granted to make and distribute verbatim copies of 22this manual provided the copyright notice and this permission notice 23are preserved on all copies. 24 25@ignore 26Permission is granted to process this file through Tex and print the 27results, provided the printed document carries copying permission 28notice identical to this one except for the removal of this paragraph 29(this paragraph not being relevant to the printed manual). 30 31@end ignore 32Permission is granted to copy and distribute modified versions of this 33manual under the conditions for verbatim copying, provided also that 34the entire resulting derived work is distributed under the terms of a 35permission notice identical to this one. 36 37Permission is granted to copy and distribute translations of this manual 38into another language, under the above conditions for modified versions. 39@end ifinfo 40 41@titlepage 42@null 43@sp 6 44@center @titlefont{GNU dbm} 45@sp 2 46@center A Database Manager 47@sp 2 48@center by Philip A. Nelson and Jason Downs 49@sp 4 50@center Manual by Pierre Gaumond, Philip A. Nelson and Jason Downs 51@sp 1 52@center Edition 1.5 53@sp 1 54@center for GNU @code{dbm}, Version 1.8.3. 55@page 56@null 57@vskip 0pt plus 1filll 58Copyright @copyright{} 1993-99 Free Software Foundation, Inc. 59@sp 2 60 61This is Edition 1.5 of the @cite{GNU @code{dbm} Manual}, for @code{gdbm} 62Version 1.8.3. @* 63Last updated October 15, 2002 64 65Published by the Free Software Foundation @* 66675 Massachusetts Avenue, @* 67Cambridge, MA 02139 USA @* 68 69Permission is granted to make and distribute verbatim copies of 70this manual provided the copyright notice and this permission notice 71are preserved on all copies. 72 73Permission is granted to copy and distribute modified versions of this 74manual under the conditions for verbatim copying, provided also that 75the entire resulting derived work is distributed under the terms of a 76permission notice identical to this one. 77 78Permission is granted to copy and distribute translations of this manual 79into another language, under the above conditions for modified versions, 80except that this permission notice may be stated in a translation approved 81by the Free Software Foundation. 82@end titlepage 83@page 84 85@node Top, Copying, (dir), (dir) 86@ifinfo 87GNU @code{dbm} is a library of functions implementing a hashed database 88on a disk file. This manual documents GNU @code{dbm} Version 1.8.3 89(@code{gdbm}). The software was written by Philip A. Nelson. This 90document was originally written by Pierre Gaumond from texts written by 91Phil. 92@end ifinfo 93 94 95@menu 96Introduction: 97 98* Copying:: Your rights. 99* Intro:: Introduction to GNU dbm. 100* List:: List of functions. 101 102Functions: 103 104* Open:: Opening the database. 105* Close:: Closing the database. 106* Store:: Inserting and replacing records in the database. 107* Fetch:: Searching records in the database. 108* Delete:: Removing records from the database. 109* Sequential:: Sequential access to records. 110* Reorganization:: Database reorganization. 111* Sync:: Insure all writes to disk have competed. 112* Errors:: Convert internal error codes into English. 113* Options:: Setting internal options. 114* Locking:: File locking. 115 116Other topics: 117 118* Variables:: Two useful variables. 119* Compatibility:: Compatibility with UNIX dbm and ndbm. 120* Conversion:: Converting dbm files to gdbm format. 121* Bugs:: Problems and bugs. 122@end menu 123 124@node Copying, Intro, Top, Top 125@chapter Copying Conditions. 126This library is @dfn{free}; this means that everyone is free to use 127it and free to redistribute it on a free basis. GNU @code{dbm} (@code{gdbm}) 128is not in the public domain; it is copyrighted and there 129are restrictions on its distribution, but these restrictions are 130designed to permit everything that a good cooperating citizen would want 131to do. What is not allowed is to try to prevent others from further 132sharing any version of @code{gdbm} that they might get from 133you.@refill 134 135 Specifically, we want to make sure that you have the right to give 136away copies @code{gdbm}, that you receive 137source code or else can get it if you want it, that you can change these 138functions or use pieces of them in new free programs, and that you know 139you can do these things.@refill 140 141 To make sure that everyone has such rights, we have to forbid you to 142deprive anyone else of these rights. For example, if you distribute 143copies @code{gdbm}, you must give the recipients all 144the rights that you have. You must make sure that they, too, receive or 145can get the source code. And you must tell them their rights.@refill 146 147 Also, for our own protection, we must make certain that everyone finds 148out that there is no warranty for anything in the @code{gdbm} distribution. 149If these functions are modified by someone else and passed on, we want 150their recipients to know that what they have is not what we distributed, 151so that any problems introduced by others will not reflect on our 152reputation.@refill 153 154@code{gdbm} is currently distributed under the terms of the GNU General 155Public License, Version 2. (@emph{NOT} under the GNU General Library 156Public License.) A copy the GNU General Public License is included with 157the distribution of @code{gdbm}. 158 159@node Intro, List, Copying, Top 160@chapter Introduction to GNU @code{dbm}. 161 162GNU @code{dbm} (@code{gdbm})is a library of database functions that use 163extendible hashing and works similar to the standard UNIX @code{dbm} 164functions. These routines are provided to a programmer needing to 165create and manipulate a hashed database. (@code{gdbm} is @emph{NOT} a 166complete database package for an end user.) 167 168The basic use of @code{gdbm} is to store key/data pairs in a data file. 169Each key must be unique and each key is paired with only one data item. 170The keys can not be directly accessed in sorted order. The basic unit 171of data in @code{gdbm} is the structure: 172 173@example 174 typedef struct @{ 175 char *dptr; 176 int dsize; 177 @} datum; 178@end example 179 180This structure allows for arbitrary sized keys and data items. 181 182The key/data pairs are stored in a @code{gdbm} disk file, called a 183@code{gdbm} database. An application must open a @code{gdbm} database 184to be able manipulate the keys and data contained in the database. 185@code{gdbm} allows an application to have multiple databases open at the 186same time. When an application opens a @code{gdbm} database, it is 187designated as a @code{reader} or a @code{writer}. A @code{gdbm} 188database opened by at most one writer at a time. However, many readers 189may open the database open simultaneously. Readers and writers can not 190open the @code{gdbm} database at the same time. 191 192@node List, Open, Intro, Top 193@chapter List of functions. 194 195The following is a quick list of the functions contained in the @code{gdbm} 196library. The include file @code{gdbm.h}, that can be included by the user, 197contains a definition of these functions. 198 199@example 200#include <gdbm.h> 201 202GDBM_FILE gdbm_open(name, block_size, flags, mode, fatal_func); 203void gdbm_close(dbf); 204int gdbm_store(dbf, key, content, flag); 205datum gdbm_fetch(dbf, key); 206int gdbm_delete(dbf, key); 207datum gdbm_firstkey(dbf); 208datum gdbm_nextkey(dbf, key); 209int gdbm_reorganize(dbf); 210void gdbm_sync(dbf); 211int gdbm_exists(dbf, key); 212char *gdbm_strerror(errno); 213int gdbm_setopt(dbf, option, value, size); 214int gdbm_fdesc(dbf); 215@end example 216 217The @code{gdbm.h} include file is often in the @file{/usr/local/include} 218directory. (The actual location of @code{gdbm.h} depends on your local 219installation of @code{gdbm}.) 220 221@node Open, Close, List, Top 222@chapter Opening the database. 223 224Initialize @code{gdbm} system. If the file has a size of zero bytes, a file 225initialization procedure is performed, setting up the initial structure in the 226file. 227 228The procedure for opening a @code{gdbm} file is: 229 230@example 231GDBM_FILE dbf; 232 233dbf = gdbm_open(name, block_size, flags, mode, fatal_func); 234@end example 235 236The parameters are: 237 238@table @asis 239@item char *name 240The name of the file (the complete name, @code{gdbm} does not append any 241characters to this name). 242@item int block_size 243It is used during initialization to determine the size of various constructs. It 244is the size of a single transfer from disk to memory. This parameter is ignored 245if the file has been previously initialized. The minimum size is 512. 246If the value is less than 512, the file system blocksize is used, otherwise the 247value of @code{block_size} is used. 248@item int flags 249If @code{flags} is set to GDBM_READER, the user wants to just read the 250database and any call to @code{gdbm_store} or @code{gdbm_delete} will fail. 251Many readers can access the database at the same time. If @code{flags} is 252set to GDBM_WRITER, the user wants both read and write access to the database 253and requires exclusive access. If @code{flags} is set to GDBM_WRCREAT, the 254user wants both read and write access to the database and if the database does 255not exist, create a new one. If @code{flags} is set to GDBM_NEWDB, the 256user want a new database created, regardless of whether one existed, and wants 257read and write access to the new database. The following may also be logically 258or'd into the database flags: GDBM_SYNC, which causes all database operations 259to be synchronized to the disk, and GDBM_NOLOCK, which prevents the library 260from performing any locking on the database file. The option GDBM_FAST is 261now obsolete, since @code{gdbm} defaults to no-sync mode. Any error detected 262will cause a return value of NULL and an appropriate value will be in 263@code{gdbm_errno} (see Variables). If no errors occur, a pointer to the 264@code{gdbm} file descriptor will be returned. 265@item int mode 266File mode (see chmod(2) and open(2) if the file is created). 267@item void (*fatal_func) () 268A function for @code{gdbm} to call if it detects a fatal error. The only 269parameter of this function is a string. If the value of NULL is provided, 270@code{gdbm} will use a default function. 271@end table 272 273The return value, @code{dbf}, is the pointer needed by all other functions to 274access that @code{gdbm} file. If the return is the NULL pointer, 275@code{gdbm_open} was not successful. The errors can be found in 276@code{gdbm_errno} for @code{gdbm} errors and in @code{errno} for file system 277errors (for error codes, see @code{gdbm.h}). 278 279In all of the following calls, the parameter @code{dbf} refers to the pointer 280returned from @code{gdbm_open}. 281 282@node Close, Store, Open, Top 283@chapter Closing the database. 284 285It is important that every file opened is also closed. This is needed to 286update the reader/writer count on the file. This is done by: 287 288@example 289gdbm_close(dbf); 290@end example 291 292The parameter is: 293 294@table @asis 295@item GDBM_FILE dbf 296The pointer returned by @code{gdbm_open}. 297@end table 298 299Closes the @code{gdbm} file and frees all memory associated with the file 300@code{dbf}. 301 302@node Store, Fetch, Close, Top 303@chapter Inserting and replacing records in the database. 304 305The function @code{gdbm_store} inserts or replaces records in the database. 306 307@example 308ret = gdbm_store(dbf, key, content, flag); 309@end example 310 311The parameters are: 312 313@table @asis 314@item GDBM_FILE dbf 315The pointer returned by @code{gdbm_open}. 316@item datum key 317The @code{key} data. 318@item datum content 319The data to be associated with the key. 320@item int flag 321Defines the action to take when the key is already in the database. The value 322GDBM_REPLACE (defined in @code{gdbm.h}) asks that the old data be replaced by 323the new @code{content}. The value GDBM_INSERT asks that an error be returned 324and no action taken if the @code{key} already exists. 325@end table 326 327The values returned in @code{ret} are: 328 329@table @asis 330@item -1 331The item was not stored in the database because the caller was not an 332official writer or either @code{key} or @code{content} have a NULL dptr field. 333Both @code{key} and @code{content} must have the dptr field be a non-NULL value. 334Since a NULL dptr field is used by other functions to indicate an error, a NULL 335field cannot be valid data. 336@item +1 337The item was not stored because the argument @code{flag} was GDBM_INSERT and 338the @code{key} was already in the database. 339@item 0 340No error. @code{content} is keyed by @code{key}. The file on disk is updated 341to reflect the structure of the new database before returning from this 342function. 343@end table 344 345If you store data for a @code{key} that is already in the data base, 346@code{gdbm} replaces the old data with the new data if called with 347GDBM_REPLACE. You do not get two data items for the same @code{key} and you do 348not get an error from @code{gdbm_store}. 349 350The size in @code{gdbm} is not restricted like @code{dbm} or @code{ndbm}. Your 351data can be as large as you want. 352 353@node Fetch, Delete, Store,Top 354@chapter Searching for records in the database. 355 356Looks up a given @code{key} and returns the information associated with that 357key. The pointer in the structure that is returned is a pointer to dynamically 358allocated memory block. To search for some data: 359 360@example 361content = gdbm_fetch(dbf, key); 362@end example 363 364The parameters are: 365 366@table @asis 367@item GDBM_FILE dbf 368The pointer returned by @code{gdbm_open}. 369@item datum key 370The @code{key} data. 371@end table 372 373The datum returned in @code{content} is a pointer to the data found. If the 374dptr is NULL, no data was found. If dptr is not NULL, then it points 375to data allocated by malloc. @code{gdbm} does not automatically free this data. 376The user must free this storage when done using it. This eliminates the 377need to copy the result to save it for later use (you just save the pointer). 378 379You may also search for a particular key without retrieving it, using: 380 381@example 382ret = gdbm_exists(dbf, key); 383@end example 384 385The parameters are: 386 387@table @asis 388@item GDBM_FILE dbf 389The pointer returned by @code{gdbm_open}. 390@item datum key 391The @code{key} data. 392@end table 393 394Unlike @code{gdbm_fetch}, this routine does not allocate any memory, and 395simply returns true or false, depending on whether the @code{key} exists, 396or not. 397 398@node Delete, Sequential, Fetch, Top 399@chapter Removing records from the database. 400 401To remove some data from the database: 402 403@example 404ret = gdbm_delete(dbf, key); 405@end example 406 407The parameters are: 408 409@table @asis 410@item GDBM_FILE dbf 411The pointer returned by @code{gdbm_open}. 412@item datum key 413The @code{key} data. 414@end table 415 416The ret value is -1 if the item is not present or the requester is a reader. 417The ret value is 0 if there was a successful delete. 418 419@code{gdbm_delete} removes the keyed item and the @code{key} from the database 420@code{dbf}. The file on disk is updated to reflect the structure of the new 421database before returning from this function. 422 423@node Sequential, Reorganization, Delete, Top 424@chapter Sequential access to records. 425 426The next two functions allow for accessing all items in the database. This 427access is not @code{key} sequential, but it is guaranteed to visit every 428@code{key} in the database once. The order has to do with the hash values. 429@code{gdbm_firstkey} starts the visit of all keys in the database. 430@code{gdbm_nextkey} finds and reads the next entry in the hash structure for 431@code{dbf}. 432 433@example 434key = gdbm_firstkey(dbf); 435 436nextkey = gdbm_nextkey(dbf, key); 437@end example 438 439The parameters are: 440 441@table @asis 442@item GDBM_FILE dbf 443The pointer returned by @code{gdbm_open}. 444@item datum @code{key} 445@item datum nextkey 446The @code{key} data. 447@end table 448 449The return values are both datum. If @code{key}.dptr or nextkey.dptr is NULL, 450there is no first @code{key} or next @code{key}. Again notice that dptr points to 451data allocated by malloc and @code{gdbm} will not free it for you. 452 453These functions were intended to visit the database in read-only algorithms, 454for instance, to validate the database or similar operations. 455 456File @code{visiting} is based on a @code{hash table}. @code{gdbm_delete} 457re-arranges the hash table to make sure that any collisions in the table do not 458leave some item @code{un-findable}. The original key order is NOT guaranteed to 459remain unchanged in ALL instances. It is possible that some key will not be 460visited if a loop like the following is executed: 461 462@example 463@group 464 key = gdbm_firstkey ( dbf ); 465 while ( key.dptr ) @{ 466 nextkey = gdbm_nextkey ( dbf, key ); 467 if ( some condition ) @{ 468 gdbm_delete ( dbf, key ); 469 free ( key.dptr ); 470 @} 471 key = nextkey; 472 @} 473@end group 474@end example 475 476@node Reorganization, Sync, Sequential, Top 477@chapter Database reorganization. 478 479The following function should be used very seldom. 480 481@example 482ret = gdbm_reorganize(dbf); 483@end example 484 485The parameter is: 486 487@table @asis 488@item GDBM_FILE dbf 489The pointer returned by @code{gdbm_open}. 490@end table 491 492If you have had a lot of deletions and would like to shrink the space 493used by the @code{gdbm} file, this function will reorganize the database. 494@code{gdbm} will not shorten the length of a @code{gdbm} file (deleted file space will be 495reused) except by using this reorganization. 496 497This reorganization requires creating a new file and inserting all the elements 498in the old file @code{dbf} into the new file. The new file is then renamed to 499the same name as the old file and @code{dbf} is updated to contain all the 500correct information about the new file. If an error is detected, the return 501value is negative. The value zero is returned after a successful 502reorganization. 503 504@node Sync, Errors, Reorganization, Top 505@chapter Database Synchronization 506 507Unless your database was opened with the GDBM_SYNC flag, @code{gdbm} does not 508wait for writes to be flushed to the disk before continuing. This allows 509faster writing of databases at the risk of having a corrupted database if 510the application terminates in an abnormal fashion. The following function 511allows the programmer to make sure the disk version of the 512database has been completely updated with all changes to the current time. 513 514@example 515gdbm_sync(dbf); 516@end example 517 518The parameter is: 519 520@table @asis 521@item GDBM_FILE dbf 522The pointer returned by @code{gdbm_open}. 523@end table 524 525This would usually be called after a complete set of changes have been 526made to the database and before some long waiting time. 527@code{gdbm_close} automatically calls the equivalent of @code{gdbm_sync} 528so no call is needed if the database is to be closed immediately after 529the set of changes have been made. 530 531@node Errors, Options, Sync, Top 532@chapter Error strings. 533 534To convert a @code{gdbm} error code into English text, use this routine: 535 536@example 537ret = gdbm_strerror(errno) 538@end example 539 540The parameter is: 541 542@table @asis 543@item gdbm_error errno 544The @code{gdbm} error code, usually @code{gdbm_errno}. 545@end table 546 547The appropiate phrase for reading by humans is returned. 548 549@node Options, Locking, Errors, top 550@chapter Seting options. 551 552@code{Gdbm} supports the ability to set certain options on an already 553open database. 554 555@example 556ret = gdbm_setopt(dbf, option, value, size); 557@end example 558 559The parameters are: 560 561@table @asis 562@item GDBM_FILE dbf 563The pointer returned by @code{gdbm_open}. 564@item int option 565The option to be set. 566@item int *value 567A pointer to the value to which @code{option} will be set. 568@item int size 569The length of the data pointed to by @code{value}. 570@end table 571 572The valid options are: 573 574 GDBM_CACHESIZE - Set the size of the internal bucket cache. This 575 option may only be set once on each GDBM_FILE descriptor, and 576 is set automatically to 100 upon the first access to the database. 577 578 GDBM_FASTMODE - Set fast mode to either on or off. This allows 579 fast mode to be toggled on an already open and active database. 580 value (see below) should be set to either TRUE or FALSE. 581 @emph{This option is now obsolete.} 582 583 GDBM_SYNCMODE - Turn on or off file system synchronization operations. This 584 setting defaults to off; value (see below) should be set to either TRUE or 585 FALSE. 586 587 GDBM_CENTFREE - Set central free block pool to either on or off. 588 The default is off, which is how previous versions of @code{Gdbm} 589 handled free blocks. If set, this option causes all subsequent free 590 blocks to be placed in the @emph{global} pool, allowing (in theory) 591 more file space to be reused more quickly. value (see below) should 592 be set to either TRUE or FALSE. 593 @emph{NOTICE: This feature is still under study.} 594 595 GDBM_COALESCEBLKS - Set free block merging to either on or off. 596 The default is off, which is how previous versions of @code{Gdbm} 597 handled free blocks. If set, this option causes adjacent free blocks 598 to be merged. This can become a CPU expensive process with time, though, 599 especially if used in conjunction with GDBM_CENTFREE. value (see below) 600 should be set to either TRUE or FALSE. 601 @emph{NOTICE: This feature is still under study.} 602 603The return value will be -1 upon failure, or 0 upon success. The global 604variable @code{gdbm_errno} will be set upon failure. 605 606For instance, to set a database to use a cache of 10, after opening it 607with @code{gdbm_open}, but prior to accessing it in any way, the following 608code could be used: 609 610@example 611int value = 10; 612ret = gdbm_setopt(dbf, GDBM_CACHESIZE, &value, sizeof(int)); 613@end example 614 615@node Locking, Variables, Options, Top 616@chapter File Locking. 617 618With locking disabled (if @code{gdbm_open} was called with GDBM_NOLOCK), 619the user may want to perform their own file locking on the database file 620in order to prevent multiple writers operating on the same file 621simultaneously. 622 623In order to support this, the @code{gdbm_fdesc} routine is provided. 624 625@example 626ret = gdbm_fdesc(dbf); 627@end example 628 629The single valid parameter is: 630 631@table @asis 632@item GDBM_FILE dbf 633The pointer returned by @code{gdbm_open}. 634@end table 635 636The return value will be the file descriptor of the database. 637 638@node Variables, Compatibility, Locking, Top 639@chapter Two useful variables. 640 641The following two variables are variables that may need to be used: 642 643@table @asis 644@item gdbm_error gdbm_errno 645The variable that contains more information about @code{gdbm} errors 646(@code{gdbm.h} has the definitions of the error values). 647@item char * gdbm_version 648The string containing the version information. 649@end table 650 651@node Compatibility, Conversion, Variables, Top 652@chapter Compatibility with standard @code{dbm} and @code{ndbm}. 653 654GNU @code{dbm} files are not @code{sparse}. You can copy them with the UNIX 655@code{cp} command and they will not expand in the copying process. 656 657There is a compatibility mode for use with programs that already use UNIX 658@code{dbm} and UNIX @code{ndbm}. 659 660GNU @code{dbm} has compatibility functions for @code{dbm}. For @code{dbm} 661compatibility functions, you need the include file @code{dbm.h}. 662 663In this compatibility mode, no @code{gdbm} file pointer is required 664by the user, and Only one file may be opened at a time. All users in 665compatibility mode are assumed to be writers. If the @code{gdbm} file is a 666read only, it will fail as a writer, but will also try to open it as a reader. 667All returned pointers in datum structures point to data that @code{gdbm} WILL 668free. They should be treated as static pointers (as standard UNIX @code{dbm} 669does). The compatibility function names are the same as the UNIX @code{dbm} 670function names. Their definitions follow: 671 672@example 673int dbminit(name); 674int store(key, content); 675datum fetch(key); 676int delete(key); 677datum firstkey(); 678datum nextkey(key); 679int dbmclose(); 680@end example 681 682Standard UNIX @code{dbm} and GNU @code{dbm} do not have the same data 683format in the file. You cannot access a standard UNIX @code{dbm} file with GNU 684@code{dbm}! If you want to use an old database with GNU @code{dbm}, you must 685use the @code{conv2gdbm} program. 686 687Also, GNU @code{dbm} has compatibility functions for @code{ndbm}. For 688@code{ndbm} compatibility functions, you need the include file @code{ndbm.h}. 689 690Again, just like @code{ndbm}, any returned datum can be assumed to be static 691storage. You do not have to free that memory, the @code{ndbm} compatibility 692functions will do it for you. 693 694The functions are: 695 696@example 697DBM *dbm_open(name, flags, mode); 698void dbm_close(file); 699datum dbm_fetch(file, key); 700int dbm_store(file, key, @code{content}, flags); 701int dbm_delete(file, key); 702datum dbm_firstkey(file); 703datum dbm_nextkey(file); 704int dbm_error(file); 705int dbm_clearerr(file); 706int dbm_dirfno(file); 707int dbm_pagfno(file); 708int dbm_rdonly(file); 709@end example 710 711If you want to compile an old C program that used UNIX @code{dbm} or @code{ndbm} 712and want to use @code{gdbm} files, execute the following @code{cc} command: 713 714@example 715cc ... -L/usr/local/lib -lgdbm -lgdbm_compat 716@end example 717 718@node Conversion, Bugs, Compatibility, Top 719@chapter Converting @code{dbm} files to @code{gdbm} format. 720 721The program @code{conv2gdbm} has been provided to help you convert from @code{dbm} 722databases to @code{gdbm}. The usage is: 723 724@example 725conv2gdbm [-q] [-b block_size] dbm_file [gdbm_file] 726@end example 727 728The options are: 729 730@table @asis 731@item -q 732Causes @code{conv2gdbm} to work quietly. 733@item block_size 734Is the same as in @code{gdbm_open}. 735@item dbm_file 736Is the name of the @code{dbm} file without the @code{.pag} or @code{.dir} 737extensions. 738@item gdbm_file 739Is the complete file name. If not included, the @code{gdbm} file name is the 740same as the @code{dbm} file name without any extensions. That is 741@code{conv2gdbm} @code{dbmfile} converts the files @code{dbmfile.pag} and 742@code{dbmfile.dir} into a @code{gdbm} file called @code{dbmfile}. 743@end table 744 745 746@node Bugs, , Conversion, Top 747@chapter Problems and bugs. 748 749If you have problems with GNU @code{dbm} or think you've found a bug, 750please report it. Before reporting a bug, make sure you've actually 751found a real bug. Carefully reread the documentation and see if it 752really says you can do what you're trying to do. If it's not clear 753whether you should be able to do something or not, report that too; it's 754a bug in the documentation! 755 756Before reporting a bug or trying to fix it yourself, try to isolate it 757to the smallest possible input file that reproduces the problem. Then 758send us the input file and the exact results @code{gdbm} gave you. Also 759say what you expected to occur; this will help us decide whether the 760problem was really in the documentation. 761 762Once you've got a precise problem, send e-mail to: 763 764@example 765Internet: @file{bug-gnu-utils@@prep.ai.mit.edu}. 766UUCP: @file{mit-eddie!prep.ai.mit.edu!bug-gnu-utils}. 767@end example 768 769Please include the version number of GNU @code{dbm} you are using. You can get 770this information by printing the variable @code{gdbm_version} (see Variables). 771 772Non-bug suggestions are always welcome as well. If you have questions 773about things that are unclear in the documentation or are just obscure 774features, please report them too. 775 776You may contact the author by: 777@example 778 e-mail: phil@@cs.wwu.edu 779 us-mail: Philip A. Nelson 780 Computer Science Department 781 Western Washington University 782 Bellingham, WA 98226 783@end example 784 785You may contact the current maintainer by: 786@example 787 e-mail: downsj@@downsj.com 788@end example 789 790@bye 791 792 793 794