changeset 1:43e8802f08c5 debian libpst_0_5_1

imported from debian 0.5.1
author carl
date Thu, 23 Dec 2004 11:17:37 -0800
parents 6b1b602514db
children
files ChangeLog LICENSE Makefile TODO VERSION libpst.h libstrfunc.c libstrfunc.h lspst.c lzfu.c moz-script readlog.vcproj readpst.1 readpst.c readpstlog.1 setup1.vdproj timeconv.c w32pst.sln w32pst.vcproj
diffstat 19 files changed, 2927 insertions(+), 481 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ChangeLog	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,369 @@
+LibPST 0.5.1 (17 November 2004)
+===============================
+
+Well, alot has happened since the last release of libpst.
+
+Release / Management:
+
+	* The project has forked! The new maintainer is Joseph Nahmias.
+	* We have changed hosting sites, thanks to sourceforge for hosting
+	to this point.  From this point forward we will be using
+	alioth.debian.org.
+	* The project is now using SubVersioN for source control.  You can
+	get the latest code by running:
+		svn co svn://svn.debian.org/svn/libpst/trunk .
+	* See
+	<http://lists.alioth.debian.org/pipermail/libpst-devel/2004-November/000000.html>
+	for more information.
+
+Code Changes:
+
+	* Added lspst program to list items in a PST.  Still incomplete.
+	* Added vim folding markers to readpst.c
+	* avoid the pseudo-prologue that MS prepends to the email headers
+	* fix build on msvc, since it doesn't have sys/param.h
+	* Re-vamped Makefile:
+		* Only define CFLAGS in Makefileif missing
+		* fixed {un,}install targets in Makefile
+		* Fixed up build process in Makefile
+	* Added mozilla conversion script from David Binard
+	* Fixed bogus creation of readpst.log on every invocation
+	* escaped dashes and apostrophe in manpages
+	* Updated TODO
+	* added manpages from debian pkg
+	* fix escaped-string length count to consider '\n',
+		thanks to Paul Bakker <bakker@fox-it.com>.
+	* ensure there's a blank line between header and body
+		patch from <johnh@aproposretail.com> (SourceForge #890745).
+	* Apply accumulated endian-related patches
+	* Removed unused files, upstream's debian/ dir
+
+-- Joe Nahmias <joe@nahmias.net>
+
+LibPST v0.5
+===========
+
+It is with GREAT relief that I bring you version 0.5 of the LibPST tools!
+
+Through great difficulties, this tool has survived and expanded to become even
+better.
+
+The changes are as follows:
+  * RTF support. We can now decompress RTF bodies in emails, and are saved as attachments
+  * Better support in reading the indexes. Fixed many bugs with them
+  * Improved reliability. "Now we are getting somewhere!"
+  * Improved compiling. Hopefully we won't be hitting too many compile errors now.
+  * vCard handling. Contacts are now exported as vCard entries.
+  * vEvent handling. Support has begun on exporting Calendar entries as events
+  * Support for Journal entries has also begun
+
+If you have any problems with this release, don't hesitate to contact me.
+
+These changes come to you, as always, free under the GPL license!! What a wonderful
+thing it is. It does mean that you can write your own program off of this library
+and distribute it also for free. However, anyone with commercial interests for
+developing applications they will be charging for are encouraged to get in touch
+with me, as I am sure we can come to some arrangement.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.4.3
+=============
+
+Bug fix release. No extra functionality
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.4.2
+=============
+
+The debug system has had an overhaul. The debug messages are no longer
+printed to the screen when they are enabled. They are dumped to a
+binary file. There is another utility called "readlog" that I have
+written to handle these log files. It should make it easier to
+selectively view bits of a log file. It also shows the position that
+the log message was printed from.
+
+There is a new switch in readpst. It is -d. It enables the user to
+specify the log file which the binary log is written to. If the switch
+isn't used, the default file of "readpst.log" is used.
+
+The code is now Visual C++ compatible. It has compiled on Visual C++
+.net Standard edition, and produces the readpst.exe file. Use the project
+file included in this distribution.
+
+There have been minor improvements elsewhere too.
+
+
+LibPST v0.4.1
+=============
+
+Fixed a couple more bugs. Is it me or do bugs just insert themselves
+in random, hard to find places!
+
+Cured a few problems with regard to emails with multiple embeded
+items. They are not fully re-created using Mime-types, but are
+accessible with the -S switch (which saves everything as seperate
+items)
+
+Fixed a problem reading the first index. Back sliders are now
+detected. (ie when the value following the current one is smaller, not
+bigger!)
+
+Added some error messages when we try and read outside of the PST
+file, this was causing a few problems before, cause the return value
+wasn't always checked, so it was possible to be reading random data,
+and trying to make sense of it!
+
+Anyway, if you find any problems, don't hesitate to mail me
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.4
+===========
+
+Fixed a nasty bug that occasionally corrupted attachments. Another bug
+with regard to reading of indexes (also occasional).
+
+Another output method has been added which is called "Seperate". It is
+activated with the -S switch. It operates in the following manor:
+
+  |--Inbox-->000000
+  |	     000001
+  |	     000002
+  |--Sentmail-->0000000
+  |		0000001
+  |		0000002
+
+All the emails are stored in seperate files counting from 0 upwards,
+in a folder named as the PST folder.
+
+When an email has an attachment, it is saved as a seperate file. The
+filename for the attachment is made up of 2 parts, the first is the
+email number to which it belongs, the second is its filename.
+
+The should now be runnable on big-endian machines, if the define.h
+file is first modified. The #define LITTLE_ENDIAN must be commented
+out, and the #define BIG_ENDIAN must be uncommented.
+
+More verbose error messages have been added. Apparently people got
+confused when the program stopped for no visible reason. This has now
+been resolved.
+
+Thanks for the continued support of all people involved.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+Libpst v0.3.4
+=============
+
+Several more fixes. An Infinite loop and incorrect interpreting of
+item index attributes. Work has started on making the code executable
+on big endian CPUs. At present it should work with Linux on these
+CPUs, but I would appreciate it if you could provide feedback with
+regard to it's performance. I am also working with some other people
+at make it operate on Solaris.
+
+A whole load more items are now recognized by the Item records. With
+more items in Emails and Folders. I haven't got to the Contacts yet.
+
+Anyway, this is what I would call a minor feature enhancment and
+bugfix release.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.3.3
+=============
+
+Fixed several items. Mainly memory leaks. Loads of them! oops..
+
+I have added a new program, mainly of debugging, which when passed
+an ID value and a pst file, will extract and decrypt that ID from 
+the pst file. I don't see it being a huge attraction, or of much use
+to most people, but it is another example of writing an application
+to use the libpst interface.
+
+Another fix was in the reading of the item index. This has hopefully
+now been corrected. The result of this bug was that not all the emails
+in a folder were converted. Hopefully you should have more luck now.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.3.2
+=============
+
+Quick bugfix release. There was a bug in the decryption of the basic
+encryption that outlook uses. One byte, 0x6c, was incorrectly decrypted
+to 0x6c instead of 0xcd. This release fixes this bug. Sorry...
+
+
+LibPST v0.3.1
+=============
+
+Minor improvements. Fixed bug when linking multiple blocks together,
+so now the linking blocks are not "encrypted" when trying to read
+them.
+
+
+LibPST v0.3
+===========
+
+A lot of bug fixing has been done for this release. Testing has been
+done on the creation of the files by readpst.  Better handling of
+large binaries being extracted from the PST file has been implemented.
+
+Quite a few reports have come in about not being able to compile on
+Darwin. This could be down to using macros with variable parameter
+lists. This has now been changed to use C functions with variable
+parameters. I hope this fixes a lot of problems.
+
+Added support for recreating the folder structure into normal
+directories. For Instance:
+
+Personal Folders
+  |-Inbox
+  |   |-Jokes
+  |   |-Meetings
+  |-Send Items
+
+each folder containing an mbox file with the correct emails for that
+folder.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+
+LibPST v0.3 beta1
+=================
+
+Again, a shed load of enhancements. More work has been done on the
+mime creation. A bug has been fixed that was letting part of the
+attachments that were created disappear. 
+
+A major enhancement is that "compressible encryption" support has been
+added. This was an incredibly simple method to use. It is basically a
+ceasar cipher. It has been noted by several users already that the PST
+password that Outlook uses, serves *no purpose*. It is not used to
+encrypt the PST, it is mearly stored there. This means that the
+readpst application is able to convert PST files without knowing the
+password. Microsoft have some explaning to do!
+
+Output files are now not overwritten if they already exist. This means
+that if you have two folders in your PST file named "fred", the first
+one encountered will be named "fred" and the second one will be named
+"fred00000001". As you can see, there is enough room there for many
+duplicate names!
+
+Output filenames are now restricted. Any "/" or "\" characters in the
+name are replaced with "_". If you find that there are any other
+characters that need to be changed, could you please make me aware!
+
+Thanks to Berry Wizard for help with supporting the encryption.
+
+Thanks to Auke Kok, Carolus Walraven and Yogesh Kumar Guatam for providing debugging
+information and testing.
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+
+LibPST v0.2 beta1
+=================
+
+Hello once more...
+
+Attachments are now re-created in mime format. The method is very
+crude and could be prone to over generalisation. Please test this
+version, and if attachments are not recreated correctly, please send
+me the email (complete message source) of the original and
+converted. Cheers.
+
+I hope this will work for everyone who uses this program, but reality
+can be very different!
+
+Let us see how it goes...
+
+Dave Smith
+<dave.s@earthcorp.com>
+
+LibPST v0.2 alpha1
+===========
+
+Hello!
+
+Some improvements. The internal code has been changed so that
+attachments are now processed and loaded into the structures. The
+readpst program is not finished yet. It needs to convert these binary
+structs into mime data. At present it just saves them to the current
+directory, overwriting any previous files with the attachment name.
+
+Improvements over previous version: 
+* KMail output is supported - if the "-k" flag is specified, all the
+  directory hierarchy is created using the KMail standard
+* Lots of bugs and memory leaks fixed
+
+
+Usage:
+
+ReadPST v0.2alpha1 implementing LibPST v0.2alpha1
+Usage: ./readpst [OPTIONS] {PST FILENAME}
+OPTIONS:
+        -h      - Help. This screen
+        -k      - KMail. Output in kmail format
+        -o      - Output Dir. Directory to write files to. CWD is changed *after* opening pst file
+        -V      - Version. Display program version
+
+If you want to view lots of debug output, modify a line in "define.h"
+from "//#define DEBUG_ALL" to "#define DEBUG_ALL". It would then be
+advisable to pipe all output to a log file:
+
+./readpst -o out pst_file &> logfile
+
+Dave Smith
+
+LibPST v0.1
+===========
+
+Hi Folks!
+
+This has been a long, hard slog, but I now feel that I have got
+somewhere useful. The included program "main" is able to read an
+Outlook PST file and dump the emails into mbox files, separating each
+folder into a different mbox file. All the mbox files are stored in
+the current directory and no attempt is yet made to organise these
+files into a directory hierarchy. This would not be too difficult to
+achieve though.
+
+Email attachments are not yet handled, neither are Contacts.
+
+There is no pretty interface yet, but you can convert a PST file in
+the following manner
+
+./main {path to PST file}
+
+This is very much a work in progress, but I thought I should release
+this code so that people can lose their conception that outlook files
+will never be converted to Linux.
+
+I am intending that the code I am writing will be developed into
+greater applications to provide USEFUL tools for accessing and
+converting PST files into a variety of formats.
+
+One point I feel I should make is that Outlook, by default, creates
+"Compressible Encryption" PST files. I have not, as yet, attempted to
+write any decryption routines, so you will not be able to convert
+these files. However, if you create a new PST file and choose not to
+make an encrypted one, you can copy all your emails into this new one
+and then convert the unencrypted one.
+
+I hope you enjoy,
+
+Dave Smith
+
+: vim: set tw=72 sw=4 ts=4:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,280 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
--- a/Makefile	Fri Jul 09 07:26:16 2004 -0700
+++ b/Makefile	Thu Dec 23 11:17:37 2004 -0800
@@ -1,47 +1,78 @@
-GCC_FLAGS=-g ${CFLAGS}
+#!/usr/bin/make -f
 
-all: readpst getidblock readpstlog dumpblocks
+CFLAGS  ?= -g -Wall
+PREFIX ?= /usr/local
+INSTALL ?= install
 
-libpst.o: libpst.c libpst.h define.h
-	gcc ${GCC_FLAGS} -c libpst.c -o libpst.o
+#---------------- Do not modify below this point ------------------
 
-libstrfunc.o: libstrfunc.c libstrfunc.h
-	gcc ${GCC_FLAGS} -c libstrfunc.c -o libstrfunc.o
+INSTALL_DIR     := $(INSTALL) -p -d -o root -g root -m 0755
+INSTALL_FILE    := $(INSTALL) -p    -o root -g root -m 0644
+INSTALL_PROGRAM := $(INSTALL) -p    -o root -g root -m 0755 # -s
+INSTALL_SCRIPT  := $(INSTALL) -p    -o root -g root -m 0755
+
+VERSION = $(shell cat VERSION)
 
-debug.o: debug.c define.h
-	gcc ${GCC_FLAGS} -c debug.c -o debug.o
+DOCS := AUTHORS ChangeLog CREDITS FILE-FORMAT FILE-FORMAT.html LICENSE TODO \
+	VERSION
 
-lzfu.o: lzfu.c define.h
-	gcc ${GCC_FLAGS} -c lzfu.c -o lzfu.o
+DISTFILES := $(DOCS) Makefile setup1.vdproj XGetopt.c XGetopt.h common.h \
+	debug.c define.h dumpblocks.c getidblock.c libpst.c libpst.h \
+	libstrfunc.c libstrfunc.h lspst.c lzfu.c lzfu.h moz-script \
+	readlog.vcproj readpst.1 readpst.c readpstlog.1 readpstlog.c \
+	testdebug.c timeconv.c timeconv.h w32pst.sln w32pst.vcproj
 
-readpst: readpst.c define.h libpst.o timeconv.o libstrfunc.o common.h debug.o lzfu.o
-#	ccmalloc gcc -Wall -Werror readpst.c -g -o readpst libpst.o timeconv.o libstrfunc.o debug.o
-#	gcc -Wall -Werror readpst.c -g -o readpst libpst.o timeconv.o libstrfunc.o debug.o lzfu.o -lefence
-	gcc ${GCC_FLAGS} readpst.c -o readpst libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
+PROGS := lspst readpst readpstlog
+ALL_PROGS := $(PROGS) dumpblocks getidblock testdebug
 
-timeconv.o: timeconv.c timeconv.h common.h
-	gcc ${GCC_FLAGS} -c timeconv.c -o timeconv.o
+all: $(PROGS)
 
-getidblock: getidblock.c define.h libpst.o common.h debug.o libstrfunc.o
-	gcc ${GCC_FLAGS} getidblock.c -o getidblock libpst.o debug.o timeconv.o libstrfunc.o
-
-testdebug: testdebug.c define.h debug.o
-	gcc ${GCC_FLAGS} testdebug.c -o testdebug debug.o libstrfunc.o
+XGetopt.o: XGetopt.h
+debug.o: define.h
+dumpblocks.o: define.h
+getidblock.o: XGetopt.h define.h libpst.h
+libpst.o: define.h libstrfunc.h libpst.h timeconv.h
+libstrfunc.o: libstrfunc.h
+lspst.o: libpst.h timeconv.h
+lzfu.o: define.h libpst.h lzfu.h
+readpst.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
+readpstlog.o: XGetopt.h define.h
+testdebug.o: define.h
+timeconv.o: timeconv.h common.h
 
-readpstlog: readpstlog.c define.h debug.o
-	gcc ${GCC_FLAGS} readpstlog.c -g -o readpstlog debug.o libstrfunc.o
-
-dumpblocks: dumpblocks.c define.h libpst.o debug.o
-	gcc ${GCC_FLAGS} dumpblocks.c -o dumpblocks libpst.o debug.o libstrfunc.o timeconv.o
+readpst: readpst.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
+lspst: debug.o libpst.o libstrfunc.o lspst.o timeconv.o
+getidblock: getidblock.o libpst.o debug.o libstrfunc.o
+testdebug: testdebug.o debug.o
+readpstlog: readpstlog.o debug.o
+dumpblocks: dumpblocks.o libpst.o debug.o libstrfunc.o
 
 clean: 
-	rm -f core readpst libpst.o timeconv.o libstrfunc.o debug.o getidblock readpstlog testdebug dumpblocks lzfu.o *~ 
+	rm -f core *.o readpst.log $(ALL_PROGS) *~ MANIFEST
 
-rebuild: clean all
+distclean: clean
+	rm -f libpst-*.tar.gz
 
 install: all
-	cp readpst /usr/local/bin
-	cp readpstlog /usr/local/bin/readpstlog
+	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin
+	$(INSTALL_PROGRAM) readpst{,log} $(DESTDIR)$(PREFIX)/bin
+	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1
+	$(INSTALL_FILE) readpst{,log}.1 $(DESTDIR)$(PREFIX)/share/man/man1/
+	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/doc/libpst
+	$(INSTALL_FILE) $(DOCS) $(DESTDIR)$(PREFIX)/share/doc/libpst/
+
 uninstall:
-	rm -f /usr/local/bin/readpst
-	rm -f /usr/local/bin/readpstlog
+	-rm -f $(DESTDIR)$(PREFIX)/bin/readpst{,log}
+	-rm -f $(DESTDIR)$(PREFIX)/share/man/man1/readpst{,log}.1
+
+# stolen from ESR's Software Release Practices HOWTO available at:
+# http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/distpractice.html
+MANIFEST: Makefile
+	@ls $(DISTFILES) | sed s:^:libpst-$(VERSION)/: >MANIFEST
+tarball libpst-$(VERSION).tar.gz: MANIFEST $(DISTFILES)
+	@(cd ..; ln -s libpst libpst-$(VERSION))
+	(cd ..; tar -czvf libpst/libpst-$(VERSION).tar.gz `cat libpst/MANIFEST`)
+	@(cd ..; rm libpst-$(VERSION))
+	@rm -f MANIFEST
+
+.PHONY: clean distclean uninstall install tarball
--- a/TODO	Fri Jul 09 07:26:16 2004 -0700
+++ b/TODO	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,4 @@
+Stuff from SourceForge project:
+-------------------------------
+[ 815762 ] Support for listing and item extraction in readpst <http://sourceforge.net/tracker/index.php?func=detail&aid=938792&group_id=18756&atid=318756>
+[ 835648 ] readpst doesn't check open() result <http://sourceforge.net/tracker/index.php?func=detail&aid=835648&group_id=18756&atid=218756>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VERSION	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,1 @@
+0.5.1
--- a/libpst.h	Fri Jul 09 07:26:16 2004 -0700
+++ b/libpst.h	Thu Dec 23 11:17:37 2004 -0800
@@ -29,7 +29,11 @@
 
 // According to Jan Wolter, sys/param.h is the most portable source of endian
 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
-#include <sys/param.h>
+#ifdef _MSC_VER
+  #define BYTE_ORDER LITTLE_ENDIAN
+#else
+  #include <sys/param.h>
+#endif // defined _MSC_VER
 
 #if BYTE_ORDER == BIG_ENDIAN
 #  define LE64_CPU(x) \
@@ -67,7 +71,7 @@
 #endif // _MSC_VER
 
 
-#define PST_VERSION "0.5"
+#define PST_VERSION "0.5.1"
 
 #define PST_TYPE_NOTE 1
 #define PST_TYPE_APPOINTMENT 8
@@ -504,4 +508,5 @@
 int32_t _pst_printIDptr(pst_file* pf);
 int32_t _pst_printID2ptr(pst_index2_ll *ptr);
 void * xmalloc(size_t size);
-#endif
+
+#endif // defined LIBPST_H
--- a/libstrfunc.c	Fri Jul 09 07:26:16 2004 -0700
+++ b/libstrfunc.c	Thu Dec 23 11:17:37 2004 -0800
@@ -1,68 +1,69 @@
-
-/* Taken from LibStrfunc v7.3 */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-char *_sf_b64_buf=NULL;
-size_t _sf_b64_len=0;
-
-
-static unsigned char _sf_uc_ib[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/==";
-
-char *
-base64_encode(void *data, size_t size) {
-  char *output;
-  register char *ou;
-  register unsigned char *p=(unsigned char *)data;
-#ifdef __LINUX__
-  register void * dte = ((char*)data + size);
-#endif
-
-#ifndef  __LINUX__
-  register void * dte = (void*)((char*)data + size);
-#endif
-  //register void *dte=data + size;
-  register int nc=0;
-  
-  if(data == NULL)
-    return NULL;
-  
-  ou=output=(char *)malloc(size / 3 * 4 + (size / 50) + 5);
-  if(!output)
-    return NULL;
-  
-  while((char *)dte - (char *)p >= 3) {
-    *ou = _sf_uc_ib[ *p >> 2 ];
-    ou[1] = _sf_uc_ib[ ((*p & 0x03) << 4) | (p[1] >> 4) ];
-    ou[2] = _sf_uc_ib[ ((p[1] & 0x0F) << 2) | (p[2] >> 6) ];
-    ou[3] = _sf_uc_ib[ p[2] & 0x3F ];
-    
-    p+=3;
-    ou+=4;
-    
-    nc+=4;
-    if(!(nc % 76)) *ou++='\n';
-  };
-  if((char *)dte - (char *)p == 2) {
-    *ou++ = _sf_uc_ib[ *p >> 2 ];
-    *ou++ = _sf_uc_ib[ ((*p & 0x03) << 4) | (p[1] >> 4) ];
-    *ou++ = _sf_uc_ib[ ((p[1] & 0x0F) << 2) ];
-    *ou++ = '=';
-  } else if((char *)dte - (char *)p == 1) {
-    *ou++ = _sf_uc_ib[ *p >> 2 ];
-    *ou++ = _sf_uc_ib[ ((*p & 0x03) << 4) ];
-    *ou++ = '=';
-    *ou++ = '=';
-  };
-  
-  *ou=0;
-  
-  _sf_b64_len = (ou - output);
-  
-  if(_sf_b64_buf)
-    free(_sf_b64_buf);
-  return _sf_b64_buf=output;
-};
-
+
+/* Taken from LibStrfunc v7.3 */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include "libstrfunc.h"
+
+char *_sf_b64_buf=NULL;
+size_t _sf_b64_len=0;
+
+
+static unsigned char _sf_uc_ib[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/==";
+
+char *
+base64_encode(void *data, size_t size) {
+  char *output;
+  register char *ou;
+  register unsigned char *p=(unsigned char *)data;
+#ifdef __LINUX__
+  register void * dte = ((char*)data + size);
+#endif
+
+#ifndef  __LINUX__
+  register void * dte = (void*)((char*)data + size);
+#endif
+  //register void *dte=data + size;
+  register int nc=0;
+  
+  if(data == NULL)
+    return NULL;
+  
+  ou=output=(char *)malloc(size / 3 * 4 + (size / 50) + 5);
+  if(!output)
+    return NULL;
+  
+  while((char *)dte - (char *)p >= 3) {
+    *ou = _sf_uc_ib[ *p >> 2 ];
+    ou[1] = _sf_uc_ib[ ((*p & 0x03) << 4) | (p[1] >> 4) ];
+    ou[2] = _sf_uc_ib[ ((p[1] & 0x0F) << 2) | (p[2] >> 6) ];
+    ou[3] = _sf_uc_ib[ p[2] & 0x3F ];
+    
+    p+=3;
+    ou+=4;
+    
+    nc+=4;
+    if(!(nc % 76)) *ou++='\n';
+  };
+  if((char *)dte - (char *)p == 2) {
+    *ou++ = _sf_uc_ib[ *p >> 2 ];
+    *ou++ = _sf_uc_ib[ ((*p & 0x03) << 4) | (p[1] >> 4) ];
+    *ou++ = _sf_uc_ib[ ((p[1] & 0x0F) << 2) ];
+    *ou++ = '=';
+  } else if((char *)dte - (char *)p == 1) {
+    *ou++ = _sf_uc_ib[ *p >> 2 ];
+    *ou++ = _sf_uc_ib[ ((*p & 0x03) << 4) ];
+    *ou++ = '=';
+    *ou++ = '=';
+  };
+  
+  *ou=0;
+  
+  _sf_b64_len = (ou - output);
+  
+  if(_sf_b64_buf)
+    free(_sf_b64_buf);
+  return _sf_b64_buf=output;
+};
+
--- a/libstrfunc.h	Fri Jul 09 07:26:16 2004 -0700
+++ b/libstrfunc.h	Thu Dec 23 11:17:37 2004 -0800
@@ -1,2 +1,2 @@
-
-char * base64_encode(void *data, size_t size);
+
+char * base64_encode(void *data, size_t size);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lspst.c	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,424 @@
+/***
+ * lspst.c
+ * Part of the LibPST project
+ * Author: Joe Nahmias <joe@nahmias.net>
+ * Based on readpst.c by by David Smith <dave.s@earthcorp.com>
+ *
+ */
+
+// header file includes {{{1
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "libpst.h"
+#include "define.h"
+#include "timeconv.h"
+// }}}1
+// struct file_ll {{{1
+struct file_ll {
+	char *name;
+	char *dname;
+	FILE * output;
+	int32_t stored_count;
+	int32_t email_count;
+	int32_t skip_count;
+	int32_t type;
+	struct file_ll *next;
+};
+// }}}1
+// Function Declarations {{{1
+void canonicalize_filename(char *fname);
+int chr_count(char *str, char x);
+void debug_print(char *fmt, ...);
+char *rfc2426_escape(char *str);
+char *rfc2445_datetime_format(FILETIME *ft);
+// }}}1
+#define DEBUG_MAIN(x) debug_print x;
+// int main(int argc, char** argv) {{{1
+int main(int argc, char** argv) {
+
+	// declarations {{{2
+	pst_item *item = NULL;
+	pst_file pstfile;
+	pst_desc_ll *d_ptr;
+	char *temp = NULL; //temporary char pointer
+	int skip_child = 0;
+	struct file_ll  *f, *head;
+	// }}}2
+
+	if (argc <= 1)
+		DIE(("Missing PST filename.\n"));
+
+	// Open PST file
+	if ( pst_open(&pstfile, argv[1], "r") )
+		 DIE(("Error opening File\n"));
+	// Load PST index
+	if ( pst_load_index(&pstfile) )
+		DIE(("Index Error\n"));
+	pst_load_extended_attributes(&pstfile);
+
+	d_ptr = pstfile.d_head; // first record is main record
+	if ((item = _pst_parse_item(&pstfile, d_ptr)) == NULL || item->message_store == NULL) {
+		DIE(("main: Could not get root record\n"));
+	}
+	
+	// default the file_as to the same as the main filename if it doesn't exist
+	if (item->file_as == NULL) {
+		if ((temp = strrchr(argv[1], '/')) == NULL)
+			if ((temp = strrchr(argv[1], '\\')) == NULL)
+				temp = argv[1];
+			else
+				temp++; // get past the "\\"
+		else
+			temp++; // get past the "/"
+		item->file_as = (char*)xmalloc(strlen(temp)+1);
+		strcpy(item->file_as, temp);
+	}
+	fprintf(stderr, "item->file_as = '%s'.\n", item->file_as);
+
+	// setup head file_ll
+	head = (struct file_ll*) malloc(sizeof(struct file_ll));
+	memset(head, 0, sizeof(struct file_ll));
+	head->email_count = 0;
+	head->skip_count = 0;
+	head->next = NULL;
+	head->name = "mbox";
+	head->dname = (char*) malloc(strlen(item->file_as)+1);
+	strcpy(head->dname, item->file_as);
+	head->type = item->type;
+	DEBUG_MAIN(("head @ %p: name = '%s', dname = '%s', next = %p.\n", head, head->name, head->dname, head->next));
+
+	if ((d_ptr = pst_getTopOfFolders(&pstfile, item)) == NULL) {
+		DIE(("Top of folders record not found. Cannot continue\n"));
+	}
+	DEBUG_MAIN(("d_ptr(TOF) = %p.\n", d_ptr));
+
+	if (item){
+		_pst_freeItem(item);
+		item = NULL;
+	}
+
+	d_ptr = d_ptr->child; // do the children of TOPF
+	DEBUG_MAIN(("d_ptr(TOF->child) = %p.\n", d_ptr));
+
+	DEBUG_MAIN(("main: About to do email stuff\n"));
+	while (d_ptr != NULL) {
+		// Process d_ptr {{{2
+		DEBUG_MAIN(("main: New item record, d_ptr = %p.\n", d_ptr));
+		if (d_ptr->desc == NULL) {
+			DEBUG_WARN(("main: ERROR ?? item's desc record is NULL\n"));
+			f->skip_count++;
+			goto check_parent;
+		}
+		DEBUG_MAIN(("main: Desc Email ID %x [d_ptr->id = %x]\n", d_ptr->desc->id, d_ptr->id));
+
+		item = _pst_parse_item(&pstfile, d_ptr);
+		DEBUG_MAIN(("main: About to process item @ %p.\n", item));
+		if (item != NULL) {
+
+			// there should only be one message_store, and we have already
+			// done it
+			if (item->message_store != NULL) {
+				DIE(("ERROR(main): A second message_store has been found.\n"));
+			}
+
+			if (item->folder != NULL) {
+				// Process Folder item {{{3
+				// if this is a folder, we want to recurse into it
+				printf("Folder");
+				if (item->file_as != NULL)
+						printf("\t%s/", item->file_as);
+				printf("\n");
+
+				DEBUG_MAIN(("main: I think I may try to go into folder \"%s\"\n", item->file_as));
+				f = (struct file_ll*) malloc(sizeof(struct file_ll));
+				memset(f, 0, sizeof(struct file_ll));
+				f->next = head;
+				f->email_count = 0;
+				f->type = item->type;
+				f->stored_count = item->folder->email_count;
+				head = f;
+				f->name = "mbox";
+				f->dname = (char*) xmalloc(strlen(item->file_as)+1);
+				strcpy(f->dname, item->file_as);
+
+				DEBUG_MAIN(("main: f->name = %s\nitem->folder_name = %s\n", f->name, item->file_as));
+				canonicalize_filename(f->name);
+
+				if (d_ptr->child != NULL) {
+					d_ptr = d_ptr->child;
+					skip_child = 1;
+				} else {
+					DEBUG_MAIN(("main: Folder has NO children. Creating directory, and closing again\n"));
+					// printf("\tNo items to process in folder \"%s\", should have been %i\n", f->dname, f->stored_count);
+					head = f->next;
+					if (f->output != NULL)
+						fclose(f->output);
+					free(f->dname);
+					free(f->name);
+					free(f);
+		
+					f = head;
+				}
+				_pst_freeItem(item);
+				item = NULL; // just for the odd situations!
+				goto check_parent;
+				// }}}3
+			} else if (item->contact != NULL) {
+				// Process Contact item {{{3
+				if (f->type != PST_TYPE_CONTACT) {
+					DEBUG_MAIN(("main: I have a contact, but the folder isn't a contacts folder. "
+							 "Will process anyway\n"));
+				}
+				if (item->type != PST_TYPE_CONTACT) {
+					DEBUG_MAIN(("main: I have an item that has contact info, but doesn't say that"
+							 " it is a contact. Type is \"%s\"\n", item->ascii_type));
+					DEBUG_MAIN(("main: Processing anyway\n"));
+				}
+
+				printf("Contact");
+				if (item->contact->fullname != NULL)
+					printf("\t%s", rfc2426_escape(item->contact->fullname));
+				printf("\n");
+				// }}}3
+			} else if (item->email != NULL &&
+		 			(item->type == PST_TYPE_NOTE || item->type == PST_TYPE_REPORT)) {
+				// Process Email item {{{3
+				printf("Email");
+				if (item->email->outlook_sender_name != NULL)
+					printf("\tFrom: %s", item->email->outlook_sender_name);
+				if (item->email->subject->subj != NULL)
+					printf("\tSubject: %s", item->email->subject->subj);
+				printf("\n");
+				// }}}3
+			} else if (item->type == PST_TYPE_JOURNAL) {
+				// Process Journal item {{{3
+				if (f->type != PST_TYPE_JOURNAL) {
+					DEBUG_MAIN(("main: I have a journal entry, but folder isn't specified as a journal type. Processing...\n"));
+				}
+
+				printf("Journal\t%s\n", rfc2426_escape(item->email->subject->subj));
+				// }}}3
+			} else if (item->type == PST_TYPE_APPOINTMENT) {
+				// Process Calendar Appointment item {{{3
+				// deal with Calendar appointments
+
+				DEBUG_MAIN(("main: Processing Appointment Entry\n"));
+				if (f->type != PST_TYPE_APPOINTMENT) {
+					DEBUG_MAIN(("main: I have an appointment, but folder isn't specified as an appointment type. Processing...\n"));
+				}
+
+				printf("Appointment");
+				if (item->email != NULL && item->email->subject != NULL)
+					printf("\tSUMMARY: %s", rfc2426_escape(item->email->subject->subj));
+				if (item->appointment != NULL && item->appointment->start != NULL)
+					printf("\tSTART: %s", rfc2445_datetime_format(item->appointment->start));
+				printf("\n");
+
+				// }}}3
+			} else {
+				f->skip_count++;
+				DEBUG_MAIN(("main: Unknown item type. %i. Ascii1=\"%s\"\n", \
+					item->type, item->ascii_type));
+			}
+		} else {
+			f->skip_count++;
+			DEBUG_MAIN(("main: A NULL item was seen\n"));
+		}
+
+		check_parent:
+		//    _pst_freeItem(item);
+		while (!skip_child && d_ptr->next == NULL && d_ptr->parent != NULL) {
+			DEBUG_MAIN(("main: Going to Parent\n"));
+			head = f->next;
+			if (f->output != NULL)
+				fclose(f->output);
+			DEBUG_MAIN(("main: Email Count for folder %s is %i\n", f->dname, f->email_count));
+			/*
+			printf("\t\"%s\" - %i items done, skipped %i, should have been %i\n", \
+					f->dname, f->email_count, f->skip_count, f->stored_count);
+			*/
+
+			free(f->name);
+			free(f->dname);
+			free(f);
+			f = head;
+			if (head == NULL) { //we can't go higher. Must be at start?
+				DEBUG_MAIN(("main: We are now trying to go above the highest level. We must be finished\n"));
+				break; //from main while loop
+			}
+			d_ptr = d_ptr->parent;
+			skip_child = 0;
+		}
+
+		if (item != NULL) {
+			DEBUG_MAIN(("main: Freeing memory used by item\n"));
+			_pst_freeItem(item);
+			item = NULL;
+		}
+
+		if (!skip_child)
+			d_ptr = d_ptr->next;
+		else 
+			skip_child = 0;
+		
+		if (d_ptr == NULL) { DEBUG_MAIN(("main: d_ptr is now NULL\n")); }
+
+	// }}}2
+	} // end while(d_ptr != NULL)
+	DEBUG_MAIN(("main: Finished.\n"));
+
+	// Cleanup {{{2
+	pst_close(&pstfile);
+	while (f != NULL) {
+		if (f->output != NULL)
+			fclose(f->output);
+		free(f->name);
+		free(f->dname);
+
+		head = f->next;
+		free(f);
+		f = head;
+	}
+	DEBUG_RET();
+	// }}}2
+
+	return 0;
+}
+// }}}1
+// void canonicalize_filename(char *fname) {{{1
+// This function will make sure that a filename is in cannonical form.  That
+// is, it will replace any slashes, backslashes, or colons with underscores.
+void canonicalize_filename(char *fname) {
+	DEBUG_ENT("canonicalize_filename");
+	if (fname == NULL) {
+		DEBUG_RET();
+		return;
+	}
+	while ((fname = strpbrk(fname, "/\\:")) != NULL)
+		*fname = '_';
+	DEBUG_RET();
+}
+// }}}1
+// int chr_count(char *str, char x) {{{1
+int chr_count(char *str, char x) {
+	int r = 0;
+	if (str == NULL) return 0;
+	while (*str != '\0') {
+		if (*str == x)
+			r++;
+		str++;
+	}
+	return r;
+}
+// }}}1
+// void debug_print(char *fmt, ...) {{{1
+void debug_print(char *fmt, ...) {
+	// shamlessly stolen from minprintf() in K&R pg. 156
+	va_list ap;
+	char *p, *sval;
+	void *pval;
+	int ival;
+	double dval;
+	FILE *fp = stderr;
+
+	va_start(ap, fmt);
+	for(p = fmt; *p; p++) {
+		if (*p != '%') {
+			fputc(*p, fp);
+			continue;
+		}
+		switch (tolower(*++p)) {
+			case 'd': case 'i':
+				ival = va_arg(ap, int);
+				fprintf(fp, "%d", ival);
+				break;
+			case 'f':
+				dval = va_arg(ap, double);
+				fprintf(fp, "%f", dval);
+				break;
+			case 's':
+				for (sval = va_arg(ap, char *); *sval; ++sval)
+					fputc(*sval, fp);
+				break;
+			case 'p':
+				pval = va_arg(ap, void *);
+				fprintf(fp, "%p", pval);
+				break;
+			case 'x':
+				ival = va_arg(ap, int);
+				fprintf(fp, "%#010x", ival);
+				break;
+			default:
+				fputc(*p, fp);
+				break;
+		}
+	}
+	va_end(ap);
+}
+// }}}1
+// char *rfc2426_escape(char *str) {{{1
+char *rfc2426_escape(char *str) {
+	static char *buf = NULL;
+	char *a, *b;
+	int y, z;
+
+	DEBUG_ENT("rfc2426_escape");
+	if (str == NULL) {
+		DEBUG_RET();
+		return NULL;
+	}
+
+	// calculate space required to escape all the commas, semi-colons, backslashes, and newlines
+	y = chr_count(str, ',') + chr_count(str, '\\') + chr_count(str, ';') + chr_count(str, '\n');
+	// count how many carriage-returns we have to skip
+	z = chr_count(str, '\r');
+
+	if (y == 0 && z == 0) {
+		// there isn't any work required
+		DEBUG_RET();
+		return str;
+	}
+
+	buf = (char *) realloc( buf, strlen(str) + y - z + 1 );
+	for (a = str, b = buf; *a != '\0'; ++a, ++b)
+		switch (*a) {
+			case ',' : case '\\': case ';' : case '\n':
+				// insert backslash to escape
+				*(b++) = '\\';
+				*b = *a;
+				break;
+			case '\r':
+				// skip
+				break;
+			default:
+				*b = *a;
+		}
+	*b = '\0';	// NUL-terminate the string
+
+	DEBUG_RET();
+	return buf;
+}  
+// }}}1
+// char *rfc2445_datetime_format(FILETIME *ft) {{{1
+char *rfc2445_datetime_format(FILETIME *ft) {
+	static char* buffer = NULL;
+	struct tm *stm = NULL;
+	DEBUG_ENT("rfc2445_datetime_format");
+	if (buffer == NULL)
+		buffer = malloc(30); // should be enough
+	stm = fileTimeToStructTM(ft);
+	if (strftime(buffer, 30, "%Y%m%dT%H%M%SZ", stm)==0) {
+		DEBUG_INFO(("Problem occured formatting date\n"));
+	}
+	DEBUG_RET();
+	return buffer;
+}
+// }}}1
+
+// vim:sw=4 ts=4:
+// vim600: set foldlevel=0 foldmethod=marker:
--- a/lzfu.c	Fri Jul 09 07:26:16 2004 -0700
+++ b/lzfu.c	Thu Dec 23 11:17:37 2004 -0800
@@ -23,6 +23,8 @@
 #define uint32_t unsigned int
 #endif
 
+#include "lzfu.h"
+
 #define LZFU_COMPRESSED         0x75465a4c
 #define LZFU_UNCOMPRESSED       0x414c454d
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/moz-script	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Helper script to convert to Mozilla mail format
+# Author: David Binard <binard@users.sf.net>
+
+# Taken from:  <http://sourceforge.net/tracker/index.php?func=detail&aid=938792&group_id=18756&atid=318756>
+# Note: this assumes readpst was run with the -r
+# (recursive) option.
+
+
+if [ "$#" != 1 ]; then
+	echo "Usage: `basename $0` <folder>"
+	exit 1
+fi
+
+process_dir() {
+	echo Processing directory "$1"
+	for item in "$1/"*; do
+		if [ -d "$item" ]; then
+			mv "$item" "$item.sbd"
+			touch "$item"
+			process_dir "$item.sbd"
+		elif [ "`basename \"$item\"`" = mbox ]; then
+			mv "$item" "${item%%.sbd/mbox}"
+		else
+			echo ERROR: invalid item "$item"
+			exit 1
+		fi
+	done
+}
+
+item="$1"
+mv "$item" "$item.sbd"
+touch "$item"
+process_dir "$item.sbd"
+
--- a/readlog.vcproj	Fri Jul 09 07:26:16 2004 -0700
+++ b/readlog.vcproj	Thu Dec 23 11:17:37 2004 -0800
@@ -1,132 +1,132 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="readlog"
-	ProjectGUID="{DC5B4944-D652-4761-AF88-9FC2AC321FA1}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/readpstlog.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/readlog.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/readpstlog.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="XGetopt.c">
-			</File>
-			<File
-				RelativePath="debug.c">
-			</File>
-			<File
-				RelativePath="readpstlog.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-			<File
-				RelativePath="XGetopt.h">
-			</File>
-			<File
-				RelativePath="define.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="readlog"
+	ProjectGUID="{DC5B4944-D652-4761-AF88-9FC2AC321FA1}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/readpstlog.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/readlog.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/readpstlog.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="XGetopt.c">
+			</File>
+			<File
+				RelativePath="debug.c">
+			</File>
+			<File
+				RelativePath="readpstlog.c">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="XGetopt.h">
+			</File>
+			<File
+				RelativePath="define.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readpst.1	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,82 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH READPST 1 "February 24, 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+readpst \- convert PST (MS Outlook Personal Folders) files to mbox format
+.SH SYNOPSIS
+.B readpst
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B readpst
+command.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBreadpst\fP is a program that can read an Outlook PST (Personal Folders) file
+and convert it into an mbox file, a format suitable for KMail, a recursive mbox
+structure, or seperate emails.
+.SH OPTIONS
+A summary of options is included below.
+.TP
+.B \-d
+Specify name of debug log file. Defaults to "readpst.log". The log
+file isn\'t an ascii file, it is a binary file readable by \fBreadpstlog\fP.
+.TP
+.B \-h
+Show summary of options.
+.TP
+.B \-k
+Changes the output format to KMail.
+.TP
+.B \-o
+Specifies the output directory. The directory must already exist, and
+is entered after the PST file is opened, but before any processing of
+files commences.
+.TP
+.B \-q
+Changes to silent mode. No feedback is printed to the screen, except
+for error messages.
+.TP
+.B \-r
+Changes the output format to Recursive. This will create folders as
+named in the PST file, and will put all emails in a file called "mbox"
+inside each folder. These files are then compatible with all
+mbox\-compatible email clients.
+.TP
+.B \-S
+Output messages into seperate files. This will create folders as
+named in the PST file, and will put each email in its own file. These
+files will be numbered from 000000000 increasing in intervals of 1 (ie
+000000000, 000000001, 0000000002). Any attachments are saved alongside
+each email as 000000000\-attach0, or with the name of the attachment if
+one is present.
+.TP
+.B \-V
+Show version of program.
+.TP
+.B \-w
+Overwrite any previous output files. \fBBeware\fP: When used with the \-S
+switch, this will remove all files from the target folder before
+writing. This is to keep the count of emails and attachments correct.
+.SH SEE ALSO
+.BR readpstlog (1)
+.SH AUTHOR
+This manual page was written by Dave Smith <dave.s@earthcorp.com>, and updated
+by Joe Nahmias <joe@nahmias.net> for the Debian GNU/Linux system (but may be
+used by others).
--- a/readpst.c	Fri Jul 09 07:26:16 2004 -0700
+++ b/readpst.c	Thu Dec 23 11:17:37 2004 -0800
@@ -4,6 +4,7 @@
  * Written by David Smith
  *            dave.s@earthcorp.com
  */
+// Includes {{{1
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
@@ -36,12 +37,13 @@
 #include "common.h"
 #include "timeconv.h"
 #include "lzfu.h"
-
+// }}}1
+// Defines {{{1
 #define OUTPUT_TEMPLATE "%s"
 #define OUTPUT_KMAIL_DIR_TEMPLATE ".%s.directory"
 #define KMAIL_INDEX ".%s.index"
 
-#define VERSION "0.5"
+#define VERSION "0.5.1"
 // max size of the c_time char*. It will store the date of the email
 #define C_TIME_SIZE 500
 #define PERM_DIRS 0777
@@ -52,7 +54,8 @@
 #else
 #define D_MKDIR(x) mkdir(x)
 #endif
-
+// }}}1
+// struct file_ll {{{1
 struct file_ll {
   char *name;
   char *dname;
@@ -63,8 +66,8 @@
   int32_t type;
   struct file_ll *next;
 };
-
-
+// }}}1
+// Function Declarations {{{1
 void  write_email_body(FILE *f, char *body);
 char *removeCR (char *c);
 int32_t   usage();
@@ -82,10 +85,14 @@
 int32_t chr_count(char *str, char x);
 char *rfc2425_datetime_format(FILETIME *ft);
 char *rfc2445_datetime_format(FILETIME *ft);
-
+char *skip_header_prologue(char *headers);
+// }}}1
+// Global Variables {{{1
 char *prog_name; 
 char *output_dir = "."; 
-
+char *kmail_chdir = NULL;
+// }}}1
+// More Defines {{{1
 // Normal mode just creates mbox format files in the current directory. Each file is named 
 // the same as the folder's name that it represents 
 #define MODE_NORMAL 0 
@@ -119,8 +126,10 @@
 #define RTF_ATTACH_NAME "rtf-body.rtf"
 // mime type for the attachment
 #define RTF_ATTACH_TYPE "application/rtf"
-
+// }}}1
+// int main(int argc, char** argv) {{{1
 int main(int argc, char** argv) {
+  // declarations {{{2
   pst_item *item = NULL;
   pst_file pstfile;
   pst_desc_ll *d_ptr;
@@ -142,6 +151,7 @@
   int skip_child = 0;
   struct file_ll  *f, *head;
   prog_name = argv[0];
+  // }}}2
 
   while ((c = getopt(argc, argv, "d:hko:qrSVwc:"))!= -1) {
     switch (c) {
@@ -191,10 +201,14 @@
     }
   }
 
+#ifdef DEBUG_ALL
+  // initialize log file
   if (d_log == NULL)
     d_log = "readpst.log";
   DEBUG_INIT(d_log);
   DEBUG_REGISTER_CLOSE();
+#endif // defined DEBUG_ALL
+
   DEBUG_ENT("main");
 
   if (argc > optind) {
@@ -340,7 +354,9 @@
       }
 
       
-      if (item->folder != NULL) { //if this is a folder, we want to recurse into it
+      if (item->folder != NULL) {
+	// Process Folder item {{{2
+	// if this is a folder, we want to recurse into it
 	if (output_mode != OUTPUT_QUIET) printf("Processing Folder \"%s\"\n", item->file_as);
 	//	f->email_count++;
 	DEBUG_MAIN(("main: I think I may try to go into folder \"%s\"\n", item->file_as));
@@ -430,7 +446,9 @@
 	_pst_freeItem(item);
 	item = NULL; // just for the odd situations!
 	goto check_parent;
+	// }}}2
       } else if (item->contact != NULL) {
+	// Process Contact item {{{2
 	// deal with a contact
 	// write them to the file, one per line in this format
 	// Desc Name <email@address>\n
@@ -558,8 +576,10 @@
 	    fprintf(f->output, "%s <%s>\n", item->contact->fullname, item->contact->address1);
 	  }
         }
+	// }}}2
       } else if (item->email != NULL &&
 		 (item->type == PST_TYPE_NOTE || item->type == PST_TYPE_REPORT)) {
+	// Process Email item {{{2
 	if (mode == MODE_SEPERATE) {
 	  mk_seperate_file(f);
 	}
@@ -673,10 +693,11 @@
 	  }
 	  
 	  if (mode != MODE_SEPERATE) {
+	    char *soh = NULL;  // real start of headers.
 	    // don't put rubbish in if we are doing seperate
-	    fprintf(f->output, "From \"%s\" %s\n%s\n",
-		    item->email->outlook_sender_name, c_time, item->email->header);
-	    fprintf(f->output, "\n");
+	    fprintf(f->output, "From \"%s\" %s\n", item->email->outlook_sender_name, c_time);
+	    soh = skip_header_prologue(item->email->header);
+	    fprintf(f->output, "%s\n\n", soh);
 	  } else {
 	    fprintf(f->output, "%s\n", item->email->header);
 	  }
@@ -882,7 +903,9 @@
 	    fprintf(f->output, "\n--%s--\n", boundary);
 	  fprintf(f->output, "\n\n");
 	}
+	// }}}2
       } else if (item->type == PST_TYPE_JOURNAL) {
+	// Process Journal item {{{2
 	// deal with journal items
 	if (mode == MODE_SEPERATE) {
 	  mk_seperate_file(f);
@@ -906,7 +929,9 @@
 	if (item->journal->start != NULL)
 	  fprintf(f->output, "DTSTART;VALUE=DATE-TIME:%s\n", rfc2445_datetime_format(item->journal->start));
 	fprintf(f->output, "END:VJOURNAL\n\n");
+	// }}}2
       } else if (item->type == PST_TYPE_APPOINTMENT) {
+	// Process Calendar Appointment item {{{2
 	// deal with Calendar appointments
 	if (mode == MODE_SEPERATE) {
 	  mk_seperate_file(f);
@@ -971,6 +996,7 @@
 	  }
 	}
 	fprintf(f->output, "END:VEVENT\n\n");
+	// }}}2
       } else {
 	f->skip_count++;
 	DEBUG_MAIN(("main: Unknown item type. %i. Ascii1=\"%s\"\n", 
@@ -980,11 +1006,13 @@
       f->skip_count++;
       DEBUG_MAIN(("main: A NULL item was seen\n"));
     }
+
     DEBUG_MAIN(("main: Going to next d_ptr\n"));
     if (boundary) {
       free(boundary);
       boundary = NULL;
     }
+
   check_parent:
     //    _pst_freeItem(item);
     while (!skip_child && d_ptr->next == NULL && d_ptr->parent != NULL) {
@@ -1019,6 +1047,7 @@
       _pst_freeItem(item);
       item = NULL;
     }
+
     if (!skip_child)
       d_ptr = d_ptr->next;
     else 
@@ -1029,8 +1058,9 @@
     }
   }	
   if (output_mode != OUTPUT_QUIET) printf("Finished.\n");
+  DEBUG_MAIN(("main: Finished.\n"));
 
-  DEBUG_MAIN(("main: Finished.\n"));
+  	// Cleanup {{{2
   pst_close(&pstfile);
   //  fclose(pstfile.fp);
   while (f != NULL) {
@@ -1052,9 +1082,12 @@
   }
 
   DEBUG_RET();
+	// }}}2
+
   return 0;
 }
