NAME
XrmQuarkToString — convert a quark to a string.
SYNOPSIS
char ∗XrmQuarkToString(quark)
XrmQuark quark;
ARGUMENTS
quarkSpecifies the quark for which the equivalent string is desired.
RETURNS
The string.
DESCRIPTION
XrmQuarkToString() returns the string for which the specified quark is serving as a shorthand symbol. The quark was earlier set to represent the string by XrmStringToQuark(). The string pointed to by the return value must not be modified or freed, because that string is in the data structure used by the resource manager for assigning quarks. If no string exists for that quark, XrmQuarkToString() returns NULL.
Since the resource manager needs to make many comparisons of strings when it gets data from the database, it is more efficient to convert these strings into quarks, and to compare quarks instead. Since quarks are represented by integers, comparing quarks is trivial.
The three #define statements in the Structures section provide an extra level of abstraction. They define macros so that names, classes and representations can also be represented as quarks.
For more information, see Volume One, Chapter 11, Managing User Preferences.
STRUCTURES
typedef int XrmQuark;
/∗ macro definitions from <X11/Xresource.h> ∗/
#define XrmNameToString(name) XrmQuarkToString(name) #define XrmClassToString(class) XrmQuarkToString(class) #define XrmRepresentationToString(type) XrmQuarkToString(type)
SEE ALSO
XrmDestroyDatabase(), XrmGetFileDatabase(), XrmGetResource(), XrmGetStringDatabase(), XrmInitialize(), XrmMergeDatabases(), XrmParseCommand(), XrmPutFileDatabase(), XrmPutLineResource(), XrmPutResource(), XrmPutStringResource(), XrmQGetResource(), XrmQGetSearchList(), XrmQGetSearchResource(), XrmQPutResource(), XrmQPutStringResource(), XrmStringToBindingQuarkList(), XrmStringToQuarkList(), XrmStringToQuark(), XrmUniqueQuark().
Xlib Reference Manual