فهرست منبع

+ 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 -

Károly Balogh 17 سال پیش
والد
کامیت
71e8ea5984
2فایلهای تغییر یافته به همراه17 افزوده شده و 2 حذف شده
  1. 8 0
      ide/globdir.inc
  2. 9 2
      ide/wutils.pas

+ 8 - 0
ide/globdir.inc

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

+ 9 - 2
ide/wutils.pas

@@ -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