mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 09:50:22 +02:00
amicommon: m68k-amiga legacy support
git-svn-id: trunk@44566 -
This commit is contained in:
parent
8816a0b601
commit
086c897981
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user