DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦5ac55847a⟧ TextFile

    Length: 1753 (0x6d9)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─ ⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦4c85d69e2⟧ 
                └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦9b477e385⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦9b477e385⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦9b477e385⟧ 
            └─⟦this⟧ 

TextFile

package body Queue_Generic is

    procedure Initialize (Q : out Queue) is
    begin
        null;
    end Initialize;

    function Is_Empty (Q : Queue) return Boolean is
    begin
        return Q.Head = null;
    end Is_Empty;

    procedure Make_Empty (Q : in out Queue) is
    begin
        Q.Head := null;
        Q.Tail := null;
    end Make_Empty;

    procedure Init (Iter : out Iterator; Q : Queue) is
    begin
        Iter := Iterator (Q);
    end Init;

    procedure Next (Iter : in out Iterator) is
    begin
        Iter.Head := Iter.Head.Link;
    end Next;

    function Value (Iter : Iterator) return Element is
    begin
        return Iter.Head.Value;
    end Value;

    function Done (Iter : Iterator) return Boolean is
    begin
        return Iter.Head = null;
    end Done;

    procedure Copy (Target : in out Queue; Source : Queue) is
        Iter : Iterator;
    begin
        Make_Empty (Target);
        Init (Iter, Source);
        while not Done (Iter) loop
            Add (Target, Value (Iter));
            Next (Iter);
        end loop;
    end Copy;

    procedure Add (Q : in out Queue; X : Element) is
        New_Node : constant Pointer := new Node'(X, null);
    begin
        if Q.Head = null then
            Q.Head := New_Node;
        else
            Q.Tail.Link := New_Node;
        end if;
        Q.Tail := New_Node;
    end Add;

    procedure Delete (Q : in out Queue) is
        First : constant Pointer := Q.Head;
    begin
        Q.Head     := First.Link;
        First.Link := null;
        if Q.Head = null then
            Q.Tail := null;
        end if;
    end Delete;

    function First (Q : Queue) return Element is
    begin
        return Q.Head.Value;
    end First;

end Queue_Generic;