From: handa Date: Tue, 24 Nov 2009 05:56:42 +0000 (+0000) Subject: (update_seq_area): Call X-Git-Tag: REL-0-9-11~18 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13b017ee017b7c214cb23da020f473e9557117d3;p=m17n%2Flibotf.git (update_seq_area): Call OTF_driver_gsub_with_log and OTF_driver_gpos_with_log. Show which features are applied. (get_features): Fix previous change. --- diff --git a/example/otfview.c b/example/otfview.c index 98efa4b..9f1995d 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -296,17 +296,20 @@ get_features (OTF_FeatureList *list, FeatureRec *rec) int i, n; char *str, *p; - if (! rec->langsys || ! rec->features || ! rec->features[0].on) + if (! rec->langsys || ! rec->features) return NULL; for (i = n = 0; i < rec->langsys->FeatureCount; i++) if (rec->features[i].on) n++; + if (n == 0) + return NULL; str = malloc (n * 5); - for (i = 0, p = str; i < n; i++, p += 5) + for (i = 0, p = str; i < rec->langsys->FeatureCount; i++) if (rec->features[i].on) { OTF_tag_name (rec->features[i].tag, p); p[4] = ','; + p += 5; } p[-1] = '\0'; return str;