|
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 - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body S_Generic_List, seg_05467e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io; package body S_Generic_List is function Make (X : Element; L : S_List) return S_List is begin return S_List (My_List.Make (X, My_List.List (L))); end Make; function Nil return S_List is begin return S_List (My_List.Nil); end Nil; function Is_Empty (L : S_List) return Boolean is begin return My_List.Is_Empty (My_List.List (L)); end Is_Empty; procedure Free (L : in out S_List) is begin My_List.Free (My_List.List (L)); end Free; function First (L : S_List) return Element is begin return My_List.First (My_List.List (L)); end First; function Rest (L : S_List) return S_List is begin return S_List (My_List.Rest (My_List.List (L))); end Rest; procedure Set_Rest (L : S_List; To_Be : S_List) is begin My_List.Set_Rest (L => My_List.List (L), To_Be => My_List.List (To_Be)); end Set_Rest; procedure Set_First (L : S_List; To_Be : Element) is begin My_List.Set_First (L => My_List.List (L), To_Be => To_Be); end Set_First; function Length (L : S_List) return Natural is begin return My_List.Length (My_List.List (L)); end Length; procedure Init (Iter : out S_Iterator; L : S_List) is begin My_List.Init (My_List.Iterator (Iter), My_List.List (L)); end Init; procedure Next (Iter : in out S_Iterator) is begin My_List.Next (My_List.Iterator (Iter)); end Next; function Value (Iter : S_Iterator) return Element is begin return My_List.Value (My_List.Iterator (Iter)); end Value; function Done (Iter : S_Iterator) return Boolean is begin return My_List.Done (My_List.Iterator (Iter)); end Done; function Is_In (Wanted_Elem : Element; L : S_List) return Boolean is Iter : S_Iterator; begin Init (Iter => Iter, L => L); while not Done (Iter) loop exit when Value (Iter) = Wanted_Elem; Next (Iter); end loop; Text_Io.Put_Line ("dans is_in_next apres boucle"); if Done (Iter) then Text_Io.Put_Line ("fin is_in_next avec false"); return False; end if; Next (Iter); Text_Io.Put_Line ("fin is_in_next avec true"); return True; end Is_In; procedure Modify (Element_To_Modify, Element_After : Element; L : in out S_List) is New_List : S_List; Temp : Element; Already_Found : Boolean := False; begin if Is_In (Element_To_Modify, L) then while not Is_Empty (L) loop Temp := First (L); L := Rest (L); if Temp = Element_To_Modify and not Already_Found then New_List := Make (Element_After, New_List); Already_Found := True; else New_List := Make (Temp, New_List); end if; end loop; L := New_List; Free (New_List); end if; end Modify; procedure Put_First (X : Element; L : in out S_List) is Ok : Boolean := False; Temp, Found : Element; New_List : S_List; begin while not Is_Empty (L) loop Temp := First (L); L := Rest (L); if Temp /= X then New_List := Make (Temp, New_List); else if Ok = False then Ok := True; Found := Temp; end if; end if; end loop; if Ok = True then New_List := Make (Found, New_List); end if; L := New_List; Free (New_List); end Put_First; procedure Remove (X : Element; L : in out S_List) is begin Put_First (X, L); L := Rest (L); end Remove; end S_Generic_List;
nblk1=5 nid=0 hdr6=a [0x00] rec0=2b rec1=00 rec2=01 rec3=096 [0x01] rec0=28 rec1=00 rec2=02 rec3=00a [0x02] rec0=1e rec1=00 rec2=03 rec3=026 [0x03] rec0=21 rec1=00 rec2=04 rec3=022 [0x04] rec0=0e rec1=00 rec2=05 rec3=000 tail 0x2175d7bec87b88440e14a 0x42a00088462060003