Back to index

courier  0.68.2
gdbmobj3.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 1999 Double Precision, Inc.  See COPYING for
00003 ** distribution information.
00004 */
00005 
00006 #include      "gdbmobj.h"
00007 
00008 int    gdbmobj_delete(struct gdbmobj *obj, const char *key, size_t keylen)
00009 {
00010 datum  dkey;
00011 
00012        if (!obj->has_dbf)   return (0);
00013 
00014        dkey.dptr=(char *)key;
00015        dkey.dsize=keylen;
00016 
00017        if (gdbm_delete(obj->dbf, dkey))   return (-1);
00018        return (0);
00019 }