X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=lookup.c;h=c8582b1cc3ddb92495792430a6f95470d7882c68;hb=7f046503b8b8dcec51c1f7752e87ba0ba0af0631;hp=33d023d9357d8a81607541a2ecdb9f7d2b8e54be;hpb=6105d01bd446c4a27638e90ff8fd539e093b3ea2;p=onak.git diff --git a/lookup.c b/lookup.c index 33d023d..c8582b1 100644 --- a/lookup.c +++ b/lookup.c @@ -5,17 +5,18 @@ * * Copyright 2002 Project Purple * - * $Id: lookup.c,v 1.9 2003/06/04 22:11:41 noodles Exp $ + * $Id: lookup.c,v 1.12 2003/10/15 21:15:21 noodles Exp $ */ -//#include #include #include #include #include +#include #include #include "armor.h" +#include "charfuncs.h" #include "getcgi.h" #include "keydb.h" #include "keyindex.h" @@ -29,11 +30,6 @@ #define OP_INDEX 2 #define OP_VINDEX 3 -int putnextchar(void *ctx, size_t count, unsigned char *c) -{ - return printf("%.*s", (int) count, c); -} - void find_keys(char *search, uint64_t keyid, bool ishex, bool fingerprint, bool exact, bool verbose, bool mrhkp) { @@ -150,7 +146,7 @@ int main(int argc, char *argv[]) } else if (search == NULL) { puts("Error: No key to search for supplied."); } else { - readconfig(); + readconfig(NULL); initlogthing("lookup", config.logfile); initdb(); switch (op) { @@ -160,7 +156,7 @@ int main(int argc, char *argv[]) flatten_publickey(publickey, &packets, &list_end); - armor_openpgp_stream(putnextchar, + armor_openpgp_stream(stdout_putchar, NULL, packets); puts("");