amicommon: m68k-amiga legacy support

git-svn-id: trunk@44566 -
This commit is contained in:
Károly Balogh 2020-04-04 13:24:29 +00:00
parent 8816a0b601
commit 086c897981
5 changed files with 37 additions and 0 deletions

View File

@ -38,6 +38,14 @@ uses
{$include timerd.inc}
{$include doslibd.inc}
{$include doslibf.inc}
{$ifdef cpum68k}
{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
{$include legacyexech.inc}
{$include legacydosh.inc}
{$endif}
{$endif}
{$ENDIF}
const

View File

@ -76,6 +76,14 @@ implementation
{$include doslibf.inc}
{$include utilf.inc}
{$ifdef cpum68k}
{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
{$include legacyexech.inc}
{$include legacydosh.inc}
{$include legacyutilh.inc}
{$endif}
{$endif}
{$packrecords default}
const

View File

@ -287,7 +287,9 @@ begin
end;
end;
{$IFNDEF AMIGA_LEGACY}
{$DEFINE ASYS_FILESIZE_USE_EXAMINEFH}
{$ENDIF}
{ I changed the double-Seek filesize method which we
were using for 10+ years to the new ExamineFH() method.
It should be available AmigaOS 2.0+, and much faster.
@ -335,12 +337,16 @@ end;
procedure do_truncate(handle: THandle; pos: longint);
begin
checkCTRLC;
{$IFNDEF AMIGA_LEGACY}
if CheckInList(ASYS_fileList,handle)<>nil then begin
{ Seeking from OFFSET_BEGINNING }
if SetFileSize(handle,pos,OFFSET_BEGINNING)<0 then
dosError2InOut(IoErr);
end;
{$ELSE}
dosError2InOut(ERROR_NOT_IMPLEMENTED);
{$ENDIF}
end;
procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);

View File

@ -31,6 +31,13 @@
{$include execf.inc}
{$include doslibf.inc}
{$ifdef cpum68k}
{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
{$include legacyexec.inc}
{$include legacydos.inc}
{$include legacyutil.inc}
{$endif}
{$endif}
{*****************************************************************************
CPU specific

View File

@ -77,6 +77,14 @@ uses
{$include doslibf.inc}
{$include utilf.inc}
{$ifdef cpum68k}
{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
{$include legacyexech.inc}
{$include legacydosh.inc}
{$include legacyutilh.inc}
{$endif}
{$endif}
{ * Followings are implemented in the system unit! * }
function PathConv(path: shortstring): shortstring; external name 'PATHCONV';
function PathConv(path: RawByteString): RawByteString; external name 'PATHCONVRBS';