-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
New_Item : Element_Type;
Count : Count_Type := 1)
is
- First, Last : Tree_Node_Access;
+ First : Tree_Node_Access;
+ Last : Tree_Node_Access;
begin
if Parent = No_Element then
others => <>);
Last := First;
-
for J in Count_Type'(2) .. Count loop
-- Reclaim other nodes if Storage_Error. ???
Position : out Cursor;
Count : Count_Type := 1)
is
- Last : Tree_Node_Access;
+ First : Tree_Node_Access;
+ Last : Tree_Node_Access;
begin
if Parent = No_Element then
with "attempt to tamper with cursors (tree is busy)";
end if;
- Position.Container := Parent.Container;
- Position.Node := new Tree_Node_Type'(Parent => Parent.Node,
- Element => New_Item,
- others => <>);
-
- Last := Position.Node;
+ First := new Tree_Node_Type'(Parent => Parent.Node,
+ Element => New_Item,
+ others => <>);
+ Last := First;
for J in Count_Type'(2) .. Count loop
-- Reclaim other nodes if Storage_Error. ???
end loop;
Insert_Subtree_List
- (First => Position.Node,
+ (First => First,
Last => Last,
Parent => Parent.Node,
Before => Before.Node);
-- nodes we just inserted.
Container.Count := Container.Count + Count;
+
+ Position := Cursor'(Parent.Container, First);
end Insert_Child;
procedure Insert_Child
Position : out Cursor;
Count : Count_Type := 1)
is
- Last : Tree_Node_Access;
+ First : Tree_Node_Access;
+ Last : Tree_Node_Access;
begin
if Parent = No_Element then
with "attempt to tamper with cursors (tree is busy)";
end if;
- Position.Container := Parent.Container;
- Position.Node := new Tree_Node_Type'(Parent => Parent.Node,
- Element => <>,
- others => <>);
-
- Last := Position.Node;
+ First := new Tree_Node_Type'(Parent => Parent.Node,
+ Element => <>,
+ others => <>);
+ Last := First;
for J in Count_Type'(2) .. Count loop
-- Reclaim other nodes if Storage_Error. ???
end loop;
Insert_Subtree_List
- (First => Position.Node,
+ (First => First,
Last => Last,
Parent => Parent.Node,
Before => Before.Node);
-- nodes we just inserted.
Container.Count := Container.Count + Count;
+
+ Position := Cursor'(Parent.Container, First);
end Insert_Child;
-------------------------
Name_Of
(Project_Node_Of (Variable_Node, Node_Tree), Node_Tree);
The_Project :=
- Imported_Or_Extended_Project_From (Project, Name);
+ Imported_Or_Extended_Project_From
+ (Project, Name, No_Extending => True);
+ The_Package := No_Package;
end if;
-- If a package was specified for the case variable, get its id