1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
/* $Cambridge: hermes/src/prayer/session/dictionary.h,v 1.3 2008/09/16 09:59:58 dpc22 Exp $ */
/************************************************
* Prayer - a Webmail Interface *
************************************************/
/* Copyright (c) University of Cambridge 2000 - 2008 */
/* See the file NOTICE for conditions of use and distribution. */
#define DICTIONARY_POOL_SIZE (1024)
struct dictionary {
struct pool *pool; /* Allocation pool */
struct list *list; /* List of words */
struct assoc *assoc; /* Parrellel associative array for fast lookups */
};
struct dictionary *dictionary_create(void);
void dictionary_free(struct dictionary *d);
void
dictionary_parse_line(struct dictionary *dictionary, char *line,
struct session *session);
void
dictionary_print_options(struct dictionary *dictionary, struct buffer *b);
void dictionary_add(struct dictionary *d, char *word);
void dictionary_remove(struct dictionary *d, char *word);
BOOL dictionary_lookup(struct dictionary *d, char *word);
|