Commit 14061bb2 authored by jhugues's avatar jhugues

* Do not force ".aadl" extension for user-provided files.

	For ticket 248



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@3420 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent b3f813c8
......@@ -50,16 +50,21 @@ package body Ocarina.Files is
-- Add_File_To_Parse_List --
----------------------------
procedure Add_File_To_Parse_List (File_Name : Name_Id) is
procedure Add_File_To_Parse_List
(File_Name : Name_Id; Add_Suffix : Boolean := True)
is
File_Name_With_Extension : Name_Id;
Do_Add : Boolean := True;
begin
Get_Name_String (File_Name);
if Name_Len < 5
or else Name_Buffer (Name_Len - 4 .. Name_Len) /= ".aadl"
then
Add_Str_To_Name_Buffer (".aadl");
if Add_Suffix then
if Name_Len < 5
or else Name_Buffer (Name_Len - 4 .. Name_Len) /= ".aadl"
then
Add_Str_To_Name_Buffer (".aadl");
end if;
end if;
File_Name_With_Extension := Name_Find;
......
......@@ -49,7 +49,8 @@ package Ocarina.Files is
-- The file is loaded in Buffer and Buffer_Location is used to
-- scan it.
procedure Add_File_To_Parse_List (File_Name : Name_Id);
procedure Add_File_To_Parse_List
(File_Name : Name_Id; Add_Suffix : Boolean := True);
function Search_File (File_Name : Name_Id) return Name_Id;
......
......@@ -1168,7 +1168,8 @@ procedure Ocarina_Cmd is
else
Set_Str_To_Name_Buffer (S);
Ocarina.Files.Add_File_To_Parse_List (Name_Find);
Ocarina.Files.Add_File_To_Parse_List
(Name_Find, Add_Suffix => False);
end if;
end;
end case;
......
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