Commit dea07ba2 authored by julien.delange's avatar julien.delange
Browse files

* correction implementation of Replace_Char

 * avoid character '_' from AADL models to ASN1 description

git-svn-id: 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent ebeccbff
......@@ -184,22 +184,21 @@ package body Utils is
function Replace_Char (Name : Name_Id; O : Character; N : Character)
return Name_Id is
pragma Unreferenced (O);
pragma Unreferenced (N);
Len : Natural;
New_Name : Name_Id := No_Name;
Initial_Name : constant String := Get_Name_String (Name);
Get_Name_String (Name);
Len := Name_Len;
Name_Len := 0;
for Index in Initial_Name'First .. Initial_Name'Last loop
if Initial_Name (Index) = O then
Add_Char_To_Name_Buffer (N);
Add_Char_To_Name_Buffer (Initial_Name (Index));
end if;
end loop;
New_Name := Name_Find;
New_Str : String (1 .. Len);
for I in 1 .. Len loop
New_Str (I) := Name_Buffer (I);
end loop;
New_Name := Get_String_Name (New_Str);
return New_Name;
end Replace_Char;
Supports Markdown
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