aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/block_util.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-08-28 22:53:15 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-08-28 22:53:15 +0300
commit3b34851de1eaf358cf9268922fa0eeed8278d680 (patch)
tree7bab212af647541df64227a8d350d17a2e789f6b /src/liblzma/common/block_util.c
parentFix test_filter_flags to match the new restriction of lc+lp. (diff)
downloadxz-3b34851de1eaf358cf9268922fa0eeed8278d680.tar.xz
Sort of garbage collection commit. :-| Many things are still
broken. API has changed a lot and it will still change a little more here and there. The command line tool doesn't have all the required changes to reflect the API changes, so it's easy to get "internal error" or trigger assertions.
Diffstat (limited to 'src/liblzma/common/block_util.c')
-rw-r--r--src/liblzma/common/block_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c
index 6bffc2f1..798163bb 100644
--- a/src/liblzma/common/block_util.c
+++ b/src/liblzma/common/block_util.c
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_header.c
-/// \brief Utility functions to handle lzma_options_block
+/// \brief Utility functions to handle lzma_block
//
// Copyright (C) 2008 Lasse Collin
//
@@ -21,7 +21,7 @@
extern LZMA_API lzma_ret
-lzma_block_total_size_set(lzma_options_block *options, lzma_vli total_size)
+lzma_block_total_size_set(lzma_block *options, lzma_vli total_size)
{
// Validate.
if (options->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
@@ -32,7 +32,7 @@ lzma_block_total_size_set(lzma_options_block *options, lzma_vli total_size)
return LZMA_PROG_ERROR;
const uint32_t container_size = options->header_size
- + lzma_check_sizes[options->check];
+ + lzma_check_size(options->check);
// Validate that Compressed Size will be greater than zero.
if (container_size <= total_size)
@@ -45,7 +45,7 @@ lzma_block_total_size_set(lzma_options_block *options, lzma_vli total_size)
extern LZMA_API lzma_vli
-lzma_block_total_size_get(const lzma_options_block *options)
+lzma_block_total_size_get(const lzma_block *options)
{
// Validate the values that we are interested in.
if (options->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
@@ -61,7 +61,7 @@ lzma_block_total_size_get(const lzma_options_block *options)
const lzma_vli total_size = options->compressed_size
+ options->header_size
- + lzma_check_sizes[options->check];
+ + lzma_check_size(options->check);
// Validate the calculated Total Size.
if (options->compressed_size > LZMA_VLI_VALUE_MAX