]> git.sommitrealweird.co.uk Git - onak.git/commitdiff
Use PRIX64, not PRIx64.
authorJonathan McDowell <noodles@meepok>
Sat, 7 Jun 2008 11:52:41 +0000 (12:52 +0100)
committerJonathan McDowell <noodles@meepok>
Sat, 7 Jun 2008 11:52:41 +0000 (12:52 +0100)
  We do, of course, want capital IDs to match previous behaviour.

gpgwww.c
keyindex.c
maxpath.c
sixdegrees.c
stats.c

index 10b3806a5e7b1158e7038f86a370faf1140ec13c..24bf49033ec7f15075a8ad71693aff985e0ae879 100644 (file)
--- a/gpgwww.c
+++ b/gpgwww.c
@@ -154,14 +154,14 @@ int main(int argc, char *argv[])
        }
 
        if (op != OP_GET) {
-               printf("<P>Looking for path from 0x%" PRIx64" to 0x%" PRIx64
+               printf("<P>Looking for path from 0x%" PRIX64" to 0x%" PRIX64
                                ".\n",
                                from, to);
-               printf("<A HREF=\"gpgwww?from=0x%08" PRIx64 "&to=0x%08" PRIx64
+               printf("<A HREF=\"gpgwww?from=0x%08" PRIX64 "&to=0x%08" PRIX64
                                "\">Find reverse path</A>\n",
                                to,
                                from);
-               printf("<A HREF=\"gpgwww?from=0x%08" PRIx64 "&to=0x%08" PRIx64
+               printf("<A HREF=\"gpgwww?from=0x%08" PRIX64 "&to=0x%08" PRIX64
                                "&op=get\">"
                                "Get all keys listed</A></P>\n",
                                from,
@@ -173,8 +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%"
-                       PRIx64,
+       logthing(LOGTHING_NOTICE, "Looking for path from 0x%" PRIX64 " to 0x%"
+                       PRIX64,
                        from,
                        to);
        if (op == OP_GET) {
index e4649ba041fd0ed2f914a06189224ac143456264..c708aa48642aada710f8589de1ae40883958c865 100644 (file)
@@ -41,22 +41,22 @@ int list_sigs(struct openpgp_packet_list *sigs, bool html)
                }
                if (html && uid != NULL) {
                        printf("%s         <a href=\"lookup?op=get&"
-                               "search=%016" PRIx64 "\">%08" PRIx64
+                               "search=%016" PRIX64 "\">%08" PRIX64
                                "</a>             "
                                "<a href=\"lookup?op=vindex&search=0x%016"
-                               PRIx64 "\">%s</a>\n",
+                               PRIX64 "\">%s</a>\n",
                                sig,
                                sigid,
                                sigid & 0xFFFFFFFF,
                                sigid,
                                txt2html(uid));
                } else if (html && uid == NULL) {
-                       printf("%s         %08" PRIx64 "             "
+                       printf("%s         %08" PRIX64 "             "
                                "[User id not found]\n",
                                sig,
                                sigid & 0xFFFFFFFF);
                } else {
-                       printf("%s         %08" PRIx64
+                       printf("%s         %08" PRIX64
                                "             %s\n",
                                sig,
                                sigid & 0xFFFFFFFF,
@@ -90,7 +90,7 @@ int list_uids(uint64_t keyid, struct openpgp_signedpacket_list *uids,
                        printf("                                ");
                        if (html) {
                                printf("<img src=\"lookup?op=photo&search=0x%"
-                                       PRIx64 "&idx=%d\" alt=\"[photo id]\">"
+                                       PRIX64 "&idx=%d\" alt=\"[photo id]\">"
                                        "\n",
                                        keyid,
                                        imgindx);
@@ -239,7 +239,7 @@ int key_index(struct openpgp_publickey *keys, bool verbose, bool fingerprint,
 
                if (html) {
                        printf("pub  %5d%c/<a href=\"lookup?op=get&"
-                               "search=%016" PRIx64 "\">%08" PRIx64
+                               "search=%016" PRIX64 "\">%08" PRIX64
                                "</a> %04d/%02d/%02d ",
                                length,
                                (type == 1) ? 'R' : ((type == 16) ? 'g' : 
@@ -250,7 +250,7 @@ int key_index(struct openpgp_publickey *keys, bool verbose, bool fingerprint,
                                created->tm_mon + 1,
                                created->tm_mday);
                } else {
-                       printf("pub  %5d%c/%08" PRIx64 " %04d/%02d/%02d ",
+                       printf("pub  %5d%c/%08" PRIX64 " %04d/%02d/%02d ",
                                length,
                                (type == 1) ? 'R' : ((type == 16) ? 'g' : 
                                        ((type == 17) ? 'D' : '?')),
@@ -267,7 +267,7 @@ int key_index(struct openpgp_publickey *keys, bool verbose, bool fingerprint,
                                curuid->packet->data);
                        if (html) {
                                printf("<a href=\"lookup?op=vindex&"
-                                       "search=0x%016" PRIx64 "\">",
+                                       "search=0x%016" PRIX64 "\">",
                                        keyid);
                        }
                        printf("%s%s%s\n", 
@@ -332,7 +332,7 @@ int mrkey_index(struct openpgp_publickey *keys)
                switch (keys->publickey->data[0]) {
                case 2:
                case 3:
-                       printf("%016" PRIx64, get_keyid(keys));
+                       printf("%016" PRIX64, get_keyid(keys));
                        type = keys->publickey->data[7];
                        length = (keys->publickey->data[8] << 8) +
                                        keys->publickey->data[9];
index 4d65588636e5a68fe03e43f4dbd55668e4e00963..ccd500839fe00f0a0d5eddb801822af3597f25fa 100644 (file)
--- a/maxpath.c
+++ b/maxpath.c
@@ -53,7 +53,7 @@ void findmaxpath(unsigned long max)
                                to = tmp;
                                distance = to->colour;
                                printf("Current max path (#%ld) is from %"
-                                               PRIx64 " to %" PRIx64 
+                                               PRIX64 " to %" PRIX64 
                                                " (%ld steps)\n", 
                                                loop,
                                                from->keyid,
@@ -63,7 +63,7 @@ void findmaxpath(unsigned long max)
                        curkey=curkey->next;
                }
        }
-       printf("Max path is from %" PRIx64 " to %" PRIx64 " (%ld steps)\n",
+       printf("Max path is from %" PRIX64 " to %" PRIX64 " (%ld steps)\n",
                        from->keyid,
                        to->keyid,
                        distance);
index e346cf131a6cd56b864b47e6fdf10bdac1b73f08..9d2d68d3dfeb8eca4472e05ac30b00e20baf5d82 100644 (file)
@@ -86,12 +86,12 @@ 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%" 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%" PRIX64 " (%s):\n", keyinfo->keyid, uid);
        free(uid);
        uid = NULL;
 
diff --git a/stats.c b/stats.c
index bf85da6653c6b32ce630d7b748292bef2d35b16d..e009de52da5f0a6a9cb0eadbdc303f839ddc7d9c 100644 (file)
--- 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%" PRIX64 ".\n", have);
                return;
        }
        if ((keyinfob = findinhash(fullwant)) == NULL) {
-               printf("Couldn't find key 0x%" PRIx64 ".\n", want);
+               printf("Couldn't find key 0x%" PRIX64 ".\n", want);
                return;
        }
 
@@ -164,8 +164,8 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                        html ? "<BR>" : "");
                if (keyinfoa->colour == 0) {
                        if (pathnum == 0) {
-                               printf("Can't find a link from 0x%08" PRIx64
-                               " to 0x%08" PRIx64 "%s\n",
+                               printf("Can't find a link from 0x%08" PRIX64
+                               " to 0x%08" PRIX64 "%s\n",
                                have,
                                want,
                                html ? "<BR>" : "");
@@ -175,7 +175,7 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                        }
                        pathnum = count;
                } else {
-                       printf("%d steps from 0x%08" PRIx64 " to 0x%08" PRIx64
+                       printf("%d steps from 0x%08" PRIX64 " to 0x%08" PRIX64
                                "%s\n",
                                keyinfoa->colour, have & 0xFFFFFFFF,
                                want & 0xFFFFFFFF,
@@ -186,7 +186,7 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                                                curkey->keyid);
                                if (html && uid == NULL) {
                                        printf("<a href=\"lookup?op=get&search="
-                                               "0x%08" PRIx64 "\">0x%08" PRIx64
+                                               "0x%08" PRIX64 "\">0x%08" PRIX64
                                                "</a> (["
                                                "User id not found])%s<BR>\n",
                                                curkey->keyid & 0xFFFFFFFF,
@@ -195,10 +195,10 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                                                        "" : " signs");
                                } else if (html && uid != NULL) {
                                        printf("<a href=\"lookup?op=get&search="
-                                               "0x%08" PRIx64 "\">0x%08"
-                                               PRIx64 "</a>"
+                                               "0x%08" PRIX64 "\">0x%08"
+                                               PRIX64 "</a>"
                                                " (<a href=\"lookup?op=vindex&"
-                                               "search=0x%08" PRIx64 
+                                               "search=0x%08" PRIX64 
                                                "\">%s</a>)%s"
                                                "<BR>\n",
                                                curkey->keyid & 0xFFFFFFFF,
@@ -208,7 +208,7 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                                                (curkey->keyid == fullwant) ?
                                                "" : " signs");
                                } else {
-                                       printf("0x%08" PRIx64 " (%s)%s\n",
+                                       printf("0x%08" PRIX64 " (%s)%s\n",
                                                curkey->keyid & 0xFFFFFFFF,
                                                (uid == NULL) ?
                                                        "[User id not found]" :
@@ -232,7 +232,7 @@ void dofindpath(uint64_t have, uint64_t want, bool html, int count)
                        }
                        curkey = keyinfoa;
                        while (curkey != NULL && curkey->keyid != 0) {
-                               printf("0x%08" PRIx64 " ",
+                               printf("0x%08" PRIX64 " ",
                                                curkey->keyid & 0xFFFFFFFF);
                                curkey = findinhash(curkey->parent);
                        }