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

⟦70edf14b3⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Output_Stream, seg_02ccc2, seg_02cf19

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



with Text_Io;
package body Output_Stream is

    type Object_Structure is
        record
            File        : Text_Io.File_Type;  
            Column      : Positive := 1;
            Indentation : Integer  := 1;
        end record;

    The_Standard_Output : Object := new Object_Structure;

    function Normalised (S : String) return String is
        Start    : Integer := S'First;
        Stop     : Integer := S'Last;
        No_Blank : Boolean;
    begin
        for I in S'First .. S'Last loop  
            Start := I;
            exit when S (I) /= ' ';
        end loop;

        for I in Start .. S'Last loop
            exit when S (I) = ' ';
            Stop := I;
        end loop;
        return S (Start .. Stop);
    end Normalised;

    function Standard_Output return Object is
    begin
        return The_Standard_Output;
    end Standard_Output;

    procedure Open (The_Object : in out Object; Name : String) is
    begin
        raise Not_Implemented;
    end Open;

    procedure Align (To_Col : Positive; The_Object : Object) is
    begin
        The_Object.Column := To_Col;
    end Align;


    procedure Indent (Count : Integer; The_Object : Object) is
    begin
        The_Object.Indentation := The_Object.Indentation + Count;
        if The_Object.Indentation <= 1 then
            The_Object.Indentation := 1;
        end if;
        The_Object.Column := The_Object.Indentation;
    end Indent;

    procedure Indent_Right (The_Object : Object) is
    begin
        Indent (+2, The_Object);
    end Indent_Right;

    procedure Indent_Left (The_Object : Object) is
    begin
        Indent (-2, The_Object);
    end Indent_Left;

    procedure Put (B : Boolean; To : Object) is
    begin
        Put (Normalised (Boolean'Image (B)), To);
    end Put;


    procedure Put (C : Character; To : Object) is
    begin
        Put ("" & C, To);
    end Put;


    procedure Put (I : Integer; To : Object) is
    begin
        Put (Normalised (Integer'Image (I)), To);
    end Put;

    procedure Put (S : String; To : Object) is
    begin  
        Text_Io.Set_Col (To.File, Text_Io.Positive_Count (To.Column));
        Text_Io.Put (To.File, S);
        To.Column := To.Column + S'Length;
    end Put;


    procedure New_Line (To : Object; Count : Positive := 1) is
    begin
        Text_Io.New_Line (To.File, Text_Io.Positive_Count (Count));
        To.Column := To.Indentation;
    end New_Line;

    procedure Put_Line (B : Boolean; To : Object) is
    begin
        Put (B, To);
        New_Line (To);
    end Put_Line;

    procedure Put_Line (C : Character; To : Object) is
    begin
        Put (C, To);
        New_Line (To);
    end Put_Line;

    procedure Put_Line (I : Integer; To : Object) is
    begin
        Put (I, To);
        New_Line (To);
    end Put_Line;

    procedure Put_Line (S : String; To : Object) is
    begin
        Put (S, To);
        New_Line (To);
    end Put_Line;
begin
    Text_Io.Open (File => The_Standard_Output.File,
                  Mode => Text_Io.Out_File,
                  Name => Text_Io.Name (Text_Io.Standard_Output));
end Output_Stream;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=25 rec1=00 rec2=01 rec3=006
        [0x01] rec0=26 rec1=00 rec2=05 rec3=00e
        [0x02] rec0=0a rec1=00 rec2=04 rec3=008
        [0x03] rec0=25 rec1=00 rec2=02 rec3=032
        [0x04] rec0=03 rec1=00 rec2=03 rec3=000
    tail 0x215254994840c439118e9 0x42a00088462063c03