source: trunk/third/gdbm/gdbmconst.h @ 15372

Revision 15372, 2.8 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15371, which included commits to RCS files with non-trunk default branches.
Line 
1/* gdbmconst.h - The constants defined for use in gdbm. */
2
3/*  This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
4    Copyright (C) 1990, 1991, 1993  Free Software Foundation, Inc.
5
6    GDBM is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    GDBM is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with GDBM; see the file COPYING.  If not, write to
18    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20    You may contact the author by:
21       e-mail:  phil@cs.wwu.edu
22      us-mail:  Philip A. Nelson
23                Computer Science Department
24                Western Washington University
25                Bellingham, WA 98226
26       
27*************************************************************************/
28
29/* Start with the constant definitions.  */
30#define  TRUE    1
31#define  FALSE   0
32
33/* Parameters to gdbm_open. */
34#define  GDBM_READER  0         /* READERS only. */
35#define  GDBM_WRITER  1         /* READERS and WRITERS.  Can not create. */
36#define  GDBM_WRCREAT 2         /* If not found, create the db. */
37#define  GDBM_NEWDB   3         /* ALWAYS create a new db.  (WRITER) */
38#define  GDBM_OPENMASK 7        /* Mask for the above. */
39#define  GDBM_FAST    0x10      /* Write fast! => No fsyncs.  OBSOLETE. */
40#define  GDBM_SYNC    0x20      /* Sync operations to the disk. */
41#define  GDBM_NOLOCK  0x40      /* Don't do file locking operations. */
42
43/* Parameters to gdbm_store for simple insertion or replacement in the
44   case a key to store is already in the database. */
45#define  GDBM_INSERT  0         /* Do not overwrite data in the database. */
46#define  GDBM_REPLACE 1         /* Replace the old value with the new value. */
47
48/* Parameters to gdbm_setopt, specifing the type of operation to perform. */
49#define  GDBM_CACHESIZE 1       /* Set the cache size. */
50#define  GDBM_FASTMODE  2       /* Turn on or off fast mode.  OBSOLETE. */
51#define  GDBM_SYNCMODE  3       /* Turn on or off sync operations. */
52#define  GDBM_CENTFREE  4       /* Keep all free blocks in the header. */
53#define  GDBM_COALESCEBLKS 5    /* Attempt to coalesce free blocks. */
54
55/* In freeing blocks, we will ignore any blocks smaller (and equal) to
56   IGNORE_SIZE number of bytes. */
57#define IGNORE_SIZE 4
58
59/* The number of key bytes kept in a hash bucket. */
60#define SMALL    4
61
62/* The number of bucket_avail entries in a hash bucket. */
63#define BUCKET_AVAIL 6
64
65/* The size of the bucket cache. */
66#define DEFAULT_CACHESIZE  100
Note: See TracBrowser for help on using the repository browser.