typedef XrmHashTable *XrmSearchList;

Bool XrmQGetSearchList(database, names, classes, list_return, list_length)
     XrmDatabase database;
     XrmNameList names;
     XrmClassList classes;
     XrmSearchList list_return;
     int list_length;


database Specifies the database that is to be used.
names Specifies a list of resource names.
classes Specifies a list of resource classes.
list_return Returns a search list for further use. The caller must allocate sufficient space for the list before calling XrmQGetSearchList().
list_length Specifies the number of entries (not the byte size) allocated for list_return.


The XrmQGetSearchList() function takes a list of names and classes and returns a list of database levels where a match might occur. The returned list is in best-to-worst order and uses the same algorithm as XrmGetResource() for determining precedence. If list_return was large enough for the search list, XrmQGetSearchList() returns True; otherwise, it returns False.

The size of the search list that the caller must allocate is dependent upon the number of levels and wildcards in the resource specifiers that are stored in the database. The worst case length is %3 sup n%, where \fIn\fP is the number of name or class components in names or classes.

When using XrmQGetSearchList() followed by multiple probes for resources with a common name and class prefix, only the common prefix should be specified in the name and class list to XrmQGetSearchList().

See also

XrmGetResource(), XrmInitialize(), XrmMergeDatabases(), XrmPutResource(), XrmQGetResource(), XrmQGetSearchResource(), XrmUniqueQuark(), "Looking Up Resources".
Christophe Tronche, [email protected]