From: Jonathan McDowell Date: Tue, 25 Aug 2009 15:03:09 +0000 (+0100) Subject: Correct formatting of some places we output a keyid X-Git-Tag: 0.3.8~9 X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=commitdiff_plain;h=936be87217c58254edc92aa63178fa0461f67150 Correct formatting of some places we output a keyid Format keyids in various places to be 16 digits long, zero padded if necessary. Closes Debian bug #540196 (which has a patch from Philippe Teuwen, but that uses 8 digits instead of 16). --- diff --git a/gpgwww.c b/gpgwww.c index 24bf490..7d90a00 100644 --- a/gpgwww.c +++ b/gpgwww.c @@ -154,10 +154,10 @@ int main(int argc, char *argv[]) } if (op != OP_GET) { - printf("

Looking for path from 0x%" PRIX64" to 0x%" PRIX64 - ".\n", + printf("

Looking for path from 0x%016" PRIX64" to 0x%016" + PRIX64 ".\n", from, to); - printf("Find reverse path\n", to, from); @@ -173,7 +173,8 @@ int main(int argc, char *argv[]) catchsignals(); config.dbbackend->initdb(true); inithash(); - logthing(LOGTHING_NOTICE, "Looking for path from 0x%" PRIX64 " to 0x%" + logthing(LOGTHING_NOTICE, "Looking for path from 0x%016" PRIX64 + " to 0x%016" PRIX64, from, to); diff --git a/keyindex.c b/keyindex.c index d2094d5..0cc9edd 100644 --- a/keyindex.c +++ b/keyindex.c @@ -87,9 +87,9 @@ int list_uids(uint64_t keyid, struct openpgp_signedpacket_list *uids, } else if (uids->packet->tag == 17) { printf(" "); if (html) { - printf("\"[photo" - "\n", + printf("\""\n", keyid, imgindx); imgindx++; diff --git a/sixdegrees.c b/sixdegrees.c index 9d2d68d..b746327 100644 --- a/sixdegrees.c +++ b/sixdegrees.c @@ -86,12 +86,13 @@ void sixdegrees(uint64_t keyid) config.dbbackend->cached_getkeysigs(keyid); if ((keyinfo = findinhash(keyid)) == NULL) { - printf("Couldn't find key 0x%" PRIX64 ".\n", keyid); + printf("Couldn't find key 0x%016" PRIX64 ".\n", keyid); return; } uid = config.dbbackend->keyid2uid(keyinfo->keyid); - printf("Six degrees for 0x%" PRIX64 " (%s):\n", keyinfo->keyid, uid); + printf("Six degrees for 0x%016" PRIX64 " (%s):\n", keyinfo->keyid, + uid); free(uid); uid = NULL; diff --git a/stats.c b/stats.c index e009de5..88d7a05 100644 --- a/stats.c +++ b/stats.c @@ -139,11 +139,11 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count) (void) config.dbbackend->cached_getkeysigs(fullwant); if ((keyinfoa = findinhash(fullhave)) == NULL) { - printf("Couldn't find key 0x%" PRIX64 ".\n", have); + printf("Couldn't find key 0x%016" PRIX64 ".\n", have); return; } if ((keyinfob = findinhash(fullwant)) == NULL) { - printf("Couldn't find key 0x%" PRIX64 ".\n", want); + printf("Couldn't find key 0x%016" PRIX64 ".\n", want); return; }