Mercurial > libpst
diff src/getidblock.c @ 46:b2a7f2e0926a
more fixes for 64 bit format
author | carl |
---|---|
date | Sat, 12 Jan 2008 15:20:53 -0800 |
parents | 07177825c91b |
children | f66078abed38 |
line wrap: on
line diff
--- a/src/getidblock.c Tue Jan 08 16:33:23 2008 -0800 +++ b/src/getidblock.c Sat Jan 12 15:20:53 2008 -0800 @@ -69,26 +69,26 @@ DIE(("Error loading file index\n")); } - // if ((ptr = _pst_getID(&pstfile, id)) == NULL) { + // if ((ptr = pst_getID(&pstfile, id)) == NULL) { // DIE(("id not found [%#x]\n", id)); // } DEBUG_MAIN(("Loading block\n")); - if ((readSize = _pst_ff_getIDblock(&pstfile, id, &buf)) <= 0 || buf == NULL) { - // if ((readSize = _pst_read_block_size(&pstfile, ptr->offset, ptr->size, &buf, 1, 1)) < ptr->size) { + if ((readSize = pst_ff_getIDblock(&pstfile, id, &buf)) <= 0 || buf == NULL) { + // if ((readSize = pst_read_block_size(&pstfile, ptr->offset, ptr->size, &buf, 1, 1)) < ptr->size) { DIE(("Error loading block\n")); } if (binary==0) printf("Block %#x, size %#x[%i]\n",id, (unsigned int)readSize, (int) readSize); if (decrypt!=0) - if (_pst_decrypt(buf, readSize, (int)pstfile.encryption) != 0) { + if (pst_decrypt(buf, readSize, (int)pstfile.encryption) != 0) { DIE(("Error decrypting block\n")); } DEBUG_MAIN(("Printing block... [id %#x, size %#x]\n", id, readSize)); if (binary==0) { - _pst_debug_hexdump(stdout, buf, readSize, 0x10, 0); + pst_debug_hexdumper(stdout, buf, readSize, 0x10, 0); } else { if (fwrite(buf, 1, readSize, stdout) != 0) { DIE(("Error occured during writing of buf to stdout\n")); @@ -108,12 +108,12 @@ } if (ptr == NULL) { ptr = (pst_desc_ll*)xmalloc(sizeof(pst_desc_ll)); - ptr->desc = _pst_getID(&pstfile, id); + ptr->desc = pst_getID(&pstfile, id); ptr->list_index = NULL; } if (ptr != NULL) { - if ((item = _pst_parse_item(&pstfile, ptr)) != NULL) - _pst_freeItem(item); + if ((item = pst_parse_item(&pstfile, ptr)) != NULL) + pst_freeItem(item); } else { DEBUG_MAIN(("item not found with this ID\n")); printf("Cannot find the owning Record of this ID. Cannot parse\n");