Commit 99834e70 authored by yoogx's avatar yoogx

* (Add_ULL_To_Name_Buffer): this function is now part of Ocarina.Namet

parent e0b0793e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -39,14 +39,8 @@ package body Ocarina.Backends.Ada_Values is ...@@ -39,14 +39,8 @@ package body Ocarina.Backends.Ada_Values is
package OV renames Ocarina.AADL_Values; package OV renames Ocarina.AADL_Values;
Hex : constant String := "0123456789ABCDEF";
package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10); package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10);
subtype ULL is Unsigned_Long_Long;
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1);
----------- -----------
-- Reset -- -- Reset --
----------- -----------
...@@ -341,20 +335,6 @@ package body Ocarina.Backends.Ada_Values is ...@@ -341,20 +335,6 @@ package body Ocarina.Backends.Ada_Values is
return LV; return LV;
end "xor"; end "xor";
----------------------------
-- Add_ULL_To_Name_Buffer --
----------------------------
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1) is
Q : constant ULL := U / B;
R : constant ULL := U mod B;
begin
if Q /= 0 or else S > 1 then
Add_ULL_To_Name_Buffer (Q, B, S - 1);
end if;
Add_Char_To_Name_Buffer (Hex (Hex'First + Natural (R)));
end Add_ULL_To_Name_Buffer;
----------- -----------
-- Image -- -- Image --
----------- -----------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2012-2015 ESA & ISAE. -- -- Copyright (C) 2012-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -39,14 +39,8 @@ package body Ocarina.Backends.ASN1_Values is ...@@ -39,14 +39,8 @@ package body Ocarina.Backends.ASN1_Values is
package OV renames Ocarina.AADL_Values; package OV renames Ocarina.AADL_Values;
Hex : constant String := "0123456789ABCDEF";
package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10); package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10);
subtype ULL is Unsigned_Long_Long;
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1);
--------- ---------
-- "*" -- -- "*" --
--------- ---------
...@@ -320,20 +314,6 @@ package body Ocarina.Backends.ASN1_Values is ...@@ -320,20 +314,6 @@ package body Ocarina.Backends.ASN1_Values is
return LV; return LV;
end "xor"; end "xor";
----------------------------
-- Add_ULL_To_Name_Buffer --
----------------------------
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1) is
Q : constant ULL := U / B;
R : constant ULL := U mod B;
begin
if Q /= 0 or else S > 1 then
Add_ULL_To_Name_Buffer (Q, B, S - 1);
end if;
Add_Char_To_Name_Buffer (Hex (Hex'First + Natural (R)));
end Add_ULL_To_Name_Buffer;
----------- -----------
-- Image -- -- Image --
----------- -----------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -39,14 +39,8 @@ package body Ocarina.Backends.C_Values is ...@@ -39,14 +39,8 @@ package body Ocarina.Backends.C_Values is
package OV renames Ocarina.AADL_Values; package OV renames Ocarina.AADL_Values;
Hex : constant String := "0123456789ABCDEF";
package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10); package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10);
subtype ULL is Unsigned_Long_Long;
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1);
--------- ---------
-- "*" -- -- "*" --
--------- ---------
...@@ -320,20 +314,6 @@ package body Ocarina.Backends.C_Values is ...@@ -320,20 +314,6 @@ package body Ocarina.Backends.C_Values is
return LV; return LV;
end "xor"; end "xor";
----------------------------
-- Add_ULL_To_Name_Buffer --
----------------------------
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1) is
Q : constant ULL := U / B;
R : constant ULL := U mod B;
begin
if Q /= 0 or else S > 1 then
Add_ULL_To_Name_Buffer (Q, B, S - 1);
end if;
Add_Char_To_Name_Buffer (Hex (Hex'First + Natural (R)));
end Add_ULL_To_Name_Buffer;
----------- -----------
-- Image -- -- Image --
----------- -----------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2010-2015 ESA & ISAE. -- -- Copyright (C) 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -38,14 +38,8 @@ package body Ocarina.Backends.MAST_Values is ...@@ -38,14 +38,8 @@ package body Ocarina.Backends.MAST_Values is
package OV renames Ocarina.AADL_Values; package OV renames Ocarina.AADL_Values;
Hex : constant String := "0123456789ABCDEF";
package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10); package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10);
subtype ULL is Unsigned_Long_Long;
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1);
--------- ---------
-- "*" -- -- "*" --
--------- ---------
...@@ -301,20 +295,6 @@ package body Ocarina.Backends.MAST_Values is ...@@ -301,20 +295,6 @@ package body Ocarina.Backends.MAST_Values is
return LV; return LV;
end "xor"; end "xor";
----------------------------
-- Add_ULL_To_Name_Buffer --
----------------------------
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1) is
Q : constant ULL := U / B;
R : constant ULL := U mod B;
begin
if Q /= 0 or else S > 1 then
Add_ULL_To_Name_Buffer (Q, B, S - 1);
end if;
Add_Char_To_Name_Buffer (Hex (Hex'First + Natural (R)));
end Add_ULL_To_Name_Buffer;
----------- -----------
-- Image -- -- Image --
----------- -----------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -38,14 +38,8 @@ package body Ocarina.Backends.XML_Values is ...@@ -38,14 +38,8 @@ package body Ocarina.Backends.XML_Values is
package OV renames Ocarina.AADL_Values; package OV renames Ocarina.AADL_Values;
Hex : constant String := "0123456789ABCDEF";
package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10); package VT is new GNAT.Table (Value_Type, Value_Id, No_Value + 1, 10, 10);
subtype ULL is Unsigned_Long_Long;
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1);
--------- ---------
-- "*" -- -- "*" --
--------- ---------
...@@ -301,20 +295,6 @@ package body Ocarina.Backends.XML_Values is ...@@ -301,20 +295,6 @@ package body Ocarina.Backends.XML_Values is
return LV; return LV;
end "xor"; end "xor";
----------------------------
-- Add_ULL_To_Name_Buffer --
----------------------------
procedure Add_ULL_To_Name_Buffer (U : ULL; B : ULL; S : Integer := 1) is
Q : constant ULL := U / B;
R : constant ULL := U mod B;
begin
if Q /= 0 or else S > 1 then
Add_ULL_To_Name_Buffer (Q, B, S - 1);
end if;
Add_Char_To_Name_Buffer (Hex (Hex'First + Natural (R)));
end Add_ULL_To_Name_Buffer;
----------- -----------
-- Image -- -- Image --
----------- -----------
......
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