+#include <alloca.h>
#include <chise.h>
-char db_dir[] = "/usr/local/lib/chise/char-db";
int
test_map_func (CHISE_Char_ID cid, CHISE_Feature_Table *db,
CHISE_Char_ID char_id;
CHISE_Value value;
unsigned char buf[1024];
+ unsigned char *db_dir;
+
+ printf("chise_db_dir = %s\n", chise_db_dir);
+
+ db_dir = (unsigned char*)alloca (strlen (chise_db_dir) + 4);
+ if (db_dir == NULL)
+ {
+ printf ("Can't open data source\n");
+ return -1;
+ }
+ strcpy (db_dir, chise_db_dir);
+ strcat (db_dir, "db/");
+ printf("db_dir = '%s'\n", db_dir);
/* open a data-source */
ds = CHISE_DS_open (CHISE_DS_Berkeley_DB, db_dir,