Main Page | Namespace List | Class List | File List | Class Members | File Members | Related Pages

cdb.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include "readwrite.h"
#include "error.h"
#include "seek.h"
#include "byte.h"
#include "cdb.h"

Include dependency graph for cdb.c:

Include dependency graph

Go to the source code of this file.

Functions

void cdb_free (struct cdb *c)
void cdb_findstart (struct cdb *c)
void cdb_init (struct cdb *c, int fd)
int cdb_read (struct cdb *c, char *buf, unsigned int len, uint32 pos)
int cdb_findnext (struct cdb *c, char *key, unsigned int len)
int cdb_find (struct cdb *c, char *key, unsigned int len)


Function Documentation

int cdb_find struct cdb c,
char *  key,
unsigned int  len
 

Definition at line 132 of file cdb.c.

References cdb_findnext(), and cdb_findstart().

Here is the call graph for this function:

int cdb_findnext struct cdb c,
char *  key,
unsigned int  len
 

Definition at line 87 of file cdb.c.

References cdb_hash(), cdb_read(), cdb::dlen, cdb::dpos, cdb::hpos, cdb::hslots, cdb::khash, cdb::kpos, cdb::loop, uint32, and uint32_unpack().

Referenced by cdb_find().

Here is the call graph for this function:

void cdb_findstart struct cdb c  ) 
 

Definition at line 20 of file cdb.c.

References cdb::loop.

Referenced by cdb_find(), and cdb_init().

void cdb_free struct cdb c  ) 
 

Definition at line 12 of file cdb.c.

References cdb::map, and cdb::size.

Referenced by cdb_init().

void cdb_init struct cdb c,
int  fd
 

Definition at line 25 of file cdb.c.

References cdb_findstart(), cdb_free(), cdb::fd, cdb::map, and cdb::size.

Here is the call graph for this function:

int cdb_read struct cdb c,
char *  buf,
unsigned int  len,
uint32  pos
 

Definition at line 44 of file cdb.c.

References byte_copy(), errno, error_intr, error_proto, cdb::fd, cdb::map, read(), seek_set(), cdb::size, and uint32.

Referenced by cdb_findnext().

Here is the call graph for this function:


Generated on Mon Apr 26 09:49:24 2004 for ConstantDataStore by doxygen 1.3.6-20040222