Docs: Fix typos found by codespell

This commit is contained in:
Dimitri Papadopoulos Orfanos 2023-07-31 14:02:21 +02:00 committed by Lasse Collin
parent 84a3a1f4e4
commit 0db6fbe0be
18 changed files with 29 additions and 29 deletions

View File

@ -1160,7 +1160,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
# of these environments set the UNIX variable so they will try to # of these environments set the UNIX variable so they will try to
# make the symlinks. The ability for Cygwin and MSYS2 to make # make the symlinks. The ability for Cygwin and MSYS2 to make
# broken symlinks is determined by the CYGWIN and MSYS2 environment # broken symlinks is determined by the CYGWIN and MSYS2 environment
# variables, repectively. Broken symlinks are needed for the man # variables, respectively. Broken symlinks are needed for the man
# page symlinks and for determining if the xz and lzma symlinks need # page symlinks and for determining if the xz and lzma symlinks need
# to depend on the xz target or not. If broken symlinks cannot be # to depend on the xz target or not. If broken symlinks cannot be
# made then the xz binary must be created before the symlinks. # made then the xz binary must be created before the symlinks.
@ -1186,7 +1186,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
# So, the only case we care about for broken symlinks is # So, the only case we care about for broken symlinks is
# "nativestrict" since all other values mean that broken # "nativestrict" since all other values mean that broken
# symlinks are allowed. If the env variable is not set the # symlinks are allowed. If the env variable is not set the
# default is "native". If the env varaiable is set but not # default is "native". If the env variable is set but not
# assigned one of the four values, then the default is the same # assigned one of the four values, then the default is the same
# as option 1 "lnk". # as option 1 "lnk".
string(FIND "$ENV{CYGWIN}" "winsymlinks:nativestrict" SYMLINK_POS) string(FIND "$ENV{CYGWIN}" "winsymlinks:nativestrict" SYMLINK_POS)

2
NEWS
View File

@ -958,7 +958,7 @@ XZ Utils Release Notes
of the deprecated egrep and fgrep commands. of the deprecated egrep and fgrep commands.
- Fixed parsing of the options -E, -F, -G, -P, and -X. The - Fixed parsing of the options -E, -F, -G, -P, and -X. The
problem occurred when multiple options were specied in problem occurred when multiple options were specified in
a single argument, for example, a single argument, for example,
echo foo | xzgrep -Fe foo echo foo | xzgrep -Fe foo

View File

@ -711,7 +711,7 @@ fi
# used when creating a static library. # used when creating a static library.
# #
# Libtool always uses -DPIC when building shared libraries by default and # Libtool always uses -DPIC when building shared libraries by default and
# doesn't use it for static libs by default. This can be overriden with # doesn't use it for static libs by default. This can be overridden with
# --with-pic and --without-pic though. As long as neither --with-pic nor # --with-pic and --without-pic though. As long as neither --with-pic nor
# --without-pic is used then we can use #ifdef PIC to detect if the file is # --without-pic is used then we can use #ifdef PIC to detect if the file is
# being built for a shared library. # being built for a shared library.

View File

