aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/block_encoder.c
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/common/block_encoder.c
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/common/block_encoder.c')
-rw-r--r--src/liblzma/common/block_encoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c
index 7dffbb82..3c678f7d 100644
--- a/src/liblzma/common/block_encoder.c
+++ b/src/liblzma/common/block_encoder.c
@@ -23,7 +23,7 @@
/// The maximum size of a single Block is limited by the maximum size of
-/// a Stream, which is 2^63 - 1 bytes (i.e. LZMA_VLI_VALUE_MAX). We could
+/// a Stream, which is 2^63 - 1 bytes (i.e. LZMA_VLI_MAX). We could
/// take into account the headers etc. to determine the exact maximum size
/// of the Compressed Data field, but the complexity would give us nothing
/// useful. Instead, limit the size of Compressed Data so that even with
@@ -33,7 +33,7 @@
///
/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
/// the Compressed Data field, it will still stay in the proper limit.
-#define COMPRESSED_SIZE_MAX ((LZMA_VLI_VALUE_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
+#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
- LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
@@ -73,7 +73,7 @@ block_encode(lzma_coder *coder, lzma_allocator *allocator,
size_t *restrict out_pos, size_t out_size, lzma_action action)
{
// Check that our amount of input stays in proper limits.
- if (LZMA_VLI_VALUE_MAX - coder->uncompressed_size < in_size - *in_pos)
+ if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
return LZMA_PROG_ERROR;
switch (coder->sequence) {