]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
output.adb (Flush_Buffer): Do not indent blank lines.
authorBob Duff <duff@adacore.com>
Mon, 20 Apr 2009 12:29:12 +0000 (14:29 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 12:29:12 +0000 (14:29 +0200)
2009-04-20  Bob Duff  <duff@adacore.com>

* output.adb (Flush_Buffer): Do not indent blank lines.
(Ignore_Output): New procedure for output suppression.

From-SVN: r146402

gcc/ada/output.adb
gcc/ada/output.ads

index 745d47fab38880a0e5f9f3f1a92b6f566f8e612f..141c12fb294eedd2c8f593f377f6ba730fb581c5 100644 (file)
@@ -112,14 +112,17 @@ package body Output is
 
       Len : constant Natural := Next_Col - 1;
 
+   --  Start of processing for Flush_Buffer
+
    begin
       if Len /= 0 then
          begin
             --  If there's no indentation, or if the line is too long with
-            --  indentation, just write the buffer.
+            --  indentation, or if it's a blank line, just write the buffer.
 
             if Cur_Indentation = 0
               or else Cur_Indentation + Len > Buffer_Max
+              or else Buffer (1 .. Len) = (1 => ASCII.LF)
             then
                Write_Buffer (Buffer (1 .. Len));
 
@@ -156,6 +159,15 @@ package body Output is
       end if;
    end Flush_Buffer;
 
+   -------------------
+   -- Ignore_Output --
+   -------------------
+
+   procedure Ignore_Output (S : String) is
+   begin
+      null;
+   end Ignore_Output;
+
    ------------
    -- Indent --
    ------------
index 8e8eb6b0eba08681d5fc216b8d2d0da0743a0ba4..6e9176e8802b5fac8bc9f7305d9e31cd1d1f7b1f 100644 (file)
@@ -66,6 +66,10 @@ package Output is
    --  It is never an error to call Cancel_Special_Output. It has the same
    --  effect as calling Set_Special_Output (null).
 
+   procedure Ignore_Output (S : String);
+   --  Does nothing. To disable output, pass Ignore_Output'Access to
+   --  Set_Special_Output.
+
    procedure Set_Standard_Error;
    --  Sets subsequent output to appear on the standard error file (whatever
    --  that might mean for the host operating system, if anything) when