DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦507d3017b⟧ TextFile

    Length: 1432 (0x598)
    Types: TextFile
    Names: »B«

Derivation

└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

package body Tiny_File is

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

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

    function Value (File_Input : in Text_Io.File_Type) return Character is
    begin
        return Current_Char;
    end Value;

    procedure Open (File_Input : in out Text_Io.File_Type; Name : in String) is
    begin
        Text_Io.Open (File_Input, Text_Io.In_File, Name);
        Look_Ahead := False;
    end Open;

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

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

end Tiny_File;