+ match_u32_assert(0);
+
+ match_byte_assert('.');
+ get_bool();
+
+ assert(pos == outer_end);
+ pos = outer_end;
+ }
+}
+
+int
+main(int argc, char *argv[])
+{
+ if (argc != 2)
+ {
+ fprintf (stderr, "usage: %s FILE.bin", argv[0]);
+ exit (1);
+ }
+
+ filename = argv[1];
+ int fd = open(filename, O_RDONLY);
+ if (fd < 0)
+ {
+ fprintf (stderr, "%s: open failed (%s)", filename, strerror (errno));
+ exit (1);
+ }
+
+ struct stat s;
+ if (fstat(fd, &s))
+ {
+ perror("fstat");
+ exit(1);
+ }
+ n = s.st_size;
+ data = malloc(n);
+ if (!data)
+ {
+ perror("malloc");
+ exit(1);
+ }
+ if (read(fd, data, n) != n)
+ {
+ perror("read");
+ exit(1);
+ }
+ close(fd);
+
+ pos = 0;
+ match_byte_assert(1);
+ match_byte_assert(0);
+
+ version = get_u32();
+ assert(version == 1 || version == 3);
+
+ match_byte_assert(1);
+ bool number_footnotes = get_bool();
+ printf("<footnote markers=\"%s\"/>\n",
+ number_footnotes ? "number" : "letter");
+ bool rotate_inner_column_labels = get_bool();
+ bool rotate_outer_row_labels = get_bool();
+ printf("x=%d\n", get_bool());
+ printf("<rotate-labels inner-column=\"%s\" outer-row=\"%s\"/>",
+ rotate_inner_column_labels ? "yes" : "no",
+ rotate_outer_row_labels ? "yes" : "no");
+ //fprintf(stderr, "option-number=%d\n", get_u32());
+ get_u32();
+
+ int min_col_width = get_u32();
+ int max_col_width = get_u32();
+ int min_row_width = get_u32();
+ int max_row_width = get_u32();
+ printf("<label-width min-col=\"%d\" max-col=\"%d\" min-row=\"%d\" "
+ "max-row=\"%d\"/>\n",
+ min_col_width, max_col_width,
+ min_row_width, max_row_width);
+
+ /* Offset 31. */
+ printf("<tableid>%lld</tableid>", get_u64());
+
+ dump_title ();
+ dump_fonts();
+ dump_dims ();
+ dump_data ();
+ match_byte (1);
+ if (pos != n)
+ {
+ fprintf (stderr, "%x / %x\n", pos, n);
+ exit(1);