# HG changeset patch # User Carl Byington # Date 1241631466 25200 # Node ID 07ceebd115ced3ad93587a6a9e06e13154ca7647 # Parent ffd1503a75307c23eb8b38feefb4ba1cdffc8c4d remove readpst -C switch, obsolete debugging code diff -r ffd1503a7530 -r 07ceebd115ce ChangeLog --- a/ChangeLog Wed Apr 22 13:52:18 2009 -0700 +++ b/ChangeLog Wed May 06 10:37:46 2009 -0700 @@ -4,6 +4,7 @@ * the shared library must never write to stdout or stderr. * fix pst_attach_to_mem so the caller does not need to initialize the buffer pointer. + * remove readpst -C switch, obsolete debugging code. LibPST 0.6.37 (2009-04-17) =============================== diff -r ffd1503a7530 -r 07ceebd115ce src/readpst.c --- a/src/readpst.c Wed Apr 22 13:52:18 2009 -0700 +++ b/src/readpst.c Wed May 06 10:37:46 2009 -0700 @@ -80,9 +80,6 @@ // saved as email_no-filename (e.g. 1-samplefile.doc or 000001-Attachment2.zip) #define MODE_SEPARATE 3 -// Decrypt the whole file (even the parts that aren't encrypted) and ralph it to stdout -#define MODE_DECSPEW 4 - // Output Normal just prints the standard information about what is going on #define OUTPUT_NORMAL 0 @@ -269,14 +266,11 @@ } // command-line option handling - while ((c = getopt(argc, argv, "bCc:Dd:hko:qrSMVw"))!= -1) { + while ((c = getopt(argc, argv, "bc:Dd:hko:qrSMVw"))!= -1) { switch (c) { case 'b': save_rtf_body = 0; break; - case 'C': - mode = MODE_DECSPEW; - break; case 'c': if (optarg && optarg[0]=='v') { contact_mode=CMODE_VCARD; @@ -350,30 +344,6 @@ DEBUG_REGISTER_CLOSE(); DEBUG_ENT("main"); - if (mode == MODE_DECSPEW) { - FILE *fp; - char buf[1024]; - size_t l = 0; - if (NULL == (fp = fopen(fname, "rb"))) { - WARN(("Couldn't open file %s\n", fname)); - DEBUG_RET(); - return 1; - } - - while (0 != (l = fread(buf, 1, 1024, fp))) { - if (0 != pst_decrypt(0, buf, l, PST_COMP_ENCRYPT)) - WARN(("pst_decrypt() failed (I'll try to continue)\n")); - - if (l != pst_fwrite(buf, 1, l, stdout)) { - WARN(("Couldn't output to stdout?\n")); - DEBUG_RET(); - return 1; - } - } - DEBUG_RET(); - return 0; - } - if (output_mode != OUTPUT_QUIET) printf("Opening PST file and indexes...\n"); RET_DERROR(pst_open(&pstfile, fname), 1, ("Error opening File\n")); diff -r ffd1503a7530 -r 07ceebd115ce xml/libpst.in --- a/xml/libpst.in Wed Apr 22 13:52:18 2009 -0700 +++ b/xml/libpst.in Wed May 06 10:37:46 2009 -0700 @@ -53,7 +53,6 @@ Synopsis readpst - @@ -83,12 +82,6 @@ Options - -C - - Decrypt the entire pst file and dump it to stdout. - - - -D Include deleted items in the output.