Update Debian Vcs-* fields to point to git repository
[onak.git] / wordlist.h
1 /*
2  * wordlist.h - Routines for manipulating word lists
3  *
4  * Copyright 2004 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 51
17  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __WORDLIST_H__
21 #define __WORDLIST_H__
22
23 #include "ll.h"
24 #include "keystructs.h"
25
26 /**
27  *      makewordlist - Takes a string and splits it into a set of unique words.
28  *      @wordlist: The current word list.
29  *      @words: The string to split and add.
30  *
31  *      We take words and split it on non alpha numeric characters. These get
32  *      added to the word list if they're not already present. If the wordlist
33  *      is NULL then we start a new list, otherwise it's search for already
34  *      added words. Note that words is modified in the process of scanning.
35  *
36  *      Returns the new word list.
37  */
38 struct ll *makewordlist(struct ll *wordlist, char *word);
39
40 /**
41  *      makewordlistfromkey - Takes a public key and splits it into a set of 
42  *                     unique words.
43  *      @wordlist: The current word list.
44  *      @key: The key to return the words from.
45  *
46  *      We take words and split it on non alpha numeric characters. These get
47  *      added to the word list if they're not already present. If the wordlist
48  *      is NULL then we start a new list, otherwise it's search for already
49  *      added words. Note that words is modified in the process of scanning.
50  *
51  *      Returns the new word list.
52  */
53 struct ll *makewordlistfromkey(struct ll *wordlist,
54                                struct openpgp_publickey *key);
55
56 #endif /* __WORDLIST_H__ */