return s->data;
}
-CONCORD_Genre
-concord_ds_open_genre (CONCORD_DS ds, const unsigned char* name);
+CONCORD_Genre concord_ds_open_genre (CONCORD_DS ds, const char* name);
int concord_close_genre (CONCORD_Genre genre);
CONCORD_Feature
-concord_genre_open_feature (CONCORD_Genre genre, const unsigned char* name);
+concord_genre_open_feature (CONCORD_Genre genre, const char* name);
int concord_close_feature (CONCORD_Feature feature);
CONCORD_INDEX
-concord_genre_open_index (CONCORD_Genre genre, const unsigned char* index);
+concord_genre_open_index (CONCORD_Genre genre, const char* index);
CONCORD_Feature
-concord_genre_get_feature_0 (CONCORD_Genre genre, const unsigned char* name);
+concord_genre_get_feature_0 (CONCORD_Genre genre, const char* name);
int concord_close_index (CONCORD_INDEX table);
struct CONCORD_DS_Table
{
CONCORD_Backend_Type type;
- unsigned char *location;
+ char *location;
CONCORD_NAME_TABLE* genre_names;
DBTYPE subtype;
int modemask;
if (buf == NULL)
return NULL;
- strncpy (buf, str, length);
+ strncpy ((char*)buf, (char*)str, length);
buf[length] = '\0';
return buf;
}
ds->type = type;
ds->subtype = ( (subtype != 0) ? subtype : DB_HASH );
ds->modemask = modemask;
- ds->location = (unsigned char*)malloc (len + 1);
+ ds->location = (char*)malloc (len + 1);
if (ds->location == NULL)
goto location_failure;
concord_ds_foreach_genre_name (CONCORD_DS ds,
int (*func) (CONCORD_DS ds, char* name))
{
- unsigned char* dname = ds->location;
+ char* dname = ds->location;
DIR *dir;
struct dirent *de;
{
int i, need_to_decode = 0;
unsigned char *cp;
- unsigned char *name;
+ char *name;
unsigned char *np;
- for (cp = de->d_name, i = 0; *cp != '\0'; i++)
+ for (cp = (unsigned char*)de->d_name, i = 0; *cp != '\0'; i++)
{
if (*cp++ == '%')
need_to_decode = 1;
int ch, c[2];
int hex[2];
- name = (unsigned char *) alloca (i);
- cp = de->d_name;
- np = name;
+ name = (char*) alloca (i);
+ cp = (unsigned char*)de->d_name;
+ np = (unsigned char*)name;
while ( (ch = *cp++) != '\0')
{
struct CONCORD_Genre_Table
{
CONCORD_DS ds;
- unsigned char *name;
+ char *name;
CONCORD_NAME_TABLE* feature_names;
CONCORD_NAME_TABLE* index_names;
};
CONCORD_Genre
-concord_ds_open_genre (CONCORD_DS ds, const unsigned char* name)
+concord_ds_open_genre (CONCORD_DS ds, const char* name)
{
CONCORD_Genre genre;
size_t len = strlen (name);
return NULL;
genre->ds = ds;
- genre->name = (unsigned char*)malloc (len + 1);
+ genre->name = (char*)malloc (len + 1);
if (genre->name == NULL)
{
free (genre);
int (*func) (CONCORD_Genre genre,
char* name))
{
- unsigned char *dname
+ char *dname
= alloca (strlen (genre->ds->location)
+ 1 + strlen (genre->name) + sizeof ("/feature") + 1);
DIR *dir;
{
int i, need_to_decode = 0;
unsigned char *cp;
- unsigned char *name;
+ char *name;
unsigned char *np;
- for (cp = de->d_name, i = 0; *cp != '\0'; i++)
+ for (cp = (unsigned char*)de->d_name, i = 0; *cp != '\0'; i++)
{
if (*cp++ == '%')
need_to_decode = 1;
int ch, c[2];
int hex[2];
- name = (unsigned char *) alloca (i);
- cp = de->d_name;
- np = name;
+ name = (char*) alloca (i);
+ cp = (unsigned char*)de->d_name;
+ np = (unsigned char*)name;
while ( (ch = *cp++) != '\0')
{
}
CONCORD_Feature
-concord_genre_get_feature_0 (CONCORD_Genre genre, const unsigned char* name)
+concord_genre_get_feature_0 (CONCORD_Genre genre, const char* name)
{
CONCORD_Feature feature;
&s_true_name);
if (status == 0)
{
- unsigned char* t_name = alloca (s_true_name.size + 1);
+ char* t_name = alloca (s_true_name.size + 1);
strncpy (t_name, s_true_name.data, s_true_name.size);
t_name[s_true_name.size] = '\0';
struct CONCORD_Feature_Table
{
CONCORD_Genre genre;
- unsigned char* name;
+ char* name;
DB* db;
u_int32_t access;
};
CONCORD_Feature
-concord_genre_open_feature (CONCORD_Genre genre, const unsigned char* feature)
+concord_genre_open_feature (CONCORD_Genre genre, const char* feature)
{
CONCORD_Feature table;
size_t len = strlen (feature);
table->genre = genre;
table->db = NULL;
table->access = 0;
- table->name = (unsigned char*)malloc (len + 1);
+ table->name = (char*)malloc (len + 1);
if (table->name == NULL)
{
free (table);
return NULL;
if (size < valdatum.size)
return NULL;
- strncpy (dst, valdatum.data, valdatum.size);
+ strncpy ((char*)dst, valdatum.data, valdatum.size);
dst[valdatum.size] = '\0';
return dst;
}
struct CONCORD_INDEX_Table
{
CONCORD_Genre genre;
- unsigned char *name;
+ char *name;
DB* db;
u_int32_t access;
};
CONCORD_INDEX
-concord_genre_open_index (CONCORD_Genre genre, const unsigned char* index)
+concord_genre_open_index (CONCORD_Genre genre, const char* index)
{
CONCORD_INDEX table;
size_t len = strlen (index);
table->genre = genre;
table->db = NULL;
table->access = 0;
- table->name = (unsigned char*)malloc (len + 1);
+ table->name = (char*)malloc (len + 1);
if (table->name == NULL)
{
free (table);
if (concord_index_setup_db (index, 1))
return -1;
- return CONCORD_BDB_put (index->db, strid, object_id);
+ return CONCORD_BDB_put (index->db, strid, (unsigned char*)object_id);
}
int