comparison src/readpst.c @ 48:f66078abed38

more fixes for 64 bit format
author carl
date Fri, 18 Jan 2008 15:07:12 -0800
parents b2a7f2e0926a
children fb3818370dd6
comparison
equal deleted inserted replaced
47:5fb8d997feed 48:f66078abed38
2 * readpst.c 2 * readpst.c
3 * Part of the LibPST project 3 * Part of the LibPST project
4 * Written by David Smith 4 * Written by David Smith
5 * dave.s@earthcorp.com 5 * dave.s@earthcorp.com
6 */ 6 */
7 #include "define.h"
8
7 #include <stdio.h> 9 #include <stdio.h>
8 #include <stdlib.h> 10 #include <stdlib.h>
9 #include <time.h> 11 #include <time.h>
10 #include <string.h> 12 #include <string.h>
11 #include <ctype.h> 13 #include <ctype.h>
30 # include "XGetopt.h" 32 # include "XGetopt.h"
31 #endif 33 #endif
32 34
33 #include "libstrfunc.h" // for base64_encoding 35 #include "libstrfunc.h" // for base64_encoding
34 36
35 #include "version.h"
36 #include "define.h"
37 #include "libpst.h" 37 #include "libpst.h"
38 #include "common.h" 38 #include "common.h"
39 #include "timeconv.h" 39 #include "timeconv.h"
40 #include "lzfu.h" 40 #include "lzfu.h"
41 #define OUTPUT_TEMPLATE "%s" 41 #define OUTPUT_TEMPLATE "%s"
243 243
244 int main(int argc, char** argv) { 244 int main(int argc, char** argv) {
245 pst_item *item = NULL; 245 pst_item *item = NULL;
246 pst_desc_ll *d_ptr; 246 pst_desc_ll *d_ptr;
247 char * fname = NULL; 247 char * fname = NULL;
248 char *d_log=NULL; 248 char *d_log = NULL;
249 int c,x; 249 int c,x;
250 char *temp = NULL; //temporary char pointer 250 char *temp = NULL; //temporary char pointer
251 prog_name = argv[0]; 251 prog_name = argv[0];
252 252
253 // command-line option handling 253 // command-line option handling
780 } 780 }
781 fprintf(f_output, "Content-transfer-encoding: base64\n"); 781 fprintf(f_output, "Content-transfer-encoding: base64\n");
782 // If there is a long filename (filename2) use that, otherwise 782 // If there is a long filename (filename2) use that, otherwise
783 // use the 8.3 filename (filename1) 783 // use the 8.3 filename (filename1)
784 if (current_attach->filename2) { 784 if (current_attach->filename2) {
785 attach_filename = current_attach->filename2; 785 attach_filename = current_attach->filename2;
786 } else { 786 } else {
787 attach_filename = current_attach->filename1; 787 attach_filename = current_attach->filename1;
788 } 788 }
789 if (!attach_filename) { 789 if (!attach_filename) {
790 fprintf(f_output, "Content-Disposition: inline\n\n"); 790 fprintf(f_output, "Content-Disposition: inline\n\n");
791 } else { 791 } else {
792 fprintf(f_output, "Content-Disposition: attachment; filename=\"%s\"\n\n", attach_filename); 792 fprintf(f_output, "Content-Disposition: attachment; filename=\"%s\"\n\n", attach_filename);