#define exit(i) XCEXIT(i) #define TSSEMAPHORENAME "TrackSalve Data Hook" #define TD_VERSION1_2 33 #define TD_REVISION1_2 127 #define TD_VERSION1_3 34 #define TD_REVISION1_3 1 #define PUBCLR (MEMF_PUBLIC|MEMF_CLEAR) /* Program return codes */ #define ZERO 0 #define WARNING 5 #define SERIOUS 10 #define FAILURE 20 /* Secondary result codes */ #define E_CMDLINE -41 #define E_ALLOCMEM -42 #define E_INTUITION -43 #define E_RTAG -44 #define E_TD_VERSION -45 #define E_LOSTPC -47 /*-- The findable structure. We put it in the semaphore list. */ struct TSHook{ struct SignalSemaphore TSH_Semaphore; struct TSControl *TSH_TSControl; ULONG TSH_Version; }; /*-- The UnitData structure contains data of interest for a Trackdisk unit task. */ struct UnitData{ struct IOExtTD UD_TDReq; struct TSControl *UD_TSControl; char *UD_ReturnTD; APTR UD_Userdata; UBYTE UD_Cmd0; UBYTE UD_Cmd1; UWORD UD_SavedL; UWORD UD_SavedD; }; /*-- The global control structure. It contains data concerning shared items between all TD-tasks. */ struct TSControl{ struct TSHook *TSC_TSHook; struct UnitData *TSC_UnitData[NUMUNITS]; struct UnitData TSC_UDAlloc[NUMUNITS]; struct Resident *TSC_TDTag; ULONG TSC_TDCodeSize; struct Resident *TSC_TSTag; char *TSC_TSCode; ULONG TSC_TSCodeSize; char *TSC_Buffer; UBYTE TSC_InUse; UBYTE TSC_Salve; UBYTE TSC_Verify; UBYTE TSC_AvailUnits; struct SignalSemaphore TSC_OwnBuffer; struct Library *TSC_IntuBase; ULONG TSC_Size; }; /* Bits of the UD_Command, UD_PreCmd and UNIT_pad */ #define B_READONLY 0 #define F_READONLY (1<