-- Return a project that is either Project or an extended ancestor of
-- Project that itself is not extended.
- procedure Create_Temp_File
- (In_Tree : Project_Tree_Ref;
- Path_FD : out File_Descriptor;
- Path_Name : out Path_Name_Type;
- File_Use : String);
- -- Create a temporary file, and fail with an error if it could not be
- -- created.
-
----------------------
-- Ada_Include_Path --
----------------------
Buffer_Last : in out Natural)
is
Last : constant Natural := Buffer_Last + S'Length;
+
begin
while Last > Buffer'Last loop
declare
New_Buffer : constant String_Access :=
- new String (1 .. 2 * Buffer'Last);
-
+ new String (1 .. 2 * Buffer'Last);
begin
New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
Free (Buffer);
end loop;
if Add_It then
- Source_Path_Table.Append (Source_Paths, Source_Dir.Value);
+ Source_Path_Table.Append (Source_Paths, Source_Dir.Display_Value);
end if;
-- Next source directory
Namings : Naming_Table.Instance;
-- Table storing the naming data for gnatmake/gprmake
- Buffer : String_Access := new String (1 .. Buffer_Initial);
+ Buffer : String_Access := new String (1 .. Buffer_Initial);
Buffer_Last : Natural := 0;
File_Name : Path_Name_Type := No_Path;
-- file with procedure Write_Temp_File below.
procedure Write_Temp_File;
- -- Create a temporary file and put the content of the buffer in it.
+ -- Create a temporary file and put the content of the buffer in it
-----------
-- Check --
procedure Write_Temp_File is
Status : Boolean := False;
Last : Natural;
+
begin
Tempdir.Create_Temp_File (File, File_Name);
end if;
if not Status then
- Prj.Com.Fail
- ("could not create temporary file " &
- Get_Name_String (File_Name));
+ Prj.Com.Fail ("unable to create temporary file");
end if;
end Write_Temp_File;
- procedure Check_Imported_Projects is new For_Every_Project_Imported
- (Integer, Check);
+ procedure Check_Imported_Projects is
+ new For_Every_Project_Imported (Integer, Check);
+
Dummy : Integer := 0;
-- Start of processing for Create_Config_Pragmas_File
begin
if not For_Project.Config_Checked then
-
Naming_Table.Init (Namings);
-- Check the naming schemes
For_Every_Imported_Project (Project, Dummy);
declare
- Last : Natural;
+ Last : Natural;
Status : Boolean := False;
begin
Status : Boolean;
-- For calls to Close
- Last : Natural;
-
- Buffer : String_Access := new String (1 .. Buffer_Initial);
+ Last : Natural;
+ Buffer : String_Access := new String (1 .. Buffer_Initial);
Buffer_Last : Natural := 0;
procedure Recursive_Add (Project : Project_Id; Dummy : in out Boolean);
procedure For_All_Projects is
new For_Every_Project_Imported (Boolean, Recursive_Add);
+
Dummy : Boolean := False;
-- Start of processing for Set_Ada_Paths
if Last = Buffer_Last then
Close (Object_FD, Status);
-
else
Status := False;
end if;