diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:48:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:48:45 +0000 |
commit | 187bf5e0db9214d11dcfaa20fccb05a88ce6d995 (patch) | |
tree | 1b91a0937992fafbb540af5ea59e26fe87c71d89 /gcc/ada/output.adb | |
parent | 545c2c196a6a31ee9d5a831e16e55bb5e2cf072c (diff) | |
download | gcc-187bf5e0db9214d11dcfaa20fccb05a88ce6d995.tar.gz |
2007-08-14 Vincent Celier <celier@adacore.com>
* output.ads, output.adb (Write_Eol): Remove trailing spaces before
writing the line.
(Write_Eol_Keep_Blanks): New procedure to write a line, including
possible trailing spaces.
(Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/output.adb')
-rw-r--r-- | gcc/ada/output.adb | 17 |
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 -- ---------------------- |