|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 7120 (0x1bd0)
Types: TextFile
Names: »V«
└─⟦bad92a95e⟧ Bits:30000535 8mm tape, Rational 1000, RPC 1_0_2
└─⟦bb34fe6e2⟧ »DATA«
└─⟦15d8b76c6⟧
└─⟦this⟧
-- 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.
--
-- characters
subtype Char is Short_Short_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 18 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;