comparison src/readpst.c @ 310:a6df6ffc3ff5

add sent_date to .msg output format
author Carl Byington <carl@five-ten-sg.com>
date Thu, 06 May 2010 13:17:52 -0700
parents 97c53c6868ab
children 0f19cd173eab
comparison
equal deleted inserted replaced
309:4fd5197aacc2 310:a6df6ffc3ff5
886 return 0; 886 return 0;
887 } 887 }
888 888
889 889
890 int mk_separate_file(struct file_ll *f, char *extension, int openit) { 890 int mk_separate_file(struct file_ll *f, char *extension, int openit) {
891 const int name_offset = 1;
892 DEBUG_ENT("mk_separate_file"); 891 DEBUG_ENT("mk_separate_file");
893 DEBUG_INFO(("opening next file to save email\n")); 892 DEBUG_INFO(("opening next file to save email\n"));
894 if (f->item_count > 999999999) { // bigger than nine 9's 893 if (f->item_count > 999999999) { // bigger than nine 9's
895 DIE(("mk_separate_file: The number of emails in this folder has become too high to handle\n")); 894 DIE(("mk_separate_file: The number of emails in this folder has become too high to handle\n"));
896 } 895 }
897 sprintf(f->name, SEP_MAIL_FILE_TEMPLATE, f->item_count + name_offset, extension); 896 sprintf(f->name, SEP_MAIL_FILE_TEMPLATE, f->item_count, extension);
898 if (f->output) fclose(f->output); 897 if (f->output) fclose(f->output);
899 f->output = NULL; 898 f->output = NULL;
900 check_filename(f->name); 899 check_filename(f->name);
901 if (openit) { 900 if (openit) {
902 if (!(f->output = fopen(f->name, "w"))) { 901 if (!(f->output = fopen(f->name, "w"))) {