- printf ("\n %08x:", pos);
- int n_more_series = get_u32();
- printf (" %d series to come\n", n_more_series);
+ int n_series = get_u32();
+ for (int i = 0; i < n_series; i++)
+ {
+ printf ("%08x:", pos);
+ printf (" \"%s\"", get_string());
+ int n_pairs = get_u32();
+ for (int j = 0; j < n_pairs; j++)
+ {
+ int x = get_u32();
+ int y = get_u32();
+ printf (" (%d, %d)", x, y);
+ if (y > max1)
+ max1 = y;
+ }
+ printf ("\n");
+ }
+ }
+ printf ("\n%08x:", pos);
+ int n_strings = get_u32();
+ if (n_strings != max1 + 1)
+ {
+ fprintf (stderr, "n_strings=%d max1+1=%d (-s %#x -n %u)\n", n_strings, max1 + 1, start, n - start);
+ dump_raw (stderr, start, n, "\n");
+ assert(n_strings == max1 + 1);
+ }
+ printf (" %d strings\n", n_strings);
+
+ char **strings = malloc((max1 + 1) * sizeof *strings);
+ for (int i = 0; i <= max1; i++)
+ {
+ int frequency = get_u32();
+ char *s = get_string();
+ printf ("%d: \"%s\" (%d)\n", i, s, frequency);
+ strings[i] = s;
+ }
+ printf ("\n");