2 * stats.c - various routines to do stats on the key graph
4 * Copyright 2000-2004,2007-2009 Jonathan McDowell <noodles@earth.li>
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.
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
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.
27 key_getsigs - get the sigs for a key.
28 key_getsigns - get the keys a key signs. */
36 #include "keystructs.h"
40 * initcolour - Clear the key graph ready for use.
41 * @parent: Do we want to clear the parent pointers too?
43 * Clears the parent and colour information on all elements in the key
46 void initcolour(bool parent);
49 * findpath - Given 2 keys finds a path between them.
50 * @have: The key we have.
51 * @want: The key we want to get to.
53 * This does a breadth first search on the key tree, starting with the
54 * key we have. It returns as soon as a path is found or when we run out
55 * of keys; whichever comes sooner.
57 unsigned long findpath(struct stats_key *have, struct stats_key *want);
60 * dofindpath - Given 2 keys displays a path between them.
61 * @have: The key we have.
62 * @want: The key we want to get to.
63 * @html: Should we output in html.
64 * @count: How many paths we should look for at most.
66 * This does a breadth first search on the key tree, starting with the
67 * key we have. It returns as soon as a path is found or when we run out
68 * of keys; whichever comes sooner.
70 void dofindpath(uint64_t have, uint64_t want, bool html, int count);
72 struct stats_key *furthestkey(struct stats_key *have);
74 #endif /* __STATS_H__ */