(indent_spaces): Delete it.
authorhanda <handa>
Fri, 11 Feb 2011 02:52:37 +0000 (02:52 +0000)
committerhanda <handa>
Fri, 11 Feb 2011 02:52:37 +0000 (02:52 +0000)
(IPRINT): Do not use indent_spaces.
(dump_anchor): Do nothing if anchor->offset is zero.

example/otfdump.c

index 2f9dda3..c75053a 100644 (file)
@@ -32,12 +32,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite
 
 #include <otf.h>
 
-char *indent_spaces[] =
-  { "", "  ", "    ", "      ", "        ", "          ", "            ",
-    "              ",  "                ",  "                  " };
-
 /* Indented print.  */
-#define IPRINT printf("\n%s", indent_spaces[indent]), printf
+#define IPRINT printf("\n%*s", indent * 2, ""), printf
 
 static void
 dump_tag (OTF_Tag tag)
@@ -457,6 +453,8 @@ dump_class1_record_list (int indent,
 static void
 dump_anchor (int indent, OTF_Anchor *anchor)
 {
+  if (anchor->offset == 0)
+    return;
   IPRINT ("(Anchor (offset #x%04X) (AnchorFormat %d)",
          anchor->offset, anchor->AnchorFormat);
   indent++;