changeset 292:e0e5844d91b3

patch from Leo Antunes for Status: header
author Carl Byington <carl@five-ten-sg.com>
date Sun, 19 Jun 2011 09:08:29 -0700
parents bc23fba0da8e
children 5b3e7661adad
files AUTHORS src/libpst.h src/readpst.c
diffstat 3 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Sat Jun 04 11:38:12 2011 -0700
+++ b/AUTHORS	Sun Jun 19 09:08:29 2011 -0700
@@ -33,7 +33,7 @@
     Lee Ayres <ayres@interhack.com>
     Hugo DesRosiers <info@akralogic.com>
     Kenneth Berland <ken@hero.com>
-
+    Leo 'costela' Antunes <costela@debian.org>
 
 Testing team:
     Mac OSX - Michael Watson <mike@mikeandgayle.com>
--- a/src/libpst.h	Sat Jun 04 11:38:12 2011 -0700
+++ b/src/libpst.h	Sun Jun 19 09:08:29 2011 -0700
@@ -80,6 +80,18 @@
 #define PST_ATTACH_EMBEDDED         5
 #define PST_ATTACH_OLE              6
 
+// define flags
+#define PST_FLAG_READ			0x01
+#define PST_FLAG_UNMODIFIED		0x02
+#define PST_FLAG_SUBMIT			0x04
+#define PST_FLAG_UNSENT			0x08
+#define PST_FLAG_HAS_ATTACHMENT	0x10
+#define PST_FLAG_FROM_ME		0x20
+#define PST_FLAG_ASSOCIATED		0x40
+#define PST_FLAG_RESEND			0x80
+#define PST_FLAG_RN_PENDING		0x100
+#define PST_FLAG_NRN_PENDING	0x200
+
 
 typedef struct pst_entryid {
     int32_t u1;
--- a/src/readpst.c	Sat Jun 04 11:38:12 2011 -0700
+++ b/src/readpst.c	Sun Jun 19 09:08:29 2011 -0700
@@ -1561,6 +1561,11 @@
         }
     }
 
+    // record read status
+    if ((item->flags & PST_FLAG_READ) == PST_FLAG_READ) {
+        fprintf(f_output, "Status: RO\n");
+    }
+
     // create required header fields that are not already written
 
     if (!has_from) {