diff xml/libpst.in @ 75:987aa872294e stable-0-6-11

Use ftello/fseeko to properly handle large files. Document and properly use datasize field in b5 blocks. Fix some MSVC compile issues and collect MSVC dependencies into one place.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Jun 2008 12:00:58 -0700
parents 1bd4491cf8ff
children 87216aefc6df
line wrap: on
line diff
--- a/xml/libpst.in	Thu May 29 18:59:38 2008 -0700
+++ b/xml/libpst.in	Tue Jun 03 12:00:58 2008 -0700
@@ -33,7 +33,7 @@
 
     <refentry id="readpst.1">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -226,7 +226,7 @@
 
     <refentry id="lspst.1">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -329,7 +329,7 @@
 
     <refentry id="readpstlog.1">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -504,7 +504,7 @@
 
     <refentry id="pst2ldif.1">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -628,7 +628,7 @@
 
     <refentry id="pst2dii.1">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -762,7 +762,7 @@
 
     <refentry id="pst.5">
         <refentryinfo>
-            <date>2008-05-16</date>
+            <date>2008-06-03</date>
         </refentryinfo>
 
         <refmeta>
@@ -1577,7 +1577,7 @@
             </para>
             <literallayout class="monospaced"><![CDATA[
 0000  signature       [2 bytes] 0x02b5     constant
-0002  unknown         [2 bytes] 0x0006     in this case
+0002  datasize        [2 bytes] 0x0006     constant +2 for 8 byte entries
 0004  descoffset      [4 bytes] 0x0040     index reference
 ]]></literallayout>
             <para>
@@ -1585,8 +1585,9 @@
                 case, it is an internal pointer reference, which needs to be right shifted by 4 bits
                 to become 0x0004, which is then a byte offset to be added to the above
                 indexOffset plus two (to skip the count), so it points to the (0x14, 0x7c)
-                pair. We now have the offset 0x14 of the descriptor array, composed of 8 byte
-                entries. Each descriptor entry has the following format:
+                pair. The datasize (6) plus the b5 code (02) gives size of the entries,
+                in this case 8 bytes. We now have the offset 0x14 of the descriptor array,
+                composed of 8 byte entries. Each descriptor entry has the following format:
             </para>
             <literallayout class="monospaced"><![CDATA[
 0000  itemType        [2 bytes]
@@ -1949,7 +1950,7 @@
             </para>
             <literallayout class="monospaced"><![CDATA[
 0000  signature       [2 bytes] 0x04b5     constant
-0002  unknown         [2 bytes] 0x0002     in this case
+0002  datasize        [2 bytes] 0x0002     +4 for 6 byte entries in this case
 0004  descoffset      [4 bytes] 0x0060     index reference
 ]]></literallayout>
             <para>
@@ -1957,9 +1958,10 @@
                 case, it is an internal pointer reference, which needs to be right shifted by 4
                 bits to become 0x0006, which is then a byte offset to be added to the
                 above indexOffset plus two (to skip the count), so it points to the
-                (0xea, 0xf0) pair.  That gives us (0xf0 - 0xea)/6 = 1, so we have a
-                recordCount of one.  The actual data between 0xea and 0xf0 is unknown
-                and unused here.
+                (0xea, 0xf0) pair. The datasize (2) plus the b5 code (04) gives the size
+                of the entries, in this case 6 bytes. We now have the offset 0xea of an
+                unused block of data in an unknown format, composed of 6 byte entries.
+                That gives us (0xf0 - 0xea)/6 = 1, so we have a recordCount of one.
             </para>
             <para>
                 We have seen cases where the descoffset in the b5 block is zero, and