DOS Types Reference¶
Per-function autodoc pages link to these types via the type name (e.g., [List](types-dos.md#list)).
Clickable inner types: inside each struct definition, field types that are themselves structs/unions/enums are clickable hyperlinks to their own definitions.
Contents¶
datetime.h¶
struct DateTime¶
Source: dos/datetime.h
struct DateTime
{
struct DateStamp dat_Stamp; /* DOS DateStamp */
UBYTE dat_Format; /* controls appearance of dat_StrDate */
UBYTE dat_Flags; /* see flags below */
STRPTR dat_StrDay; /* day of the week string (see LEN_DATSTRING below) */
STRPTR dat_StrDate; /* date string (see LEN_DATSTRING below) */
STRPTR dat_StrTime; /* time string (see LEN_DATSTRING below) */
};
dos.h¶
struct DateStamp¶
Source: dos/dos.h
struct DateStamp {
LONG ds_Days; /* Number of days since Jan. 1, 1978 */
LONG ds_Minute; /* Number of minutes past midnight */
LONG ds_Tick; /* Number of ticks past minute */
}; /* DateStamp */
struct FileInfoBlock¶
Source: dos/dos.h
struct FileInfoBlock {
LONG fib_DiskKey;
LONG fib_DirEntryType; /* Type of Directory. If < 0, then a plain file.
* If > 0 a directory */
TEXT fib_FileName[108]; /* Null terminated. Max 30 chars used for now */
LONG fib_Protection; /* bit mask of protection, rwxd are 3-0. */
LONG fib_EntryType;
LONG fib_Size; /* Number of bytes in file */
LONG fib_NumBlocks; /* Number of blocks in file */
struct DateStamp fib_Date;/* Date file last changed */
TEXT fib_Comment[80]; /* Null terminated comment associated with file */
/* Note: the following fields are not supported by all filesystems. */
/* They should be initialized to 0 sending an ACTION_EXAMINE packet. */
/* When Examine() is called, these are set to 0 for you. */
/* AllocDosObject() also initializes them to 0. */
UWORD fib_OwnerUID; /* owner's UID */
UWORD fib_OwnerGID; /* owner's GID */
UBYTE fib_Reserved[32];
}; /* FileInfoBlock */
struct InfoData¶
Source: dos/dos.h
struct InfoData {
LONG id_NumSoftErrors; /* number of soft errors on disk */
LONG id_UnitNumber; /* Which unit disk is (was) mounted on */
LONG id_DiskState; /* See defines below */
LONG id_NumBlocks; /* Number of blocks on disk */
LONG id_NumBlocksUsed; /* Number of block in use */
LONG id_BytesPerBlock;
LONG id_DiskType; /* Disk Type code */
BPTR id_VolumeNode; /* BCPL pointer to volume node (see DosList) */
LONG id_InUse; /* Flag, zero if not in use */
}; /* InfoData */
dosextens.h¶
struct AssignListstruct CliProcListstruct CommandLineInterfacestruct DevInfostruct DevProcstruct DeviceListstruct DosInfostruct DosLibrarystruct DosListstruct DosPacketstruct ErrorStringstruct FileHandlestruct FileLockstruct Processstruct RootNodestruct Segmentstruct StandardPacket
struct AssignList¶
Source: dos/dosextens.h
struct AssignList {
struct AssignList *al_Next;
BPTR al_Lock;
};
struct CliProcList¶
Source: dos/dosextens.h
struct CliProcList {
struct MinNode cpl_Node;
LONG cpl_First; /* number of first entry in array */
struct MsgPort **cpl_Array;
/* [0] is max number of CLI's in this entry (n)
* [1] is CPTR to process id of CLI cpl_First
* [n] is CPTR to process id of CLI cpl_First+n-1
*/
};
struct CommandLineInterface¶
Source: dos/dosextens.h
struct CommandLineInterface {
LONG cli_Result2; /* Value of IoErr from last command */
BSTR cli_SetName; /* Name of current directory */
BPTR cli_CommandDir; /* Head of the path locklist */
LONG cli_ReturnCode; /* Return code from last command */
BSTR cli_CommandName; /* Name of current command */
LONG cli_FailLevel; /* Fail level (set by FAILAT) */
BSTR cli_Prompt; /* Current prompt (set by PROMPT) */
BPTR cli_StandardInput; /* Default (terminal) CLI input */
BPTR cli_CurrentInput; /* Current CLI input */
BSTR cli_CommandFile; /* Name of EXECUTE command file */
LONG cli_Interactive; /* Boolean; True if prompts required */
LONG cli_Background; /* Boolean; True if CLI created by RUN */
BPTR cli_CurrentOutput; /* Current CLI output */
LONG cli_DefaultStack; /* Stack size to be obtained in long words */
BPTR cli_StandardOutput; /* Default (terminal) CLI output */
BPTR cli_Module; /* SegList of currently loaded command */
}; /* CommandLineInterface */
struct DevInfo¶
Source: dos/dosextens.h
struct DevInfo {
BPTR dvi_Next;
LONG dvi_Type;
APTR dvi_Task;
BPTR dvi_Lock;
BSTR dvi_Handler;
LONG dvi_StackSize;
LONG dvi_Priority;
LONG dvi_Startup;
BPTR dvi_SegList;
BPTR dvi_GlobVec;
BSTR dvi_Name;
};
struct DevProc¶
Source: dos/dosextens.h
struct DevProc {
struct MsgPort *dvp_Port;
BPTR dvp_Lock;
ULONG dvp_Flags;
struct DosList *dvp_DevNode; /* DON'T TOUCH OR USE! */
};
struct DeviceList¶
Source: dos/dosextens.h
struct DeviceList {
BPTR dl_Next; /* bptr to next device list */
LONG dl_Type; /* see DLT below */
struct MsgPort * dl_Task; /* ptr to handler task */
BPTR dl_Lock; /* not for volumes */
struct DateStamp dl_VolumeDate; /* creation date */
BPTR dl_LockList; /* outstanding locks */
LONG dl_DiskType; /* 'DOS', etc */
LONG dl_unused;
BSTR dl_Name; /* bptr to bcpl name */
};
struct DosInfo¶
Source: dos/dosextens.h
struct DosInfo {
BPTR di_McName; /* PRIVATE: system resident module list */
#define di_ResList di_McName
BPTR di_DevInfo; /* Device List */
BPTR di_Devices; /* Currently zero */
BPTR di_Handlers; /* Currently zero */
APTR di_NetHand; /* Network handler processid; currently zero */
struct SignalSemaphore di_DevLock; /* do NOT access directly! */
struct SignalSemaphore di_EntryLock; /* do NOT access directly! */
struct SignalSemaphore di_DeleteLock; /* do NOT access directly! */
}; /* DosInfo */
struct DosLibrary¶
Source: dos/dosextens.h
struct DosLibrary {
struct Library dl_lib;
struct RootNode *dl_Root; /* Pointer to RootNode, described below */
APTR dl_GV; /* Pointer to BCPL global vector */
LONG dl_A2; /* BCPL standard register values */
LONG dl_A5;
LONG dl_A6;
struct ErrorString *dl_Errors; /* PRIVATE pointer to array of error msgs */
struct timerequest *dl_TimeReq; /* PRIVATE pointer to timer request */
struct Library *dl_UtilityBase; /* PRIVATE ptr to utility library */
struct Library *dl_IntuitionBase; /* PRIVATE ptr to intuition library */
}; /* DosLibrary */
struct DosList¶
Source: dos/dosextens.h
struct DosList {
BPTR dol_Next; /* bptr to next device on list */
LONG dol_Type; /* see DLT below */
struct MsgPort *dol_Task; /* ptr to handler task */
BPTR dol_Lock;
union {
struct {
BSTR dol_Handler; /* file name to load if seglist is null */
LONG dol_StackSize; /* stacksize to use when starting process */
LONG dol_Priority; /* task priority when starting process */
ULONG dol_Startup; /* startup msg: FileSysStartupMsg for disks */
BPTR dol_SegList; /* already loaded code for new task */
BPTR dol_GlobVec; /* BCPL global vector to use when starting
* a process. -1 indicates a C/Assembler
* program. */
} dol_handler;
struct {
struct DateStamp dol_VolumeDate; /* creation date */
BPTR dol_LockList; /* outstanding locks */
LONG dol_DiskType; /* 'DOS', etc */
} dol_volume;
struct {
STRPTR dol_AssignName; /* name for non-or-late-binding assign */
struct AssignList *dol_List; /* for multi-directory assigns (regular) */
} dol_assign;
} dol_misc;
BSTR dol_Name; /* bptr to bcpl name */
};
struct DosPacket¶
Source: dos/dosextens.h
struct DosPacket {
struct Message *dp_Link; /* EXEC message */
struct MsgPort *dp_Port; /* Reply port for the packet */
/* Must be filled in each send. */
LONG dp_Type; /* See ACTION_... below and
* 'R' means Read, 'W' means Write to the
* file system */
LONG dp_Res1; /* For file system calls this is the result
* that would have been returned by the
* function, e.g. Write ('W') returns actual
* length written */
LONG dp_Res2; /* For file system calls this is what would
* have been returned by IoErr() */
/* Device packets common equivalents */
#define dp_Action dp_Type
#define dp_Status dp_Res1
#define dp_Status2 dp_Res2
#define dp_BufAddr dp_Arg1
LONG dp_Arg1;
LONG dp_Arg2;
LONG dp_Arg3;
LONG dp_Arg4;
LONG dp_Arg5;
LONG dp_Arg6;
LONG dp_Arg7;
}; /* DosPacket */
struct ErrorString¶
Source: dos/dosextens.h
struct ErrorString {
LONG * estr_Nums;
STRPTR estr_Strings;
};
struct FileHandle¶
Source: dos/dosextens.h
struct FileHandle {
struct Message *fh_Link; /* private use, not really a message */
struct MsgPort *fh_Port; /* Misnamed by tradition, is
* Boolean; true if interactive handle */
struct MsgPort *fh_Type; /* Port to do PutMsg() to
* or NULL for NIL: */
BPTR fh_Buf; /* BPTR to I/O buffer if present */
LONG fh_Pos;
LONG fh_End;
LONG fh_Funcs;
#define fh_Func1 fh_Funcs
LONG fh_Func2;
LONG fh_Func3;
LONG fh_Args;
#define fh_Arg1 fh_Args
LONG fh_Arg2;
}; /* FileHandle */
struct FileLock¶
Source: dos/dosextens.h
struct FileLock {
BPTR fl_Link; /* bcpl pointer to next lock */
LONG fl_Key; /* disk block number */
LONG fl_Access; /* exclusive or shared */
struct MsgPort * fl_Task; /* handler task's port */
BPTR fl_Volume; /* bptr to DLT_VOLUME DosList entry */
};
struct Process¶
Source: dos/dosextens.h
struct Process {
struct Task pr_Task;
struct MsgPort pr_MsgPort; /* This is BPTR address from DOS functions */
WORD pr_Pad; /* Remaining variables on 4 byte boundaries */
BPTR pr_SegList; /* Array of seg lists used by this process */
LONG pr_StackSize; /* Size of process stack in bytes */
APTR pr_GlobVec; /* Global vector for this process (BCPL) */
LONG pr_TaskNum; /* CLI task number of zero if not a CLI */
BPTR pr_StackBase; /* Ptr to high memory end of process stack */
LONG pr_Result2; /* Value of secondary result from last call */
BPTR pr_CurrentDir; /* Lock associated with current directory */
BPTR pr_CIS; /* Current CLI Input Stream */
BPTR pr_COS; /* Current CLI Output Stream */
APTR pr_ConsoleTask; /* Console handler process for current window*/
APTR pr_FileSystemTask; /* File handler process for current drive */
BPTR pr_CLI; /* pointer to CommandLineInterface */
APTR pr_ReturnAddr; /* pointer to previous stack frame */
APTR pr_PktWait; /* Function to be called when awaiting msg */
APTR pr_WindowPtr; /* Window for error printing */
/* following definitions are new with 2.0 */
BPTR pr_HomeDir; /* Home directory of executing program */
LONG pr_Flags; /* flags telling dos about process */
void (*pr_ExitCode)(); /* code to call on exit of program or NULL */
LONG pr_ExitData; /* Passed as an argument to pr_ExitCode. */
STRPTR pr_Arguments; /* Arguments passed to the process at start */
struct MinList pr_LocalVars; /* Local environment variables */
ULONG pr_ShellPrivate; /* for the use of the current shell */
BPTR pr_CES; /* Error stream - if NULL, use pr_COS */
}; /* Process */
struct RootNode¶
Source: dos/dosextens.h
struct RootNode {
BPTR rn_TaskArray; /* [0] is max number of CLI's
* [1] is APTR to process id of CLI 1
* [n] is APTR to process id of CLI n */
BPTR rn_ConsoleSegment; /* SegList for the CLI */
struct DateStamp rn_Time; /* Current time */
LONG rn_RestartSeg; /* SegList for the disk validator process */
BPTR rn_Info; /* Pointer to the Info structure */
BPTR rn_FileHandlerSegment; /* segment for a file handler */
struct MinList rn_CliList; /* new list of all CLI processes */
/* the first cpl_Array is also rn_TaskArray */
struct MsgPort *rn_BootProc; /* private ptr to msgport of boot fs */
BPTR rn_ShellSegment; /* seglist for Shell (for NewShell) */
LONG rn_Flags; /* dos flags */
}; /* RootNode */
struct Segment¶
Source: dos/dosextens.h
struct Segment {
BPTR seg_Next;
LONG seg_UC;
BPTR seg_Seg;
UBYTE seg_Name[4]; /* actually the first 4 chars of BSTR name */
};
struct StandardPacket¶
Source: dos/dosextens.h
struct StandardPacket {
struct Message sp_Msg;
struct DosPacket sp_Pkt;
}; /* StandardPacket */
exall.h¶
struct ExAllControl¶
Source: dos/exall.h
struct ExAllControl {
ULONG eac_Entries; /* number of entries returned in buffer */
ULONG eac_LastKey; /* Don't touch inbetween linked ExAll calls! */
STRPTR eac_MatchString; /* wildcard string for pattern match or NULL */
struct Hook *eac_MatchFunc; /* optional private wildcard function */
};
struct ExAllData¶
Source: dos/exall.h
struct ExAllData {
struct ExAllData *ed_Next;
STRPTR ed_Name;
LONG ed_Type;
ULONG ed_Size;
ULONG ed_Prot;
ULONG ed_Days;
ULONG ed_Mins;
ULONG ed_Ticks;
STRPTR ed_Comment; /* strings will be after last used field */
UWORD ed_OwnerUID; /* new for V39 */
UWORD ed_OwnerGID;
};
filehandler.h¶
struct DeviceNode¶
Source: dos/filehandler.h
struct DeviceNode {
BPTR dn_Next; /* singly linked list */
ULONG dn_Type; /* always 0 for dos "devices" */
struct MsgPort *dn_Task; /* standard dos "task" field. If this is
* null when the node is accesses, a task
* will be started up */
BPTR dn_Lock; /* not used for devices -- leave null */
BSTR dn_Handler; /* filename to loadseg (if seglist is null) */
ULONG dn_StackSize; /* stacksize to use when starting task */
LONG dn_Priority; /* task priority when starting task */
BPTR dn_Startup; /* startup msg: FileSysStartupMsg for disks */
BPTR dn_SegList; /* code to run to start new task (if necessary).
* if null then dn_Handler will be loaded. */
BPTR dn_GlobalVec; /* BCPL global vector to use when starting
* a task. -1 means that dn_SegList is not
* for a bcpl program, so the dos won't
* try and construct one. 0 tell the
* dos that you obey BCPL linkage rules,
* and that it should construct a global
* vector for you.
*/
BSTR dn_Name; /* the node name, e.g. '\3','D','F','3' */
};
struct DosEnvec¶
Source: dos/filehandler.h
struct DosEnvec {
ULONG de_TableSize; /* Size of Environment vector */
ULONG de_SizeBlock; /* in longwords: physical disk block size */
ULONG de_SecOrg; /* not used; must be 0 */
ULONG de_Surfaces; /* # of heads (surfaces). drive specific */
ULONG de_SectorPerBlock; /* physical sectors per logical block */
ULONG de_BlocksPerTrack; /* blocks per track. drive specific */
ULONG de_Reserved; /* DOS reserved blocks at start of partition. */
ULONG de_PreAlloc; /* DOS reserved blocks at end of partition */
ULONG de_Interleave; /* usually 0 */
ULONG de_LowCyl; /* starting cylinder. typically 0 */
ULONG de_HighCyl; /* max cylinder. drive specific */
ULONG de_NumBuffers; /* Initial # DOS of buffers. */
ULONG de_BufMemType; /* type of mem to allocate for buffers */
ULONG de_MaxTransfer; /* Max number of bytes to transfer at a time */
ULONG de_Mask; /* Address Mask to block out certain memory */
LONG de_BootPri; /* Boot priority for autoboot */
ULONG de_DosType; /* ASCII (HEX) string showing filesystem type;
* 0X444F5300 is old filesystem,
* 0X444F5301 is fast file system */
ULONG de_Baud; /* Baud rate for serial handler */
ULONG de_Control; /* Control word for handler/filesystem */
ULONG de_BootBlocks; /* Number of blocks containing boot code */
};
struct FileSysStartupMsg¶
Source: dos/filehandler.h
struct FileSysStartupMsg {
ULONG fssm_Unit; /* exec unit number for this device */
BSTR fssm_Device; /* null terminated bstring to the device name */
BPTR fssm_Environ; /* ptr to environment table (see above) */
ULONG fssm_Flags; /* flags for OpenDevice() */
};
notify.h¶
struct NotifyMessage¶
Source: dos/notify.h
struct NotifyMessage {
struct Message nm_ExecMessage;
ULONG nm_Class;
UWORD nm_Code;
struct NotifyRequest *nm_NReq; /* don't modify the request! */
ULONG nm_DoNotTouch; /* like it says! For use by handlers */
ULONG nm_DoNotTouch2; /* ditto */
};
struct NotifyRequest¶
Source: dos/notify.h
struct NotifyRequest {
STRPTR nr_Name;
STRPTR nr_FullName; /* set by dos - don't touch */
ULONG nr_UserData; /* for applications use */
ULONG nr_Flags;
union {
struct {
struct MsgPort *nr_Port; /* for SEND_MESSAGE */
} nr_Msg;
struct {
struct Task *nr_Task; /* for SEND_SIGNAL */
UBYTE nr_SignalNum; /* for SEND_SIGNAL */
UBYTE nr_pad[3];
} nr_Signal;
} nr_stuff;
ULONG nr_Reserved[4]; /* leave 0 for now */
/* internal use by handlers */
ULONG nr_MsgCount; /* # of outstanding msgs */
struct MsgPort *nr_Handler; /* handler sent to (for EndNotify) */
};
rdargs.h¶
struct CSource¶
Source: dos/rdargs.h
struct CSource {
STRPTR CS_Buffer;
LONG CS_Length;
LONG CS_CurChr;
};
struct RDArgs¶
Source: dos/rdargs.h
struct RDArgs {
struct CSource RDA_Source; /* Select input source */
LONG RDA_DAList; /* PRIVATE. */
STRPTR RDA_Buffer; /* Optional string parsing space. */
LONG RDA_BufSiz; /* Size of RDA_Buffer (0..n) */
STRPTR RDA_ExtHelp; /* Optional extended help */
LONG RDA_Flags; /* Flags for any required control */
};
record.h¶
struct RecordLock¶
Source: dos/record.h
struct RecordLock {
BPTR rec_FH; /* filehandle */
ULONG rec_Offset; /* offset in file */
ULONG rec_Length; /* length of file to be locked */
ULONG rec_Mode; /* Type of lock */
};
shell.h¶
struct ExtendedCommandLineInterface¶
Source: dos/shell.h
struct ExtendedCommandLineInterface {
LONG cle_Result2; /* Value of IoErr from last command */
BSTR cle_SetName; /* Name of current directory */
BPTR cle_CommandDir; /* Head of the path locklist */
LONG cle_ReturnCode; /* Return code from last command */
BSTR cle_CommandName; /* Name of current command */
LONG cle_FailLevel; /* Fail level (set by FAILAT) */
BSTR cle_Prompt; /* Current prompt (set by PROMPT) */
BPTR cle_StandardInput; /* Default (terminal) CLI input */
BPTR cle_CurrentInput; /* Current CLI input */
BSTR cle_CommandFile; /* Name of EXECUTE command file */
LONG cle_Interactive; /* Boolean; True if prompts required */
LONG cle_Background; /* Boolean; True if CLI created by RUN */
BPTR cle_CurrentOutput; /* Current CLI output */
LONG cle_DefaultStack; /* Stack size to be obtained in long words */
BPTR cle_StandardOutput; /* Default (terminal) CLI output */
BPTR cle_Module; /* SegList of currently loaded command */
struct Hook cle_Hook; /* For requesting shell functions */
struct ExtendedCommandLineInterface *cle_This; /* pointer to itself */
LONG cle_Version; /* Version of the interface. V47 currently */
}; /* CommandLineInterface */
struct HistoryNode¶
Source: dos/shell.h
struct HistoryNode {
struct MinNode hn_Node;
STRPTR hn_Line;
};
var.h¶
struct LocalVar¶
Source: dos/var.h
struct LocalVar {
struct Node lv_Node;
UWORD lv_Flags;
STRPTR lv_Value;
ULONG lv_Len;
};