1{
2    This file is part of the Free Pascal run time library.
3    Copyright (c) 2006 by Karoly Balogh
4
5    dos.library functions for AmigaOS 4.x/PowerPC
6
7    See the file COPYING.FPC, included in this distribution,
8    for details about the copyright.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 **********************************************************************}
15
16function Open(name: PChar; accessMode: longint): longint; syscall IDOS 76;
17function dosClose(_file: longint): LongBool; syscall IDOS 80;
18function dosRead(_file: longint; buffer: Pointer; length: longint): longint; syscall IDOS 84;
19function dosWrite(_file: longint; buffer: Pointer; length: longint): longint; syscall IDOS 88;
20function dosInput: longint; syscall IDOS 92;
21function dosOutput: longint; syscall IDOS 96;
22function dosSeek(_file: longint;position: longint;offset: longint): longint; syscall IDOS 100;
23function dosDeleteFile(name: PChar): LongBool; syscall IDOS 104;
24function dosRename(oldName: PChar;newName: PChar): longint; syscall IDOS 108;
25function Lock(name: PChar;_type: longint): longint; syscall IDOS 112;
26procedure UnLock(lock: longint); syscall IDOS 116;
27
28function Examine(lock: longint; fileInfoBlock: PFileInfoBlock): LongInt; syscall IDOS 124;
29
30function Info(lock: longint; parameterBlock: PInfoData): LongInt; syscall IDOS 132;
31function dosCreateDir(name: PChar): longint; syscall IDOS 136;
32function CurrentDir(lock: longint): longint; syscall IDOS 140;
33function IoErr: longint; syscall IDOS 144;
34
35function SetProtection(name: PChar; protect: longword): LongInt; syscall IDOS 180;
36function DateStamp(date: PDateStamp): PDateStamp; syscall IDOS 184;
37procedure DOSDelay(timeout: LongInt); syscall IDOS 188;
38
39function AllocDosObject(type1: Cardinal; tags : PTagItem): Pointer; syscall IDOS 208;
40procedure FreeDosObject(type1: Cardinal; ptr  : Pointer); syscall IDOS 220;
41
42function ExamineFH(fh : BPTR; fib: PFileInfoBlock): LongBool; syscall IDOS 352;
43function SetFileDate(name: PChar; date: PDateStamp): LongBool; syscall IDOS 356; { Seems this got renamed to SetDate() in OS4? }
44function NameFromLock(lock: longint; buffer: PChar; len: longint): LongBool; syscall IDOS 360;
45function NameFromFH(fh: longint; buffer: PChar; len: longint): LongBool; syscall IDOS 364;
46
47function SetFileSize(fh: longint; pos: longint; mode: longint): longint; syscall IDOS 396;
48
49function CreateNewProc(tags: PTagItem): PProcess; syscall IDOS 424;
50
51function GetArgStr: PChar; syscall IDOS 456;
52function SetArgStr(_string: PChar): PChar; syscall IDOS 460;
53
54function GetCurrentDirName(buf: PChar; len: longint): LongBool; syscall IDOS 476;
55
56function GetProgramName(buf: PChar; len: longint): LongBool; syscall IDOS 484;
57
58function GetProgramDir: longint; syscall IDOS 500;
59function SystemTagList(command: PChar; tags: PTagItem): longint; syscall IDOS 504;
60
61function LockDosList(flags: longword): PDosList; syscall IDOS 544;
62procedure UnLockDosList(flags: longword); syscall IDOS 548;
63
64function NextDosEntry(dlist: PDosList; flags: longword): PDosList; syscall IDOS 568;
65
66function MatchFirst(pat: PChar; anchor: PAnchorPath): longint; syscall IDOS 664;
67function MatchNext(anchor: PAnchorPath): longint; syscall IDOS 668;
68procedure MatchEnd(anchor: PAnchorPath); syscall IDOS 672;
69
70function GetVar(name: PChar; buffer: PChar; size: longint; flags: longword): longint; syscall IDOS 720;
71