From: tomo Date: Fri, 14 Apr 2006 16:01:28 +0000 (+0000) Subject: (CONCORD_BDB_open): Use instead of for X-Git-Tag: libconcord-0_0_0~4 X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fconcord.git;a=commitdiff_plain;h=488da592aa0f09b0d3aceaa60f40ea442576d6e3 (CONCORD_BDB_open): Use instead of for db_dir, genre, key_type and name. (CONCORD_BDB_get): Use instead of for key. (CONCORD_BDB_put): Likewise. --- diff --git a/concord-bdb.c b/concord-bdb.c index deec042..197d8d9 100644 --- a/concord-bdb.c +++ b/concord-bdb.c @@ -1,4 +1,4 @@ -/* 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 @@ -29,10 +29,10 @@ #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) { @@ -115,7 +115,7 @@ CONCORD_BDB_close (DB* db) } 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; @@ -132,7 +132,7 @@ CONCORD_BDB_get (DB* db, const unsigned char* key, DBT* valdatum) } 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; @@ -145,7 +145,7 @@ CONCORD_BDB_put (DB* db, const unsigned char* key, unsigned char* value) 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; diff --git a/concord-bdb.h b/concord-bdb.h index 83a63f9..92d6155 100644 --- a/concord-bdb.h +++ b/concord-bdb.h @@ -1,4 +1,4 @@ -/* 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 @@ -26,18 +26,18 @@ extern "C" { #include #include -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