(load_category_table): If mflt_enable_new_feature is
[m17n/m17n-lib.git] / src / m17n-core.c
index 2a96067..41bb939 100644 (file)
@@ -1,5 +1,5 @@
 /* m17n-core.c -- body of the CORE API.
-   Copyright (C) 2003, 2004, 2005, 2006, 2007
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H15PRO112
 
@@ -26,7 +26,7 @@
 
     <em>API LEVELS</em>
 
-    The API of the m17n library is divided into these four.
+    The API of the m17n library is divided into these five.
 
     <ol>
     <li> CORE API
     of the m17n library.  */
 /***ja
     ¥Þ¥¯¥í #M17NLIB_MAJOR_VERSION ¤Ï m17n 
-    ¥é¥¤¥Ö¥é¥ê¤Î¥á¥¸¥ã¡¼¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÍ¿¤¨¤ë¡£  */
+    ¥é¥¤¥Ö¥é¥ê¤Î¥á¥¸¥ã¡¼¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÍ¿¤¨¤ë.  */
 
 #define M17NLIB_MAJOR_VERSION
 
 
 /***ja
     ¥Þ¥¯¥í #M17NLIB_MINOR_VERSION ¤Ï m17n 
-    ¥é¥¤¥Ö¥é¥ê¤Î¥Þ¥¤¥Ê¡¼¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÍ¿¤¨¤ë¡£  */
+    ¥é¥¤¥Ö¥é¥ê¤Î¥Þ¥¤¥Ê¡¼¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÍ¿¤¨¤ë.  */
 
 #define M17NLIB_MINOR_VERSION
 
 
 /***ja
     ¥Þ¥¯¥í #M17NLIB_PATCH_LEVEL ¤Ï m17n 
-    ¥é¥¤¥Ö¥é¥ê¤Î¥Ñ¥Ã¥Á¥ì¥Ù¥ëÈÖ¹æ¤òÍ¿¤¨¤ë¡£  */
+    ¥é¥¤¥Ö¥é¥ê¤Î¥Ñ¥Ã¥Á¥ì¥Ù¥ëÈÖ¹æ¤òÍ¿¤¨¤ë.  */
 
 #define M17NLIB_PATCH_LEVEL
 
 
 /***ja
     ¥Þ¥¯¥í #M17NLIB_VERSION_NAME ¤Ï m17n 
-    ¥é¥¤¥Ö¥é¥ê¤Î¥Ð¡¼¥¸¥ç¥ó̾¤òʸ»úÎó¤È¤·¤ÆÍ¿¤¨¤ë¡£  */
+    ¥é¥¤¥Ö¥é¥ê¤Î¥Ð¡¼¥¸¥ç¥ó̾¤òʸ»úÎó¤È¤·¤ÆÍ¿¤¨¤ë.  */
 
 #define M17NLIB_VERSION_NAME
 
@@ -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);
@@ -567,6 +588,7 @@ m17n_init_core (void)
   SET_DEBUG_FLAG ("MDEBUG_DATABASE", MDEBUG_DATABASE);
   SET_DEBUG_FLAG ("MDEBUG_FONT", MDEBUG_FONT); 
   SET_DEBUG_FLAG ("MDEBUG_FLT", MDEBUG_FLT);
+  SET_DEBUG_FLAG ("MDEBUG_FONTSET", MDEBUG_FONTSET);
   SET_DEBUG_FLAG ("MDEBUG_INPUT", MDEBUG_INPUT);
   /* for backward compatibility... */
   SET_DEBUG_FLAG ("MDEBUG_FONT_FLT", MDEBUG_FLT);
@@ -938,7 +960,7 @@ m17n_object_unref (void *object)
 /*** @} */
 
 /***en
-    @addtogroup m17nError Error handling
+    @addtogroup m17nError Error Handling
     @brief Error handling of the m17n library.
 
     There are two types of errors that may happen in a function of