summaryrefslogtreecommitdiffstats
path: root/sqwebmail/ispell.h
blob: 2b06cbeb0e02624981f233222e3d3f5225b41744 (plain)
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
30
31
32
33
#ifndef	ispell_h
#define	ispell_h
/*
*/

/*
** C interface to ispell.  Gimme a line of text, and I'll return a link
** list of mispelled words, plus their suggested derivations.
*/

struct ispell_misspelled;
struct ispell_suggestion;

struct ispell {
	char *ispell_buf;
	struct ispell_misspelled *first_misspelled;
} ;

struct ispell_misspelled {
	struct ispell_misspelled *next;
	const char *misspelled_word;
	int word_pos;
	struct ispell_suggestion *first_suggestion;
} ;

struct ispell_suggestion {
	struct ispell_suggestion *next;
	const char *suggested_word;
} ;

struct ispell *ispell_run(const char *dictionary, const char *line);
void ispell_free(struct ispell *);
#endif