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

⟦6b4ddd48a⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Gui_Interface, seg_00d1ee

Derivation

└─⟦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 System;
with Text_Io;
with Unchecked_Conversion;
package body Gui_Interface is

    procedure Set_Date_Label_C (C_Date : System.Address);
    pragma Interface (C, Set_Date_Label_C);
    pragma Linkname (Set_Date_Label_C, "SetDateLabel");

    procedure Set_Message_C (C_Message : System.Address);
    pragma Interface (C, Set_Message_C);
    pragma Linkname (Set_Message_C, "SetMessage");

    procedure Set_Dialog_C (C_Dialog : System.Address);
    pragma Interface (C, Set_Dialog_C);
    pragma Linkname (Set_Dialog_C, "SetDialog");

    function Get_Dialog_C return System.Address;
    pragma Interface (C, Get_Dialog_C);
    pragma Linkname (Get_Dialog_C, "GetDialog");

    function Iter_Done_C return Integer;
    pragma Interface (C, Iter_Done_C);
    pragma Linkname (Iter_Done_C, "IterDone");


    type String_Access is access String;

    function System_Address_To_String_Access is
       new Unchecked_Conversion (Source => System.Address,
                                 Target => String_Access);

    function System_Address_To_Integer is
       new Unchecked_Conversion (Source => System.Address, Target => Integer);


    procedure Set_Date_Label (Date : String) is
        C_Date : constant String := Date & Ascii.Nul;
    begin
        Set_Date_Label_C (C_Date => C_Date (C_Date'First)'Address);
    end Set_Date_Label;

    procedure Set_Message (Message : String) is
        C_Message : constant String := Message & Ascii.Nul;
    begin
        Set_Message_C (C_Message => C_Message (C_Message'First)'Address);
    end Set_Message;

    procedure Set_Dialog (Dialog : String) is
        C_Dialog : constant String := Dialog & Ascii.Nul;
    begin
        Set_Dialog_C (C_Dialog => C_Dialog (C_Dialog'First)'Address);
    end Set_Dialog;

    function Get_Dialog return String is
        -- Start_Address : System.Address := Get_Dialog_C;
        --
        -- String_Ptr : String_Access :=
        --    System_Address_To_String_Access (Start_Address);
        --
        subtype Dialog is String (1 .. 1024);
        D : Dialog := Dialog'(others => ' ');
        I : Integer := Dialog'First;
    begin
        -- Text_Io.Put_Line ("Get_Dialog: start_address = " &
        --                   Integer'Image (System_Address_To_Integer
        --                                     (Start_Address)));
        Gui_Interface.Iter_Init;
        while not Gui_Interface.Iter_Done loop
            D (I) := Gui_Interface.Iter_Value;
            I := I + 1;
            --Text_Io.Put_Line ("Iter_Value = " & Gui_Interface.Iter_Value);
            Gui_Interface.Iter_Next;
        end loop;
        -- Text_Io.Put_Line ("Get_Dialog: s(s'first) = " & S (S'First));
        return D (1 .. I - 1);
    end Get_Dialog;


    function Iter_Done return Boolean is
    begin
        if Iter_Done_C = 1 then
            return True;
        else
            return False;
        end if;
    end Iter_Done;

end Gui_Interface;

E3 Meta Data

    nblk1=6
    nid=2
    hdr6=8
        [0x00] rec0=1f rec1=00 rec2=01 rec3=072
        [0x01] rec0=1c rec1=00 rec2=05 rec3=050
        [0x02] rec0=1b rec1=00 rec2=04 rec3=030
        [0x03] rec0=05 rec1=00 rec2=06 rec3=000
        [0x04] rec0=06 rec1=00 rec2=02 rec3=000
        [0x05] rec0=01 rec1=00 rec2=03 rec3=000
    tail 0x2170a086a821010ae09e0 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 03 00 a1 80 17 67 3a 20 63 31 20 3d 20 2a 22  ┆      g: c1 = *"┆
  0x3: 0000  00 00 00 0e 80 08 74 65 72 66 61 63 65 3b 08 00  ┆      terface;  ┆