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

⟦48480d980⟧ Ada Source

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

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



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;

    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=3
    hdr6=6
        [0x00] rec0=1f rec1=00 rec2=01 rec3=060
        [0x01] rec0=22 rec1=00 rec2=04 rec3=05e
        [0x02] rec0=17 rec1=00 rec2=02 rec3=000
        [0x03] rec0=02 rec1=c3 rec2=9a rec3=142
    tail 0x2152e95fe84d99ddc4244 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 00 00 1b 80 01 3b 01 00 00 00 00 0e 65 6e 64  ┆      ;      end┆