Mercurial > libpst
comparison src/pst2dii.cpp.in @ 172:6954d315aaa8
move version-info into main configure.in, and set it properly.
prefix all external symbols in the shared library with pst_ to avoid symbol clashes with other shared libraries.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 04 Apr 2009 16:00:48 -0700 |
parents | 0e1e048716e4 |
children | b65e8d0a088a |
comparison
equal
deleted
inserted
replaced
171:6c1e75bc4cac | 172:6954d315aaa8 |
---|---|
182 const char* f_name = fname.c_str(); | 182 const char* f_name = fname.c_str(); |
183 DEBUG_EMAIL(("dirname=%s, pathname=%s, filename=%s\n", output_directory, f_name, attach_filename)); | 183 DEBUG_EMAIL(("dirname=%s, pathname=%s, filename=%s\n", output_directory, f_name, attach_filename)); |
184 int len = strlen(output_directory) + 1 + strlen(f_name) + 15; | 184 int len = strlen(output_directory) + 1 + strlen(f_name) + 15; |
185 if (!attach_filename) { | 185 if (!attach_filename) { |
186 // generate our own (dummy) filename for the attachement | 186 // generate our own (dummy) filename for the attachement |
187 temp = (char*)xmalloc(len); | 187 temp = (char*)pst_malloc(len); |
188 sprintf(temp, "%s/%s_attach%i", output_directory, f_name, attach_num); | 188 sprintf(temp, "%s/%s_attach%i", output_directory, f_name, attach_num); |
189 } else { | 189 } else { |
190 // have an attachment name, make sure it's unique | 190 // have an attachment name, make sure it's unique |
191 temp = (char*)xmalloc(len+strlen(attach_filename)); | 191 temp = (char*)pst_malloc(len+strlen(attach_filename)); |
192 do { | 192 do { |
193 if (fp) fclose(fp); | 193 if (fp) fclose(fp); |
194 if (x == 0) | 194 if (x == 0) |
195 sprintf(temp, "%s/%s_%s", output_directory, f_name, attach_filename); | 195 sprintf(temp, "%s/%s_%s", output_directory, f_name, attach_filename); |
196 else | 196 else |
478 if (mycc.empty()) write_simple("CC", item->email->cc_address.str); | 478 if (mycc.empty()) write_simple("CC", item->email->cc_address.str); |
479 else write_simple("CC", mycc); | 479 else write_simple("CC", mycc); |
480 if (mybcc.empty()) write_simple("BCC", item->email->bcc_address.str); | 480 if (mybcc.empty()) write_simple("BCC", item->email->bcc_address.str); |
481 else write_simple("BCC", mybcc); | 481 else write_simple("BCC", mybcc); |
482 if (item->email->sent_date) { | 482 if (item->email->sent_date) { |
483 time_t t = fileTimeToUnixTime(item->email->sent_date, NULL); | 483 time_t t = pst_fileTimeToUnixTime(item->email->sent_date, NULL); |
484 char c_time[C_TIME_SIZE]; | 484 char c_time[C_TIME_SIZE]; |
485 strftime(c_time, C_TIME_SIZE, "%F", gmtime(&t)); | 485 strftime(c_time, C_TIME_SIZE, "%F", gmtime(&t)); |
486 write_simple("DATESENT", c_time); | 486 write_simple("DATESENT", c_time); |
487 strftime(c_time, C_TIME_SIZE, "%T+0000", gmtime(&t)); | 487 strftime(c_time, C_TIME_SIZE, "%T+0000", gmtime(&t)); |
488 write_simple("TIMESENT", c_time); | 488 write_simple("TIMESENT", c_time); |
489 } | 489 } |
490 if (item->email->arrival_date) { | 490 if (item->email->arrival_date) { |
491 time_t t = fileTimeToUnixTime(item->email->arrival_date, NULL); | 491 time_t t = pst_fileTimeToUnixTime(item->email->arrival_date, NULL); |
492 char c_time[C_TIME_SIZE]; | 492 char c_time[C_TIME_SIZE]; |
493 strftime(c_time, C_TIME_SIZE, "%F", gmtime(&t)); | 493 strftime(c_time, C_TIME_SIZE, "%F", gmtime(&t)); |
494 write_simple("DATERCVD", c_time); | 494 write_simple("DATERCVD", c_time); |
495 strftime(c_time, C_TIME_SIZE, "%T+0000", gmtime(&t)); | 495 strftime(c_time, C_TIME_SIZE, "%T+0000", gmtime(&t)); |
496 write_simple("TIMERCVD", c_time); | 496 write_simple("TIMERCVD", c_time); |
538 snprintf(line, sizeof(line), "Cc: %s\n", item->email->cc_address.str); | 538 snprintf(line, sizeof(line), "Cc: %s\n", item->email->cc_address.str); |
539 print_pdf(line); | 539 print_pdf(line); |
540 } | 540 } |
541 | 541 |
542 if (item->email->sent_date) { | 542 if (item->email->sent_date) { |
543 time_t em_time = fileTimeToUnixTime(item->email->sent_date, 0); | 543 time_t em_time = pst_fileTimeToUnixTime(item->email->sent_date, 0); |
544 char c_time[C_TIME_SIZE]; | 544 char c_time[C_TIME_SIZE]; |
545 strftime(c_time, C_TIME_SIZE, "%a, %d %b %Y %H:%M:%S %z", gmtime(&em_time)); | 545 strftime(c_time, C_TIME_SIZE, "%a, %d %b %Y %H:%M:%S %z", gmtime(&em_time)); |
546 snprintf(line, sizeof(line), "Date: %s\n", c_time); | 546 snprintf(line, sizeof(line), "Date: %s\n", c_time); |
547 print_pdf(line); | 547 print_pdf(line); |
548 } | 548 } |