XCreateAssocTable()XCreateAssocTable()NameXCreateAssocTable – create a new association table (X10).
Synopsis
XAssocTable *XCreateAssocTable(size)
int size;
Arguments
size Specifies the number of buckets in the hashed association ta‐
ble.
Returns
The created association table.
DescriptionXCreateAssocTable() creates an association table, which allows you to
associate your own structures with X resources in a fast lookup table.
This function is provided for compatibility with X Version 10. To use
it you must include the file <X11/X10.h> and link with the library
-loldX.
The size argument specifies the number of buckets in the hash system of
XAssocTable. For reasons of efficiency the number of buckets should be
a power of two. Some size suggestions might be: use 32 buckets per
100 objects; a reasonable maximum number of object per buckets is 8.
If there is an error allocating memory for the XAssocTable, a NULL
pointer is returned.
For more information on association tables, see Volume One, Appendix B,
X10 Compatibility.
Structures
typedef struct {
XAssoc *buckets; /* pointer to first bucket in array */
int size; /* table size (number of buckets) */
} XAssocTable;
See AlsoXDeleteAssoc(), XDestroyAssocTable(), XLookUpAssoc(), XMakeAssoc().
Xlib - Association Tables XCreateAssocTable()