Mercurial > libpst
comparison src/dumpblocks.c @ 188:d588dafd03e8 stable-0-6-36
prep for fedora build
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 14 Apr 2009 07:53:13 -0700 |
parents | 6954d315aaa8 |
children | 2f38c4ce606f |
comparison
equal
deleted
inserted
replaced
187:cf8bbbb746e7 | 188:d588dafd03e8 |
---|---|
53 | 53 |
54 ptr = pstfile.i_head; | 54 ptr = pstfile.i_head; |
55 outname = (char *) pst_malloc(OUT_BUF); | 55 outname = (char *) pst_malloc(OUT_BUF); |
56 printf("Saving blocks\n"); | 56 printf("Saving blocks\n"); |
57 while (ptr != NULL) { | 57 while (ptr != NULL) { |
58 /* if (pstfile.encryption == PST_ENC) { | 58 size_t c; |
59 c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, buf); | 59 c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, &buf); |
60 } else { */ | 60 if (c) { |
61 if ((ptr->i_id & 0x02) == 0 && pstfile.encryption == PST_ENC) { | |
62 c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, &buf); | |
63 } else { | |
64 c = pst_ff_getIDblock(&pstfile, ptr->i_id, &buf); | |
65 } | |
66 | |
67 if (c > 0) { | |
68 snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->i_id); | 61 snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->i_id); |
69 if ((fp = fopen(outname, "wb")) == NULL) { | 62 if ((fp = fopen(outname, "wb")) == NULL) { |
70 printf("Failed to open file %s\n", outname); | 63 printf("Failed to open file %s\n", outname); |
71 continue; | 64 continue; |
72 } | 65 } |