/* DO NOT EDIT! This file is generated by GenBootstrap; any modifications should be made to that program's source code instead. The contents of this file are in the public domain. */ #ifndef BOOTSTRAP_H #define BOOTSTRAP_H /* Basic types */ typedef int Int8 __attribute__ ((mode (QI))); typedef unsigned int UInt8 __attribute__ ((mode (QI))); typedef int Int16 __attribute__ ((mode (HI))); typedef unsigned int UInt16 __attribute__ ((mode (HI))); typedef int Int32 __attribute__ ((mode (SI))); typedef unsigned int UInt32 __attribute__ ((mode (SI))); typedef void* MemPtr; typedef void* MemHandle; typedef Int8 Char; typedef Int16 Err; #define TRAP(vector) __attribute__ ((__callseq__ ("trap #15; dc.w " #vector))) /* Data Manager */ typedef void* DmOpenRef; #define dmModeReadOnly 0x0001 DmOpenRef DmOpenDatabaseByTypeCreator (UInt32, UInt32, UInt16) TRAP (0xA075); void DmCloseDatabase (DmOpenRef) TRAP (0xA04A); MemHandle DmGet1Resource (UInt32, UInt16) TRAP (0xA060); void DmReleaseResource (MemHandle) TRAP (0xA061); /* System Manager */ typedef struct { Int16 cmd; void* cmdPBP; UInt16 launchFlags; } SysAppInfoType; #define sysAppLaunchFlagNewGlobals 0x04 #define sysAppLaunchFlagSubCall 0x10 Err SysAppStartup (SysAppInfoType**, void**, void**) TRAP (0xA08F); Err SysAppExit (SysAppInfoType*, void*, void*) TRAP (0xA090); extern UInt32 PilotMain (Int16, void*, UInt16); /* Error Manager */ void ErrDisplayFileLineMsg (char*, UInt16, char*) TRAP (0xA084); #define COMPOUNDIFY(stmt) do { stmt; } while (0) #define ErrFatalDisplayIf(cond, text) \ COMPOUNDIFY (if (cond) ErrDisplayFileLineMsg (__FILE__, __LINE__, text)) /* Feature Manager */ Err FtrUnregister (UInt32, UInt16) TRAP (0xA27A); Err FtrGet (UInt32, UInt16, UInt32*) TRAP (0xA27B); Err FtrSet (UInt32, UInt16, UInt32) TRAP (0xA27C); /* Memory Manager */ Err MemPtrFree (MemPtr) TRAP (0xA012); MemPtr MemPtrNew (UInt32) TRAP (0xA013); UInt32 MemPtrSize (MemPtr) TRAP (0xA016); Err MemPtrSetOwner (MemPtr, UInt16) TRAP (0xA01B); Err MemPtrResize (MemPtr, UInt32) TRAP (0xA01C); MemHandle MemHandleNew (UInt32) TRAP (0xA01E); MemPtr MemHandleLock (MemHandle) TRAP (0xA021); Err MemHandleUnlock (MemHandle) TRAP (0xA022); Err MemMove (void*, const void*, UInt32) TRAP (0xA026); Err MemHandleFree (MemHandle) TRAP (0xA02B); UInt32 MemHandleSize (MemHandle) TRAP (0xA02D); Err MemHandleSetOwner (MemHandle, UInt16) TRAP (0xA032); Err MemHandleResize (MemHandle, UInt32) TRAP (0xA033); Err MemSet (void*, UInt32, UInt8) TRAP (0xA027); /* Sound Manager */ enum {sndError = 3}; void SndPlaySystemSound (UInt8) TRAP (0xA234); /* String Manager */ char* StrCopy (char*, const char*) TRAP (0xA0C5); char* StrCat (char*, const char*) TRAP (0xA0C6); Int16 StrLen (const char*) TRAP (0xA0C7); /* System Utilities */ #define sysRandomMax 0x7FFF #endif