DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦045a3f94b⟧ TextFile

    Length: 10284 (0x282c)
    Types: TextFile
    Names: »V«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

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.
------------------------------------------------------------------------------

--\f

    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;