return 0;
}
+static int
+test_radical_func (CHISE_Char_ID cid, CHISE_Feature_Table *db,
+ CHISE_Value *valdatum)
+{
+ unsigned char buf[256];
+ unsigned char name[256];
+ int ucs = -1;
+
+ if (chise_value_size (valdatum) < 256)
+ {
+ strncpy (buf, chise_value_data (valdatum),
+ chise_value_size (valdatum));
+ buf[chise_value_size (valdatum)] = '\0';
+ printf ("%s\t", buf);
+ }
+ else
+ printf ("%s\t",
+ chise_value_to_c_string (valdatum));
+
+ if (strcmp (buf, "75") == 0) /* Tree */
+ {
+ printf ("#x%08X ", cid);
+ if ( chise_char_gets_feature_value
+ (cid, chise_ds_get_feature (ds, "=ucs"),
+ buf, sizeof (buf)) != NULL )
+ {
+ ucs = atoi (buf);
+ printf ("[U-%08X]", ucs);
+ }
+ else if ( chise_char_gets_feature_value
+ (cid, chise_ds_get_feature (ds, "=>ucs"),
+ buf, sizeof (buf)) != NULL )
+ {
+ ucs = atoi (buf);
+ printf ("(U-%08X)", ucs);
+ }
+ else
+ printf (" ");
+
+ printf ("\n");
+ }
+ else
+ printf ("\n");
+ return 0;
+}
+
int
main (int argc, char* argv[])
{
#endif
CHISE_Feature ft_ideographic_structure;
CHISE_Feature ft_numeric_value;
+ CHISE_Feature ft_radicals;
CHISE_Char_ID char_id;
unsigned char buf[1024];
chise_ds_foreach_char_feature_name (ds, &test_name_map_func);
+ ft_radicals = chise_ds_get_feature (ds, "ideographic-radical");
+ chise_feature_foreach_char_with_value (ft_radicals, &test_radical_func);
+
ft_numeric_value = chise_ds_get_feature (ds, "numeric-value");
chise_feature_foreach_char_with_value (ft_numeric_value, &test_map_func);
chise_feature_foreach_char_with_value