document w (wildcard MX) and k (checkpoint interval) options
[unix-history] / usr / src / include / db.h
index b4781cc..e1c81bb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)db.h        5.6 (Berkeley) %G%
+ *     @(#)db.h        5.10 (Berkeley) %G%
  */
 
 #ifndef _DB_H_
  */
 
 #ifndef _DB_H_
 
 /* key/data structure -- a data-base thang */
 typedef struct {
 
 /* key/data structure -- a data-base thang */
 typedef struct {
-       unsigned char *data;
+       void *data;
        int size;
 } DBT;
 
 /* access method description structure */
 typedef struct __db {
        int size;
 } DBT;
 
 /* access method description structure */
 typedef struct __db {
-       void *internal;         /* access method private; really void * */
-__BEGIN_DECLS
+       void *internal;         /* access method private */
+#define        DB_BTREE        1
+#define        DB_HASH         2
+#define        DB_RECNO        3
+       int type;               /* type of underlying db */
        int (*close) __P((const struct __db *));
        int (*del) __P((const struct __db *, const DBT *, unsigned int));
        int (*get) __P((const struct __db *, DBT *, DBT *, unsigned int));
        int (*close) __P((const struct __db *));
        int (*del) __P((const struct __db *, const DBT *, unsigned int));
        int (*get) __P((const struct __db *, DBT *, DBT *, unsigned int));
@@ -42,7 +45,6 @@ __BEGIN_DECLS
                unsigned int));
        int (*seq) __P((const struct __db *, DBT *, DBT *, unsigned int));
        int (*sync) __P((const struct __db *));
                unsigned int));
        int (*seq) __P((const struct __db *, DBT *, DBT *, unsigned int));
        int (*sync) __P((const struct __db *));
-__END_DECLS
 } DB;
 
 #define        BTREEMAGIC      0x053162
 } DB;
 
 #define        BTREEMAGIC      0x053162
@@ -66,7 +68,7 @@ typedef struct {
        int bsize;              /* bucket size */
        int ffactor;            /* fill factor */
        int nelem;              /* number of elements */
        int bsize;              /* bucket size */
        int ffactor;            /* fill factor */
        int nelem;              /* number of elements */
-       int ncached;            /* bytes to cache */
+       int cachesize;          /* bytes to cache */
        int (*hash)();          /* hash function */
        int lorder;             /* byte order */
 } HASHINFO;
        int (*hash)();          /* hash function */
        int lorder;             /* byte order */
 } HASHINFO;