2 gpgstats.c - Program to produce stats on a GPG keyring.
3 Written by Jonathan McDowell <noodles@earth.li>.
5 19/02/2000 - Started writing (sort of).
18 void findmaxpath(unsigned long max)
20 struct stats_key *from, *to, *tmp;
22 unsigned long distance, loop;
24 printf("In findmaxpath\n");
26 from = to = tmp = NULL;
27 hash_getkeysigs(0x5B430367);
29 for (loop = 0; (loop < HASHSIZE) && (distance < max); loop++) {
30 curkey = gethashtableentry(loop);
31 while (curkey != NULL && distance < max) {
32 hash_getkeysigs(((struct stats_key *)
33 curkey->object)->keyid);
35 tmp = furthestkey((struct stats_key *)
37 if (tmp->colour > distance) {
38 from = (struct stats_key *)curkey->object;
40 distance = to->colour;
41 printf("Current max path (#%ld) is from %llX to %llX (%ld steps)\n",
50 printf("Max path is from %llX to %llX (%ld steps)\n",
56 int main(int argc, char *argv[])