@ -468,7 +468,7 @@ extern LZMA_API(lzma_ret) lzma_alone_encoder(
/** /**
* \brief Calculate output buffer size for single-call Stream encoder * \brief Calculate output buffer size for single-call Stream encoder
* *
* When trying to compress uncompressible data, the encoded size will be * When trying to compress incompressible data, the encoded size will be
* slightly bigger than the input data. This function calculates how much * slightly bigger than the input data. This function calculates how much
* output buffer space is required to be sure that lzma_stream_buffer_encode() * output buffer space is required to be sure that lzma_stream_buffer_encode()
* doesn't return LZMA_BUF_ERROR. * doesn't return LZMA_BUF_ERROR.
@ -484,7 +484,7 @@ extern LZMA_API(lzma_ret) lzma_alone_encoder(
* \note The limit calculated by this function applies only to * \note The limit calculated by this function applies only to
* single-call encoding. Multi-call encoding may (and probably * single-call encoding. Multi-call encoding may (and probably
* will) have larger maximum expansion when encoding * will) have larger maximum expansion when encoding
* uncompressible data. Currently there is no function to * incompressible data. Currently there is no function to
* calculate the maximum expansion of multi-call encoding. * calculate the maximum expansion of multi-call encoding.
* *
* \param uncompressed_size Size in bytes of the uncompressed * \param uncompressed_size Size in bytes of the uncompressed

View File

@ -254,7 +254,7 @@ extern LZMA_API(lzma_ret) lzma_raw_decoder(
* chain to be used for the next Block(s). * chain to be used for the next Block(s).
* *
* - After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()), * - After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()),
* Block encocder (lzma_block_encoder()), and single-threaded .xz Stream * Block encoder (lzma_block_encoder()), and single-threaded .xz Stream
* encoder (lzma_stream_encoder()) allow changing certain filter-specific * encoder (lzma_stream_encoder()) allow changing certain filter-specific
* options in the middle of encoding. The actual filters in the chain * options in the middle of encoding. The actual filters in the chain
* (Filter IDs) must not be changed! Currently only the lc, lp, and pb * (Filter IDs) must not be changed! Currently only the lc, lp, and pb

View File

@ -56,7 +56,7 @@
* *
* Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
* support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
* when trying to compress uncompressible data), possibility to change * when trying to compress incompressible data), possibility to change
* lc/lp/pb in the middle of encoding, and some other internal improvements. * lc/lp/pb in the middle of encoding, and some other internal improvements.
*/ */
#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21) #define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
@ -417,7 +417,7 @@ typedef struct {
* like it is with LZMA_FILTER_LZMA1. Without this flag the * like it is with LZMA_FILTER_LZMA1. Without this flag the
* end marker isn't written and the application has to store * end marker isn't written and the application has to store
* the uncompressed size somewhere outside the compressed stream. * the uncompressed size somewhere outside the compressed stream.
* To decompress streams without the end marker, the appliation * To decompress streams without the end marker, the application
* has to set the correct uncompressed size in ext_size_low and * has to set the correct uncompressed size in ext_size_low and
* ext_size_high. * ext_size_high.
* *

View File

@ -277,7 +277,7 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
if (ret != LZMA_BUF_ERROR) if (ret != LZMA_BUF_ERROR)
return ret; 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 // given to us) or the output buffer was too small. Use the
// uncompressed chunks of LZMA2 to wrap the data into a valid // uncompressed chunks of LZMA2 to wrap the data into a valid
// Block. If we haven't been given enough output space, even // Block. If we haven't been given enough output space, even

View File

@ -47,7 +47,7 @@
// to 2 then symbol versioning is done only if also PIC is defined. // to 2 then symbol versioning is done only if also PIC is defined.
// By default Libtool defines PIC when building a shared library and // By default Libtool defines PIC when building a shared library and
// doesn't define it when building a static library but it can be // 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. // on PIC if neither --with-pic or --without-pic was used.
#if defined(HAVE_SYMBOL_VERSIONS_LINUX) \ #if defined(HAVE_SYMBOL_VERSIONS_LINUX) \
&& (HAVE_SYMBOL_VERSIONS_LINUX == 2 && !defined(PIC)) && (HAVE_SYMBOL_VERSIONS_LINUX == 2 && !defined(PIC))

View File

@ -350,7 +350,7 @@ file_info_decode(void *coder_ptr, const lzma_allocator *allocator,
// coder->temp[coder->temp_size - LZMA_STREAM_HEADER_SIZE]. // coder->temp[coder->temp_size - LZMA_STREAM_HEADER_SIZE].
// //
// Otherwise we will need to seek. The seeking is done so // 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 // This way it's likely that we also get a complete Index
// field into coder->temp without needing a separate seek // field into coder->temp without needing a separate seek
// for that (unless the Index field is big). // for that (unless the Index field is big).

View File

@ -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 five lowest bits are for the base-2 logarithm of
// the dictionary size and the highest three bits are // the dictionary size and the highest three bits are
// the fractional part (0/16 to 7/16) that will be // 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: // For example, with 0xB5:
// b2log = 21 // b2log = 21

View File

@ -629,7 +629,7 @@ get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
coder->thr = coder->threads_free; coder->thr = coder->threads_free;
coder->threads_free = coder->threads_free->next; 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 // it from the cached memory usage. Don't add it
// to mem_in_use though; the caller will handle it // to mem_in_use though; the caller will handle it
// since it knows how much memory it will actually // 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, // towards more favorable conditions (less memory in use,
// more in cache). // more in cache).
// //
// These are initalized to silence warnings. // These are initialized to silence warnings.
uint64_t mem_in_use = 0; uint64_t mem_in_use = 0;
uint64_t mem_cached = 0; uint64_t mem_cached = 0;
struct worker_thread *thr = NULL; 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_* // 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. // or add the changes.
mythread_sync(coder->mutex) { mythread_sync(coder->mutex) {
coder->mem_cached -= mem_freed; 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. // coder->mem_cached might count the same thing twice.
// If so, this will get corrected in get_thread() when // If so, this will get corrected in get_thread() when
// a worker_thread is picked from coder->free_threads // 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_in_use += coder->mem_next_in
+ coder->mem_next_filters; + coder->mem_next_filters;
} }

View File

@ -197,7 +197,7 @@ typedef struct {
/// (default is uint32_t). /// (default is uint32_t).
/// ///
/// Stringifying a filter is done by processing a given number of options /// 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. /// 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 /// If the integer is zero and .flags has OPTMAP_NO_STRFY_ZERO then the

View File

@ -184,7 +184,7 @@ typedef struct {
// //
// Algorithms such as LZMA2 first try to compress a chunk, and then check // Algorithms such as LZMA2 first try to compress a chunk, and then check
// if the encoded result is smaller than the uncompressed one. If the chunk // if the encoded result is smaller than the uncompressed one. If the chunk
// was uncompressible, it is better to store it in uncompressed form in // was incompressible, it is better to store it in uncompressed form in
// the output stream. To do this, the whole uncompressed chunk has to be // the output stream. To do this, the whole uncompressed chunk has to be
// still available in the history buffer. before_size achieves that. // still available in the history buffer. before_size achieves that.

View File

@ -633,7 +633,7 @@ lzma_lzma_encoder_create(void **coder_ptr, const lzma_allocator *allocator,
// Currently the maximum encoder dictionary size // Currently the maximum encoder dictionary size
// is 1.5 GiB due to lz_encoder.c and here we need // is 1.5 GiB due to lz_encoder.c and here we need
// to be below 2 GiB to make the rounded up value // to be below 2 GiB to make the rounded up value
// fit in an uint32_t and avoid an infite while-loop // fit in an uint32_t and avoid an infinite while-loop
// (and undefined behavior due to a too large shift). // (and undefined behavior due to a too large shift).
// So do the same check as in LZ encoder, // So do the same check as in LZ encoder,
// limiting to 1.5 GiB. // limiting to 1.5 GiB.
@ -673,7 +673,7 @@ lzma_lzma_encoder_create(void **coder_ptr, const lzma_allocator *allocator,
coder->uncomp_size = 0; coder->uncomp_size = 0;
coder->uncomp_size_ptr = NULL; coder->uncomp_size_ptr = NULL;
// Output size limitting is disabled by default. // Output size limiting is disabled by default.
coder->out_limit = 0; coder->out_limit = 0;
// Determine if end marker is wanted: // Determine if end marker is wanted:

View File

@ -42,7 +42,7 @@ static uint64_t memlimit_decompress = 0;
/// ///
/// - Default value for --memlimit-mt-decompress /// - Default value for --memlimit-mt-decompress
/// ///
/// This value is caluclated in hardware_init() and cannot be changed later. /// This value is calculated in hardware_init() and cannot be changed later.
static uint64_t memlimit_mt_default; static uint64_t memlimit_mt_default;
/// Memory usage limit for multithreaded decompression. This is a soft limit: /// Memory usage limit for multithreaded decompression. This is a soft limit:
@ -147,7 +147,7 @@ hardware_memlimit_set(uint64_t new_memlimit,
// for the xz program and so on. Don't use 4000 MiB because // for the xz program and so on. Don't use 4000 MiB because
// it could look like someone mixed up base-2 and base-10. // it could look like someone mixed up base-2 and base-10.
#ifdef __mips__ #ifdef __mips__
// For MIPS32, due to architectural pecularities, // For MIPS32, due to architectural peculiarities,
// the limit is even lower. // the limit is even lower.
const uint64_t limit_max = UINT64_C(2000) << 20; const uint64_t limit_max = UINT64_C(2000) << 20;
#else #else

View File

@ -50,7 +50,7 @@ static lzma_filter bcj_filters_encoders[] = {
#endif #endif
}; };
// HAVE_ENCODERS ifdef not termianted here because decoders are // HAVE_ENCODERS ifdef not terminated here because decoders are
// only used if encoders are, but encoders can still be used // only used if encoders are, but encoders can still be used
// even if decoders are not. // even if decoders are not.
@ -174,7 +174,7 @@ verify_filter_flags_encode(lzma_filter *filter, bool should_encode)
&filter_id_vli_size, size), LZMA_OK); &filter_id_vli_size, size), LZMA_OK);
assert_uint_eq(filter->id, filter_id); assert_uint_eq(filter->id, filter_id);
// Next decode the Size of Properites and ensure it equals // Next decode the Size of Properties and ensure it equals
// the expected size. // the expected size.
// Expected size should be: // Expected size should be:
// total filter flag length - size of filter id VLI + size of // total filter flag length - size of filter id VLI + size of

View File

@ -672,7 +672,7 @@ test_lzma_index_iter_rewind(void)
assert_uint_eq(iter.block.number_in_file, i + 1); assert_uint_eq(iter.block.number_in_file, i + 1);
} }
// Rewind back to the begining and iterate over the Blocks again // Rewind back to the beginning and iterate over the Blocks again
lzma_index_iter_rewind(&iter); lzma_index_iter_rewind(&iter);
// Should be able to re-iterate over the Blocks again. // Should be able to re-iterate over the Blocks again.

View File

@ -90,7 +90,7 @@ encode_single_call_mode(lzma_vli input, const uint8_t *expected,
// Helper function for test_lzma_vli_encode // Helper function for test_lzma_vli_encode
// Encodes an input VLI one byte at a time with the multi call // Encodes an input VLI one byte at a time with the multi call
// method. Then compares agaist a pre-computed value // method. Then compares against a pre-computed value
static void static void
encode_multi_call_mode(lzma_vli input, const uint8_t *expected, encode_multi_call_mode(lzma_vli input, const uint8_t *expected,
uint32_t expected_len) uint32_t expected_len)