DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦a891178f1⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Memo_Stream, seg_04bb7c

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Document;
with Message_Transport;
with Identifier;
with Max;


package body Memo_Stream is

    function "=" (L, R : Message_Transport.Stream_Id) return Boolean
        renames Message_Transport."=";

    T : File;

    -- task Tx is
    --     entry Init;
    --     entry Add (Where : in Natural;
    --                Element : in Message_Transport.Stream_Id);
    --     entry Delete (Where : in Natural;
    --                   Element : in Message_Transport.Stream_Id);
    --     entry Search_S (Where : in Natural;
    --                     Element : out Message_Transport.Stream_Id);
    --     entry Search_N (What : in Message_Transport.Stream_Id;
    --                    Element : out Natural);
    --  end Tx;

    task body Tx is
        Val : Message_Transport.Stream_Id;
        Found : Boolean := False;
    begin  
        loop
            select


                accept Init do
                    for I in T.Value'Range loop
                        T.Value (I) := Val;
                    end loop;

                end Init;


            or
                accept Add (Where : in Natural;
                            Element : in Message_Transport.Stream_Id) do
                    T.Value (Where) := Element;
                end Add;


            or
                accept Delete (Where : in Natural;
                               Element : in Message_Transport.Stream_Id) do
                    T.Value (Where) := Val;
                end Delete;


            or
                accept Search_S (Where : in Natural;
                                 Element : out Message_Transport.Stream_Id) do
                    Element := T.Value (Where);
                end Search_S;

            or
                accept Search_N (What : in Message_Transport.Stream_Id;
                                 Element : out Natural) do
                    for I in T.Value'Range loop
                        if not Found then
                            if T.Value (I) = What then
                                Found := True;
                                Element := I;
                            end if;
                        end if;
                    end loop;  
                    if not Found then
                        raise Unknown;
                    end if;
                end Search_N;
            end select;
        end loop;
    end Tx;


end Memo_Stream;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=24 rec1=00 rec2=01 rec3=04e
        [0x01] rec0=01 rec1=00 rec2=04 rec3=04e
        [0x02] rec0=1f rec1=00 rec2=02 rec3=004
        [0x03] rec0=10 rec1=00 rec2=03 rec3=000
    tail 0x21548e00c8684693ae8ac 0x42a00088462060003