4 libbasetype struct DosLibrary
5 sysbase_field dl_SysBase
6 seglist_field dl_SegList
7 libbasetypeextern struct DosLibrary
13 #include <dos/dosextens.h>
14 #include <dos/record.h>
15 #include <dos/rdargs.h>
16 #include <dos/dosasl.h>
18 #include <dos/notify.h>
19 #include <dos/datetime.h>
20 #include <dos/dostags.h>
21 #include <dos/exall.h>
22 #include <aros/preprocessor/variadic/cast2iptr.hpp>
24 #define AllocDosObjectTagList(...) AllocDosObject(__VA_ARGS__)
25 #define CreateNewProcTagList(...) CreateNewProc(__VA_ARGS__)
26 #define NewLoadSegTagList(...) NewLoadSeg(__VA_ARGS__)
27 #define System(...) SystemTagList(__VA_ARGS__)
29 /* Prototypes for stubs in amiga.lib */
30 APTR AllocDosObjectTags (ULONG type, Tag tag1, ...) __stackparm;
31 struct Process * CreateNewProcTags (Tag tag1, ...) __stackparm;
32 BPTR NewLoadSegTags (STRPTR file, Tag tag1, ...) __stackparm;
33 LONG SystemTags (STRPTR command, Tag tag1, ...) __stackparm;
35 #if !defined(NO_INLINE_STDARG) && defined(__GNUC__)
36 #define FWritef(fh, format, ...) \
38 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
39 VFWritef((fh), (format), __args); \
42 #define FPrintf(fh, format, ...) \
44 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
45 VFPrintf((fh), (format), __args); \
48 #define Printf(format, ...) \
50 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
51 VFPrintf(Output(), (format), __args); \
57 #include <dos/dosextens.h>
60 BPTR Open(CONST_STRPTR name, LONG accessMode) (D1,D2)
61 BOOL Close(BPTR file) (D1)
63 LONG Read(BPTR file, APTR buffer, LONG length) (D1, D2, D3)
64 LONG Write(BPTR file, CONST_APTR buffer, LONG length) (D1, D2, D3)
67 LONG Seek(BPTR file, LONG position, LONG mode) (D1,D2,D3)
68 BOOL DeleteFile(CONST_STRPTR name) (D1)
69 LONG Rename(CONST_STRPTR oldName, CONST_STRPTR newName) (D1,D2)
70 BPTR Lock(CONST_STRPTR name, LONG accessMode) (D1,D2)
72 BPTR DupLock(BPTR lock) (D1)
74 BOOL Examine(BPTR lock, struct FileInfoBlock* fib) (D1,D2)
76 BOOL ExNext(BPTR lock, struct FileInfoBlock* fileInfoBlock) (D1,D2)
77 BOOL Info(BPTR lock, struct InfoData* parameterBlock) (D1,D2)
78 BPTR CreateDir(CONST_STRPTR name) (D1)
79 BPTR CurrentDir(BPTR lock) (D1)
81 struct MsgPort* CreateProc(CONST_STRPTR name, LONG pri, BPTR segList, LONG stackSize) (D1,D2,D3,D4)
82 void Exit(LONG returnCode) (D1)
83 BPTR LoadSeg(CONST_STRPTR name) (D1)
84 BOOL UnLoadSeg(BPTR seglist) (D1)
86 struct Device *DeviceProc(CONST_STRPTR name) (D1)
87 BOOL SetComment(STRPTR name, STRPTR comment) (D1,D2)
88 BOOL SetProtection(CONST_STRPTR name, ULONG protect) (D1,D2)
89 struct DateStamp *DateStamp(struct DateStamp *date) (D1)
90 void Delay(ULONG timeout) (D1)
91 BOOL WaitForChar(BPTR file, LONG timeout) (D1,D2)
92 BPTR ParentDir(BPTR lock) (D1)
93 BOOL IsInteractive(BPTR file) (D1)
94 LONG Execute(STRPTR string, BPTR input, BPTR output) (D1,D2,D3)
95 APTR AllocDosObject(ULONG type, struct TagItem* tags) (D1,D2)
96 void FreeDosObject(ULONG type, APTR ptr) (D1,D2)
97 LONG DoPkt(struct MsgPort* port, LONG action, LONG arg1, LONG arg2, LONG arg3, LONG arg4, LONG arg5) (D1,D2,D3,D4,D5,D6,D7)
98 void SendPkt(struct DosPacket *dp, struct MsgPort *port, struct MsgPort *replyport) (D1,D2,D3)
99 struct DosPacket *WaitPkt() ()
100 void ReplyPkt(struct DosPacket *dp, LONG res1, LONG res2) (D1,D2,D3)
101 void AbortPkt(struct MsgPort *port, struct DosPacket *pkt) (D1,D2)
102 BOOL LockRecord(BPTR fh, ULONG offset, ULONG length, ULONG mode, ULONG timeout) (D1,D2,D3,D4,D5)
103 BOOL LockRecords(struct RecordLock *recArray, ULONG timeout) (D1,D2)
104 BOOL UnLockRecord(BPTR fh, ULONG offset, ULONG length) (D1,D2,D3)
105 BOOL UnLockRecords(struct RecordLock * recArray) (D1)
106 BPTR SelectInput(BPTR fh) (D1)
107 BPTR SelectOutput(BPTR fh) (D1)
108 LONG FGetC(BPTR file) (D1)
109 LONG FPutC(BPTR file, LONG character) (D1,D2)
110 LONG UnGetC(BPTR file, LONG character) (D1,D2)
111 LONG FRead(BPTR fh, APTR block, ULONG blocklen, ULONG number) (D1,D2,D3,D4)
112 LONG FWrite(BPTR fh, const APTR block, ULONG blocklen, ULONG numblocks) (D1,D2,D3,D4)
113 STRPTR FGets(BPTR fh, STRPTR buf, ULONG buflen) (D1,D2,D3)
114 LONG FPuts(BPTR file, CONST_STRPTR string) (D1,D2)
115 LONG VFWritef(BPTR fh, STRPTR fmt, IPTR *argarray) (D1,D2,D3)
116 LONG VFPrintf(BPTR file, CONST_STRPTR format, IPTR *argarray) (D1,D2,D3)
117 LONG Flush(BPTR file) (D1)
118 LONG SetVBuf(BPTR file, STRPTR buff, LONG type, LONG size) (D1,D2,D3,D4)
120 BPTR OpenFromLock(BPTR lock) (D1)
121 BPTR ParentOfFH(BPTR fh) (D1)
123 BOOL SetFileDate(CONST_STRPTR name, struct DateStamp *date) (D1,D2)
124 BOOL NameFromLock(BPTR lock, STRPTR buffer, LONG length) (D1,D2,D3)
127 LONG SplitName(STRPTR name, ULONG seperator, STRPTR buf, LONG oldpos, LONG size) (D1,D2,D3,D4,D5)
128 LONG SameLock(BPTR lock1, BPTR lock2) (D1,D2)
129 LONG SetMode(BPTR fh, LONG mode) (D1,D2)
130 BOOL ExAll(BPTR lock, struct ExAllData *buffer, LONG size, LONG data, struct ExAllControl *control) (D1,D2,D3,D4,D5)
131 LONG ReadLink(struct MsgPort *port, BPTR lock, STRPTR path, STRPTR buffer, ULONG size) (D1,D2,D3,D4,D5)
132 LONG MakeLink(STRPTR name, APTR dest, LONG soft) (D1,D2,D3)
133 BOOL ChangeMode(ULONG type, BPTR object, ULONG newmode) (D1,D2,D3)
134 LONG SetFileSize(BPTR file, LONG offset, LONG mode) (D1,D2,D3)
135 LONG SetIoErr(LONG result) (D1)
136 BOOL Fault(LONG code, CONST_STRPTR header, STRPTR buffer, LONG len) (D1,D2,D3,D4)
137 BOOL PrintFault(LONG code, STRPTR header) (D1,D2)
138 BOOL ErrorReport(LONG code, LONG type, ULONG arg1, struct MsgPort *device) (D1,D2,D3,D4)
139 LONG DisplayError(CONST_STRPTR formatStr, ULONG flags, APTR args) (A0,D0,A1)
140 struct CommandLineInterface *Cli() ()
141 struct Process *CreateNewProc(struct TagItem *tags) (D1)
142 LONG RunCommand(BPTR segList, ULONG stacksize, STRPTR argptr, ULONG argsize) (D1,D2,D3,D4)
143 struct MsgPort *GetConsoleTask() ()
144 struct MsgPort *SetConsoleTask(struct MsgPort *handler) (D1)
145 struct MsgPort *GetFileSysTask() ()
146 struct MsgPort *SetFileSysTask(struct MsgPort *task) (D1)
147 STRPTR GetArgStr() ()
148 STRPTR SetArgStr(STRPTR string) (D1)
149 struct Process *FindCliProc(ULONG num) (D1)
151 BOOL SetCurrentDirName(CONST_STRPTR name) (D1)
152 BOOL GetCurrentDirName(STRPTR buf, LONG len) (D1,D2)
153 BOOL SetProgramName(STRPTR name) (D1)
154 BOOL GetProgramName(STRPTR buf, LONG len) (D1,D2)
155 BOOL SetPrompt(STRPTR name) (D1)
156 BOOL GetPrompt(STRPTR buf, LONG len) (D1,D2)
157 BPTR SetProgramDir(BPTR lock) (D1)
158 BPTR GetProgramDir() ()
159 LONG SystemTagList(CONST_STRPTR command, struct TagItem *tags) (D1,D2)
160 BOOL AssignLock(CONST_STRPTR name, BPTR lock) (D1,D2)
161 BOOL AssignLate(CONST_STRPTR name, CONST_STRPTR path) (D1,D2)
162 BOOL AssignPath(CONST_STRPTR name, CONST_STRPTR path) (D1,D2)
163 BOOL AssignAdd(CONST_STRPTR name, BPTR lock) (D1,D2)
164 LONG RemAssignList(STRPTR name, BPTR lock) (D1,D2)
165 struct DevProc *GetDeviceProc(STRPTR name, struct DevProc *dp) (D1,D2)
166 void FreeDeviceProc(struct DevProc *dp) (D1)
167 struct DosList *LockDosList(ULONG flags) (D1)
168 void UnLockDosList(ULONG flags) (D1)
169 struct DosList *AttemptLockDosList(ULONG flags) (D1)
170 LONG RemDosEntry(struct DosList *dlist) (D1)
171 LONG AddDosEntry(struct DosList *dlist) (D1)
172 struct DosList *FindDosEntry(struct DosList *dlist, CONST_STRPTR name, ULONG flags) (D1,D2,D3)
173 struct DosList *NextDosEntry(struct DosList *dlist, ULONG flags) (D1,D2)
174 struct DosList * MakeDosEntry(CONST_STRPTR name, LONG type) (D1,D2)
175 void FreeDosEntry(struct DosList *dlist) (D1)
176 BOOL IsFileSystem(STRPTR devicename) (D1)
177 BOOL Format(CONST_STRPTR devicename, CONST_STRPTR volumename, ULONG dostype) (D1,D2,D3)
178 LONG Relabel(CONST_STRPTR drive, CONST_STRPTR newname) (D1,D2)
179 LONG Inhibit(CONST_STRPTR name, LONG onoff) (D1,D2)
180 BOOL AddBuffers(CONST_STRPTR devicename, LONG numbuffers) (D1,D2)
181 LONG CompareDates(const struct DateStamp *date1, const struct DateStamp *date2) (D1,D2)
182 BOOL DateToStr(struct DateTime *datetime) (D1)
183 BOOL StrToDate(struct DateTime *datetime) (D1)
184 BPTR InternalLoadSeg(BPTR fh, BPTR table, LONG_FUNC functionarray, LONG *stack) (D0,A0,A1,A2)
185 BOOL InternalUnLoadSeg(BPTR seglist, VOID_FUNC freefunc) (D1,A1)
186 BPTR NewLoadSeg(STRPTR file, struct TagItem *tags) (D1,D2)
187 BOOL AddSegment(CONST_STRPTR name, BPTR seg, LONG type) (D1,D2,D3)
188 struct Segment *FindSegment(STRPTR name, struct Segment *seg, BOOL system) (D1,D2,D3)
189 LONG RemSegment(struct Segment *seg) (D1)
190 LONG CheckSignal(LONG mask) (D1)
191 struct RDArgs *ReadArgs(CONST_STRPTR template, IPTR *array, struct RDArgs *rdargs) (D1,D2,D3)
192 LONG FindArg(CONST_STRPTR template, CONST_STRPTR keyword) (D1,D2)
193 LONG ReadItem(STRPTR buffer, LONG maxchars, struct CSource *input) (D1,D2,D3)
194 LONG StrToLong(CONST_STRPTR string, LONG *value) (D1,D2)
195 LONG MatchFirst(STRPTR pat, struct AnchorPath *AP) (D1,D2)
196 LONG MatchNext(struct AnchorPath *AP) (D1)
197 void MatchEnd(struct AnchorPath *AP) (D1)
198 LONG ParsePattern(STRPTR Source, STRPTR Dest, LONG DestLength) (D1,D2,D3)
199 BOOL MatchPattern(STRPTR pat, STRPTR str) (D1,D2)
201 void FreeArgs(struct RDArgs *args) (D1)
203 BPTR SelectError(BPTR fh) (D1)
204 STRPTR FilePart(CONST_STRPTR path) (D1)
205 STRPTR PathPart(CONST_STRPTR path) (D1)
206 BOOL AddPart(STRPTR dirname, CONST_STRPTR filename, ULONG size) (D1,D2,D3)
207 BOOL StartNotify(struct NotifyRequest *notify) (D1)
208 void EndNotify(struct NotifyRequest *notify) (D1)
209 BOOL SetVar(CONST_STRPTR name, CONST_STRPTR buffer, LONG size, LONG flags) (D1,D2,D3,D4)
210 LONG GetVar(CONST_STRPTR name, STRPTR buffer, LONG size, LONG flags) (D1,D2,D3,D4)
211 LONG DeleteVar(CONST_STRPTR name, ULONG flags) (D1,D2)
212 struct LocalVar *FindVar(CONST_STRPTR name, ULONG type) (D1,D2)
213 STRPTR DosGetLocalizedString(LONG stringNum) (D1)
214 IPTR CliInitNewcli(struct DosPacket *dp) (A0)
215 IPTR CliInitRun(struct DosPacket *dp) (A0)
216 LONG WriteChars(STRPTR buf, ULONG buflen) (D1,D2)
217 LONG PutStr(CONST_STRPTR string) (D1)
218 LONG VPrintf(CONST_STRPTR format, IPTR *argarray) (D1,D2)
220 LONG ParsePatternNoCase(STRPTR Source, STRPTR Dest, LONG DestLength) (D1,D2,D3)
221 BOOL MatchPatternNoCase(STRPTR pat, STRPTR str) (D1,D2)
222 STRPTR DosGetString(LONG stringNu) (D0)
223 BOOL SameDevice(BPTR lock1, BPTR lock2) (D1,D2)
224 void ExAllEnd(BPTR lock, struct ExAllData *buffer, LONG size, LONG data, struct ExAllControl *control) (D1,D2,D3,D4,D5)
225 BOOL SetOwner(STRPTR name, ULONG owner_info) (D1,D2)