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

⟦648222e09⟧ TextFile

    Length: 2938 (0xb7a)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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;