MAN page from Old RedHat 6.X cdb-devel-0.55-3.i386.rpm
cdb
Section: C Library Functions (3)
Index NAME
cdb - read from a constant database
SYNTAX
#include <cdb.h>int cdb_seek(fd,key,len,dlen);
int fd;
char *key;
unsigned int len;
uint32 *dlen;
DESCRIPTION
cdb_seeklooks up
keyin a constant database.It returns 1 if
keyis present,0 if
keyis not present,or -1 if there was a read error.
keyis an array of
lencharacters.
cdb_seekneeds an open file descriptor,fd,pointing to the database.Ifcdb_seekreturns 1,it pointsfdat the beginning of the data portion of the first recordindexed bykey,and it stores the data length indlen.cdb_seekdoes not provide a way to read subsequent records with the same key.
It's fine to do severalcdb_seeklookups with the same open file descriptor.Beware, however, that two simultaneouscdb_seeklookups can fail horribly;separate processes should not share the same database descriptor.Furthermore, any updates after the database was openedwill be invisible.It's rarely a good idea for a long-running programto hold a database open.
SEE ALSO
cdbget(1)
Index
- NAME
- SYNTAX
- DESCRIPTION
- SEE ALSO
This document was created byman2html,using the manual pages.