source: branches/libc-0.6/src/emx/include/ndbm.h

Last change on this file was 1506, checked in by bird, 21 years ago

@unixroot. header reviews. ++

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.9 KB
Line 
1/* ndbm.h,v 1.2 2004/09/14 22:27:34 bird Exp */
2/** @file
3 * FreeBSD 5.1
4 */
5
6/*-
7 * Copyright (c) 1990, 1993
8 * The Regents of the University of California. All rights reserved.
9 *
10 * This code is derived from software contributed to Berkeley by
11 * Margo Seltzer.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 * 3. All advertising materials mentioning features or use of this software
22 * must display the following acknowledgement:
23 * This product includes software developed by the University of
24 * California, Berkeley and its contributors.
25 * 4. Neither the name of the University nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)ndbm.h 8.1 (Berkeley) 6/2/93
42 * $FreeBSD: src/include/ndbm.h,v 1.4 2002/03/23 17:24:53 imp Exp $
43 */
44
45#ifndef _NDBM_H_
46#define _NDBM_H_
47
48#include <db.h>
49
50/* Map dbm interface onto db(3). */
51#define DBM_RDONLY O_RDONLY
52
53/* Flags to dbm_store(). */
54#define DBM_INSERT 0
55#define DBM_REPLACE 1
56
57/*
58 * The db(3) support for ndbm always appends this suffix to the
59 * file name to avoid overwriting the user's original database.
60 */
61#define DBM_SUFFIX ".db"
62
63typedef struct {
64 char *dptr;
65 int dsize;
66} datum;
67
68typedef DB DBM;
69#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
70
71__BEGIN_DECLS
72int dbm_clearerr(DBM *);
73void dbm_close(DBM *);
74int dbm_delete(DBM *, datum);
75int dbm_error(DBM *);
76datum dbm_fetch(DBM *, datum);
77datum dbm_firstkey(DBM *);
78long dbm_forder(DBM *, datum);
79datum dbm_nextkey(DBM *);
80DBM *dbm_open(const char *, int, int);
81int dbm_store(DBM *, datum, datum, int);
82int dbm_dirfno(DBM *);
83__END_DECLS
84
85#endif /* !_NDBM_H_ */
Note: See TracBrowser for help on using the repository browser.