Commit 959dd7d8 by Arnaud Charlet Committed by Arnaud Charlet

lib.adb, [...]: Update comments.

	* lib.adb, make.adb, mlib.adb, exp_dist.adb: Update comments.
	Minor reformatting.

From-SVN: r149562
parent 23c4ff9b
2009-07-13 Arnaud Charlet <charlet@adacore.com>
* lib.adb, make.adb, mlib.adb, exp_dist.adb: Update comments.
Minor reformatting.
2009-07-13 Emmanuel Briot <briot@adacore.com> 2009-07-13 Emmanuel Briot <briot@adacore.com>
* prj-env.adb (Create_Config_Pragmas_File): Iterate on sources rather * prj-env.adb (Create_Config_Pragmas_File): Iterate on sources rather
......
...@@ -874,7 +874,7 @@ package body Exp_Dist is ...@@ -874,7 +874,7 @@ package body Exp_Dist is
-- includes all limited types), append code to Stmts performing the -- includes all limited types), append code to Stmts performing the
-- equivalent of: -- equivalent of:
-- Target := Typ'From_Any (N) -- Target := Typ'From_Any (N)
--
-- or, if Target is Empty: -- or, if Target is Empty:
-- return Typ'From_Any (N) -- return Typ'From_Any (N)
...@@ -8439,21 +8439,21 @@ package body Exp_Dist is ...@@ -8439,21 +8439,21 @@ package body Exp_Dist is
Prefix => New_Occurrence_Of (Typ, Loc), Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Input, Attribute_Name => Name_Input,
Expressions => New_List ( Expressions => New_List (
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Strm, Loc), Prefix => New_Occurrence_Of (Strm, Loc),
Attribute_Name => Name_Access))); Attribute_Name => Name_Access)));
if Present (Target) then -- Target := Typ'Input (Strm'Access)
-- Target := Typ'Input (Strm'Access)
if Present (Target) then
Append_To (Stms, Append_To (Stms,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Target, Loc), Name => New_Occurrence_Of (Target, Loc),
Expression => Expr)); Expression => Expr));
else -- return Typ'Input (Strm'Access);
-- return Typ'Input (Strm'Access);
else
Append_To (Stms, Append_To (Stms,
Make_Simple_Return_Statement (Loc, Make_Simple_Return_Statement (Loc,
Expression => Expr)); Expression => Expr));
...@@ -8469,6 +8469,7 @@ package body Exp_Dist is ...@@ -8469,6 +8469,7 @@ package body Exp_Dist is
Temp : constant Entity_Id := Temp : constant Entity_Id :=
Make_Defining_Identifier Make_Defining_Identifier
(Loc, New_Internal_Name ('R')); (Loc, New_Internal_Name ('R'));
begin begin
Read_Call_List := New_List; Read_Call_List := New_List;
Expr := New_Occurrence_Of (Temp, Loc); Expr := New_Occurrence_Of (Temp, Loc);
...@@ -8500,6 +8501,7 @@ package body Exp_Dist is ...@@ -8500,6 +8501,7 @@ package body Exp_Dist is
Expr))); Expr)));
if No (Target) then if No (Target) then
-- return Temp -- return Temp
Append_To (Read_Call_List, Append_To (Read_Call_List,
...@@ -8796,10 +8798,10 @@ package body Exp_Dist is ...@@ -8796,10 +8798,10 @@ package body Exp_Dist is
Build_From_Any_Call (Ctyp, Build_From_Any_Call (Ctyp,
Build_Get_Aggregate_Element (Loc, Build_Get_Aggregate_Element (Loc,
Any => Any, Any => Any,
TC => Build_TypeCode_Call (Loc, TC =>
Ctyp, Decls), Build_TypeCode_Call (Loc, Ctyp, Decls),
Idx => Make_Integer_Literal (Loc, Idx =>
Counter)), Make_Integer_Literal (Loc, Counter)),
Decls))); Decls)));
else else
......
...@@ -606,6 +606,9 @@ package body Lib is ...@@ -606,6 +606,9 @@ package body Lib is
-- child subprogram body which we have not inserted into the table yet. -- child subprogram body which we have not inserted into the table yet.
if N /= Library_Unit (Cunit (Main_Unit)) then if N /= Library_Unit (Cunit (Main_Unit)) then
-- We do not use a pragma Assert here, since this would not be
-- enabled in case assertions are not active.
raise Program_Error; raise Program_Error;
else else
return Main_Unit; return Main_Unit;
......
...@@ -4446,8 +4446,8 @@ package body Make is ...@@ -4446,8 +4446,8 @@ package body Make is
(ALI_Project.Object_Directory.Name); (ALI_Project.Object_Directory.Name);
end if; end if;
if not Is_Directory_Separator if not
(Name_Buffer (Name_Len)) Is_Directory_Separator (Name_Buffer (Name_Len))
then then
Add_Char_To_Name_Buffer (Directory_Separator); Add_Char_To_Name_Buffer (Directory_Separator);
end if; end if;
...@@ -5308,8 +5308,8 @@ package body Make is ...@@ -5308,8 +5308,8 @@ package body Make is
if not Is_Absolute_Path (Exec_File_Name) then if not Is_Absolute_Path (Exec_File_Name) then
Get_Name_String (Main_Project.Exec_Directory.Name); Get_Name_String (Main_Project.Exec_Directory.Name);
if if not
not Is_Directory_Separator (Name_Buffer (Name_Len)) Is_Directory_Separator (Name_Buffer (Name_Len))
then then
Add_Char_To_Name_Buffer (Directory_Separator); Add_Char_To_Name_Buffer (Directory_Separator);
end if; end if;
......
...@@ -210,11 +210,11 @@ package body MLib is ...@@ -210,11 +210,11 @@ package body MLib is
-- since the whole file is read at once except on VMS. -- since the whole file is read at once except on VMS.
Curr := S'First; Curr := S'First;
while Curr <= Len loop while Curr <= Len loop
Actual_Len := Read (FD, S (Curr)'Address, Len); Actual_Len := Read (FD, S (Curr)'Address, Len);
-- Exit if we could not read for some reason -- Exit if we could not read for some reason
exit when Actual_Len = 0; exit when Actual_Len = 0;
Curr := Curr + Actual_Len; Curr := Curr + Actual_Len;
...@@ -231,10 +231,10 @@ package body MLib is ...@@ -231,10 +231,10 @@ package body MLib is
-- at the beginning of the P line. -- at the beginning of the P line.
for Index in 1 .. Len - 3 loop for Index in 1 .. Len - 3 loop
if (S (Index) = ASCII.LF or else if (S (Index) = ASCII.LF
S (Index) = ASCII.CR) or else
and then S (Index) = ASCII.CR)
S (Index + 1) = 'P' and then S (Index + 1) = 'P'
then then
S (Index + 5 .. Len + 3) := S (Index + 2 .. Len); S (Index + 5 .. Len + 3) := S (Index + 2 .. Len);
S (Index + 2 .. Index + 4) := " SL"; S (Index + 2 .. Index + 4) := " SL";
......
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