xz: Rename filters_index to chain_num

The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68.

(cherry picked from commit 49f67d3d3f)
This commit is contained in:
Lasse Collin 2024-05-12 21:31:02 +03:00
parent 47599f3b73
commit d642e13874
3 changed files with 9 additions and 9 deletions

View File

@ -105,7 +105,7 @@ parse_block_list(const char *str_const)
*p = '\0'; *p = '\0';
// Use the default filter chain unless overridden. // Use the default filter chain unless overridden.
opt_block_list[i].filters_index = 0; opt_block_list[i].chain_num = 0;
// To specify a filter chain, the block list entry may be // To specify a filter chain, the block list entry may be
// prepended with "[filter-chain-number]:". The size is // prepended with "[filter-chain-number]:". The size is
@ -132,9 +132,9 @@ parse_block_list(const char *str_const)
"filter chain number '%c:'"), "filter chain number '%c:'"),
str[0]); str[0]);
const unsigned filter_num = (unsigned)(str[0] - '0'); const unsigned chain_num = (unsigned)(str[0] - '0');
opt_block_list[i].filters_index = filter_num; opt_block_list[i].chain_num = chain_num;
block_list_chain_mask |= 1U << filter_num; block_list_chain_mask |= 1U << chain_num;
str += 2; str += 2;
} else { } else {
// This Block uses the default filter chain. // This Block uses the default filter chain.

View File

@ -867,7 +867,7 @@ coder_init(file_pair *pair)
// Otherwise, use first filter chain from the block list. // Otherwise, use first filter chain from the block list.
lzma_filter *active_filters = opt_block_list == NULL lzma_filter *active_filters = opt_block_list == NULL
? chains[0] ? chains[0]
: chains[opt_block_list[0].filters_index]; : chains[opt_block_list[0].chain_num];
if (opt_mode == MODE_COMPRESS) { if (opt_mode == MODE_COMPRESS) {
#ifdef HAVE_ENCODERS #ifdef HAVE_ENCODERS
@ -1112,10 +1112,10 @@ split_block(uint64_t *block_remaining,
++*list_pos; ++*list_pos;
// Update the filters if needed. // Update the filters if needed.
if (opt_block_list[*list_pos - 1].filters_index if (opt_block_list[*list_pos - 1].chain_num
!= opt_block_list[*list_pos].filters_index) { != opt_block_list[*list_pos].chain_num) {
const unsigned chain_idx = opt_block_list const unsigned chain_idx = opt_block_list
[*list_pos].filters_index; [*list_pos].chain_num;
const lzma_filter *next = chains[chain_idx]; const lzma_filter *next = chains[chain_idx];
const lzma_ret ret = lzma_filters_update( const lzma_ret ret = lzma_filters_update(
&strm, next); &strm, next);

View File

@ -38,7 +38,7 @@ typedef struct {
/// Index into the filters[] representing the filter chain to use /// Index into the filters[] representing the filter chain to use
/// for this Block. /// for this Block.
unsigned filters_index; unsigned chain_num;
} block_list_entry; } block_list_entry;