From: handa Date: Wed, 25 Feb 2009 02:51:25 +0000 (+0000) Subject: (report_object_array): For M-text and Plist, print X-Git-Tag: REL-1-5-4~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=84dc03389b653b9d51f68d81bf959964b6470097;p=m17n%2Fm17n-lib.git (report_object_array): For M-text and Plist, print more information. --- diff --git a/src/m17n-core.c b/src/m17n-core.c index a486051..2cc4818 100644 --- a/src/m17n-core.c +++ b/src/m17n-core.c @@ -434,6 +434,27 @@ report_object_array () fprintf (stderr, "%16s %7d %7d %7d\n", array->name, array->used, array->used - array->count, array->count); + if (array->count > 0) + { + int i; + for (i = 0; i < array->used && ! array->objects[i]; i++); + + if (strcmp (array->name, "M-text") == 0) + { + MText *mt = (MText *) array->objects[i]; + + if (mt->format <= MTEXT_FORMAT_UTF_8) + fprintf (stderr, "\t\"%s\"\n", (char *) mt->data); + } + else if (strcmp (array->name, "Plist") == 0) + { + MPlist *plist = (MPlist *) array->objects[i]; + + mdebug_dump_plist (plist, 8); + fprintf (stderr, "\n"); + } + } + if (array->used > 0) { free (array->objects);