Include <sys/types.h> and "config.h".
[m17n/libotf.git] / example / otfdump.c
index 0ff9dec..3ec19e0 100644 (file)
@@ -23,6 +23,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -866,8 +867,7 @@ dump_lookup_subtable_gsub (int indent, int index, unsigned type,
              subtable->u.extension1.ExtensionOffset);
       dump_lookup_subtable_gsub (indent, index, 
                                 subtable->u.extension1.ExtensionLookupType,
-                                (subtable
-                                 + subtable->u.extension1.ExtensionOffset));
+                                subtable->u.extension1.ExtensionSubtable);
       break;
 
     case 8:
@@ -1090,6 +1090,21 @@ dump_lookup_subtable_gpos (int indent, int index, unsigned type,
       else
        printf (" invalid");
       break;
+
+    case 9:
+      if (subtable->Format == 1)
+       {
+         IPRINT ("(ExtensionLookupType %d)",
+                 subtable->u.extension1.ExtensionLookupType);
+         IPRINT ("(ExtensionOffset %d)",
+                 subtable->u.extension1.ExtensionOffset);
+         dump_lookup_subtable_gpos
+           (indent, index, 
+            subtable->u.extension1.ExtensionLookupType,
+            subtable->u.extension1.ExtensionSubtable);
+       }
+      else
+       printf (" invalid");
     }
   printf (")");
 }