comparison src/libpst.h @ 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 3cb02cb1e6cd
children 56fa05fd5271
comparison
equal deleted inserted replaced
74:6f82d13e9300 75:987aa872294e
8 // Dave Smith - davesmith@users.sourceforge.net 8 // Dave Smith - davesmith@users.sourceforge.net
9 9
10 #ifndef LIBPST_H 10 #ifndef LIBPST_H
11 #define LIBPST_H 11 #define LIBPST_H
12 12
13 #include <stdint.h>
14
15 #ifndef _MSC_VER 13 #ifndef _MSC_VER
16 14 #include <stdint.h>
17 #ifndef FILETIME_DEFINED 15 #ifndef FILETIME_DEFINED
18 #define FILETIME_DEFINED 16 #define FILETIME_DEFINED
19 //Win32 Filetime struct - copied from WINE 17 //Win32 Filetime struct - copied from WINE
20 typedef struct { 18 typedef struct {
21 uint32_t dwLowDateTime; 19 uint32_t dwLowDateTime;
22 uint32_t dwHighDateTime; 20 uint32_t dwHighDateTime;
23 } FILETIME; 21 } FILETIME;
24 #endif //ifndef FILETIME_DEFINED 22 #endif
25 #endif //ifndef _MSC_VER 23 #endif
26 24
27 // According to Jan Wolter, sys/param.h is the most portable source of endian 25 // According to Jan Wolter, sys/param.h is the most portable source of endian
28 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html 26 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
29 #ifdef _MSC_VER 27 #ifdef _MSC_VER
30 #define BYTE_ORDER LITTLE_ENDIAN 28 #define BYTE_ORDER LITTLE_ENDIAN
56 # define LE16_CPU(x) {} 54 # define LE16_CPU(x) {}
57 #else 55 #else
58 # error "Byte order not supported by this library" 56 # error "Byte order not supported by this library"
59 #endif // BYTE_ORDER 57 #endif // BYTE_ORDER
60 58
61
62 #ifdef _MSC_VER
63 #include "windows.h"
64 #define int32_t int
65 #define uint32_t unsigned int
66 #define int16_t short int
67 #define uint16_t unsigned short int
68 #endif // _MSC_VER
69 59
70 #define PST_TYPE_NOTE 1 60 #define PST_TYPE_NOTE 1
71 #define PST_TYPE_APPOINTMENT 8 61 #define PST_TYPE_APPOINTMENT 8
72 #define PST_TYPE_CONTACT 9 62 #define PST_TYPE_CONTACT 9
73 #define PST_TYPE_JOURNAL 10 63 #define PST_TYPE_JOURNAL 10