-/* Copyright (C) 2003,2004,2005 MORIOKA Tomohiko
+/* Copyright (C) 2003,2004,2005,2006 MORIOKA Tomohiko
This file is part of the CONCORD Library.
The CONCORD Library is free software; you can redistribute it and/or
#include "concord-bdb.h"
DB*
-CONCORD_BDB_open (const unsigned char* db_dir,
- const unsigned char* genre,
- const unsigned char* key_type,
- const unsigned char* name,
+CONCORD_BDB_open (const char* db_dir,
+ const char* genre,
+ const char* key_type,
+ const char* name,
DBTYPE real_subtype,
u_int32_t accessmask, int modemask)
{
}
int
-CONCORD_BDB_get (DB* db, const unsigned char* key, DBT* valdatum)
+CONCORD_BDB_get (DB* db, const char* key, DBT* valdatum)
{
DBT keydatum;
int status = 0;
}
int
-CONCORD_BDB_put (DB* db, const unsigned char* key, unsigned char* value)
+CONCORD_BDB_put (DB* db, const char* key, unsigned char* value)
{
DBT keydatum, valdatum;
int status = 0;
keydatum.size = strlen (key);
valdatum.data = value;
- valdatum.size = strlen (value);
+ valdatum.size = strlen ((char*)value);
status = db->put (db, NULL, &keydatum, &valdatum, 0);
return status;
-/* Copyright (C) 2003,2004,2005 MORIOKA Tomohiko
+/* Copyright (C) 2003,2004,2005,2006 MORIOKA Tomohiko
This file is part of the CONCORD Library.
The CONCORD Library is free software; you can redistribute it and/or
#include <db.h>
#include <errno.h>
-DB* CONCORD_BDB_open (const unsigned char* db_dir,
- const unsigned char* genre,
- const unsigned char* key_type,
- const unsigned char* name,
+DB* CONCORD_BDB_open (const char* db_dir,
+ const char* genre,
+ const char* key_type,
+ const char* name,
DBTYPE real_subtype,
u_int32_t accessmask, int modemask);
int CONCORD_BDB_close (DB* db);
-int CONCORD_BDB_get (DB* db, const unsigned char* key, DBT* valdatum);
+int CONCORD_BDB_get (DB* db, const char* key, DBT* valdatum);
-int CONCORD_BDB_put (DB* db, const unsigned char* key, unsigned char* value);
+int CONCORD_BDB_put (DB* db, const char* key, unsigned char* value);
#ifdef __cplusplus