|
Defines |
| #define | WOVEC_DFLT 10 /**< Default size of word-vectors */ |
| | Default size of word-vectors.
|
| #define | MASK_LETTER(x) (1 << (x)) /**< bits 0 to 25 */ |
| | bits 0 to 25
|
| #define | MASK_DIGIT 0x80000000 |
| #define | ST_MIN_BIN_SIZE 4 |
Functions |
| | RCSID ("$Id:matching.c, v 1.15 2005/10/26 11:54:56 cbiere Exp $") |
| 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.
|
| size_t | match_map_string (char_map_t map, gchar *string) |
| | Apply a char map to a string, inplace.
|
| void | st_initialize (search_table_t *table, char_map_t map) |
| | Initialize permanent data in search table.
|
| 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, gchar k[2]) |
| | Get key of two-char pair.
|
| void | st_insert_item (search_table_t *table, const gchar *s, struct shared_file *sf) |
| | 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 (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, gchar *search, void(*callback)(gpointer, shared_file_t *), gpointer ctx, gint max_res, query_hashvec_t *qhv) |
| | Do an actual search.
|