From eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 12 Feb 2010 13:16:15 +0200 Subject: Collection of language fixes to comments and docs. Thanks to Jonathan Nieder. --- src/liblzma/common/block_header_encoder.c | 2 +- src/liblzma/common/chunk_size.c | 4 ++-- src/liblzma/common/common.h | 4 ++-- src/liblzma/common/filter_buffer_decoder.c | 2 +- src/liblzma/common/filter_encoder.c | 4 ++-- src/liblzma/common/index.c | 6 +++--- src/liblzma/common/index_encoder.c | 2 +- src/liblzma/common/stream_encoder.c | 2 +- src/liblzma/common/vli_decoder.c | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/liblzma/common') diff --git a/src/liblzma/common/block_header_encoder.c b/src/liblzma/common/block_header_encoder.c index 79dafb80..707dd0cb 100644 --- a/src/liblzma/common/block_header_encoder.c +++ b/src/liblzma/common/block_header_encoder.c @@ -73,7 +73,7 @@ lzma_block_header_size(lzma_block *block) extern LZMA_API(lzma_ret) lzma_block_header_encode(const lzma_block *block, uint8_t *out) { - // Valdidate everything but filters. + // Validate everything but filters. if (lzma_block_unpadded_size(block) == 0 || !lzma_vli_is_valid(block->uncompressed_size)) return LZMA_PROG_ERROR; diff --git a/src/liblzma/common/chunk_size.c b/src/liblzma/common/chunk_size.c index c9129d7c..363f07ec 100644 --- a/src/liblzma/common/chunk_size.c +++ b/src/liblzma/common/chunk_size.c @@ -20,7 +20,7 @@ * doing multi-threaded encoding. * * When compressing a large file on a system having multiple CPUs or CPU - * cores, the file can be splitted in smaller chunks, that are compressed + * cores, the file can be split into smaller chunks, that are compressed * independently into separate Blocks in the same .lzma Stream. * * \return Minimum reasonable Uncompressed Size of a Block. The @@ -45,7 +45,7 @@ lzma_chunk_size(const lzma_options_filter *filters) case LZMA_FILTER_ARMTHUMB: case LZMA_FILTER_SPARC: // These are very fast, thus there is no point in - // splitting the data in smaller blocks. + // splitting the data into smaller blocks. break; case LZMA_FILTER_LZMA1: diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 6551e39f..7b7fbb11 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -50,7 +50,7 @@ /// Starting value for memory usage estimates. Instead of calculating size -/// of _every_ structure and taking into accont malloc() overhead etc. we +/// of _every_ structure and taking into account malloc() overhead etc., we /// add a base size to all memory usage estimates. It's not very accurate /// but should be easily good enough. #define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15) @@ -248,7 +248,7 @@ extern size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos, /// \brief Return if expression doesn't evaluate to LZMA_OK /// -/// There are several situations where we want to return immediatelly +/// There are several situations where we want to return immediately /// with the value of expr if it isn't LZMA_OK. This macro shortens /// the code a little. #define return_if_error(expr) \ diff --git a/src/liblzma/common/filter_buffer_decoder.c b/src/liblzma/common/filter_buffer_decoder.c index 4fe5d78e..2d35ef8e 100644 --- a/src/liblzma/common/filter_buffer_decoder.c +++ b/src/liblzma/common/filter_buffer_decoder.c @@ -57,7 +57,7 @@ lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator, } else { // All the input was consumed and output - // buffer is full. Now we don't immediatelly + // buffer is full. Now we don't immediately // know the reason for the error. Try // decoding one more byte. If it succeeds, // then the output buffer was too small. If diff --git a/src/liblzma/common/filter_encoder.c b/src/liblzma/common/filter_encoder.c index 3b0493fe..ab3d3af1 100644 --- a/src/liblzma/common/filter_encoder.c +++ b/src/liblzma/common/filter_encoder.c @@ -32,7 +32,7 @@ typedef struct { uint64_t (*memusage)(const void *options); /// Calculates the minimum sane size for Blocks (or other types of - /// chunks) to which the input data can be splitted to make + /// chunks) to which the input data can be split to make /// multithreaded encoding possible. If this is NULL, it is assumed /// that the encoder is fast enough with single thread. lzma_vli (*chunk_size)(const void *options); @@ -45,7 +45,7 @@ typedef struct { /// Encodes Filter Properties. /// - /// \return - LZMA_OK: Properties encoded sucessfully. + /// \return - LZMA_OK: Properties encoded successfully. /// - LZMA_OPTIONS_ERROR: Unsupported options /// - LZMA_PROG_ERROR: Invalid options or not enough /// output space diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c index 9907fbab..3941e28b 100644 --- a/src/liblzma/common/index.c +++ b/src/liblzma/common/index.c @@ -737,7 +737,7 @@ typedef struct { /// Add the Stream nodes from the source index to dest using recursion. /// Simplest iterative traversal of the source tree wouldn't work, because -/// we update the pointers in nodes when moving them to the destinatino tree. +/// we update the pointers in nodes when moving them to the destination tree. static void index_cat_helper(const index_cat_info *info, index_stream *this) { @@ -867,7 +867,7 @@ index_dup_stream(const index_stream *src, lzma_allocator *allocator) src->node.uncompressed_base, src->number, src->block_number_base, allocator); - // Return immediatelly if allocation failed or if there are + // Return immediately if allocation failed or if there are // no groups to duplicate. if (dest == NULL || src->groups.leftmost == NULL) return dest; @@ -1202,7 +1202,7 @@ lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target) { const lzma_index *i = iter->internal[ITER_INDEX].p; - // If the target is past the end of the file, return immediatelly. + // If the target is past the end of the file, return immediately. if (i->uncompressed_size <= target) return true; diff --git a/src/liblzma/common/index_encoder.c b/src/liblzma/common/index_encoder.c index 21712d00..706f1fd7 100644 --- a/src/liblzma/common/index_encoder.c +++ b/src/liblzma/common/index_encoder.c @@ -218,7 +218,7 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size) { - // Validate the arugments. + // Validate the arguments. if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size) return LZMA_PROG_ERROR; diff --git a/src/liblzma/common/stream_encoder.c b/src/liblzma/common/stream_encoder.c index 054e1145..48d91da7 100644 --- a/src/liblzma/common/stream_encoder.c +++ b/src/liblzma/common/stream_encoder.c @@ -105,7 +105,7 @@ stream_encode(lzma_coder *coder, lzma_allocator *allocator, case SEQ_BLOCK_INIT: { if (*in_pos == in_size) { // If we are requested to flush or finish the current - // Block, return LZMA_STREAM_END immediatelly since + // Block, return LZMA_STREAM_END immediately since // there's nothing to do. if (action != LZMA_FINISH) return action == LZMA_RUN diff --git a/src/liblzma/common/vli_decoder.c b/src/liblzma/common/vli_decoder.c index 44a1ecfe..c181828b 100644 --- a/src/liblzma/common/vli_decoder.c +++ b/src/liblzma/common/vli_decoder.c @@ -47,7 +47,7 @@ lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos, do { // Read the next byte. Use a temporary variable so that we - // can update *in_pos immediatelly. + // can update *in_pos immediately. const uint8_t byte = in[*in_pos]; ++*in_pos; -- cgit v1.2.3