|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 15360 (0x3c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Variables, seg_04919a
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Our_String, Text_Io;
package body Variables is
List_Of_Variables : Our_List.List;
Pointer_Variables : Our_List.List;
Current_Variable : Our_List.Iter;
Var : Our_List.Iter;
Var1 : Our_List.Iter;
--Var2 : Our_List.Iter;
Current_List : Our_List.List;
--List1 : Our_List.List;
--List2 : Our_List.List;
Tmp_String : Our_String.Variable_String;
procedure Create_List_Of_Variables is
Tmp_Object : Our_List.Object;
begin
List_Of_Variables := Our_List.Create;
--Tmp_Object := Our_List.Affect ("porte_nord");
--Our_List.Attach (List_Of_Variables, Tmp_Object);
--Tmp_Object := Our_List.Affect ("porte_sud");
--Our_List.Attach (List_Of_Variables, Tmp_Object);
--Tmp_Object := Our_List.Affect ("porte_est");
--Our_List.Attach (List_Of_Variables, Tmp_Object);
--Tmp_Object := Our_List.Affect ("porte_ouest");
--Our_List.Attach (List_Of_Variables, Tmp_Object);
end Create_List_Of_Variables;
procedure Add_Variable (New_Variable : String) is
begin
Our_String.Free (Tmp_String);
Our_String.Copy (Tmp_String, New_Variable);
end Add_Variable;
procedure Complete_Variable_With_Type (Type_Of_Variable : String) is
Tmp : Our_List.Object;
Tmp_Iter, Tmp_Iter2 : Our_List.Iter;
Tmp_List, Tmp_List2 : Our_List.List;
A_String : Our_String.Variable_String;
begin
if Our_List.Isinlist (Our_List.Get_List_Of_Types, Type_Of_Variable) then
if Type_Of_Variable = "string" or Type_Of_Variable = "boolean" or
Type_Of_Variable = "integer" or
Our_String.Image
(Our_List.Iteronobject
(Our_List.Get_List_Of_Types, Type_Of_Variable).
Info.The_Type) = "enum" then
Tmp := Our_List.Affect
(Our_String.Image (Tmp_String), Type_Of_Variable);
Our_List.Attach (List_Of_Variables, Tmp);
Pointer_Variables := Our_List.Go_To_End (List_Of_Variables);
--Our_List.Destroy (Pointer_Variables.Info.Pointer);
else
Tmp_Iter := Our_List.Iteronobject
(Our_List.Get_List_Of_Types, Type_Of_Variable);
Tmp_List := Our_List.Copy (Tmp_Iter.Info.Pointer);
Tmp_Iter := Our_List.Iter (Tmp_List);
while Our_List.More (Tmp_Iter) loop
Our_List.Destroy (Tmp_Iter.Info.Pointer);
Our_String.Free (A_String);
Our_String.Copy (A_String, Tmp_Iter.Info.The_Type);
if Our_String.Image (A_String) = "string" or
Our_String.Image (A_String) = "boolean" or
Our_String.Image (A_String) = "integer" or
Our_String.Image
(Our_List.Iteronobject (Our_List.Get_List_Of_Types,
Our_String.Image (A_String)).
Info.The_Type) = "enum" then
null;
else
Tmp_Iter2 := Our_List.Iteronobject
(Our_List.Get_List_Of_Types,
Our_String.Image (A_String));
Tmp_List2 := Our_List.Copy (Tmp_Iter2.Info.Pointer);
Tmp_Iter2 := Our_List.Iter (Tmp_List2);
while Our_List.More (Tmp_Iter2) loop
Our_List.Destroy (Tmp_Iter2.Info.Pointer);
Our_List.Forward (Tmp_Iter2);
end loop;
end if;
Our_List.Attach (Tmp_Iter.Info.Pointer, Tmp_List2);
Our_List.Forward (Tmp_Iter);
end loop;
Tmp := Our_List.Affect
(Our_String.Image (Tmp_String), Type_Of_Variable);
Our_List.Attach (List_Of_Variables, Tmp);
Pointer_Variables := Our_List.Tail (Pointer_Variables);
Our_List.Attach (Pointer_Variables.Info.Pointer, Tmp_List);
end if;
else
Text_Io.Put_Line (Type_Of_Variable & " not yet declared)");
end if;
end Complete_Variable_With_Type;
function Get_Type (Name_Of_List : Our_List.List; Name_Of_Variable : String)
return String is
Tmp_Iter : Our_List.Iter;
begin
Tmp_Iter := Our_List.Iteronobject (Name_Of_List, Name_Of_Variable);
return (Our_String.Image (Tmp_Iter.Info.The_Type));
end Get_Type;
function Get_Type (Name_Of_Variable : String) return String is
begin
return Get_Type (List_Of_Variables, Name_Of_Variable);
end Get_Type;
function Get_Value return String is
begin
return Our_String.Image (Current_Variable.Info.Value);
end Get_Value;
function Get_Value (Name_Of_List : Our_List.List; Name_Of_Variable : String)
return String is
Tmp_Iter : Our_List.Iter;
begin
Tmp_Iter := Our_List.Iteronobject (Name_Of_List, Name_Of_Variable);
return (Our_String.Image (Tmp_Iter.Info.Value));
end Get_Value;
function Get_Value (Name_Of_Variable : String) return String is
begin
return Get_Value (List_Of_Variables, Name_Of_Variable);
end Get_Value;
function Get_List_Of_Variables return Our_List.List is
begin
return List_Of_Variables;
end Get_List_Of_Variables;
procedure Printall_List_Of_Variables is
begin
Our_List.Printall (Our_List.Makelistiter (List_Of_Variables));
end Printall_List_Of_Variables;
procedure Init_Current_Variable (The_Variable : String) is
begin
Current_Variable := Our_List.Iteronobject
(List_Of_Variables, The_Variable);
Current_List := List_Of_Variables;
Var := Current_Variable;
end Init_Current_Variable;
procedure Set_Current_Variable1 (The_Variable : String) is
Tmp_Iter : Our_List.Iter;
begin
if Our_List.More (Our_List.Makelistiter
(Current_Variable.Info.Pointer)) then
Current_List := Current_Variable.Info.Pointer;
Tmp_Iter := Our_List.Iteronobject (Current_List, The_Variable);
Current_Variable := Tmp_Iter;
Var1 := Current_Variable;
end if;
end Set_Current_Variable1;
procedure Set_Current_Variable2 (The_Variable : String) is
Tmp_Iter : Our_List.Iter;
begin
if Our_List.More (Our_List.Makelistiter
(Current_Variable.Info.Pointer)) then
Current_List := Current_Variable.Info.Pointer;
Tmp_Iter := Our_List.Iteronobject (Current_List, The_Variable);
Current_Variable := Tmp_Iter;
end if;
end Set_Current_Variable2;
function Iter_On_Previous_Object
(The_List : Our_List.List; The_Name : String)
return Our_List.Iter is
I : Our_List.Iter;
begin
if Our_List.Isinlist (The_List, The_Name) then
I := Our_List.Makelistiter (The_List);
if Our_String.Image (I.Info.Name) = The_Name then
if Our_List.Isinlist (Var.Info.Pointer, The_Name) then
return Var;
elsif Our_List.Isinlist (Var1.Info.Pointer, The_Name) then
return Var1;
end if;
else
while not (Our_String.Image
(Our_List.Tail (Our_List.Makeiterlist (I)).
Info.Name) = The_Name) loop
Our_List.Forward (I);
end loop;
end if;
end if;
return I;
end Iter_On_Previous_Object;
procedure Affect_Value (The_Value : String) is
Tmp_Object : Our_List.Object;
Old_Iter : Our_List.Iter;
Previous_Iter : Our_List.Iter; Next_List : Our_List.List;
Old_Object_Name : Our_String.Variable_String;
begin
Our_String.Copy (Old_Object_Name, Current_Variable.Info.Name);
Old_Iter := Our_List.Iteronobject (Current_List,
Our_String.Image (Old_Object_Name));
Tmp_Object := Our_List.Affect
(Our_String.Image (Old_Iter.Info.Name),
Our_String.Image (Old_Iter.Info.The_Type), The_Value);
Previous_Iter := Iter_On_Previous_Object
(Current_List, Our_String.Image (Old_Object_Name));
if Our_List.Isinlist (Current_List,
Our_String.Image (Previous_Iter.Info.Name)) then
if Our_List.More (Our_List.Makelistiter
(Old_Iter.Info.Pointer)) then
Tmp_Object.Pointer := Old_Iter.Info.Pointer;
end if;
Previous_Iter.Next := null;
Our_List.Attach (Current_List, Tmp_Object);
if Our_List.More (Old_Iter) then
Next_List := Our_List.Tail (Our_List.Makeiterlist (Old_Iter));
Our_List.Attach (Current_List, Next_List);
end if;
--Text_Io.Put_Line
-- ("j affecte " & Our_String.Image (Previous_Iter.Next.Info.Name) &
-- " avec " & Our_String.Image (Previous_Iter.Next.Info.Value));
else
if Our_List.More (Our_List.Makelistiter
(Old_Iter.Info.Pointer)) then
Tmp_Object.Pointer := Old_Iter.Info.Pointer;
end if;
Previous_Iter.Info.Pointer := null;
Our_List.Attach (Previous_Iter.Info.Pointer, Tmp_Object);
if Our_List.More (Old_Iter) then
Next_List := Our_List.Tail (Our_List.Makeiterlist (Old_Iter));
Our_List.Attach (Previous_Iter.Info.Pointer, Next_List);
end if;
--Text_Io.Put_Line
-- ("j affecte " &
-- Our_String.Image (Previous_Iter.Info.Pointer.Info.Name) &
-- " avec " &
-- Our_String.Image (Previous_Iter.Info.Pointer.Info.Value));
end if;
end Affect_Value;
end Variables;
nblk1=e
nid=0
hdr6=1c
[0x00] rec0=1c rec1=00 rec2=01 rec3=04e
[0x01] rec0=11 rec1=00 rec2=0a rec3=05c
[0x02] rec0=17 rec1=00 rec2=03 rec3=038
[0x03] rec0=05 rec1=00 rec2=06 rec3=024
[0x04] rec0=11 rec1=00 rec2=05 rec3=026
[0x05] rec0=1a rec1=00 rec2=02 rec3=00e
[0x06] rec0=25 rec1=00 rec2=0c rec3=008
[0x07] rec0=06 rec1=00 rec2=0b rec3=004
[0x08] rec0=20 rec1=00 rec2=0d rec3=008
[0x09] rec0=13 rec1=00 rec2=04 rec3=00c
[0x0a] rec0=1f rec1=00 rec2=07 rec3=002
[0x0b] rec0=13 rec1=00 rec2=09 rec3=046
[0x0c] rec0=16 rec1=00 rec2=0e rec3=074
[0x0d] rec0=0e rec1=00 rec2=08 rec3=000
tail 0x2154674c6865b43ad5444 0x42a00088462060003