+ * Associated files have a leading "._".
+ */
+#define ASSOCCHAR1 '.'
+#define ASSOCCHAR2 '_'
+
+/*
+ * This header is prepended on media tracks, such as Video CD MPEG files.
+ */
+struct riff_header {
+ char riff[4]; // "RIFF"
+ u_int32_t fileSize; // little endian file size, not including this field or sig
+ char cdxa[4]; // "CDXA"
+ char fmt[4]; // "fmt "
+ u_int32_t fmtSize; // always 16 (XXX this is an assumption)
+ char fmtData[16]; // CDXA extension of ISO directory entry, padded to 16 bytes
+ char data[4]; // "data"
+ u_int32_t dataSize; // number of sectors * 2352, little endian
+};
+
+#define CDXA_SECTOR_SIZE 2352
+
+
+/*
+ * AppleDouble constants
+ */
+#define APPLEDOUBLE_MAGIC 0x00051607
+#define APPLEDOUBLE_VERSION 0x00020000
+
+#define APPLEDOUBLE_DATAFORK 1
+#define APPLEDOUBLE_RESFORK 2
+#define APPLEDOUBLE_FINDERINFO 9
+
+/*
+ * Note that 68k alignment is needed to make sure that the first
+ * AppleDoubleEntry (after the numEntries below) is *immediately*
+ * after the numEntries, and not padded by 2 bytes.
+ *
+ * Consult RFC 1740 for details on AppleSingle/AppleDouble formats.