aboutsummaryrefslogtreecommitdiffstats
path: root/print/libotf/files/patch-example_otfdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'print/libotf/files/patch-example_otfdump.c')
-rw-r--r--print/libotf/files/patch-example_otfdump.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/print/libotf/files/patch-example_otfdump.c b/print/libotf/files/patch-example_otfdump.c
new file mode 100644
index 000000000000..038ab02edfc2
--- /dev/null
+++ b/print/libotf/files/patch-example_otfdump.c
@@ -0,0 +1,25 @@
+--- example/otfdump.c 19 Mar 2010 12:27:02 -0000 1.27
++++ example/otfdump.c 11 Feb 2011 02:52:37 -0000 1.28
+@@ -32,12 +32,8 @@
+
+ #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 @@
+ 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++;