TSTree— Ternary search tree as described by Bentley and Sedgewick.

The TSTree structure enables to map a key, an array of sequence of intptr_t values terminated by the designated stop value, to a intptr_t value.

struct TSTree_;
  //@args       Memory memory, intptr_t stop
TSTree_count— This TSTree count of entries.
int32_t
TSTree_count(const_TSTree this);
TSTree_search— Search the TSTree tree.
key
The array of intptr_t used as key.
Return
Mapped value if there, else NULL.
void *
TSTree_search(const_TSTree this, const intptr_t key[]);
TSTree_insert— Insert in the TSTree tree.
key
The array of intptr_t used as key.
value
The value to insert for key.
Return
NULL if key already there, else value.
void *
TSTree_insert(TSTree this, intptr_t key[], void *value);
TSTree_map— Map the TSTree entries using the supplied map function.
void
TSTree_map(TSTree this, void (*map)(intptr_t [], void *, va_list), ...);