Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ CreaAsscTab(3X) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XCreateAssocTable — create a new association table (X10). 

SYNOPSIS

XAssocTable ∗XCreateAssocTable(size) int size;

ARGUMENTS

sizeSpecifies the number of buckets in the hashed association table. 

RETURNS

The created association table. 

DESCRIPTION

XCreateAssocTable() 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 XAssoc­Table.  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 ALSO

XDeleteAssoc(), XDestroyAssocTable(), XLookUpAssoc(), XMakeAssoc(). 

Xlib Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026