comparison src/libpst.h @ 35:b2f247463b83 stable-0-5-6

better decoding of 7c blocks
author carl
date Sun, 15 Jul 2007 14:25:34 -0700
parents 07177825c91b
children 6fe121a971c9
comparison
equal deleted inserted replaced
34:07177825c91b 35:b2f247463b83
124 } pst_misc_6; 124 } pst_misc_6;
125 125
126 typedef struct _pst_entryid_struct { 126 typedef struct _pst_entryid_struct {
127 int32_t u1; 127 int32_t u1;
128 char entryid[16]; 128 char entryid[16];
129 int32_t id; 129 u_int32_t id;
130 } pst_entryid; 130 } pst_entryid;
131 131
132 typedef struct _pst_desc_struct { 132 typedef struct _pst_desc_struct {
133 u_int32_t d_id; 133 u_int32_t d_id;
134 u_int32_t desc_id; 134 u_int32_t desc_id;
150 int32_t u1; 150 int32_t u1;
151 struct _pst_index_tree * next; 151 struct _pst_index_tree * next;
152 } pst_index_ll; 152 } pst_index_ll;
153 153
154 typedef struct _pst_index2_tree { 154 typedef struct _pst_index2_tree {
155 int32_t id2; 155 u_int32_t id2;
156 pst_index_ll *id; 156 pst_index_ll *id;
157 struct _pst_index2_tree * next; 157 struct _pst_index2_tree * next;
158 } pst_index2_ll; 158 } pst_index2_ll;
159 159
160 typedef struct _pst_desc_tree { 160 typedef struct _pst_desc_tree {
430 typedef struct _pst_block_offset { 430 typedef struct _pst_block_offset {
431 int16_t from; 431 int16_t from;
432 int16_t to; 432 int16_t to;
433 } pst_block_offset; 433 } pst_block_offset;
434 434
435 typedef struct _pst_block_offset_pointer {
436 unsigned char *from;
437 unsigned char *to;
438 int needfree;
439 } pst_block_offset_pointer;
440
435 struct _pst_num_item { 441 struct _pst_num_item {
436 int32_t id; 442 u_int32_t id;
437 unsigned char *data; 443 unsigned char *data;
438 int32_t type; 444 int32_t type;
439 size_t size; 445 size_t size;
440 char *extra; 446 char *extra;
441 }; 447 };
465 int32_t pst_load_index (pst_file *pf); 471 int32_t pst_load_index (pst_file *pf);
466 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d); 472 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
467 int32_t pst_load_extended_attributes(pst_file *pf); 473 int32_t pst_load_extended_attributes(pst_file *pf);
468 474
469 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, u_int32_t start_val, u_int32_t end_val); 475 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, u_int32_t start_val, u_int32_t end_val);
470 int32_t _pst_build_desc_ptr (pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, u_int32_t *high_id, int32_t start_id, int32_t end_val); 476 int32_t _pst_build_desc_ptr (pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, u_int32_t *high_id, u_int32_t start_id, u_int32_t end_val);
471 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr); 477 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
472 void * _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr); 478 void * _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
473 pst_num_array * _pst_parse_block(pst_file *pf, u_int32_t block_id, pst_index2_ll *i2_head); 479 pst_num_array * _pst_parse_block(pst_file *pf, u_int32_t block_id, pst_index2_ll *i2_head);
474 int32_t _pst_process(pst_num_array *list, pst_item *item); 480 int32_t _pst_process(pst_num_array *list, pst_item *item);
475 int32_t _pst_free_list(pst_num_array *list); 481 int32_t _pst_free_list(pst_num_array *list);
476 void _pst_freeItem(pst_item *item); 482 void _pst_freeItem(pst_item *item);
477 int32_t _pst_free_id2(pst_index2_ll * head); 483 int32_t _pst_free_id2(pst_index2_ll * head);
478 int32_t _pst_free_id (pst_index_ll *head); 484 int32_t _pst_free_id (pst_index_ll *head);
479 int32_t _pst_free_desc (pst_desc_ll *head); 485 int32_t _pst_free_desc (pst_desc_ll *head);
480 int32_t _pst_free_xattrib(pst_x_attrib_ll *x); 486 int32_t _pst_free_xattrib(pst_x_attrib_ll *x);
487 int32_t _pst_getBlockOffsetPointer(pst_file *pf, pst_index2_ll *i2_head, unsigned char *buf, int32_t read_size, int32_t i_offset, int32_t offset, pst_block_offset_pointer *p);
481 int32_t _pst_getBlockOffset(unsigned char *buf, int32_t read_size, int32_t i_offset, int32_t offset, pst_block_offset *p); 488 int32_t _pst_getBlockOffset(unsigned char *buf, int32_t read_size, int32_t i_offset, int32_t offset, pst_block_offset *p);
482 pst_index2_ll * _pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr); 489 pst_index2_ll * _pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
483 pst_index_ll * _pst_getID(pst_file* pf, u_int32_t id); 490 pst_index_ll * _pst_getID(pst_file* pf, u_int32_t id);
484 pst_index_ll * _pst_getID2(pst_index2_ll * ptr, u_int32_t id); 491 pst_index_ll * _pst_getID2(pst_index2_ll * ptr, u_int32_t id);
485 pst_desc_ll * _pst_getDptr(pst_file *pf, u_int32_t id); 492 pst_desc_ll * _pst_getDptr(pst_file *pf, u_int32_t id);