mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 17:29:29 +01:00
Add dotted version of Dos unit in msdos/sysutils source
This commit is contained in:
parent
6577cd16e2
commit
67ba21f8a8
@ -390,7 +390,7 @@ begin
|
|||||||
//!! Sr := New(PSearchRec);
|
//!! Sr := New(PSearchRec);
|
||||||
getmem(sr,sizeof(searchrec));
|
getmem(sr,sizeof(searchrec));
|
||||||
Rslt.FindHandle := Sr;
|
Rslt.FindHandle := Sr;
|
||||||
DOS.FindFirst(Path, Attr, Sr^);
|
{$IFDEF FPC_DOTTEDUNITS}TP.{$endif}DOS.FindFirst(Path, Attr, Sr^);
|
||||||
result := -DosError;
|
result := -DosError;
|
||||||
if result = 0 then
|
if result = 0 then
|
||||||
begin
|
begin
|
||||||
@ -410,7 +410,7 @@ begin
|
|||||||
Sr := PSearchRec(Rslt.FindHandle);
|
Sr := PSearchRec(Rslt.FindHandle);
|
||||||
if Sr <> nil then
|
if Sr <> nil then
|
||||||
begin
|
begin
|
||||||
DOS.FindNext(Sr^);
|
{$IFDEF FPC_DOTTEDUNITS}TP.{$endif}DOS.FindNext(Sr^);
|
||||||
result := -DosError;
|
result := -DosError;
|
||||||
if result = 0 then
|
if result = 0 then
|
||||||
begin
|
begin
|
||||||
@ -433,7 +433,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
//!! Dispose(Sr);
|
//!! Dispose(Sr);
|
||||||
// This call is non dummy if LFNSupport is true PM
|
// This call is non dummy if LFNSupport is true PM
|
||||||
DOS.FindClose(SR^);
|
{$IFDEF FPC_DOTTEDUNITS}TP.{$endif}DOS.FindClose(SR^);
|
||||||
freemem(sr,sizeof(searchrec));
|
freemem(sr,sizeof(searchrec));
|
||||||
end;
|
end;
|
||||||
Handle := nil;
|
Handle := nil;
|
||||||
@ -883,16 +883,16 @@ var
|
|||||||
CommandLine: RawByteString;
|
CommandLine: RawByteString;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dos.exec_ansistring(path,comline);
|
{$IFDEF FPC_DOTTEDUNITS}TP.{$endif}dos.exec_ansistring(path,comline);
|
||||||
|
|
||||||
if (Dos.DosError <> 0) then
|
if ({$IFDEF FPC_DOTTEDUNITS}TP.{$endif}Dos.DosError <> 0) then
|
||||||
begin
|
begin
|
||||||
if ComLine <> '' then
|
if ComLine <> '' then
|
||||||
CommandLine := Path + ' ' + ComLine
|
CommandLine := Path + ' ' + ComLine
|
||||||
else
|
else
|
||||||
CommandLine := Path;
|
CommandLine := Path;
|
||||||
e:=EOSError.CreateFmt(SExecuteProcessFailed,[CommandLine,Dos.DosError]);
|
e:=EOSError.CreateFmt(SExecuteProcessFailed,[CommandLine,{$IFDEF FPC_DOTTEDUNITS}TP.{$endif}Dos.DosError]);
|
||||||
e.ErrorCode:=Dos.DosError;
|
e.ErrorCode:={$IFDEF FPC_DOTTEDUNITS}TP.{$endif}Dos.DosError;
|
||||||
raise e;
|
raise e;
|
||||||
end;
|
end;
|
||||||
Result := DosExitCode;
|
Result := DosExitCode;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user