+static void
+parse_NavHead(void)
+{
+ match_byte_assert(2);
+ match_zeros_assert(24);
+ match_byte_assert(1);
+ match_zeros_assert(3);
+ if (!match_byte(1))
+ match_byte_assert(0);
+ match_zeros_assert(3);
+ /* DspSimpleText */
+}
+
+static void
+parse_NavOleItem(void)
+{
+ match_byte_assert(0);
+ match_byte_assert(1);
+ match_zeros_assert(2);
+ pos++;
+ match_zeros_assert(9);
+ match_byte_assert(1);
+ match_zeros_assert(10);
+ match_byte_assert(1);
+ match_zeros_assert(5);
+ get_string1();
+ match_byte_assert(1);
+ parse_weirdness();
+ match_byte_assert(0);
+ pos++;
+ match_zeros_assert(11);
+ match_byte_assert(1);
+ match_zeros_assert(3);
+ get_string4();
+ match_byte_assert(0);
+}
+
+static void
+match_NavOleItem(void)
+{ /* 0e 80 or 12 80*/
+ if (!match_byte(0x12))
+ match_byte_assert(0x0e);
+ match_byte_assert(0x80);
+ parse_NavOleItem();
+}
+
+static void
+parse_NavTitle(void)
+{
+ match_byte_assert(2);
+ match_zeros_assert(8);
+ match_u32_assert(24);
+ get_u32();
+ pos++;
+ if (!match_byte(3))
+ match_byte_assert(4);
+ match_zeros_assert(2);
+ get_u32();
+ match_u32_assert(2);
+ if (!match_u32(2))
+ match_u32_assert(1);
+}
+
+static void
+parse_NavNote(void)
+{
+ match_byte_assert(2);
+ match_zeros_assert(8);
+ match_u32_assert(24);
+ if (!match_u32(0) && !match_u32(0xffffff4b))
+ match_u32_assert(-40);
+ pos += 8;
+ match_u32_assert(2);
+ if (!match_u32(2))
+ match_u32_assert(1);
+}
+
+static void
+parse_PTPivotController(void)
+{
+ match_byte_assert(2);
+ pos += 8;
+ match_u32_assert(100);
+ match_u32_assert(100);
+ match_u32_assert(100);
+ match_u32_assert(100);
+}
+
+static void
+parse_PVPivotView(void)
+{
+ match_byte_assert(5);
+ printf ("PVPivotView(%d)\n", get_u32());
+}
+
+static void
+parse_NDimensional__DspCell(void)
+{
+ match_byte_assert(0);
+ n_dims = get_u32();
+ printf ("NDimensional__DspCell(n_dims=%d)\n", n_dims);
+}
+
+static void
+parse_IndexedCollection(void)
+{
+ printf("IndexedCollection");
+ for (size_t i = 0; ; i++)
+ {
+ match_byte_assert(0);
+ printf("%c%d", i ? 'x' : '(', get_u32());
+ match_u16_assert(1);
+ if (!match_u16(0x8011))
+ break;
+ }
+ printf(")\n");
+}
+
+static void
+parse_PTTableLook(void)
+{
+ match_byte_assert(2);
+ match_byte_assert(2);
+ match_zeros_assert(7);
+ match_u32_assert(0x36);
+ match_u32_assert(0x12);
+}
+
+static void
+parse_PVViewDimension(void)
+{
+ while (data[pos + 1] != 0x80
+ && (data[pos] != 0xff || data[pos + 1] != 0xff))
+ {
+ assert(pos < n);
+ pos++;
+ }
+}
+
+static void
+parse_PVSeparatorStyle(void)
+{
+ match_byte_assert(0);
+ match_byte_assert(1);
+ match_zeros_assert(15);
+ pos++;
+ match_byte_assert(0x80);
+ match_byte_assert(0);
+
+ match_byte_assert(1);
+ match_zeros_assert(9);
+ while (data[pos + 1] != 0x80
+ && (data[pos] != 0xff || data[pos + 1] != 0xff))
+ {
+ assert(pos < n);
+ pos++;
+ }
+}
+
+static void
+parse_PVCellStyle(void)
+{
+ match_byte_assert(0);
+ match_byte_assert(1);
+ match_zeros_assert(5);
+ match_u32_assert(0xffffff);
+ match_zeros_assert(2);
+}
+
+static void
+skip_item(const char *name)
+{
+ int start_pos = pos;
+ printf("%#x: skipping %s bytes...", pos, name);
+ while (data[pos + 1] != 0x80
+ && !(data[pos] == 0xff && data[pos + 1] == 0xff
+ && data[pos + 2] == 0 && data[pos + 3] == 0))
+ {
+ assert(pos < n);
+ pos++;
+ }
+ printf("until %#x:", pos);
+ hex_dump(stdout, start_pos, pos - start_pos);
+}
+