comparison src/getidblock.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 56fa05fd5271
children 0f1492b7fe8b
comparison
equal deleted inserted replaced
86:7d8cc1712221 87:3ec5ad97e926
68 if ((readSize = pst_ff_getIDblock(&pstfile, id, &buf)) <= 0 || buf == NULL) { 68 if ((readSize = pst_ff_getIDblock(&pstfile, id, &buf)) <= 0 || buf == NULL) {
69 // if ((readSize = pst_read_block_size(&pstfile, ptr->offset, ptr->size, &buf, 1, 1)) < ptr->size) { 69 // if ((readSize = pst_read_block_size(&pstfile, ptr->offset, ptr->size, &buf, 1, 1)) < ptr->size) {
70 DIE(("Error loading block\n")); 70 DIE(("Error loading block\n"));
71 } 71 }
72 if (binary == 0) 72 if (binary == 0)
73 printf("Block %#x, size %#x[%i]\n", id, (unsigned int) readSize, (int) readSize); 73 printf("Block %#"PRIx64", size %#x[%i]\n", id, (unsigned int) readSize, (int) readSize);
74 74
75 if (decrypt != 0) 75 if (decrypt != 0)
76 if (pst_decrypt(id, buf, readSize, (int) pstfile.encryption) != 0) { 76 if (pst_decrypt(id, buf, readSize, (int) pstfile.encryption) != 0) {
77 DIE(("Error decrypting block\n")); 77 DIE(("Error decrypting block\n"));
78 } 78 }