comparison src/readpst.c @ 150:06aa84023b48

rename some structure fields to reflect our better understanding of the pst format
author Carl Byington <carl@five-ten-sg.com>
date Thu, 05 Mar 2009 08:23:32 -0800
parents 0695de3b5a98
children cda7c812ec01
comparison
equal deleted inserted replaced
149:f9773b6368e0 150:06aa84023b48
130 create_enter_dir(&ff, outeritem); 130 create_enter_dir(&ff, outeritem);
131 131
132 while (d_ptr) { 132 while (d_ptr) {
133 DEBUG_MAIN(("main: New item record\n")); 133 DEBUG_MAIN(("main: New item record\n"));
134 if (!d_ptr->desc) { 134 if (!d_ptr->desc) {
135 DEBUG_WARN(("main: ERROR ?? item's desc record is NULL\n")); 135 DEBUG_WARN(("main: ERROR item's desc record is NULL\n"));
136 ff.skip_count++; 136 ff.skip_count++;
137 } 137 }
138 else { 138 else {
139 DEBUG_MAIN(("main: Desc Email ID %#"PRIx64" [d_ptr->id = %#"PRIx64"]\n", d_ptr->desc->id, d_ptr->id)); 139 DEBUG_MAIN(("main: Desc Email ID %#"PRIx64" [d_ptr->d_id = %#"PRIx64"]\n", d_ptr->desc->id, d_ptr->d_id));
140 140
141 item = pst_parse_item(&pstfile, d_ptr, NULL); 141 item = pst_parse_item(&pstfile, d_ptr, NULL);
142 DEBUG_MAIN(("main: About to process item\n")); 142 DEBUG_MAIN(("main: About to process item\n"));
143 if (item && item->email && item->email->subject && item->email->subject->subj) { 143 if (item && item->email && item->email->subject && item->email->subject->subj) {
144 DEBUG_EMAIL(("item->email->subject->subj = %s\n", item->email->subject->subj)); 144 DEBUG_EMAIL(("item->email->subject->subj = %s\n", item->email->subject->subj));
746 fprintf(f_output, "\n--%s\n", boundary); 746 fprintf(f_output, "\n--%s\n", boundary);
747 fprintf(f_output, "Content-Type: %s\n\n", attach->mimetype); 747 fprintf(f_output, "Content-Type: %s\n\n", attach->mimetype);
748 ptr = pst_getID(pf, attach->id_val); 748 ptr = pst_getID(pf, attach->id_val);
749 749
750 pst_desc_ll d_ptr; 750 pst_desc_ll d_ptr;
751 d_ptr.id = ptr->id; 751 d_ptr.d_id = 0;
752 d_ptr.parent_id = 0; 752 d_ptr.parent_d_id = 0;
753 d_ptr.list_index = NULL; 753 d_ptr.assoc_tree = NULL;
754 d_ptr.desc = ptr; 754 d_ptr.desc = ptr;
755 d_ptr.no_child = 0; 755 d_ptr.no_child = 0;
756 d_ptr.prev = NULL; 756 d_ptr.prev = NULL;
757 d_ptr.next = NULL; 757 d_ptr.next = NULL;
758 d_ptr.parent = NULL; 758 d_ptr.parent = NULL;
759 d_ptr.child = NULL; 759 d_ptr.child = NULL;
760 d_ptr.child_tail = NULL; 760 d_ptr.child_tail = NULL;
761 761
762 pst_item *item = pst_parse_item(pf, &d_ptr, attach->id2_head); 762 pst_item *item = pst_parse_item(pf, &d_ptr, attach->id2_head);
763 write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, 0, extra_mime_headers); 763 write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, 0, extra_mime_headers);
764 pst_freeItem(item); 764 pst_freeItem(item);
765 765
1080 has_from = has_subject = has_to = has_cc = has_date = has_msgid = 0; 1080 has_from = has_subject = has_to = has_cc = has_date = has_msgid = 0;
1081 DEBUG_ENT("write_normal_email"); 1081 DEBUG_ENT("write_normal_email");
1082 1082
1083 // setup default body character set and report type 1083 // setup default body character set and report type
1084 snprintf(body_charset, sizeof(body_charset), "%s", 1084 snprintf(body_charset, sizeof(body_charset), "%s",
1085 (item->email->body_charset) ? item->email->body_charset : 1085 (item->body_charset) ? item->body_charset :
1086 (item->email->message_codepage) ? codepage(item->email->message_codepage) : 1086 (item->message_codepage) ? codepage(item->message_codepage) :
1087 (item->email->internet_cpid) ? codepage(item->email->internet_cpid) : 1087 (item->internet_cpid) ? codepage(item->internet_cpid) :
1088 "utf-8"); 1088 "utf-8");
1089 body_report[0] = '\0'; 1089 body_report[0] = '\0';
1090 1090
1091 // setup default sender 1091 // setup default sender
1092 if (item->email->sender_address && strchr(item->email->sender_address, '@')) { 1092 if (item->email->sender_address && strchr(item->email->sender_address, '@')) {