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

⟦87958b3b1⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, seg_0296e2

Derivation

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

E3 Source Code



WITH Messages;
WITH List_Generic;

PACKAGE Mailboxes IS

   -- This package defines an abstraction for defining and manipulating
   -- mailboxes that contain messages.


   SUBTYPE Sequence_Number IS Natural;
   -- A way to refer to a message in a mailbox by indicating its position.

   TYPE Mailbox IS PRIVATE;


   FUNCTION Make RETURN Mailbox;
   -- Returns an empty mailbox.

   PROCEDURE Add (Message : Messages.Message; The_Mailbox : IN OUT Mailbox);
   -- Adds a message to the end of a mailbox.  The "Read" flag for the new
   -- message is set to False.


   FUNCTION Last_Message (The_Mailbox : Mailbox) RETURN Sequence_Number;
   -- Returns the index of the last message in the mailbox.  0 iff no messages.


   FUNCTION Get_Message (Message : Sequence_Number; The_Mailbox : Mailbox)
                        RETURN Messages.Message;
   -- Returns the indicated message from the mailbox.


   FUNCTION Get_Read_Flag (Message : Sequence_Number; The_Mailbox : Mailbox)
                          RETURN Boolean;
   -- Returns the value of the "Read" flag from the indicated message.

   PROCEDURE Set_Read_Flag (Message     :        Sequence_Number;
                            New_Value   :        Boolean;
                            The_Mailbox : IN OUT Mailbox);
   -- Sets the "Read" flag for the indicated message to the value supplied.


   PROCEDURE Delete_Message (Message     :        Sequence_Number;
                             The_Mailbox : IN OUT Mailbox);
   -- Deletes the indicated message from the mailbox.


   Nonexistent_Sequence_Number : EXCEPTION;
   -- Raised if the Sequence_Number supplied to any of the above operations
   -- is > the number of messages in the mailbox.


PRIVATE
   TYPE Mailbox_Entry IS
      RECORD
         Read_Flag : Boolean;
         Message   : Messages.Message;
      END RECORD;
   PACKAGE Mailbox_List IS NEW List_Generic (Mailbox_Entry);
   TYPE Mailbox IS NEW Mailbox_List.List;
END Mailboxes;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=22 rec1=00 rec2=01 rec3=062
        [0x01] rec0=1b rec1=00 rec2=02 rec3=016
        [0x02] rec0=02 rec1=00 rec2=03 rec3=000
    tail 0x21722f9a683d36a83a287 0x489e0066482863001