From d0d04ba9b19e0f4a0db16c70db1b3452e16d6923 Mon Sep 17 00:00:00 2001 From: Jonsba Date: Thu, 28 Jul 2016 08:04:14 +0200 Subject: =?UTF-8?q?Changes=20in=20warning/error=20messages=20formatting=20?= =?UTF-8?q?in=20the=20Wave=5FOpt=5FFile=20pac=E2=80=A6=20(#124)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in warning/error messages formatting in the Wave_Opt_File packages to match better the way ghdl print warning/error messages. A little code cleanup. --- src/grt/grt-wave_opt_file-parse-debug.adb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/grt/grt-wave_opt_file-parse-debug.adb') diff --git a/src/grt/grt-wave_opt_file-parse-debug.adb b/src/grt/grt-wave_opt_file-parse-debug.adb index 2f8c66ec6..3461c9f3c 100644 --- a/src/grt/grt-wave_opt_file-parse-debug.adb +++ b/src/grt/grt-wave_opt_file-parse-debug.adb @@ -29,6 +29,9 @@ with Grt.Astdio; use Grt.Astdio; package body Grt.Wave_Opt_File.Parse.Debug is + -- Dump recursively an element of the tree. + procedure Dump_Sub_Tree (Cursor : Elem_Acc); + procedure Dump_Tree is begin New_Line; @@ -39,22 +42,24 @@ package body Grt.Wave_Opt_File.Parse.Debug is else Put_Line ("Instances : "); end if; - Dump_Sub_Tree (Trees (Index), 1); + Dump_Sub_Tree (Trees (Index)); end loop; Put_Line ("----------- END -----------------"); New_Line; end Dump_Tree; - procedure Dump_Sub_Tree (Cursor : Elem_Acc; Level : Positive) +------------------------------------------------------------------------------- + + procedure Dump_Sub_Tree (Cursor : Elem_Acc) is Sibling_Cursor : Elem_Acc; begin Sibling_Cursor := Cursor; while Sibling_Cursor /= null loop - Put ((3 .. 2 * Level => ' ')); + Put ((3 .. 2 * Sibling_Cursor.Level => ' ')); Put ('/'); Put_Line (Sibling_Cursor.Name.all); - Dump_Sub_Tree (Sibling_Cursor.Next_Child, Level + 1); + Dump_Sub_Tree (Sibling_Cursor.Next_Child); Sibling_Cursor := Sibling_Cursor.Next_Sibling; end loop; end Dump_Sub_Tree; -- cgit v1.2.3