diff src/dumpblocks.c @ 87:3ec5ad97e926

Use inttypes.h for portable printing of 64 bit items.
author Carl Byington <carl@five-ten-sg.com>
date Sun, 03 Aug 2008 15:42:37 -0700
parents 87216aefc6df
children 0f1492b7fe8b
line wrap: on
line diff
--- a/src/dumpblocks.c	Wed Jul 30 22:27:08 2008 -0700
+++ b/src/dumpblocks.c	Sun Aug 03 15:42:37 2008 -0700
@@ -69,7 +69,7 @@
         }
 
         if (c > 0) {
-            snprintf(outname, OUT_BUF, "%llx", ptr->id);
+            snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->id);
             if ((fp = fopen(outname, "wb")) == NULL) {
                 printf("Failed to open file %s\n", outname);
                 continue;
@@ -77,7 +77,7 @@
             pst_fwrite(buf, 1, c, fp);
             fclose(fp);
         } else {
-            printf("Failed to read block id %#llx\n", ptr->id);
+            printf("Failed to read block id %#"PRIx64"\n", ptr->id);
         }
         ptr = ptr->next;
     }