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

⟦c81dd8b3e⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Hello_World, seg_004f3a

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



with Text_Io;

with Xlbt_Arithmetic;  
use Xlbt_Arithmetic;  
with Xlbt_Basic;  
use Xlbt_Basic;  
with Xlbt_Event;  
use Xlbt_Event;  
with Xlbt_Graphics;  
use Xlbt_Graphics;  
with Xlbt_Hint;  
use Xlbt_Hint;  
with Xlbt_String;  
use Xlbt_String;  
with Xlbt_Visual;  
use Xlbt_Visual;  
with Xlbt_Window;  
use Xlbt_Window;

with Xlbp_Display;  
use Xlbp_Display;  
with Xlbp_Event;  
use Xlbp_Event;  
with Xlbp_Graphics;  
use Xlbp_Graphics;  
with Xlbp_Hint;  
use Xlbp_Hint;  
with Xlbp_Window;  
use Xlbp_Window;

procedure Hello_World (Display : String := "") is
------------------------------------------------------------------------------
-- Copyright 1990 - 1991 by Rational, Santa Clara, California.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
------------------------------------------------------------------------------

    Dpy        : X_Display;  
    Size_Hints : X_Size_Hints;  
    Wm_Hints   : X_Wm_Hints              := None_X_Wm_Hints;  
    Class_Hint : X_Class_Hint            := None_X_Class_Hint;  
    Success    : X_Status;  
    Window     : X_Window;  
    Attr       : X_Set_Window_Attributes;  
    Mask       : X_New_Window_Attributes := None_X_New_Window_Attributes;  
    Error      : X_Error_String;  
    Screen     : X_Screen_Number;  
    Event      : X_Event;

begin

    X_Open_Display (X_Display_Name (To_X_String (Display)), Dpy, Error);  
    if Dpy = null then  
        Text_Io.Put_Line (To_String (Err (Error)));  
        raise Program_Error;  
    end if;

    Size_Hints.Flags (U_S_Position) := True;  
    Size_Hints.Flags (U_S_Size)     := True;  
    Size_Hints.Width                := 300;  
    Size_Hints.Height               := 300;  
    Size_Hints.X                    := 300;  
    Size_Hints.Y                    := 300;

    Screen := X_Default_Screen (Dpy);

    Attr.Background_Pixel  := X_White_Pixel (Dpy, Screen);  
    Mask (Cw_Back_Pixel)   := True;  
    Attr.Border_Pixel      := X_Black_Pixel (Dpy, Screen);  
    Mask (Cw_Border_Pixel) := True;

    Attr.Event_Mask      :=  
       X_Event_Mask'  
          (Button_Press_Mask | Exposure_Mask | Visibility_Change_Mask => True,  
           others => False);  
    Mask (Cw_Event_Mask) := True;

    Window := X_Create_Window  
                 (Dpy, X_Root_Window (Dpy, Screen),  
                  S_Short (Size_Hints.X), S_Short (Size_Hints.Y),  
                  U_Short (Size_Hints.Width), U_Short (Size_Hints.Height),  
                  4, 0, Input_Output, Copy_From_Parent_Visual, Mask, Attr);

    X_Set_Wm_Properties (Dpy, Window, "Quick Test", "", (1 .. 0 => null),  
                         Size_Hints, Wm_Hints, Class_Hint, Success);

    X_Map_Window (Dpy, Window);

    loop

        Xlbp_Event.X_Next_Event (Dpy, Event);  
        case Event.Kind is

            when Button_Press =>  
                exit;

            when Expose | Visibility_Notify =>  
                X_Draw_Lines  
                   (Dpy,  
                    Window.Drawable,  
                    X_Default_Gc (Dpy, Screen),  
                    (1 => (100, 100),  
                     2 => (100, 100),  
                     3 => (0, -100),  
                     4 => (-100, 100),  
                     5 => (150, -50),  
                     6 => (-150, -50)),  
                    Coord_Mode_Previous);

            when others =>  
                null;

        end case;  
    end loop;

end Hello_World;  

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=28 rec1=00 rec2=01 rec3=044
        [0x01] rec0=11 rec1=00 rec2=02 rec3=01c
        [0x02] rec0=00 rec1=00 rec2=07 rec3=042
        [0x03] rec0=1c rec1=00 rec2=03 rec3=05e
        [0x04] rec0=05 rec1=00 rec2=06 rec3=006
        [0x05] rec0=1b rec1=00 rec2=04 rec3=054
        [0x06] rec0=10 rec1=00 rec2=05 rec3=000
    tail 0x2150095b081978109fc4b 0x42a00088462063203