comparison src/getidblock.c @ 146:0695de3b5a98 stable-0-6-29

fix for 64bit on Fedora 11
author Carl Byington <carl@five-ten-sg.com>
date Tue, 24 Feb 2009 15:32:56 -0800
parents fdc58ad2c758
children f9773b6368e0
comparison
equal deleted inserted replaced
145:2da75cc45883 146:0695de3b5a98
34 if (decrypt) 34 if (decrypt)
35 if (pst_decrypt(id, buf, readSize, (int) pstfile.encryption) != 0) { 35 if (pst_decrypt(id, buf, readSize, (int) pstfile.encryption) != 0) {
36 DIE(("Error decrypting block\n")); 36 DIE(("Error decrypting block\n"));
37 } 37 }
38 38
39 DEBUG_MAIN(("Printing block id %#"PRIx64", size %#x\n", id, readSize)); 39 DEBUG_MAIN(("Printing block id %#"PRIx64", size %#"PRIx64"\n", id, (uint64_t)readSize));
40 if (binary) { 40 if (binary) {
41 if (fwrite(buf, 1, readSize, stdout) != 0) { 41 if (fwrite(buf, 1, readSize, stdout) != 0) {
42 DIE(("Error occured during writing of buf to stdout\n")); 42 DIE(("Error occured during writing of buf to stdout\n"));
43 } 43 }
44 } else { 44 } else {
45 printf("Block id %#"PRIx64", size %#x\n", id, readSize); 45 printf("Block id %#"PRIx64", size %#"PRIx64"\n", id, (uint64_t)readSize);
46 pst_debug_hexdumper(stdout, buf, readSize, 0x10, 0); 46 pst_debug_hexdumper(stdout, buf, readSize, 0x10, 0);
47 } 47 }
48 if (buf) free(buf); 48 if (buf) free(buf);
49 49
50 if (process) { 50 if (process) {