aboutsummaryrefslogtreecommitdiffstats
path: root/tileserver/cdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'tileserver/cdb.c')
-rw-r--r--tileserver/cdb.c13
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) {