diff --git a/extract-xiso.c b/extract-xiso.c index bd8e149..1a92071 100644 --- a/extract-xiso.c +++ b/extract-xiso.c @@ -523,26 +523,26 @@ struct dir_node { char *filename; - uint16_t r_offset; - uint8_t attributes; - uint8_t filename_length; + uint16_t r_offset; + uint8_t attributes; + uint8_t filename_length; - uint32_t file_size; - uint32_t start_sector; + uint32_t file_size; + uint32_t start_sector; }; struct dir_node_avl { - uint32_t offset; + uint32_t offset; xoff_t dir_start; char *filename; - uint32_t file_size; - uint32_t start_sector; + uint32_t file_size; + uint32_t start_sector; dir_node_avl *subdirectory; - uint32_t old_start_sector; + uint32_t old_start_sector; - avl_skew skew; + avl_skew skew; dir_node_avl *left; dir_node_avl *right; }; @@ -554,13 +554,13 @@ struct create_list { }; typedef struct FILE_TIME { - uint32_t l; - uint32_t h; + uint32_t l; + uint32_t h; } FILE_TIME; typedef struct wdsafp_context { xoff_t dir_start; - uint32_t *current_sector; + uint32_t *current_sector; } wdsafp_context; typedef struct write_tree_context { @@ -625,8 +625,8 @@ static xoff_t s_total_bytes_all_isos = 0; static int s_total_files_all_isos = 0; static bool s_warned = 0; -static bool s_remove_systemupdate = false; -static char *s_systemupdate = "$SystemUpdate"; +static bool s_remove_systemupdate = false; +static char *s_systemupdate = "$SystemUpdate"; static xoff_t s_xbox_disc_lseek = 0; @@ -1192,7 +1192,7 @@ int traverse_xiso( int in_xiso, dir_node *in_dir_node, xoff_t in_dir_start, char dir_node subdir; dir_node *dir, node; int err = 0, sector; - uint16_t l_offset = 0, tmp; + uint16_t l_offset = 0, tmp; if ( in_dir_node == nil ) in_dir_node = &node; @@ -1316,7 +1316,7 @@ int traverse_xiso( int in_xiso, dir_node *in_dir_node, xoff_t in_dir_start, char memcpy( &subdir, dir, sizeof(dir_node) ); subdir.parent = nil; - if ( ! err && dir->file_size > 0 ) err = traverse_xiso( in_xiso, &subdir, (xoff_t) dir->start_sector * XISO_SECTOR_SIZE + s_xbox_disc_lseek, path, in_mode, in_mode == k_generate_avl ? &dir->avl_node->subdirectory : nil, in_ll_compat ); + if ( ! err && dir->file_size > 0 ) err = traverse_xiso( in_xiso, &subdir, (xoff_t) dir->start_sector * XISO_SECTOR_SIZE + s_xbox_disc_lseek, path, in_mode, in_mode == k_generate_avl ? &dir->avl_node->subdirectory : nil, in_ll_compat ); if ( !s_remove_systemupdate || !strstr( dir->filename, s_systemupdate ) ) { @@ -1634,7 +1634,7 @@ int extract_file( int in_xiso, dir_node *in_file, modes in_mode , char* path) { char c; int err = 0; bool warn = false; - uint32_t i, size, totalsize = 0, totalpercent = 0; + uint32_t i, size, totalsize = 0, totalpercent = 0; int out; if ( s_remove_systemupdate && strstr( path, s_systemupdate ) ) @@ -1750,7 +1750,7 @@ int write_tree( dir_node_avl *in_avl, write_tree_context *in_context, int in_dep int write_file( dir_node_avl *in_avl, write_tree_context *in_context, int in_depth ) { char *buf, *p; - uint32_t bytes, n, size; + uint32_t bytes, n, size; int err = 0, fd = -1, i; if ( ! in_avl->subdirectory ) { @@ -1821,8 +1821,8 @@ int write_file( dir_node_avl *in_avl, write_tree_context *in_context, int in_dep int write_directory( dir_node_avl *in_avl, int in_xiso, int in_depth ) { xoff_t pos; int err = 0, pad; - uint16_t l_offset, r_offset; - uint32_t file_size = in_avl->file_size + (in_avl->subdirectory ? (XISO_SECTOR_SIZE - (in_avl->file_size % XISO_SECTOR_SIZE)) % XISO_SECTOR_SIZE : 0); + uint16_t l_offset, r_offset; + uint32_t file_size = in_avl->file_size + (in_avl->subdirectory ? (XISO_SECTOR_SIZE - (in_avl->file_size % XISO_SECTOR_SIZE)) % XISO_SECTOR_SIZE : 0); char length = (char) strlen( in_avl->filename ), attributes = in_avl->subdirectory ? XISO_ATTRIBUTE_DIR : XISO_ATTRIBUTE_ARC, sector[ XISO_SECTOR_SIZE ]; little32( in_avl->file_size );