* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)ndbm.c 5.10 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
* This package provides a dbm compatible interface to the new hashing
* package described in db(3).
#define __DBINTERFACE_PRIVATE
dbm_open(file
, flags
, mode
)
(void)strcpy(path
, file
);
(void)strcat(path
, DBM_SUFFIX
);
return ((DBM
*)__hash_open(path
, flags
, mode
, &info
));
status
= (db
->get
)(db
, (DBT
*)&key
, (DBT
*)&retval
, 0);
status
= (db
->seq
)(db
, (DBT
*)&retkey
, (DBT
*)&retdata
, R_FIRST
);
status
= (db
->seq
)(db
, (DBT
*)&retkey
, (DBT
*)&retdata
, R_NEXT
);
status
= (db
->del
)(db
, (DBT
*)&key
, 0);
* 1 if DBM_INSERT and entry exists
dbm_store(db
, key
, content
, flags
)
return ((db
->put
)(db
, (DBT
*)&key
, (DBT
*)&content
,
(flags
== DBM_INSERT
) ? R_NOOVERWRITE
: 0));
hp
= (HTAB
*)db
->internal
;
hp
= (HTAB
*)db
->internal
;
return(((HTAB
*)db
->internal
)->fp
);
#define PAGFNOERR "ndbm: hash: dbm_pagfno not available\n"
(void)write(STDERR_FILENO
, PAGFNOERR
, sizeof(PAGFNOERR
) - 1);