diff options
author | chris <chris> | 2006-09-20 14:24:10 +0000 |
---|---|---|
committer | chris <chris> | 2006-09-20 14:24:10 +0000 |
commit | 2b48d4ff39374e28e87de59ac5b60e74abf8a83e (patch) | |
tree | 4641ad144bad2b0b5bbeb4bbf755406d0b56e086 /tileserver/cdb.c | |
parent | 747ca999b816771fa75e0d9ff22e9921052a0075 (diff) |
Another accessor, cdb_get_buf.
Diffstat (limited to 'tileserver/cdb.c')
-rw-r--r-- | tileserver/cdb.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tileserver/cdb.c b/tileserver/cdb.c index 6c60dec8d..7a93c0830 100644 --- a/tileserver/cdb.c +++ b/tileserver/cdb.c @@ -9,7 +9,7 @@ * */ -static const char rcsid[] = "$Id: cdb.c,v 1.3 2006-09-20 12:46:29 chris Exp $"; +static const char rcsid[] = "$Id: cdb.c,v 1.4 2006-09-20 14:24:10 chris Exp $"; #include <sys/types.h> @@ -318,7 +318,7 @@ fail: #undef FAIL } -/* cdb_get_string C, STRING +/* cdb_get_string C STRING * As for cdb_get, but construct the KEY datum from STRING. */ cdb_datum cdb_get_string(cdb C, const char *s) { struct cdb_datum d; @@ -327,6 +327,15 @@ cdb_datum cdb_get_string(cdb C, const char *s) { return cdb_get(C, &d); } +/* cdb_get_buf C BUF LEN + * As for cdb_get, buf construct the KEY datum from BUF and LEN. */ +cdb_datum cdb_get_buf(cdb C, const void *buf, const size_t len) { + struct cdb_datum d; + d.cd_len = len; + d.cd_buf = (void*)buf; + return cdb_get(C, &d); +} + /* cdb_strerror E * Return the text of the error message corresponding to E. */ char *cdb_strerror(const cdb_result_t e) { |