From 8237dbf22f0c40bea7059637ae3cdbc9778996a6 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 6 May 2015 16:04:21 +0000 Subject: [PATCH] Amiga, AROS, MorphOS: unified AmigaDOS function names git-svn-id: trunk@30812 - --- packages/amunits/src/coreunits/amigados.pas | 8 ++++---- packages/arosunits/src/amigados.pas | 4 ++-- packages/fcl-process/src/amicommon/pipes.inc | 4 ---- packages/fcl-process/src/amicommon/process.inc | 4 ---- packages/morphunits/src/amigados.pas | 2 +- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/packages/amunits/src/coreunits/amigados.pas b/packages/amunits/src/coreunits/amigados.pas index e0e5356ce9..16e23a4a00 100644 --- a/packages/amunits/src/coreunits/amigados.pas +++ b/packages/amunits/src/coreunits/amigados.pas @@ -1598,7 +1598,7 @@ FUNCTION CreateProc(const name : pCHAR location 'd1'; pri : LONGINT location 'd2 FUNCTION CurrentDir(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 126; PROCEDURE DateStamp(date : pDateStamp location 'd1'); syscall _DOSBase 192; FUNCTION DateToStr(datetime : pDateTime location 'd1') : LongBool; syscall _DOSBase 744; -FUNCTION DeleteFile(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 072; +FUNCTION DOSDeleteFile(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 072; FUNCTION DeleteVar(const name : pCHAR location 'd1'; flags : ULONG location 'd2') : LongBool; syscall _DOSBase 912; FUNCTION DeviceProc(const name : pCHAR location 'd1') : pMsgPort; syscall _DOSBase 174; FUNCTION DoPkt(port : pMsgPort location 'd1'; action : LONGINT location 'd2'; arg1 : LONGINT location 'd3'; arg2 : LONGINT location 'd4'; arg3 : LONGINT location 'd5'; arg4 : LONGINT location 'd6'; arg5 : LONGINT location 'd7') : LONGINT; syscall _DOSBase 240; @@ -1756,7 +1756,7 @@ FUNCTION AssignPath(const name : pCHAR;const path : string) : BOOLEAN; FUNCTION AssignPath(const name : string;const path : string) : BOOLEAN; FUNCTION CreateDir(const name : string) : LONGINT; FUNCTION CreateProc(const name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -FUNCTION DeleteFile(const name : string) : BOOLEAN; +FUNCTION DOSDeleteFile(const name : string) : BOOLEAN; FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; FUNCTION DeviceProc(const name : string) : pMsgPort; FUNCTION DOSOpen(const name : string; accessMode : LONGINT) : LONGINT; @@ -1904,9 +1904,9 @@ begin CreateProc := CreateProc(pas2c(name),pri,segList,stackSize); end; -FUNCTION DeleteFile(const name : string) : BOOLEAN; +FUNCTION DOSDeleteFile(const name : string) : BOOLEAN; begin - DeleteFile := DeleteFile(pas2c(name)); + DOSDeleteFile := DOSDeleteFile(pas2c(name)); end; FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; diff --git a/packages/arosunits/src/amigados.pas b/packages/arosunits/src/amigados.pas index 4d9303e709..6e4dd8969f 100644 --- a/packages/arosunits/src/amigados.pas +++ b/packages/arosunits/src/amigados.pas @@ -2265,14 +2265,14 @@ function Cli: PCommandLineInterface; syscall AOS_DOSBase 82; function CliInitNewcli(Dp: PDosPacket): IPTR; syscall AOS_DOSBase 155; function CliInitRun(Dp: PDosPacket): IPTR; syscall AOS_DOSBase 156; function CompareDates(const Date1: PDateStamp; const Date2: PDateStamp): LongInt; syscall AOS_DOSBase 123; -function CreateDir(const Name: STRPTR): BPTR; syscall AOS_DOSBase 20; +function DOSCreateDir(const Name: STRPTR): BPTR; syscall AOS_DOSBase 20; function CreateNewProc(const Tags: PTagItem): PProcess; syscall AOS_DOSBase 83; //function CreateNewProcTagList(const Tags : PTagItem) : pProcess; function CreateProc(const Name: STRPTR; Pri: LongInt; SegList: BPTR; StackSize: LongInt): PMsgPort; syscall AOS_DOSBase 23; function CurrentDir(Lock: BPTR): BPTR; syscall AOS_DOSBase 21; function DateStamp(Date: PDateStamp): PDateStamp; syscall AOS_DOSBase 32; function DateToStr(Datetime: PDateTime): LongBool; syscall AOS_DOSBase 124; -function DeleteFile(const Name: STRPTR): LongBool; syscall AOS_DOSBase 12; +function DOSDeleteFile(const Name: STRPTR): LongBool; syscall AOS_DOSBase 12; function DeleteVar(const Name: STRPTR; Flags: LongWord): LongInt; syscall AOS_DOSBase 152; function DeviceProc(const Name: STRPTR): PMsgPort; syscall AOS_DOSBase 29; function DisplayError(FormstStr: STRPTR; Flags: LongWord; Args: APTR): LongInt; syscall AOS_DOSBase 81; diff --git a/packages/fcl-process/src/amicommon/pipes.inc b/packages/fcl-process/src/amicommon/pipes.inc index 732a5eba3d..5f6838c51f 100644 --- a/packages/fcl-process/src/amicommon/pipes.inc +++ b/packages/fcl-process/src/amicommon/pipes.inc @@ -52,10 +52,6 @@ begin DeleteIt := NameFromFH(BPTR(FHandle), @(Filename[0]), 255); FileClose(FHandle); if DeleteIt then - {$ifdef MorphOS} AmigaDos.dosDeleteFile(@(Filename[0])); - {$else} - AmigaDos.DeleteFile(@(Filename[0])); - {$endif} end; end; diff --git a/packages/fcl-process/src/amicommon/process.inc b/packages/fcl-process/src/amicommon/process.inc index 0d86e12c30..a6e8fcf27f 100644 --- a/packages/fcl-process/src/amicommon/process.inc +++ b/packages/fcl-process/src/amicommon/process.inc @@ -120,11 +120,7 @@ begin TempName := 'T:'+HexStr(FindTask(nil)) + '_' + HexStr(Self) + '_'+ IntToStr(UID) + '_Starter.tmp'; until not FileExists(TempName); //sysdebugln('TProcess start: "' + ExecName + ' ' + Params+'" >' + TempName); - {$ifdef MorphOS} - cos := AmigaDos.Open(PChar(TempName), MODE_READWRITE); - {$else} cos := AmigaDos.DosOpen(PChar(TempName), MODE_READWRITE); - {$endif} FExitCode := LongInt(amigados.Execute(PChar(ExecName + ' ' + Params), BPTR(0), cos)); DosSeek(cos, 0, OFFSET_BEGINNING); CreateStreams(0, THandle(cos),0); diff --git a/packages/morphunits/src/amigados.pas b/packages/morphunits/src/amigados.pas index 96fb8ddedd..8891055056 100644 --- a/packages/morphunits/src/amigados.pas +++ b/packages/morphunits/src/amigados.pas @@ -1392,7 +1392,7 @@ type { dos.library functions } -function Open(fname : PChar location 'd1'; +function dosOpen(fname : PChar location 'd1'; accessMode: LongInt location 'd2'): LongInt; SysCall MOS_DOSBase 30;