Mercurial > libpst
changeset 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 | ffd1503a7530 |
children | 7c60d6d1c681 |
files | ChangeLog src/readpst.c xml/libpst.in |
diffstat | 3 files changed, 2 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- 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) ===============================
--- 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"));
--- 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 @@ <title>Synopsis</title> <cmdsynopsis> <command>readpst</command> - <arg><option>-C</option></arg> <arg><option>-D</option></arg> <arg><option>-M</option></arg> <arg><option>-S</option></arg> @@ -83,12 +82,6 @@ <title>Options</title> <variablelist> <varlistentry> - <term>-C</term> - <listitem><para> - Decrypt the entire pst file and dump it to stdout. - </para></listitem> - </varlistentry> - <varlistentry> <term>-D</term> <listitem><para> Include deleted items in the output.