14 #include "u8-mbtouc.h"
16 static const char *filename;
25 #define STR(x) XSTR(x)
26 #define WHERE __FILE__":" STR(__LINE__)
28 static void __attribute__((unused))
29 hex_dump(FILE *stream, int ofs, int n);
41 memcpy(&x, &data[pos], 4);
46 static unsigned long long int
50 memcpy(&x, &data[pos], 8);
59 x = (data[pos] << 24) | (data[pos + 1] << 16) | (data[pos + 2] << 8) | data[pos + 3];
68 memcpy(&x, &data[pos], 2);
77 memcpy(&x, &data[pos], 8);
82 static double __attribute__((unused))
86 memcpy(&x, &data[pos], 4);
101 match_u16(uint16_t x)
110 match_u32_assert(uint32_t x, const char *where)
112 unsigned int y = get_u32();
115 fprintf(stderr, "%s: 0x%x: expected i%u, got i%u: ", where, pos - 4, x, y);
116 hex_dump(stderr, pos - 4, 64);
120 #define match_u32_assert(x) match_u32_assert(x, WHERE)
123 match_u16_assert(uint16_t x, const char *where)
125 unsigned int y = get_u16();
128 fprintf(stderr, "%s: 0x%x: expected u16:%u, got u16:%u: ", where, pos - 2, x, y);
129 hex_dump(stderr, pos - 2, 64);
133 #define match_u16_assert(x) match_u16_assert(x, WHERE)
135 static bool __attribute__((unused))
136 match_u64(uint64_t x)
144 static void __attribute__((unused))
145 match_u64_assert(uint64_t x, const char *where)
147 unsigned long long int y = get_u64();
150 fprintf(stderr, "%s: 0x%x: expected u64:%lu, got u64:%llu\n", where, pos - 8, x, y);
154 #define match_u64_assert(x) match_u64_assert(x, WHERE)
156 static bool __attribute__((unused))
157 match_be32(uint32_t x)
166 match_be32_assert(uint32_t x, const char *where)
168 unsigned int y = get_be32();
171 fprintf(stderr, "%s: 0x%x: expected be%u, got be%u\n", where, pos - 4, x, y);
175 #define match_be32_assert(x) match_be32_assert(x, WHERE)
178 match_byte(uint8_t b)
180 if (pos < n && data[pos] == b)
190 match_byte_assert(uint8_t b, const char *where)
194 fprintf(stderr, "%s: 0x%x: expected %02x, got %02x: ", where, pos, b, data[pos]);
195 hex_dump(stderr, pos, 64);
199 #define match_byte_assert(b) match_byte_assert(b, WHERE)
202 match_bytes(int start, const int *bytes, size_t n_bytes)
204 for (size_t i = 0; i < n_bytes; i++)
205 if (bytes[i] >= 0 && data[start + i] != bytes[i])
211 xmemdup0(const void *p, size_t n)
213 char *s = malloc(n + 1);
224 match_byte_assert(1);
228 static bool __attribute__((unused))
231 return (p >= ' ' && p < 127) || p == '\r' || p == '\n' || p == '\t';
235 count_zeros(const uint8_t *p)
243 static bool __attribute__((unused))
244 all_utf8(const char *p_, size_t len)
246 const uint8_t *p = (const uint8_t *) p_;
247 for (size_t ofs = 0, mblen; ofs < len; ofs += mblen)
251 mblen = u8_mbtouc (&uc, p + ofs, len - ofs);
252 if ((uc < 32 && uc != '\n') || uc == 127 || uc == 0xfffd)
261 int len = data[pos] + data[pos + 1] * 256;
262 char *s = xmemdup0(&data[pos + 2], len);
270 int len = data[pos++];
272 return get_string2();
275 char *s = xmemdup0(&data[pos], len);
282 match_string1_assert(const char *exp, const char *where)
285 char *act = get_string1();
286 if (strcmp(act, exp))
288 fprintf(stderr, "%s: 0x%x: expected \"%s\", got \"%s\"\n",
289 where, start, exp, act);
293 #define match_string1_assert(x) match_string1_assert(x, WHERE)
296 match_string2_assert(const char *exp, const char *where)
299 char *act = get_string2();
300 if (strcmp(act, exp))
302 fprintf(stderr, "%s: 0x%x: expected \"%s\", got \"%s\"\n",
303 where, start, exp, act);
307 #define match_string2_assert(x) match_string2_assert(x, WHERE)
310 get_string4(const char *where)
313 /*data[pos + 1] == 0 && data[pos + 2] == 0 && data[pos + 3] == 0*/
314 /*&& all_ascii(&data[pos + 4], data[pos])*/)
316 assert(data[pos + 3] == 0);
317 int len = data[pos] + data[pos + 1] * 256 + data[pos + 2] * 65536;
318 char *s = malloc(len + 1);
320 memcpy(s, &data[pos + 4], len);
327 fprintf(stderr, "%s: 0x%x: expected string\n", where, pos);
331 #define get_string4() get_string4(WHERE)
334 get_padded_string(int len)
336 char *s = xmemdup0(&data[pos], len);
342 get_string_be(const char *where)
345 /*data[pos + 1] == 0 && data[pos + 2] == 0 && data[pos + 3] == 0*/
346 /*&& all_ascii(&data[pos + 4], data[pos])*/)
348 int len = data[pos + 2] * 256 + data[pos + 3];
349 char *s = malloc(len + 1);
351 memcpy(s, &data[pos + 4], len);
358 fprintf(stderr, "%s: 0x%x: expected string\n", where, pos);
362 #define get_string_be() get_string_be(WHERE)
371 static void __attribute__((unused))
372 hex_dump(FILE *stream, int ofs, int n)
375 for (int i = 0; i < n; i++)
377 int c = data[ofs + i];
378 n_ascii += is_ascii(c);
379 fprintf(stream, " %02x", c);
384 for (int i = 0; i < n; i++)
386 int c = data[ofs + i];
387 putc(c >= 32 && c < 127 ? c : '.', stream);
393 static void __attribute__((unused))
394 char_dump(FILE *stream, int ofs, int n)
396 for (int i = 0; i < n; i++)
398 int c = data[ofs + i];
399 putc(c >= 32 && c < 127 ? c : '.', stream);
406 compare_int(const void *a_, const void *b_)
410 return *a < *b ? -1 : *a > *b;
415 format_name (int format, char *buf)
420 case 2: return "AHEX";
421 case 3: return "COMMA";
422 case 4: return "DOLLAR";
423 case 5: case 40: return "F";
425 case 7: return "PIBHEX";
427 case 9: return "PIB";
428 case 10: return "PK";
429 case 11: return "RB";
430 case 12: return "RBHEX";
434 case 20: return "DATE";
435 case 21: return "TIME";
436 case 22: return "DATETIME";
437 case 23: return "ADATE";
438 case 24: return "JDATE";
439 case 25: return "DTIME";
440 case 26: return "WKDAY";
441 case 27: return "MONTH";
442 case 28: return "MOYR";
443 case 29: return "QYR";
444 case 30: return "WKYR";
445 case 31: return "PCT";
446 case 32: return "DOT";
447 case 33: return "CCA";
448 case 34: return "CCB";
449 case 35: return "CCC";
450 case 36: return "CCD";
451 case 37: return "CCE";
452 case 38: return "EDATE";
453 case 39: return "SDATE";
454 default: sprintf(buf, "(%d)", format); return buf;
463 int fmt = data[pos++];
465 printf ("%s%d.%d", format_name(fmt, buf), w, d);
469 parse_heading(const char *name)
471 match_u16_assert(0xffff);
473 match_string2_assert(name);
477 match_zeros_assert(int count, const char *where)
479 for (int i = 0; i < count; i++)
483 "%s: %#x: expected %d zeros here but offset %d is %#"PRIx8": ",
484 where, pos, count, i, data[pos + i]);
485 hex_dump (stderr, pos, 64);
490 #define match_zeros_assert(count) match_zeros_assert(count, WHERE)
493 put_safe(const char *s)
501 else if (*s < 0x20 || *s > 0x7e)
502 printf ("\\x%02"PRIx8, (uint8_t) *s);
509 static void parse_flexible(void);
512 parse_DspString(void)
514 printf("%#x: DspString(", pos);
517 printf("%f, \"", get_double());
518 printf("%s\")\n", get_string1());
522 match_byte_assert(1);
525 match_byte_assert(0);
526 match_byte_assert(1);
527 put_safe(get_string1());
533 match_DspString(void)
535 match_byte_assert(5);
536 match_byte_assert(0x80);
541 match_DspSimpleText(void)
543 match_byte_assert(3);
544 match_byte_assert(0x80);
545 match_byte_assert(0);
548 match_zeros_assert(3);
549 if (!match_byte(0x10))
550 match_byte_assert(0);
551 match_zeros_assert(4);
556 parse_weirdness(void)
558 match_byte_assert(1);
560 match_zeros_assert(12);
561 pos++; /* 90 or BC */
563 match_byte_assert(1);
564 match_zeros_assert(5);
566 match_zeros_assert(3);
567 puts(get_padded_string(32));
571 match_NavTreeViewItem(void)
573 match_byte_assert(7);
574 match_byte_assert(0x80);
575 match_zeros_assert(1);
576 if (!match_byte(0) && !match_byte(7) && !match_byte(2))
577 match_byte_assert(8);
578 match_zeros_assert(3);
580 match_byte_assert(0);
581 match_byte_assert(1);
582 match_byte_assert(0);
585 match_byte_assert(0);
587 match_byte_assert(0);
588 match_zeros_assert(5);
590 match_byte_assert(1);
591 match_zeros_assert(5);
598 match_byte_assert(0);
600 match_zeros_assert(11);
601 match_byte_assert(1);
602 match_zeros_assert(3);
604 match_byte_assert(0);
607 match_zeros_assert(2);
609 match_u32_assert(11000);
612 match_u32_assert(11000);
613 match_u32_assert(8500);
618 match_byte_assert(1);
623 get_string4(); /* page title */
624 match_byte_assert(1);
625 match_byte_assert(1);
626 match_zeros_assert(3);
627 get_string4(); /* page number */
628 match_byte_assert(0);
636 match_zeros_assert(3);
638 //fprintf(stderr, "%#x ", pos - 16);
642 parse_DspNumber(void)
644 match_byte_assert(1);
645 printf("DspNumber(");
647 match_byte_assert(0x80);
649 printf (" %f", get_double());
650 printf (" \"%s\")\n", get_string1());
654 match_DspNumber(void)
656 match_byte_assert(0x2a);
657 match_byte_assert(0x80);
664 match_byte_assert(0);
665 match_DspSimpleText();
666 parse_flexible(); /* DspString or DspNumber. */
672 match_byte_assert(0x27);
673 match_byte_assert(0x80);
680 match_byte_assert(2);
687 match_byte_assert(9);
688 match_byte_assert(0x80);
693 parse_PMModelItemInfo(void)
695 match_byte_assert(0);
696 pos += 1; /* Counter */
697 match_zeros_assert(7);
700 match_byte_assert(0xe);
701 match_byte_assert(0);
705 match_PMModelItemInfo(void)
707 match_byte_assert(0x54);
708 match_byte_assert(0x80);
709 parse_PMModelItemInfo();
710 match_DspSimpleText();
715 match_PMPivotItemTree(void)
717 match_byte_assert(0x52);
718 match_byte_assert(0x80);
719 match_byte_assert(0);
720 match_PMModelItemInfo();
726 match_byte_assert(2);
727 match_zeros_assert(24);
728 match_byte_assert(1);
729 match_zeros_assert(3);
731 match_byte_assert(0);
732 match_zeros_assert(3);
733 match_DspSimpleText();
738 parse_NavOleItem(void)
740 match_byte_assert(0);
741 match_byte_assert(1);
742 match_zeros_assert(2);
744 match_zeros_assert(9);
745 match_byte_assert(1);
746 match_zeros_assert(10);
747 match_byte_assert(1);
748 match_zeros_assert(5);
750 match_byte_assert(1);
752 match_byte_assert(0);
754 match_zeros_assert(11);
755 match_byte_assert(1);
756 match_zeros_assert(3);
758 match_byte_assert(0);
762 match_NavOleItem(void)
763 { /* 0e 80 or 12 80*/
764 if (!match_byte(0x12))
765 match_byte_assert(0x0e);
766 match_byte_assert(0x80);
773 match_byte_assert(2);
774 match_zeros_assert(8);
775 match_u32_assert(24);
779 match_byte_assert(4);
780 match_zeros_assert(2);
790 match_byte_assert(2);
791 match_zeros_assert(8);
792 match_u32_assert(24);
793 if (!match_u32(0) && !match_u32(0xffffff4b))
794 match_u32_assert(-40);
802 parse_PTPivotController(void)
804 match_byte_assert(2);
806 match_u32_assert(100);
807 match_u32_assert(100);
808 match_u32_assert(100);
809 match_u32_assert(100);
813 parse_PVPivotView(void)
815 match_byte_assert(5);
816 match_zeros_assert(4);
820 parse_NDimensional__DspCell(void)
822 match_byte_assert(0);
827 parse_IndexedCollection(void)
829 match_byte_assert(0);
832 match_zeros_assert(12);
845 if (data[pos] == 0xff && data[pos + 1] == 0xff)
847 match_u16_assert(0xffff);
849 char *heading = get_string2();
850 if (!strcmp(heading, "DspCell"))
852 else if (!strcmp(heading, "DspNumber"))
854 else if (!strcmp(heading, "DspString"))
856 else if (!strcmp(heading, "NavHead"))
858 else if (!strcmp(heading, "IndexedCollection"))
859 parse_IndexedCollection();
860 else if (!strcmp(heading, "NavOleItem"))
862 else if (!strcmp(heading, "NavTitle"))
864 else if (!strcmp(heading, "NavNote"))
866 else if (!strcmp(heading, "PTPivotController"))
867 parse_PTPivotController();
868 else if (!strcmp(heading, "PVPivotView"))
870 else if (!strcmp(heading, "PMPivotModel"))
871 match_byte_assert(3);
872 else if (!strcmp(heading, "NDimensional__DspCell"))
873 parse_NDimensional__DspCell();
874 else if (!strcmp(heading, "PMPivotItemTree"))
875 match_byte_assert(0);
876 else if (!strcmp(heading, "PMModelItemInfo"))
877 parse_PMModelItemInfo();
878 else if (!strcmp(heading, "AbstractTreeBranch"))
879 match_byte_assert(0);
882 fprintf(stderr, "don't know %s at offset 0x%x: ", heading, start);
883 hex_dump(stderr, pos, 64);
887 else if (data[pos + 1] == 0x80)
889 if (data[pos] == 0x2a && data[pos + 1] == 0x80)
891 else if (data[pos] == 0x27 && data[pos + 1] == 0x80)
893 else if (data[pos] == 0x5 && data[pos + 1] == 0x80)
895 else if (data[pos] == 0x7 && data[pos + 1] == 0x80)
896 match_NavTreeViewItem();
897 else if (data[pos] == 0x3 && data[pos + 1] == 0x80)
898 match_DspSimpleText();
899 else if ((data[pos] == 0x3c || data[pos] == 0x39)
900 && data[pos + 1] == 0x80)
906 /* match_byte_assert(0x01);
907 match_byte_assert(0x02);
908 match_byte_assert(0x0d); */
910 else if (data[pos] == 0x15 && data[pos + 1] == 0x80)
916 printf ("15 80(%f", get_double());
917 printf (" %s)\n", get_string1());
920 match_byte_assert(0);
922 if (!match_byte(2) && !match_byte(3))
923 match_byte_assert(0);
924 match_zeros_assert(3);
926 match_byte_assert(0);
927 match_byte_assert(1);
928 match_zeros_assert(3);
929 match_byte_assert(1);
930 match_byte_assert(0);
935 match_byte_assert(0);
939 match_zeros_assert(13);
942 else if (data[pos] == 0x9 && data[pos + 1] == 0x80)
946 else if (data[pos] == 0xe || data[pos] == 0x12)
948 else if (data[pos] == 0x11 || data[pos] == 0x13)
951 match_byte_assert(0);
952 if (match_u32(0xc) || match_u32(0xd))
955 match_zeros_assert(13);
957 else if (data[pos] == 0x29 ||
993 match_byte_assert(0);
995 else if (data[pos] == 0x2c ||
1000 data[pos] == 0x40 ||
1001 data[pos] == 0x3f ||
1002 data[pos] == 0x42 ||
1003 data[pos] == 0x43 ||
1004 data[pos] == 0x44 ||
1005 data[pos] == 0x49 ||
1006 data[pos] == 0x3e ||
1015 fprintf (stderr, "bad record 0x%02x at offset %x: ",
1018 hex_dump (stderr, pos, 64);
1022 else if (match_byte(0xa))
1024 match_byte_assert(0);
1025 if (match_u16(0x0e74))
1026 match_byte_assert(0);
1029 match_zeros_assert(4);
1034 else if (match_byte(1))
1036 match_byte_assert(0);
1039 match_byte_assert(0);
1040 match_zeros_assert(3);
1042 if (match_byte(0x08))
1044 match_byte_assert(0);
1045 match_u16_assert(0x0e74);
1046 match_byte_assert(0);
1048 else if (match_byte(3))
1050 match_byte_assert(0);
1051 if (match_u16(0x0e74))
1052 match_byte_assert(0);
1055 match_zeros_assert(6);
1056 if (!match_byte(0xe) && !match_byte(0x11))
1057 match_byte_assert(0);
1058 match_byte_assert(0);
1059 if (!match_u16(0x0e74))
1060 match_u16_assert(0);
1061 match_byte_assert(0);
1066 match_byte_assert(0);
1067 match_byte_assert(1);
1068 match_zeros_assert(3);
1069 match_byte_assert(1);
1070 match_byte_assert(0);
1073 else if (match_byte(7) || match_byte(4) || match_byte(5) || match_byte(6) || match_byte(8) || match_byte(9) || match_byte(0xb) || match_byte(0xc))
1075 match_byte_assert(0);
1076 if (!match_u16(0x0e74))
1077 match_byte_assert(0);
1078 match_byte_assert(0);
1080 else if (match_byte(2) || match_byte(3))
1082 match_byte_assert(0);
1083 if (!match_u16(0x0e74))
1085 match_zeros_assert(6);
1087 match_zeros_assert(4);
1092 match_u16_assert(0x0e74);
1095 //match_byte_assert(0);
1099 //fprintf (stderr, "bad record start at offset %x: ", pos);
1100 hex_dump (stderr, pos, 64);
1108 main(int argc, char *argv[])
1110 bool print_offsets = false;
1113 int c = getopt (argc, argv, "o");
1120 print_offsets = true;
1127 if (argc - optind != 1)
1129 fprintf (stderr, "usage: %s FILE.bin", argv[0]);
1133 const char *filename = argv[optind];
1134 int fd = open(filename, O_RDONLY);
1137 fprintf (stderr, "%s: open failed (%s)", filename, strerror (errno));
1148 data = malloc(n + 256);
1154 if (read(fd, data, n) != n)
1159 for (int i = 0; i < 256; i++)
1160 data[n + i] = i % 2 ? 0xaa : 0x55;
1163 setvbuf (stdout, NULL, _IOLBF, 0);
1165 match_byte_assert(4);
1166 match_u32_assert(0);
1167 match_string1_assert("SPSS Output Document");
1168 match_u32_assert(1);
1169 match_byte_assert(0x63);
1171 parse_heading("NavRoot");
1172 match_byte_assert(2);
1173 match_zeros_assert(32);
1175 parse_heading("DspSimpleText");
1176 match_zeros_assert(10);
1178 parse_heading("DspString");
1181 parse_heading("NavTreeViewItem");
1182 match_byte_assert(0);
1184 match_u32_assert(0);
1185 match_byte_assert(2);
1186 match_byte_assert(0);
1187 match_byte_assert(1);
1188 match_zeros_assert(9);
1189 match_u32_assert(1);
1191 match_u32_assert(0);
1192 match_u32_assert(0x18);
1194 match_u32_assert(0xffffffd8);
1195 match_u32_assert(0xffffffde);
1196 match_u32_assert(0x18);
1198 match_u32_assert(0xffffffd8);
1199 match_u32_assert(0x28);
1200 match_u32_assert(0x28);
1204 match_zeros_assert(5);
1206 if (match_u32(8500))
1207 match_u32_assert(11000);
1210 match_u32_assert(11000);
1211 match_u32_assert(8500);
1216 match_byte_assert(1);
1221 get_string4(); /* page title */
1222 match_byte_assert(1);
1223 match_byte_assert(1);
1224 match_zeros_assert(3);
1225 get_string4(); /* page number */
1226 match_byte_assert(0);
1228 match_u16_assert(2);
1231 if (data[pos + 9] != 'L')
1233 parse_heading("NavLog");
1243 puts(get_padded_string(32));
1245 match_u32_assert(132);
1246 match_zeros_assert(8);
1247 match_u32_assert(1);
1248 printf ("0x%x\n", pos);
1250 match_byte_assert(0);
1252 parse_heading("NavHead");
1254 match_NavTreeViewItem();
1255 match_zeros_assert(3);
1257 parse_heading("NavTitle");
1259 match_DspSimpleText();
1261 match_NavTreeViewItem();
1263 match_byte_assert(1);
1264 match_byte_assert(1);
1265 match_u32_assert(-19);
1266 match_zeros_assert(12);
1267 match_byte_assert(0xbc);
1268 match_byte_assert(2);
1269 match_zeros_assert(9);
1270 match_byte_assert(0x22);
1271 puts(get_padded_string(32));
1272 match_u32_assert(80);
1273 match_zeros_assert(8);
1274 match_u32_assert(1);
1276 match_byte_assert(0);
1278 parse_heading("NavNote");
1279 match_byte_assert(2);
1280 match_zeros_assert(8);
1281 match_u32_assert(24);
1283 match_u32_assert(-40);
1285 match_u32_assert(2);
1286 match_u32_assert(1);
1287 match_DspSimpleText();
1289 match_NavTreeViewItem();
1290 match_byte_assert(1);
1292 parse_heading("PTPivotController");
1293 match_byte_assert(2);
1295 match_u32_assert(100);
1296 match_u32_assert(100);
1297 match_u32_assert(100);
1298 match_u32_assert(100);
1300 parse_heading("PVPivotView");
1301 match_u32_assert(5);
1302 match_byte_assert(0);
1304 parse_heading("PMPivotModel");
1305 match_byte_assert(3);
1307 parse_heading("NDimensional__DspCell");
1308 match_byte_assert(0);
1309 match_u32_assert(1);
1311 parse_heading("IndexedCollection");
1312 match_byte_assert(0);
1314 match_zeros_assert(3);
1315 match_byte_assert(1);
1316 match_byte_assert(0);
1317 match_zeros_assert(7);
1319 while (data[pos] != 1)
1327 match_byte_assert(1);
1328 match_byte_assert(0);
1329 puts(get_string1());
1331 match_u32_assert(2);
1332 puts(get_string1());
1334 match_byte_assert(0);
1335 match_byte_assert(1);
1336 match_byte_assert(0);
1337 match_byte_assert(0);
1338 match_byte_assert(0);
1339 match_byte_assert(1);
1340 match_byte_assert(0);
1344 parse_heading("PMPivotItemTree");
1345 match_byte_assert(0);
1347 parse_heading("AbstractTreeBranch");
1348 match_byte_assert(0);
1350 parse_heading("PMModelItemInfo");
1351 parse_PMModelItemInfo();
1352 match_DspSimpleText();
1355 match_u32_assert(7);
1356 match_PMPivotItemTree();
1358 match_u32_assert(0);
1359 match_PMPivotItemTree();
1361 match_u32_assert(0);
1362 match_PMPivotItemTree();
1364 match_u32_assert(6);
1365 match_PMPivotItemTree();
1367 match_u32_assert(0);
1368 match_PMPivotItemTree();
1370 match_u32_assert(0);
1371 match_PMPivotItemTree();
1373 match_u32_assert(0);
1374 match_PMPivotItemTree();
1376 match_u32_assert(0);
1377 match_PMPivotItemTree();
1379 match_u32_assert(0);
1380 match_PMPivotItemTree();
1382 match_u32_assert(0);
1383 match_PMPivotItemTree();
1385 match_u32_assert(2);
1386 match_PMPivotItemTree();
1388 match_u32_assert(0);
1389 match_PMPivotItemTree();
1391 match_u32_assert(0);
1392 match_PMPivotItemTree();
1394 match_u32_assert(0);
1395 match_PMPivotItemTree();
1397 match_u32_assert(0);
1398 match_PMPivotItemTree();
1400 match_u32_assert(2);
1401 match_PMPivotItemTree();
1403 match_u32_assert(0);
1404 match_PMPivotItemTree();
1406 match_u32_assert(0);
1410 while (data[pos] != 0xff || data[pos + 1] != 0xff)
1412 parse_heading("PVViewDimension");
1415 for (i = 0; data[pos + i] != 0xff || data[pos + i + 1] != 0xff; i++)
1417 hex_dump(stdout, pos, i);
1419 printf ("%#x: end of successful parse\n", pos);