cscvs to tla changeset 129
[onak.git] / wordlist.h
1 /*
2  * wordlist.h - Routines for manipulating word lists
3  *
4  * Jonathan McDowell <noodles@earth.li>
5  *
6  * Copyright 2004 Project Purple
7  *
8  * $Id: wordlist.h,v 1.1 2004/05/27 03:34:35 noodles Exp $
9  */
10
11 #ifndef __WORDLIST_H__
12 #define __WORDLIST_H__
13
14 #include "ll.h"
15 #include "keystructs.h"
16
17 /**
18  *      makewordlist - Takes a string and splits it into a set of unique words.
19  *      @wordlist: The current word list.
20  *      @words: The string to split and add.
21  *
22  *      We take words and split it on non alpha numeric characters. These get
23  *      added to the word list if they're not already present. If the wordlist
24  *      is NULL then we start a new list, otherwise it's search for already
25  *      added words. Note that words is modified in the process of scanning.
26  *
27  *      Returns the new word list.
28  */
29 struct ll *makewordlist(struct ll *wordlist, char *word);
30
31 /**
32  *      makewordlistfromkey - Takes a public key and splits it into a set of 
33  *                     unique words.
34  *      @wordlist: The current word list.
35  *      @key: The key to return the words from.
36  *
37  *      We take words and split it on non alpha numeric characters. These get
38  *      added to the word list if they're not already present. If the wordlist
39  *      is NULL then we start a new list, otherwise it's search for already
40  *      added words. Note that words is modified in the process of scanning.
41  *
42  *      Returns the new word list.
43  */
44 struct ll *makewordlistfromkey(struct ll *wordlist,
45                                struct openpgp_publickey *key);
46
47 #endif /* __WORDLIST_H__ */