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

⟦4c40c1a6c⟧ Ada Source

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

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 Error_File_Maker is


    procedure Open (Obj : in out Object;
                    Source_File_Name, Error_File_Name : in String) is
    begin
        if (Obj.Is_Opened) then
            raise File_Maker_Already_Opened;
        end if;  
        Text_Io.Open (Obj.Source_File, Text_Io.In_File, Source_File_Name);
        Text_Io.Create (Obj.Error_File, Text_Io.Out_File, Error_File_Name);
        Text_Io.Set_Line_Length (Obj.Error_File, 0);
        Obj.Is_Opened := True;
        Obj.Current_Written_Line := 0;
    end Open;


    procedure Copy_Line (Obj : in out Object) is
        C : Character;
        S : String (1 .. 150);  
        L : Natural;
    begin  
        Text_Io.Get_Line (Obj.Source_File, S, L);
        Text_Io.Put_Line (Obj.Error_File, Natural'Image (L) & S (1 .. L));
        Obj.Current_Written_Line := Obj.Current_Written_Line + 1;
    end Copy_Line;


    procedure Copy_To_Line (Obj : in out Object; Line_Number : in Ntural) is
    begin
        while (Obj.Current_Written_Line < Line_Number) loop
            Copy_Line (Obj);
        end loop;
    exception
        when Text_Io.End_Error =>
            null;
    end Copy_To_Line;


    procedure Copy_To_End (Obj : in out Object) is
    begin
        loop
            Copy_Line (Obj);
        end loop;
    exception
        when Text_Io.End_Error =>
            null;
    end Copy_To_End;


    procedure Highlight (Obj : in out Object; Column_Number : in Natural) is
    begin
        for Index in 1 .. Column_Number - 1 loop
            Text_Io.Put (Obj.Error_File, ' ');
        end loop;
        Text_Io.Put_Line (Obj.Error_File, "^");
    end Highlight;


    procedure Write (Obj : in out Object; Error_Text : in String) is
    begin
        Text_Io.Put_Line (Obj.Error_File, "*** " & Error_Text & " ***");
        Text_Io.New_Line (Obj.Error_File);
    end Write;


    procedure Close (Obj : in out Object) is
    begin
        if (not Obj.Is_Opened) then
            raise No_Opened_File_Maker;
        end if;
        Text_Io.Close (Obj.Source_File);
        Text_Io.Close (Obj.Error_File);
        Obj.Is_Opened := False;
    end Close;


end Error_File_Maker;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1e rec1=00 rec2=01 rec3=086
        [0x01] rec0=00 rec1=00 rec2=04 rec3=002
        [0x02] rec0=26 rec1=00 rec2=02 rec3=040
        [0x03] rec0=0c rec1=00 rec2=03 rec3=000
    tail 0x21545ae2286598a67e9c7 0x42a00088462060003