mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 10:39:23 +02:00
* fixes to the win16 stderr output
git-svn-id: trunk@31849 -
This commit is contained in:
parent
84b47dc92c
commit
f5c2ce9058
@ -403,6 +403,11 @@ function do_isdevice(handle:THandle):boolean;
|
||||
var
|
||||
regs: Registers;
|
||||
begin
|
||||
if (handle=StdInputHandle) or (handle=StdOutputHandle) or (handle=StdErrorHandle) then
|
||||
begin
|
||||
do_isdevice:=true;
|
||||
exit;
|
||||
end;
|
||||
FillChar(regs,SizeOf(regs),0);
|
||||
regs.AX := $4400;
|
||||
regs.BX := handle;
|
||||
|
@ -298,7 +298,7 @@ Begin
|
||||
End;
|
||||
|
||||
|
||||
procedure ErrorClose(Var F: TextRec);
|
||||
procedure ShowErrMsg;
|
||||
begin
|
||||
if ErrorLen>0 then
|
||||
begin
|
||||
@ -312,8 +312,16 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure ErrorClose(Var F: TextRec);
|
||||
begin
|
||||
ShowErrMsg;
|
||||
end;
|
||||
|
||||
|
||||
procedure ErrorOpen(Var F: TextRec);
|
||||
Begin
|
||||
TextRec(F).Handle:=StdErrorHandle;
|
||||
TextRec(F).Mode:=fmOutput;
|
||||
TextRec(F).InOutFunc:=@ErrorWrite;
|
||||
TextRec(F).FlushFunc:=@ErrorWrite;
|
||||
TextRec(F).CloseFunc:=@ErrorClose;
|
||||
@ -355,6 +363,7 @@ begin
|
||||
Close(erroutput);
|
||||
Close(Input);
|
||||
Close(Output);
|
||||
ShowErrMsg;
|
||||
asm
|
||||
mov al, byte [exitcode]
|
||||
mov ah, 4Ch
|
||||
|
Loading…
Reference in New Issue
Block a user