move P_tmpdir from /usr/tmp to /var/tmp
[unix-history] / usr / src / include / ndbm.h
CommitLineData
61455e43
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
bb0cfa24 4 *
61455e43
KB
5 * This code is derived from software contributed to Berkeley by
6 * Margo Seltzer.
7 *
8 * %sccs.include.redist.c%
9 *
08c3f9eb 10 * @(#)ndbm.h 5.5 (Berkeley) %G%
d1e097f8 11 */
d1e097f8 12
61455e43
KB
13#include <sys/cdefs.h>
14#include <db.h>
d1e097f8 15
08c3f9eb 16/* Map dbm interface onto db(3). */
61455e43 17#define DBM_RDONLY O_RDONLY
2a683113 18
61455e43
KB
19/* Flags to dbm_store(). */
20#define DBM_INSERT 0
21#define DBM_REPLACE 1
3b3806ff 22
08c3f9eb
KB
23/*
24 * The db(3) support for ndbm(3) always appends this suffix to the
25 * file name to avoid overwriting the user's original database.
26 */
27#define DBM_SUFFIX ".db"
28
d1e097f8 29typedef struct {
61455e43
KB
30 char *dptr;
31 int dsize;
d1e097f8
RC
32} datum;
33
61455e43
KB
34typedef DB DBM;
35
36__BEGIN_DECLS
37void dbm_close __P((DBM *));
38int dbm_delete __P((DBM *, datum));
39datum dbm_fetch __P((DBM *, datum));
40datum dbm_firstkey __P((DBM *));
41long dbm_forder __P((DBM *, datum));
42datum dbm_nextkey __P((DBM *));
43DBM *dbm_open __P((const char *, int, int));
44int dbm_store __P((DBM *, datum, datum, int));
45__END_DECLS