home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / gdbmcons.h < prev    next >
C/C++ Source or Header  |  1991-03-22  |  2KB  |  60 lines

  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  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 1, 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.         phone:  (206) 676-3035
  27.  
  28. *************************************************************************/
  29.  
  30. /* Start with the constant definitions.  */
  31. #define  TRUE    1
  32. #define  FALSE   0
  33.  
  34. /* Parameters to gdbm_open. */
  35. #define  GDBM_READER  0        /* READERS only. */
  36. #define  GDBM_WRITER  1        /* READERS and WRITERS.  Can not create. */
  37. #define  GDBM_WRCREAT 2        /* If not found, create the db. */
  38. #define  GDBM_NEWDB   3        /* ALWAYS create a new db.  (WRITER) */
  39.  
  40. /* Parameters to gdbm_store for simple insertion or replacement in the
  41.    case a key to store is already in the database. */
  42. #define  GDBM_INSERT  0        /* Do not overwrite data in the database. */
  43. #define  GDBM_REPLACE 1        /* Replace the old value with the new value. */
  44.  
  45.  
  46. /* In freeing blocks, we will ignore any blocks smaller (and equal) to
  47.    IGNORE_SIZE number of bytes. */
  48. #define IGNORE_SIZE 4
  49.  
  50. /* The number of key bytes kept in a hash bucket. */
  51. #define SMALL    4
  52.  
  53. /* The number of bucket_avail entries in a hash bucket. */
  54. #define BUCKET_AVAIL 6
  55.  
  56. /* The size of the bucket cache. */
  57. #ifndef CACHE_SIZE
  58. #define CACHE_SIZE  100
  59. #endif
  60.