summaryrefslogtreecommitdiff
path: root/gcc/ada/output.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/output.adb')
-rw-r--r--gcc/ada/output.adb17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ada/output.adb b/gcc/ada/output.adb
index b606ccc8a8b..6a2a723e580 100644
--- a/gcc/ada/output.adb
+++ b/gcc/ada/output.adb
@@ -254,11 +254,28 @@ package body Output is
procedure Write_Eol is
begin
+ -- Remove any trailing space
+
+ while Next_Col > 1 and then Buffer (Next_Col - 1) = ' ' loop
+ Next_Col := Next_Col - 1;
+ end loop;
+
Buffer (Next_Col) := ASCII.LF;
Next_Col := Next_Col + 1;
Flush_Buffer;
end Write_Eol;
+ ---------------------------
+ -- Write_Eol_Keep_Blanks --
+ ---------------------------
+
+ procedure Write_Eol_Keep_Blanks is
+ begin
+ Buffer (Next_Col) := ASCII.LF;
+ Next_Col := Next_Col + 1;
+ Flush_Buffer;
+ end Write_Eol_Keep_Blanks;
+
----------------------
-- Write_Erase_Char --
----------------------