Deleted Added
full compact
27c27,32
< * Info from: http://sc.openoffice.org/compdocfileformat.pdf
---
> * Parse Composite Document Files, the format used in Microsoft Office
> * document files before they switched to zipped XML.
> * Info from: http://sc.openoffice.org/compdocfileformat.pdf
> *
> * N.B. This is the "Composite Document File" format, and not the
> * "Compound Document Format", nor the "Channel Definition Format".
32a38,47
> #ifdef WIN32
> #include <winsock2.h>
> #define timespec timeval
> #define tv_nsec tv_usec
> #endif
> #ifdef __DJGPP__
> #define timespec timeval
> #define tv_nsec tv_usec
> #endif
>
44c59
< uint64_t h_magic;
---
> uint64_t h_magic;
46,61c61,76
< uint64_t h_uuid[2];
< uint16_t h_revision;
< uint16_t h_version;
< uint16_t h_byte_order;
< uint16_t h_sec_size_p2;
< uint16_t h_short_sec_size_p2;
< uint8_t h_unused0[10];
< uint32_t h_num_sectors_in_sat;
< uint32_t h_secid_first_directory;
< uint8_t h_unused1[4];
< uint32_t h_min_size_standard_stream;
< cdf_secid_t h_secid_first_sector_in_short_sat;
< uint32_t h_num_sectors_in_short_sat;
< cdf_secid_t h_secid_first_sector_in_master_sat;
< uint32_t h_num_sectors_in_master_sat;
< cdf_secid_t h_master_sat[436/4];
---
> uint64_t h_uuid[2];
> uint16_t h_revision;
> uint16_t h_version;
> uint16_t h_byte_order;
> uint16_t h_sec_size_p2;
> uint16_t h_short_sec_size_p2;
> uint8_t h_unused0[10];
> uint32_t h_num_sectors_in_sat;
> uint32_t h_secid_first_directory;
> uint8_t h_unused1[4];
> uint32_t h_min_size_standard_stream;
> cdf_secid_t h_secid_first_sector_in_short_sat;
> uint32_t h_num_sectors_in_short_sat;
> cdf_secid_t h_secid_first_sector_in_master_sat;
> uint32_t h_num_sectors_in_master_sat;
> cdf_secid_t h_master_sat[436/4];
77,79c92,94
< uint16_t d_name[32];
< uint16_t d_namelen;
< uint8_t d_type;
---
> uint16_t d_name[32];
> uint16_t d_namelen;
> uint8_t d_type;
86c101
< uint8_t d_color;
---
> uint8_t d_color;
89,98c104,113
< cdf_dirid_t d_left_child;
< cdf_dirid_t d_right_child;
< cdf_dirid_t d_storage;
< uint64_t d_storage_uuid[2];
< uint32_t d_flags;
< cdf_timestamp_t d_created;
< cdf_timestamp_t d_modified;
< cdf_secid_t d_stream_first_sector;
< uint32_t d_size;
< uint32_t d_unused0;
---
> cdf_dirid_t d_left_child;
> cdf_dirid_t d_right_child;
> cdf_dirid_t d_storage;
> uint64_t d_storage_uuid[2];
> uint32_t d_flags;
> cdf_timestamp_t d_created;
> cdf_timestamp_t d_modified;
> cdf_secid_t d_stream_first_sector;
> uint32_t d_size;
> uint32_t d_unused0;
104,105c119,120
< cdf_secid_t *sat_tab;
< size_t sat_len;
---
> cdf_secid_t *sat_tab;
> size_t sat_len;
109,110c124,125
< cdf_directory_t *dir_tab;
< size_t dir_len;
---
> cdf_directory_t *dir_tab;
> size_t dir_len;
114,116c129,131
< void *sst_tab;
< size_t sst_len;
< size_t sst_dirlen;
---
> void *sst_tab;
> size_t sst_len;
> size_t sst_dirlen;
120,123c135,138
< uint32_t cl_dword;
< uint16_t cl_word[2];
< uint8_t cl_two[2];
< uint8_t cl_six[6];
---
> uint32_t cl_dword;
> uint16_t cl_word[2];
> uint8_t cl_two[2];
> uint8_t cl_six[6];
127,132c142,147
< uint16_t si_byte_order;
< uint16_t si_zero;
< uint16_t si_os_version;
< uint16_t si_os;
< cdf_classid_t si_class;
< uint32_t si_count;
---
> uint16_t si_byte_order;
> uint16_t si_zero;
> uint16_t si_os_version;
> uint16_t si_os;
> cdf_classid_t si_class;
> uint32_t si_count;
138,139c153,154
< cdf_classid_t sd_class;
< uint32_t sd_offset;
---
> cdf_classid_t sd_class;
> uint32_t sd_offset;
143,144c158,159
< uint32_t sh_len;
< uint32_t sh_properties;
---
> uint32_t sh_len;
> uint32_t sh_properties;
148,162c163,177
< uint32_t pi_id;
< uint32_t pi_type;
< union {
< uint16_t _pi_u16;
< int16_t _pi_s16;
< uint32_t _pi_u32;
< int32_t _pi_s32;
< uint64_t _pi_u64;
< int64_t _pi_s64;
< cdf_timestamp_t _pi_tp;
< struct {
< uint32_t s_len;
< const char *s_buf;
< } _pi_str;
< } pi_val;
---
> uint32_t pi_id;
> uint32_t pi_type;
> union {
> uint16_t _pi_u16;
> int16_t _pi_s16;
> uint32_t _pi_u32;
> int32_t _pi_s32;
> uint64_t _pi_u64;
> int64_t _pi_s64;
> cdf_timestamp_t _pi_tp;
> struct {
> uint32_t s_len;
> const char *s_buf;
> } _pi_str;
> } pi_val;
229c244
< #define CDF_PROPERTY_COMMENTS 0x00000006
---
> #define CDF_PROPERTY_COMMENTS 0x00000006
246,248c261,263
< int i_fd;
< const unsigned char *i_buf;
< size_t i_len;
---
> int i_fd;
> const unsigned char *i_buf;
> size_t i_len;
279c294
< int cdf_read_property_info(const cdf_stream_t *, uint32_t,
---
> int cdf_read_property_info(const cdf_stream_t *, const cdf_header_t *, uint32_t,
284,285c299,300
< int cdf_unpack_summary_info(const cdf_stream_t *, cdf_summary_info_header_t *,
< cdf_property_info_t **, size_t *);
---
> int cdf_unpack_summary_info(const cdf_stream_t *, const cdf_header_t *,
> cdf_summary_info_header_t *, cdf_property_info_t **, size_t *);
291a307
> char *cdf_ctime(const time_t *);