From 50dde204ca4ff26bb8fc6617eefd91e88c4faf04 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Lopes Date: Wed, 12 Sep 2007 15:13:51 +0000 Subject: [PATCH] Remove private header import and copy needed functions. --- libisoburn/isofs_wrap.c | 65 ++++++++++++++++++++++++++++++++++------- libisoburn/libisoburn.h | 2 +- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/libisoburn/isofs_wrap.c b/libisoburn/isofs_wrap.c index 2b36c088..2e98fc61 100644 --- a/libisoburn/isofs_wrap.c +++ b/libisoburn/isofs_wrap.c @@ -16,10 +16,6 @@ #include "../libburn/libburn.h" #include "isoburn.h" -// TODO this are libisofs internals, should then be imported here? -#include "../libisofs/util.h" -#include "../libisofs/ecma119.h" - /* Vreixo: This is now all yours. My text here is only a snapshot @@ -32,6 +28,57 @@ */ +#define BP(a,b) [(b) - (a) + 1] + +struct ecma119_pri_vol_desc +{ + uint8_t vol_desc_type BP(1, 1); + uint8_t std_identifier BP(2, 6); + uint8_t vol_desc_version BP(7, 7); + uint8_t unused1 BP(8, 8); + uint8_t system_id BP(9, 40); + uint8_t volume_id BP(41, 72); + uint8_t unused2 BP(73, 80); + uint8_t vol_space_size BP(81, 88); + uint8_t unused3 BP(89, 120); + uint8_t vol_set_size BP(121, 124); + uint8_t vol_seq_number BP(125, 128); + uint8_t block_size BP(129, 132); + uint8_t path_table_size BP(133, 140); + uint8_t l_path_table_pos BP(141, 144); + uint8_t opt_l_path_table_pos BP(145, 148); + uint8_t m_path_table_pos BP(149, 152); + uint8_t opt_m_path_table_pos BP(153, 156); + uint8_t root_dir_record BP(157, 190); + uint8_t vol_set_id BP(191, 318); + uint8_t publisher_id BP(319, 446); + uint8_t data_prep_id BP(447, 574); + uint8_t application_id BP(575, 702); + uint8_t copyright_file_id BP(703, 739); + uint8_t abstract_file_id BP(740, 776); + uint8_t bibliographic_file_id BP(777, 813); + uint8_t vol_creation_time BP(814, 830); + uint8_t vol_modification_time BP(831, 847); + uint8_t vol_expiration_time BP(848, 864); + uint8_t vol_effective_time BP(865, 881); + uint8_t file_structure_version BP(882, 882); + uint8_t reserved1 BP(883, 883); + uint8_t app_use BP(884, 1395); + uint8_t reserved2 BP(1396, 2048); +}; + +static +uint32_t iso_read_lsb(const uint8_t *buf, int bytes) +{ + int i; + uint32_t ret = 0; + + for (i=0; i