-
+// }}}1
+// void write_email_body(FILE *f, char *body) {{{1
 void write_email_body(FILE *f, char *body) {
   char *n = body;
   //  DEBUG_MAIN(("write_email_body(): \"%s\"\n", body));
@@ -1072,8 +1105,9 @@
   fwrite(body, strlen(body), 1, f);
   DEBUG_RET();
 }
-
-char * removeCR (char *c) {
+// }}}1
+// char *removeCR (char *c) {{{1
+char *removeCR (char *c) {
   // converts /r/n to /n
   char *a, *b;
   DEBUG_ENT("removeCR");
@@ -1088,7 +1122,8 @@
   DEBUG_RET();
   return c;
 }
-    
+// }}}1
+// int usage() {{{1
 int usage() {
   DEBUG_ENT("usage");
   version();
@@ -1107,7 +1142,8 @@
   DEBUG_RET();
   return 0;
 }
-
+// }}}1
+// int version() {{{1
 int version() {
   DEBUG_ENT("version");
   printf("ReadPST v%s implementing LibPST v%s\n", VERSION, PST_VERSION);
@@ -1124,10 +1160,9 @@
   DEBUG_RET();
   return 0;
 }
-
-char *kmail_chdir = NULL;
-
-char* mk_kmail_dir(char *fname) {
+// }}}1
+// char *mk_kmail_dir(char *fname) {{{1
+char *mk_kmail_dir(char *fname) {
   //change to that directory
   //make a directory based on OUTPUT_KMAIL_DIR_TEMPLATE
   //allocate space for OUTPUT_TEMPLATE and form a char* with fname
@@ -1164,7 +1199,8 @@
   DEBUG_RET();
   return out_name;
 }
-
+// }}}1
+// int close_kmail_dir() {{{1
 int close_kmail_dir() {
   // change ..
   int x;
@@ -1181,10 +1217,12 @@
   DEBUG_RET();
   return 0;
 }
-
-char* mk_recurse_dir(char *dir) {
-  // this will create a directory by that name, then make an mbox file inside that dir.
-  // any subsequent dirs will be created by name, and they will contain mbox files
+// }}}1
+// char *mk_recurse_dir(char *dir) {{{1
+// this will create a directory by that name, then make an mbox file inside
+// that dir.  any subsequent dirs will be created by name, and they will
+// contain mbox files
+char *mk_recurse_dir(char *dir) {
   int x;
   char *out_name;
   DEBUG_ENT("mk_recurse_dir");
@@ -1204,7 +1242,8 @@
   DEBUG_RET();
   return out_name;
 }
-
+// }}}1
+// int close_recurse_dir() {{{1
 int close_recurse_dir() {
   int x;
   DEBUG_ENT("close_recurse_dir");
@@ -1215,8 +1254,9 @@
   DEBUG_RET();
   return 0;
 }
-
-char* mk_seperate_dir(char *dir, int overwrite) {
+// }}}1
+// char *mk_seperate_dir(char *dir, int overwrite) {{{1
+char *mk_seperate_dir(char *dir, int overwrite) {
 #if !defined(WIN32) && !defined(__CYGWIN__)
   DIR * sdir = NULL;
   struct dirent *dirent = NULL;
@@ -1282,7 +1322,8 @@
   DEBUG_RET();
   return NULL;
 }
-  
+// }}}1
+// int close_seperate_dir() {{{1
 int close_seperate_dir() {
   int x;
   DEBUG_ENT("close_seperate_dir");
@@ -1293,7 +1334,8 @@
   DEBUG_RET();
   return 0;
 }
-
+// }}}1
+// int mk_seperate_file(struct file_ll *f) {{{1
 int mk_seperate_file(struct file_ll *f) {
   DEBUG_ENT("mk_seperate_file");
   DEBUG_MAIN(("mk_seperate_file: opening next file to save email\n"));
@@ -1311,9 +1353,10 @@
   DEBUG_RET();
   return 0;
 }
-
+// }}}1
+// char *my_stristr(char *haystack, char *needle) {{{1
+char *my_stristr(char *haystack, char *needle) {
 // my_stristr varies from strstr in that its searches are case-insensitive
-char * my_stristr(char *haystack, char *needle) { 
   char *x=haystack, *y=needle, *z = NULL;
   DEBUG_ENT("my_stristr");
   if (haystack == NULL || needle == NULL)
@@ -1334,7 +1377,8 @@
   DEBUG_RET();
   return z;
 }
-
+// }}}1
+// char *check_filename(char *fname) {{{1
 char *check_filename(char *fname) {
   char *t = fname;
   DEBUG_ENT("check_filename");
@@ -1349,7 +1393,8 @@
   DEBUG_RET();
   return fname;
 }
-
+// }}}1
+// char *rfc2426_escape(char *str) {{{1
 char *rfc2426_escape(char *str) {
   static char* buf = NULL;
   char *ret, *a, *b;
@@ -1392,8 +1437,9 @@
   }
   DEBUG_RET();
   return ret;
-}  
-
+}
+// }}}1
+// int chr_count(char *str, char x) {{{1
 int chr_count(char *str, char x) {
   int r = 0;
   while (*str != '\0') {
@@ -1403,7 +1449,8 @@
   }
   return r;
 }
-
+// }}}1
+// char *rfc2425_datetime_format(FILETIME *ft) {{{1
 char *rfc2425_datetime_format(FILETIME *ft) {
   static char * buffer = NULL;
   struct tm *stm = NULL;
@@ -1419,6 +1466,8 @@
   DEBUG_RET();
   return buffer;
 }
+// }}}1
+// char *rfc2445_datetime_format(FILETIME *ft) {{{1
 char *rfc2445_datetime_format(FILETIME *ft) {
   static char* buffer = NULL;
   struct tm *stm = NULL;
@@ -1432,3 +1481,25 @@
   DEBUG_RET();
   return buffer;
 }
+// }}}1
+// char *skip_header_prologue(char *headers) {{{1
+// The sole purpose of this function is to bypass the pseudo-header prologue
+// that Microsoft Outlook inserts at the beginning of the internet email
+// headers for emails stored in their "Personal Folders" files.
+char *skip_header_prologue(char *headers) {
+	const char *bad = "Microsoft Mail Internet Headers";
+
+	if ( strncmp(headers, bad, strlen(bad)) == 0 ) {
+		// Found the offensive header prologue
+		char *pc;
+
+		pc = strchr(headers, '\n');
+		return pc + 1;
+	}
+
+	return headers;
+}
+// }}}1
+
+// vim:sw=4 ts=4:
+// vim600: set foldlevel=0 foldmethod=marker:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readpstlog.1	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,87 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH READPSTLOG 1 "February 24, 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+readpstlog \- convert a readpst logfile to text format
+.SH SYNOPSIS
+.B readpstlog
+.RI [ options ] " logfile"
+.SH DESCRIPTION
+This manual page documents briefly the
+.B readpstlog
+command.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBreadpstlog\fP is a program that reads the \fIbinary\fP logfile generated
+by \fBreadpst\fP, and outputs it in a more desirable format (i.e. text).
+.SH OPTIONS
+This program follows the usual GNU command line syntax.
+A summary of options is included below.
+.TP
+.BR \-f " \fIformat\fP"
+Sets the format of the text log output.  Currently, the only valid output
+format is \fBT\fP, for text; anything else gives the default.
+.TP
+.BR \-t " \fItypes\fP"
+Tells \fBreadpstlog\fP to print only the specified types of log messages.
+Types are specified in a comma\-delimited list (e.g. 3,10,5,6).
+.TP
+.BR \-x " \fItypes\fP"
+Tells \fBreadpstlog\fP to exclude the specified types of log messages.
+Types are specified in a comma\-delimited list (e.g. 3,10,5,6).
+.SH LOG MESSAGE TYPES
+.PP
+\fBreadpstlog\fP understands the following types of log messages:
+.RS 15
+.TP
+.B 1
+File accesses
+.TP
+.B 2
+Index accesses
+.TP
+.B 3
+New email found
+.TP
+.B 4
+Warnings
+.TP
+.B 5
+Read accesses
+.TP
+.B 6
+Informational messages
+.TP
+.B 7
+Main function calls
+.TP
+.B 8
+Decrypting calls
+.TP
+.B 10
+Function calls
+.TP
+.B 11
+HexDump calls
+.RE
+.SH SEE ALSO
+.BR readpst (1)
+.SH AUTHOR
+This manual page was written by Joe Nahmias <joe@nahmias.net> for the Debian
+GNU/Linux system (but may be used by others).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup1.vdproj	Thu Dec 23 11:17:37 2004 -0800
@@ -0,0 +1,1052 @@
+"DeployProject"
+{
+"VSVersion" = "3:700"
+"ProjectType" = "8:{5443560c-dbb4-11d2-8724-00a0c9a8b90c}"
+"IsWebType" = "8:FALSE"
+"ProjectName" = "8:LibPST"
+"LanguageId" = "3:1033"
+"CodePage" = "3:1252"
+"UILanguageId" = "3:1033"
+"SccProjectName" = "8:"
+"SccLocalPath" = "8:"
+"SccAuxPath" = "8:"
+"SccProvider" = "8:"
+    "Hierarchy"
+    {
+        "Entry"
+        {
+        "MsmKey" = "8:_266DA9FD3BE7441AB9E4C076D65E406A"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\AUTHORS"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_2DA6FA8DBEA14B8381CC55D6BC6995AB"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\COPYING.RTF"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_340CC0B2B28145F3992BF62C2A281345"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\FILE-FORMAT.HTML"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_3F8282D501424D669B52768ED1EA6EF2"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\TODO"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_4C206382456343BEA91EC4A76C2CA773"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\COPYING.TXT"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_7DE8FC201860495D91028E21669FFBD0"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\FILE-FORMAT"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_7F461C98D65D40089911C85F1A4AA613"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\RELEASE\\READLOG.EXE"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_BAB8D23ACFC94A7A9D5B00CAA9B99898"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\RELEASE\\READPST.EXE"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_D728B43BE8024217ACCADE69476AE4B0"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\CREDITS"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_DF924B5495224B6FB5A02EEBFA4ABB59"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:\\\\BLESSING\\SRC\\LIBPST\\README.TXT"
+        }
+    }
+    "Configurations"
+    {
+        "Debug"
+        {
+        "DisplayName" = "8:Debug"
+        "IsDebugOnly" = "11:TRUE"
+        "IsReleaseOnly" = "11:FALSE"
+        "OutputFilename" = "8:Debug\\Setup1.msi"
+        "PackageFilesAs" = "3:2"
+        "PackageFileSize" = "3:-2147483648"
+        "CabType" = "3:1"
+        "Compression" = "3:2"
+        "SignOutput" = "11:FALSE"
+        "CertificateFile" = "8:"
+        "PrivateKeyFile" = "8:"
+        "TimeStampServer" = "8:"
+        "InstallerBootstrapper" = "3:2"
+        }
+        "Release"
+        {
+        "DisplayName" = "8:Release"
+        "IsDebugOnly" = "11:FALSE"
+        "IsReleaseOnly" = "11:TRUE"
+        "OutputFilename" = "8:setup\\LibPST.msi"
+        "PackageFilesAs" = "3:2"
+        "PackageFileSize" = "3:-2147483648"
+        "CabType" = "3:1"
+        "Compression" = "3:2"
+        "SignOutput" = "11:FALSE"
+        "CertificateFile" = "8:"
+        "PrivateKeyFile" = "8:"
+        "TimeStampServer" = "8:"
+        "InstallerBootstrapper" = "3:2"
+        }
+    }
+    "Deployable"
+    {
+        "CustomAction"
+        {
+        }
+        "DefaultFeature"
+        {
+        "Name" = "8:DefaultFeature"
+        "Title" = "8:"
+        "Description" = "8:"
+        }
+        "Feature"
+        {
+        }
+        "File"
+        {
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_266DA9FD3BE7441AB9E4C076D65E406A"
+            {
+            "SourcePath" = "8:AUTHORS"
+            "TargetName" = "8:AUTHORS.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_2DA6FA8DBEA14B8381CC55D6BC6995AB"
+            {
+            "SourcePath" = "8:COPYING.rtf"
+            "TargetName" = "8:COPYING.rtf"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_340CC0B2B28145F3992BF62C2A281345"
+            {
+            "SourcePath" = "8:FILE-FORMAT.html"
+            "TargetName" = "8:FILE-FORMAT.html"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_3F8282D501424D669B52768ED1EA6EF2"
+            {
+            "SourcePath" = "8:TODO"
+            "TargetName" = "8:TODO.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_4C206382456343BEA91EC4A76C2CA773"
+            {
+            "SourcePath" = "8:COPYING.txt"
+            "TargetName" = "8:COPYING.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_7DE8FC201860495D91028E21669FFBD0"
+            {
+            "SourcePath" = "8:FILE-FORMAT"
+            "TargetName" = "8:FILE-FORMAT.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_D728B43BE8024217ACCADE69476AE4B0"
+            {
+            "SourcePath" = "8:CREDITS"
+            "TargetName" = "8:CREDITS.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_DF924B5495224B6FB5A02EEBFA4ABB59"
+            {
+            "SourcePath" = "8:README.txt"
+            "TargetName" = "8:README.txt"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
+        }
+        "FileType"
+        {
+        }
+        "Folder"
+        {
+            "{EE62640D-12F2-11D3-8D6C-00A0C9CFCEE6}:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            {
+            "DefaultLocation" = "8:[ProgramFilesFolder]\\[ProductName]"
+            "Name" = "8:#1925"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:TARGETDIR"
+                "Folders"
+                {
+                }
+            }
+            "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_964BAED9D14B417FA1F1220CC3097FC4"
+            {
+            "Name" = "8:#1919"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:ProgramMenuFolder"
+                "Folders"
+                {
+                    "{461E96AF-1495-11D3-8D6C-00A0C9CFCEE6}:_F29DF218DC6A4FB69D74598BA9E10A04"
+                    {
+                    "Name" = "8:LibPST"
+                    "AlwaysCreate" = "11:FALSE"
+                    "Condition" = "8:"
+                    "Transitive" = "11:FALSE"
+                    "Property" = "8:_C122D79760AC41F9A8E705C23A19C12D"
+                        "Folders"
+                        {
+                        }
+                    }
+                }
+            }
+            "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_9ADAEB5873A141F5B3CB8A3E034C6CA2"
+            {
+            "Name" = "8:#1916"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:DesktopFolder"
+                "Folders"
+                {
+                }
+            }
+        }
+        "LaunchCondition"
+        {
+        }
+        "Locator"
+        {
+        }
+        "Shortcut"
+        {
+            "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_58BF5F3112104CE09F31C1615D469BD3"
+            {
+            "Name" = "8:COPYING"
+            "Arguments" = "8:"
+            "Description" = "8:"
+            "ShowCmd" = "3:1"
+            "IconIndex" = "3:0"
+            "Transitive" = "11:FALSE"
+            "Target" = "8:_2DA6FA8DBEA14B8381CC55D6BC6995AB"
+            "Folder" = "8:_F29DF218DC6A4FB69D74598BA9E10A04"
+            "WorkingFolder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Icon" = "8:"
+            "Feature" = "8:"
+            }
+            "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_888B00DFF8D14174A092BCD8EFC42462"
+            {
+            "Name" = "8:Libpst Executable"
+            "Arguments" = "8:"
+            "Description" = "8:"
+            "ShowCmd" = "3:1"
+            "IconIndex" = "3:0"
+            "Transitive" = "11:FALSE"
+            "Target" = "8:_BAB8D23ACFC94A7A9D5B00CAA9B99898"
+            "Folder" = "8:_F29DF218DC6A4FB69D74598BA9E10A04"
+            "WorkingFolder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Icon" = "8:"
+            "Feature" = "8:"
+            }
+            "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_E27938998715411F870EA27ADBD07301"
+            {
+            "Name" = "8:README"
+            "Arguments" = "8:"
+            "Description" = "8:"
+            "ShowCmd" = "3:1"
+            "IconIndex" = "3:0"
+            "Transitive" = "11:FALSE"
+            "Target" = "8:_DF924B5495224B6FB5A02EEBFA4ABB59"
+            "Folder" = "8:_F29DF218DC6A4FB69D74598BA9E10A04"
+            "WorkingFolder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Icon" = "8:"
+            "Feature" = "8:"
+            }
+        }
+        "Sequences"
+        {
+        }
+        "Registry"
+        {
+            "HKLM"
+            {
+                "Keys"
+                {
+                    "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_995E61C8F0B346D396C71E896B18D35E"
+                    {
+                    "Name" = "8:Software"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_928E99957DFA460ABF76327134CBDD9D"
+                            {
+                            "Name" = "8:[Manufacturer]"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                        }
+                    }
+                }
+            }
+            "HKCU"
+            {
+                "Keys"
+                {
+                    "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_A560F4ACAEEA4DD4BE301B08846171FD"
+                    {
+                    "Name" = "8:Software"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_F838B287CF714A46A450E9B0F023D234"
+                            {
+                            "Name" = "8:[Manufacturer]"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                        }
+                    }
+                }
+            }
+            "HKCR"
+            {
+                "Keys"
+                {
+                }
+            }
+            "HKU"
+            {
+                "Keys"
+                {
+                }
+            }
+            "HKPU"
+            {
+                "Keys"
+                {
+                }
+            }
+        }
+        "ProjectOutput"
+        {
+            "{B1E2BB22-187D-11D3-8E02-00C04F6837D0}:_7F461C98D65D40089911C85F1A4AA613"
+            {
+            "SourcePath" = "8:Release\\readlog.exe"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:1"
+            "OutputConfiguration" = "8:Release|Win32"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectCanonicalName" = "8:readlog.vcproj"
+            "OutputProjectGuid" = "8:{DC5B4944-D652-4761-AF88-9FC2AC321FA1}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
+            "{B1E2BB22-187D-11D3-8E02-00C04F6837D0}:_BAB8D23ACFC94A7A9D5B00CAA9B99898"
+            {
+            "SourcePath" = "8:Release\\readpst.exe"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_02D7B7E47B1945E2A60FC9B30A3DB4EC"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:1"
+            "OutputConfiguration" = "8:Release|Win32"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectCanonicalName" = "8:w32pst.vcproj"
+            "OutputProjectGuid" = "8:{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
+        }
+        "Product"
+        {
+        "Name" = "8:Microsoft Visual Studio"
+        "ProductName" = "8:LibPST 0.4.2"
+        "ProductCode" = "8:{051CC073-1088-45CE-B6B4-6A818D1A0C4C}"
+        "PackageCode" = "8:{EB46674A-D12E-4709-A10E-26AF5DA5FC2F}"
+        "UpgradeCode" = "8:{26048EE7-3ACA-4238-8160-9A388FF0BE0F}"
+        "RestartWWWService" = "11:FALSE"
+        "RemovePreviousVersions" = "11:FALSE"
+        "DetectNewerInstalledVersion" = "11:FALSE"
+        "ProductVersion" = "8:0.4.2"
+        "Manufacturer" = "8:LibPST"
+        "ARPHELPTELEPHONE" = "8:"
+        "ARPHELPLINK" = "8:www.sf.net/projects/ol2mbox"
+        "Title" = "8:LibPST 0.4.2"
+        "Subject" = "8:"
+        "ARPCONTACT" = "8:Dave Smith"
+        "Keywords" = "8:"
+        "ARPCOMMENTS" = "8:Convert PST files to mbox files"
+        "ARPURLINFOABOUT" = "8:www.sf.net/projects/ol2mbox"
+        "ARPPRODUCTICON" = "8:"
+        "ARPIconIndex" = "3:0"
+        "SearchPath" = "8:"
+        "UseSystemSearchPath" = "11:TRUE"
+        }
+        "MsiBootstrapper"
+        {
+        "LangId" = "3:1033"
+        }
+        "MergeModule"
+        {
+        }
+        "UserInterface"
+        {
+            "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_022695AADC7645C6AD4D996A924BADB0"
+            {
+            "UseDynamicProperties" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
+            "ModuleSignature" = "8:VsdUserInterface.524F4245_5254_5341_4C45_534153783400"
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_4D31ADFC1DDC4E8DB34CFC315F68CE34"
+            {
+            "Name" = "8:#1900"
+            "Sequence" = "3:2"
+            "Attributes" = "3:1"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_6F5F0C0A1AEA4E7BBE611CEEA4CDD96B"
+                    {
+                    "Sequence" = "3:200"
+                    "DisplayName" = "8:Installation Folder"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.2DED2424_5429_4616_A1AD_4D62837C2ADA"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_7965A4F2A58F45878A12917BA74B747A"
+                    {
+                    "Sequence" = "3:110"
+                    "DisplayName" = "8:License Agreement"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminLicenseDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.836CEFDB_3154_4E4C_84F8_DC115871E5E1"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "EulaText"
+                            {
+                            "Name" = "8:EulaText"
+                            "DisplayName" = "8:#1008"
+                            "Description" = "8:#1108"
+                            "Type" = "3:6"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:2"
+                            "Value" = "8:_2DA6FA8DBEA14B8381CC55D6BC6995AB"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Sunken"
+                            {
+                            "Name" = "8:Sunken"
+                            "DisplayName" = "8:#1007"
+                            "Description" = "8:#1107"
+                            "Type" = "3:5"
+                            "ContextData" = "8:4;True=4;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:4"
+                            "DefaultValue" = "3:4"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_903D207433054D92BFD487087BBD066A"
+                    {
+                    "Sequence" = "3:300"
+                    "DisplayName" = "8:Confirm Installation"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.FA58E60A_A1E8_4876_95FC_2AC3B5AAA5F8"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_A4A1C5B85FAB4F92A3B4EEC34BBBD96D"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Welcome"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.E35A0E2C_F131_4B57_B946_59A1A2A8F45F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "CopyrightWarning"
+                            {
+                            "Name" = "8:CopyrightWarning"
+                            "DisplayName" = "8:#1002"
+                            "Description" = "8:#1102"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:2"
+                            "Value" = "8:This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
+                            "DefaultValue" = "8:#1202"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Welcome"
+                            {
+                            "Name" = "8:Welcome"
+                            "DisplayName" = "8:#1003"
+                            "Description" = "8:#1103"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1203"
+                            "DefaultValue" = "8:#1203"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_4F5559A7DEAB4DE2925C542BBB3A9F85"
+            {
+            "Name" = "8:#1901"
+            "Sequence" = "3:2"
+            "Attributes" = "3:2"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_B1E07CF844E3483E82198DD9386DA673"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Progress"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.EE9A1AFA_41DD_4514_B727_DF0ACA1D7389"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "ShowProgress"
+                            {
+                            "Name" = "8:ShowProgress"
+                            "DisplayName" = "8:#1009"
+                            "Description" = "8:#1109"
+                            "Type" = "3:5"
+                            "ContextData" = "8:1;True=1;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:1"
+                            "DefaultValue" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_7A173552C86C4E688960FE54E12232EA"
+            {
+            "Name" = "8:#1900"
+            "Sequence" = "3:1"
+            "Attributes" = "3:1"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_37E4508ABFDD42BDB58BAE10301345DA"
+                    {
+                    "Sequence" = "3:300"
+                    "DisplayName" = "8:Confirm Installation"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.6DBC9783_3677_4D68_8BF5_D749558A0AC1"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_413518D7364F4D138DC324363B89A71F"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Welcome"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.68F69290_BB7C_474E_A153_6679845F3DDF"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "CopyrightWarning"
+                            {
+                            "Name" = "8:CopyrightWarning"
+                            "DisplayName" = "8:#1002"
+                            "Description" = "8:#1102"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:2"
+                            "Value" = "8:This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
+                            "DefaultValue" = "8:#1202"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Welcome"
+                            {
+                            "Name" = "8:Welcome"
+                            "DisplayName" = "8:#1003"
+                            "Description" = "8:#1103"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1203"
+                            "DefaultValue" = "8:#1203"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_7562C9CDD20B4E789E62146FD5A2F988"
+                    {
+                    "Sequence" = "3:110"
+                    "DisplayName" = "8:License Agreement"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdLicenseDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.8FA7D956_B864_4FF4_92F0_FB2799B33176"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "EulaText"
+                            {
+                            "Name" = "8:EulaText"
+                            "DisplayName" = "8:#1008"
+                            "Description" = "8:#1108"
+                            "Type" = "3:6"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:2"
+                            "Value" = "8:_2DA6FA8DBEA14B8381CC55D6BC6995AB"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Sunken"
+                            {
+                            "Name" = "8:Sunken"
+                            "DisplayName" = "8:#1007"
+                            "Description" = "8:#1107"
+                            "Type" = "3:5"
+                            "ContextData" = "8:4;True=4;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:4"
+                            "DefaultValue" = "3:4"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_EF43D4AB2DFD477E91C34CC588F44083"
+                    {
+                    "Sequence" = "3:200"
+                    "DisplayName" = "8:Installation Folder"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.C113BC36_2532_4D45_8099_4818B1133B2F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_835654FC087041D3B4610A66F9E340AF"
+            {
+            "Name" = "8:#1902"
+            "Sequence" = "3:2"
+            "Attributes" = "3:3"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_33A87B3E5EB64385A6C24862B4F1E9C6"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Finished"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.83D22742_1B79_46f6_9A99_DF0F2BD4C077"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_8CA4D8B70C5A4D2498C79F9B7CA0C023"
+            {
+            "UseDynamicProperties" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
+            "ModuleSignature" = "8:VsdDialogs.CE4B864F_F1C1_4B85_98D4_2A2BF5FFB12B"
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_AB25D6EB5E7140B397000436C87D1D5E"
+            {
+            "Name" = "8:#1901"
+            "Sequence" = "3:1"
+            "Attributes" = "3:2"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_12DABCAD3D524B38A88CFDB189826E73"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Progress"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.4FB12620_0D15_42D0_8677_2766FFA6923F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "ShowProgress"
+                            {
+                            "Name" = "8:ShowProgress"
+                            "DisplayName" = "8:#1009"
+                            "Description" = "8:#1109"
+                            "Type" = "3:5"
+                            "ContextData" = "8:1;True=1;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:1"
+                            "DefaultValue" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_E64115E41D964A25BA1E40221BA371AE"
+            {
+            "Name" = "8:#1902"
+            "Sequence" = "3:1"
+            "Attributes" = "3:3"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_3D878C0BB5664F24B73D17D0D0C4F1AA"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Finished"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.1DB77F5A_BA5C_4470_89B6_0B0EC07E3A10"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
--- a/timeconv.c	Fri Jul 09 07:26:16 2004 -0700
+++ b/timeconv.c	Thu Dec 23 11:17:37 2004 -0800
@@ -13,6 +13,7 @@
 
 #include <time.h>
 #include "common.h"
+#include "timeconv.h"
 
 time_t fileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder );
 char * fileTimeToAscii (const FILETIME *filetime);
--- a/w32pst.sln	Fri Jul 09 07:26:16 2004 -0700
+++ b/w32pst.sln	Thu Dec 23 11:17:37 2004 -0800
@@ -1,31 +1,31 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w32pst", "w32pst.vcproj", "{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readlog", "readlog.vcproj", "{DC5B4944-D652-4761-AF88-9FC2AC321FA1}"
-EndProject
-Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "LibPST", "Setup1.vdproj", "{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}"
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug
-		ConfigName.1 = Release
-	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Debug.ActiveCfg = Debug|Win32
-		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Debug.Build.0 = Debug|Win32
-		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Release.ActiveCfg = Release|Win32
-		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Release.Build.0 = Release|Win32
-		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Debug.ActiveCfg = Debug|Win32
-		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Debug.Build.0 = Debug|Win32
-		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Release.ActiveCfg = Release|Win32
-		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Release.Build.0 = Release|Win32
-		{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}.Debug.ActiveCfg = Debug
-		{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}.Release.ActiveCfg = Release
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w32pst", "w32pst.vcproj", "{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readlog", "readlog.vcproj", "{DC5B4944-D652-4761-AF88-9FC2AC321FA1}"
+EndProject
+Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "LibPST", "Setup1.vdproj", "{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Debug.ActiveCfg = Debug|Win32
+		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Debug.Build.0 = Debug|Win32
+		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Release.ActiveCfg = Release|Win32
+		{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}.Release.Build.0 = Release|Win32
+		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Debug.ActiveCfg = Debug|Win32
+		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Debug.Build.0 = Debug|Win32
+		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Release.ActiveCfg = Release|Win32
+		{DC5B4944-D652-4761-AF88-9FC2AC321FA1}.Release.Build.0 = Release|Win32
+		{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}.Debug.ActiveCfg = Debug
+		{F3CFFE7E-DA2E-4CDF-8BA7-D32C7A5F148A}.Release.ActiveCfg = Release
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
--- a/w32pst.vcproj	Fri Jul 09 07:26:16 2004 -0700
+++ b/w32pst.vcproj	Thu Dec 23 11:17:37 2004 -0800
@@ -1,174 +1,174 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="w32pst"
-	ProjectGUID="{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories=" "
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/readpst.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/w32pst.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/readpst.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="XGetopt.c">
-			</File>
-			<File
-				RelativePath="debug.c">
-			</File>
-			<File
-				RelativePath="libpst.c">
-			</File>
-			<File
-				RelativePath="libstrfunc.c">
-			</File>
-			<File
-				RelativePath="lzfu.c">
-			</File>
-			<File
-				RelativePath="readpst.c">
-			</File>
-			<File
-				RelativePath="timeconv.c">
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="TRUE">
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="TRUE">
-					<Tool
-						Name="VCCLCompilerTool"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-			<File
-				RelativePath="XGetopt.h">
-			</File>
-			<File
-				RelativePath="common.h">
-			</File>
-			<File
-				RelativePath="define.h">
-			</File>
-			<File
-				RelativePath="libpst.h">
-			</File>
-			<File
-				RelativePath="libstrfunc.h">
-			</File>
-			<File
-				RelativePath="lzfu.h">
-			</File>
-			<File
-				RelativePath="timeconv.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="w32pst"
+	ProjectGUID="{7ABFA22F-27B6-4771-A63A-F3BD9BB5E819}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=" "
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough=""
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/readpst.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/w32pst.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/readpst.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="XGetopt.c">
+			</File>
+			<File
+				RelativePath="debug.c">
+			</File>
+			<File
+				RelativePath="libpst.c">
+			</File>
+			<File
+				RelativePath="libstrfunc.c">
+			</File>
+			<File
+				RelativePath="lzfu.c">
+			</File>
+			<File
+				RelativePath="readpst.c">
+			</File>
+			<File
+				RelativePath="timeconv.c">
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="XGetopt.h">
+			</File>
+			<File
+				RelativePath="common.h">
+			</File>
+			<File
+				RelativePath="define.h">
+			</File>
+			<File
+				RelativePath="libpst.h">
+			</File>
+			<File
+				RelativePath="libstrfunc.h">
+			</File>
+			<File
+				RelativePath="lzfu.h">
+			</File>
+			<File
+				RelativePath="timeconv.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>