aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common
diff options
context:
space:
mode:
authorDimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>2023-07-31 14:02:21 +0200
committerGitHub <noreply@github.com>2023-07-31 20:02:21 +0800
commit42df7c7aa1cca385e509eb33c65136e61890f0bf (patch)
treec537bd6d60be9ac2d71ca3d7f887cde8d8e92ed1 /src/liblzma/common
parentUpdate .gitignore. (diff)
downloadxz-42df7c7aa1cca385e509eb33c65136e61890f0bf.tar.xz
Docs: Fix typos found by codespell
Diffstat (limited to 'src/liblzma/common')
-rw-r--r--src/liblzma/common/block_buffer_encoder.c2
-rw-r--r--src/liblzma/common/common.h2
-rw-r--r--src/liblzma/common/file_info.c2
-rw-r--r--src/liblzma/common/lzip_decoder.c2
-rw-r--r--src/liblzma/common/stream_decoder_mt.c8
-rw-r--r--src/liblzma/common/string_conversion.c6
6 files changed, 11 insertions, 11 deletions
diff --git a/src/liblzma/common/block_buffer_encoder.c b/src/liblzma/common/block_buffer_encoder.c
index a47342ef..fdef02de 100644
--- a/src/liblzma/common/block_buffer_encoder.c
+++ b/src/liblzma/common/block_buffer_encoder.c
@@ -277,7 +277,7 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
if (ret != LZMA_BUF_ERROR)
return ret;
- // The data was uncompressible (at least with the options
+ // The data was incompressible (at least with the options
// given to us) or the output buffer was too small. Use the
// uncompressed chunks of LZMA2 to wrap the data into a valid
// Block. If we haven't been given enough output space, even
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h
index 11fec52c..4d9cab53 100644
--- a/src/liblzma/common/common.h
+++ b/src/liblzma/common/common.h
@@ -47,7 +47,7 @@
// to 2 then symbol versioning is done only if also PIC is defined.
// By default Libtool defines PIC when building a shared library and
// doesn't define it when building a static library but it can be
-// overriden with --with-pic and --without-pic. configure let's rely
+// overridden with --with-pic and --without-pic. configure let's rely
// on PIC if neither --with-pic or --without-pic was used.
#if defined(HAVE_SYMBOL_VERSIONS_LINUX) \
&& (HAVE_SYMBOL_VERSIONS_LINUX == 2 && !defined(PIC))
diff --git a/src/liblzma/common/file_info.c b/src/liblzma/common/file_info.c
index a6b7e145..799bb024 100644
--- a/src/liblzma/common/file_info.c
+++ b/src/liblzma/common/file_info.c
@@ -350,7 +350,7 @@ file_info_decode(void *coder_ptr, const lzma_allocator *allocator,
// coder->temp[coder->temp_size - LZMA_STREAM_HEADER_SIZE].
//
// Otherwise we will need to seek. The seeking is done so
- // that Stream Footer wil be at the end of coder->temp.
+ // that Stream Footer will be at the end of coder->temp.
// This way it's likely that we also get a complete Index
// field into coder->temp without needing a separate seek
// for that (unless the Index field is big).
diff --git a/src/liblzma/common/lzip_decoder.c b/src/liblzma/common/lzip_decoder.c
index 58c08674..88cc7ffd 100644
--- a/src/liblzma/common/lzip_decoder.c
+++ b/src/liblzma/common/lzip_decoder.c
@@ -186,7 +186,7 @@ lzip_decode(void *coder_ptr, const lzma_allocator *allocator,
// The five lowest bits are for the base-2 logarithm of
// the dictionary size and the highest three bits are
// the fractional part (0/16 to 7/16) that will be
- // substracted to get the final value.
+ // subtracted to get the final value.
//
// For example, with 0xB5:
// b2log = 21
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
index b8ba4d39..76212b46 100644
--- a/src/liblzma/common/stream_decoder_mt.c
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -629,7 +629,7 @@ get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
coder->thr = coder->threads_free;
coder->threads_free = coder->threads_free->next;
- // The thread is no longer in the cache so substract
+ // The thread is no longer in the cache so subtract
// it from the cached memory usage. Don't add it
// to mem_in_use though; the caller will handle it
// since it knows how much memory it will actually
@@ -1359,7 +1359,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// towards more favorable conditions (less memory in use,
// more in cache).
//
- // These are initalized to silence warnings.
+ // These are initialized to silence warnings.
uint64_t mem_in_use = 0;
uint64_t mem_cached = 0;
struct worker_thread *thr = NULL;
@@ -1425,7 +1425,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
}
// Update the memory usage counters. Note that coder->mem_*
- // may have changed since we read them so we must substract
+ // may have changed since we read them so we must subtract
// or add the changes.
mythread_sync(coder->mutex) {
coder->mem_cached -= mem_freed;
@@ -1438,7 +1438,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// coder->mem_cached might count the same thing twice.
// If so, this will get corrected in get_thread() when
// a worker_thread is picked from coder->free_threads
- // and its memory usage is substracted from mem_cached.
+ // and its memory usage is subtracted from mem_cached.
coder->mem_in_use += coder->mem_next_in
+ coder->mem_next_filters;
}
diff --git a/src/liblzma/common/string_conversion.c b/src/liblzma/common/string_conversion.c
index a70105d6..d2c1e809 100644
--- a/src/liblzma/common/string_conversion.c
+++ b/src/liblzma/common/string_conversion.c
@@ -197,7 +197,7 @@ typedef struct {
/// (default is uint32_t).
///
/// Stringifying a filter is done by processing a given number of options
-/// in oder from the beginning of an option_map array. The integer is
+/// in order from the beginning of an option_map array. The integer is
/// read from filter_options at .offset using the type from .type.
///
/// If the integer is zero and .flags has OPTMAP_NO_STRFY_ZERO then the
@@ -538,7 +538,7 @@ static const struct {
///
/// The input string starts at *str and the address in str_end is the first
/// char that is not part of the string anymore. So no '\0' terminator is
-/// used. *str is advanced everytime something has been decoded successfully.
+/// used. *str is advanced every time something has been decoded successfully.
static const char *
parse_options(const char **const str, const char *str_end,
void *filter_options,
@@ -844,7 +844,7 @@ parse_filter(const char **const str, const char *str_end, lzma_filter *filter,
/// Converts the string to a filter chain (array of lzma_filter structures).
///
-/// *str is advanced everytime something has been decoded successfully.
+/// *str is advanced every time something has been decoded successfully.
/// This way the caller knows where in the string a possible error occurred.
static const char *
str_to_filters(const char **const str, lzma_filter *filters, uint32_t flags,