Mercurial > libpst
diff src/getidblock.c @ 252:4573b536177f
fix for broken internet headers from Outlook
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 24 Jul 2010 12:07:56 -0700 |
parents | 2f38c4ce606f |
children | 201464dd356e |
line wrap: on
line diff
--- a/src/getidblock.c Wed Jul 07 16:29:23 2010 -0700 +++ b/src/getidblock.c Sat Jul 24 12:07:56 2010 -0700 @@ -31,7 +31,7 @@ DIE(("Error loading block\n")); } - DEBUG_INFO(("Printing block id %#"PRIx64", size %#"PRIx64"\n", i_id, (uint64_t)readSize)); + DEBUG_INFO(("Printing block i_id %#"PRIx64", size %#"PRIx64"\n", i_id, (uint64_t)readSize)); if (binary) { if (fwrite(buf, 1, readSize, stdout) != 0) { DIE(("Error occured during writing of buf to stdout\n")); @@ -63,14 +63,18 @@ } -void dump_desc(pst_desc_tree *ptr); -void dump_desc(pst_desc_tree *ptr) +void dump_desc(pst_desc_tree *ptr, pst_desc_tree *parent); +void dump_desc(pst_desc_tree *ptr, pst_desc_tree *parent) { while (ptr) { - DEBUG_INFO(("\n\n\nLooking at block desc id %#"PRIx64"\n", ptr->d_id)); + uint64_t parent_d_id = (parent) ? parent->d_id : 0; + printf("Descriptor block d_id %#"PRIx64" parent d_id %#"PRIx64" children %i desc.i_id=%#"PRIx64", assoc tree.i_id=%#"PRIx64"\n", + ptr->d_id, parent_d_id, ptr->no_child, + (ptr->desc ? ptr->desc->i_id : (uint64_t)0), + (ptr->assoc_tree ? ptr->assoc_tree->i_id : (uint64_t)0)); if (ptr->desc && ptr->desc->i_id) dumper(ptr->desc->i_id); if (ptr->assoc_tree && ptr->assoc_tree->i_id) dumper(ptr->assoc_tree->i_id); - if (ptr->child) dump_desc(ptr->child); + if (ptr->child) dump_desc(ptr->child, ptr); ptr = ptr->next; } } @@ -131,7 +135,7 @@ dumper(ptr->i_id); ptr = ptr->next; } - dump_desc(pstfile.d_head); + dump_desc(pstfile.d_head, NULL); } if (pst_close(&pstfile) != 0) {