Browse Source

* remove dos unit from sysutils

git-svn-id: trunk@3620 -
peter 19 years ago
parent
commit
0237088689
2 changed files with 11 additions and 10 deletions
  1. 10 7
      rtl/objpas/sysutils/fina.inc
  2. 1 3
      rtl/win/sysutils.pp

+ 10 - 7
rtl/objpas/sysutils/fina.inc

@@ -54,7 +54,7 @@ end;
 
 function ExtractFileDrive(const FileName: string): string;
 
-var 
+var
   i,l: longint;
 
 begin
@@ -65,7 +65,7 @@ begin
     If (FileName[2]=':') then
       result:=Copy(FileName,1,2)
     else if (FileName[1] in ['/','\']) and
-            (FileName[2] in ['/','\']) then 
+            (FileName[2] in ['/','\']) then
       begin
       i := 2;
       While (i<L) and Not (Filename[i+1] in ['/', '\']) do
@@ -93,6 +93,13 @@ if (I > 0) and (FileName[I] = '.') then
 else Result := '';
 end;
 
+
+{$ifndef HasUnix}
+  type
+    PathStr=string;
+  {$i fexpand.inc}
+{$endif}
+
 function ExpandFileName (Const FileName : string): String;
 
 Var S : String;
@@ -100,11 +107,7 @@ Var S : String;
 Begin
  S:=FileName;
  DoDirSeparators(S);
-{$ifdef HasUnix}
-  Result:=fexpand(S);
-{$else}
-  Result:=Dos.Fexpand(S);
-{$endif}
+ Result:=Fexpand(S);
 end;
 
 

+ 1 - 3
rtl/win/sysutils.pp

@@ -22,7 +22,6 @@ interface
 {$H+}
 
 uses
-  dos,
   windows;
 
 {$DEFINE HAS_SLEEP}
@@ -762,7 +761,6 @@ var
   e : EOSError;
 
 begin
-  DosError := 0;
   FillChar(SI, SizeOf(SI), 0);
   SI.cb:=SizeOf(SI);
   SI.wShowWindow:=1;
@@ -781,7 +779,7 @@ begin
     CommandLine := CommandLine + #0;
 
   if not CreateProcess(nil, pchar(CommandLine),
-    Nil, Nil, ExecInheritsHandles,$20, Nil, Nil, SI, PI) then
+    Nil, Nil, False,$20, Nil, Nil, SI, PI) then
     begin
       e:=EOSError.CreateFmt(SExecuteProcessFailed,[CommandLine,GetLastError]);
       e.ErrorCode:=GetLastError;