NAME

XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark, XrmQuarkToString, XrmStringToQuarkList, XrmStringToBindingQuarkList - manipulate resource quarks

SYNTAX

XrmQuark XrmUniqueQuark(void);

#define XrmStringToName(string) XrmStringToQuark(string)
#define XrmStringToClass(string) XrmStringToQuark(string)
#define XrmStringToRepresentation(string) XrmStringToQuark(string) int XrmQuark XrmStringToQuark(char *_s_t_r_i_n_g); XrmQuark XrmPermStringToQuark(char *_s_t_r_i_n_g);

#define XrmStringToName(string) XrmStringToQuark(string)
#define XrmStringToClass(string) XrmStringToQuark(string)
#define XrmStringToRepresentation(string) XrmStringToQuark(string) XrmQuark XrmStringToQuark(char *_s_t_r_i_n_g); XrmQuark XrmPermStringToQuark(char *_s_t_r_i_n_g);

#define XrmNameToString(name) XrmQuarkToString(name)
#define XrmClassToString(class) XrmQuarkToString(class)
#define XrmRepresentationToString(type) XrmQuarkToString(type) char *XrmQuarkToString(XrmQuark _q_u_a_r_k);

#define XrmStringToNameList(str, name) XrmStringToQuarkList((str), (name))
#define XrmStringToClassList(str,class) XrmStringToQuarkList((str), (class))

void XrmStringToQuarkList(char *_s_t_r_i_n_g, XrmQuarkList _q_u_a_r_k_s___r_e_t_u_r_n); XrmStringToBindingQuarkList(char *_s_t_r_i_n_g, XrmBindingList _b_i_n_d_i_n_g_s___r_e_t_u_r_n, XrmQuarkList _q_u_a_r_k_s___r_e_t_u_r_n);

ARGUMENTS

_b_i_n_d_i_n_g_s___r_e_t_u_r_n Returns the binding list.
_q_u_a_r_k Specifies the quark for which the equivalent string is desired.
_q_u_a_r_k_s___r_e_t_u_r_n Returns the list of quarks.
_s_t_r_i_n_g Specifies the string for which a quark or quark list is to be allocated.

DESCRIPTION

The _X_r_m_U_n_i_q_u_e_Q_u_a_r_k function allocates a quark that is guaranteed not to represent any string that is known to the resource manager.

These functions can be used to convert from string to quark representation. If the string is not in the Host Portable Character Encoding, the conversion is implementation-dependent. The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k need not be permanently allocated storage. _X_r_m_P_e_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k is just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is permitted to assume the string argument is permanently allocated, and, hence, that it can be used as the value to be returned by _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.

For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-NULL value, all future calls will return the same value (identical address).

These functions can be used to convert from quark representation to string. The string pointed to by the return value must not be modified or freed. The returned string is byte-for-byte equal to the original string passed to one of the string-to-quark routines. If no string exists for that quark, _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns NULL. For any given quark, if _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns a non-NULL value, all future calls will return the same value (identical address).

These functions can be used to convert from string to quark representation. If the string is not in the Host Portable Character Encoding, the conversion is implementation-dependent. The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k need not be permanently allocated storage. _X_r_m_P_e_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k is just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is permitted to assume the string argument is permanently allocated, and, hence, that it can be used as the value to be returned by _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.

For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-NULL value, all future calls will return the same value (identical address).

The _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k_L_i_s_t function converts the null-terminated string (generally a fully qualified name) to a list of quarks. The caller must allocate sufficient space for the quarks list before calling _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k_L_i_s_t. Note that the string must be in the valid ResourceName format (see section 15.1). If the string is not in the Host Portable Character Encoding, the conversion is implementation-dependent.

A binding list is a list of type _X_r_m_B_i_n_d_i_n_g_L_i_s_t and indicates if components of name or class lists are bound tightly or loosely (that is, if wildcarding of intermediate components is specified).


typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;


_X_r_m_B_i_n_d_T_i_g_h_t_l_y indicates that a period separates the components, and _X_r_m_B_i_n_d_L_o_o_s_e_l_y indicates that an asterisk separates the components.

The _X_r_m_S_t_r_i_n_g_T_o_B_i_n_d_i_n_g_Q_u_a_r_k_L_i_s_t function converts the specified string to a binding list and a quark list. The caller must allocate sufficient space for the quarks list and the binding list before calling _X_r_m_S_t_r_i_n_g_T_o_B_i_n_d_i_n_g_Q_u_a_r_k_L_i_s_t. If the string is not in the Host Portable Character Encoding the conversion is implementation-dependent. Component names in the list are separated by a period or an asterisk character. If the string does not start with period or asterisk, a period is assumed. For example, ``*a.b*c'' becomes:


quarks a       b      c
bindings       loose  tightloose


SEE ALSO

XrmGetResource(3X11), XrmInitialize(3X11), XrmMergeDatabases(3X11), XrmPutResource(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e