SCCS-vsn: lib/libc/db/btree/btree.h 5.8
SCCS-vsn: lib/libc/db/btree/extern.h 5.3
SCCS-vsn: lib/libc/db/btree/bt_close.c 5.5
SCCS-vsn: lib/libc/db/btree/bt_split.c 5.7
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_close.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_close.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
m.m_magic = BTREEMAGIC;
m.m_version = BTREEVERSION;
m.m_psize = t->bt_psize;
m.m_magic = BTREEMAGIC;
m.m_version = BTREEVERSION;
m.m_psize = t->bt_psize;
- m.m_free = 0; /* XXX */
m.m_nrecs = t->bt_nrecs;
m.m_flags = t->bt_flags & SAVEMETA;
m.m_lorder = htonl((u_long)t->bt_lorder);
m.m_nrecs = t->bt_nrecs;
m.m_flags = t->bt_flags & SAVEMETA;
m.m_lorder = htonl((u_long)t->bt_lorder);
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_split.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_split.c 5.7 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
++bt_split;
#endif
/* Put the new right page for the split into place. */
++bt_split;
#endif
/* Put the new right page for the split into place. */
- if ((r = mpool_new(t->bt_mp, &npg)) == NULL)
+ if ((r = __bt_new(t, &npg)) == NULL)
return (NULL);
r->pgno = npg;
r->lower = BTDATAOFF;
return (NULL);
r->pgno = npg;
r->lower = BTDATAOFF;
++bt_rootsplit;
#endif
/* Put the new left and right pages for the split into place. */
++bt_rootsplit;
#endif
/* Put the new left and right pages for the split into place. */
- if ((l = mpool_new(t->bt_mp, &lnpg)) == NULL ||
- (r = mpool_new(t->bt_mp, &rnpg)) == NULL)
+ if ((l = __bt_new(t, &lnpg)) == NULL ||
+ (r = __bt_new(t, &rnpg)) == NULL)
return (NULL);
l->pgno = lnpg;
r->pgno = rnpg;
return (NULL);
l->pgno = lnpg;
r->pgno = rnpg;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)btree.h 5.7 (Berkeley) %G%
+ * @(#)btree.h 5.8 (Berkeley) %G%
FILE *bt_rfp; /* R: record FILE pointer */
int bt_rfd; /* R: record file descriptor */
FILE *bt_rfp; /* R: record FILE pointer */
int bt_rfd; /* R: record file descriptor */
- pgno_t bt_free; /* XXX next free page */
+ pgno_t bt_free; /* next free page */
index_t bt_psize; /* page size */
index_t bt_ovflsize; /* cut-off for key/data overflow */
int bt_lorder; /* byte order */
index_t bt_psize; /* page size */
index_t bt_ovflsize; /* cut-off for key/data overflow */
int bt_lorder; /* byte order */
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)extern.h 5.2 (Berkeley) %G%
+ * @(#)extern.h 5.3 (Berkeley) %G%
*/
int __bt_close __P((DB *));
*/
int __bt_close __P((DB *));
int __bt_delete __P((const DB *, const DBT *, u_int));
int __bt_dleaf __P((BTREE *, PAGE *, int));
EPG *__bt_first __P((BTREE *, const DBT *, int *));
int __bt_delete __P((const DB *, const DBT *, u_int));
int __bt_dleaf __P((BTREE *, PAGE *, int));
EPG *__bt_first __P((BTREE *, const DBT *, int *));
+int __bt_free __P((BTREE *, PAGE *));
int __bt_get __P((const DB *, const DBT *, DBT *, u_int));
int __bt_get __P((const DB *, const DBT *, DBT *, u_int));
+PAGE *__bt_new __P((BTREE *, pgno_t *));
DB *__bt_open __P((const char *, int, int, const BTREEINFO *));
void __bt_pgin __P((void *, pgno_t, void *));
void __bt_pgout __P((void *, pgno_t, void *));
DB *__bt_open __P((const char *, int, int, const BTREEINFO *));
void __bt_pgin __P((void *, pgno_t, void *));
void __bt_pgout __P((void *, pgno_t, void *));