annotate libpst.h @ 4:28737b9480e4

fix usage help
author carl
date Thu, 23 Dec 2004 11:20:24 -0800
parents 6b1b602514db
children 43e8802f08c5 2b58cf15aaf7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6b1b602514db Initial revision
carl
parents:
diff changeset
1 /***
6b1b602514db Initial revision
carl
parents:
diff changeset
2 * libpst.h
6b1b602514db Initial revision
carl
parents:
diff changeset
3 * Part of LibPST project
6b1b602514db Initial revision
carl
parents:
diff changeset
4 * Written by David Smith
6b1b602514db Initial revision
carl
parents:
diff changeset
5 * dave.s@earthcorp.com
6b1b602514db Initial revision
carl
parents:
diff changeset
6 */
6b1b602514db Initial revision
carl
parents:
diff changeset
7 // LibPST - Library for Accessing Outlook .pst files
6b1b602514db Initial revision
carl
parents:
diff changeset
8 // Dave Smith - davesmith@users.sourceforge.net
6b1b602514db Initial revision
carl
parents:
diff changeset
9
6b1b602514db Initial revision
carl
parents:
diff changeset
10 #ifndef LIBPST_H
6b1b602514db Initial revision
carl
parents:
diff changeset
11 #define LIBPST_H
6b1b602514db Initial revision
carl
parents:
diff changeset
12
6b1b602514db Initial revision
carl
parents:
diff changeset
13 #ifndef _MSC_VER
6b1b602514db Initial revision
carl
parents:
diff changeset
14
6b1b602514db Initial revision
carl
parents:
diff changeset
15 #ifndef FILETIME_DEFINED
6b1b602514db Initial revision
carl
parents:
diff changeset
16 #define FILETIME_DEFINED
6b1b602514db Initial revision
carl
parents:
diff changeset
17 //Win32 Filetime struct - copied from WINE
6b1b602514db Initial revision
carl
parents:
diff changeset
18 typedef struct {
6b1b602514db Initial revision
carl
parents:
diff changeset
19 u_int32_t dwLowDateTime;
6b1b602514db Initial revision
carl
parents:
diff changeset
20 u_int32_t dwHighDateTime;
6b1b602514db Initial revision
carl
parents:
diff changeset
21 } FILETIME;
6b1b602514db Initial revision
carl
parents:
diff changeset
22 #endif //ifndef FILETIME_DEFINED
6b1b602514db Initial revision
carl
parents:
diff changeset
23 #endif //ifndef _MSC_VER
6b1b602514db Initial revision
carl
parents:
diff changeset
24
6b1b602514db Initial revision
carl
parents:
diff changeset
25 // define the INT32_MAX here cause it isn't normally defined
6b1b602514db Initial revision
carl
parents:
diff changeset
26 #ifndef INT32_MAX
6b1b602514db Initial revision
carl
parents:
diff changeset
27 # define INT32_MAX INT_MAX
6b1b602514db Initial revision
carl
parents:
diff changeset
28 #endif
6b1b602514db Initial revision
carl
parents:
diff changeset
29
6b1b602514db Initial revision
carl
parents:
diff changeset
30 // According to Jan Wolter, sys/param.h is the most portable source of endian
6b1b602514db Initial revision
carl
parents:
diff changeset
31 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
6b1b602514db Initial revision
carl
parents:
diff changeset
32 #include <sys/param.h>
6b1b602514db Initial revision
carl
parents:
diff changeset
33
6b1b602514db Initial revision
carl
parents:
diff changeset
34 #if BYTE_ORDER == BIG_ENDIAN
6b1b602514db Initial revision
carl
parents:
diff changeset
35 # define LE64_CPU(x) \
6b1b602514db Initial revision
carl
parents:
diff changeset
36 x = ((((x) & 0xff00000000000000) >> 56) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
37 (((x) & 0x00ff000000000000) >> 40) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
38 (((x) & 0x0000ff0000000000) >> 24) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
39 (((x) & 0x000000ff00000000) >> 8 ) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
40 (((x) & 0x00000000ff000000) << 8 ) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
41 (((x) & 0x0000000000ff0000) << 24) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
42 (((x) & 0x000000000000ff00) << 40) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
43 (((x) & 0x00000000000000ff) << 56));
6b1b602514db Initial revision
carl
parents:
diff changeset
44 # define LE32_CPU(x) \
6b1b602514db Initial revision
carl
parents:
diff changeset
45 x = ((((x) & 0xff000000) >> 24) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
46 (((x) & 0x00ff0000) >> 8 ) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
47 (((x) & 0x0000ff00) << 8 ) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
48 (((x) & 0x000000ff) << 24));
6b1b602514db Initial revision
carl
parents:
diff changeset
49 # define LE16_CPU(x) \
6b1b602514db Initial revision
carl
parents:
diff changeset
50 x = ((((x) & 0xff00) >> 8) | \
6b1b602514db Initial revision
carl
parents:
diff changeset
51 (((x) & 0x00ff) << 8));
6b1b602514db Initial revision
carl
parents:
diff changeset
52 #elif BYTE_ORDER == LITTLE_ENDIAN
6b1b602514db Initial revision
carl
parents:
diff changeset
53 # define LE64_CPU(x) {}
6b1b602514db Initial revision
carl
parents:
diff changeset
54 # define LE32_CPU(x) {}
6b1b602514db Initial revision
carl
parents:
diff changeset
55 # define LE16_CPU(x) {}
6b1b602514db Initial revision
carl
parents:
diff changeset
56 #else
6b1b602514db Initial revision
carl
parents:
diff changeset
57 # error "Byte order not supported by this library"
6b1b602514db Initial revision
carl
parents:
diff changeset
58 #endif // BYTE_ORDER
6b1b602514db Initial revision
carl
parents:
diff changeset
59
6b1b602514db Initial revision
carl
parents:
diff changeset
60
6b1b602514db Initial revision
carl
parents:
diff changeset
61 #ifdef _MSC_VER
6b1b602514db Initial revision
carl
parents:
diff changeset
62 #include "windows.h"
6b1b602514db Initial revision
carl
parents:
diff changeset
63 #define int32_t int
6b1b602514db Initial revision
carl
parents:
diff changeset
64 #define u_int32_t unsigned int
6b1b602514db Initial revision
carl
parents:
diff changeset
65 #define int16_t short int
6b1b602514db Initial revision
carl
parents:
diff changeset
66 #define u_int16_t unsigned short int
6b1b602514db Initial revision
carl
parents:
diff changeset
67 #endif // _MSC_VER
6b1b602514db Initial revision
carl
parents:
diff changeset
68
6b1b602514db Initial revision
carl
parents:
diff changeset
69
6b1b602514db Initial revision
carl
parents:
diff changeset
70 #define PST_VERSION "0.5"
6b1b602514db Initial revision
carl
parents:
diff changeset
71
6b1b602514db Initial revision
carl
parents:
diff changeset
72 #define PST_TYPE_NOTE 1
6b1b602514db Initial revision
carl
parents:
diff changeset
73 #define PST_TYPE_APPOINTMENT 8
6b1b602514db Initial revision
carl
parents:
diff changeset
74 #define PST_TYPE_CONTACT 9
6b1b602514db Initial revision
carl
parents:
diff changeset
75 #define PST_TYPE_JOURNAL 10
6b1b602514db Initial revision
carl
parents:
diff changeset
76 #define PST_TYPE_STICKYNOTE 11
6b1b602514db Initial revision
carl
parents:
diff changeset
77 #define PST_TYPE_TASK 12
6b1b602514db Initial revision
carl
parents:
diff changeset
78 #define PST_TYPE_OTHER 13
6b1b602514db Initial revision
carl
parents:
diff changeset
79 #define PST_TYPE_REPORT 14
6b1b602514db Initial revision
carl
parents:
diff changeset
80
6b1b602514db Initial revision
carl
parents:
diff changeset
81 // defines whether decryption is done on this bit of data
6b1b602514db Initial revision
carl
parents:
diff changeset
82 #define PST_NO_ENC 0
6b1b602514db Initial revision
carl
parents:
diff changeset
83 #define PST_ENC 1
6b1b602514db Initial revision
carl
parents:
diff changeset
84
6b1b602514db Initial revision
carl
parents:
diff changeset
85 // defines types of possible encryption
6b1b602514db Initial revision
carl
parents:
diff changeset
86 #define PST_NO_ENCRYPT 0
6b1b602514db Initial revision
carl
parents:
diff changeset
87 #define PST_COMP_ENCRYPT 1
6b1b602514db Initial revision
carl
parents:
diff changeset
88 #define PST_ENCRYPT 2
6b1b602514db Initial revision
carl
parents:
diff changeset
89
6b1b602514db Initial revision
carl
parents:
diff changeset
90 // defines different types of mappings
6b1b602514db Initial revision
carl
parents:
diff changeset
91 #define PST_MAP_ATTRIB 1
6b1b602514db Initial revision
carl
parents:
diff changeset
92 #define PST_MAP_HEADER 2
6b1b602514db Initial revision
carl
parents:
diff changeset
93
6b1b602514db Initial revision
carl
parents:
diff changeset
94 // define my custom email attributes.
6b1b602514db Initial revision
carl
parents:
diff changeset
95 #define PST_ATTRIB_HEADER -1
6b1b602514db Initial revision
carl
parents:
diff changeset
96
6b1b602514db Initial revision
carl
parents:
diff changeset
97 // defines types of free/busy values for appointment->showas
6b1b602514db Initial revision
carl
parents:
diff changeset
98 #define PST_FREEBUSY_FREE 0
6b1b602514db Initial revision
carl
parents:
diff changeset
99 #define PST_FREEBUSY_TENTATIVE 1
6b1b602514db Initial revision
carl
parents:
diff changeset
100 #define PST_FREEBUSY_BUSY 2
6b1b602514db Initial revision
carl
parents:
diff changeset
101 #define PST_FREEBUSY_OUT_OF_OFFICE 3
6b1b602514db Initial revision
carl
parents:
diff changeset
102
6b1b602514db Initial revision
carl
parents:
diff changeset
103 // defines labels for appointment->label
6b1b602514db Initial revision
carl
parents:
diff changeset
104 #define PST_APP_LABEL_NONE 0 // None
6b1b602514db Initial revision
carl
parents:
diff changeset
105 #define PST_APP_LABEL_IMPORTANT 1 // Important
6b1b602514db Initial revision
carl
parents:
diff changeset
106 #define PST_APP_LABEL_BUSINESS 2 // Business
6b1b602514db Initial revision
carl
parents:
diff changeset
107 #define PST_APP_LABEL_PERSONAL 3 // Personal
6b1b602514db Initial revision
carl
parents:
diff changeset
108 #define PST_APP_LABEL_VACATION 4 // Vacation
6b1b602514db Initial revision
carl
parents:
diff changeset
109 #define PST_APP_LABEL_MUST_ATTEND 5 // Must Attend
6b1b602514db Initial revision
carl
parents:
diff changeset
110 #define PST_APP_LABEL_TRAVEL_REQ 6 // Travel Required
6b1b602514db Initial revision
carl
parents:
diff changeset
111 #define PST_APP_LABEL_NEEDS_PREP 7 // Needs Preparation
6b1b602514db Initial revision
carl
parents:
diff changeset
112 #define PST_APP_LABEL_BIRTHDAY 8 // Birthday
6b1b602514db Initial revision
carl
parents:
diff changeset
113 #define PST_APP_LABEL_ANNIVERSARY 9 // Anniversary
6b1b602514db Initial revision
carl
parents:
diff changeset
114 #define PST_APP_LABEL_PHONE_CALL 10// Phone Call
6b1b602514db Initial revision
carl
parents:
diff changeset
115
6b1b602514db Initial revision
carl
parents:
diff changeset
116 typedef struct _pst_misc_6_struct {
6b1b602514db Initial revision
carl
parents:
diff changeset
117 int32_t i1;
6b1b602514db Initial revision
carl
parents:
diff changeset
118 int32_t i2;
6b1b602514db Initial revision
carl
parents:
diff changeset
119 int32_t i3;
6b1b602514db Initial revision
carl
parents:
diff changeset
120 int32_t i4;
6b1b602514db Initial revision
carl
parents:
diff changeset
121 int32_t i5;
6b1b602514db Initial revision
carl
parents:
diff changeset
122 int32_t i6;
6b1b602514db Initial revision
carl
parents:
diff changeset
123 } pst_misc_6;
6b1b602514db Initial revision
carl
parents:
diff changeset
124
6b1b602514db Initial revision
carl
parents:
diff changeset
125 typedef struct _pst_entryid_struct {
6b1b602514db Initial revision
carl
parents:
diff changeset
126 int32_t u1;
6b1b602514db Initial revision
carl
parents:
diff changeset
127 char entryid[16];
6b1b602514db Initial revision
carl
parents:
diff changeset
128 int32_t id;
6b1b602514db Initial revision
carl
parents:
diff changeset
129 } pst_entryid;
6b1b602514db Initial revision
carl
parents:
diff changeset
130
6b1b602514db Initial revision
carl
parents:
diff changeset
131 typedef struct _pst_desc_struct {
6b1b602514db Initial revision
carl
parents:
diff changeset
132 u_int32_t d_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
133 u_int32_t desc_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
134 u_int32_t list_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
135 u_int32_t parent_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
136 } pst_desc;
6b1b602514db Initial revision
carl
parents:
diff changeset
137
6b1b602514db Initial revision
carl
parents:
diff changeset
138 typedef struct _pst_index_struct{
6b1b602514db Initial revision
carl
parents:
diff changeset
139 u_int32_t id;
6b1b602514db Initial revision
carl
parents:
diff changeset
140 int32_t offset;
6b1b602514db Initial revision
carl
parents:
diff changeset
141 u_int16_t size;
6b1b602514db Initial revision
carl
parents:
diff changeset
142 int16_t u1;
6b1b602514db Initial revision
carl
parents:
diff changeset
143 } pst_index;
6b1b602514db Initial revision
carl
parents:
diff changeset
144
6b1b602514db Initial revision
carl
parents:
diff changeset
145 typedef struct _pst_index_tree {
6b1b602514db Initial revision
carl
parents:
diff changeset
146 u_int32_t id;
6b1b602514db Initial revision
carl
parents:
diff changeset
147 int32_t offset;
6b1b602514db Initial revision
carl
parents:
diff changeset
148 size_t size;
6b1b602514db Initial revision
carl
parents:
diff changeset
149 int32_t u1;
6b1b602514db Initial revision
carl
parents:
diff changeset
150 struct _pst_index_tree * next;
6b1b602514db Initial revision
carl
parents:
diff changeset
151 } pst_index_ll;
6b1b602514db Initial revision
carl
parents:
diff changeset
152
6b1b602514db Initial revision
carl
parents:
diff changeset
153 typedef struct _pst_index2_tree {
6b1b602514db Initial revision
carl
parents:
diff changeset
154 int32_t id2;
6b1b602514db Initial revision
carl
parents:
diff changeset
155 pst_index_ll *id;
6b1b602514db Initial revision
carl
parents:
diff changeset
156 struct _pst_index2_tree * next;
6b1b602514db Initial revision
carl
parents:
diff changeset
157 } pst_index2_ll;
6b1b602514db Initial revision
carl
parents:
diff changeset
158
6b1b602514db Initial revision
carl
parents:
diff changeset
159 typedef struct _pst_desc_tree {
6b1b602514db Initial revision
carl
parents:
diff changeset
160 u_int32_t id;
6b1b602514db Initial revision
carl
parents:
diff changeset
161 pst_index_ll * list_index;
6b1b602514db Initial revision
carl
parents:
diff changeset
162 pst_index_ll * desc;
6b1b602514db Initial revision
carl
parents:
diff changeset
163 int32_t no_child;
6b1b602514db Initial revision
carl
parents:
diff changeset
164 struct _pst_desc_tree * prev;
6b1b602514db Initial revision
carl
parents:
diff changeset
165 struct _pst_desc_tree * next;
6b1b602514db Initial revision
carl
parents:
diff changeset
166 struct _pst_desc_tree * parent;
6b1b602514db Initial revision
carl
parents:
diff changeset
167 struct _pst_desc_tree * child;
6b1b602514db Initial revision
carl
parents:
diff changeset
168 struct _pst_desc_tree * child_tail;
6b1b602514db Initial revision
carl
parents:
diff changeset
169 } pst_desc_ll;
6b1b602514db Initial revision
carl
parents:
diff changeset
170
6b1b602514db Initial revision
carl
parents:
diff changeset
171 typedef struct _pst_item_email_subject {
6b1b602514db Initial revision
carl
parents:
diff changeset
172 int32_t off1;
6b1b602514db Initial revision
carl
parents:
diff changeset
173 int32_t off2;
6b1b602514db Initial revision
carl
parents:
diff changeset
174 char *subj;
6b1b602514db Initial revision
carl
parents:
diff changeset
175 } pst_item_email_subject;
6b1b602514db Initial revision
carl
parents:
diff changeset
176
6b1b602514db Initial revision
carl
parents:
diff changeset
177 typedef struct _pst_item_email {
6b1b602514db Initial revision
carl
parents:
diff changeset
178 FILETIME *arrival_date;
6b1b602514db Initial revision
carl
parents:
diff changeset
179 int32_t autoforward; // 1 = true, 0 = not set, -1 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
180 char *body;
6b1b602514db Initial revision
carl
parents:
diff changeset
181 char *cc_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
182 char *common_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
183 int32_t conv_index;
6b1b602514db Initial revision
carl
parents:
diff changeset
184 int32_t conversion_prohib;
6b1b602514db Initial revision
carl
parents:
diff changeset
185 int32_t delete_after_submit; // 1 = true, 0 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
186 int32_t delivery_report; // 1 = true, 0 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
187 char *encrypted_body;
6b1b602514db Initial revision
carl
parents:
diff changeset
188 int32_t encrypted_body_size;
6b1b602514db Initial revision
carl
parents:
diff changeset
189 char *encrypted_htmlbody;
6b1b602514db Initial revision
carl
parents:
diff changeset
190 int32_t encrypted_htmlbody_size;
6b1b602514db Initial revision
carl
parents:
diff changeset
191 int32_t flag;
6b1b602514db Initial revision
carl
parents:
diff changeset
192 char *header;
6b1b602514db Initial revision
carl
parents:
diff changeset
193 char *htmlbody;
6b1b602514db Initial revision
carl
parents:
diff changeset
194 int32_t importance;
6b1b602514db Initial revision
carl
parents:
diff changeset
195 char *in_reply_to;
6b1b602514db Initial revision
carl
parents:
diff changeset
196 int32_t message_cc_me; // 1 = true, 0 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
197 int32_t message_recip_me; // 1 = true, 0 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
198 int32_t message_to_me; // 1 = true, 0 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
199 char *messageid;
6b1b602514db Initial revision
carl
parents:
diff changeset
200 int32_t orig_sensitivity;
6b1b602514db Initial revision
carl
parents:
diff changeset
201 char *outlook_recipient;
6b1b602514db Initial revision
carl
parents:
diff changeset
202 char *outlook_recipient2;
6b1b602514db Initial revision
carl
parents:
diff changeset
203 char *outlook_sender;
6b1b602514db Initial revision
carl
parents:
diff changeset
204 char *outlook_sender_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
205 char *outlook_sender2;
6b1b602514db Initial revision
carl
parents:
diff changeset
206 int32_t priority;
6b1b602514db Initial revision
carl
parents:
diff changeset
207 char *proc_subject;
6b1b602514db Initial revision
carl
parents:
diff changeset
208 int32_t read_receipt;
6b1b602514db Initial revision
carl
parents:
diff changeset
209 char *recip_access;
6b1b602514db Initial revision
carl
parents:
diff changeset
210 char *recip_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
211 char *recip2_access;
6b1b602514db Initial revision
carl
parents:
diff changeset
212 char *recip2_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
213 int32_t reply_requested;
6b1b602514db Initial revision
carl
parents:
diff changeset
214 char *reply_to;
6b1b602514db Initial revision
carl
parents:
diff changeset
215 char *return_path_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
216 int32_t rtf_body_char_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
217 int32_t rtf_body_crc;
6b1b602514db Initial revision
carl
parents:
diff changeset
218 char *rtf_body_tag;
6b1b602514db Initial revision
carl
parents:
diff changeset
219 char *rtf_compressed;
6b1b602514db Initial revision
carl
parents:
diff changeset
220 int32_t rtf_in_sync; // 1 = true, 0 = doesn't exist, -1 = false
6b1b602514db Initial revision
carl
parents:
diff changeset
221 int32_t rtf_ws_prefix_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
222 int32_t rtf_ws_trailing_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
223 char *sender_access;
6b1b602514db Initial revision
carl
parents:
diff changeset
224 char *sender_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
225 char *sender2_access;
6b1b602514db Initial revision
carl
parents:
diff changeset
226 char *sender2_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
227 int32_t sensitivity;
6b1b602514db Initial revision
carl
parents:
diff changeset
228 FILETIME *sent_date;
6b1b602514db Initial revision
carl
parents:
diff changeset
229 pst_entryid *sentmail_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
230 char *sentto_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
231 pst_item_email_subject *subject;
6b1b602514db Initial revision
carl
parents:
diff changeset
232 } pst_item_email;
6b1b602514db Initial revision
carl
parents:
diff changeset
233
6b1b602514db Initial revision
carl
parents:
diff changeset
234 typedef struct _pst_item_folder {
6b1b602514db Initial revision
carl
parents:
diff changeset
235 int32_t email_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
236 int32_t unseen_email_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
237 int32_t assoc_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
238 char subfolder;
6b1b602514db Initial revision
carl
parents:
diff changeset
239 } pst_item_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
240
6b1b602514db Initial revision
carl
parents:
diff changeset
241 typedef struct _pst_item_message_store {
6b1b602514db Initial revision
carl
parents:
diff changeset
242 pst_entryid *deleted_items_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
243 pst_entryid *search_root_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
244 pst_entryid *top_of_personal_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
245 pst_entryid *top_of_folder;
6b1b602514db Initial revision
carl
parents:
diff changeset
246 int32_t valid_mask; // what folders the message store contains
6b1b602514db Initial revision
carl
parents:
diff changeset
247 int32_t pwd_chksum;
6b1b602514db Initial revision
carl
parents:
diff changeset
248 } pst_item_message_store;
6b1b602514db Initial revision
carl
parents:
diff changeset
249
6b1b602514db Initial revision
carl
parents:
diff changeset
250 typedef struct _pst_item_contact {
6b1b602514db Initial revision
carl
parents:
diff changeset
251 char *access_method;
6b1b602514db Initial revision
carl
parents:
diff changeset
252 char *account_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
253 char *address1;
6b1b602514db Initial revision
carl
parents:
diff changeset
254 char *address1_desc;
6b1b602514db Initial revision
carl
parents:
diff changeset
255 char *address1_transport;
6b1b602514db Initial revision
carl
parents:
diff changeset
256 char *address2;
6b1b602514db Initial revision
carl
parents:
diff changeset
257 char *address2_desc;
6b1b602514db Initial revision
carl
parents:
diff changeset
258 char *address2_transport;
6b1b602514db Initial revision
carl
parents:
diff changeset
259 char *address3;
6b1b602514db Initial revision
carl
parents:
diff changeset
260 char *address3_desc;
6b1b602514db Initial revision
carl
parents:
diff changeset
261 char *address3_transport;
6b1b602514db Initial revision
carl
parents:
diff changeset
262 char *assistant_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
263 char *assistant_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
264 char *billing_information;
6b1b602514db Initial revision
carl
parents:
diff changeset
265 FILETIME *birthday;
6b1b602514db Initial revision
carl
parents:
diff changeset
266 char *business_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
267 char *business_city;
6b1b602514db Initial revision
carl
parents:
diff changeset
268 char *business_country;
6b1b602514db Initial revision
carl
parents:
diff changeset
269 char *business_fax;
6b1b602514db Initial revision
carl
parents:
diff changeset
270 char *business_homepage;
6b1b602514db Initial revision
carl
parents:
diff changeset
271 char *business_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
272 char *business_phone2;
6b1b602514db Initial revision
carl
parents:
diff changeset
273 char *business_po_box;
6b1b602514db Initial revision
carl
parents:
diff changeset
274 char *business_postal_code;
6b1b602514db Initial revision
carl
parents:
diff changeset
275 char *business_state;
6b1b602514db Initial revision
carl
parents:
diff changeset
276 char *business_street;
6b1b602514db Initial revision
carl
parents:
diff changeset
277 char *callback_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
278 char *car_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
279 char *company_main_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
280 char *company_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
281 char *computer_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
282 char *customer_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
283 char *def_postal_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
284 char *department;
6b1b602514db Initial revision
carl
parents:
diff changeset
285 char *display_name_prefix;
6b1b602514db Initial revision
carl
parents:
diff changeset
286 char *first_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
287 char *followup;
6b1b602514db Initial revision
carl
parents:
diff changeset
288 char *free_busy_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
289 char *ftp_site;
6b1b602514db Initial revision
carl
parents:
diff changeset
290 char *fullname;
6b1b602514db Initial revision
carl
parents:
diff changeset
291 int32_t gender;
6b1b602514db Initial revision
carl
parents:
diff changeset
292 char *gov_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
293 char *hobbies;
6b1b602514db Initial revision
carl
parents:
diff changeset
294 char *home_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
295 char *home_city;
6b1b602514db Initial revision
carl
parents:
diff changeset
296 char *home_country;
6b1b602514db Initial revision
carl
parents:
diff changeset
297 char *home_fax;
6b1b602514db Initial revision
carl
parents:
diff changeset
298 char *home_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
299 char *home_phone2;
6b1b602514db Initial revision
carl
parents:
diff changeset
300 char *home_po_box;
6b1b602514db Initial revision
carl
parents:
diff changeset
301 char *home_postal_code;
6b1b602514db Initial revision
carl
parents:
diff changeset
302 char *home_state;
6b1b602514db Initial revision
carl
parents:
diff changeset
303 char *home_street;
6b1b602514db Initial revision
carl
parents:
diff changeset
304 char *initials;
6b1b602514db Initial revision
carl
parents:
diff changeset
305 char *isdn_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
306 char *job_title;
6b1b602514db Initial revision
carl
parents:
diff changeset
307 char *keyword;
6b1b602514db Initial revision
carl
parents:
diff changeset
308 char *language;
6b1b602514db Initial revision
carl
parents:
diff changeset
309 char *location;
6b1b602514db Initial revision
carl
parents:
diff changeset
310 int32_t mail_permission;
6b1b602514db Initial revision
carl
parents:
diff changeset
311 char *manager_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
312 char *middle_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
313 char *mileage;
6b1b602514db Initial revision
carl
parents:
diff changeset
314 char *mobile_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
315 char *nickname;
6b1b602514db Initial revision
carl
parents:
diff changeset
316 char *office_loc;
6b1b602514db Initial revision
carl
parents:
diff changeset
317 char *org_id;
6b1b602514db Initial revision
carl
parents:
diff changeset
318 char *other_address;
6b1b602514db Initial revision
carl
parents:
diff changeset
319 char *other_city;
6b1b602514db Initial revision
carl
parents:
diff changeset
320 char *other_country;
6b1b602514db Initial revision
carl
parents:
diff changeset
321 char *other_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
322 char *other_po_box;
6b1b602514db Initial revision
carl
parents:
diff changeset
323 char *other_postal_code;
6b1b602514db Initial revision
carl
parents:
diff changeset
324 char *other_state;
6b1b602514db Initial revision
carl
parents:
diff changeset
325 char *other_street;
6b1b602514db Initial revision
carl
parents:
diff changeset
326 char *pager_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
327 char *personal_homepage;
6b1b602514db Initial revision
carl
parents:
diff changeset
328 char *pref_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
329 char *primary_fax;
6b1b602514db Initial revision
carl
parents:
diff changeset
330 char *primary_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
331 char *profession;
6b1b602514db Initial revision
carl
parents:
diff changeset
332 char *radio_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
333 int32_t rich_text;
6b1b602514db Initial revision
carl
parents:
diff changeset
334 char *spouse_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
335 char *suffix;
6b1b602514db Initial revision
carl
parents:
diff changeset
336 char *surname;
6b1b602514db Initial revision
carl
parents:
diff changeset
337 char *telex;
6b1b602514db Initial revision
carl
parents:
diff changeset
338 char *transmittable_display_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
339 char *ttytdd_phone;
6b1b602514db Initial revision
carl
parents:
diff changeset
340 FILETIME *wedding_anniversary;
6b1b602514db Initial revision
carl
parents:
diff changeset
341 } pst_item_contact;
6b1b602514db Initial revision
carl
parents:
diff changeset
342
6b1b602514db Initial revision
carl
parents:
diff changeset
343 typedef struct _pst_item_attach {
6b1b602514db Initial revision
carl
parents:
diff changeset
344 char *filename1;
6b1b602514db Initial revision
carl
parents:
diff changeset
345 char *filename2;
6b1b602514db Initial revision
carl
parents:
diff changeset
346 char *mimetype;
6b1b602514db Initial revision
carl
parents:
diff changeset
347 char *data;
6b1b602514db Initial revision
carl
parents:
diff changeset
348 size_t size;
6b1b602514db Initial revision
carl
parents:
diff changeset
349 int32_t id2_val;
6b1b602514db Initial revision
carl
parents:
diff changeset
350 int32_t id_val; // calculated from id2_val during creation of record
6b1b602514db Initial revision
carl
parents:
diff changeset
351 int32_t method;
6b1b602514db Initial revision
carl
parents:
diff changeset
352 int32_t position;
6b1b602514db Initial revision
carl
parents:
diff changeset
353 int32_t sequence;
6b1b602514db Initial revision
carl
parents:
diff changeset
354 struct _pst_item_attach *next;
6b1b602514db Initial revision
carl
parents:
diff changeset
355 } pst_item_attach;
6b1b602514db Initial revision
carl
parents:
diff changeset
356
6b1b602514db Initial revision
carl
parents:
diff changeset
357 typedef struct _pst_item_extra_field {
6b1b602514db Initial revision
carl
parents:
diff changeset
358 char *field_name;
6b1b602514db Initial revision
carl
parents:
diff changeset
359 char *value;
6b1b602514db Initial revision
carl
parents:
diff changeset
360 struct _pst_item_extra_field *next;
6b1b602514db Initial revision
carl
parents:
diff changeset
361 } pst_item_extra_field;
6b1b602514db Initial revision
carl
parents:
diff changeset
362
6b1b602514db Initial revision
carl
parents:
diff changeset
363 typedef struct _pst_item_journal {
6b1b602514db Initial revision
carl
parents:
diff changeset
364 FILETIME *end;
6b1b602514db Initial revision
carl
parents:
diff changeset
365 FILETIME *start;
6b1b602514db Initial revision
carl
parents:
diff changeset
366 char *type;
6b1b602514db Initial revision
carl
parents:
diff changeset
367 } pst_item_journal;
6b1b602514db Initial revision
carl
parents:
diff changeset
368
6b1b602514db Initial revision
carl
parents:
diff changeset
369 typedef struct _pst_item_appointment {
6b1b602514db Initial revision
carl
parents:
diff changeset
370 FILETIME *end;
6b1b602514db Initial revision
carl
parents:
diff changeset
371 char *location;
6b1b602514db Initial revision
carl
parents:
diff changeset
372 FILETIME *reminder;
6b1b602514db Initial revision
carl
parents:
diff changeset
373 FILETIME *start;
6b1b602514db Initial revision
carl
parents:
diff changeset
374 char *timezonestring;
6b1b602514db Initial revision
carl
parents:
diff changeset
375 int32_t showas;
6b1b602514db Initial revision
carl
parents:
diff changeset
376 int32_t label;
6b1b602514db Initial revision
carl
parents:
diff changeset
377 } pst_item_appointment;
6b1b602514db Initial revision
carl
parents:
diff changeset
378
6b1b602514db Initial revision
carl
parents:
diff changeset
379 typedef struct _pst_item {
6b1b602514db Initial revision
carl
parents:
diff changeset
380 struct _pst_item_email *email; // data reffering to email
6b1b602514db Initial revision
carl
parents:
diff changeset
381 struct _pst_item_folder *folder; // data reffering to folder
6b1b602514db Initial revision
carl
parents:
diff changeset
382 struct _pst_item_contact *contact; // data reffering to contact
6b1b602514db Initial revision
carl
parents:
diff changeset
383 struct _pst_item_attach *attach; // linked list of attachments
6b1b602514db Initial revision
carl
parents:
diff changeset
384 struct _pst_item_attach *current_attach; // pointer to current attachment
6b1b602514db Initial revision
carl
parents:
diff changeset
385 struct _pst_item_message_store * message_store; // data referring to the message store
6b1b602514db Initial revision
carl
parents:
diff changeset
386 struct _pst_item_extra_field *extra_fields; // linked list of extra headers and such
6b1b602514db Initial revision
carl
parents:
diff changeset
387 struct _pst_item_journal *journal; // data reffering to a journal entry
6b1b602514db Initial revision
carl
parents:
diff changeset
388 struct _pst_item_appointment *appointment; // data reffering to a calendar entry
6b1b602514db Initial revision
carl
parents:
diff changeset
389 int32_t type;
6b1b602514db Initial revision
carl
parents:
diff changeset
390 char *ascii_type;
6b1b602514db Initial revision
carl
parents:
diff changeset
391 char *file_as;
6b1b602514db Initial revision
carl
parents:
diff changeset
392 char *comment;
6b1b602514db Initial revision
carl
parents:
diff changeset
393 int32_t message_size;
6b1b602514db Initial revision
carl
parents:
diff changeset
394 char *outlook_version;
6b1b602514db Initial revision
carl
parents:
diff changeset
395 char *record_key; // probably 16 bytes long.
6b1b602514db Initial revision
carl
parents:
diff changeset
396 size_t record_key_size;
6b1b602514db Initial revision
carl
parents:
diff changeset
397 int32_t response_requested;
6b1b602514db Initial revision
carl
parents:
diff changeset
398 FILETIME *create_date;
6b1b602514db Initial revision
carl
parents:
diff changeset
399 FILETIME *modify_date;
6b1b602514db Initial revision
carl
parents:
diff changeset
400 int32_t private;
6b1b602514db Initial revision
carl
parents:
diff changeset
401 } pst_item;
6b1b602514db Initial revision
carl
parents:
diff changeset
402
6b1b602514db Initial revision
carl
parents:
diff changeset
403 typedef struct _pst_x_attrib_ll {
6b1b602514db Initial revision
carl
parents:
diff changeset
404 int32_t type;
6b1b602514db Initial revision
carl
parents:
diff changeset
405 int32_t mytype;
6b1b602514db Initial revision
carl
parents:
diff changeset
406 int32_t map;
6b1b602514db Initial revision
carl
parents:
diff changeset
407 void *data;
6b1b602514db Initial revision
carl
parents:
diff changeset
408 struct _pst_x_attrib_ll *next;
6b1b602514db Initial revision
carl
parents:
diff changeset
409 } pst_x_attrib_ll;
6b1b602514db Initial revision
carl
parents:
diff changeset
410
6b1b602514db Initial revision
carl
parents:
diff changeset
411 typedef struct _pst_file {
6b1b602514db Initial revision
carl
parents:
diff changeset
412 pst_index_ll *i_head, *i_tail;
6b1b602514db Initial revision
carl
parents:
diff changeset
413 pst_index2_ll *i2_head;
6b1b602514db Initial revision
carl
parents:
diff changeset
414 pst_desc_ll *d_head, *d_tail;
6b1b602514db Initial revision
carl
parents:
diff changeset
415 pst_x_attrib_ll *x_head;
6b1b602514db Initial revision
carl
parents:
diff changeset
416 int32_t index1;
6b1b602514db Initial revision
carl
parents:
diff changeset
417 int32_t index1_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
418 int32_t index2;
6b1b602514db Initial revision
carl
parents:
diff changeset
419 int32_t index2_count;
6b1b602514db Initial revision
carl
parents:
diff changeset
420 FILE * fp;
6b1b602514db Initial revision
carl
parents:
diff changeset
421 size_t size;
6b1b602514db Initial revision
carl
parents:
diff changeset
422 unsigned char index1_depth;
6b1b602514db Initial revision
carl
parents:
diff changeset
423 unsigned char index2_depth;
6b1b602514db Initial revision
carl
parents:
diff changeset
424 unsigned char encryption;
6b1b602514db Initial revision
carl
parents:
diff changeset
425 unsigned char id_depth_ok;
6b1b602514db Initial revision
carl
parents:
diff changeset
426 unsigned char desc_depth_ok;
6b1b602514db Initial revision
carl
parents:
diff changeset
427 unsigned char ind_type;
6b1b602514db Initial revision
carl
parents:
diff changeset
428 } pst_file;
6b1b602514db Initial revision
carl
parents:
diff changeset
429
6b1b602514db Initial revision
carl
parents:
diff changeset
430 typedef struct _pst_block_offset {
6b1b602514db Initial revision
carl
parents:
diff changeset
431 int16_t from;
6b1b602514db Initial revision
carl
parents:
diff changeset
432 int16_t to;
6b1b602514db Initial revision
carl
parents:
diff changeset
433 } pst_block_offset;
6b1b602514db Initial revision
carl
parents:
diff changeset
434
6b1b602514db Initial revision
carl
parents:
diff changeset
435 struct _pst_num_item {
6b1b602514db Initial revision
carl
parents:
diff changeset
436 int32_t id;
6b1b602514db Initial revision
carl
parents:
diff changeset
437 unsigned char *data;
6b1b602514db Initial revision
carl
parents:
diff changeset
438 int32_t type;
6b1b602514db Initial revision
carl
parents:
diff changeset
439 size_t size;
6b1b602514db Initial revision
carl
parents:
diff changeset
440 char *extra;
6b1b602514db Initial revision
carl
parents:
diff changeset
441 };
6b1b602514db Initial revision
carl
parents:
diff changeset
442
6b1b602514db Initial revision
carl
parents:
diff changeset
443 typedef struct _pst_num_array {
6b1b602514db Initial revision
carl
parents:
diff changeset
444 int32_t count_item;
6b1b602514db Initial revision
carl
parents:
diff changeset
445 int32_t count_array;
6b1b602514db Initial revision
carl
parents:
diff changeset
446 struct _pst_num_item ** items;
6b1b602514db Initial revision
carl
parents:
diff changeset
447 struct _pst_num_array *next;
6b1b602514db Initial revision
carl
parents:
diff changeset
448 } pst_num_array;
6b1b602514db Initial revision
carl
parents:
diff changeset
449
6b1b602514db Initial revision
carl
parents:
diff changeset
450 struct holder {
6b1b602514db Initial revision
carl
parents:
diff changeset
451 unsigned char **buf;
6b1b602514db Initial revision
carl
parents:
diff changeset
452 FILE * fp;
6b1b602514db Initial revision
carl
parents:
diff changeset
453 int32_t base64;
6b1b602514db Initial revision
carl
parents:
diff changeset
454 char base64_extra_chars[3];
6b1b602514db Initial revision
carl
parents:
diff changeset
455 int32_t base64_extra;
6b1b602514db Initial revision
carl
parents:
diff changeset
456 };
6b1b602514db Initial revision
carl
parents:
diff changeset
457
6b1b602514db Initial revision
carl
parents:
diff changeset
458 // prototypes
6b1b602514db Initial revision
carl
parents:
diff changeset
459 int32_t pst_open(pst_file *pf, char *name, char *mode);
6b1b602514db Initial revision
carl
parents:
diff changeset
460 int32_t pst_close(pst_file *pf);
6b1b602514db Initial revision
carl
parents:
diff changeset
461 pst_desc_ll * pst_getTopOfFolders(pst_file *pf, pst_item *root);
6b1b602514db Initial revision
carl
parents:
diff changeset
462 int32_t pst_attach_to_mem(pst_file *pf, pst_item_attach *attach, unsigned char **b);
6b1b602514db Initial revision
carl
parents:
diff changeset
463 int32_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp);
6b1b602514db Initial revision
carl
parents:
diff changeset
464 int32_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp);
6b1b602514db Initial revision
carl
parents:
diff changeset
465 int32_t pst_load_index (pst_file *pf);
6b1b602514db Initial revision
carl
parents:
diff changeset
466 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
6b1b602514db Initial revision
carl
parents:
diff changeset
467 int32_t pst_load_extended_attributes(pst_file *pf);
6b1b602514db Initial revision
carl
parents:
diff changeset
468
6b1b602514db Initial revision
carl
parents:
diff changeset
469 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t start_val, int32_t end_val);
6b1b602514db Initial revision
carl
parents:
diff changeset
470 int32_t _pst_build_desc_ptr (pst_file *pf, int32_t offset, int32_t depth, int32_t *high_id,
6b1b602514db Initial revision
carl
parents:
diff changeset
471 int32_t start_id, int32_t end_val);
6b1b602514db Initial revision
carl
parents:
diff changeset
472 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
6b1b602514db Initial revision
carl
parents:
diff changeset
473 void * _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
6b1b602514db Initial revision
carl
parents:
diff changeset
474 pst_num_array * _pst_parse_block(pst_file *pf, u_int32_t block_id, pst_index2_ll *i2_head);
6b1b602514db Initial revision
carl
parents:
diff changeset
475 int32_t _pst_process(pst_num_array *list, pst_item *item);
6b1b602514db Initial revision
carl
parents:
diff changeset
476 int32_t _pst_free_list(pst_num_array *list);
6b1b602514db Initial revision
carl
parents:
diff changeset
477 void _pst_freeItem(pst_item *item);
6b1b602514db Initial revision
carl
parents:
diff changeset
478 int32_t _pst_free_id2(pst_index2_ll * head);
6b1b602514db Initial revision
carl
parents:
diff changeset
479 int32_t _pst_free_id (pst_index_ll *head);
6b1b602514db Initial revision
carl
parents:
diff changeset
480 int32_t _pst_free_desc (pst_desc_ll *head);
6b1b602514db Initial revision
carl
parents:
diff changeset
481 int32_t _pst_free_xattrib(pst_x_attrib_ll *x);
6b1b602514db Initial revision
carl
parents:
diff changeset
482 int32_t _pst_getBlockOffset(char *buf, int32_t i_offset, int32_t offset, pst_block_offset *p);
6b1b602514db Initial revision
carl
parents:
diff changeset
483 pst_index2_ll * _pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
6b1b602514db Initial revision
carl
parents:
diff changeset
484 pst_index_ll * _pst_getID(pst_file* pf, u_int32_t id);
6b1b602514db Initial revision
carl
parents:
diff changeset
485 pst_index_ll * _pst_getID2(pst_index2_ll * ptr, u_int32_t id);
6b1b602514db Initial revision
carl
parents:
diff changeset
486 pst_desc_ll * _pst_getDptr(pst_file *pf, u_int32_t id);
6b1b602514db Initial revision
carl
parents:
diff changeset
487 size_t _pst_read_block_size(pst_file *pf, int32_t offset, size_t size, char ** buf, int32_t do_enc,
6b1b602514db Initial revision
carl
parents:
diff changeset
488 unsigned char is_index);
6b1b602514db Initial revision
carl
parents:
diff changeset
489 int32_t _pst_decrypt(unsigned char *buf, size_t size, int32_t type);
6b1b602514db Initial revision
carl
parents:
diff changeset
490 int32_t _pst_getAtPos(FILE *fp, int32_t pos, void* buf, u_int32_t size);
6b1b602514db Initial revision
carl
parents:
diff changeset
491 int32_t _pst_get (FILE *fp, void *buf, u_int32_t size);
6b1b602514db Initial revision
carl
parents:
diff changeset
492 size_t _pst_ff_getIDblock_dec(pst_file *pf, u_int32_t id, unsigned char **b);
6b1b602514db Initial revision
carl
parents:
diff changeset
493 size_t _pst_ff_getIDblock(pst_file *pf, u_int32_t id, unsigned char** b);
6b1b602514db Initial revision
carl
parents:
diff changeset
494 size_t _pst_ff_getID2block(pst_file *pf, u_int32_t id2, pst_index2_ll *id2_head, unsigned char** buf);
6b1b602514db Initial revision
carl
parents:
diff changeset
495 size_t _pst_ff_getID2data(pst_file *pf, pst_index_ll *ptr, struct holder *h);
6b1b602514db Initial revision
carl
parents:
diff changeset
496 size_t _pst_ff_compile_ID(pst_file *pf, u_int32_t id, struct holder *h, int32_t size);
6b1b602514db Initial revision
carl
parents:
diff changeset
497
6b1b602514db Initial revision
carl
parents:
diff changeset
498 int32_t pst_strincmp(char *a, char *b, int32_t x);
6b1b602514db Initial revision
carl
parents:
diff changeset
499 int32_t pst_stricmp(char *a, char *b);
6b1b602514db Initial revision
carl
parents:
diff changeset
500 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream);
6b1b602514db Initial revision
carl
parents:
diff changeset
501 char * _pst_wide_to_single(char *wt, int32_t size);
6b1b602514db Initial revision
carl
parents:
diff changeset
502 // DEBUG functions
6b1b602514db Initial revision
carl
parents:
diff changeset
503 int32_t _pst_printDptr(pst_file *pf);
6b1b602514db Initial revision
carl
parents:
diff changeset
504 int32_t _pst_printIDptr(pst_file* pf);
6b1b602514db Initial revision
carl
parents:
diff changeset
505 int32_t _pst_printID2ptr(pst_index2_ll *ptr);
6b1b602514db Initial revision
carl
parents:
diff changeset
506 void * xmalloc(size_t size);
6b1b602514db Initial revision
carl
parents:
diff changeset
507 #endif