Commit 987c5cec by Vincent Celier Committed by Arnaud Charlet

errout.adb (Output_Source_Line): Do not keep a trailing space after the source line number if...

2007-12-06  Vincent Celier  <celier@adacore.com>

	* errout.adb (Output_Source_Line): Do not keep a trailing space after
	the source line number if the source line is empty.

From-SVN: r130826
parent ce0bead3
...@@ -1783,6 +1783,9 @@ package body Errout is ...@@ -1783,6 +1783,9 @@ package body Errout is
Line_Number_Output : Boolean := False; Line_Number_Output : Boolean := False;
-- Set True once line number is output -- Set True once line number is output
Empty_Line : Boolean := True;
-- Set False if line includes at least one character
begin begin
if Sfile /= Current_Error_Source_File then if Sfile /= Current_Error_Source_File then
Write_Str ("==============Error messages for "); Write_Str ("==============Error messages for ");
...@@ -1870,6 +1873,7 @@ package body Errout is ...@@ -1870,6 +1873,7 @@ package body Errout is
end if; end if;
end if; end if;
Empty_Line := False;
S := S + 1; S := S + 1;
end loop; end loop;
...@@ -1877,7 +1881,11 @@ package body Errout is ...@@ -1877,7 +1881,11 @@ package body Errout is
-- training spaces preserved (so we output the line exactly as input). -- training spaces preserved (so we output the line exactly as input).
if Line_Number_Output then if Line_Number_Output then
Write_Eol_Keep_Blanks; if Empty_Line then
Write_Eol;
else
Write_Eol_Keep_Blanks;
end if;
end if; end if;
end Output_Source_Line; end Output_Source_Line;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment