diff src/readpst.c @ 197:07ceebd115ce

remove readpst -C switch, obsolete debugging code
author Carl Byington <carl@five-ten-sg.com>
date Wed, 06 May 2009 10:37:46 -0700
parents 320cfcba8058
children 7c60d6d1c681
line wrap: on
line diff
--- 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"));