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

⟦804d08e5b⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Unix_Base_Types, seg_0520fa

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



--    The use of this system is subject to the software license terms and
--    conditions agreed upon between Rational and the Customer.
--
--                Copyright 1988, 1989, 1990 by Rational.
--
--                          RESTRICTED RIGHTS LEGEND
--
--    Use, duplication, or disclosure by the Government is subject to
--    restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
--    Technical Data and Computer Software clause at 52.227-7013.
--
--
--                Rational
--                3320 Scott Boulevard
--                Santa Clara, California 95054-3197
--
--   PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL;
--   USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION
--   IS STRICTLY PROHIBITED.  THIS MATERIAL IS PROTECTED AS
--   AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF
--   1976.  CREATED 1988, 1989, 1990.  ALL RIGHTS RESERVED.
--
--

with System;
with Unchecked_Conversion;

package Unix_Base_Types is

    --
    -- This package defines fundamental C and Unix data types.
    --
    -- Note:  This package is subject to change.
    --

    type Tiny_Integer is range -128 .. 127;
    for Tiny_Integer'Size use 1 * System.Storage_Unit;

    -- characters
    subtype Char is Tiny_Integer;
    subtype Unsigned_Char is Character;
    subtype U_Char is Unsigned_Char;
    subtype Uchar is Unsigned_Char;

    -- short integers
    subtype Short is Short_Integer;
    type Unsigned_Short is range 0 .. 2 ** 16 - 1;
    for Unsigned_Short'Size use 16;
    subtype U_Short is Unsigned_Short;
    subtype Ushort is Unsigned_Short;

    -- integers
    subtype Int is Integer;
    subtype Unsigned_Int is Integer;   -- Long_Integer range 0 .. 2 ** 32 - 1;
    subtype U_Int is Unsigned_Int;  
    subtype Uint is Unsigned_Int;
    subtype Unsigned is Unsigned_Int;

    -- long integers
    subtype Long is Integer;  
    subtype Unsigned_Long is Integer;  -- Long_Integer range 0 .. 2 ** 32 - 1;
    subtype U_Long is Unsigned_Long;

    -- pointers
    type Char_Ptr is access Character;
    type Int_Ptr is access Int;
    type Long_Ptr is access Long;

    -- arrays of pointers
    type Char_Ptrs is array (Natural range <>) of Char_Ptr;

    -- null pointers
    Null_Long_Ptr : constant Unix_Base_Types.Long_Ptr := null;
    Null_Char_Ptr : constant Unix_Base_Types.Char_Ptr := null;

    -- pointer conversion functions
    function To_Char_Ptr is new Unchecked_Conversion (System.Address, Char_Ptr);
    function To_Char_Ptr (Object : String) return Char_Ptr;
    function To_String (Object : Char_Ptr) return String;
    function To_Int_Ptr is new Unchecked_Conversion (System.Address, Int_Ptr);
    function To_Long_Ptr is new Unchecked_Conversion (System.Address, Long_Ptr);

    -- signals
    --
    -- The following signal definitions can be used in an interrupt handler
    -- pragma like this:
    --
    -- pragma Interrupt_Handler(
    --   Handler => Some_Handler,
    --   Vector  => System.To_Address( Unix_Base_Types.Sigint ) );
    --
    Sighup : constant := 1;    -- Hangup (Terminate)
    Sigint : constant := 2;    -- Interrupt (Terminate)
    Sigquit : constant := 3;   -- Quit (Terminate, Core)
    Sigill : constant := 4;    -- Illegal instruction (Terminate, Core, Noreset)
    Sigtrap : constant := 5;   -- Trace trap (Terminate, Core, Noreset)
    Sigabrt : constant := 6;   -- Software gen'd abort (Terminate, Core)
    Sigiot : constant := 6;    -- Software gen'd (Terminate, Core)
    Sigemt : constant := 7;    -- Software gen'd (Terminate, Core)
    Sigfpe : constant := 8;    -- Floating Point (Terminate, Core)
    Sigkill : constant := 9;   -- Kill (Terminate, Noignore, Nocatch, Nohold)
    Sigbus : constant := 10;   -- Buss error (Terminate, Core)
    Sigsegv : constant := 11;  -- Segmentation violation (Terminate, Core)
    Sigsys : constant := 12;   -- Bad arg to sys call (Terminate, Core)
    Sigpipe : constant := 13;  -- Pipe write w/o reader (Terminate)
    Sigalrm : constant := 14;  -- Alarm clock (Terminate)
    Sigterm : constant := 15;  -- Software termination (Terminate)
    Sigusr1 : constant := 16;  -- User sig (Terminate)
    Sigusr2 : constant := 17;  -- User sig (Terminate)
    Sigchld : constant := 18;  -- Death of child (Ignore)
    Sigcld : constant := 18;   -- Death of child (Ignore)
    Sigpwr : constant := 19;   -- Power fail (Noreset, Ignore)
    Sigvtalrm : constant := 20;-- Virtual timer (Terminate)
    Sigprof : constant := 21;  -- Profiling timer (Terminate)
    Sigio : constant := 22;    -- Async I/O (Ignore)
    Sigwindow : constant := 23;-- Window change or mouse (Itnore)
    Sigstop : constant := 24;  -- Stop (Noignore, Nocatch, Stop)
    Sigtstp : constant := 25;  -- Stop from keyboard (Stop)
    Sigcont : constant := 26;  -- Continue after stop (Nohold, Ignore)
    Sigttin : constant := 27;  -- Background read from cntl term (Stop)
    Sigttou : constant := 28;  -- Background write to cntl term (Stop)
    Sigurg : constant := 29;   -- Urgent data on I/O (Ignore)
    Siglost : constant := 30;  -- File lock lost in NFS (Terminate)

    -- The following data structures are built for access via the
    -- Signal_Info_Pointer parameter passed to an Ada signal handler.

    type Signal_Context is
        record
            Sc_Syscall : Unix_Base_Types.Int;           -- interrupted system
                                                        --   call if any
            Sc_Syscall_Action : Unix_Base_Types.Char;   -- what to do after
                                                        --   system call
            Sc_Pad1 : Unix_Base_Types.Char;
            Sc_Pad2 : Unix_Base_Types.Char;
            Sc_Onstack : Unix_Base_Types.Char;          -- sigstack state to
                                                        --   restore
            Sc_Mask : Unix_Base_Types.Int;              -- signal mask to
                                                        --   restore
            Sc_Sp : Unix_Base_Types.Int;                -- sp to restore
            Sc_Ps : Unix_Base_Types.Short;              -- ps to restore
            Sc_Pc : Unix_Base_Types.Int;                -- pc to restore
        end record;

    for Signal_Context use
        record
            Sc_Syscall at 0 range 0 .. 31;
            Sc_Syscall_Action at 4 range 0 .. 7;
            Sc_Pad1 at 5 range 0 .. 7;
            Sc_Pad2 at 6 range 0 .. 7;
            Sc_Onstack at 7 range 0 .. 7;
            Sc_Mask at 8 range 0 .. 31;
            Sc_Sp at 12 range 0 .. 31;
            Sc_Ps at 16 range 0 .. 15;
            Sc_Pc at 20 range 0 .. 31;
        end record;

    type Signal_Context_Pointer is access Signal_Context;
    type Signal_Info is
        record
            Number : Unix_Base_Types.Int;       -- signal number
            Code : Unix_Base_Types.Int;       -- code subselect
            Context : Signal_Context_Pointer;    -- pointer to signal context
        end record;

    for Signal_Info use
        record
            Number at 0 range 0 .. 31;
            Code at 4 range 0 .. 31;
            Context at 8 range 0 .. 31;
        end record;

    type Signal_Info_Pointer is access Signal_Info; -- passed to handler
end Unix_Base_Types;

E3 Meta Data

    nblk1=8
    nid=0
    hdr6=10
        [0x00] rec0=1d rec1=00 rec2=01 rec3=02a
        [0x01] rec0=21 rec1=00 rec2=02 rec3=048
        [0x02] rec0=1a rec1=00 rec2=03 rec3=00c
        [0x03] rec0=11 rec1=00 rec2=04 rec3=046
        [0x04] rec0=10 rec1=00 rec2=05 rec3=03a
        [0x05] rec0=12 rec1=00 rec2=06 rec3=02e
        [0x06] rec0=18 rec1=00 rec2=07 rec3=01e
        [0x07] rec0=0d rec1=00 rec2=08 rec3=000
    tail 0x21759952e87a05cbfdd76 0x42a00088462060003