|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 15360 (0x3c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Xlbt_Univ_Ptr, seg_004f48
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Unchecked_Deallocation; with Xlbt_Arithmetic; use Xlbt_Arithmetic; package Xlbt_Univ_Ptr is ------------------------------------------------------------------------------ -- X Library Machine Types -- -- Xlbt_Univ_Ptr - Machine/Compiler dependent universal-pointer interface ------------------------------------------------------------------------------ -- Copyright 1989 - 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. ------------------------------------------------------------------------------ --\x0c ------------------------------------------------------------------------------ -- X_Pointer_Signature - Unique numeric ID's ------------------------------------------------------------------------------ type X_Pointer_Signature is private; None_X_Pointer_Signature : constant X_Pointer_Signature; ------------------------------------------------------------------------------ -- X_Universal_Pointer - a runtime typed data pointer (access type) ------------------------------------------------------------------------------ type X_Universal_Pointer is private; None_X_Universal_Pointer : constant X_Universal_Pointer; type X_Universal_Pointer_Array is array (S_Positive range <>) of X_Universal_Pointer; type X_Universal_Pointer_List is access X_Universal_Pointer_Array; --/ if Enable_Deallocation then pragma Enable_Deallocation (X_Universal_Pointer_List); --/ end if; None_X_Universal_Pointer_List : constant X_Universal_Pointer_List := null; procedure Free_X_Universal_Pointer_List (List : in out X_Universal_Pointer_List); --\x0c function X_Universal_Pointer_Signature (Ptr : X_Universal_Pointer) return X_Pointer_Signature; ------------------------------------------------------------------------------ -- Ptr - Specifies the X_Universal_Pointer to use -- -- Called to obtain the X_Poiner_Signature value for the specified universal -- pointer value. -- -- Raises X_Invalid_Universal_Pointer if -- a) Ptr = None_X_Universal_Pointer, or, -- b) Ptr is a freed universal pointer value (this may or may not be -- detectable for all implementations and some other implementation -- specific exception may be raised instead). ------------------------------------------------------------------------------ function X_Equal_Signature (Ptr1 : X_Universal_Pointer; Ptr2 : X_Universal_Pointer) return Boolean; function X_Equal_Signature (Ptr : X_Universal_Pointer; Sig : X_Pointer_Signature) return Boolean; function X_Equal_Signature (Sig1 : X_Pointer_Signature; Sig2 : X_Pointer_Signature) return Boolean; -------------------------------------------------------------------------- -- Returns TRUE if a) either value is None or b) the signature valu of the -- first parameter is the same as the signature value for the second parameter. ------------------------------------------------------------------------------ generic type Data_Type is limited private; type Access_Type is access Data_Type; with procedure Free_Access_Type (Acc : in out Access_Type); package X_Universal_Pointer_Conversion is function To_X_Universal_Pointer (Ptr : Access_Type) return X_Universal_Pointer; ------------------------------------------------------------------------------ -- Ptr - Specifies the Access_Type value to "convert" -- -- Use this to exchange an Access_Type value for a universal pointer value. -- The universal pointer may be used any number of times to retrieve the -- same Access_Type value. Please note that if the Access_Type value is -- freed then the universal pointer value becomes a "dangling pointer" and -- it should be freed as well. -- -- Returns None_X_Universal_Pointer if Ptr = null. -- -- May raise implementation-specific exceptions in obscure cases, e.g. type is -- not fully elaborated yet (on systems that are capable of detecting it), or, -- Storage_Error (on systems that implement this package by allocating storage). -- -- Note: On some systems this allocates heap storage. Be sure to use the -- Free_X_Universal_Pointer routine on all pointer values when they are no -- longer required. This will prevent storage loss. ------------------------------------------------------------------------------ function From_X_Universal_Pointer (Ptr : X_Universal_Pointer) return Access_Type; ------------------------------------------------------------------------------ -- Ptr - Specifies the universal pointer to "convert" -- -- Use this to exchange a universal pointer for the Access_Type value that was -- used initially to create the universal pointer value. -- -- Returns null if Ptr = None_X_Universal_Pointer. -- -- Raises X_Invalid_Universal_Pointer if -- a) Ptr = None_X_Universal_Pointer, or, -- b) the universal pointer value does not correspond to a value of this -- Access_Type (the signature is different), or, -- c) Ptr is a freed universal pointer value (this may or may not be -- detectable for all implementations and some other implementation -- specific exception may be raised instead). -- -- Note: On some systems universal pointers are implemented by allocating heap -- storage. Be sure to use the Free_X_Universal_Pointer routine on all pointer -- values when they are no longer required. This will prevent storage loss. ------------------------------------------------------------------------------ procedure Free_X_Universal_Pointer (Ptr : in out X_Universal_Pointer); function Free_X_Universal_Pointer (Ptr : X_Universal_Pointer) return Access_Type; ---------------------------------------------------------------------------- -- Ptr - Specifies the universal pointer value to be freed -- -- Called to free a universal pointer value when it is no longer needed. -- The functional version also returns the access value associated with the -- universal pointer. -- -- These are called to deallocate the universal pointer value (especially -- important if it was allocated upon the heap). These routines do *not* -- deallocate the Access_Type value and they do *not* reference the value -- of the Access_Type in any way. An Access_Type value and the associated -- universal pointer value can be freed in any order. -- -- Raises X_Invalid_Universal_Pointer if -- a) Ptr = None_X_Universal_Pointer, or, -- b) the universal pointer value does not correspond to a value of this -- Access_Type (the signature is different), or, -- c) Ptr is a freed universal pointer value (this may or may not be -- detectable for all implementations and some other implementation -- specific exception may be raised instead). ------------------------------------------------------------------------------ procedure Free_Both_X_Universal_Pointer (Ptr : in out X_Universal_Pointer); ----------------------------------------------------------------------------- -- Ptr - Specifies the universal pointer value to be freed -- -- Called to free a universal pointer value and the associated access value -- when they are no longer needed. -- -- This routine deallocates the Access_Type value as well. It should not be -- called if the access value is to be, or was already, deallocated separately. -- -- Raises X_Invalid_Universal_Pointer if -- a) Ptr = None_X_Universal_Pointer, or, -- b) the universal pointer value does not correspond to a value of this -- Access_Type (the signature is different), or, -- c) Ptr is a freed universal pointer value (this may or may not be -- detectable for all implementations and some other implementation -- specific exception may be raised instead). ------------------------------------------------------------------------------ end X_Universal_Pointer_Conversion; --\x0c private type X_Pointer_Signature is record First : S_Long; Second : S_Long; end record; None_X_Pointer_Signature : constant X_Pointer_Signature := (S_Long'First, S_Long'First); type X_Universal_Pointer_Rec; type X_Universal_Pointer is access X_Universal_Pointer_Rec; --/ if Enable_Deallocation then pragma Enable_Deallocation (X_Universal_Pointer); --/ end if; None_X_Universal_Pointer : constant X_Universal_Pointer := null; end Xlbt_Univ_Ptr;
nblk1=e nid=0 hdr6=1c [0x00] rec0=19 rec1=00 rec2=01 rec3=018 [0x01] rec0=12 rec1=00 rec2=02 rec3=07e [0x02] rec0=1b rec1=00 rec2=03 rec3=03c [0x03] rec0=00 rec1=00 rec2=0e rec3=002 [0x04] rec0=11 rec1=00 rec2=04 rec3=086 [0x05] rec0=00 rec1=00 rec2=0d rec3=002 [0x06] rec0=15 rec1=00 rec2=05 rec3=006 [0x07] rec0=00 rec1=00 rec2=0c rec3=004 [0x08] rec0=13 rec1=00 rec2=06 rec3=024 [0x09] rec0=12 rec1=00 rec2=07 rec3=03a [0x0a] rec0=00 rec1=00 rec2=0b rec3=002 [0x0b] rec0=12 rec1=00 rec2=08 rec3=07a [0x0c] rec0=14 rec1=00 rec2=09 rec3=042 [0x0d] rec0=1c rec1=00 rec2=0a rec3=000 tail 0x2150095c8819781bf7905 0x42a00088462063203