+ for (i = 0; i < size; i += 16)
+ show = show_line(i, data + i, size - i, show);
+}
+
+static void parse_cochran_header(const char *filename,
+ const unsigned char *decode, unsigned mod,
+ const unsigned char *in, unsigned size)
+{
+ char *buf = malloc(size);
+
+ /* Do the "null decode" using a one-byte decode array of '\0' */
+ partial_decode(0 , 0x0b14, "", 0, 1, in, size, buf);
+
+ /*
+ * The header scrambling is different form the dive
+ * scrambling. Oh yay!
+ */
+#if 0 // Alex
+ partial_decode(0x058c, 0x0b14, decode, 0, mod, in, size, buf);
+#else // Don
+ partial_decode(0x05a0, 0x0b14, decode, 0, mod, in, size, buf);
+#endif
+ partial_decode(0x0b14, 0x1b14, decode, 0, mod, in, size, buf);
+ partial_decode(0x1b14, 0x2b14, decode, 0, mod, in, size, buf);
+ partial_decode(0x2b14, 0x3b14, decode, 0, mod, in, size, buf);
+ partial_decode(0x3b14, 0x5414, decode, 0, mod, in, size, buf);
+ partial_decode(0x5414, size, decode, 0, mod, in, size, buf);
+
+ printf("\n%s, header\n\n", filename);
+ cochran_debug_write(filename, buf, size);
+
+ free(buf);