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

⟦852e5748b⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Tiny_File, seg_0386d6, seg_038d24, seg_039567

Derivation

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

E3 Source Code



package body Tiny_File is

    Current_Char : Character;
    Look_Ahead : Boolean := False;

    procedure Open (The_File : in out Text_Io.File_Type;
                    With_Name : String;
                    Input_Mode : Boolean := True) is
    begin
        if Input_Mode then
            Text_Io.Open (The_File, Text_Io.In_File, With_Name);
        else
            Text_Io.Open (The_File, Text_Io.Out_File, With_Name);
        end if;
        Look_Ahead := False;
    end Open;

    procedure Create (The_File : in out Text_Io.File_Type;
                      With_Name : String;
                      Output_Mode : Boolean := True) is
    begin
        if Output_Mode then
            Text_Io.Create (The_File, Text_Io.Out_File, With_Name);
        else
            Text_Io.Create (The_File, Text_Io.In_File, With_Name);
        end if;
    end Create;

    function Get (The_File : Text_Io.File_Type) return Character is
    begin
        if Look_Ahead then
            Look_Ahead := False;
        else
            if At_End (The_File) then
                Current_Char := Ascii.Eot;
            else
                if Text_Io.End_Of_Line (The_File) then
                    Text_Io.Skip_Line (The_File);
                    Current_Char := Ascii.Cr;
                else
                    Text_Io.Get (The_File, Current_Char);
                end if;
            end if;
        end if;
        return Current_Char;
    end Get;

    procedure Unget (The_File : Text_Io.File_Type) is
    begin
        Look_Ahead := True;
    end Unget;

    procedure Put (The_File : Text_Io.File_Type; The_Char : Character) is
    begin
        Text_Io.Put (The_File, The_Char);
    end Put;

    procedure Put (The_File : Text_Io.File_Type; The_String : String) is
    begin
        Text_Io.Put (The_File, The_String);
    end Put;

    procedure Put_Line (The_File : Text_Io.File_Type; The_String : String) is
    begin
        Text_Io.Put_Line (The_File, The_String);
    end Put_Line;

    procedure Set_Col (The_File : Text_Io.File_Type; To : Natural) is
    begin
        Text_Io.Set_Col (The_File, Text_Io.Positive_Count (To));
    end Set_Col;

    procedure Set_Line (The_File : Text_Io.File_Type; To : Natural) is
    begin
        Text_Io.Set_Line (The_File, Text_Io.Positive_Count (To));
    end Set_Line;

    procedure New_Line (The_File : Text_Io.File_Type; Spacing : Natural := 1) is
    begin
        Text_Io.New_Line (The_File, Text_Io.Positive_Count (Spacing));
    end New_Line;

    function At_End (The_File : Text_Io.File_Type) return Boolean is
    begin
        if Look_Ahead then
            return False;
        else
            return Text_Io.End_Of_File (The_File);
        end if;
    end At_End;

    procedure Close (The_File : in out Text_Io.File_Type) is
    begin
        Text_Io.Close (The_File);
    end Close;

end Tiny_File;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=20 rec1=00 rec2=01 rec3=020
        [0x01] rec0=20 rec1=00 rec2=03 rec3=098
        [0x02] rec0=22 rec1=00 rec2=04 rec3=012
        [0x03] rec0=01 rec1=00 rec2=02 rec3=000
    tail 0x21531934a84e767b9a025 0x42a00088462060003