* 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.3 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
This package provides a dbm compatible interface to the new hashing
package described in db(3)
dbm_open( file
, flags
, mode
)
(void)sprintf(path
, "%s%s", file
, DBM_SUFFIX
);
return( hash_open ( path
, flags
, mode
, &info
) );
status
= (db
->get
) ( db
, (DBT
*)&key
, (DBT
*)&retval
);
status
= (db
->seq
) ( db
, (DBT
*)&retkey
, (DBT
*)&retdata
, R_FIRST
);
status
= (db
->seq
) ( db
, (DBT
*)&retkey
, (DBT
*)&retdata
, R_NEXT
);
status
= (db
->delete)( db
, (DBT
*)&key
);
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
;