]> git.ipfire.org Git - thirdparty/gcc.git/commit
output.ads (Indent,Outdent): New procedures for indenting the output.
authorBob Duff <duff@adacore.com>
Fri, 17 Apr 2009 12:11:04 +0000 (14:11 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Apr 2009 12:11:04 +0000 (14:11 +0200)
commitb1b543d2c07b470207d4b347d6b2a9af6d488da7
tree6e957cad5a9b6a8086189a2bb0175f2b72b4a7bd
parente31f58141167c7eecd9bd9cdcf1a6a9cdd528f32
output.ads (Indent,Outdent): New procedures for indenting the output.

2009-04-17  Bob Duff  <duff@adacore.com>

* output.ads (Indent,Outdent): New procedures for indenting the output.
(Write_Char): Correct comment -- LF _is_ allowed.

* output.adb (Indent,Outdent): New procedures for indenting the output.
Keep track of the indentation level, and make sure it doesn't get too
high.
(Flush_Buffer): Insert spaces at the beginning of each line, if
indentation level is nonzero.
(Save_Output_Buffer,Restore_Output_Buffer): Save and restore the current
indentation level.
(Set_Standard_Error,Set_Standard_Output): Remove superfluous
"Next_Col := 1;".  Flush_Buffer does that.

* sem_ch6.adb, sem_ch7.adb (Debug_Flag_C): Reorganize the output
controlled by the -gnatdc switch. It now occurs on entry/exit to the
relevant analysis routines, and calls Indent/Outdent to make the
indentation reflect the nesting level.  Add "helper" routines, since
otherwise lots of "return;" statements would skip the debugging output.

From-SVN: r146253
gcc/ada/output.adb
gcc/ada/output.ads
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch7.adb