/* Fixed Headeroffsets */

#define TYPE		0
#define HEADER_KEY	1
#define HIGHEST_SEQ	2
#define	SEQ_NUM		2
#define BLOCK_COUNT	2
#define	DATA_SIZE	3
#define	FIRST_DATA	4
#define	NEXT_DATA	4
#define CHECKSUM	5
#define DIR_HASHTAB	6
#define FH_ENDLIST	6
#define	BITMAP_CHECKSUM	0
#define MAX_BITMAPBLOCKS 26

/*	Diskblock-Type Definitions 	*/

#define T_SHORT		2
#define T_DATA		8
#define T_LIST		16
#define ST_ROOT		1
#define ST_DIR		2
#define ST_FILE		-3

#define EMPTY		(unsigned long*) 0
#define BLOCKED		(unsigned long*) 0xFFFFFFFF

/* FileSystem ID's */

#define	STANDARD    0x444F5300
#define FFS			0x444F5301

/* Bootblock Offsets */

#define FILESYSTEM		0
#define BOOT_CHECKSUM	1
#define ROOTNODE		2

/* Calculated Header Offsets */

unsigned long FH_BLOCKLIST;
unsigned long BITMAPLISTSTART;
unsigned long BITMAPLISTEND;
unsigned long BMFLAG;
unsigned long NAME;
unsigned long CREATE_TICKS;
unsigned long HASHCHAIN;
unsigned long PARENT;
unsigned long EXTENSION;
unsigned long SECONDARY_TYPE;
unsigned long NAMEOFFSET;
unsigned long NAMELENGTH;

struct DevPar {
	char 			Device[15];   /* Devicename i.e. "DF0:" */
	char 			Name[32];     /* Name of Devicedriver i.e. "trackdisk.device" */
	unsigned long	Unit;         /* Unit # for OpenDevice */
	unsigned long	NumHeads;     /* # of Heads */
	unsigned long	NumSecs;	  /* # of Sectors per Track */
	unsigned long	NumCyls;	  /* # of Cylinders */
	unsigned long	NumTracks;    /* # of Tracks (NumHeads * NumCyls) */
	unsigned long	ReservedBlks; /* # of Bootblocks */
	unsigned long	Size;         /* # of Longwords per Sector */
	unsigned long	BlockSize;    /* # of Bytes per Sector */
	unsigned long   RootBlock;    /* Sector # of Rootblock */
	unsigned long	NumBlocks;    /* Total # of Blocks (NumHeads * NumCyls * NumSecs) */
	unsigned long	NumEntries;   /* # of Entries in HashTable */
	unsigned long	NumLongs;     /* # of Longwords for Bitmap */
	unsigned long	SecsPerCyl;	  /* # of Sectors per Cylinder (NumHeads * NumSecs) */
	unsigned long	MemBufType;   /* Type of Memory for Buffers */
	unsigned long	Flags;        /* Flags for OpenDevice */
	unsigned long	Offset;       /* Offset Value for LowCyl in DoIO */
	unsigned long	FileSystem;   /* Type of Filesystem (Standard or FFS) */
	unsigned long	NumBMSecs;    /* # of BitmapSectors */
	unsigned long	BlocksPerBMSec; /* # of Blocks in one Bitmapsector */ 
};
