|
@@ -50,6 +50,7 @@ Var
|
|
{------------------------------------------------------------------------------}
|
|
{------------------------------------------------------------------------------}
|
|
procedure InitRedir;
|
|
procedure InitRedir;
|
|
function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
|
|
function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
|
|
|
|
+procedure DosExecute(ProgName, ComLine : String);
|
|
|
|
|
|
function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
|
|
function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
|
|
procedure RestoreRedirOut;
|
|
procedure RestoreRedirOut;
|
|
@@ -518,40 +519,6 @@ end;
|
|
ErrorRedirDisabled:=False;
|
|
ErrorRedirDisabled:=False;
|
|
end;
|
|
end;
|
|
|
|
|
|
-{............................................................................}
|
|
|
|
-
|
|
|
|
- procedure DosExecute(ProgName, ComLine : String);
|
|
|
|
-{$ifdef win32}
|
|
|
|
- var
|
|
|
|
- StoreInherit : BOOL;
|
|
|
|
-{$endif win32}
|
|
|
|
-
|
|
|
|
- Begin
|
|
|
|
-{$IfDef MsDos}
|
|
|
|
- SmallHeap;
|
|
|
|
-{$EndIf MsDos}
|
|
|
|
- SwapVectors;
|
|
|
|
- { Must use shell() for linux for the wildcard expansion (PFV) }
|
|
|
|
-{$ifdef linux}
|
|
|
|
- Shell(Progname+' '+Comline);
|
|
|
|
-{$else}
|
|
|
|
-{$ifdef win32}
|
|
|
|
- StoreInherit:=ExecInheritsHandles;
|
|
|
|
- ExecInheritsHandles:=true;
|
|
|
|
-{$endif win32}
|
|
|
|
- Dos.Exec (ProgName, ComLine);
|
|
|
|
-{$ifdef win32}
|
|
|
|
- ExecInheritsHandles:=StoreInherit;
|
|
|
|
-{$endif win32}
|
|
|
|
-{$endif}
|
|
|
|
- IOStatus:=DosError;
|
|
|
|
- ExecuteResult:=DosExitCode;
|
|
|
|
- SwapVectors;
|
|
|
|
-{$IfDef MsDos}
|
|
|
|
- Fullheap;
|
|
|
|
-{$EndIf MsDos}
|
|
|
|
- End;
|
|
|
|
-
|
|
|
|
{............................................................................}
|
|
{............................................................................}
|
|
|
|
|
|
function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
|
|
function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
|
|
@@ -697,6 +664,40 @@ end;
|
|
{$endif not implemented}
|
|
{$endif not implemented}
|
|
|
|
|
|
|
|
|
|
|
|
+{............................................................................}
|
|
|
|
+
|
|
|
|
+ procedure DosExecute(ProgName, ComLine : String);
|
|
|
|
+{$ifdef win32}
|
|
|
|
+ var
|
|
|
|
+ StoreInherit : BOOL;
|
|
|
|
+{$endif win32}
|
|
|
|
+
|
|
|
|
+ Begin
|
|
|
|
+{$IfDef MsDos}
|
|
|
|
+ SmallHeap;
|
|
|
|
+{$EndIf MsDos}
|
|
|
|
+ SwapVectors;
|
|
|
|
+ { Must use shell() for linux for the wildcard expansion (PFV) }
|
|
|
|
+{$ifdef linux}
|
|
|
|
+ Shell(Progname+' '+Comline);
|
|
|
|
+{$else}
|
|
|
|
+{$ifdef win32}
|
|
|
|
+ StoreInherit:=ExecInheritsHandles;
|
|
|
|
+ ExecInheritsHandles:=true;
|
|
|
|
+{$endif win32}
|
|
|
|
+ Dos.Exec (ProgName, ComLine);
|
|
|
|
+{$ifdef win32}
|
|
|
|
+ ExecInheritsHandles:=StoreInherit;
|
|
|
|
+{$endif win32}
|
|
|
|
+{$endif}
|
|
|
|
+ IOStatus:=DosError;
|
|
|
|
+ ExecuteResult:=DosExitCode;
|
|
|
|
+ SwapVectors;
|
|
|
|
+{$IfDef MsDos}
|
|
|
|
+ Fullheap;
|
|
|
|
+{$EndIf MsDos}
|
|
|
|
+ End;
|
|
|
|
+
|
|
{*****************************************************************************
|
|
{*****************************************************************************
|
|
Initialize
|
|
Initialize
|
|
*****************************************************************************}
|
|
*****************************************************************************}
|
|
@@ -716,7 +717,10 @@ Begin
|
|
End.
|
|
End.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.23 1999-09-22 13:03:27 pierre
|
|
|
|
|
|
+ Revision 1.24 1999-11-10 17:10:59 pierre
|
|
|
|
+ + DosExecute to interface
|
|
|
|
+
|
|
|
|
+ Revision 1.23 1999/09/22 13:03:27 pierre
|
|
* Win32 ExecInheritsHandles typo problem
|
|
* Win32 ExecInheritsHandles typo problem
|
|
|
|
|
|
Revision 1.22 1999/09/22 09:03:58 peter
|
|
Revision 1.22 1999/09/22 09:03:58 peter
|