Amiga/AROS/MorphOS: some more path fixed in FV, userscreen for all 3 platforms

git-svn-id: trunk@28639 -
This commit is contained in:
marcus 2014-09-11 19:03:19 +00:00
parent 736f3bef25
commit 8c5c6588f2
2 changed files with 24 additions and 7 deletions

View File

@ -1577,11 +1577,7 @@ begin
UserScreen:=New(PNWLScreen, Init);
{$else}
{$ifdef AMIGASCREEN}
{$ifdef AROS}
UserScreen:=New(PAmigaScreen, Init);
{$else}
UserScreen:=nil; //New(PAmigaScreen, Init);
{$endif}
{$else}
UserScreen:=New(PScreen, Init);
{$endif AMIGASCREEN}

View File

@ -1292,7 +1292,11 @@ end;
function RelativePath(var S: PathStr): Boolean;
begin
S := LTrim(RTrim(S));
{$ifdef HASAMIGA}
RelativePath := Pos(DriveSeparator, S) = 0;
{$ELSE}
RelativePath := not ((S <> '') and ((S[1] = DirSeparator) or (S[2] = ':')));
{$ENDIF}
end;
{ try to reduce the length of S+dir as a file path+pattern }
@ -2169,7 +2173,12 @@ begin
CurDir := ''
else begin
CurDir := DirInput^.Data^;
if (CurDir[Length(CurDir)] <> DirSeparator) then
if (CurDir[Length(CurDir)] <> DirSeparator)
{$IFDEF HASAMIGA}
and (CurDir[Length(CurDir)] <> DriveSeparator)
{$endif}
then
CurDir := CurDir + DirSeparator;
end;
end;
@ -2395,7 +2404,11 @@ begin
ExtractDir := '';
Exit;
end;
if D[Byte(D[0])] <> DirSeparator then
if (D[Byte(D[0])] <> DirSeparator)
{$ifdef HASAMIGA}
and (D[Byte(D[0])] <> DriveSeparator)
{$endif}
then
D := D + DirSeparator;
ExtractDir := D;
end;
@ -2478,7 +2491,11 @@ begin
{$ifdef Unix}
Is:=(S=DirSeparator); { handle root }
{$else}
{$ifdef HASAMIGA}
Is := (Length(S) > 0) and (S[Length(S)] = DriveSeparator);
{$else}
Is:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator);
{$endif}
{ handle root dirs }
{$endif}
if Is=false then
@ -2718,7 +2735,11 @@ begin
if (i = 0) then
AFile := AFile + D1
else AFile := AFile + Copy(D1,Succ(i),Length(D1)-i);
if AFile[Length(AFile)] <> DirSeparator then
if (AFile[Length(AFile)] <> DirSeparator)
{$ifdef HASAMIGA}
and (AFile[Length(AFile)] <> DriveSeparator)
{$endif}
then
AFile := AFile + DirSeparator;
if Length(AFile)+Length(N1)+Length(E1) <= MaxLen then
AFile := AFile + N1 + E1