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

⟦f677e84bc⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Xlbp_Rm_Quark, seg_004f84

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 Xlbt_Arithmetic;  
use Xlbt_Arithmetic;  
with Xlbt_Display3;  
use Xlbt_Display3;  
with Xlbt_Rm3;  
use Xlbt_Rm3;  
with Xlbt_String;  
use Xlbt_String;

package Xlbp_Rm_Quark is
------------------------------------------------------------------------------
-- X Library Resource Manager - Quarks - Named constant strings
--
-- Xlbp_Rm_Quark - Manager of application/window/object resources
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
-- Copyright 1987 - 1989 by Digital Equipment Corporation, Maynard, Mass.
-- Copyright 1987 - 1989 by Massachusetts Institute of Technology,
--                          Cambridge, Massachusetts.
--
--                  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 names of Digital, MIT, or Rational
-- not be used in advertising or publicity pertaining to distribution of
-- the software without specific, written prior permission.
--
-- Digital, MIT, and Rational disclaim all warranties with regard to this
-- software, including all implied warranties of merchantability and fitness,
-- in no event shall Digital, MIT, or 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
    function X_Rm_Quark_To_String (Quark : X_Rm_Quark) return X_String;
------------------------------------------------------------------------------
--  Quark   - Specifies the quark whose string value is queried.
--
-- Returns the string corresponding to the Quark.  Returns "" for Quark values
-- obtained from X_Rm_Unique_Quarks.  Raises Constraint_Error if an
-- uninitialized Quark value is passed.
------------------------------------------------------------------------------

    function X_Rm_String_To_Quark  
                (Str      : X_String;  
                 Validate : Boolean := True) return X_Rm_Quark;
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Quark.
--             The string need not be null terminated.
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Quark value that has or which will now correspond to the
-- contents of the specified string.  If Validate is True, Constraint_Error
-- will be raised if any characters other than 'a'..'z', 'A'..'Z', '0'..'9',
-- '-', or '_' are present in the Str.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Quark (Str      :     X_String;  
                                    Ptr      : out X_String_Pointer;  
                                    Quark    : out X_Rm_Quark;  
                                    Validate :     Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Quark.
--             The string need not be null terminated.
--  Ptr      - Receives the string pointer stored in the quark map for Str
--  Quark    - Receives the Quark value representing Str
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Quark value that has or which will now correspond to the
-- contents of the specified string.  If Validate is True, Constraint_Error
-- will be raised if any characters other than 'a'..'z', 'A'..'Z', '0'..'9',
-- '-', or '_' are present in the Str.  Note: The Ptr value belongs to the Xlib
-- and it must not be freed by the application.
------------------------------------------------------------------------------

    function X_Rm_Quark_To_String_Pointer  
                (Quark : X_Rm_Quark) return X_String_Pointer;
------------------------------------------------------------------------------
--  Quark   - Specifies the quark whose string value is queried.
--
-- Returns the string corresponding to the Quark.  Returns "" for Quark values
-- obtained from X_Rm_Unique_Quarks.  Raises Constraint_Error if an
-- uninitialized Quark value is passed.  Note: This string belongs to the Xlib
-- and it must not be freed by the application.  Quarks generated by
-- X_Rm_Unique_Quark were not created with a string value and return
-- None_X_String_Pointer.
------------------------------------------------------------------------------

    procedure X_Rm_String_Pointer_To_Quark (Str      : in out X_String_Pointer;  
                                            Quark    : out    X_Rm_Quark;  
                                            Validate :        Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Quark.
--             The string need not be null terminated.
--  Quark    - Receives the quark value corresponding to the string.
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Quark value that has or which will now correspond to the
-- contents of the specified string.  If an some existing Quark has the same
-- string value then that quark, and that string pointer, will be returned.  If
-- no existing Quark has the same string value then a new Quark is created and
-- returned, and the X_String_Pointer String argument becomes the property of
-- the Xlib and must not be free by the appliation.  If Validate is True then
-- Constraint_Error will be raised if any characters other than 'a'..'z',
-- 'A'..'Z', '0'..'9', '-', or '_' are present in the String.
------------------------------------------------------------------------------

    generic  
        type Quark_Type is private;  
        None_Quark : in Quark_Type;  
        type Quark_Array_Type is array (S_Natural range <>) of Quark_Type;  
        with function String_To_Quark (Str      : X_String;  
                                       Validate : Boolean) return Quark_Type;  
    procedure X_Rm_String_To_Quark_List (Str  :     X_String;  
                                         List : out Quark_Array_Type);
------------------------------------------------------------------------------
--  Str     - Specifies a series of names separated by '.' or '*'.
--            The string need not be null terminated.  If an Ascii.Nul is
--            found then it is considered to be the "end" of the string.
--  List    - Receives a list of Quarks; terminated by a None_Quark.  The
--            list must be long enough.
--
-- Called with a string of the form ".name1.name2*name3" where the number
-- of names in the string must be at least one less than List'Length.
-- The initial separator is optional.
--
-- For each name in the list the corresponding Quark value is placed into
-- the Quarks list in the same order as the names appear in the Name string.
-- In Quarks, the quark corresponding to the last name will be followed by a
-- None_Quark entry.  (That is why List'Length > number of names.)
--
-- Will raise Constraint_Error if the Quarks list is too small.
------------------------------------------------------------------------------

    generic  
        type Quark_Type is private;  
        None_Quark : in Quark_Type;  
        type Quark_Array_Type is array (S_Natural range <>) of Quark_Type;  
        with function String_To_Quark (Str      : X_String;  
                                       Validate : Boolean) return Quark_Type;  
    procedure X_Rm_String_To_Binding_Quark_List  
                 (Str      :     X_String;  
                  Bindings : out X_Rm_Binding_Array;  
                  Quarks   : out Quark_Array_Type);
------------------------------------------------------------------------------
--  Str     - Specifies a series of names separated by '.' or '*'.
--            The string need not be null terminated.  If an Ascii.Nul is
--            found then it is considered to be the "end" of the string.
--  Bindings- Returns a list of binding values indicating '.' and '*'
--            separators for the Quarks list.
--  Quarks  - Returns a list of quarks; terminated by a None_Quark.  The
--            list must be long enough.
--
-- Called with a string of the form ".name1.name2*name3" where the number
-- of names in the string must be at least one less than Quarks'Length.  The
-- legal separators between the names are Ascii.'.' and Ascii.'*'.  Anything
-- that isn't Ascii.'.', Ascii.'*', or Ascii.Nul is taken to be part of a name.
-- The leading separator is optional, and if omitted '.' will be assumed.
--
-- For each name in the list the corresponding Quark value is placed into
-- the Quarks list in the same order as the names appear in the Name string.
-- In Quarks, the quark corresponding to the last name will be followed by a
-- None_Quark entry.  (That is why Quark'Length > number of names.)
--
-- For each entry in the Quarks list there is a Bindings entry.  The Binding
-- entry indicates that the name was preceded by a '.' (Bind_Tightly), by
-- a '*' (Bind_Loosely), or is the first name in the string (Bind_Tightly).
--
-- Will raise Constraint_Error if the Quarks or Bindings list is too small.
------------------------------------------------------------------------------

    function X_Rm_Unique_Quark return X_Rm_Quark;
------------------------------------------------------------------------------
-- Returns a unique quark that does not correspond to any particular string
-- value.
------------------------------------------------------------------------------

end Xlbp_Rm_Quark;  

E3 Meta Data

    nblk1=b
    nid=0
    hdr6=16
        [0x00] rec0=1a rec1=00 rec2=01 rec3=056
        [0x01] rec0=11 rec1=00 rec2=02 rec3=024
        [0x02] rec0=12 rec1=00 rec2=03 rec3=048
        [0x03] rec0=11 rec1=00 rec2=04 rec3=014
        [0x04] rec0=10 rec1=00 rec2=05 rec3=01c
        [0x05] rec0=10 rec1=00 rec2=06 rec3=03e
        [0x06] rec0=10 rec1=00 rec2=07 rec3=052
        [0x07] rec0=11 rec1=00 rec2=08 rec3=086
        [0x08] rec0=12 rec1=00 rec2=09 rec3=060
        [0x09] rec0=11 rec1=00 rec2=0a rec3=004
        [0x0a] rec0=0b rec1=00 rec2=0b rec3=000
    tail 0x21500963c819783518b36 0x42a00088462063203