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

⟦86fc00161⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Generic_File_Table, seg_021204

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 Calendar;
with Directory;
with Polymorphic_Io;
generic
    type Element_Type is private;
    -- Table entry type

    with function Match (Element1 : Element_Type; Element2 : Element_Type)
                        return Boolean;
    -- Function to be used to match an entry in the table

    with function Is_Empty (Element : Element_Type) return Boolean;
    -- Function that determines if an entry is empty or not

    with procedure Print_Element (Element : Element_Type);
    -- Procedure to print out an entry in the table
package Generic_File_Table is
    -- Supports file table operations using the polymorphic_io
    -- package.

    type Handle        is new Polymorphic_Io.Handle;
    type File_Position is new Polymorphic_Io.File_Position;
    type Mode          is (Read, Write, Read_Write);

    Open_Error, Close_Error : exception;
    Operation_Error         : exception;

    procedure Open (The_Handle : in out Handle; Name : String; The_Mode : Mode);
    -- Open a file table and pass back the handle.

    function First return File_Position;
    -- Returns the first position in the file

    procedure Lookup (The_Handle         :     Handle;
                      Element_To_Match   :     Element_Type;
                      Element_From_File  : out Element_Type;
                      Element_Position   : out File_Position;
                      Next_Free_Position : out File_Position);
    -- Look up a given element in the file table. Pass back the
    -- file position of the element and also the next free
    -- entry in the table.

    procedure Update (The_Handle   : Handle;
                      The_Element  : Element_Type;
                      The_Position : File_Position);
    -- Write out the given element at the given file position
    -- in the file table

    function Is_Nil (The_Position : File_Position) return Boolean;
    -- Returns true if the file position is an invalid one

    procedure Close (File : in out Handle);
    -- Close the file table

    procedure Dump (The_Handle : Handle);
    -- Print out all the entries of the file table using
    -- the print element procedure that has been supplied
end Generic_File_Table;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1d rec1=00 rec2=01 rec3=086
        [0x01] rec0=01 rec1=00 rec2=04 rec3=010
        [0x02] rec0=17 rec1=00 rec2=02 rec3=02c
        [0x03] rec0=07 rec1=00 rec2=03 rec3=001
    tail 0x2151cb002838d6b508b98 0x42a00088462065003