mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-08 09:06:06 +02:00
* fixed handling of both #13#10 and #10 line separators when reading from the
gdb/mi output on windows. Previous code only handled #13#10, but not #10. git-svn-id: trunk@30085 -
This commit is contained in:
parent
8dd9b46d60
commit
f6250b3a5a
@ -61,20 +61,21 @@ begin
|
|||||||
while FProcess.Running do
|
while FProcess.Running do
|
||||||
begin
|
begin
|
||||||
FProcess.Output.Read(C, 1);
|
FProcess.Output.Read(C, 1);
|
||||||
{$ifdef windows}
|
{$ifdef windows}
|
||||||
{ On windows we expect both #13 and #10 }
|
{ On windows we expect both #13#10 and #10 }
|
||||||
if C = #13 then
|
if C = #13 then
|
||||||
begin
|
begin
|
||||||
FPRocess.Output.Read(C,1);
|
FProcess.Output.Read(C, 1);
|
||||||
{$endif windows}
|
if C <> #10 then
|
||||||
|
{ #13 not followed by #10, what should we do? }
|
||||||
|
Result := Result + #13;
|
||||||
|
end;
|
||||||
|
{$endif windows}
|
||||||
if C = #10 then
|
if C = #10 then
|
||||||
begin
|
begin
|
||||||
DebugLn(Result);
|
DebugLn(Result);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
{$ifdef windows}
|
|
||||||
end;
|
|
||||||
{$endif windows}
|
|
||||||
Result := Result + C;
|
Result := Result + C;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user