b9cf7d31ab
They implement a space efficent write-once database with fast access path. Switch the services(5) database to use cdb. The size of the database file decreases from 2.1MB disk space to 307KB. Access performance is about the same if setservent(0) is used and about an order of magnitude faster otherwise. services_mkdb defaults to the new format, but can optionally create the old db(3) format as well for statically linked legacy applications.
10 lines
275 B
C
10 lines
275 B
C
#include <stringlist.h>
|
|
|
|
int cdb_open(const char *);
|
|
void cdb_add(StringList *, size_t, const char *, size_t *, int);
|
|
int cdb_close(void);
|
|
int db_open(const char *);
|
|
void db_add(StringList *, size_t, const char *, size_t *, int);
|
|
int db_close(void);
|
|
void uniq(const char *);
|