comparison src/libpst.c @ 129:fc11b1d1ad34

fix initial from header in mbox format. start moving to PST_LE_GET* rather than LE*_CPU macros so we can eventually remove the pragma packing.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 05 Feb 2009 12:09:04 -0800
parents 7f747c8c9d02
children e35fd42bac05
comparison
equal deleted inserted replaced
128:7f747c8c9d02 129:fc11b1d1ad34
2 * libpst.c 2 * libpst.c
3 * Part of the LibPST project 3 * Part of the LibPST project
4 * Written by David Smith 4 * Written by David Smith
5 * dave.s@earthcorp.com 5 * dave.s@earthcorp.com
6 */ 6 */
7
8 #include "common.h"
9 #include "libpst.h"
10 #include "timeconv.h"
11 #include "libstrfunc.h"
12 #include "vbuf.h"
13 7
14 #include "define.h" 8 #include "define.h"
15 9
16 #define ASSERT(x) { if(!(x)) raise( SIGSEGV ); } 10 #define ASSERT(x) { if(!(x)) raise( SIGSEGV ); }
17 11
563 DEBUG_WARN(("No extended attributes buffer found. Not processing\n")); 557 DEBUG_WARN(("No extended attributes buffer found. Not processing\n"));
564 DEBUG_RET(); 558 DEBUG_RET();
565 return 0; 559 return 0;
566 } 560 }
567 561
568 xattrib.extended=PST_LE_GET_UINT32(buffer+bptr), bptr += 4; 562 xattrib.extended= PST_LE_GET_UINT32(buffer+bptr), bptr += 4;
569 xattrib.type=PST_LE_GET_UINT16(buffer+bptr), bptr += 2; 563 xattrib.type = PST_LE_GET_UINT16(buffer+bptr), bptr += 2;
570 xattrib.map=PST_LE_GET_UINT16(buffer+bptr), bptr += 2; 564 xattrib.map = PST_LE_GET_UINT16(buffer+bptr), bptr += 2;
571 565
572 while (xattrib.type != 0 && bptr < bsize) { 566 while (xattrib.type != 0 && bptr < bsize) {
573 ptr = (pst_x_attrib_ll*) xmalloc(sizeof(*ptr)); 567 ptr = (pst_x_attrib_ll*) xmalloc(sizeof(*ptr));
574 memset(ptr, 0, sizeof(*ptr)); 568 memset(ptr, 0, sizeof(*ptr));
575 ptr->type = xattrib.type; 569 ptr->type = xattrib.type;