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>
* prj-env.adb (Create_Config_Pragmas_File): Iterate on sources rather
......
......@@ -874,7 +874,7 @@ package body Exp_Dist is
-- includes all limited types), append code to Stmts performing the
-- equivalent of:
-- Target := Typ'From_Any (N)
--
-- or, if Target is Empty:
-- return Typ'From_Any (N)
......@@ -8439,21 +8439,21 @@ package body Exp_Dist is
Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Input,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Strm, Loc),
Attribute_Name => Name_Access)));
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Strm, Loc),
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,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Target, Loc),
Expression => Expr));
else
-- return Typ'Input (Strm'Access);
-- return Typ'Input (Strm'Access);
else
Append_To (Stms,
Make_Simple_Return_Statement (Loc,
Expression => Expr));
......@@ -8469,6 +8469,7 @@ package body Exp_Dist is
Temp : constant Entity_Id :=
Make_Defining_Identifier
(Loc, New_Internal_Name ('R'));
begin
Read_Call_List := New_List;
Expr := New_Occurrence_Of (Temp, Loc);
......@@ -8500,6 +8501,7 @@ package body Exp_Dist is
Expr)));
if No (Target) then
-- return Temp
Append_To (Read_Call_List,
......@@ -8796,10 +8798,10 @@ package body Exp_Dist is
Build_From_Any_Call (Ctyp,
Build_Get_Aggregate_Element (Loc,
Any => Any,
TC => Build_TypeCode_Call (Loc,
Ctyp, Decls),
Idx => Make_Integer_Literal (Loc,
Counter)),
TC =>
Build_TypeCode_Call (Loc, Ctyp, Decls),
Idx =>
Make_Integer_Literal (Loc, Counter)),
Decls)));
else
......
......@@ -606,6 +606,9 @@ package body Lib is
-- child subprogram body which we have not inserted into the table yet.
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;
else
return Main_Unit;
......
......@@ -4446,8 +4446,8 @@ package body Make is
(ALI_Project.Object_Directory.Name);
end if;
if not Is_Directory_Separator
(Name_Buffer (Name_Len))
if not
Is_Directory_Separator (Name_Buffer (Name_Len))
then
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
......@@ -5308,8 +5308,8 @@ package body Make is
if not Is_Absolute_Path (Exec_File_Name) then
Get_Name_String (Main_Project.Exec_Directory.Name);
if
not Is_Directory_Separator (Name_Buffer (Name_Len))
if not
Is_Directory_Separator (Name_Buffer (Name_Len))
then
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
......
......@@ -210,11 +210,11 @@ package body MLib is
-- since the whole file is read at once except on VMS.
Curr := S'First;
while Curr <= Len loop
Actual_Len := Read (FD, S (Curr)'Address, Len);
-- Exit if we could not read for some reason
exit when Actual_Len = 0;
Curr := Curr + Actual_Len;
......@@ -231,10 +231,10 @@ package body MLib is
-- at the beginning of the P line.
for Index in 1 .. Len - 3 loop
if (S (Index) = ASCII.LF or else
S (Index) = ASCII.CR)
and then
S (Index + 1) = 'P'
if (S (Index) = ASCII.LF
or else
S (Index) = ASCII.CR)
and then S (Index + 1) = 'P'
then
S (Index + 5 .. Len + 3) := S (Index + 2 .. Len);
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