+ minor IDE tweaks

* define Amiga and MorphOS as FSCaseInsensitve systems
  * get EOL and DirSep from System unit, and do not redefine it
    with tons of $ifdefs
  * for temp files, use T: on Amiga and MorphOS

git-svn-id: trunk@11971 -
This commit is contained in:
Károly Balogh 2008-10-24 17:44:04 +00:00
parent d135a2d9ea
commit 71e8ea5984
2 changed files with 17 additions and 2 deletions

View File

@ -82,6 +82,14 @@
{$define FSCaseInsensitive}
{$endif}
{$ifdef Amiga}
{$define FSCaseInsensitive}
{$endif}
{$ifdef MorphOS}
{$define FSCaseInsensitive}
{$endif}
{ --- Exclude debugger support --- }
{.$DEFINE NODEBUG}

View File

@ -40,7 +40,12 @@ const
TempFirstChar = {$ifndef Unix}'~'{$else}'_'{$endif};
TempExt = '.tmp';
TempNameLen = 8;
EOL : String[2] = {$ifdef Unix}#10;{$else}#13#10;{$endif}
{ Get DirSep and EOL from System unit, instead of redefining
here with tons of $ifdefs (KB) }
DirSep : char = System.DirectorySeparator;
EOL : String[2] = System.LineEnding;
type
PByteArray = ^TByteArray;
@ -179,7 +184,6 @@ const LastStrToIntResult : integer = 0;
LastHexToIntResult : integer = 0;
LastStrToCardResult : integer = 0;
LastHexToCardResult : integer = 0;
DirSep : char = {$ifdef Unix}'/'{$else}'\'{$endif};
UseOldBufStreamMethod : boolean = false;
procedure RegisterWUtils;
@ -1229,6 +1233,9 @@ var Dir: string;
begin
Dir:=GetEnv('TEMP');
if Dir='' then Dir:=GetEnv('TMP');
{$if defined(morphos) or defined(amiga)}
if Dir='' then Dir:='T:';
{$endif}
if (Dir<>'') then if not ExistsDir(Dir) then Dir:='';
if Dir='' then Dir:=GetCurDir;
repeat