#ifndef __YP_DB_H__
#define __YP_DB_H__

/*
** $Id: yp_db.h,v 1.2 1996/08/12 15:23:20 kukuk Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#define F_ALL   0x01
#define F_NEXT  0x02

#if defined(HAVE_LIBGDBM)
#include <gdbm.h>

#define DB_FILE GDBM_FILE
#define db_close(x) gdbm_close(x)

#else

#define DB_FILE int

#endif

extern DB_FILE db_open(const char *domain, const char *map);
extern int db_read(DB_FILE dbp, const datum *ikey, datum *okey, 
		   datum *dval, int flags, int mangle);

#endif
