Commit 9b998381 by Robert Dewar Committed by Arnaud Charlet

treepr.ads, treepr.adb: (pl): implement use of positive value shorthands

2007-12-06  Robert Dewar  <dewar@adacore.com>

	* treepr.ads, treepr.adb: (pl): implement use of positive value
	shorthands

From-SVN: r130869
parent c1e0259c
......@@ -223,9 +223,38 @@ package body Treepr is
-- pl --
--------
procedure pl (L : List_Id) is
procedure pl (L : Int) is
Lid : Int;
begin
Print_Tree_List (L);
if L < 0 then
Lid := L;
-- This is the case where we transform e.g. +36 to -99999936
else
if L <= 9 then
Lid := -(99999990 + L);
elsif L <= 99 then
Lid := -(99999900 + L);
elsif L <= 999 then
Lid := -(99999000 + L);
elsif L <= 9999 then
Lid := -(99990000 + L);
elsif L <= 99999 then
Lid := -(99900000 + L);
elsif L <= 999999 then
Lid := -(99000000 + L);
elsif L <= 9999999 then
Lid := -(90000000 + L);
else
Lid := -L;
end if;
end if;
-- Now output the list
Print_Tree_List (List_Id (Lid));
end pl;
--------
......
......@@ -59,13 +59,14 @@ package Treepr is
procedure pe (E : Elist_Id);
pragma Export (Ada, pe);
-- Debugging procedure (to be called within gdb)
-- same as Print_Tree_Elist
-- Debugging procedure (to be called within gdb), same as Print_Tree_Elist
procedure pl (L : List_Id);
procedure pl (L : Int);
pragma Export (Ada, pl);
-- Debugging procedure (to be called within gdb)
-- same as Print_Tree_List
-- Debugging procedure (to be called within gdb), same as Print_Tree_List,
-- except that you can use e.g. 66 instead of -99999966. In other words
-- for the positive case we fill out to 8 digits on the left and add a
-- minus sign. This just saves some typing in the debugger.
procedure pn (N : Node_Id);
pragma Export (Ada, pn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment