Commit e7f567a3 by Arnaud Charlet

[multiple changes]

2011-08-01  Matthew Heaney  <heaney@adacore.com>

	* a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
	of node.

2011-08-01  Pascal Obry  <obry@adacore.com>

	* a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
	reformatting.

From-SVN: r177003
parent 1a265e78
2011-08-01 Matthew Heaney <heaney@adacore.com>
* a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
of node.
2011-08-01 Pascal Obry <obry@adacore.com>
* a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
reformatting.
2011-08-01 Ed Schonberg <schonberg@adacore.com> 2011-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
......
...@@ -330,7 +330,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is ...@@ -330,7 +330,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is
Set_Right (N (Parent (N (Z))), Y); Set_Right (N (Parent (N (Z))), Y);
end if; end if;
Set_Left (N (Y), Z); Set_Left (N (Y), Left (N (Z)));
Set_Parent (N (Left (N (Y))), Y); Set_Parent (N (Left (N (Y))), Y);
Set_Right (N (Y), Z); Set_Right (N (Y), Z);
Set_Parent (N (Z), Y); Set_Parent (N (Z), Y);
......
...@@ -1298,7 +1298,7 @@ package body Ada.Strings.Unbounded is ...@@ -1298,7 +1298,7 @@ package body Ada.Strings.Unbounded is
DR : Shared_String_Access; DR : Shared_String_Access;
begin begin
-- Bounds check. -- Bounds check
if Index <= SR.Last then if Index <= SR.Last then
......
...@@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Unbounded is
DR : Shared_Wide_String_Access; DR : Shared_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Left string is empty, return Right string. -- Left string is empty, return Rigth string
elsif LR.Last = 0 then elsif LR.Last = 0 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Right string is empty, return Left string. -- Right string is empty, return Left string
elsif RR.Last = 0 then elsif RR.Last = 0 then
Reference (LR); Reference (LR);
DR := LR; DR := LR;
-- Otherwise, allocate new shared string and fill data. -- Overwise, allocate new shared string and fill data
else else
DR := Allocate (LR.Last + RR.Last); DR := Allocate (LR.Last + RR.Last);
...@@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Unbounded is
DR : Shared_Wide_String_Access; DR : Shared_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Right is an empty string, return Left string. -- Right is an empty string, return Left string
elsif Right'Length = 0 then elsif Right'Length = 0 then
Reference (LR); Reference (LR);
DR := LR; DR := LR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Unbounded is
DR : Shared_Wide_String_Access; DR : Shared_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared one. -- Result is an empty string, reuse shared one
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Left is empty string, return Right string. -- Left is empty string, return Right string
elsif Left'Length = 0 then elsif Left'Length = 0 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Unbounded is
DR : Shared_Wide_String_Access; DR : Shared_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if Left = 0 then if Left = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (Left); DR := Allocate (Left);
...@@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Unbounded is
K : Positive; K : Positive;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Unbounded is
K : Positive; K : Positive;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_String'Access); Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access; DR := Empty_Shared_Wide_String'Access;
-- Coefficient is one, just return string itself. -- Coefficient is one, just return string itself
elsif Left = 1 then elsif Left = 1 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Unbounded is
begin begin
return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last); return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last);
-- LR = RR means two strings shares shared string, thus they are equal. -- LR = RR means two strings shares shared string, thus they are equal
end "="; end "=";
function "=" function "="
...@@ -1310,7 +1310,7 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -1310,7 +1310,7 @@ package body Ada.Strings.Wide_Unbounded is
DR : Shared_Wide_String_Access; DR : Shared_Wide_String_Access;
begin begin
-- Bounds check. -- Bounds check
if Index <= SR.Last then if Index <= SR.Last then
......
...@@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Wide_Unbounded is
DR : Shared_Wide_Wide_String_Access; DR : Shared_Wide_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Left string is empty, return Right string. -- Left string is empty, return Rigth string
elsif LR.Last = 0 then elsif LR.Last = 0 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Right string is empty, return Left string. -- Right string is empty, return Left string
elsif RR.Last = 0 then elsif RR.Last = 0 then
Reference (LR); Reference (LR);
DR := LR; DR := LR;
-- Otherwise, allocate new shared string and fill data. -- Overwise, allocate new shared string and fill data
else else
DR := Allocate (LR.Last + RR.Last); DR := Allocate (LR.Last + RR.Last);
...@@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is
DR : Shared_Wide_Wide_String_Access; DR : Shared_Wide_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Right is an empty string, return Left string. -- Right is an empty string, return Left string
elsif Right'Length = 0 then elsif Right'Length = 0 then
Reference (LR); Reference (LR);
DR := LR; DR := LR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is
DR : Shared_Wide_Wide_String_Access; DR : Shared_Wide_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared one. -- Result is an empty string, reuse shared one
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Left is empty string, return Right string. -- Left is empty string, return Right string
elsif Left'Length = 0 then elsif Left'Length = 0 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is
DR : Shared_Wide_Wide_String_Access; DR : Shared_Wide_Wide_String_Access;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if Left = 0 then if Left = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (Left); DR := Allocate (Left);
...@@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is
K : Positive; K : Positive;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is
K : Positive; K : Positive;
begin begin
-- Result is an empty string, reuse shared empty string. -- Result is an empty string, reuse shared empty string
if DL = 0 then if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access); Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access; DR := Empty_Shared_Wide_Wide_String'Access;
-- Coefficient is one, just return string itself. -- Coefficient is one, just return string itself
elsif Left = 1 then elsif Left = 1 then
Reference (RR); Reference (RR);
DR := RR; DR := RR;
-- Otherwise, allocate new shared string and fill it. -- Otherwise, allocate new shared string and fill it
else else
DR := Allocate (DL); DR := Allocate (DL);
...@@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is
begin begin
return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last); return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last);
-- LR = RR means two strings shares shared string, thus they are equal. -- LR = RR means two strings shares shared string, thus they are equal
end "="; end "=";
function "=" function "="
...@@ -1320,7 +1320,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -1320,7 +1320,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is
DR : Shared_Wide_Wide_String_Access; DR : Shared_Wide_Wide_String_Access;
begin begin
-- Bounds check. -- Bounds check
if Index <= SR.Last then if Index <= SR.Last then
......
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