comparison archive/svn.snap.diff @ 57:de3753c3160a

add archive directory with history of alioth versions that have been merged here
author Carl Byington <carl@five-ten-sg.com>
date Sat, 02 Feb 2008 12:54:07 -0800
parents
children
comparison
equal deleted inserted replaced
56:b504411ad213 57:de3753c3160a
1 diff libpst-0.5.2/ChangeLog libpst-alioth-2008-01-19/libpst/trunk/ChangeLog
2 0a1,19
3 > LibPST svn snapshot
4 > ===============================
5 >
6 > * Add new fields to appointment for recurring events
7 > (SourceForge #304198)
8 > * Map IPM.Task items to PST_TYPE_TASK.
9 > * Applied patch to remove compiler warnings, thanks!
10 > (SourceForge #304314)
11 > * Fix crash with unknown reference type
12 > * Fix more memory issues detected by valgrind
13 > * lspst:
14 > * Add usage mesage and option parsing using getopt
15 > (SourceForge #304199)
16 > * Fix crash caused by invalid free calls
17 > * Fix crash when email subject is empty
18 > * Fix memory and information leak in hex debug dump
19 >
20 > --
21 >
22 14c33
23 < * Add more appointment fields, thanks to Chris Hall for tracking
24 ---
25 > * Add more appointment fields, thanks to Chris Halls for tracking
26 diff libpst-0.5.2/debug.c libpst-alioth-2008-01-19/libpst/trunk/debug.c
27 118c118
28 < fprintf(stderr, "debug_fp is NULL\n");
29 ---
30 > /* fprintf(stderr, "debug_fp is NULL\n"); */
31 411a412,413
32 > index[1] = 0; // Unused
33 > index[2] = 0; // Unused
34 423a426
35 > lfile_rec.end = 0; // Unused
36 439a443
37 > free(index);
38 diff libpst-0.5.2/libpst.c libpst-alioth-2008-01-19/libpst/trunk/libpst.c
39 290c290
40 < int32_t size;
41 ---
42 > int32_t size = 0;
43 380c380
44 < pst_index2_ll *list2;
45 ---
46 > pst_index2_ll *list2=NULL;
47 383c383
48 < int32_t bptr = 0, bsize, hsize, tint, err=0, x;
49 ---
50 > int32_t bptr = 0, bsize=0, hsize=0, tint, err=0, x;
51 1381a1382
52 > memset(na_ptr->items, 0, sizeof(struct _pst_num_item)*num_list);
53 1543d1543
54 < na_ptr->items[x]->data = NULL;
55 1544a1545,1546
56 > free(na_ptr->items[x]->data);
57 > na_ptr->items[x]->data = NULL;
58 1565a1568
59 > if (buf) free (buf);
60 1703a1707,1708
61 > else if (pst_strincmp("IPM.Task", item->ascii_type, 8) == 0)
62 > item->type = PST_TYPE_TASK;
63 2131,2132c2136,2138
64 < memcpy(&(attach->size), list->items[x]->data,
65 < sizeof(attach->size));
66 ---
67 > t = (*(int32_t*)list->items[x]->data);
68 > LE32_CPU(t);
69 > attach->size = t;
70 3132a3139,3150
71 > case 0x820d: // Appointment start
72 > DEBUG_EMAIL(("Appointment Date Start - "));
73 > MALLOC_APPOINTMENT(item);
74 > LIST_COPY(item->appointment->start, (FILETIME*));
75 > DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->start)));
76 > break;
77 > case 0x820e: // Appointment end
78 > DEBUG_EMAIL(("Appointment Date End - "));
79 > MALLOC_APPOINTMENT(item);
80 > LIST_COPY(item->appointment->end, (FILETIME*));
81 > DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->end)));
82 > break;
83 3173a3192,3219
84 > case 0x8231: // Recurrence type
85 > // 1: Daily
86 > // 2: Weekly
87 > // 3: Monthly
88 > // 4: Yearly
89 > DEBUG_EMAIL(("Appointment reccurs - "));
90 > MALLOC_APPOINTMENT(item);
91 > memcpy(&(item->appointment->recurrence_type), list->items[x]->data, sizeof(item->appointment->recurrence_type));
92 > LE32_CPU(item->appointment->recurrence_type);
93 > switch (item->appointment->recurrence_type) {
94 > case PST_APP_RECUR_DAILY:
95 > DEBUG_EMAIL(("Daily\n")); break;
96 > case PST_APP_RECUR_WEEKLY:
97 > DEBUG_EMAIL(("Weekly\n")); break;
98 > case PST_APP_RECUR_MONTHLY:
99 > DEBUG_EMAIL(("Monthly\n")); break;
100 > case PST_APP_RECUR_YEARLY:
101 > DEBUG_EMAIL(("Yearly\n")); break;
102 > default:
103 > DEBUG_EMAIL(("Unknown Value: %d\n", item->appointment->recurrence_type)); break;
104 > }
105 > break;
106 > case 0x8232: // Recurrence description
107 > DEBUG_EMAIL(("Appointment recurrence description - "));
108 > MALLOC_APPOINTMENT(item);
109 > LIST_COPY(item->appointment->recurrence, (char*));
110 > DEBUG_EMAIL(("%s\n", item->appointment->recurrence));
111 > break;
112 3180,3181c3226,3227
113 < case 0x8235: // Appointment start time
114 < DEBUG_EMAIL(("Appointment Start Time - "));
115 ---
116 > case 0x8235: // Recurrence start date
117 > DEBUG_EMAIL(("Recurrence Start Date - "));
118 3183,3184c3229,3230
119 < LIST_COPY(item->appointment->start, (FILETIME*));
120 < DEBUG_EMAIL(("%s\n", fileTimeToAscii((FILETIME*)item->appointment->start)));
121 ---
122 > LIST_COPY(item->appointment->recurrence_start, (FILETIME*));
123 > DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->recurrence_start)));
124 3186,3187c3232,3233
125 < case 0x8236: // Appointment end time
126 < DEBUG_EMAIL(("Appointment End Time - "));
127 ---
128 > case 0x8236: // Recurrence end date
129 > DEBUG_EMAIL(("Recurrence End Date - "));
130 3189,3190c3235,3254
131 < LIST_COPY(item->appointment->end, (FILETIME*));
132 < DEBUG_EMAIL(("%s\n", fileTimeToAscii((FILETIME*)item->appointment->start)));
133 ---
134 > LIST_COPY(item->appointment->recurrence_end, (FILETIME*));
135 > DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->recurrence_end)));
136 > break;
137 > case 0x8501: // Reminder minutes before appointment start
138 > DEBUG_EMAIL(("Alarm minutes - "));
139 > MALLOC_APPOINTMENT(item);
140 > memcpy(&(item->appointment->alarm_minutes), list->items[x]->data, sizeof(item->appointment->alarm_minutes));
141 > LE32_CPU(item->appointment->alarm_minutes);
142 > DEBUG_EMAIL(("%i\n", item->appointment->alarm_minutes));
143 > break;
144 > case 0x8503: // Reminder alarm
145 > DEBUG_EMAIL(("Reminder alarm - "));
146 > MALLOC_APPOINTMENT(item);
147 > if (*(int16_t*)list->items[x]->data != 0) {
148 > DEBUG_EMAIL(("True\n"));
149 > item->appointment->alarm = 1;
150 > } else {
151 > DEBUG_EMAIL(("False\n"));
152 > item->appointment->alarm = 0;
153 > }
154 3192,3193c3256,3257
155 < case 0x8516: // Journal time start
156 < DEBUG_EMAIL(("Duplicate Time Start - "));
157 ---
158 > case 0x8516:
159 > DEBUG_EMAIL(("Appointment Start Date 3 - "));
160 3196,3197c3260,3261
161 < case 0x8517: // Journal time end
162 < DEBUG_EMAIL(("Duplicate Time End - "));
163 ---
164 > case 0x8517:
165 > DEBUG_EMAIL(("Appointment End Date 3 - "));
166 3199a3264,3269
167 > case 0x851f: // Play reminder sound filename
168 > DEBUG_EMAIL(("Appointment reminder sound filename - "));
169 > MALLOC_APPOINTMENT(item);
170 > LIST_COPY(item->appointment->alarm_filename, (char*));
171 > DEBUG_EMAIL(("%s\n", item->appointment->alarm_filename));
172 > break;
173 3319,3321d3388
174 < if (list->items[x]->data != NULL) {
175 < free (list->items[x]->data);
176 < }
177 3322a3390,3392
178 > if (list->items[x]->data != NULL) {
179 > free (list->items[x]->data);
180 > }
181 3421c3491
182 < WARN(("block read error occured. offset = %#x, size = %#x\n", list->offset, list->size));
183 ---
184 > WARN(("block read error occured. offset = %#x, size = %#zx\n", list->offset, list->size));
185 3681a3752
186 > SAFE_FREE(item->appointment->alarm_filename);
187 3684a3756,3758
188 > SAFE_FREE(item->appointment->recurrence);
189 > SAFE_FREE(item->appointment->recurrence_start);
190 > SAFE_FREE(item->appointment->recurrence_end);
191 4008a4083,4089
192 > /**
193 > * Get an ID block from file using _pst_ff_getIDblock and decrypt if necessary
194 > * @param pf PST file structure
195 > * @param id ID of block to retrieve
196 > * @param b Reference to pointer that will be set to new block. Any memory pointed to by buffer will be free()d beforehand
197 > * @return Size of block pointed to by *b
198 > */
199 4019,4020c4100,4106
200 < /** the get ID function for the default file format that I am working with
201 < ie the one in the PST files */
202 ---
203 > /**
204 > * Read a block of data from file into memory
205 > * @param pf PST file
206 > * @param id identifier of block to read
207 > * @param b reference to pointer to buffer. If this pointer is non-NULL, it will first be free()d
208 > * @return size of block read into memory
209 > */
210 diff libpst-0.5.2/libpst.h libpst-alioth-2008-01-19/libpst/trunk/libpst.h
211 116a117,123
212 > // define type of reccuring event
213 > #define PST_APP_RECUR_NONE 0
214 > #define PST_APP_RECUR_DAILY 1
215 > #define PST_APP_RECUR_WEEKLY 2
216 > #define PST_APP_RECUR_MONTHLY 3
217 > #define PST_APP_RECUR_YEARLY 4
218 >
219 372a380
220 > int32_t alarm;
221 373a382,383
222 > int32_t alarm_minutes;
223 > char *alarm_filename;
224 378a389,392
225 > char *recurrence;
226 > int32_t recurrence_type;
227 > FILETIME *recurrence_start;
228 > FILETIME *recurrence_end;
229 diff libpst-0.5.2/lspst.c libpst-alioth-2008-01-19/libpst/trunk/lspst.c
230 15a16
231 > #include <unistd.h>
232 38a40,41
233 > int usage(char *prog_name);
234 > int version();
235 50a54,55
236 > int c;
237 > char *d_log = NULL;
238 53,54c58,91
239 < if (argc <= 1)
240 < DIE(("Missing PST filename.\n"));
241 ---
242 > while ((c = getopt(argc, argv, "d:hV"))!= -1) {
243 > switch (c) {
244 > case 'd':
245 > d_log = optarg;
246 > break;
247 > case 'h':
248 > usage(argv[0]);
249 > exit(0);
250 > break;
251 > case 'V':
252 > version();
253 > exit(0);
254 > break;
255 > default:
256 > usage(argv[0]);
257 > exit(1);
258 > break;
259 > }
260 > }
261 >
262 > #ifdef DEBUG_ALL
263 > // initialize log file
264 > if (d_log != NULL) {
265 > DEBUG_INIT(d_log);
266 > DEBUG_REGISTER_CLOSE();
267 > }
268 > #endif // defined DEBUG_ALL
269 >
270 > DEBUG_ENT("main");
271 >
272 > if (argc <= optind) {
273 > usage(argv[0]);
274 > exit(2);
275 > }
276 57c94
277 < if ( pst_open(&pstfile, argv[1], "r") )
278 ---
279 > if ( pst_open(&pstfile, argv[optind], "r") )
280 162d198
281 < free(f->name);
282 194c230
283 < if (item->email->subject->subj != NULL)
284 ---
285 > if (item->email->subject != NULL && item->email->subject->subj != NULL)
286 251d286
287 < free(f->name);
288 427a463,494
289 > // int usage() {{{1
290 > int usage(char *prog_name) {
291 > DEBUG_ENT("usage");
292 > version();
293 > printf("Usage: %s [OPTIONS] {PST FILENAME}\n", prog_name);
294 > printf("OPTIONS:\n");
295 > printf("\t-d\t- Debug to file. This is a binary log. Use readlog to print it\n");
296 > printf("\t-h\t- Help. This screen\n");
297 > printf("\t-V\t- Version. Display program version\n");
298 > DEBUG_RET();
299 > return 0;
300 > }
301 > // }}}1
302 > // int version() {{{1
303 > int version() {
304 > DEBUG_ENT("version");
305 > printf("lspst / LibPST v%s\n", VERSION);
306 > #if BYTE_ORDER == BIG_ENDIAN
307 > printf("Big Endian implementation being used.\n");
308 > #elif BYTE_ORDER == LITTLE_ENDIAN
309 > printf("Little Endian implementation being used.\n");
310 > #else
311 > # error "Byte order not supported by this library"
312 > #endif
313 > #ifdef __GNUC__
314 > printf("GCC %d.%d : %s %s\n", __GNUC__, __GNUC_MINOR__, __DATE__, __TIME__);
315 > #endif
316 > DEBUG_RET();
317 > return 0;
318 > }
319 > // }}}1
320 >
321 diff libpst-0.5.2/Makefile libpst-alioth-2008-01-19/libpst/trunk/Makefile
322 49c49
323 < dumpblocks: dumpblocks.o libpst.o debug.o libstrfunc.o
324 ---
325 > dumpblocks: dumpblocks.o libpst.o debug.o libstrfunc.o timeconv.o
326 diff libpst-0.5.2/readpst.c libpst-alioth-2008-01-19/libpst/trunk/readpst.c
327 1203c1203
328 < int usage() {
329 ---
330 > int32_t usage() {
331 1224c1224
332 < int version() {
333 ---
334 > int32_t version() {
335 1281c1281
336 < int close_kmail_dir() {
337 ---
338 > int32_t close_kmail_dir() {
339 1324c1324
340 < int close_recurse_dir() {
341 ---
342 > int32_t close_recurse_dir() {
343 1404c1404
344 < int close_seperate_dir() {
345 ---
346 > int32_t close_seperate_dir() {
347 1416c1416
348 < int mk_seperate_file(struct file_ll *f) {
349 ---
350 > int32_t mk_seperate_file(struct file_ll *f) {
351 1535c1535
352 < int chr_count(char *str, char x) {
353 ---
354 > int32_t chr_count(char *str, char x) {
355 Only in libpst-alioth-2008-01-19/libpst/trunk: .svn
356 diff libpst-0.5.2/VERSION libpst-alioth-2008-01-19/libpst/trunk/VERSION
357 1c1
358 < 0.5.2
359 ---
360 > 0.5.2+SVN_SNAPSHOT