Commit Graph

2600 Commits

Author SHA1 Message Date
Lasse Collin 51ad72dae4 Update contact info in README
(cherry picked from commit b14c130a58)
2024-05-28 18:41:35 +03:00
Lasse Collin 18463917f9 Translations: Use --package-name=xz-man with po4a
This is to match reality. See the added comment.

(cherry picked from commit 75f5f2e014)
2024-05-28 17:23:10 +03:00
Lasse Collin 26bbcb13cd Translations: Omit --package-name from po/Makevars
This is closer to the reality in the po/*.po files.

(cherry picked from commit eb217d016c)
2024-05-28 17:23:10 +03:00
Lasse Collin c35ee804b8 Translations: Omit man page line numbers from .pot and .po files
(cherry picked from commit 9114267038)
2024-05-28 12:21:22 +03:00
Lasse Collin 0f4429d47f Translations: Use the xgettext option --add-location=file
(cherry picked from commit 093490b582)
2024-05-28 12:21:22 +03:00
Lasse Collin a93e2c2d1d Translations: Use the msgmerge option --add-location=file
This way the PO file diffs are less noisy but the locations of the
strings are still present at file level, just without line numbers.

The option is available since gettext 0.19 (2014).
configure.ac requires 0.19.6.

(cherry picked from commit fccebe2b4f)
2024-05-28 12:21:22 +03:00
Lasse Collin d438989559 Build: Use $(SHELL) instead of sh to run scripts in Makefile.am
(cherry picked from commit f361d9ae85)
2024-05-28 12:21:22 +03:00
Lasse Collin 5781414b6e Translations: Change the home page URLs in man page translations
Since the source strings have changed, these would get marked as
fuzzy and the original string would be used instead. The original
and translated strings are identical in this case so it wouldn't
matter. But patching the translations helps still because then
po4a will show the correct translation percentage.

(cherry picked from commit a26dece347)
2024-05-23 18:18:05 +03:00
Lasse Collin 3670e0616e CMake: Add manual support for 32-bit x86 assembly files
One has to pass -DENABLE_X86_ASM=ON to cmake to enable the
CRC assembly code. Autodetection isn't done. Looking at
CMAKE_SYSTEM_PROCESSOR might not work as it comes from uname
unless cross-compilation is done using a CMake toolchain file.

On top of this, if the code is run on modern processors that support
the CLMUL instruction, then the C code should be faster (but then
one should also be using a x86-64 build if possible).

(cherry picked from commit 24387c234b)
2024-05-23 15:40:51 +03:00
Lasse Collin c1b001b09e CMake: Rename USE_DOXYGEN to ENABLE_DOXYGEN
It's more consistent with the other option() uses.

(cherry picked from commit 0fb3c9c3f6)
2024-05-23 15:40:51 +03:00
Lasse Collin 7213fe39c7 Use more confident language in COPYING
(cherry picked from commit 62733592a1)
2024-05-23 11:37:06 +03:00
Lasse Collin 15358be94a Add SPDX license identifiers to files under tests/ossfuzz
(cherry picked from commit 9ae2ebc1e5)
2024-05-23 11:37:06 +03:00
Lasse Collin 1aa92c7ffd Add SPDX license identifier to .codespellrc
(cherry picked from commit 9000d70eb9)
2024-05-23 11:37:06 +03:00
Lasse Collin 3c7e400fdc Move entries po4a/.gitignore to the top level .gitignore
The po4a directory is in EXTRA_DIST and thus all files there
are included in the package. .gitignore doesn't belong in the
package so keep that file out of the po4a directory.

(cherry picked from commit 903c16fcfa)
2024-05-23 11:37:06 +03:00
Lasse Collin 8a99272d4a CMake: Add comments
(cherry picked from commit 9d997d6f9d)
2024-05-23 11:36:05 +03:00
Lasse Collin c35259c9e2 CMake: Remove the note that some tests aren't run
They are now in the common build configurations.

(cherry picked from commit d35368b33e)
2024-05-23 11:36:05 +03:00
Lasse Collin 30982a2153 CMake: Add support for test_files.sh
(cherry picked from commit dc232d5846)
2024-05-23 11:36:05 +03:00
Lasse Collin 3a8f81e0ad Tests: Make test_files.sh more flexible
Add a new optional argument to specify the directory of the xz and
xzdec executables.

If ../config.h doesn't exist, assume that all encoders and decoders
are available.

(cherry picked from commit a7e9230af9)
2024-05-23 11:36:05 +03:00
Lasse Collin 0644675c82 CMake: Add support for test_compress.sh tests
(cherry picked from commit b40e6efbb4)
2024-05-23 11:36:05 +03:00
Lasse Collin dcc02a6ca0 Tests: Make test_compress.sh more flexible
Add a new optional second argument: directory of the xz and xzdec
executables. This is need with the CMake build where the binaries
end up in the top-level build directory.

If ../config.h doesn't exist, assume that all encoders and decoders
are available. This will make this script usable from CMake in the
most common build configuration.

NOTE: Since the existence of ../config.h is checked, the working
directory of the test script must be a subdir in the build tree!
Otherwise ../config.h would look outside the build tree.

Use the default check type instead of forcing CRC32 or CRC64.
Now the script doesn't need to check if CRC64 is available.

(cherry picked from commit ac3222d2cb)
2024-05-23 11:36:05 +03:00
Lasse Collin c761b7051f CMake: Prepare to support the test_*.sh tests
This is a bit hacky since the scripts grep config.h to know which
features were built but the CMake build doesn't create config.h.
So instead those test scripts will be run only when all relevant
features have been enabled.

(cherry picked from commit 006040b29c)
2024-05-23 11:36:05 +03:00
Lasse Collin a71bc2d75b Tests: test_suffix.sh: Add a comment
(cherry picked from commit 6167607a6e)
2024-05-23 11:36:05 +03:00
Lasse Collin 8fda5ce872 Fix typos
Thanks to xx on #tukaani.

(cherry picked from commit 4e9023857d)
2024-05-23 11:36:05 +03:00
Lasse Collin 2729079bcb liblzma: Fix white space
Thanks to xx on #tukaani.

(cherry picked from commit b14d08fbbc)
2024-05-23 11:36:05 +03:00
Lasse Collin a289c4dfeb xz: Document the static function get_chains_memusage()
(cherry picked from commit 142e670a41)
2024-05-23 11:28:20 +03:00
Lasse Collin 6f0db31713 xz: Rename filters_memusage_max() to get_chains_memusage()
(cherry picked from commit 78e984399a)
2024-05-23 11:28:20 +03:00
Lasse Collin d7e2bf7e2d xz: Rename filter_memusages to chains_memusages
(cherry picked from commit 54c3db0a83)
2024-05-23 11:28:20 +03:00
Lasse Collin 58f200b6d1 xz: Simplify the memory usage scaling code
This is closer to what it was before the --filtersX support was added,
just extended to support for scaling all filter chains. The method
before this commit was an extended version of the original too but
it was done in a more complex way for no clear reason. In case of
an error, the complex version printed fewer informative messages
(a good thing) but it's not a sigificant benefit.

In the limit is too low even for single-threaded mode, the required
amount of memory is now reported like in 5.4.x instead of like in
5.5.1alpha - 5.6.1 which showed the original non-scaled usage. It
had been a FIXME in the old code but it's not clear what message
makes the most sense.

Fixes: 5f0c5a0438
(cherry picked from commit d9e1ae79ec)
2024-05-23 11:28:20 +03:00
Lasse Collin 41bdc9fa5c xz: Edit comments
(cherry picked from commit 0ee56983d1)
2024-05-23 11:28:20 +03:00
Lasse Collin 52e40c1912 xz: Rename chain_idx to chain_num
(cherry picked from commit ec82a49c35)
2024-05-23 11:28:20 +03:00
Lasse Collin 8a01963331 xz: Edit coding style
(cherry picked from commit a731a6993c)
2024-05-23 11:28:20 +03:00
Lasse Collin e3ad7eda74 xz: Edit comments
Fixes: 5f0c5a0438
(cherry picked from commit 32eb176b89)
2024-05-23 11:28:20 +03:00
Lasse Collin 09cabae2ab xz: Fix grammar in a comment
Fixes: cb3111e3ed
(cherry picked from commit b90339f4da)
2024-05-23 11:28:20 +03:00
Lasse Collin c10b66fbf9 xz: Rename filter_memusages to encoder_memusages
(cherry picked from commit 4c0bdaf13d)
2024-05-23 11:28:20 +03:00
Lasse Collin 9132ce3564 xz: Edit coding style
(cherry picked from commit b54aa023e0)
2024-05-23 11:28:20 +03:00
Lasse Collin d642e13874 xz: Rename filters_index to chain_num
The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68.

(cherry picked from commit 49f67d3d3f)
2024-05-23 11:28:20 +03:00
Lasse Collin 47599f3b73 xz: Replace a few uint32_t with "unsigned" to reduce the number of casts
These hold only tiny values.

(cherry picked from commit ff9e8b3d06)
2024-05-23 11:28:20 +03:00
Lasse Collin 8f5ab75c45 xz: Rename filters_used_mask to chains_used_mask
The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68.

(cherry picked from commit b5e6c1113b)
2024-05-23 11:28:20 +03:00
Lasse Collin 3eb7cf9dd5 xz: Move the setting of "check" in coder_set_compression_settings()
It's more logical to do it in the beginning instead of in the middle
of the filter chain handling.

Fixes: d6af7f3470
(cherry picked from commit 32500dfaad)
2024-05-23 11:28:20 +03:00
Lasse Collin 067961ee0e xz: Rename "filters" to "chains"
The convention is that

    lzma_filter filters[LZMA_FILTERS_MAX + 1];

contains the filters of a single filter chain.
It was so here as well before the commit
d6af7f3470.
It changes "filters" to a ten-element array of filter chains.
It's clearer to call this array-of-arrays "chains".

This also renames "filter_idx" to "chain_idx" which is used
as an index as in chains[chain_idx].

(cherry picked from commit ad146b1f42)
2024-05-23 11:28:20 +03:00
Lasse Collin 6822f6f891 xz: Clean up a comment
(cherry picked from commit 5a4ae4e4d0)
2024-05-23 11:28:20 +03:00
Lasse Collin 0e5e3e7bdc xz: Add clarifying assertions
(cherry picked from commit 2de80494ed)
2024-05-23 11:28:20 +03:00
Lasse Collin 77bcf6b76a xz: Add a clarifying assertion
Fixes: 5f0c5a0438
(cherry picked from commit 1eaad004bf)
2024-05-23 11:28:20 +03:00
Lasse Collin df3efc058a xz: Clarify a comment
(cherry picked from commit 605094329b)
2024-05-23 11:28:20 +03:00
Lasse Collin 4ebfe11cd3 xz: Use the info collected in parse_block_list()
This is slightly simpler and it avoids looping through
the opt_block_list array.

(cherry picked from commit 8fac2577f2)
2024-05-23 11:28:20 +03:00
Lasse Collin bfea691361 xz: Remember the filter chains and the largest Block in parse_block_list()
(cherry picked from commit 81d350dab8)
2024-05-23 11:28:20 +03:00
Lasse Collin d4e33e7392 xz: Update a comment and initialization of filters_used_mask
(cherry picked from commit 46ab56968f)
2024-05-23 11:28:20 +03:00
Lasse Collin 3c130737c9 xz: parse_block_list: Edit integer type casting
(cherry picked from commit e89293a0ba)
2024-05-23 11:28:20 +03:00
Lasse Collin 40c8513b4e xz: Make filter_memusages a local variable
(cherry picked from commit 87011e40c1)
2024-05-23 11:28:20 +03:00
Lasse Collin cacaf25aa7 xz: Remove unused code and simplify
opt_mode == MODE_COMPRESS isn't possible when HAVE_ENCODERS isn't
defined. Thus, when *encoding*, the message about *decoder* memory
usage is possible to show only when both encoder and decoder have
been built.

Since the message is shown only at V_DEBUG, skip the memusage
calculation if verbosity level isn't high enough.

Fixes: 5f0c5a0438
(cherry picked from commit 347b412a93)
2024-05-23 11:28:20 +03:00