|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Contrat_Storage, seg_057b3e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
with String_Map_Generic;
with Set_Generic;
package body Contrat_Storage is
Max : constant := 100;
package Contrat_Set is new Set_Generic (Natural);
package H_Code is new String_Map_Generic
(Size => Max, Range_Type => Contrat_Set.Set);
Contrat_Table : H_Code.Map;
Set_Id : Contrat_Set.Set;
procedure Add (Contrat : V_Content; Id : Natural) is
Success : Boolean := False;
begin
H_Code.Find (Contrat_Table, String_Var_To_String (Contrat),
Set_Id, Success);
Contrat_Set.Add (Set_Id, Id);
H_Code.Define (Contrat_Table, String_Var_To_String (Contrat), Set_Id);
end Add;
procedure Delete (Contrat : V_Content; Id : Natural) is
Success : Boolean;
begin
H_Code.Find (Contrat_Table, String_Var_To_String (Contrat),
Set_Id, Success);
if Success then
Contrat_Set.Delete (Set_Id, Id);
H_Code.Define (Contrat_Table,
String_Var_To_String (Contrat), Set_Id);
end if;
end Delete;
procedure Delete (Id : Natural) is
Success : Boolean;
Iter : H_Code.Iterator;
begin
H_Code.Init (Iter, Contrat_Table);
while not H_Code.Done (Iter) loop
Contrat_Storage.Delete
(String_To_String_Var (H_Code.Value (Iter)), Id);
H_Code.Next (Iter);
end loop;
end Delete;
function Search (Contrat : V_Content; Place : Natural) return Natural is
Temp : Natural;
Success : Boolean := False;
Iter : Contrat_Set.Iterator;
I : Natural := 1;
begin
H_Code.Find (Contrat_Table, String_Var_To_String (Contrat),
Set_Id, Success);
if Success then
Contrat_Set.Init (Iter, Set_Id);
while (I /= Place and not (Contrat_Set.Done (Iter))) loop
Contrat_Set.Next (Iter);
I := I + 1;
end loop;
if Contrat_Set.Done (Iter) then
Temp := 0;
else
Temp := Contrat_Set.Value (Iter);
end if;
return Temp;
end if;
end Search;
begin
H_Code.Initialize (Contrat_Table);
end Contrat_Storage;
nblk1=4
nid=4
hdr6=6
[0x00] rec0=1f rec1=00 rec2=01 rec3=03e
[0x01] rec0=1e rec1=00 rec2=03 rec3=05c
[0x02] rec0=11 rec1=00 rec2=02 rec3=000
[0x03] rec0=01 rec1=00 rec2=03 rec3=001
tail 0x21764df3487ce7f036dee 0x42a00088462060003
Free Block Chain:
0x4: 0000 00 00 00 30 80 29 74 65 20 28 43 6f 6e 74 72 61 ┆ 0 )te (Contra┆