13 all_ascii(const uint8_t *p, size_t n)
15 for (size_t i = 0; i < n; i++)
16 if (p[i] < 32 || p[i] > 126)
22 try_find(const char *target, size_t target_len)
24 const uint8_t *pos = (const uint8_t *) memmem (data, n, target, target_len);
25 return pos ? pos - data : 0;
29 try_find_tail(const char *target, size_t target_len)
31 size_t pos = try_find(target, target_len);
32 return pos ? pos + target_len : 0;
36 find(const char *target, size_t target_len)
38 size_t pos = try_find(target, target_len);
41 fprintf (stderr, "not found\n");
48 find_tail(const char *target, size_t target_len)
50 size_t pos = try_find_tail(target, target_len);
53 fprintf (stderr, "not found\n");
62 #define STR(x) XSTR(x)
63 #define WHERE __FILE__":" STR(__LINE__)
69 memcpy(&x, &data[pos], 4);
78 memcpy(&x, &data[pos], 8);
93 match_u32_assert(uint32_t x, const char *where)
95 unsigned int y = get_u32();
98 fprintf(stderr, "%s: 0x%x: expected i%u, got i%u\n", where, pos - 4, x, y);
102 #define match_u32_assert(x) match_u32_assert(x, WHERE)
105 match_byte(uint8_t b)
107 if (pos < n && data[pos] == b)
117 match_byte_assert(uint8_t b, const char *where)
121 fprintf(stderr, "%s: 0x%x: expected %02x, got %02x\n", where, pos, b, data[pos]);
125 #define match_byte_assert(b) match_byte_assert(b, WHERE)
128 get_string(const char *where)
131 /*data[pos + 1] == 0 && data[pos + 2] == 0 && data[pos + 3] == 0*/
132 /*&& all_ascii(&data[pos + 4], data[pos])*/)
134 int len = data[pos] + data[pos + 1] * 256;
135 char *s = malloc(len + 1);
137 memcpy(s, &data[pos + 4], len);
144 fprintf(stderr, "%s: 0x%x: expected string\n", where, pos);
148 #define get_string() get_string(WHERE)
153 if (match_byte (0x31))
157 match_u32_assert (0);
158 int subn = get_u32 ();
159 printf ("nested %d bytes", subn);
162 else if (match_u32 (1))
164 printf("(footnote %d) ", get_u32());
165 match_byte_assert (0);
166 match_byte_assert (0);
167 int subn = get_u32 ();
168 printf ("nested %d bytes", subn);
171 else if (match_u32 (2))
173 printf("(special 2)");
174 match_byte_assert(0);
175 match_byte_assert(0);
177 match_byte_assert(0);
178 match_byte_assert(0);
179 int subn = get_u32 ();
180 printf ("nested %d bytes", subn);
186 printf("(special 3)");
187 match_byte_assert(0);
188 match_byte_assert(0);
189 match_byte_assert(1);
190 match_byte_assert(0);
191 int subn = get_u32 ();
192 printf ("nested %d bytes, ", subn);
195 printf ("nested %d bytes, ", subn);
200 match_byte_assert (0x58);
204 dump_value(int level)
206 for (int i = 0; i <= level; i++)
215 char *s1 = get_string();
217 char *s2 = get_string();
218 char *s3 = get_string();
220 printf("strings \"%s\", \"%s\" and \"%s\"", s1, s2, s3);
222 printf("string \"%s\" and \"%s\"", s1, s2);
233 else if (match_byte (5))
235 match_byte_assert (0x58);
236 printf ("variable \"%s\"", get_string());
238 if (!match_byte(1) && !match_byte(2))
239 match_byte_assert(3);
245 else if (match_byte (2))
251 match_byte_assert (0x58);
253 value = get_double ();
255 vallab = get_string ();
256 printf ("value %g format %d(%d.%d) var \"%s\" vallab \"%s\"",
257 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
258 if (!match_byte (1) && !match_byte(2))
259 match_byte_assert (3);
268 else if (match_byte (4))
271 char *var, *vallab, *value;
273 match_byte_assert (0x58);
275 vallab = get_string ();
277 if (!match_byte(1) && !match_byte(2))
278 match_byte_assert (3);
279 value = get_string ();
280 printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"",
281 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
287 else if (match_byte (1))
294 value = get_double ();
295 printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
305 char *base = get_string();
307 printf ("\"%s\" with %d variables:\n", base, x);
310 for (int i = 0; i < x; i++)
312 dump_value (level+1);
318 for (int i = 0; i < x; i++)
322 for (int j = 0; j <= level; j++)
324 printf("variable %d has %d values:\n", i, y);
325 for (int j = 0; j < y; j++)
329 char *a = get_string();
330 match_byte_assert(0x58);
331 char *b = get_string();
332 char *c = get_string();
333 for (int k = 0; k <= level + 1; k++)
335 printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
343 dump_value (level+1);
352 dump_dim_value_31(void)
354 if (match_byte (0x31))
358 match_u32_assert (0);
359 int subn = get_u32 ();
360 printf ("nested %d bytes", subn);
363 else if (match_u32 (1))
365 printf("(footnote %d) ", get_u32());
366 match_byte_assert (0);
367 match_byte_assert (0);
368 int subn = get_u32 ();
369 printf ("nested %d bytes", subn);
374 match_byte_assert (0x58);
378 dump_dim_value(int level)
380 for (int i = 0; i <= level; i++)
388 printf("string \"%s\"", get_string());
392 else if (match_byte (5))
394 match_byte_assert (0x58);
395 printf ("variable \"%s\"", get_string());
398 match_byte_assert(3);
400 else if (match_byte (2))
406 match_byte_assert (0x58);
408 value = get_double ();
410 vallab = get_string ();
411 printf ("value %g format %d(%d.%d) var \"%s\" vallab \"%s\"",
412 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
414 match_u32_assert (2);
417 else if (match_byte (1))
422 match_byte_assert (0x58);
424 value = get_double ();
425 printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
436 printf ("; \"%s\", substitutions:", get_string());
437 int total_subs = get_u32();
441 total_subs = (total_subs - 1) + x;
442 match_u32_assert (0);
444 printf (" (total %d)", total_subs);
446 for (int i = 0; i < total_subs; i++)
449 dump_value (level + 1);
455 dump_category(int level)
465 else if (match_u32 (1))
472 else if (match_byte (1))
476 match_u32_assert (1);
482 match_u32_assert (0);
486 int n_categories = get_u32();
487 if (n_categories > 0)
488 printf (", %d subcategories:", n_categories);
490 for (int i = 0; i < n_categories; i++)
491 dump_category (level + 1);
498 printf("next dim\n");
502 /* This byte is usually 0x02 but 0x00 and 0x75 (!) have also been spotted. */
505 if (!match_byte(0) && !match_byte(1))
506 match_byte_assert(2);
510 match_byte_assert(1);
520 n_categories = get_u32();
521 printf("%d nested categories\n", n_categories);
522 for (int i = 0; i < n_categories; i++)
531 printf ("%u dimensions\n", n_dims);
532 for (int i = 0; i < n_dims; i++)
540 dump_data_value_31(void)
542 if (match_byte (0x31))
549 match_u32_assert (0);
550 int subn = get_u32 ();
551 printf ("nested %d bytes", subn);
554 else if (match_u32 (1))
556 printf("(footnote %d) ", get_u32());
557 match_byte_assert (0);
558 match_byte_assert (0);
559 int subn = get_u32 ();
560 printf ("nested %d bytes", subn);
563 else if (match_u32 (2))
565 printf("(special 2)");
566 match_byte_assert(0);
567 match_byte_assert(0);
569 match_byte_assert(0);
570 match_byte_assert(0);
571 int subn = get_u32 ();
572 printf ("nested %d bytes", subn);
578 printf("(special 3)");
579 match_byte_assert(0);
580 match_byte_assert(0);
581 match_byte_assert(1);
582 match_byte_assert(0);
583 int subn = get_u32 ();
584 printf ("nested %d bytes, ", subn);
587 printf ("nested %d bytes, ", subn);
592 match_byte_assert (0x58);
600 for (int i = 0; i < 3 + n_dims; i++)
602 printf ("data intro:");
603 for (int i = 0; i < 3 + n_dims; i++)
607 fprintf (stderr,"data intro (%d dims):", n_dims);
608 for (int i = 0; i < 3+n_dims; i++)
609 fprintf (stderr," %d", get_u32());
610 fprintf(stderr,"\n");
613 printf ("%d data values, starting at %08x\n", x, pos);
614 for (int i = 0; i < x; i++)
616 printf("%08x, index %d:\n", pos, get_u32());
627 dump_data_value_31();
629 value = get_double ();
630 printf (" value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
632 else if (match_byte (3))
635 dump_data_value_31();
637 printf("string \"%s\"", get_string());
640 else if (match_byte (2))
646 match_byte_assert (0x58);
648 value = get_double ();
650 vallab = get_string ();
651 printf ("value %g format %d(%d.%d) var \"%s\" vallab \"%s\"",
652 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
653 if (!match_byte (1) && !match_byte(2))
654 match_byte_assert (3);
656 else if (match_byte (4))
659 char *var, *vallab, *value;
661 match_byte_assert (0x58);
663 vallab = get_string ();
665 if (!match_byte(1) && !match_byte(2))
666 match_byte_assert (3);
667 value = get_string ();
668 printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"",
669 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
671 else if (match_byte (5))
673 match_byte_assert (0x58);
674 printf ("variable \"%s\"", get_string());
676 if (!match_byte(1) && !match_byte(2))
677 match_byte_assert(3);
685 dump_data_value_31();
686 char *base = get_string();
688 printf ("\"%s\"; %d variables:\n", base, x);
689 for (int i = 0; i < x; i++)
696 for (int j = 0; j <= 0; j++)
698 printf("variable %d has %d values:\n", i, y);
699 for (int j = 0; j < y; j++)
706 dump_data_value_31();
708 value = get_double ();
709 printf (" value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
711 else if (match_byte(3))
713 char *a = get_string();
714 match_byte_assert(0x58);
715 char *b = get_string();
716 char *c = get_string();
717 for (int k = 0; k <= 1; k++)
719 printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
725 else if (match_byte(5))
727 match_byte_assert (0x58);
728 printf ("variable \"%s\"", get_string());
730 if (!match_byte(1) && !match_byte(2))
731 match_byte_assert(3);
748 dump_title_value_31(int level)
750 if (match_byte (0x31))
754 match_u32_assert (0);
755 int subn = get_u32 ();
756 printf ("nested %d bytes", subn);
759 else if (match_u32 (1))
761 printf("(footnote %d) ", get_u32());
762 match_byte_assert (0);
763 match_byte_assert (0);
764 int subn = get_u32 ();
765 printf ("nested %d bytes", subn);
768 else if (match_u32 (2))
770 printf("(special 2)");
771 match_byte_assert(0);
772 match_byte_assert(0);
775 match_byte_assert(0);
776 match_byte_assert(0);
777 int subn = get_u32 ();
778 printf ("nested %d bytes", subn);
784 printf("(special 3)");
785 match_byte_assert(0);
786 match_byte_assert(0);
787 match_byte_assert(1);
788 match_byte_assert(0);
789 int subn = get_u32 ();
790 printf ("nested %d bytes, ", subn);
793 printf ("nested %d bytes, ", subn);
798 match_byte_assert (0x58);
802 dump_title_value(int level)
804 for (int i = 0; i <= level; i++)
815 dump_title_value_31(level);
817 printf("string \"%s\"", get_string());
828 else if (match_byte (5))
830 dump_title_value_31(level);
831 printf ("variable \"%s\"", get_string());
833 if (!match_byte(1) && !match_byte(2))
834 match_byte_assert(3);
836 else if (match_byte (2))
842 match_byte_assert (0x58);
844 value = get_double ();
846 vallab = get_string ();
847 printf ("value %g format %d(%d.%d) var \"%s\" vallab \"%s\"",
848 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
849 if (!match_byte (1) && !match_byte(2))
850 match_byte_assert (3);
859 else if (match_byte (4))
862 char *var, *vallab, *value;
864 match_byte_assert (0x58);
866 vallab = get_string ();
868 if (!match_byte(1) && !match_byte(2))
869 match_byte_assert (3);
870 value = get_string ();
871 printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"",
872 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
878 else if (match_byte (1))
883 dump_title_value_31(level);
885 value = get_double ();
886 printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
895 dump_title_value_31(level);
897 char *base = get_string();
899 printf ("\"%s\" with %d variables:\n", base, x);
900 for (int i = 0; i < x; i++)
907 for (int j = 0; j <= level; j++)
909 printf("variable %d has %d values:\n", i, y);
910 for (int j = 0; j < y; j++)
915 char *a = get_string();
916 match_byte_assert(0x58);
917 char *b = get_string();
918 char *c = get_string();
919 for (int k = 0; k <= level + 1; k++)
921 printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
924 dump_title_value (level+1);
932 dump_footnote_value(int level)
934 for (int i = 0; i <= level; i++)
944 if (match_byte (0x31))
948 printf("(footnote %d) ", get_u32());
949 match_byte_assert (0);
950 match_byte_assert (0);
951 int subn = get_u32 ();
952 printf ("nested %d bytes", subn);
955 else if (match_u32 (2))
957 printf("(special 2)");
958 match_byte_assert(0);
959 match_byte_assert(0);
961 match_byte_assert(0);
962 match_byte_assert(0);
963 int subn = get_u32 ();
964 printf ("nested %d bytes", subn);
970 printf("(special 3)");
971 match_byte_assert(0);
972 match_byte_assert(0);
973 match_byte_assert(1);
974 match_byte_assert(0);
975 int subn = get_u32 ();
976 printf ("nested %d bytes, ", subn);
979 printf ("nested %d bytes, ", subn);
984 match_byte_assert (0x58);
986 printf("string \"%s\"", get_string());
988 match_byte_assert (1);
990 else if (match_byte (5))
992 match_byte_assert (0x58);
993 printf ("variable \"%s\"", get_string());
995 if (!match_byte(1) && !match_byte(2))
996 match_byte_assert(3);
998 else if (match_byte (2))
1000 unsigned int format;
1004 match_byte_assert (0x58);
1005 format = get_u32 ();
1006 value = get_double ();
1007 var = get_string ();
1008 vallab = get_string ();
1009 printf ("value %g format %d(%d.%d) var \"%s\" vallab \"%s\"",
1010 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
1011 if (!match_byte (1) && !match_byte(2))
1012 match_byte_assert (3);
1021 else if (match_byte (4))
1023 unsigned int format;
1024 char *var, *vallab, *value;
1026 match_byte_assert (0x58);
1027 format = get_u32 ();
1028 vallab = get_string ();
1029 var = get_string ();
1030 if (!match_byte(1) && !match_byte(2))
1031 match_byte_assert (3);
1032 value = get_string ();
1033 printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"",
1034 value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab);
1040 else if (match_byte (1))
1042 unsigned int format;
1045 if (match_byte (0x31))
1049 printf("(footnote %d) ", get_u32());
1050 match_byte_assert (0);
1051 match_byte_assert (0);
1052 int subn = get_u32 ();
1053 printf ("nested %d bytes", subn);
1058 match_byte_assert (0x58);
1059 format = get_u32 ();
1060 value = get_double ();
1061 printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
1063 else if (match_byte (0x31))
1067 printf("(footnote %d) ", get_u32());
1068 match_byte_assert (0);
1069 match_byte_assert (0);
1070 int subn = get_u32 ();
1071 printf ("nested %d bytes", subn);
1076 match_u32_assert (0);
1077 match_u32_assert (0);
1078 int subn = get_u32 ();
1079 printf ("nested %d bytes", subn);
1082 char *base = get_string();
1084 printf ("\"%s\"; %d variables:\n", base, x);
1085 for (int i = 0; i < x; i++)
1091 match_u32_assert(0);
1092 for (int j = 0; j <= level; j++)
1094 printf("variable %d has %d values:\n", i, y);
1095 for (int j = 0; j < y; j++)
1099 char *a = get_string();
1100 match_byte_assert(0x58);
1101 char *b = get_string();
1102 char *c = get_string();
1103 for (int k = 0; k <= level + 1; k++)
1105 printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
1107 match_byte_assert(0);
1110 dump_footnote_value (level+1);
1118 match_byte_assert (0x58);
1119 char *base = get_string();
1121 printf ("\"%s\" with %d variables:\n", base, x);
1122 for (int i = 0; i < x; i++)
1128 match_u32_assert(0);
1129 for (int j = 0; j <= level; j++)
1131 printf("variable %d has %d values:\n", i, y);
1132 for (int j = 0; j < y; j++)
1136 char *a = get_string();
1137 match_byte_assert(0x58);
1138 char *b = get_string();
1139 char *c = get_string();
1140 for (int k = 0; k <= level + 1; k++)
1142 printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
1143 match_byte_assert(0);
1146 dump_footnote_value (level+1);
1157 dump_title_value(0); putchar('\n');
1158 dump_title_value(0); putchar('\n');
1159 match_byte_assert(0x31);
1160 dump_title_value(0); putchar('\n');
1162 match_byte_assert(0x58);
1163 if (match_byte(0x31))
1165 dump_footnote_value(0); putchar('\n');
1168 match_byte_assert(0x58);
1171 int n_footnotes = get_u32();
1172 if (n_footnotes >= 20)
1174 fprintf(stderr, "%08x: %d footnotes\n", pos - 4, n_footnotes);
1178 printf("------\n%d footnotes\n", n_footnotes);
1179 if (n_footnotes < 20)
1181 for (int i = 0; i < n_footnotes; i++)
1183 printf("footnote %d:\n", i);
1184 dump_footnote_value(0);
1191 unsigned int format;
1194 if (match_byte (0x31))
1198 printf("(footnote %d) ", get_u32());
1199 match_byte_assert (0);
1200 match_byte_assert (0);
1201 int subn = get_u32 ();
1202 printf ("nested %d bytes", subn);
1207 match_byte_assert (0x58);
1208 format = get_u32 ();
1209 value = get_double ();
1210 printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
1217 else if (match_byte (0x31))
1219 match_byte_assert(3);
1221 match_byte_assert(0x58);
1222 match_u32_assert(0);
1227 match_byte_assert (0x58);
1228 printf("(%d)\n", get_u32());
1234 find_dimensions(void)
1237 const char dimensions[] = "-,,,.\0";
1238 int x = try_find_tail(dimensions, sizeof dimensions - 1);
1243 const char dimensions[] = "-,,, .\0";
1244 return find_tail(dimensions, sizeof dimensions - 1);
1250 printf("fonts: offset=%08x\n", pos);
1252 for (int i = 1; i <= 8; i++)
1254 printf("%08x: font %d, ", pos, i);
1255 match_byte_assert(i);
1256 match_byte_assert(0x31);
1257 printf("%s, ", get_string());
1258 match_byte_assert(0);
1259 match_byte_assert(0);
1260 if (!match_byte(0x40) && !match_byte(0x20) && !match_byte(0x80) && !match_byte(0x10))
1261 match_byte_assert(0x50);
1262 if (!match_byte(0x41))
1263 match_byte_assert(0x51);
1265 printf ("%s, ", get_string());
1266 printf ("%s, ", get_string());
1267 match_u32_assert(0);
1268 match_u32_assert(0);
1277 match_u32_assert(240);
1280 match_u32_assert(18);
1287 match_u32_assert(142);
1291 int count = get_u32();
1294 char *encoding = get_string();
1295 printf("encoding=%s\n", encoding);
1298 match_u32_assert(UINT32_MAX);
1300 match_byte_assert(1);
1301 match_byte_assert(0);
1303 match_byte_assert(1);
1304 if (!match_byte(0x99) && !match_byte(0x98))
1305 match_byte_assert(0x97);
1306 match_byte_assert(7);
1307 match_byte_assert(0);
1308 match_byte_assert(0);
1309 if (match_byte('.'))
1310 match_byte_assert(',');
1313 match_byte_assert(',');
1314 if (!match_byte('.'))
1315 match_byte_assert(' ');
1317 match_u32_assert(5);
1318 for (int i = 0; i < 5; i++)
1321 if (pos != find_dimensions())
1322 fprintf (stderr, "%08x / %08x\n", pos, find_dimensions());
1326 main(int argc, char *argv[])
1331 if (isatty(STDIN_FILENO))
1333 fprintf(stderr, "redirect stdin from a .bin file\n");
1336 if (fstat(STDIN_FILENO, &s))
1348 if (read(STDIN_FILENO, data, n) != n)
1356 if (!strcmp(argv[1], "title0"))
1359 if (match_byte (0x03)
1360 || (match_byte (0x05) && match_byte (0x58)))
1361 printf ("%s\n", get_string());
1363 printf ("<unknown>\n");
1366 else if (!strcmp(argv[1], "title"))
1371 else if (!strcmp(argv[1], "titleraw"))
1373 const char fonts[] = "\x01\x31\x09\0\0\0SansSerif";
1375 n = find(fonts, sizeof fonts - 1);
1377 else if (!strcmp(argv[1], "fonts"))
1379 const char fonts[] = "\x01\x31\x09\0\0\0SansSerif";
1380 const char styles[] = "\xf0\0\0\0";
1381 start = find(fonts, sizeof fonts - 1);
1382 n = find(styles, sizeof styles - 1);
1384 else if (!strcmp(argv[1], "styles"))
1386 const char styles[] = "\xf0\0\0\0";
1387 const char dimensions[] = "-,,,.\0";
1388 start = find(styles, sizeof styles - 1);
1389 n = find(dimensions, sizeof dimensions - 1) + sizeof dimensions - 1;
1391 else if (!strcmp(argv[1], "dimensions") || !strcmp(argv[1], "all"))
1394 match_byte_assert(1);
1395 match_byte_assert(0);
1396 match_u32_assert(3);
1397 match_byte_assert(1);
1399 match_byte_assert(1);
1400 match_byte_assert(0);
1401 match_byte_assert(0);
1403 match_byte_assert(1);
1405 match_byte_assert(0);
1406 match_byte_assert(0);
1407 match_byte_assert(0);
1411 printf("\n\ndata:\n");
1414 match_byte_assert (1);
1417 fprintf (stderr, "%x / %x\n", pos, n);
1424 fprintf (stderr, "unknown section %s\n", argv[1]);
1431 for (size_t i = start; i < n; )
1438 && i + 4 + data[i] + data[i + 1] * 256 <= n
1439 && all_ascii(&data[i + 4], data[i] + data[i + 1] * 256))
1441 fputs("\n\"", stdout);
1442 fwrite(&data[i + 4], 1, data[i] + data[i + 1] * 256, stdout);
1443 fputs("\" ", stdout);
1445 i += 4 + data[i] + data[i + 1] * 256;
1447 else if (i + 12 <= n
1448 && data[i + 1] == 40
1450 && data[i + 3] == 0)
1454 memcpy (&d, &data[i + 4], 8);
1455 printf ("F40.%d(%.*f)\n", data[i], data[i], d);
1458 else if (i + 12 <= n
1459 && data[i + 1] == 40
1460 && data[i + 2] == 31
1461 && data[i + 3] == 0)
1465 memcpy (&d, &data[i + 4], 8);
1466 printf ("PCT40.%d(%.*f)\n", data[i], data[i], d);
1470 && (data[i] && data[i] != 88 && data[i] != 0x41)
1475 printf ("i%d ", data[i]);
1480 printf("%02x ", data[i]);