|
Data Structures |
| struct | st_entry |
| struct | st_bin |
| struct | _search_table |
Defines |
| #define | WOVEC_DFLT 10 |
| | Default size of word-vectors.
|
| #define | MASK_LETTER(x) (1 << (x)) |
| | bits 0 to 25
|
| #define | MASK_DIGIT 0x80000000 |
| #define | ST_MIN_BIN_SIZE 4 |
Functions |
| void | destroy_entry (struct st_entry *entry) |
| void | bin_initialize (struct st_bin *bin, gint size) |
| | Initialize a bin.
|
| st_bin * | bin_allocate (void) |
| | Allocate a bin.
|
| void | bin_destroy (struct st_bin *bin) |
| | Destroy a bin.
|
| void | bin_insert_item (struct st_bin *bin, struct st_entry *entry) |
| | Inserts an item into a bin.
|
| void | bin_compact (struct st_bin *bin) |
| | Makes a bin take as little memory as needed.
|
| void | setup_map (void) |
| void | st_initialize (search_table_t *table) |
| | Initialize permanent data in search table.
|
| search_table_t * | st_alloc (void) |
| | Allocates a new search_table_t.
|
| void | st_free (search_table_t **ptr) |
| void | st_create (search_table_t *table) |
| | Recreate variable parts of the search table.
|
| void | st_destroy (search_table_t *table) |
| | Destroy a search table.
|
| guint32 | mask_hash (const gchar *s) |
| | Compute character mask "hash", using one bit per letter of the alphabet, plus one for any digit.
|
| gint | st_key (search_table_t *table, const gchar k[2]) |
| | Get key of two-char pair.
|
| gboolean | st_insert_item (search_table_t *table, const gchar *s, gpointer data) |
| | Insert an item into the search_table one-char strings are silently ignored.
|
| void | st_compact (search_table_t *table) |
| | Minimize space consumption.
|
| gboolean | entry_match (const gchar *text, size_t tlen, cpattern_t **pw, word_vec_t *wovec, size_t wn) |
| | Apply pattern matching on text, matching at the *beginning* of words.
|
| void | st_search (search_table_t *table, const gchar *search_term, st_search_callback callback, gpointer ctx, gint max_res, query_hashvec_t *qhv) |
| | Do an actual search.
|
Variables |
| guchar | map [(guchar)-1] |