|
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: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body List_A, seg_0488d5
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io; package body List_A is type Cellule is record Value : Element; Previous, Next : Access_Cell; end record; Current_Cellule : Access_Cell; Free_Cellules : Access_Cell := null; Aux_Cellule : Access_Cell; function New_Cellule return Access_Cell is Result : Access_Cell; begin if Free_Cellules = null then Result := new Cellule; else Result := Free_Cellules; Free_Cellules := Free_Cellules.Next; end if; Result.Next := null; Result.Previous := null; return Result; end New_Cellule; procedure Old_Cellule (Old : Access_Cell) is begin Old.Next := Free_Cellules; Free_Cellules := Old; end Old_Cellule; procedure Insert (The_List : in out Object; X : in Element) is begin Current_Cellule := New_Cellule; Current_Cellule.Value := X; Current_Cellule.Previous := The_List.Last; Current_Cellule.Next := null; The_List.Last := Current_Cellule; if The_List.First = null then The_List.First := Current_Cellule; else Current_Cellule.Previous.Next := Current_Cellule; end if; end Insert; procedure Set_Current_Element (The_List : Object; X : in Element) is begin Current_Cellule.Value := X; end Set_Current_Element; function Get_Current_Element (The_List : Object) return Element is begin if not At_End (The_List) then return Current_Cellule.Value; end if; end Get_Current_Element; procedure Remove_Current_Element (The_List : in out Object) is begin if Current_Cellule = The_List.First then The_List.First := The_List.First.Next; if The_List.First = null then The_List.Last := null; end if; Old_Cellule (Current_Cellule); else Current_Cellule.Previous.Next := Current_Cellule.Next; if Current_Cellule.Next /= null then Current_Cellule.Next.Previous := Current_Cellule.Previous; else The_List.Last := Current_Cellule.Previous; end if; Old_Cellule (Current_Cellule); end if; Current_Cellule := The_List.First; end Remove_Current_Element; procedure Go_Previous (The_List : Object) is begin if Current_Cellule /= The_List.First then Current_Cellule := Current_Cellule.Previous; end if; end Go_Previous; procedure Go_Next (The_List : Object) is begin if not At_End (The_List) then Current_Cellule := Current_Cellule.Next; end if; end Go_Next; procedure Go_First (The_List : Object) is begin Current_Cellule := The_List.First; end Go_First; function At_End (The_List : Object) return Boolean is begin return Current_Cellule = null; end At_End; begin for I in 1 .. Nb_Preallocation_Cellule loop Aux_Cellule := New_Cellule; Aux_Cellule.Next := Free_Cellules; Free_Cellules := Aux_Cellule; end loop; end List_A;
nblk1=5 nid=0 hdr6=a [0x00] rec0=28 rec1=00 rec2=01 rec3=026 [0x01] rec0=00 rec1=00 rec2=05 rec3=004 [0x02] rec0=1d rec1=00 rec2=02 rec3=00c [0x03] rec0=1e rec1=00 rec2=03 rec3=032 [0x04] rec0=10 rec1=00 rec2=04 rec3=000 tail 0x21545d326865a3de1a8da 0x42a00088462060003