none
$ ˆl–äY>” ”ÔD¨ ¥�‚ãM)‹FÿÆ
„‚ðÅÂÈ /• /* gdbm.h - The include file for dbm users. -*- c -*- */
/* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
Copyright (C) 1990-2022 Free Software Foundation, Inc.
GDBM is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GDBM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GDBM. If not, see .
You may contact the author by:
e-mail: phil@cs.wwu.edu
us-mail: Philip A. Nelson
Computer Science Department
Western Washington University
Bellingham, WA 98226
*************************************************************************/
/* Protection for multiple includes. */
#ifndef _GDBM_H_
# define _GDBM_H_
# include
# include
/* GDBM C++ support */
# if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
# endif
/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
can create the database. */
# define GDBM_READER 0 /* A reader. */
# define GDBM_WRITER 1 /* A writer. */
# define GDBM_WRCREAT 2 /* A writer. Create the db if needed. */
# define GDBM_NEWDB 3 /* A writer. Always create a new db. */
# define GDBM_OPENMASK 7 /* Mask for the above. */
# define GDBM_FAST 0x0010 /* Write fast! => No fsyncs. OBSOLETE. */
# define GDBM_SYNC 0x0020 /* Sync operations to the disk. */
# define GDBM_NOLOCK 0x0040 /* Don't do file locking operations. */
# define GDBM_NOMMAP 0x0080 /* Don't use mmap(). */
# define GDBM_CLOEXEC 0x0100 /* Close the underlying fd on exec(3) */
# define GDBM_BSEXACT 0x0200 /* Don't adjust block_size. Bail out with
GDBM_BLOCK_SIZE_ERROR error if unable to
set it. */
# define GDBM_CLOERROR 0x0400 /* Only for gdbm_fd_open: close fd on error. */
# define GDBM_XVERIFY 0x0800 /* Additional consistency checks. */
# define GDBM_PREREAD 0x1000 /* Enable pre-fault reading of mmapped regions. */
# define GDBM_NUMSYNC 0x2000 /* Enable the numsync extension */
/* Parameters to gdbm_store for simple insertion or replacement in the
case that the key is already in the database. */
# define GDBM_INSERT 0 /* Never replace old data with new. */
# define GDBM_REPLACE 1 /* Always replace old data with new. */
/* Parameters to gdbm_setopt, specifying the type of operation to perform. */
# define GDBM_SETCACHESIZE 1 /* Set the cache size. */
# define GDBM_FASTMODE 2 /* Toggle fast mode. OBSOLETE. */
# define GDBM_SETSYNCMODE 3 /* Turn on or off sync operations. */
# define GDBM_SETCENTFREE 4 /* Keep all free blocks in the header. */
# define GDBM_SETCOALESCEBLKS 5 /* Attempt to coalesce free blocks. */
# define GDBM_SETMAXMAPSIZE 6 /* Set maximum mapped memory size */
# define GDBM_SETMMAP 7 /* Toggle mmap mode */
/* Compatibility defines: */
# define GDBM_CACHESIZE GDBM_SETCACHESIZE
# define GDBM_SYNCMODE GDBM_SETSYNCMODE
# define GDBM_CENTFREE GDBM_SETCENTFREE
# define GDBM_COALESCEBLKS GDBM_SETCOALESCEBLKS
# define GDBM_GETFLAGS 8 /* Get gdbm_open flags */
# define GDBM_GETMMAP 9 /* Get mmap status */
# define GDBM_GETCACHESIZE 10 /* Get current cache side */
# define GDBM_GETSYNCMODE 11 /* Get synch mode */
# define GDBM_GETCENTFREE 12 /* Get "centfree" status */
# define GDBM_GETCOALESCEBLKS 13 /* Get free block coalesce status */
# define GDBM_GETMAXMAPSIZE 14 /* Get maximum mapped memory size */
# define GDBM_GETDBNAME 15 /* Return database file name */
# define GDBM_GETBLOCKSIZE 16 /* Return block size */
# d