{
CHISE_DS *ds;
CHISE_CCS ccs_daikanwa;
- CHISE_Feature_Table *ft_ideographic_structure;
- CHISE_Feature_Table *ft_ascii;
- int modemask;
- int accessmask = 0;
- DBTYPE real_subtype;
+ CHISE_Feature ft_ideographic_structure;
+ CHISE_Feature ft_ascii;
+ int modemask = 0755; /* rwxr-xr-x */
+ DBTYPE real_subtype = DB_HASH;
int status;
CHISE_Char_ID char_id;
CHISE_Value value;
unsigned char buf[1024];
/* open a data-source */
- ds = chise_open_data_source (CHISE_DS_Berkeley_DB, db_dir);
+ ds = chise_open_data_source (CHISE_DS_Berkeley_DB, db_dir,
+ real_subtype, modemask);
if (ds == NULL)
{
printf ("Can't open data source\n");
* get a character corresponding with Daikanwa number 364
*/
- modemask = 0755; /* rwxr-xr-x */
- real_subtype = DB_HASH;
- accessmask = DB_RDONLY;
-
/* setup a decoding-table */
ccs_daikanwa
- = chise_ds_get_ccs (ds, "=daikanwa",
- real_subtype, accessmask, modemask);
+ = chise_ds_get_ccs (ds, "=daikanwa");
if (ccs_daikanwa == NULL)
{
printf ("Can't open CCS =daikanwa\n");
/* get a feature-value of the character */
ft_ideographic_structure
- = chise_ds_get_feature (ds, "ideographic-structure",
- real_subtype, accessmask, modemask);
+ = chise_ds_get_feature (ds, "ideographic-structure");
if (chise_char_gets_feature_value
(char_id, ft_ideographic_structure, buf, sizeof (buf)) != NULL)
printf ("#x%X => %s\n", char_id, buf);
else
printf ("#x%X\n", char_id);
- ft_ascii = chise_ds_get_feature (ds, "ascii",
- real_subtype, accessmask, modemask);
+ ft_ascii = chise_ds_get_feature (ds, "ascii");
chise_char_feature_value_iterate (ft_ascii, &test_map_func);
chise_char_feature_value_iterate (ft_ideographic_structure, &test_map_func);