aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/subblock
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
commit13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7 (patch)
treeaa9c137d41bd5d39fa8835cc77cf325ff13a7e7c /src/liblzma/subblock
parentImproved the Stream Flags handling API. (diff)
downloadxz-13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7.tar.xz
Renamed constants:
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
Diffstat (limited to 'src/liblzma/subblock')
-rw-r--r--src/liblzma/subblock/subblock_decoder.c6
-rw-r--r--src/liblzma/subblock/subblock_encoder.c17
2 files changed, 11 insertions, 12 deletions
diff --git a/src/liblzma/subblock/subblock_decoder.c b/src/liblzma/subblock/subblock_decoder.c
index faf198c6..41dbe389 100644
--- a/src/liblzma/subblock/subblock_decoder.c
+++ b/src/liblzma/subblock/subblock_decoder.c
@@ -263,7 +263,7 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator,
coder->filter_flags_decoder.coder, allocator,
in, in_pos, in_size, NULL, NULL, 0, LZMA_RUN);
if (ret != LZMA_STREAM_END)
- return ret == LZMA_HEADER_ERROR
+ return ret == LZMA_OPTIONS_ERROR
? LZMA_DATA_ERROR : ret;
// Don't free the filter_flags_decoder. It doesn't take much
@@ -284,7 +284,7 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator,
.id = LZMA_FILTER_SUBBLOCK_HELPER,
.options = &coder->helper,
}, {
- .id = LZMA_VLI_VALUE_UNKNOWN,
+ .id = LZMA_VLI_UNKNOWN,
.options = NULL,
}
};
@@ -292,7 +292,7 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator,
// Optimization: We know that LZMA uses End of Payload Marker
// (not End of Input), so we can omit the helper filter.
if (filters[0].id == LZMA_FILTER_LZMA)
- filters[1].id = LZMA_VLI_VALUE_UNKNOWN;
+ filters[1].id = LZMA_VLI_UNKNOWN;
return_if_error(lzma_raw_decoder_init(
&coder->subfilter, allocator, filters));
diff --git a/src/liblzma/subblock/subblock_encoder.c b/src/liblzma/subblock/subblock_encoder.c
index e78ffca6..3251f3f2 100644
--- a/src/liblzma/subblock/subblock_encoder.c
+++ b/src/liblzma/subblock/subblock_encoder.c
@@ -290,7 +290,7 @@ subblock_data_size(lzma_coder *coder, lzma_allocator *allocator,
// Verify that the new limit is valid.
if (new_limit < LZMA_SUBBLOCK_DATA_SIZE_MIN
|| new_limit > LZMA_SUBBLOCK_DATA_SIZE_MAX)
- return LZMA_HEADER_ERROR;
+ return LZMA_OPTIONS_ERROR;
// Ff the new limit is different than the previous one, we need
// to reallocate the data buffer.
@@ -368,7 +368,7 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
}
default:
- return LZMA_HEADER_ERROR;
+ return LZMA_OPTIONS_ERROR;
}
// If we are sync-flushing or finishing, the application may
@@ -518,7 +518,7 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
< LZMA_SUBBLOCK_ALIGNMENT_MIN
|| coder->alignment.multiple
> LZMA_SUBBLOCK_ALIGNMENT_MAX)
- return LZMA_HEADER_ERROR;
+ return LZMA_OPTIONS_ERROR;
// Run-length encoder
//
@@ -537,7 +537,7 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
// validate it.
coder->rle.size = coder->options->rle;
if (coder->rle.size > LZMA_SUBBLOCK_RLE_MAX)
- return LZMA_HEADER_ERROR;
+ return LZMA_OPTIONS_ERROR;
if (coder->subblock.size != 0
&& coder->rle.size
@@ -786,14 +786,13 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
assert(coder->options != NULL);
// There must be a filter specified.
- if (coder->options->subfilter_options.id
- == LZMA_VLI_VALUE_UNKNOWN)
- return LZMA_HEADER_ERROR;
+ if (coder->options->subfilter_options.id == LZMA_VLI_UNKNOWN)
+ return LZMA_OPTIONS_ERROR;
// Initialize a raw encoder to work as a Subfilter.
lzma_filter options[2];
options[0] = coder->options->subfilter_options;
- options[1].id = LZMA_VLI_VALUE_UNKNOWN;
+ options[1].id = LZMA_VLI_UNKNOWN;
return_if_error(lzma_raw_encoder_init(
&coder->subfilter.subcoder, allocator,
@@ -970,7 +969,7 @@ lzma_subblock_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|| next->coder->options->alignment
> LZMA_SUBBLOCK_ALIGNMENT_MAX) {
subblock_encoder_end(next->coder, allocator);
- return LZMA_HEADER_ERROR;
+ return LZMA_OPTIONS_ERROR;
}
next->coder->alignment.multiple
= next->coder->options->alignment;