From: tomo Date: Tue, 12 Aug 2003 17:20:44 +0000 (+0000) Subject: (main): Use `CHISE_Decoding_Table' instead of `CHISE_Decoding_Table *' X-Git-Tag: b1-r0_2_0-pre1~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9c1e8136cf8c46cea60be7320868e9b334c01c2c;p=chise%2Flibchise.git (main): Use `CHISE_Decoding_Table' instead of `CHISE_Decoding_Table *' to define `dt_daikanwa'; use `CHISE_Feature_Table' instead of `CHISE_Feature_Table *' to define `ft_ideographic_structure' and `ft_ascii'. --- diff --git a/sample.c b/sample.c index b6b567f..29e6756 100644 --- a/sample.c +++ b/sample.c @@ -15,9 +15,9 @@ int main (int argc, char* argv[]) { CHISE_DS ds; - CHISE_Decoding_Table *dt_daikanwa; - CHISE_Feature_Table *ft_ideographic_structure; - CHISE_Feature_Table *ft_ascii; + CHISE_Decoding_Table dt_daikanwa; + CHISE_Feature_Table ft_ideographic_structure; + CHISE_Feature_Table ft_ascii; int modemask; int accessmask = 0; DBTYPE real_subtype; @@ -49,16 +49,16 @@ main (int argc, char* argv[]) accessmask, modemask); if (status) { - chise_close_decoding_table (dt_daikanwa); + chise_close_decoding_table (&dt_daikanwa); chise_close_data_source (&ds); return -1; } /* get a character from the decoding-table */ - char_id = chise_dt_get_char (dt_daikanwa, 364); + char_id = chise_dt_get_char (&dt_daikanwa, 364); /* close the decoding-table */ - chise_close_decoding_table (dt_daikanwa); + chise_close_decoding_table (&dt_daikanwa); /* @@ -71,7 +71,7 @@ main (int argc, char* argv[]) real_subtype, accessmask, modemask); if (status) { - chise_close_feature_table (ft_ideographic_structure); + chise_close_feature_table (&ft_ideographic_structure); chise_close_data_source (&ds); return -1; } @@ -82,26 +82,26 @@ main (int argc, char* argv[]) real_subtype, accessmask, modemask); if (status) { - chise_close_feature_table (ft_ascii); + chise_close_feature_table (&ft_ascii); chise_close_data_source (&ds); return -1; } /* get a feature-value of the character */ - status = chise_ft_get_value (ft_ideographic_structure, char_id, &value); + status = chise_ft_get_value (&ft_ideographic_structure, char_id, &value); if (!status) printf ("#x%X => %s\n", char_id, chise_value_to_c_string(&value)); else printf ("#x%X (%d)\n", char_id, status); - chise_ft_iterate (ft_ascii, &test_map_func); - chise_ft_iterate (ft_ideographic_structure, &test_map_func); + chise_ft_iterate (&ft_ascii, &test_map_func); + chise_ft_iterate (&ft_ideographic_structure, &test_map_func); /* close the feature-table */ - chise_close_feature_table (ft_ideographic_structure); + chise_close_feature_table (&ft_ideographic_structure); - chise_close_feature_table (ft_ascii); + chise_close_feature_table (&ft_ascii); /* close the data-source */