improve exit status handling for program map code
[unix-history] / usr / src / include / ndbm.h
... / ...
CommitLineData
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Margo Seltzer.
7 *
8 * %sccs.include.redist.c%
9 *
10 * @(#)ndbm.h 8.1 (Berkeley) %G%
11 */
12
13#ifndef _NDBM_H_
14#define _NDBM_H_
15
16#include <db.h>
17
18/* Map dbm interface onto db(3). */
19#define DBM_RDONLY O_RDONLY
20
21/* Flags to dbm_store(). */
22#define DBM_INSERT 0
23#define DBM_REPLACE 1
24
25/*
26 * The db(3) support for ndbm(3) always appends this suffix to the
27 * file name to avoid overwriting the user's original database.
28 */
29#define DBM_SUFFIX ".db"
30
31typedef struct {
32 char *dptr;
33 int dsize;
34} datum;
35
36typedef DB DBM;
37#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
38
39__BEGIN_DECLS
40void dbm_close __P((DBM *));
41int dbm_delete __P((DBM *, datum));
42datum dbm_fetch __P((DBM *, datum));
43datum dbm_firstkey __P((DBM *));
44long dbm_forder __P((DBM *, datum));
45datum dbm_nextkey __P((DBM *));
46DBM *dbm_open __P((const char *, int, int));
47int dbm_store __P((DBM *, datum, datum, int));
48int dbm_dirfno __P((DBM *));
49__END_DECLS
50
51#endif /* !_NDBM_H_ */