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

⟦29f184ae8⟧ TextFile

    Length: 27783 (0x6c87)
    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_Rm;  
use Xlbt_Rm;  
with Xlbt_String;  
use Xlbt_String;

with Xlbp_Rm_Quark;  
use Xlbp_Rm_Quark;

pragma Elaborate (Xlbp_Rm_Quark);

package Xlbp_Rm_Name is
------------------------------------------------------------------------------
-- X Library Resource Manager - Classes, Names, Representations
--
-- Xlbp_Rm_Name - Manager of application/window/object resource names
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
-- Copyright 1987 - 1988 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

------------------------------------------------------------------------------
-- Resource Manager Classes
------------------------------------------------------------------------------

    function X_Rm_Class_To_String (Class : X_Rm_Class) return X_String;
------------------------------------------------------------------------------
--  Class   - Specifies the Class whose string value is queried.
--
-- Returns the string corresponding to the Class.  Returns "" for Class values
-- obtained from X_Rm_Unique_Class.  Raises Constraint_Error if an
-- uninitialized Class value is passed.
------------------------------------------------------------------------------

    function X_Rm_String_To_Class  
                (Str      : X_String;  
                 Validate : Boolean := True) return X_Rm_Class;
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Class.
--             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 Class 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_Class (Str      :     X_String;  
                                    Ptr      : out X_String_Pointer;  
                                    Class    : out X_Rm_Class;  
                                    Validate :     Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Class.
--             The string need not be null terminated.
--  Ptr      - Receives the string pointer stored in the Class map for Str
--  Class    - Receives the Class value representing Str
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Class 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_Class_To_String_Pointer  
                (Class : X_Rm_Class) return X_String_Pointer;
------------------------------------------------------------------------------
--  Class   - Specifies the Class whose string value is queried.
--
-- Returns the string corresponding to the Class.  Returns "" for Class values
-- obtained from X_Rm_Unique_Class.  Raises Constraint_Error if an
-- uninitialized Class value is passed.  Note: This string belongs to the Xlib
-- and it must not be freed by the application.  Classes generated by
-- X_Rm_Unique_Class were not created with a string value and return
-- None_X_String_Pointer.
------------------------------------------------------------------------------

    procedure X_Rm_String_Pointer_To_Class (Str      : in out X_String_Pointer;  
                                            Class    : out    X_Rm_Class;  
                                            Validate :        Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Class.
--             The string need not be null terminated.
--  Class    - Receives the new Class
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Class value that has or which will now correspond to the
-- contents of the specified string.  If an some existing Class has the same
-- string value then that Class, and that string pointer, will be returned.  If
-- no existing Class has the same string value then a new Class is created and
-- returned, and the X_String_Pointer Str 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 Str.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Class_List is  
       new X_Rm_String_To_Quark_List (X_Rm_Class,  
                                      None_X_Rm_Class,  
                                      X_Rm_Class_Array,  
                                      X_Rm_String_To_Class);
------------------------------------------------------------------------------
--  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 classes; terminated by a None_X_Rm_Class.  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.  Any
-- character that is not an Ascii.'.', and Ascii.'*', or an Ascii.Nul is
-- taken to be part of a name.  Illegal characters in component names
-- will cause Constraint_Error to be raised.
--
-- For each name in the list the corresponding Class value is placed into
-- the class list in the same order as the names appear in the Name string.
-- In List, the Class corresponding to the last name will be followed by a
-- None_X_Rm_Class entry.  (That is why List'Length > number of names.)
--
-- Names are separated by one or more dots.  The leading separator is
-- optional.
--
-- Will raise Constraint_Error if the class list is too small.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Binding_Class_List is  
       new X_Rm_String_To_Binding_Quark_List (X_Rm_Class,  
                                              None_X_Rm_Class,  
                                              X_Rm_Class_Array,  
                                              X_Rm_String_To_Class);
------------------------------------------------------------------------------
--  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- Receives a list of binding values indicating '.' and '*'
--            separators for the class list.
--  List    - Receives a list of classes; terminated by a None_X_Rm_Class.  The
--            list must be long enough.
--
-- Called with a string of the form "name1.name2*name3.name4" where the number
-- of names in the string must be at least one less than Min( List'Length,
-- Bindings'Length+1 ).  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.
--
-- For each name in the list the corresponding Class value is placed into
-- the class list in the same order as the names appear in the Name string.
-- In List, the Class corresponding to the last name will be followed by a
-- None_X_Rm_Class entry.  (That is why List'Length > number of names.)
--
-- For each entry in the List 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 List or Bindings array is too
-- small, or if Name contains illegal characters.
------------------------------------------------------------------------------

    function X_Rm_Unique_Class return X_Rm_Class;
------------------------------------------------------------------------------
-- Returns a unique Class that does not correspond to any particular string
-- value.
------------------------------------------------------------------------------

--\f

------------------------------------------------------------------------------
-- Resource Manager Names
------------------------------------------------------------------------------

    function X_Rm_Name_To_String (Str : X_Rm_Name) return X_String;
------------------------------------------------------------------------------
--  Str  - Specifies the Name whose string value is queried.
--
-- Returns the string corresponding to the Name.  Returns "" for Name values
-- obtained from X_Rm_Unique_Name.  Raises Constraint_Error if an
-- uninitialized Name value is passed.
------------------------------------------------------------------------------

    function X_Rm_String_To_Name (Str      : X_String;  
                                  Validate : Boolean := True) return X_Rm_Name;
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Name.
--            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 Name 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_Name (Str      :     X_String;  
                                   Ptr      : out X_String_Pointer;  
                                   Name     : out X_Rm_Name;  
                                   Validate :     Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Name.
--             The string need not be null terminated.
--  Ptr      - Receives the string pointer stored in the Name map for Str
--  Name    - Receives the Name value representing Str
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Name 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_Name_To_String_Pointer  
                (Name : X_Rm_Name) return X_String_Pointer;
------------------------------------------------------------------------------
--  Str - Specifies the Name whose string value is queried.
--
-- Returns the string corresponding to the Name.  Returns "" for Name values
-- obtained from X_Rm_Unique_Name.  Raises Constraint_Error if an
-- uninitialized Name value is passed.  Note: This string belongs to the Xlib
-- and it must not be freed by the application.  Names generated by
-- X_Rm_Unique_Name were not created with a string value and return
-- None_X_String_Pointer.
------------------------------------------------------------------------------

    procedure X_Rm_String_Pointer_To_Name (Str      : in out X_String_Pointer;  
                                           Name     : out    X_Rm_Name;  
                                           Validate :        Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Name.
--             The string need not be null terminated.
--  Name     - Receives the new Name
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Name value that has or which will now correspond to the
-- contents of the specified string.  If an some existing Name has the same
-- string value then that Name, and that string pointer, will be returned.  If
-- no existing Name has the same string value then a new Name is created and
-- returned, and the X_String_Pointer Str 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 Str.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Name_List is  
       new X_Rm_String_To_Quark_List (X_Rm_Name,  
                                      None_X_Rm_Name,  
                                      X_Rm_Name_Array,  
                                      X_Rm_String_To_Name);
------------------------------------------------------------------------------
--  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 names; terminated by a None_X_Rm_Name.  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.  Any
-- character that is not an Ascii.'.', Ascii.'*', or an Ascii.Nul is
-- taken to be part of a name.  Illegal characters in component names
-- will cause Constraint_Error to be raised.
--
-- For each name in the list the corresponding Name value is placed into
-- the names list in the same order as the names appear in the Name string.
-- In List, the Name corresponding to the last name will be followed by a
-- None_X_Rm_Name entry.  (That is why List'Length > number of names.)
--
-- The leading separator is optional.
--
-- Will raise Constraint_Error if the names list is too small.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Binding_Name_List is  
       new X_Rm_String_To_Binding_Quark_List (X_Rm_Name,  
                                              None_X_Rm_Name,  
                                              X_Rm_Name_Array,  
                                              X_Rm_String_To_Name);
------------------------------------------------------------------------------
--  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- Receives a list of binding values indicating '.' and '*'
--            separators for the Names list.
--  List    - Receives a list of Names; terminated by a None_X_Rm_Name.  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 Min( List'Length,
-- Bindings'Length+1 ).  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.
--
-- For each name in the list the corresponding Name value is placed into
-- the names list in the same order as the names appear in the Name string.
-- In List, the Name corresponding to the last name will be followed by a
-- None_X_Rm_Name entry.  (That is why List'Length > number of names.)
--
-- For each entry in the names 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 List or Bindings array is too
-- small or if Name contains illegal characters.
------------------------------------------------------------------------------

    function X_Rm_Unique_Name return X_Rm_Name;
------------------------------------------------------------------------------
-- Returns a unique name that does not correspond to any particular string
-- value.
------------------------------------------------------------------------------

--\f

------------------------------------------------------------------------------
-- Resource Manager Representations
------------------------------------------------------------------------------

    function X_Rm_Representation_To_String (Rep : X_Rm_Representation)  
                                           return X_String;
------------------------------------------------------------------------------
--  Rep     - Specifies the representation whose string value is queried.
--
-- Returns the string corresponding to the Representation.  Returns "" for
-- Representation values obtained from X_Rm_Unique_Representation.  Raises
-- Constraint_Error if an uninitialized Representation value is passed.
------------------------------------------------------------------------------

    function X_Rm_String_To_Representation (Str      : X_String;  
                                            Validate : Boolean := True)  
                                           return X_Rm_Representation;
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Representation.
--            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 Representation 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_Representation  
                 (Str            :     X_String;  
                  Ptr            : out X_String_Pointer;  
                  Representation : out X_Rm_Representation;  
                  Validate       :     Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Representation.
--             The string need not be null terminated.
--  Ptr      - Receives the string pointer stored in the Representation map for Str
--  Representation    - Receives the Representation value representing Str
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Representation 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_Representation_To_String_Pointer  
                (Representation : X_Rm_Representation) return X_String_Pointer;
------------------------------------------------------------------------------
--  Representation   - Specifies the Representation whose string value is
--                      queried.
--
-- Returns the string corresponding to the Representation.  Returns "" for
-- Representation values obtained from X_Rm_Unique_Representation.  Raises
-- Constraint_Error if an uninitialized Representation value is passed.
-- Note: This string belongs to the Xlib and it must not be freed by the
-- application.  Representationes generated by X_Rm_Unique_Representation
-- were not created with a string value and return None_X_String_Pointer.
------------------------------------------------------------------------------

    procedure X_Rm_String_Pointer_To_Representation  
                 (Str            : in out X_String_Pointer;  
                  Representation : out    X_Rm_Representation;  
                  Validate       :        Boolean := True);
------------------------------------------------------------------------------
--  Str      - Specifies the string value being converted to a Representation.
--             The string need not be null terminated.
--  Representation - Receives the Representation value
--  Validate - Specifies whether or not the Str must be a valid
--             Component Name as defined by the Resource Manager.
--
-- Returns the Representation value that has or which will now correspond to
-- the contents of the specified string.  If an some existing Representation
-- has the same string value then that Representation, and that string pointer,
-- will be returned.  If no existing Representation has the same string value
-- then a new Representation is created and returned, and the X_String_Pointer
-- Str 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 Str.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Representation_List is  
       new X_Rm_String_To_Quark_List (X_Rm_Representation,  
                                      None_X_Rm_Representation,  
                                      X_Rm_Representation_Array,  
                                      X_Rm_String_To_Representation);
------------------------------------------------------------------------------
--  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 Representations; terminated by a
--            None_X_Rm_Representation.  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.  Any
-- character that is not an Ascii.'.', Ascii.'*', or an Ascii.Nul is
-- taken to be part of a name.  Illegal characters in component names
-- will cause Constraint_Error to be raised.
--
-- For each name in the list the corresponding Representation value is placed
-- into the representation list in the same order as the names appear in the
-- Name string.  In List, the Representation corresponding to the last name
-- will be followed by a None_X_Rm_Representation entry.  (That is why
-- List'Length > number of names.)
--
-- The leading separator is optional.
--
-- Will raise Constraint_Error if the List list is too small.
------------------------------------------------------------------------------

    procedure X_Rm_String_To_Binding_Representation_List is  
       new X_Rm_String_To_Binding_Quark_List (X_Rm_Representation,  
                                              None_X_Rm_Representation,  
                                              X_Rm_Representation_Array,  
                                              X_Rm_String_To_Representation);
------------------------------------------------------------------------------
--  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- Receives a list of binding values indicating '.' and '*'
--            separators for the Reps list.
--  List    - Receives a list of Representations; terminated by a
--            None_X_Rm_Representation.  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 Min( List'Length,
-- Bindings'Length+1 ).  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.
--
-- For each name in the list the corresponding Representation value is placed
-- into the representation list in the same order as the names appear in the
-- Name string.  In List, the Representation corresponding to the last name
-- will be followed by a None_X_Rm_Representation entry.  (That is why
-- List'Length > number of names.)
--
-- For each entry in the representation 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).
-- The leading separator is optional.
--
-- Will raise Constraint_Error if the List or Bindings array is too
-- small, or if Name contains illegal characters.
------------------------------------------------------------------------------

    function X_Rm_Unique_Representation return X_Rm_Representation;
------------------------------------------------------------------------------
-- Returns a unique Representation that does not correspond to any particular
-- string value.
------------------------------------------------------------------------------

--\f

end Xlbp_Rm_Name;