|
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: 4096 (0x1000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Comps_Dictionary, seg_048fd0, seg_049397
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧ └─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Binary_Trees_Pkg, Bounded_String, Text_Io; use Bounded_String; package body Comps_Dictionary is Lower : constant Integer := -1; Equal : constant Integer := 0; Upper : constant Integer := 1; -- ---------------------------------------------------- -- Definition des fonctions pour le paquetage generique -- ---------------------------------------------------- function Compare (A, B : Comp) return Integer is begin if Image (A.Name) < Image (B.Name) then return Lower; else if Image (A.Name) = Image (B.Name) then return Equal; else return Upper; end if; end if; end Compare; procedure Write (Scr : Comp) is begin Text_Io.Put_Line ("Name -> " & Image (Scr.Name)); end Write; procedure Show is new Comps_Tree.Visit (Write); -- ------------------------------------------- -- Definition des fontions de Comps_Dictionary -- ------------------------------------------- procedure Create (Dict : in out Object) is begin Dict.Root := Comps_Tree.Create; end Create; procedure Destroy (Dict : in out Object) is begin Comps_Tree.Destroy (Dict.Root); end Destroy; procedure Add_New (New_Comp : String; Dict : Object) is Tmp_Comp : Comp; begin Bounded_String.Free (Tmp_Comp.Name); Bounded_String.Copy (Tmp_Comp.Name, New_Comp); Comps_Tree.Insert (Tmp_Comp, Dict.Root); exception when Comps_Tree.Duplicate_Value => raise Duplicate_Value; end Add_New; function Exist (Scan_Comp : String; Dict : Object) return Boolean is Tmp_Comp : Comp; begin Bounded_String.Free (Tmp_Comp.Name); Bounded_String.Copy (Tmp_Comp.Name, Scan_Comp); return Comps_Tree.Is_Found (Tmp_Comp, Dict.Root); end Exist; procedure Dump (Dict : Object) is begin Show (Dict.Root, Comps_Tree.Inorder); end Dump; end Comps_Dictionary;
nblk1=3 nid=0 hdr6=6 [0x00] rec0=27 rec1=00 rec2=01 rec3=00a [0x01] rec0=23 rec1=00 rec2=02 rec3=072 [0x02] rec0=0b rec1=00 rec2=03 rec3=001 tail 0x2174d4d56865b3da111c2 0x42a00088462060003